-
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
[DOCS] Clarify orientation
usage for WKT and GeoJSON polygons
#84025
[DOCS] Clarify orientation
usage for WKT and GeoJSON polygons
#84025
Conversation
Pinging @elastic/es-docs (Team:Docs) |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
What I learnt today goes even further. The orientation parameter in the geo_shape field only affects geometries indexed using WKT (because WKT does not enforce vertex order). If indexing geojson the parameter is ignored and orientation is assumed to be CCW regardless of that parameter as in the standard. Still you can enforce the orientation of a geojson geometry by adding the parameter orientation in the geojson itself like in:
|
orientation
usage for WKT and GeoJSON polygons
Thanks for the clarification @iverase. Rather than re-add the previous note as-is, I reworked the current polygon orientation docs to include the relevant content. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do just a small correction.
While we are here, should we update the Geojson examples so the types are properly capitalise?
Check it here: https://en.wikipedia.org/wiki/GeoJSON
shapes use a clockwise orientation. | ||
|
||
You can override the default orientation for WKT and GeoJSON polygons using the | ||
document-level `orientation` parameter. For example, the following indexing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is true for WKT as you cannot add a document level orientation, that's the reason you need to do it in the mapping.
For GeoJson it is done as shown in the example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience @jrodewig!
Thanks @iverase! |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…) (#84130) Clarifies that the `orientation` mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation of `RIGHT`, regardless of the mapping parameter. Also notes that the document-level `orientation` parameter overrides the default orientation for both WKT and GeoJSON polygons. Closes #84009. (cherry picked from commit 6ad3f8b)
…) (#84132) Clarifies that the `orientation` mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation of `RIGHT`, regardless of the mapping parameter. Also notes that the document-level `orientation` parameter overrides the default orientation for both WKT and GeoJSON polygons. Closes #84009. (cherry picked from commit 6ad3f8b)
…) (#84131) Clarifies that the `orientation` mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation of `RIGHT`, regardless of the mapping parameter. Also notes that the document-level `orientation` parameter overrides the default orientation for both WKT and GeoJSON polygons. Closes #84009. (cherry picked from commit 6ad3f8b)
…) (#84134) Clarifies that the `orientation` mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation of `RIGHT`, regardless of the mapping parameter. Also notes that the document-level `orientation` parameter overrides the default orientation for both WKT and GeoJSON polygons. Closes #84009. (cherry picked from commit 6ad3f8b)
…) (#84133) Clarifies that the `orientation` mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation of `RIGHT`, regardless of the mapping parameter. Also notes that the document-level `orientation` parameter overrides the default orientation for both WKT and GeoJSON polygons. Closes #84009. (cherry picked from commit 6ad3f8b)
…) (#84135) Clarifies that the `orientation` mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation of `RIGHT`, regardless of the mapping parameter. Also notes that the document-level `orientation` parameter overrides the default orientation for both WKT and GeoJSON polygons. Closes #84009. (cherry picked from commit 6ad3f8b)
* upstream/master: (167 commits) Mute FrozenSearchableSnapshotsIntegTests#testCreateAndRestorePartialSearchableSnapshot Mute LdapSessionFactoryTests#testSslTrustIsReloaded Fix spotless violation from last commit Mute GeoGridTilerTestCase#testGeoGridSetValuesBoundingBoxes_UnboundedGeoShapeCellValues Small formatting clean up (elastic#84144) Always re-run Feature migrations which have encountered errors (elastic#83918) [DOCS] Clarify `orientation` usage for WKT and GeoJSON polygons (elastic#84025) Group field caps response by index mapping hash (elastic#83494) Shrink join queries in slow log (elastic#83914) TSDB: Reject the nested object fields that are configured time_series_dimension (elastic#83920) [DOCS] Remove note about partial response from Bulk API docs (elastic#84053) Allow regular data streams to be migrated to tsdb data streams. (elastic#83843) [DOCS] Fix `ignore_unavailable` parameter definition (elastic#84071) Make Metadata extend AbstractCollection (elastic#83791) Add API specs for OpenID Connect APIs Revert "Clean up for superuser role name references (elastic#83627)" (elastic#84096) Update Lucene analysis base url (elastic#84094) Avoid null threadContext in ResultDeduplicator (elastic#84093) Use static empty store files metadata (elastic#84034) Preserve context in snapshotDeletionListeners (elastic#84089) ... # Conflicts: # x-pack/plugin/rollup/build.gradle
…tic#84025) Clarifies that the `orientation` mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation of `RIGHT`, regardless of the mapping parameter. Also notes that the document-level `orientation` parameter overrides the default orientation for both WKT and GeoJSON polygons. Closes elastic#84009.
Clarifies that the
orientation
mapping parameter only applies to WKT polygons. GeoJSON polygons use a default orientation ofRIGHT
, regardless of the mapping parameter.Also notes that the document-level
orientation
parameter overrides the default orientation for both WKT and GeoJSON polygons.Closes #84009.
Preview
https://elasticsearch_84025.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/geo-shape.html#geo-polygon