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

[DOCS] Make geoshape docs less memory hungry #31014

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions docs/reference/mapping/types/geo-shape.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ PUT /example
"location": {
"type": "geo_shape",
"tree": "quadtree",
"precision": "1m"
"precision": "100m"
}
}
}
Expand All @@ -186,8 +186,8 @@ PUT /example
// TESTSETUP

This mapping maps the location field to the geo_shape type using the
quad_tree implementation and a precision of 1m. Elasticsearch translates
this into a tree_levels setting of 26.
quad_tree implementation and a precision of 100m. Elasticsearch translates
this into a tree_levels setting of 20.

[float]
===== Performance considerations
Expand Down Expand Up @@ -364,7 +364,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

The following is an example of a Polygon with a hole in WKT:

Expand All @@ -376,7 +375,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

*IMPORTANT NOTE:* WKT does not enforce a specific order for vertices thus
ambiguous polygons around the dateline and poles are possible.
Expand Down Expand Up @@ -411,7 +409,7 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]
// TEST[catch:/mapper_parsing_exception/]

An `orientation` parameter can be defined when setting the geo_shape mapping (see <<geo-shape-mapping-options>>). This will define vertex
order for the coordinate list on the mapped geo_shape field. It can also be overridden on each document. The following is an example for
Expand All @@ -425,14 +423,12 @@ POST /example/doc
"type" : "polygon",
"orientation" : "clockwise",
"coordinates" : [
[ [-177.0, 10.0], [176.0, 15.0], [172.0, 0.0], [176.0, -15.0], [-177.0, -10.0], [-177.0, 10.0] ],
[ [178.2, 8.2], [-178.8, 8.2], [-180.8, -8.8], [178.2, 8.8] ]
[ [100.0, 0.0], [100.0, 1.0], [101.0, 1.0], [101.0, 0.0], [100.0, 0.0] ]
]
}
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

[float]
===== http://www.geojson.org/geojson-spec.html#id5[MultiPoint]
Expand Down Expand Up @@ -484,7 +480,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

The following is an example of a list of WKT linestrings:

Expand All @@ -496,7 +491,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

[float]
===== http://www.geojson.org/geojson-spec.html#id7[MultiPolygon]
Expand All @@ -518,7 +512,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

The following is an example of a list of WKT polygons (second polygon contains a hole):

Expand All @@ -530,7 +523,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

[float]
===== http://geojson.org/geojson-spec.html#geometrycollection[Geometry Collection]
Expand All @@ -557,7 +549,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

The following is an example of a collection of WKT geometry objects:

Expand All @@ -569,7 +560,6 @@ POST /example/doc
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]


[float]
Expand All @@ -585,12 +575,11 @@ POST /example/doc
{
"location" : {
"type" : "envelope",
"coordinates" : [ [-45.0, 45.0], [45.0, -45.0] ]
"coordinates" : [ [100.0, 1.0], [101.0, 0.0] ]
}
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

The following is an example of an envelope using the WKT BBOX format:

Expand All @@ -600,11 +589,10 @@ The following is an example of an envelope using the WKT BBOX format:
--------------------------------------------------
POST /example/doc
{
"location" : "BBOX (-45.0, 45.0, 45.0, -45.0)"
"location" : "BBOX (100.0, 102.0, 2.0, 0.0)"
}
--------------------------------------------------
// CONSOLE
// TEST[skip:https://github.com/elastic/elasticsearch/issues/23836]

[float]
===== Circle
Expand All @@ -618,7 +606,7 @@ POST /example/doc
{
"location" : {
"type" : "circle",
"coordinates" : [-45.0, 45.0],
"coordinates" : [101.0, 1.0],
"radius" : "100m"
}
}
Expand Down