ROI Generation along a Mock Coastline Vector #19
2320sharon
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ROI Polygon Generation along a mock Coastline vector
One of the requirements of this project is to have a series of ROIs generated along a coastline vector within a specified bounding box provided by the user. I don't currently have the real coastline vector, so I made a mock one out of a geojson LineString for a portion of the coast. I then generated some polygons to represent ROIs along it and made some mock controls using ipywidgets.
ROI generation along a vector question
It turns out that generating points equal distances apart on a vector is a more complicated task than I initially thought. There are some complicated algorithms for interpolating points along a vector I have discovered. If anyone knows of some good libraries, tools, or algorithms for generating points along a vector please share!
Generating ROIs within a bounding box
One of the goals of CoastSeg is to generate a series of ROIs within a bounding box, which means we need a way to determine if the vector or ROI selected is within the bounding box specified by the user. I discovered that geopandas has a spatial join function that lets you check if geospatial objects are within, contain or intersect each other that could be used to determine if objects are within the bounding box. This would add another dependency to the project so is there is another way to do this or if I should consider taking another approach entirely? I have been able to successfully determine if shapes along the coastline were within a bounding box created by the user. I have not published this code yet though.
Jupyter Notebook Code
The jupyter notebook containing the code is in the pull request here. #17
Beta Was this translation helpful? Give feedback.
All reactions