Skip to content

[GEO] Support for Spatial Coordinate Reference Systems #48953

@nknize

Description

@nknize

Target License

This feature will be licensed Gold.

Overview

GeoJSON (and, indirectly, TopoJSON) optionally include a Coordinate Reference System to pass projection information along with a document. The CRS supports Standard EPSG Codes or custom projection information by way of explicit URN definitions:

"crs": {
   "type": "name",
  "properties": {
    "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
  }
}

Or a link (URI or aux file):

"crs": {
  "type": "link", 
  "properties": {
    "href": "http://example.com/crs/42",
    "type": "proj4"
  }
}

"crs": {
  "type": "link",
  "properties": {
    "href": "data.crs",
    "type": "ogcwkt"
  }
}

This feature adds support for the crs object parameter to the geo_shape field mapper enabling users to select or define the projection for indexed geo_shapes.

Scope

  1. Any OGC Standard or user defined projection should be supported.
  2. This feature will initially apply to the geo_shape field type but should also probably support geo_point types as well.
  3. Mult-projection hashing (e.g., Equirectangular / Equidistant / Equal-Area) will be worked under a separate issue.

Design

  1. The crs field will simply define the meaning of the values in the coordinates/points field. (e.g., [-10300392.4831016, 3782546.51099759] in mercator maps to [-92.53, 32.32] in lon/lat.
  2. Like the orientation field the crs field can be specified in the field mapping and overridden on each document insert.
  3. The document will store coordinates/points in the provided projection, it will not rewrite those points to lon/lat.
  4. A reprojection processor will be worked in a separate issue.

Questions / Considerations

  1. Should a geo query/filter accept an optional crs field so that a user can request coordinates returned in their preferred projection? This will introduce overhead on the query, especially for geodesic to geocentric conversions where convergence is required. Default behavior will be standard WGS84 lon/lat on return. Default behavior will use the projection specified in the field mapper.
  2. There are 4,362 different projections.

Criticisms

  1. Technically the crs field was removed in GeoJSON v1.4. For web-based visualizations this is not a bad thing as browser applications shouldn't attempt to support over four thousand projections. While the standards police may criticize for using an "obsolete" field, a storage system designed to handle GIS applications and operations requires projection information.

Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Analytics/GeoIndexing, search aggregations of geo points and shapes>featureMetaTeam:AnalyticsMeta label for analytical engine team (ESQL/Aggs/Geo)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions