AddsanIDcolumnifitdoesn't already exists. If column named after name_column parameter does not exist in the geodataframe, adds one with integers from 1 to the number of observations.Parameters----------obs : geopandas GeoDataFrame Observation points or polygonsname_column : str Name of the ID column.Returns-------obs : geopandas GeoDataFrameObservationpointsorpolygonswithaddedcolumnnamedusingparametername_columnifitdoesn't already exist.
Get bounds of around of a polygons so it matches the limits of Sentinel-2 pixels
Parameters
----------
obs : geopandas GeoDataFrame
A polygon
Returns
-------
bounds : 1D array
Bounds around the polygon
Observations polygons are intesected with Sentinel-2 tiles extent vector. Intersections where the observation polygon did not entirely fit in the sentinel-2 tile are removed.
Observation polygons which intersect no Sentinel-2 tiles are removed and their IDs are printed.
Parameters
----------
obs_polygons : geopandas GeoDataFrame
Polygons of observations.
sen_polygons : geopandas GeoDataFrame
Polygons of Sentinel-2 tiles extent with 'area_name' and 'epsg' columns corresponding to the name of the tile, and the projection system respectively.
name_column : str
Name of the ID column.
Returns
-------
geopandas GeoDataFrame
Intersection of obs_polygons and sen_polygons, with incomplete intersections removed.
Converts polygons to points corresponding to the centroids of the Sentinel-2 pixels of each Sentinel-2 tile intersecting with the polygons.
Prints polygons with no pixels centroids inside of them.
Parameters
----------
polygons : geopandas GeoDataFrame
Observation polygons with 'area_name' and 'epsg' columns, corresponding to the name of a Sentinel-2 tile and its CRS respectively.
name_column : str
Name of the ID column.
Returns
-------
grid_points : geopandas GeoDataFrame
Points corresponding to the centroids of the Sentinel-2 pixels of each Sentinel-2 tile intersecting with the polygons.