Skip to content
This repository has been archived by the owner on Mar 6, 2019. It is now read-only.

Add a withBoundsLatLng extension #65

Open
vpipkt opened this issue Mar 19, 2018 · 5 comments
Open

Add a withBoundsLatLng extension #65

vpipkt opened this issue Mar 19, 2018 · 5 comments

Comments

@vpipkt
Copy link
Contributor

vpipkt commented Mar 19, 2018

Remember the SAT analogies?

withCenter : withCenterLatLng :: withBounds : withBoundsLatLng

Would be useful for querying against an EPSG:4326 column

@metasim
Copy link
Contributor

metasim commented Mar 20, 2018

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?

@vpipkt
Copy link
Contributor Author

vpipkt commented Mar 20, 2018

I would think reprojecting the bounding into EPSG:4326.

Some possible use cases:

  • inspection of rows
  • filter or join on data read from GeoJSON
  • filter or join on data from GeoMesa

@metasim
Copy link
Contributor

metasim commented Mar 20, 2018

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.

@vpipkt
Copy link
Contributor Author

vpipkt commented Mar 20, 2018

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?

@metasim
Copy link
Contributor

metasim commented Apr 5, 2018

Potentially relevant approach to handling this: geotrellis.spark.tiling.MapKeyTransform

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants