Hi,
I’ve been using the vector tiles extension, consuming the output with Mapbox GL JS.
The problem is that Mapbox GL JS requires feature ids for some methods and vector tiles produced by GeoServer have empty feature ids.
To solve this I found that the underlying java-vector-tile library also needs some fixing. I opened a PR [1] to do that and created a fork of the geoserver repo showing how to use the changes [2]. Once (if) the java-vector-tile PR is accepted I would open another one in the GeoServer repo using it.
I already compiled everything and created an extension with all these changes and tested it with Mapbox GL JS locally and it is working successfully.
I also opened an issue in JIRA explaining this as well [3].
What do you think about this? Does it have something missing or do you think it could make a proper contribution?
Cheers.
[1] https://github.com/ElectronicChartCentre/java-vector-tile/pull/25
[2] https://github.com/geomatico/geoserver/commit/4cfabca322284c548f5c169c1b89999b5a52f0dd
[3] https://osgeo-org.atlassian.net/browse/GEOS-8875
···
Víctor González
http://geomati.co
Hi, Victor,
As someone already noted in your PR - the FID# will not, typically, be unique in a VT because there’s multiple layers in the tile. The VT features already have a layer associated with them, so this is likely not going to be too big a concern.
I think the GeoServer part is fine - perhaps someone could verify that parsing the feature ID like that is reasonably ok to do.
You might, also, need to sign a contribution agreement.
Cheers,
David
···
On Wed, Aug 8, 2018 at 4:00 AM, Víctor González <victor.gonzalez@anonymised.com> wrote:
Hi,
I’ve been using the vector tiles extension, consuming the output with Mapbox GL JS.
The problem is that Mapbox GL JS requires feature ids for some methods and vector tiles produced by GeoServer have empty feature ids.
To solve this I found that the underlying java-vector-tile library also needs some fixing. I opened a PR [1] to do that and created a fork of the geoserver repo showing how to use the changes [2]. Once (if) the java-vector-tile PR is accepted I would open another one in the GeoServer repo using it.
I already compiled everything and created an extension with all these changes and tested it with Mapbox GL JS locally and it is working successfully.
I also opened an issue in JIRA explaining this as well [3].
What do you think about this? Does it have something missing or do you think it could make a proper contribution?
Cheers.
[1] https://github.com/ElectronicChartCentre/java-vector-tile/pull/25
[2] https://github.com/geomatico/geoserver/commit/4cfabca322284c548f5c169c1b89999b5a52f0dd
[3] https://osgeo-org.atlassian.net/browse/GEOS-8875
–
Víctor González
http://geomati.co
Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Geoserver-devel mailing list
Geoserver-devel@anonymised.com.366…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Hi Dave,
Thanks for the feedback. As you point, Mapbox (both spec and JS library) forces features to always belong to a layer, so there’s no issue having the same id across different layers. We’ve been testing locally this patches with layer groups (up to 45 layers) and it’s working great identifying features.
I’ll add some tests and some tweaks to the parsing if necessary before adding the PR.
Thanks for pointing the contribution agreement.
Cheers.
···
2018-08-08 18:23 GMT+02:00 Dave Blasby <dblasby@anonymised.com>:
Hi, Victor,
As someone already noted in your PR - the FID# will not, typically, be unique in a VT because there’s multiple layers in the tile. The VT features already have a layer associated with them, so this is likely not going to be too big a concern.
I think the GeoServer part is fine - perhaps someone could verify that parsing the feature ID like that is reasonably ok to do.
You might, also, need to sign a contribution agreement.
Cheers,
David
–
On Wed, Aug 8, 2018 at 4:00 AM, Víctor González <victor.gonzalez@anonymised.com> wrote:
Hi,
I’ve been using the vector tiles extension, consuming the output with Mapbox GL JS.
The problem is that Mapbox GL JS requires feature ids for some methods and vector tiles produced by GeoServer have empty feature ids.
To solve this I found that the underlying java-vector-tile library also needs some fixing. I opened a PR [1] to do that and created a fork of the geoserver repo showing how to use the changes [2]. Once (if) the java-vector-tile PR is accepted I would open another one in the GeoServer repo using it.
I already compiled everything and created an extension with all these changes and tested it with Mapbox GL JS locally and it is working successfully.
I also opened an issue in JIRA explaining this as well [3].
What do you think about this? Does it have something missing or do you think it could make a proper contribution?
Cheers.
[1] https://github.com/ElectronicChartCentre/java-vector-tile/pull/25
[2] https://github.com/geomatico/geoserver/commit/4cfabca322284c548f5c169c1b89999b5a52f0dd
[3] https://osgeo-org.atlassian.net/browse/GEOS-8875
–
Víctor González
http://geomati.co
Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Geoserver-devel mailing list
Geoserver-devel@anonymised.comrge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
Víctor González
http://geomati.co