Skip to content

Conversation

@mdaneshfarfh
Copy link
Contributor

No description provided.

Copy link
Contributor

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
Copy link
Contributor

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 = {
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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):
Copy link
Contributor

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.

Copy link
Contributor

@tbanze tbanze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants