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

Allow flexible crs for bbox in urban_centre module #227

Open
SergioRec opened this issue Jan 9, 2024 · 0 comments
Open

Allow flexible crs for bbox in urban_centre module #227

SergioRec opened this issue Jan 9, 2024 · 0 comments
Labels

Comments

@SergioRec
Copy link
Contributor

SergioRec commented Jan 9, 2024

Description of the Feature to be Added

Usually bounding boxes are provided in EPSG: 4326 as a list of coordinates. Currently, the urban_centre module can only take bounding boxes in ESRI: 54009 and GeoDataFrame format, which forces the user to create the gdf before calculating the urban centre.

We should add the possibility of providing a bounding box as a list in any crs, and convert it automatically if not in ESRI: 54009.

(OPTIONAL) Suggested Implementations

A new function could be added to convert the list of coordinates to a bbox:

    bbox_gdf = gpd.GeoDataFrame(
        geometry=[box(*["bbox"])], crs="crs"
    )

window_raster function within urban_centre module has a check to raise an exception if bbox crs is not ESRI: 54009. A crs reprojection with a warning could be added here instead.

Unit tests need to be amended accordingly.

Additional context

The E2E script now includes a reprojection step. This needs to be removed once this change is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant