-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geo: Switch Geometry classes from lat, lon, alt to x, y, z #45048
Labels
:Analytics/Geo
Indexing, search aggregations of geo points and shapes
:Analytics/SQL
SQL querying
>breaking-java
Comments
imotov
added
:Analytics/Geo
Indexing, search aggregations of geo points and shapes
>breaking-java
:Analytics/SQL
SQL querying
team-discuss
labels
Jul 31, 2019
Pinging @elastic/es-analytics-geo |
Pinging @elastic/es-search |
imotov
added a commit
to imotov/elasticsearch
that referenced
this issue
Aug 8, 2019
Changes the order of parameters in Geometries from lat, lon to lon, lat and moves all Geometry classes are moved to the org.elasticsearch.geomtery package. Closes elastic#45048
We discussed this with both SQL and Geo teams and decided to proceed with this change. I opened #45332. |
imotov
added a commit
that referenced
this issue
Aug 9, 2019
Changes the order of parameters in Geometries from lat, lon to lon, lat and moves all Geometry classes are moved to the org.elasticsearch.geomtery package. Closes #45048
imotov
added a commit
to imotov/elasticsearch
that referenced
this issue
Aug 15, 2019
Changes the order of parameters in Geometries from lat, lon to lon, lat and moves all Geometry classes are moved to the org.elasticsearch.geomtery package. Backport of elastic#45332 Closes elastic#45048
imotov
added a commit
that referenced
this issue
Aug 16, 2019
56 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Analytics/Geo
Indexing, search aggregations of geo points and shapes
:Analytics/SQL
SQL querying
>breaking-java
Proposal
lat
,lon
andalt
withx
,y
, andz
lat
,lon
,alt
tox
,y
,z
org.elasticsearch.geo.geometry
toorg.elasticsearch.geometry
Rationale
I think I made a mistake of going with
lat
,lon
notation instead ofx
,y
notation when I first introduced theGeometry
hierarchy and the window of opportunity to rectify this mistake with a limited impact on end users is quickly closing. I have been recently doing a lot of refactoring work withGeometry
classes and was constantly struggling with the order and naming of parameters for the following reasons:Geometry
classes in the context ofXYShapes
and different projections, which makes genericx
andy
more appropriate thanlat
andlon
.Geometry
(not Geography) in the first place, so member naming based onlat
andlon
doesn't seem to be consistent with the class naming.Reducing the impact
If we make the transition before 7.4 the only users who would be affected are JDBC users that are using geosql features. The feature is currently marked as beta and JDBC driver is setup in such a way that it doesn't provide any compatibility between version, so migration will mean recompiling with a new version of the driver. Since we are change the order of the parameters in constructor but not the type we will bring users attention to this issue by also changing the package name for Geometry classes. However, there is no way to avoid changing the code for JDBC geosql users. On the positive side, switching to x, y, z naming convention will make interface it more consistent for goesql users as well. Considering that the feature is really, I don't think that a lot of users will be affected by this change.
In 7.4 the Geometry hierarchy will become the part of
QueryBuilder
interface, so any changes will have much bigger impact.The text was updated successfully, but these errors were encountered: