kvos / CoastSat

Global shoreline mapping tool from satellite imagery
http://coastsat.wrl.unsw.edu.au/
GNU General Public License v3.0
651 stars 245 forks source link

Nan values in cross distance #504

Open evecchi opened 3 weeks ago

evecchi commented 3 weeks ago

Hello @kvos,

I'm encountering an issue with the cross-distance calculation. I have generated my transects as geojson and loaded them into Jupyter. Everything seems to be functioning correctly until the point where the cross distances are computed, because I'm getting NaN values for several of them. I don't think the issue is related to the CRS, since some distances have reasonable values, and I've also verified how the starting and ending points are defined for each transect.

I attach here an image. Screenshot 2024-06-14 101750 What would you suggest?

Thank you in advance.

Enrica

kvos commented 2 weeks ago

are the transects longer than 1km? there is something hard-coded to be within 1km from transect origin, see issue #499 . Please try first to compute the intersections with the normal function SDS_transects.compute_intersections(), before using the QA version that has more parameters. Let me know if that fixes the issue.

evecchi commented 1 week ago

Actually no, they are shorter! I'll have a look at that issue and let you know. Thanks!

kvos commented 1 week ago

did you try the simple compute_intersections()?