Module elastic::types::geo::point [] [src]

Implementation of the Elasticsearch geo_point type.

Geo points are an Elasticsearch specific geospatial type with an x (lon) and y (lat) component. GeoPoint is a good choice for storing and analysing geospatial points where geojson compatibility isn't needed.

Examples

For defining your own geo point mapping, see mapping details.

Map with a default geo_point:

struct MyType {
    pub field: GeoPoint<DefaultGeoPointMapping>
}

Map with a custom geo_point:

struct MyType {
    pub field: GeoPoint<MyGeoPointMapping>
}

Map a custom type as a geo_point field:

#[derive(Serialize)]
struct MyGeoPointField(f32, f32);

impl GeoPointFieldType<DefaultGeoPointMapping<GeoPointObject>> for MyGeoPointField {}

Links

Modules

mapping

Mapping for the Elasticsearch geo_point type.

prelude

Includes all types for the geo_point type.

Structs

GeoPoint

An Elasticsearch geo_point type with a format.

GeoPointArray

Geo-point expressed as an array with the format: [lon, lat]

GeoPointHash

Geo-point expressed as a geohash.

GeoPointObject

Geo-point expressed as an object, with lat and lon keys.

GeoPointString

Geo-point expressed as a string with the format: "lat,lon".

Traits

GeoPointFormat

A format used for parsing and formatting geo points.

Type Definitions

DefaultGeoPointFormat

The default geo_point format (GeoPointArray).