-
Notifications
You must be signed in to change notification settings - Fork 2
12 integrate hotmaps #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to set package version numbers?
| @@ -0,0 +1,337 @@ | |||
| import os | |||
| import shutil | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
tbanze
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some comments
No description provided.