[OSM-dev] OSM-Carto style, ported to vector tiles!

Rory McCann rory at technomancy.org
Sun Jul 24 15:38:42 UTC 2016


On 22/07/16 18:05, Christoph Hormann wrote:
> Looking at your changes a significant part seems to be dealing with 
> way_pixels and indicates that the meaning of way_pixels in your version 
> is quite different from that in the normal standard style.  Could you 
> explain that?  You do not seem to have changed the SQL.

way_pixels is mentioned a lot in the style, but it's not as complicated
to deal with as you'd think.

The problem (correct me if I'm wrong!) is that with vector tiles it's
common to generate them only down to a certain zoom level (e.g. z14),
and for lower zoom levels (z15+) to use the z14 tile, and just crop out
the area you want, i.e. you are using the result of z14 SQL queries for
z15+.

The SQL queries are run when generating the .pbf vector tiles, and only
go down to z14. For generating images, SQL isn't run and instead have to
use the pregenerated pbf, and hence pregenerated way_pixels value. Hence
you have to change the style, not the SQL.

If you don't change it, areas that should appear at z15+ won't, since
the way_pixels will be wrong for that zoom.

Hope that makes sense!

Rory




More information about the dev mailing list