[Geoserver-users] How to make use of the "z_order" attribute

Howdy you all,

after I importet OSM vector data into my PostGIS-DB using osm2pgsql, the column “Z_ORDER” was created by default, which is quite useful I think. Because I want to draw the data on my map according to their “Z_ORDER”, and not only according to the draw order of my XML file. For instance, the order of the attribute “highway” is not always the same relative to the attribute “railway” - in some cases the attribute “highway” has to be drawn under “railway” and in others above, to be correct. But how can I make use of the “z_order” to achieve this?

(1) Do I have to make use of a filter function like “INTERSECT” and then check the z_order between the attributes within my XML file (2) or do I have to filter my database via SQL queries before publishing in GeoServer (3) or am I completley on a wrong path, maybe I didn’t get the point - someone some ideas?

Many thanks in advance for your help!

Best regards,

Hightower

On Tue, Mar 4, 2014 at 2:06 PM, Tim Jonas <2meter3mann@anonymised.com>wrote:

Howdy you all,

after I importet OSM vector data into my PostGIS-DB using osm2pgsql, the
column "Z_ORDER" was created by default, which is quite useful I think.
Because I want to draw the data on my map according to their "Z_ORDER", and
not only according to the draw order of my XML file. For instance, the
order of the attribute "highway" is not always the same relative to the
attribute "railway" - in some cases the attribute "highway" has to be drawn
under "railway" and in others above, to be correct. But how can I make use
of the "z_order" to achieve this?

Simply put, you cannot do that in a general waay, not with the current code
at least, in SLD the z order is controlled by feature type styles, but you
cannot create them dynamically.
If you have a small number of z orders, you can create as many feature
types styles and have the rule filters catch only the features with a
specific Z order though.

Or you could create sql views pulling a specific z order out, and create N
layers.

The most efficient way would be to have the renderer ask the database to
return features sorted by ascending z order value, but we don't have this
ability yet.

Cheers
Andrea

--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information ==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------