Skip to content
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

Add a multilayer reading option for AOI #507

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

CharlesAuthier
Copy link
Collaborator

Add the option to read a multilayers GPKG when is read by the AOI function.

Plus tests for the entire check_gdf_load function.

@@ -174,11 +176,24 @@ def check_rasterio_im_load(im):
raise ValueError("{} is not an accepted image format for rasterio.".format(im))


def check_gdf_load(gdf):
def check_gdf_load(gdf: Union[str, Path, gpd.GeoDataFrame]) -> gpd.GeoDataFrame:
Copy link
Collaborator

Choose a reason for hiding this comment

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

good job Charles! I like how you improved this part.

[multi_layers, geopkg],
ignore_index=True
)
return multi_layers
Copy link
Collaborator

Choose a reason for hiding this comment

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

In general, I understand why it makes sense to know if the label gpkg is a multi-layer or not. But do we have label gpkg in practice? I thought we always have a single-layer single-class gpkg for training? If this is not true, then I need to adjust my tiling script too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We mustly use single-layer single-class, but we want to also support multi-classes and Pierre told me that the GPKG will be multi layer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@CharlesAuthier let's discuss it altogether with Mathieu next week because it will require many potential adjustments to the code.

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.

2 participants