Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Breaking a polyline into specific groups

Kevin
5 - Atom

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!

2 REPLIES 2
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

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

Yoshiro_Fujimori_0-1684026598027.png

 

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.

Yoshiro_Fujimori_1-1684026670925.png

 

Output

The state of California is selected for your reference.

Yoshiro_Fujimori_2-1684027141767.png

 

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.

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Here is the packaged workflow (37MB) just in case you need it.

(The workflow is the same)

Labels
Top Solution Authors