pub struct RelationPredicate {
pub left: Arc<dyn PhysicalExpr>,
pub right: Arc<dyn PhysicalExpr>,
pub relation_type: SpatialRelationType,
}Expand description
Spatial relation predicate for topological relationships.
This predicate represents a spatial join condition based on topological relationships between geometries, such as intersects, contains, within, etc. It follows the DE-9IM (Dimensionally Extended 9-Intersection Model) spatial relations.
§Example SQL
SELECT * FROM buildings b JOIN parcels p
ON ST_Intersects(b.geometry, p.geometry)§Supported Relations
Intersects- Geometries share at least one pointContains- Left geometry contains the right geometryWithin- Left geometry is within the right geometryCovers- Left geometry covers the right geometryCoveredBy- Left geometry is covered by the right geometryTouches- Geometries touch at their boundariesCrosses- Geometries cross each otherOverlaps- Geometries overlapEquals- Geometries are spatially equal
Fields§
§left: Arc<dyn PhysicalExpr>The expression for evaluating the geometry value on the left side. The expression should be evaluated directly on the left side batches.
right: Arc<dyn PhysicalExpr>The expression for evaluating the geometry value on the right side. The expression should be evaluated directly on the right side batches.
relation_type: SpatialRelationTypeThe spatial relation type.
Implementations§
Source§impl RelationPredicate
impl RelationPredicate
Sourcepub fn new(
left: Arc<dyn PhysicalExpr>,
right: Arc<dyn PhysicalExpr>,
relation_type: SpatialRelationType,
) -> Self
pub fn new( left: Arc<dyn PhysicalExpr>, right: Arc<dyn PhysicalExpr>, relation_type: SpatialRelationType, ) -> Self
Creates a new spatial relation predicate.
§Arguments
left- Expression for the left side geometryright- Expression for the right side geometryrelation_type- The type of spatial relationship to test
Trait Implementations§
Source§impl Clone for RelationPredicate
impl Clone for RelationPredicate
Source§fn clone(&self) -> RelationPredicate
fn clone(&self) -> RelationPredicate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelationPredicate
impl Debug for RelationPredicate
Source§impl Display for RelationPredicate
impl Display for RelationPredicate
Source§impl SpatialPredicateTrait for RelationPredicate
impl SpatialPredicateTrait for RelationPredicate
Source§fn swap_for_swapped_children(&self) -> Self
fn swap_for_swapped_children(&self) -> Self
Returns a semantically equivalent predicate after the join children are swapped. Read more
Source§fn update_for_child_projections(
&self,
projected_left_exprs: &[ProjectionExpr],
projected_right_exprs: &[ProjectionExpr],
) -> Result<Option<Self>>
fn update_for_child_projections( &self, projected_left_exprs: &[ProjectionExpr], projected_right_exprs: &[ProjectionExpr], ) -> Result<Option<Self>>
Rewrites the predicate to reference projected child expressions. Read more
Auto Trait Implementations§
impl Freeze for RelationPredicate
impl !RefUnwindSafe for RelationPredicate
impl Send for RelationPredicate
impl Sync for RelationPredicate
impl Unpin for RelationPredicate
impl UnsafeUnpin for RelationPredicate
impl !UnwindSafe for RelationPredicate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more