Trait geo_postgis::FromPostgis[][src]

pub trait FromPostgis<T> {
    fn from_postgis(_: T) -> Self;
}

Creates geometry from a PostGIS type.

Note that PostGIS databases can store data under any spatial reference system - not just WGS84. No attempt is made to convert data between reference systems.

Required methods

fn from_postgis(_: T) -> Self[src]

Loading content...

Implementations on Foreign Types

impl<'a, T> FromPostgis<&'a T> for Point<f64> where
    T: Point
[src]

impl<'a, T> FromPostgis<&'a T> for LineString<f64> where
    T: LineString<'a>, 
[src]

impl<'a, T> FromPostgis<&'a T> for Option<Polygon<f64>> where
    T: Polygon<'a>, 
[src]

fn from_postgis(poly: &'a T) -> Self[src]

This returns an Option, because it’s possible for a PostGIS Polygon to contain zero rings, which makes for an invalid geo::Polygon.

impl<'a, T> FromPostgis<&'a T> for MultiPoint<f64> where
    T: MultiPoint<'a>, 
[src]

impl<'a, T> FromPostgis<&'a T> for MultiLineString<f64> where
    T: MultiLineString<'a>, 
[src]

impl<'a, T> FromPostgis<&'a T> for MultiPolygon<f64> where
    T: MultiPolygon<'a>, 
[src]

fn from_postgis(mp: &'a T) -> Self[src]

This implementation discards PostGIS polygons that don’t convert (return None when from_postgis() is called on them).

impl<'a, T> FromPostgis<&'a GeometryCollectionT<T>> for GeometryCollection<f64> where
    T: Point + EwkbRead
[src]

fn from_postgis(gc: &'a GeometryCollectionT<T>) -> Self[src]

This implementation discards geometries that don’t convert (return None when from_postgis() is called on them).

impl<'a, T> FromPostgis<&'a GeometryT<T>> for Option<Geometry<f64>> where
    T: Point + EwkbRead
[src]

fn from_postgis(geo: &'a GeometryT<T>) -> Self[src]

This returns an Option, because the supplied geometry could be an invalid Polygon.

Loading content...

Implementors

Loading content...