pub trait Inside {
// Required method
fn inside<P: GetXY>(&self, b: &P) -> InsideResult;
}Expand description
Check if a point is inside a geometry.
If the geoemtry we check against is a Point, check if the points are equal
If the geometry we check against is a MultiPoint or LineString, treat as a polygon with no holes
If the geometry we check against is a Polygon or MultiPolygon, check if the point is inside
This trait is implemented for:
FeatureGeometryPointGeometryMultiPointGeometryMultiLineStringGeometryMultiPolygonGeometryPoint3DGeometryMultiPoint3DGeometryMultiLineString3DGeometryMultiPolygon3DGeometryVectorFeatureVectorGeometryVectorPointGeometryVectorMultiPointGeometryVectorMultiLineStringGeometryVectorMultiPolygonGeometryVectorMultiPointVectorMultiLineStringVectorMultiPolygon&Vec<Vec<P>>or&[Vec<P>]where P implementsGetXY
And all specific geometries of the above enums
Required Methods§
Sourcefn inside<P: GetXY>(&self, b: &P) -> InsideResult
fn inside<P: GetXY>(&self, b: &P) -> InsideResult
Check if a point is inside a geometry.
If the geoemtry we check against is a Point, check if the points are equal
If the geometry we check against is a MultiPoint or LineString, treat as a polygon with no holes
If the geometry we check against is a Polygon or MultiPolygon, check if the point is inside
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.