[gdal-dev] MVT Driver, Tiling Scheme NZTM

Even Rouault even.rouault at spatialys.com
Mon Oct 19 01:25:59 PDT 2020


Ian,

> I am creating a custom tiling scheme for NZTM, using the MVT driver, and
> outputting to a directory.
> 
> ogr2ogr -progress -f MVT  wellyDEM_50mContour_nztm_simp
> ../wellyDEM_contour_50m_simp.shp -dsco MINZOOM=0 -dsco MAXZOOM=8 -dsco
> COMPRESS=NO -dsco TILING_SCHEME=EPSG:2193,-1000000,10000000,2293760
> 
> In the render, there are no errors and the process completes just fine. If
> I use the .pbf files in an NZTM map on Leaflet, everything seems to go fine
> until I reach Zoom 8. The grid structure created for the .pbf files no
> longer lines up with an NZTM map.  I suspect this is due to the fact that
> NZTM does not have a structure where the resolutions half for each zoom
> scale and at zoom 8, this is where this first happens.
> 
> NZTM Map Tile Resolutions
> resolutions =
> [8960.0,4480.0,2240.0,1120.0,560.0,280.0,140.0,70.0,28.0,14.0,7.0,2.8,1.4,0.
> 7,0.28,0.14,0.07]
> 
> Is there any way I can use the resolutions also when building the tile
> cache? If I could, do you think this would this solve the alignment issue?

The MVT driver only supports currently zoom levels varying by a factor of 2, 
which explains the bad rendering starting with zoom 8. The driver could likely 
be extended to support the JSON files that describe a tiling matrix set, that 
are now supported (master / 3.2dev) by the COG and GPKG drivers for their 
TILING_SCHEME creation option.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list