Skip to content
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

Nan values in cross distance #504

Open
evecchi opened this issue Jun 14, 2024 · 4 comments
Open

Nan values in cross distance #504

evecchi opened this issue Jun 14, 2024 · 4 comments

Comments

@evecchi
Copy link

evecchi commented Jun 14, 2024

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
Copy link
Owner

kvos commented Jun 18, 2024

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
Copy link
Author

evecchi commented Jun 25, 2024

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

@kvos
Copy link
Owner

kvos commented Jun 27, 2024

did you try the simple compute_intersections()?

@evecchi
Copy link
Author

evecchi commented Jul 8, 2024

I found that the issue is related to the clipping operation of the output points I added to the script.
While in Qgis I can see that the Coastsat output points and the clipped ones have the same extension, for example when I plot them by:

_fig = plt.figure()
plt.axis('equal')
plt.xlabel('Eastings')
plt.ylabel('Northings')
plt.grid(linestyle=':', color='0.5')

for i in range(len(output['shorelines'])):
sl = output['shorelines'][i]
date = output['dates'][i]
plt.plot(sl[:,0], sl[:,1], '.', label=date.strftime('%d-%m-%Y'))
#plt.legend();_

the extension of the clipped dataset is smaller and equal to the area where the transect values are computed.
I will try to fix this by analysing which parameter of my clipping operation can affect how the dataset extension is read.
Do you have any suggestions?

Thanks

Enrica

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants