[gdal-dev] OSM driver with z_order values

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri Nov 7 05:48:57 PST 2014


On 2014-11-07 4:49 AM, Even Rouault wrote:
>
> The ideal would to find some syntax to do this in osmconf.ini. Actually,
> Jukka's mention of sqlite makes me think that the syntax could be SQL
> evaluated by SQLite.
> Something like :
>
> computed_fields = z_order
> z_order_type = Integer
> z_order_sql = "SELECT (CASE [highway] WHEN 'minor' THEN 3 WHEN 'road' THEN 3
> WHEN 'tertiary_link' THEN 4 ... ELSE 0) + (CASE WHEN [bridge] IS IN ('yes',
> 'true', '1') THEN 10 ELSE 0 END) + (CASE WHEN [layer] IS NOT NULL THEN 10 *
> CAST([layer) AS INTEGER) ELSE 0 END) + ..."
>
> And stuff in [] would be replaced by the corresponding field value.
>
> That's something that could also potentially be done as the ogr2ogr level,
> since there's hardly anything driver specific in that, but finding the right U.I
> to specify per-layer computed fields isn't obvious.
>
>

I agree, it would be very cool to be able to configure the z_order field 
in osmconf.ini !!!! I'm not sure what else to add to this discussion, 
other than that I really want this :)

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/







More information about the gdal-dev mailing list