"extent" not included in vector tiles
MattBlissett opened this issue · 4 comments
This was super-fast to use! But:
Tiles generated using this script didn't have an "extent" set, so my client complains "The required extent field is missing in the layer water. Tile does not comply with Version 2 of the Mapbox Vector Tile Specification."
Other clients might be more lenient, but it is indeed required by the spec.
(I will investigate further tomorrow, but this is presumably a problem with PostGIS. I'm logging it here so people don't waste processing time making non-compliant tiles.)
Hi Matt, thanks! Sorry, didn't see this until now.
This uses the older ST_AsMVT prior to PostGIS merge. It works, but as you discovered, not entirely compliant.
Problem is, the new ST_AsMVT and ST_AsMVTGeom that were merged into PostGIS are more complicated to use and it's trickier to generate queries to use them (when using the big complex tile schemas).
I also noticed a bug in that IIRC, empty geoms crashed the ST_AsMVTGeom. I want to take another crack at this, it's being tracked in openmaptiles/openmaptiles#243 for visibility.
Hi, and thanks.
Indeed, it's not entirely compliant. I added extents to my tiles, but then about ¼-⅓ had other geometry errors, and node-mapnik wouldn't render them.
I've had to bring forward some other work I'm doing, so I won't be looking at this for at least a couple of weeks.
@MattBlissett FYI, I have it working #2 in conjunction with openmaptiles/postgis#7 .
If you got the time, could you test how well this works for you?
In-browser styling isn't finished, but here's my first complete result: https://tile.gbif-uat.org/ui/4326/vector.html
I can't really compare whether it's faster or not, since I used different hardware.