-
Notifications
You must be signed in to change notification settings - Fork 42
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
[POC] Simplify the creation of an ROI for a user. #602
Comments
The functions I was mentioning from GeoUtils that could be used to create an RIO in any CRS using a bounding box from any another CRS: |
@vschaffn , as planned, I’ve drafted an initial outline for implementing an ROI pixel. I estimate it will take you about two days of development work. If you’d like, you can first refine this version or alternatively propose one with a georeferenced ROI, in which case I believe you’ll need the full five days. |
Example of the desired API:The geographical coordinates of the ROI should be defined with keys ( # Georeferenced ROI
dem = xdem.DEM("path/to/dem", roi={"left": 40.5, "bottom": 38.0, "right": 44.0, "top": 41.0, "crs": "EPSG:32718"}) The pixel-based coordinates of the ROI should be defined with keys ( # Pixel-based ROI
dem = xdem.DEM("path/to/dem", roi={"x": 50, "y": 100, "w": 1000, "h": 500}) Code
Tests
Documentation
|
Context
The goal of this task is to enable the creation of an ROI (Region of Interest) in PIXEL when loading a DEM. Although this ticket is proposed in the xDEM repository, the developments are intended for implementation in the geoUtils project.
To achieve this, we propose adding a parameter to the DEM creation [here](https://github.com/GlacioHack/xdem/blob/main/xdem/dem.py#L94). Using rasterio's
Window
option, we will load only the desired area. The resulting API would look like this:Code
Modify the
RASTER
classself._ROI
, which can be either a dictionary orNone
.Raster.from_array
.Update data loading
window
variable.Example of window creation:
Tests + Documentation Update**
Tests and documentation must be updated to reflect these changes.
The text was updated successfully, but these errors were encountered: