Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

CustomGeometrySource should support data in tile coordinates #10494

Closed
asheemmamoowala opened this issue Nov 17, 2017 · 1 comment
Closed

CustomGeometrySource should support data in tile coordinates #10494

asheemmamoowala opened this issue Nov 17, 2017 · 1 comment
Labels
Core The cross-platform C++ core, aka mbgl

Comments

@asheemmamoowala
Copy link
Contributor

The custom geometry Source type accepts tiled input in geographic coordinates. Internally this is converted to tile coordinates (using geojson-vt).

This makes it inconvenient to use this source type with existing MBTiles where the map data is already in tile coordinates.

CustomGeometrySource should allow providing the geometry in tile coordinates, and support varying tile sizes.

@asheemmamoowala asheemmamoowala added the Core The cross-platform C++ core, aka mbgl label Nov 17, 2017
@asheemmamoowala
Copy link
Contributor Author

Tiled coordinates as input to the CustomGeometrySource would require new integer types for representing geometry, geometry collections, and features. The geometry format for these features would need to follow vector tile conventions for polygons to allow direct input of vector-tile compatible data. In addition, API wrappers and a conversion layer would be needed for at least Android and iOS/macOS platforms.

With that done, supporting MBTiles still requires unzipping and decoding the vector data and populating the new geometry types. This may be better than current solutions for MBTile support, but we can do way better. Vector Tile decoders and conversion to wrappers classes would be needed for each platform, only to be converted back to vector-tiles in core.

MBTile support seems to be the primary use case for tiled coordinates, but CustomGeometrySource may not be the best way to enable that support. Instead, an API that allows MBTiles to be decoded in core would require only a single implementation, and avoid unnecessary runtime conversions (especially through JNI).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

No branches or pull requests

1 participant