geojson
The geojson
type stores GeoJSON according to RFC 7946. For full GeoJSON support you need to use Opensearch as indexer or a licensed Elasticsearch.
Also, for fylr you will need a license with GeoJSON support. The license is not needed to use GeoJSON over /api/db, but it is for /api/search.
API
GeoJSON can contain multiple types of geo coordinates. The simplest type is Point which references a single point using latitude, longitude and altitude (optional):
In this example sets a Point
in column geo
: The longitude is set to 6.8652
, latitude to 45.8326
and altitude to 10
. Other types storable in GeoJSON are: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", and "GeometryCollection". fylr also supports "Feature" and "FeatureCollection".
Index
The type geo_shape
is used to store the GeoJSON value in the indexer.
In some rare cases, the API will accept the GeoJSON but the indexer won't. You will find these cases by looking for INDEX_ERROR events in /inspect/events or the Event Manager. If you encounter such a problem, your need to amend your data.
The values of all properties
of types "Feature" and "FeatureCollection" are collected and indexed as text
.
Sorting
Sorting is not supported for the geojson
type.
Export
The XML exports the actual GeoJSON value in JSON format. For the above example:
The CSV contains the JSON as text:
Same with JSON, the export looks like this:
Last updated