May 2019
Beginner
170 pages
4h 9m
English
We already covered points in a polygon with sjoin back in Chapter 3, Performing Spatial Operations Like a Pro, and will revisit it here as a topology operation. Pay attention to this example, as this is the most important aspect of the geofencing concept. To simplify our case, we will first take a buffered polygon out of one trajectory point. Later, when doing geofencing, we will bring out polygons of geographic objects, such as an airport, beach, and city center. We convert the buffered point into a polygon GeoDataFrame, reset the index, and make sure that the name of the geometry column is geometry:
# Create buffer on Point 20 in track_id 1buffer = track_id_1[track_id_1['id'] == 20].buffer(0.005)buffer.reset_index(drop=True, ...
Read now
Unlock full access