-
Notifications
You must be signed in to change notification settings - Fork 5
Add a withBoundsLatLng
extension
#65
Comments
We need to define the semantics of this. Are we talking about reprojecting the bounding in EPSG:4326, or the corresponding bounding extent in WGS84? |
I would think reprojecting the bounding into EPSG:4326. Some possible use cases:
|
The problem, as @mteldridge points out, is that a extent/bounding box in the native CRS is not necessarily (unlikely to be) a straight-edged polygon in the destination CRS, especially when dealing with things like Sinusoidal projections. This may not matter that much for inspection/visualization, but if you want to do filtering, it should be in the native CRS. |
Fair and excellent point. For inspection users ought to prefer the withCenterLatLng which does not have the distortions that a polygon would. And for querying there are some limited use cases where it might make sense to use a square polygon from naively reprojecting the vertices. What's the preference? Give some rope or encourage more robust patterns? |
Potentially relevant approach to handling this: |
Remember the SAT analogies?
withCenter
:withCenterLatLng
::withBounds
:withBoundsLatLng
Would be useful for querying against an EPSG:4326 column
The text was updated successfully, but these errors were encountered: