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

Geo Circle to Polygon/LineString Ingest Processor #43554

Closed
talevy opened this issue Jun 25, 2019 · 1 comment · Fixed by #43851
Closed

Geo Circle to Polygon/LineString Ingest Processor #43554

talevy opened this issue Jun 25, 2019 · 1 comment · Fixed by #43851
Assignees
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >feature

Comments

@talevy
Copy link
Contributor

talevy commented Jun 25, 2019

Feature Request

Add ability to easily index shape values defined like:

{
   "type": "Circle",
   "coordinates": [ 100.0, 0.0 ],
   "radius": 0.5,
   "properties": { "radius_units": "km" }
}

Feature Proposal

Introduce a circle processor that converts all instances of
a circle json definition into a geojson polygon or linestring.

POST /_ingest/pipeline/_simulate
{
  "pipeline": {
    "processors": [{
      "circle": {
        "field": "my_circle"
      }
    }
  ]
  }, 
  "docs" : [
    { "_source":{ "my_circle": "CIRCLE (101.3 1.2 10.0)"}}
  ]
}

should transform the circle into a polygon:

{
  "docs" : [
    {
      "doc" : {
        "_index" : "_index",
        "_type" : "_doc",
        "_id" : "_id",
        "_source" : {
          "my_circle" : "polygon ((101.30008964538574 1.2, 101.30008961414808 1.1999976336422478, 101.30008952045685 1.1999952689336488
....
@talevy talevy added >feature :Analytics/Geo Indexing, search aggregations of geo points and shapes labels Jun 25, 2019
@talevy talevy self-assigned this Jun 25, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

imotov added a commit that referenced this issue Jul 3, 2019
…#43717)

Enables libs/geo parser to return a geometry format object that can
perform both serialization and deserialization functions. This can
be useful for ingest nodes that are trying to modify an existing
geometry in the source.

Relates to #43554
imotov added a commit that referenced this issue Jul 4, 2019
…#43717)

Enables libs/geo parser to return a geometry format object that can
perform both serialization and deserialization functions. This can
be useful for ingest nodes that are trying to modify an existing
geometry in the source.

Relates to #43554
imotov added a commit to imotov/elasticsearch that referenced this issue Jul 5, 2019
In some cases we need to parse the XContent that is already parsed into
a map. This is currently happening in handling source in SQL and ingest
node as well as parsing null_value geo values in mappings. Instead of
serialize and parse the value again or write another map-based parser
this commit adds an iterator that iterates over a map as an XContent.

Relates to elastic#43554
imotov added a commit that referenced this issue Jul 10, 2019
In some cases we need to parse some XContent that is already parsed into
a map. This is currently happening in handling source in SQL and ingest
processors as well as parsing null_value values in geo mappings. To avoid
re-serializing and parsing the value again or writing another map-based
parser this commit adds an iterator that iterates over a map as if it was
XContent. This makes reusing existing XContent parser on maps possible.

Relates to #43554
imotov added a commit that referenced this issue Jul 11, 2019
In some cases we need to parse some XContent that is already parsed into
a map. This is currently happening in handling source in SQL and ingest
processors as well as parsing null_value values in geo mappings. To avoid
re-serializing and parsing the value again or writing another map-based
parser this commit adds an iterator that iterates over a map as if it was
XContent. This makes reusing existing XContent parser on maps possible.

Relates to #43554
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 >feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants