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
impl<'a, 'b> ConstGeometry<'a, 'b>
[src]
impl<'a, 'b> ConstGeometry<'a, 'b>
[src]pub fn get_context_handle(&self) -> &ContextHandle<'a>
[src]
pub fn get_context_handle(&self) -> &ContextHandle<'a>
[src]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
impl<'a, 'd> ContextHandling for ConstGeometry<'a, 'd>
[src]
impl<'a, 'd> ContextHandling for ConstGeometry<'a, 'd>
[src]type Context = Arc<ContextHandle<'a>>
fn get_raw_context(&self) -> GEOSContextHandle_t
[src]
fn clone_context(&self) -> Arc<ContextHandle<'a>>
[src]
impl<'a, 'd> Geom<'a> for ConstGeometry<'a, 'd>
[src]
impl<'a, 'd> Geom<'a> for ConstGeometry<'a, 'd>
[src]fn geometry_type(&self) -> GeometryTypes
[src]
fn is_valid_reason(&self) -> GResult<String>
[src]
fn is_valid_reason(&self) -> GResult<String>
[src]Returns an explanation on why the geometry is invalid. Read more
fn get_coord_seq(&self) -> GResult<CoordSeq<'a>>
[src]
fn get_coord_seq(&self) -> GResult<CoordSeq<'a>>
[src]Get the underlying geos CoordSeq object from the geometry Read more
fn area(&self) -> GResult<f64>
[src]
fn area(&self) -> GResult<f64>
[src]Returns the area of the geometry. Units are specified by the SRID of the given geometry. Read more
fn to_wkt_precision(&self, precision: u32) -> GResult<String>
[src]
fn to_wkt_precision(&self, precision: u32) -> GResult<String>
[src]Returns a WKT representation of the geometry with the given precision
. It is a wrapper
around WKTWriter::set_rounding_precision
. Read more
fn intersects<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn intersects<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if self
shares any portion of space with other
. So if any of this is
true
: Read more
fn crosses<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn crosses<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if self
and other
have at least one interior into each other. Read more
fn disjoint<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn disjoint<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if self
doesn’t: Read more
fn touches<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn touches<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]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
fn overlaps<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn overlaps<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if self
spatially overlaps other
. Read more
fn within<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn within<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if self
is completely inside other
. Read more
fn covers<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn covers<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if no point of other
is outside of self
. Read more
fn covered_by<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn covered_by<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if no point of self
is outside of other
. Read more
fn contains<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]
fn contains<'b, G: Geom<'b>>(&self, other: &G) -> GResult<bool>
[src]Returns true
if no points of the other
geometry is outside the exterior of self
. Read more
fn buffer(&self, width: f64, quadsegs: i32) -> GResult<Geometry<'a>>
[src]
fn buffer(&self, width: f64, quadsegs: i32) -> GResult<Geometry<'a>>
[src]Returns a geometry which represents all points whose distance from self
is less than or
equal to distance. Read more
fn is_simple(&self) -> GResult<bool>
[src]
fn is_simple(&self) -> GResult<bool>
[src]Returns true if the given geometry has no anomalous geometric points, such as self intersection or self tangency. Read more
fn difference<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]
fn difference<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]Returns a geometry which represents part of self
that doesn’t intersect with other
. Read more
fn envelope(&self) -> GResult<Geometry<'a>>
[src]
fn envelope(&self) -> GResult<Geometry<'a>>
[src]Returns the minimum bouding box of the given geometry. Read more
fn sym_difference<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]
fn sym_difference<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]Returns a geometry which represents the parts of self
and other
that don’t intersect. Read more
fn union<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]
fn union<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]Aggregates the given geometry with another one. Read more
fn get_centroid(&self) -> GResult<Geometry<'a>>
[src]
fn get_centroid(&self) -> GResult<Geometry<'a>>
[src]Returns the geometric center or (equivalently) the center of mass of the given geometry as a point. Read more
fn voronoi<'b, G: Geom<'b>>(
&self,
envelope: Option<&G>,
tolerance: f64,
only_edges: bool
) -> GResult<Geometry<'a>>
[src]
fn voronoi<'b, G: Geom<'b>>(
&self,
envelope: Option<&G>,
tolerance: f64,
only_edges: bool
) -> GResult<Geometry<'a>>
[src]Create a voronoi diagram. Read more
fn intersection<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]
fn intersection<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]Returns a geometry representing the intersection between self
and other
. Read more
fn boundary(&self) -> GResult<Geometry<'a>>
[src]
fn boundary(&self) -> GResult<Geometry<'a>>
[src]Returns the closure of the combinatorial boundary of self
. Read more
fn is_closed(&self) -> GResult<bool>
[src]
fn is_closed(&self) -> GResult<bool>
[src]Returns true
if start and end point are coincident. Read more
fn length(&self) -> GResult<f64>
[src]
fn length(&self) -> GResult<f64>
[src]Returns the length of self
. The unit depends of the SRID. Read more
fn distance<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]
fn distance<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]Returns the distance between self
and other
. The unit depends of the SRID. Read more
fn distance_indexed<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]
fn distance_indexed<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]Returns the indexed distance between self
and other
. The unit depends of the SRID. Read more
fn hausdorff_distance<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]
fn hausdorff_distance<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]Returns the hausdorff distance between self
and other
. The unit depends of the SRID. Read more
fn hausdorff_distance_densify<'b, G: Geom<'b>>(
&self,
other: &G,
distance_frac: f64
) -> GResult<f64>
[src]
fn hausdorff_distance_densify<'b, G: Geom<'b>>(
&self,
other: &G,
distance_frac: f64
) -> GResult<f64>
[src]Returns the hausdorff distance between self
and other
. The unit depends of the SRID. Read more
fn frechet_distance<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]
fn frechet_distance<'b, G: Geom<'b>>(&self, other: &G) -> GResult<f64>
[src]Returns the frechet distance between self
and other
. The unit depends of the SRID. Read more
fn frechet_distance_densify<'b, G: Geom<'b>>(
&self,
other: &G,
distance_frac: f64
) -> GResult<f64>
[src]
fn frechet_distance_densify<'b, G: Geom<'b>>(
&self,
other: &G,
distance_frac: f64
) -> GResult<f64>
[src]Returns the frechet distance between self
and other
. The unit depends of the SRID. Read more
fn get_length(&self) -> GResult<f64>
[src]
fn get_length(&self) -> GResult<f64>
[src]Returns the length of the given geometry. Read more
fn extract_unique_points(&self) -> GResult<Geometry<'a>>
[src]
fn extract_unique_points(&self) -> GResult<Geometry<'a>>
[src]Returns unique points of self
.
fn nearest_points<'b, G: Geom<'b>>(&self, other: &G) -> GResult<CoordSeq<'a>>
[src]
fn get_x(&self) -> GResult<f64>
[src]
fn get_x(&self) -> GResult<f64>
[src]Returns the X position. The given Geometry
must be a Point
, otherwise it’ll fail. Read more
fn get_y(&self) -> GResult<f64>
[src]
fn get_y(&self) -> GResult<f64>
[src]Returns the Y position. The given Geometry
must be a Point
, otherwise it’ll fail. Read more
fn get_z(&self) -> GResult<f64>
[src]
fn get_z(&self) -> GResult<f64>
[src]Returns the Z position. The given Geometry
must be a Point
, otherwise it’ll fail. Read more
fn get_point_n(&self, n: usize) -> GResult<Geometry<'a>>
[src]
fn get_point_n(&self, n: usize) -> GResult<Geometry<'a>>
[src]Returns the nth point of the given geometry. Read more
fn get_start_point(&self) -> GResult<Geometry<'a>>
[src]
fn get_start_point(&self) -> GResult<Geometry<'a>>
[src]Returns the start point of self
. Read more
fn get_end_point(&self) -> GResult<Geometry<'a>>
[src]
fn get_end_point(&self) -> GResult<Geometry<'a>>
[src]Returns the end point of self
. Read more
fn get_num_points(&self) -> GResult<usize>
[src]
fn get_num_points(&self) -> GResult<usize>
[src]Returns the number of points of self
. Read more
fn get_num_interior_rings(&self) -> GResult<usize>
[src]
fn get_num_interior_rings(&self) -> GResult<usize>
[src]Returns the number of interior rings. Read more
fn get_num_coordinates(&self) -> GResult<usize>
[src]
fn get_num_coordinates(&self) -> GResult<usize>
[src]Returns the number of coordinates inside self
. Read more
fn get_num_dimensions(&self) -> GResult<usize>
[src]
fn get_num_dimensions(&self) -> GResult<usize>
[src]Returns the number of dimensions used in self
. Read more
fn get_coordinate_dimension(&self) -> GResult<Dimensions>
[src]
fn get_coordinate_dimension(&self) -> GResult<Dimensions>
[src]Return in which coordinate dimension the geometry is. Read more
fn make_valid(&self) -> GResult<Geometry<'a>>
[src]
fn make_valid(&self) -> GResult<Geometry<'a>>
[src]This functions attempts to return a valid representation of self
. Read more
fn get_num_geometries(&self) -> GResult<usize>
[src]
fn get_num_geometries(&self) -> GResult<usize>
[src]Returns the number of geometries. Read more
fn get_precision(&self) -> GResult<f64>
[src]
fn get_precision(&self) -> GResult<f64>
[src]Returns the precision of self
. Read more
fn set_precision(
&self,
grid_size: f64,
flags: Precision
) -> GResult<Geometry<'a>>
[src]
fn set_precision(
&self,
grid_size: f64,
flags: Precision
) -> GResult<Geometry<'a>>
[src]Returns the precision of self
. Read more
fn minimum_clearance(&self) -> GResult<f64>
[src]
fn minimum_clearance(&self) -> GResult<f64>
[src]Returns the smallest distance by which a vertex of self
could be moved to produce an
invalid geometry. Read more
fn minimum_clearance_line(&self) -> GResult<Geometry<'a>>
[src]
fn minimum_clearance_line(&self) -> GResult<Geometry<'a>>
[src]Returns the two-point LineString spanning of self
’s minimum clearance. Read more
fn minimum_rotated_rectangle(&self) -> GResult<Geometry<'a>>
[src]
fn minimum_rotated_rectangle(&self) -> GResult<Geometry<'a>>
[src]Returns the minimum rotated rectangle inside of self
. Read more
fn minimum_width(&self) -> GResult<Geometry<'a>>
[src]
fn minimum_width(&self) -> GResult<Geometry<'a>>
[src]Returns the minimum width inside of self
. Read more
fn delaunay_triangulation(
&self,
tolerance: f64,
only_edges: bool
) -> GResult<Geometry<'a>>
[src]
fn delaunay_triangulation(
&self,
tolerance: f64,
only_edges: bool
) -> GResult<Geometry<'a>>
[src]Returns a delaunay triangulation
around the vertices of self
. Read more
fn interpolate(&self, d: f64) -> GResult<Geometry<'a>>
[src]
fn interpolate_normalized(&self, d: f64) -> GResult<Geometry<'a>>
[src]
fn project<'b, G: Geom<'b>>(&self, p: &G) -> GResult<f64>
[src]
fn project_normalized<'b, G: Geom<'b>>(&self, p: &G) -> GResult<f64>
[src]
fn node(&self) -> GResult<Geometry<'a>>
[src]
fn offset_curve(
&self,
width: f64,
quadrant_segments: i32,
join_style: JoinStyle,
mitre_limit: f64
) -> GResult<Geometry<'a>>
[src]
fn offset_curve(
&self,
width: f64,
quadrant_segments: i32,
join_style: JoinStyle,
mitre_limit: f64
) -> GResult<Geometry<'a>>
[src]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
fn point_on_surface(&self) -> GResult<Geometry<'a>>
[src]
fn polygonize_full(
&self
) -> GResult<(Geometry<'a>, Option<Geometry<'a>>, Option<Geometry<'a>>, Option<Geometry<'a>>)>
[src]
fn polygonize_full(
&self
) -> GResult<(Geometry<'a>, Option<Geometry<'a>>, Option<Geometry<'a>>, Option<Geometry<'a>>)>
[src]Returns, in the tuple elements order: Read more
fn shared_paths<'b, G: Geom<'b>>(&self, other: &G) -> GResult<Geometry<'a>>
[src]
fn to_prepared_geom(&self) -> GResult<PreparedGeometry<'a>>
[src]
fn to_prepared_geom(&self) -> GResult<PreparedGeometry<'a>>
[src]Creates a new PreparedGeometry
from the current Geometry
. Read more
fn get_geometry_n<'c>(&'c self, n: usize) -> GResult<ConstGeometry<'a, 'c>>
[src]
fn get_geometry_n<'c>(&'c self, n: usize) -> GResult<ConstGeometry<'a, 'c>>
[src]Returns the 1-based nth geometry. Read more
fn get_interior_ring_n<'c>(&'c self, n: u32) -> GResult<ConstGeometry<'a, 'c>>
[src]
fn get_interior_ring_n<'c>(&'c self, n: u32) -> GResult<ConstGeometry<'a, 'c>>
[src]Returns the nth interior ring. Read more
fn get_exterior_ring<'c>(&'c self) -> GResult<ConstGeometry<'a, 'c>>
[src]
fn get_exterior_ring<'c>(&'c self) -> GResult<ConstGeometry<'a, 'c>>
[src]Returns the exterior ring. Read more
impl<'a, 'b, 'd, G: Geom<'b>> PartialEq<G> for ConstGeometry<'a, 'd>
[src]
impl<'a, 'b, 'd, G: Geom<'b>> PartialEq<G> for ConstGeometry<'a, 'd>
[src]impl<'a, 'd> Send for ConstGeometry<'a, 'd>
[src]
impl<'a, 'd> Sync for ConstGeometry<'a, 'd>
[src]
Auto Trait Implementations
impl<'a, 'b> RefUnwindSafe for ConstGeometry<'a, 'b>
impl<'a, 'b> Unpin for ConstGeometry<'a, 'b> where
'a: 'b,
'a: 'b,