Skip to content

geos.GEOSIntersection ⇒ GEOSGeometry

Returns the intersection of two geometries: the set of points that fall within both geometries.

Kind: global property of geos
Returns: GEOSGeometry - A newly allocated geometry of the intersection. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
g1GEOSGeometryone of the geometries
g2GEOSGeometrythe other geometry

geos.GEOSIntersectionPrec ⇒ GEOSGeometry

Returns the intersection of two geometries: the set of points that fall within both geometries. All the vertices of the output geometry must fall on the grid defined by the gridSize, and the output will be a valid geometry.

Kind: global property of geos
Returns: GEOSGeometry - A newly allocated geometry of the intersection. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
g1GEOSGeometryone of the geometries
g2GEOSGeometrythe other geometry
gridSizenumberthe cell size of the precision grid

geos.GEOSIntersectionPrec_r ⇒ GEOSGeometry

Returns the intersection of two geometries: the set of points that fall within both geometries. All the vertices of the output geometry must fall on the grid defined by the gridSize, and the output will be a valid geometry.

Kind: global property of geos
Returns: GEOSGeometry - A newly allocated geometry of the intersection. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
g1GEOSGeometryone of the geometries
g2GEOSGeometrythe other geometry
gridSizenumberthe cell size of the precision grid

geos.GEOSIntersection_r ⇒ GEOSGeometry

Returns the intersection of two geometries: the set of points that fall within both geometries.

Kind: global property of geos
Returns: GEOSGeometry - A newly allocated geometry of the intersection. NULL on exception. Caller is responsible for freeing with GEOSGeom_destroy().

ParamTypeDescription
handleGEOSContextHandle_t-
g1GEOSGeometryone of the geometries
g2GEOSGeometrythe other geometry