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

Support WKT syntax in geo_point and geo_shape #9120

Closed
synhershko opened this issue Dec 31, 2014 · 9 comments · Fixed by #27417
Closed

Support WKT syntax in geo_point and geo_shape #9120

synhershko opened this issue Dec 31, 2014 · 9 comments · Fixed by #27417
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes discuss >enhancement

Comments

@synhershko
Copy link
Contributor

So indexing stuff like POINT (30 10) and POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) can be done into geo_point and geo_shape field types

@clintongormley clintongormley added the :Analytics/Geo Indexing, search aggregations of geo points and shapes label Dec 31, 2014
@sckott
Copy link
Contributor

sckott commented Jun 5, 2015

+1

@clydedacruz
Copy link

yes adding support for WKT would be awesome!

@clintongormley
Copy link
Contributor

@nknize is WKT on your roadmap?

@kovrus
Copy link

kovrus commented Dec 7, 2015

+1

@bneff
Copy link

bneff commented Mar 14, 2016

+100

@dakrone
Copy link
Member

dakrone commented Sep 27, 2016

@nknize ping about this and whether it's on the roadmap?

@ebclark2
Copy link

ebclark2 commented Oct 5, 2016

+1

@synhershko
Copy link
Contributor Author

ping again @dakrone @nknize @clintongormley. The recent geo performance boost will probably require WKT support to ease work with geo-shape with Elastic.

nknize added a commit to nknize/elasticsearch that referenced this issue Dec 5, 2017
This commit adds WKT support to Geo ShapeBuilders.

This supports the following format:

POINT (30 10)
LINESTRING (30 10, 10 30, 40 40)
BBOX (-10, 10, 10, -10)
POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))
POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))
MULTIPOINT ((10 40), (40 30), (20 20), (30 10))
MULTIPOINT (10 40, 40 30, 20 20, 30 10)
MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))
MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))
MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))
GEOMETRYCOLLECTION (POINT (30 10), MULTIPOINT ((10 40), (40 30), (20 20), (30 10)))

closes elastic#9120
nknize added a commit that referenced this issue Dec 5, 2017
This commit adds WKT support to Geo ShapeBuilders.

This supports the following format:

POINT (30 10)
LINESTRING (30 10, 10 30, 40 40)
BBOX (-10, 10, 10, -10)
POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))
POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))
MULTIPOINT ((10 40), (40 30), (20 20), (30 10))
MULTIPOINT (10 40, 40 30, 20 20, 30 10)
MULTILINESTRING ((10 10, 20 20, 10 40),(40 40, 30 30, 40 20, 30 10))
MULTIPOLYGON (((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)))
MULTIPOLYGON (((40 40, 20 45, 45 30, 40 40)), ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35), (30 20, 20 15, 20 25, 30 20)))
GEOMETRYCOLLECTION (POINT (30 10), MULTIPOINT ((10 40), (40 30), (20 20), (30 10)))

closes #9120
@panchicore
Copy link

thanks. helped a lot, I had a serializer for each type of shape, now I just had to set it as a string and works for all types of shapes, also the overhead to json-serialize this data is now zero. thanks.

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 discuss >enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants