src.utils package¶
Submodules¶
src.utils.helpers module¶
-
class
src.utils.helpers.Stages¶ Bases:
object-
FILTERED= 'filtered'¶
-
INTERPOLATED_DSM= 'interpolated_dsm'¶
-
INTERPOLATED_DTM= 'interpolated_dtm'¶
-
SUBTILING= 'subtiles'¶
-
-
src.utils.helpers.create_path_if_not_exists(input_path)¶
-
src.utils.helpers.get_ahn_index()¶ Download the newest AHN3 units/index file
-
src.utils.helpers.vector_prepare(bbox, filepath)¶ Takes a bounding box and a file path to a vector file. Reads the vector file, finds polygons that are within the bounding box or intersect it. Crops the intersecting geometries to the extents of the bounding box, and returns the contained and cropped geometries.
- Parameters
bbox – List representing the bounding box used to retrieve polygons [[xmin, xmax], [ymin, ymax]]
filepath – String representing path to where the polygon file can be found
- Returns
List containing cutouts of the polygons which are inside the bounding box specified
-
src.utils.helpers.wfs_prepare(bbox, url, layer)¶ Takes a bounding box and a WFS service URL. Requests features in the bounding box, finds polygons that are within the bounding box or intersect it. Crops the intersecting geometries to the extents of the bounding box, and returns the contained and cropped geometries.
- Parameters
bbox – List representing the bounding box used to retrieve polygons [[xmin, xmax], [ymin, ymax]]
url – String representing url to WFS service where polygons can be retrieved
layer – String representing layer for which to request data from WFS service
- Returns
List containing cutouts of the polygons which are inside the bounding box specified
src.utils.indexing module¶
-
src.utils.indexing.get_tile_connectivity()¶ Uses data from AHN3 to transform all tiles into polygons, then doing intersection tests to determine if tiles are in some way connected (done by checking if exterior of 2 polygons intersects). If it intersects, then a few more tests are done te determine on which side the intersection is. When it is done, it assigns the neighboring tile in the correct place in the Tile class.
Note: Possibly there is a more efficient way to do intersection tests and determining where a tile is in respect to another tile.
- Returns
Dictionary containing tile id as key and Tile class as value