-
Notifications
You must be signed in to change notification settings - Fork 2
Gs/code improvement #36
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
Conversation
|
This PR is part of the conclusion of the project on border points. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ement Ch/code improvement
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cleherny
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.
Still few modification to do but it's almost done!
helpers/FOLDER.py
Outdated
| # we can mimick ESRI MapImageLayer's metadata, | ||
| # at least the section that we need | ||
| image_metadata = { | ||
| "year": year, |
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.
To prevent a bug due to 'year' value being filled with None in case no year is provided, I propose to replace this line with:
**({'year': year} if year else {}),
then the key year will be added only if it exists. Then changes made l783 in generate_tilesets.py can be deleted.
scripts/generate_tilesets.py
Outdated
| img_md_df.rename(columns={"index": "img_file"}, inplace=True) | ||
|
|
||
| img_md_df['id'] = img_md_df.apply(misc.img_md_record_to_tile_id, axis=1) | ||
| if img_md_df.year.isna().all(): |
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.
Those lines provoke an error when the WMS or MIL connectors are selected. I rather propose to modify the way the FOLDER metadata is built (see l107 FOLDER.py) and delete these lines.
| tiles_gdf=aoi_tiles_gdf.to_crs(IM_SOURCE_SRS), # <- note the reprojection | ||
| base_path=IM_SOURCE_LOCATION, | ||
| end_path=ALL_IMG_PATH, | ||
| year=YEAR, |
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.
This line must be preserved. I think we lost it in the previous PR merge...
cleherny
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.
I haven't re-run the scripts but it looks all good to me. Thank you!
Uh oh!
There was an error while loading. Please reload this page.