brails.utils.spatial_join_methods.get_points_near_polygons module

This module defines the concrete class GetPointsInPolygons.

GetPointsNearPolygons()

A spatial join strategy that associates point features with polygons.

class brails.utils.spatial_join_methods.get_points_near_polygons.GetPointsNearPolygons

Bases: SpatialJoinMethods

A spatial join strategy that associates point features with polygons.

This class performs a two-stage spatial join:

  1. Containment-Based Join: Points that lie inside a polygon are matched directly.

  2. Proximity-Based Join: For polygons without any internal points, the closest point to the polygon’s centroid is selected.

The result is a polygon inventory enriched with features from matched point geometries.

Inherits:
SpatialJoinMethods:

Base class providing shared spatial join functionality.

Methods:
_join_implementation(polygon_inventory, point_inventory):

Executes the spatial join and feature merge logic.