Closed ferrarini1973 closed 4 years ago
As the error indicates, it suggests that some of the points you are inputting to extract the swath lie outside the boundaries of the DEM you're giving it. Have you confirmed that after you've extracted all your DEMs that the corresponding points you're using to generate the swaths lie within the bounding box defined by those DEMs?
Hi Adam, thank you for answering quickly. Yes, I did verify that but, naively, I continued to check in GIS without plotting DEMs and the swath trace in Matlab environment. In this way, I did not visualize the real limits of the DEMs in comparison to the trace. I have understood! Now it works! Thank you
Glad it was something simple. I'll close the issue.
Hi,
I'm trying to make swath profile on different terrace orders using MakeTopoSwath. I extracted different rasters via 'Extract by mask', using different shapes (polygon) corresponding to the different terrace orders. The script run well for some of the rasters while for 2 of them I obtain this message:
Warning: There are some points outside the grid's borders
In GRIDobj/coord2ind (line 59) In SWATHobj (line 252) In MakeTopoSwath (line 123) Array indices must be positive integers or logical values.
Error in SWATHobj (line 253) z0 = DEM.Z(ix0);
Error in MakeTopoSwath (line 123) SW=SWATHobj(DEM,points(:,1),points(:,2),'width',wdth,'dx',sample,'smooth',smth); % Newer versions
Why is this happening if the original raster is the same, the projections are the same for rasters and shapes and the swath coordinate as well?
Thank you for the help you would want to grant me!