[OSM-dev] Evaluate layer list from CartoCSS style

Paul Norman penorman at mac.com
Mon Aug 29 03:28:51 UTC 2016


On 8/28/2016 8:07 AM, Stadin, Benjamin wrote:
> we’re defining the data structure for the next version of our 3D map, a
> basic feature of it is the indoor capability. I could write more about the
> background, but to keep it short for now: I need to generate an ordered
> list of layers with their table names in the rendering db, so ordered from
> „bottom layer to top layer“, out of a Carto CSS style definition (e.g.
> from the actual OSM style def.
> https://github.com/gravitystorm/openstreetmap-carto).

The typical osm2pgsql rendering database does not have layers. It has 
tables for points, lines, polygons, and one for data commonly used at 
low zooms.

OpenStreetMap Carto comes with layers, but these are not layers in the 
traditional GIS sense. They are layers which are rendered and the layer 
definitions are not intended to be meaningful outside of the specific 
style. These regularly change between style versions and copying them is 
a bad idea unless you want to recreate that specific style.

If you do want to do that, the style definitions are in YAML and should 
be easy to parse.



More information about the dev mailing list