Skip to content

ElasticsearchProviderQueryMapping

Tom Kralidis edited this page Sep 23, 2020 · 12 revisions

Overview

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.

Technical Details

  • 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 ES geo_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's properties object (this allows pygeoapi to do id queries with consistency

Requests

Note that

Clone this wiki locally