-
-
Notifications
You must be signed in to change notification settings - Fork 277
ElasticsearchProviderQueryMapping
Tom Kralidis edited this page Sep 23, 2020
·
12 revisions
pygeoapi's Elasticsearch provider provides the capability to offer up ES indexes via OGC API - Features and OGC API - Records. This wiki page explains how OGC API queries are translated into their equivalent ES queries.
- code is at https://github.com/geopython/pygeoapi/blob/master/pygeoapi/provider/elasticsearch_.py
- support is for ES 7+
- the basic setup for ES to pygeoapi integration is having an ES index of GeoJSON documents, and explicitly setting the
geometry
object as a ESgeo_shape
type in the index mappings - a custom provider can be written to work with alternative ES setups, which would then serialize results as GeoJSON for pygeoapi upstream callers
- a useful litmus test is running
ogrinfo
directly against a given ES index. If the ES index is compatible with GDAL/OGR, it will be compatible with pygeoapi's ES provider - a given ES index requires the document
_id
to be consistent with an equivalent property (can be named anything) in the underlying GeoJSON document'sproperties
object (this allows pygeoapi to do id queries with consistency
Note that