Skip to content

Add support for PBF queries to queryFeatures() and queryAllFeatures() #1271

@patrickarlt

Description

@patrickarlt

In order to support Esri/maplibre-arcgis#19 we need to add support for f=pbf to both queryFeatures() and queryAllFeatures(). Rowan had kindly supported us porting his work in arcgis-pbf-parser into REST JS to get started.

In order to support both GeoJSON and Esri formatted geometries I think that we should implement 3 new values for the f param

  • f=pbf = Returns the compressed PBF so a user can decide how they want to handle it. We should also expose 2 utility functions pbfToGeoJSON() and pbfToArcGIS() which can also be used internally.
  • f=pbf-as-geojson - Returns the decompressed PBF as GeoJSON. This is the same behavior as arcgis-pbf-parser.
  • f=pbf-as-arcgis - Returns the decompressed PBF as ArcGIS geometry objects this can be done via @terraformer/arcgis

For the queryAllFeatures() function we would only support f=pbf-as-geojson and f=pbf-as-arcgis since we need to decompress the PBF anyway to understand if we need to load more features.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions