TopoToolbox / pytopotoolbox

Python interface to TopoToolbox
https://topotoolbox.github.io/pytopotoolbox/
GNU General Public License v3.0
2 stars 4 forks source link

Transform data into projected coordinate system #82

Open wkearn opened 2 hours ago

wkearn commented 2 hours ago

MATLAB topotoolbox provides the reproject2utm function, which transforms the supplied GRIDobj into a projected coordinate system. Many of our analysis functions assume projected coordinate systems, and it would be nice to have this functionality available.

We should be able to use rasterio's warp.reproject function , assuming we maintain enough of the rasterio metadata in the GridObject -- I think we only need the transform and crs, which we do have access to.

lattaai12 commented 2 hours ago

Hello, I tried to solve the issue.

This is what I did:

Implemented the reproject2utm method in the GridObject class to transform the DEM into a projected coordinate system using rasterio's warp.reproject function. This new method allows users to reproject their DEMs to UTM coordinates, which is essential for many analysis functions that assume projected coordinate systems.

You can review changes in this commit: https://github.com/lattaai12/TopoToolbox-pytopotoolbox-82/commit/cded88f9163aa732deaaa7613fc61fab300d439d.

[!CAUTION] Disclaimer: The commit was created by Latta AI and you should never copy paste this code before you check the correctness of generated code. Solution might not be complete, you should use this code as an inspiration only.


This issue was tried to solve for free by Latta AI - https://latta.ai/ourmission

If you no longer want Latta AI to attempt solving issues on your repository, you can block this account.