Conversation
nyurik
left a comment
There was a problem hiding this comment.
awesome work, thanks!!! One question -- shouldn't the !pixel_width! change be reflected in the tests somewhere? I'm a bit surprised there is no change to it. Maybe we should add some explicit tests for it?
|
Hi @nyurik |
|
@lazaa32 if you have a few extra minutes, please create a simple test similar to the ones that already exist in the https://github.com/openmaptiles/openmaptiles-tools/tree/master/tests/testlayers |
This PR fixes two issues:
Before
ST_AsMVTGeom(geometry, ST_TileEnvelope(zoom, x, y), extent, buffer, true)function readbufferfrom layer yaml definitionbuffer_size(e.g. 256 for layer place). Which is in pixels but should be in vector tile unit because it is compared toextent(4096). Related to PR Bug fix tile_to_bbox(): use pixel_width instead of extent. #333.When replacing
!pixel_width!and!pixel_height!in Mapnik query,self.pixel_widthandself.pixel_heightare used. That means that a constant valuepixel_scaleis used throughout all zooms. However I checked logs from Mapnik rendering and following values forpixel_widthare used:I modified the tool so it calculates pixel_width (which is actually zoom resolution meters/pixel) for each zoom_level. Using constant value for
pixel_widthleads to having different number of features in a same tile rendered via PgQuery and Mapnik.