Struct geos::ConstGeometry [−][src]
pub struct ConstGeometry<'a, 'b> { /* fields omitted */ }
Expand description
only not mutable operations are implemented on it.
Example
use geos::{Geom, Geometry};
let geom = Geometry::new_from_wkt("POLYGON((0 0, 10 0, 10 6, 0 6, 0 0),\
(1 1, 2 1, 2 5, 1 5, 1 1),\
(8 5, 8 4, 9 4, 9 5, 8 5))")
.expect("Invalid geometry");
let point_geom = geom
.get_interior_ring_n(0)
.expect("failed to get const geometry");
Implementations
Get the context handle of the geometry.
use geos::{ContextInteractions, Geometry};
let point_geom = Geometry::new_from_wkt("POINT (2.5 2.5)").expect("Invalid geometry");
let context = point_geom.get_context_handle();
context.set_notice_message_handler(Some(Box::new(|s| println!("new message: {}", s))));
Trait Implementations
type Context = Arc<ContextHandle<'a>>
Returns an explanation on why the geometry is invalid. Read more
Get the underlying geos CoordSeq object from the geometry Read more
Returns the area of the geometry. Units are specified by the SRID of the given geometry. Read more
Returns a WKT representation of the geometry with the given precision
. It is a wrapper
around WKTWriter::set_rounding_precision
. Read more
Returns true
if self
shares any portion of space with other
. So if any of this is
true
: Read more
Returns true
if self
and other
have at least one interior into each other. Read more
Returns true
if self
doesn’t: Read more
Returns true
if the only points in common between self
and other
lie in the union of
the boundaries of self
and other
. Read more
Returns true
if self
spatially overlaps other
. Read more
Returns true
if self
is completely inside other
. Read more
Returns true
if no point of other
is outside of self
. Read more
Returns true
if no point of self
is outside of other
. Read more
Returns true
if no points of the other
geometry is outside the exterior of self
. Read more
Returns a geometry which represents all points whose distance from self
is less than or
equal to distance. Read more
Returns true if the given geometry has no anomalous geometric points, such as self intersection or self tangency. Read more
Returns a geometry which represents part of self
that doesn’t intersect with other
. Read more
Returns the minimum bouding box of the given geometry. Read more
Returns a geometry which represents the parts of self
and other
that don’t intersect. Read more
Aggregates the given geometry with another one. Read more
Returns the geometric center or (equivalently) the center of mass of the given geometry as a point. Read more
Create a voronoi diagram. Read more
Returns a geometry representing the intersection between self
and other
. Read more
Returns the closure of the combinatorial boundary of self
. Read more
Returns true
if start and end point are coincident. Read more
Returns the length of self
. The unit depends of the SRID. Read more
Returns the distance between self
and other
. The unit depends of the SRID. Read more
Returns the indexed distance between self
and other
. The unit depends of the SRID. Read more
Returns the hausdorff distance between self
and other
. The unit depends of the SRID. Read more
Returns the hausdorff distance between self
and other
. The unit depends of the SRID. Read more
Returns the frechet distance between self
and other
. The unit depends of the SRID. Read more
Returns the frechet distance between self
and other
. The unit depends of the SRID. Read more
Returns the length of the given geometry. Read more
Returns unique points of self
.
Returns the X position. The given Geometry
must be a Point
, otherwise it’ll fail. Read more
Returns the Y position. The given Geometry
must be a Point
, otherwise it’ll fail. Read more
Returns the Z position. The given Geometry
must be a Point
, otherwise it’ll fail. Read more
Returns the nth point of the given geometry. Read more
Returns the start point of self
. Read more
Returns the end point of self
. Read more
Returns the number of points of self
. Read more
Returns the number of interior rings. Read more
Returns the number of coordinates inside self
. Read more
Returns the number of dimensions used in self
. Read more
Return in which coordinate dimension the geometry is. Read more
This functions attempts to return a valid representation of self
. Read more
Returns the number of geometries. Read more
Returns the precision of self
. Read more
Returns the precision of self
. Read more
Returns the smallest distance by which a vertex of self
could be moved to produce an
invalid geometry. Read more
Returns the two-point LineString spanning of self
’s minimum clearance. Read more
Returns the minimum rotated rectangle inside of self
. Read more
Returns the minimum width inside of self
. Read more
Returns a delaunay triangulation
around the vertices of self
. Read more
Return an offset line at a given distance and side from an input line. All points of the returned geometries are not further than the given distance from the input geometry. Read more
Returns, in the tuple elements order: Read more
Creates a new PreparedGeometry
from the current Geometry
. Read more
Returns the 1-based nth geometry. Read more
Returns the nth interior ring. Read more
Returns the exterior ring. Read more