elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.38k stars 24.87k forks source link

Re-project geo point / shape to alternate coordinate systems #23221

Open eskibars opened 7 years ago

eskibars commented 7 years ago

Describe the feature: When talking with geo users, we often hear requests to re-project coordinates from WGS84 to another coordinate system. Doing query-time reprojection may be a heavy lift, but it may be easier to offer an ingest node plugin to do the reprojection. It would be a lossy approach, but it may simplify the data loading aspect for users on other coordinate systems. Downside is that the user would still need to reproject their query to WGS84 if it wasn't already there.

Talked this over briefly with @nknize but wanted to open it up for discussion

nknize commented 5 years ago

We discussed this in the team meeting. There are two approaches to handling projections:

  1. Index in native projection / CRS (preferred)

This requires a new lucene field to handle indexing and searching Geometries in cartesian or other (non-wgs84) spheroid space. While this is being worked on (reusing logic from LatLonShape) it will take a bit longer to fully support indexing in original CRS.

  1. Reproject on Ingest

The idea here is to reproject the provided data from the native CRS to WGS84 Lat/Lon prior to indexing. Whether its done at the field mapper level (requiring a change to the DSL so users can provide the CRS) or as an ingest node feature is an implementation detail.

Both approaches first require code to perform the reprojection. Preference is to use Proj4j as a third party API. Some benefits / drawbacks include:

Benefits Drawback
Apache licensed How to handle CRS updates / changes
EPSG database is local / shipped with ES performance unknown
Easy to use project support / maintenance
Available now

Outstanding Questions

  1. What are some lessons learned when bringing on other third-party APIs?
  2. Do we provide reprojection as an ingest node feature, in the field mapper, both?
  3. Is reprojection a licensed Elasticsearch feature?

Given the outstanding questions and ideas I'm going to mark this issue as a meta issue to several sub tasks and use this issue to facilitate high level discussion / decision making.

wchaparro commented 2 years ago

Putting this one on hold- keep on the roadmap until we are able to prioritize it.

elasticsearchmachine commented 4 months ago

Pinging @elastic/es-analytical-engine (Team:Analytics)