Multiple bounding boxes for tile layers
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
I've come across a lot of different tile layer sources over the years which tend to have multiple areas of coverage (multiple bounding boxes). A great example of this would be a high resolution imagery layer that only focuses on urban areas. Currently to limit the tile requests to these areas we have to create a layer number of tile layers, one for each bounding box.
## Design
It would be great if we could specify multiple bounding boxes in a single layer, or possibly a MultiPolygon instead. Not sure of how else to handle this. One potential issue with this approach is that processing time of determining if a tile is within the coverage area or not. To improve performance this could be pre-calculated when the tile layer is initially loaded and an index created based on the tile ids. Limiting this to bounding boxes, would simplify things and may be good enough for most scenarios like this.
### Mock-Up
For a developer, they would simply pass in an array of bounding boxes as an alternative to passing in one.
### Concepts
This isn't much of a change from the API interface point of view, so not much to new learning required. This would also be beneficial to those who use OGC services that have complex coverage areas.
### Implementation
In JavaScript it would be easy to allow the bounds to be a bounding box or an array of bounding boxes. In other programming languages you would likely need to have a separate property, say coverage area, which would be an array of bounding boxes. Then the requirement would be that either the bounds or the coverage area needs to be specified. You could potentially allow both to be specified and use the bounds as an initial, filter for improved performance for tiles that are completely outside of the possible coverage area.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points; start by locating the tile-layer bounds handling and its existing single-bounding-box API. Resolve whether support should use an array of bounding boxes or a MultiPolygon, then define completion around accepting the chosen coverage shape and limiting tile requests to covered areas.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100