mapillary / mapillary-python-sdk

A Python 3 library built on the Mapillary API v4 to facilitate retrieving and working with Mapillary data.
MIT License
39 stars 15 forks source link

[Utility] Check if given features exist within the bounding box #27

Closed OmarMuhammedAli closed 3 years ago

OmarMuhammedAli commented 3 years ago

Is your feature request related to a problem? Please describe. We need to make sure that the queried features within a given bbox actually exist and are confined by that bbox. When using mercantile.tiles(), the return will be all the tile that intersect with the input bbox, some features within the intersecting border tiles may not exist within the bbox itself.

Describe the solution you'd like The implementation will be a pure boolean function that takes in a feature object and a bounding box (east, west, north, south) that returns True if the feature exists within the bbox and False if it is not confined by the bbox.

Describe alternatives you've considered To be considered

Additional context Chris's implementation for inspiration