Re: [mapserver-users] the lines one above other

2015-02-13 Thread Vladimir
 Lars, 

Thanx in any event for devoting your attention.

Vladimir,

I see, so you do not need the order of the LAYERS but the order of
  the FEATURES. I did not understand that correctly at first, sorry.
  In that case, I guess Andreas approach would be the one.

Best

Lars

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-13 Thread Rahkonen Jukka (MML)
Hi,

With OSM and Mapnik it is a two phase process. First osm2pgsql tries to 
generate sensible z-index values and then Mapnik makes “order by” queries to 
the database. The queries are here 
https://github.com/gravitystorm/openstreetmap-carto/blob/master/project.yaml 
and as an example

(SELECT way,
COALESCE((
'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 
'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') 
THEN highway ELSE NULL END)),
('railway_' || (CASE WHEN railway IN ('platform') THEN railway ELSE NULL END))
) AS feature
FROM planet_osm_polygon
WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 
'footway', 'track', 'path', 'platform')
OR railway IN ('platform')
ORDER BY z_order, way_area DESC
) AS highway_area_casing

-Jukka Rahkonen-


Vladimir wrote:


Bobb

Thanks you very much for detailed answer.
I'll have to place the parts of lines in various layers.
There is no other elegant decision as i understood, but I wonder how 
web-map-giants like GOOGLE or OSM get out of this scrape.


Vladimir,



I’ve faked this in the past by drawing the same layer many times in one pass 
(inside of the same mapfile), you need at least one complete layer pass, with 
other partial layers for the over/under situations.  You can do the partial 
layer grouping with attributes on the segments that need to go under or over, 
and this is a manual process for the most part, but it’s a real pain to keep 
that up to date over time (I’m talking over years) .  I could probably find a 
programmer that thought of this as a challenge, but you still need a human to 
decide what is over something else as a last QA.



The much harder task is defining which layers (partial segments are over/under 
other layers..  You need to remove some line segments form at least one of the 
layers in order to make things display correctly.  Sometimes a layer is over, 
sometime it’s under.  I actually have two instances in my mapping system, where 
I have three different bridges stacked on top of each other, two of them a 
roadways, with the odd one in between them.  The other has a Railway bridge 
over a roadway bridge crossing.



The z-index stuff has always been a painful thing thing to keep updated, but it 
is doable.



I’ve rencetly been looking at this myself for hardcopy pringing purposes. As 
well.



Bobb
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-13 Thread Vladimir

Bobb
Thanks you very much for detailed answer.
I'll have to place the parts of lines in various layers.
There is no other elegant decision as i understood, but I wonder how 
web-map-giants like GOOGLE or OSM get out of this scrape.
Vladimir,
 
I’ve faked this in the past by drawing the same layer many times in one pass 
(inside of the same mapfile), you need at least one complete layer pass, with 
other partial layers for
 the over/under situations.  You can do the partial layer grouping with 
attributes on the segments that need to go under or over, and this is a manual 
process for the most part, but it’s a real pain to keep that up to date over 
time (I’m talking over years)
 .  I could probably find a programmer that thought of this as a challenge, but 
you still need a human to decide what is over something else as a last QA.
 
The much harder task is defining which layers (partial segments are over/under 
other layers..  You need to remove some line segments form at least one of the 
layers in order to make
 things display correctly.  Sometimes a layer is over, sometime it’s under.  I 
actually have two instances in my mapping system, where I have three different 
bridges stacked on top of each other, two of them a roadways, with the odd one 
in between them.  The
 other has a Railway bridge over a roadway bridge crossing.
 
The z-index stuff has always been a painful thing thing to keep updated, but 
it is doable.
 
I’ve rencetly been looking at this myself for hardcopy pringing purposes. As 
well.
 
Bobb  
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-13 Thread Vladimir

There is question about placing the parts of lines in various layers.
I added the small part of line above the highway with linecap=butt for stops 
the line exactly at the end as described in
http://mapserver.org/mapfile/symbology/construction.html#linecap.
But butts of the line has some thin border, please see the pic:
http://s8.postimg.org/iymc3az9h/linecap_butt.jpg
How to escape this? 
Thanx.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] the lines one above other

2015-02-12 Thread Vladimir
 Hello All!

The task is to show multilevel junction of highway.
The lines should be at the same layer and has the same style, for example see 
orange lines on attached pic:
[img]http://s14.postimg.org/yk40e0nq9/crossroad.jpg[/img]
Is it possible to draw the lines one above other by an one layer?
May be some method of Z-index for features in a layer exists?
Thanks for any guidance to display this kind of crossroads. Vladimir___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-12 Thread Lars Fricke

  
  
Vladimir,
  
  I see, so you do not need the order of the LAYERS but the order of
  the FEATURES. I did not understand that correctly at first, sorry.
  In that case, I guess Andreas approach would be the one.
  
  Best
  
  Lars
  
  Am 12.02.2015 um 14:26 schrieb Vladimir:


  Lars. Thank you very much for response.
Please see the pics.
What I have: http://s14.postimg.org/yk40e0nq9/crossroad.jpg
What I need: http://s14.postimg.org/yk40e0nq9/crossroad.jpg
The problem is the orange roads lies in a one layer because they
are identical features(has the same type). It is done
accordingly to specificity the app. 
And I would like to escape a duplication of layers if it is
possible.
Therefore i need to locate the features one above other at a one
layer.

  
  
  
  
  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


  

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-12 Thread Eichner, Andreas - SID
I'm not sure about this but AFAIK MapServer draws features in the order they 
are returned by the query. For Shapefiles there is the sortshp utility. If 
you're on a relational database like PostGIS or OracleSpatial you can try 
including the ORDER BY prio within the DATA. But since MS wraps it into a 
subquery the database might still return the features out of order. 

 -Ursprüngliche Nachricht-
 Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
 boun...@lists.osgeo.org] Im Auftrag von Vladimir
 Gesendet: Donnerstag, 12. Februar 2015 12:02
 An: mapserver-users@lists.osgeo.org
 Betreff: [mapserver-users] the lines one above other
 
 Hello All!
 
 
 
 The task is to show multilevel junction of highway.
 The lines should be at the same layer and has the same style, for example
 see orange lines on attached pic:
 [img]http://s14.postimg.org/yk40e0nq9/crossroad.jpg[/img]
 Is it possible to draw the lines one above other by an one layer?
 May be some method of Z-index for features in a layer exists?
 Thanks for any guidance to display this kind of crossroads.
 
 Vladimir
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-12 Thread Lars Fricke
For me it works by sorting in the map file. I then put the needed layers 
into my WMS request. The order does not matter in the request it seems.


Best

Lars

Am 12.02.2015 um 13:52 schrieb Eichner, Andreas - SID:

I'm not sure about this but AFAIK MapServer draws features in the order they are returned 
by the query. For Shapefiles there is the sortshp utility. If you're on a relational 
database like PostGIS or OracleSpatial you can try including the ORDER BY 
prio within the DATA. But since MS wraps it into a subquery the database might 
still return the features out of order.


-Ursprüngliche Nachricht-
Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
boun...@lists.osgeo.org] Im Auftrag von Vladimir
Gesendet: Donnerstag, 12. Februar 2015 12:02
An: mapserver-users@lists.osgeo.org
Betreff: [mapserver-users] the lines one above other

Hello All!



The task is to show multilevel junction of highway.
The lines should be at the same layer and has the same style, for example
see orange lines on attached pic:
[img]http://s14.postimg.org/yk40e0nq9/crossroad.jpg[/img]
Is it possible to draw the lines one above other by an one layer?
May be some method of Z-index for features in a layer exists?
Thanks for any guidance to display this kind of crossroads.

Vladimir

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-12 Thread Vladimir

Andreas. Thanks for response too.
I use phpmapscript and postgis. How can I use order by  for this purpose?

Sorry. I have some correction:
What I have:  http://s18.postimg.org/vkvb8jprd/crossroad1.jpg
What I need:  http://s14.postimg.org/yk40e0nq9/crossroad.jpg




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-12 Thread Lars Fricke

  
  
Hello Vladimir,
  
  I'm not sure if I understand right. However what I would do is the
  following:
  1) Put all sources into different layers. That is: If you have
  different street layers in different sources, you can make one
  layer each in the mapfile or you can first make one source per
  street type (if possible). You can also group layers as union
  layers: http://mapserver.org/mapfile/union.html if you need to
  (like one street type coming from different sources)
  2) In the mapfile, you can define the order how the layers are
  drawn one after the other (last layer in the mapfile is drawn
  first): http://mapserver.org/tutorial/example1-5.html
  
  I hope this helps.
  
  Best
  
  Lars
  
  Am 12.02.2015 um 12:01 schrieb Vladimir:


  Hello All!
  
  The task is
to show multilevel junction of highway.
The lines should be at the same layer and has the same style,
for example see orange lines on attached pic:
[img]http://s14.postimg.org/yk40e0nq9/crossroad.jpg[/img]
Is it possible to draw the lines one above other by an one
layer?
May be some method of Z-index for features in a layer exists?
Thanks for any guidance to display this kind of crossroads.
  Vladimir
  
  
  
  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


  

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] the lines one above other

2015-02-12 Thread Vladimir

Lars. Thank you very much for response.
Please see the pics.
What I have: http://s14.postimg.org/yk40e0nq9/crossroad.jpg
What I need: http://s14.postimg.org/yk40e0nq9/crossroad.jpg
The problem is the orange roads lies in a one layer because they are identical 
features(has the same type). It is done accordingly to specificity the app. 
And I would like to escape a duplication of layers if it is possible.
Therefore i need to locate the features one above other at a one layer.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users