Conversation
There was a problem hiding this comment.
Is it necessary to set package version numbers?
| @@ -0,0 +1,337 @@ | |||
| import os | |||
| import shutil | |||
There was a problem hiding this comment.
It is better to import the function that you need than the whole package, e.g. "from shapely.geometry import shape".
Please check also the imports below
|
|
||
| def get_hotmaps_layer_info(layer_name): | ||
| # This function returns a dictionary with the information about hotmaps layers | ||
| layer_info = { |
There was a problem hiding this comment.
Is there an option to request this meta data also from hotmaps than hard coding it?
| except OSError as e: | ||
| print(f"Error: {e}") | ||
|
|
||
| return clipped_raster, vector |
There was a problem hiding this comment.
I thought the result of this function should be a GeoDataFrame, not paths to data
| # Convert clipped raster to vector | ||
| vector = raster_to_vector(output_directory, title, epsg) | ||
|
|
||
| # Remove temp directory and all its contents. |
There was a problem hiding this comment.
Why keep the gpkg and tif file? I would say everything can be deleted when you return a geodataframe.
If the files are kept then they need unique names.
| return vector_path | ||
|
|
||
|
|
||
| def hotmaps_request(layer_name, bbox, epsg): |
There was a problem hiding this comment.
Would be better to input a polygon object because this should be the basis in dave_data. Within the function you can transform the polygon into a bounding box, maybe write a function for this transformation.
No description provided.