amforte / Topographic-Analysis-Kit

Set of matlab based tools for topographic analysis, built on top of TopoToolbox.
GNU General Public License v3.0
43 stars 35 forks source link

Basin2raster and Basin2Polygon will not work #51

Open elisham98 opened 1 year ago

elisham98 commented 1 year ago

Hello, my name is Elisha and I am new to this software. It's pretty amazing the stuff it's able to do. A problem that I am running into after using the BasinPicker and ProcessRiverBasins functions is trying to convert the DEMoc to a raster for me to use in QGIS. After inputting my variables I receive this error:

[RASTER]=Basin2Raster(DEMoc,'id','basin_dir'); Warning: There are some points outside the grid's borders In GRIDobj/coord2ind (line 65) In Basin2Raster (line 193) Array indices must be positive integers or logical values.

Error in Basin2Raster (line 195) OUT.Z(ix)=val_list;

My array indices are positive and I figured the values would be logical due to them being from points selected on basinPicker. So I thought of just using the Basin2Polygon and then rasterizing it in QGIS. But then I receive this error:

[MapStruct]=Basin2Shape(DEMoc,'basin_dir'); Warning: There are some points outside the grid's borders In GRIDobj/coord2ind (line 65) In Basin2Shape (line 177) Array indices must be positive integers or logical values.

Error in Basin2Shape (line 179) DB.Z(ix)=RiverMouth(:,3);

Looking at my RiverMouth values, there are 3 integers that perfectly align with the array. So I am still confused about how to get these to work. If I could receive any guidance on this, that would be awesome.

Cheers, Elisha