To run a single Geospatial function, first create GeoDataFrame on a table containing Geospatial data.
geoDF = GeoDataFrame("sample_shapes")
Assume geoDF.geometry points to "geom_col1".
This approach requires user to use GeoDataFrame.assign() function.
Syntax 1: Using 'geometry' property to invoke the function
This syntax uses 'geometry' property of GeoDataFrame to invoke the function.
geoDF.assign(intersect_result = geoDF.geometry.intersects(geoDF.geom_col2))
Syntax 2: Using actual ColumnExpression of a column to invoke the function
This syntax uses actual ColumnExpression, also known as GeoDataFrameColumn object of a column 'geom_col1'.
geoDF.assign(intersect_result = geoDF.geom_col1.intersects(geoDF.geom_col2))
Syntax 3: Passing the column name instead of the GeoDataFrameColumn object as value
This syntax uses the column name as is, instead of passing GeoDataFrameColumn object for 'geom_col2'.
geoDF.assign(intersect_result = geoDF.geometry.intersects("geom_col2"))