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

Transect issues #499

Closed
jobthoma97 opened this issue Jun 11, 2024 · 8 comments
Closed

Transect issues #499

jobthoma97 opened this issue Jun 11, 2024 · 8 comments

Comments

@jobthoma97
Copy link

Hi @kvos ,

I have loaded the transects using coordinates.

I was able to load it successfully. In the transect plot it's showing all the 5 transects but after computing the transects, on the multiple subplot graph figure its only showing for transect number 4.

In the Excel sheet also its showing the distance for 1 transect.

How to resolve this ?

Below I have attached the images.
Transect Plot Map.
Coastsat_TransectPlot

Transect Subplot Graph.
Coastsat_TransectPlot2

Transect distance CSV.
Coastsat_TransectPlot3

@2320sharon
Copy link
Contributor

Hi @jobthoma97

The reason you only see a single transect plotted is because only that transect intersected your shoreline. In the CSV the date represents the time the shoreline was captured and each column is the transect ID. All the transects except NA4 are blank which means they didn't intersect the shoreline captured in 2018. Without knowing your shoreline data I can't tell why that's the case, but I hope this helps!

It might be worth double checking that the shoreline and the transects are in the same CRS. I've made that mistake a lot.

@jobthoma97
Copy link
Author

jobthoma97 commented Jun 13, 2024

Hi @2320sharon ,

Thank you for replying.

I cross checked the CRS for transect and the CoastSat_Shoreline for 2018, they are both on the same CRS(32614).

I overlayed the transects and the output shoreline from CoastSat in QGIS, they intersect with the transects.

Below I have attached the Metadata, PDF FIle of the Jupyter Notebook and the output of shoreline overlayed on the transects.
Please have a look.

##-----------------Jupyter Script PDF File -------------------------------##
San_Jose_Texas.pdf

##-----------------Transect Metadata -------------------------------##
Coastsat_Transects_pts

##-----------------Shoreline Metadata -------------------------------##
Coastsat_Shoreline_2018

##-----------------Output File of Shoreline from CoastSat and Transect shapefile -------------------------------##

Coastsat_Transects_Shoreline

@kvos
Copy link
Owner

kvos commented Jun 13, 2024

hi @jobthoma97 , so you only have 1 shoreline mapped but you should get a value for each transect, not just NA4. Can you try to run the simple compute intersections? see what happens. I'm guessing some of the QC parameters is discarding the intersections for the other transects...
image

@jobthoma97
Copy link
Author

Hello @kvos ,

Thank you for the reply.
I forgot to mention, I was able to resolve the error.

Yes I have only one shoreline and as you said it should give the value for each transect.
The issue was with the length of the transects from on-shore to the shoreline intersection point.

The length for NA1 from on-shore to the shoreline intersection point was 1.207 KM, for NA2 it was 1.270 KM, NA3 it was 1.083 KM, NA5 it was 1.302 KM and NA4 it was 0.966 KM.

Then later I shorten the length of the transects and it was able to plot all subplots for 5 transect intersection points.

Then for confirmation I checked the python script for SDS_transects.py and on line 220 " idx_dist = np.logical_and(d_line <= settings['along_dist'], d_origin <= 1000)" this was mentioned as well on line 321 "idx_dist = np.logical_and(d_line <= along_dist, d_origin <= 1000)".

I think this was the reason it was only plotting for NA4.

Am I on the right track or something else was the reason for this to happen.

@kvos
Copy link
Owner

kvos commented Jun 13, 2024

that's exactly it, I had forgotten about that hard-coded 1km distance. Maybe we should increase it to 5km? we need to restrict it somehow as the equation we're using is point to line distance, which is not limited by distance and in case of someone putting transects that are not in the same coordinates as the shorelines it will give some false results. What do you think @2320sharon @jobthoma97 ?

@jobthoma97
Copy link
Author

jobthoma97 commented Jun 13, 2024

Absolutely.

And if there is a error message highlighting the transect length exceeded by 1 or 5km from on-shore to shoreline intersection points or the coordinates does not match, It will be easier for the users to identify the error or in the "example_Jupyter" a line can be added mentioning about the transect length range.

It's up to you, or there might be some better solutions.

Thank you very much @2320sharon and @kvos for the help.

@2320sharon
Copy link
Contributor

I'm happy I could help @jobthoma97 . I'm glad you got it all sorted out.

@kvos we've also run into issues with the hardcoded max distance of 1km in idx_dist = np.logical_and(d_line <= settings['along_dist'], d_origin <= 1000). Just like @jobthoma97 we couldn't figure out why we weren't getting shorelines with our long transects. I think having a new setting called something like max_distance_origin to control this hard coded parameter would be useful. Some kind of log or error message to capture the points that were filtered out by idx_dist = np.logical_and(d_line <= settings['along_dist'], d_origin <= 1000) could be helpful too.

@jobthoma97
Copy link
Author

that's exactly it, I had forgotten about that hard-coded 1km distance. Maybe we should increase it to 5km? we need to restrict it somehow as the equation we're using is point to line distance, which is not limited by distance and in case of someone putting transects that are not in the same coordinates as the shorelines it will give some false results. What do you think @2320sharon @jobthoma97 ?

@kvos May I know what is the sole purpose of the hard-coded function to 1km . Just out of curiosity.

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

3 participants