I have a polyline of the US coastline and want to find a way to break it into states. I have tried to make it into points but then they are not in any order and i cant sort them by Lat because the coastline doesn't go perfectly north to south. Any ideas how to split the line at the state?
I have also tried using a shapefile of the US states and cutting the coastline from it but since it doesn't exactly match it leaves a bunch of gaps.
Thanks!
Hi @Kevin ,
> but then they are not in any order and i cant sort them by Lat
I think Poly-Split tool outputs the sequence number of each line object.
So you should be able to see the order of the points after Poly-Split.
> it doesn't exactly match it leaves a bunch of gaps
If you are allowed to "relax" the state boundary, you may want to use Buffer tool.
As a starting point, I created a sample workflow.
Data volume issue
After the polylines are split to points, the data volume becomes huge.
So I dropped the lines shorter than 10 km. (You can change the threshold as you like.)
Sample workflow
Poly-Build tool configuration
With Spatial Match tool, you know each point belongs to which state.
Then the points can be grouped by State + Record ID, so that the Group ID is used in Poly-Build tool.
Output
The state of California is selected for your reference.
As input data files, I used the following sources. You may plug in your data.
State boundary: https://www.weather.gov/gis/USStates
Data: https://www.weather.gov/source/gis/Shapefiles/County/s_08mr23.zip
Coastline: https://catalog.data.gov/dataset/tiger-line-shapefile-2019-nation-u-s-coastline-national-shapefile
Data: https://www2.census.gov/geo/tiger/TIGER2019/COASTLINE/tl_2019_us_coastline.zip
I hope this can be of some help.