[Geoserver-users] Odd Mapbox vector tile (MVT) rendering since GS 2.15

Hi,

after upgrading Geoserver from version 2.13 to version 2.15.3, I have encountered an odd issue concerning GWC and MVT:

Mapbox vector tiles (pbf as well as generated mbtiles) that are generated by GWC are rendered at the wrong location on the map.

Coordinates, extent, and scaling of vector tiles generated by GS >=2.15.x differ greatly from VT that were generated by previous GS versions (GS <= 2.14.x).

This deviation can be examined by using the QGIS mapping software.

Steps to reproduce this issue by using the topp:tasmania_roads layer:

  1. Enable caching for the topp:tasmania_roads layer
  2. Generate MVT with GS 2.14 - Use the GWC integration to seed MVT (MIME “application/x-protobuf;type=mapbox-vector”) using the default EPSG:900913 gridset
  3. Generate MVT with GS 2.15 - Use the GWC integration to seed MVT (MIME “application/vnd.mapbox-vector-tile”) using the same gridset
  4. Open QGIS and add one arbitrary pbf-file that was generated by GS 2.14 to the QGIS map (Note: “Vector Tiles Reader” plugin must be installed)
  5. Add the pbf-file that was generated by GS 2.15 and the same coordinate (XYZ) to the map
  6. Examine if the rendered position, scale and/or extent differ

Any help is appreciated.

Thanks,

Mauro

Thanks for the detailed report, checking the release notes here: https://osgeo-org.atlassian.net/jira/secure/ReleaseNote.jspa?projectId=10000&version=16746

Shows a number of map box vector tile problems being fixed that would result in differences between 2.14 and 2.15.

···


Jody Garnett

The scaling difference is to be expected, if memory serves me right it switched from a 256px grid to a 4096px one,
to get better accuracy especially on hidpi displays, and when oversampling the last cached level. It’s an improvement, not a bug.

Commits here:

A proper client displays data in the same position. In my company we have been using vector tiles with both Leaflet and
Openlayers recently, mostly with out of the box configurations, with no display issues. The GWC preview can also
display vector tles, using OpenLayers.

Displaying a stand-alone pbf in QGIS does not say much, since the vector tile itself does not carry its absolute positioning,
which is known by the client only, when asking for the specific tile (vector tiles are described in screen space, without
knowing the tile matrix set and the tile coordinates, it’s just “free floating”).

Cheers
Andrea

···

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Hi Jody, hi Andrea,

thanks a lot for your feedback.

Possibly our web app doesn’t extract vector tiles in the correct winding order.
I’ll inspect our code and let you know the results.

Greetings,
Mauro

Am Fr., 15. Nov. 2019 um 16:33 Uhr schrieb Andrea Aime <andrea.aime@anonymised.com>:

The scaling difference is to be expected, if memory serves me right it switched from a 256px grid to a 4096px one,
to get better accuracy especially on hidpi displays, and when oversampling the last cached level. It’s an improvement, not a bug.

Commits here:

A proper client displays data in the same position. In my company we have been using vector tiles with both Leaflet and
Openlayers recently, mostly with out of the box configurations, with no display issues. The GWC preview can also
display vector tles, using OpenLayers.

Displaying a stand-alone pbf in QGIS does not say much, since the vector tile itself does not carry its absolute positioning,
which is known by the client only, when asking for the specific tile (vector tiles are described in screen space, without
knowing the tile matrix set and the tile coordinates, it’s just “free floating”).

Cheers
Andrea

On Thu, Nov 14, 2019 at 3:26 PM Maurizio La Mela <maurizio.la.mela@anonymised.com> wrote:

Hi,

after upgrading Geoserver from version 2.13 to version 2.15.3, I have encountered an odd issue concerning GWC and MVT:

Mapbox vector tiles (pbf as well as generated mbtiles) that are generated by GWC are rendered at the wrong location on the map.

Coordinates, extent, and scaling of vector tiles generated by GS >=2.15.x differ greatly from VT that were generated by previous GS versions (GS <= 2.14.x).

This deviation can be examined by using the QGIS mapping software.

Steps to reproduce this issue by using the topp:tasmania_roads layer:

  1. Enable caching for the topp:tasmania_roads layer
  2. Generate MVT with GS 2.14 - Use the GWC integration to seed MVT (MIME “application/x-protobuf;type=mapbox-vector”) using the default EPSG:900913 gridset
  3. Generate MVT with GS 2.15 - Use the GWC integration to seed MVT (MIME “application/vnd.mapbox-vector-tile”) using the same gridset
  4. Open QGIS and add one arbitrary pbf-file that was generated by GS 2.14 to the QGIS map (Note: “Vector Tiles Reader” plugin must be installed)
  5. Add the pbf-file that was generated by GS 2.15 and the same coordinate (XYZ) to the map
  6. Examine if the rendered position, scale and/or extent differ

Any help is appreciated.

Thanks,

Mauro


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

The problem was a wrong tile extent that was set in our client. Our client uses OpenLayers (ol5) and a custom tile load function to read MVT data from a SQLite database. In our custom tile load function we had specified a fixed extent ([0, 0, 2048, 2048]) for each tile. We have fixed it by deriving the actual extent from the MVT data by using ol.format.MVT reader.

Again, thanks for your help and merry Christmas!

Mauro

On Thu, 28 Nov 2019, 18:14 Maurizio La Mela <maurizio.la.mela@anonymised.com> wrote:

Hi Jody, hi Andrea,

thanks a lot for your feedback.

Possibly our web app doesn’t extract vector tiles in the correct winding order.
I’ll inspect our code and let you know the results.

Greetings,
Mauro

Am Fr., 15. Nov. 2019 um 16:33 Uhr schrieb Andrea Aime <andrea.aime@anonymised.com>:

The scaling difference is to be expected, if memory serves me right it switched from a 256px grid to a 4096px one,
to get better accuracy especially on hidpi displays, and when oversampling the last cached level. It’s an improvement, not a bug.

Commits here:

A proper client displays data in the same position. In my company we have been using vector tiles with both Leaflet and
Openlayers recently, mostly with out of the box configurations, with no display issues. The GWC preview can also
display vector tles, using OpenLayers.

Displaying a stand-alone pbf in QGIS does not say much, since the vector tile itself does not carry its absolute positioning,
which is known by the client only, when asking for the specific tile (vector tiles are described in screen space, without
knowing the tile matrix set and the tile coordinates, it’s just “free floating”).

Cheers
Andrea

On Thu, Nov 14, 2019 at 3:26 PM Maurizio La Mela <maurizio.la.mela@anonymised.com> wrote:

Hi,

after upgrading Geoserver from version 2.13 to version 2.15.3, I have encountered an odd issue concerning GWC and MVT:

Mapbox vector tiles (pbf as well as generated mbtiles) that are generated by GWC are rendered at the wrong location on the map.

Coordinates, extent, and scaling of vector tiles generated by GS >=2.15.x differ greatly from VT that were generated by previous GS versions (GS <= 2.14.x).

This deviation can be examined by using the QGIS mapping software.

Steps to reproduce this issue by using the topp:tasmania_roads layer:

  1. Enable caching for the topp:tasmania_roads layer
  2. Generate MVT with GS 2.14 - Use the GWC integration to seed MVT (MIME “application/x-protobuf;type=mapbox-vector”) using the default EPSG:900913 gridset
  3. Generate MVT with GS 2.15 - Use the GWC integration to seed MVT (MIME “application/vnd.mapbox-vector-tile”) using the same gridset
  4. Open QGIS and add one arbitrary pbf-file that was generated by GS 2.14 to the QGIS map (Note: “Vector Tiles Reader” plugin must be installed)
  5. Add the pbf-file that was generated by GS 2.15 and the same coordinate (XYZ) to the map
  6. Examine if the rendered position, scale and/or extent differ

Any help is appreciated.

Thanks,

Mauro


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.