Skip to content
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

Upgrade to Spatial4j 0.4.1 and JTS 1.13 #5336

Closed
wants to merge 1 commit into from
Closed

Upgrade to Spatial4j 0.4.1 and JTS 1.13 #5336

wants to merge 1 commit into from

Conversation

dsmiley
Copy link
Contributor

@dsmiley dsmiley commented Mar 4, 2014

(This is a new pull request for #5286 because it needed to be re-based off master)

Fixes #5279.

The main think irking me is that ElasticSearch uses a global hard-coded instance of JtsSpatialContext.GEO as the one and only SpatialContext as a static final in ShapeBuilder.SPATIAL_CONTEXT. That wasn't what I had in mind when I (or was it Ryan or Chris, I forget) devised SpatialContext concept. If you look at JtsSpatialContextFactory (or don't even use JTS, look at SpatialContextFactory) you'll see a bunch of options that trigger various behavior. The most important one is "geo" (aka geodetic or geodesic, synonyms) which is a boolean that chooses between a latitude-longitude spherical world model or a flat plane (Euclidean geometry). It's not quite clear to me at this time how ElasticSearch users that want a flat world model and who pre-project their data are using this.

Ping @chilling

@dsmiley
Copy link
Contributor Author

dsmiley commented Mar 11, 2014

This PR should be an easy one to apply; I don't believe there are any controversial things in it and it's tested.

My note about the global non-configurable ShapeBuilder.SPATIAL_CONTEXT is orthogonal to this PR that should be raised in a separate issue, as the problem existed before the PR.

@kimchy
Copy link
Member

kimchy commented Mar 16, 2014

hey @dsmiley, we didn't forget about this!

@s1monw
Copy link
Contributor

s1monw commented Mar 20, 2014

pushed thanks @dsmiley

@s1monw s1monw closed this Mar 20, 2014
@clintongormley clintongormley added :Analytics/Geo Indexing, search aggregations of geo points and shapes and removed >enhancement labels Aug 25, 2015
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 >upgrade v1.1.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Spatial4j to 0.4.1 and JTS to 1.13
4 participants