Alteryx Designer Desktop Discussions

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

Spatial Match - Expected Match Output Number of Records

w_gore
8 - Asteroid

I am working on a WF to determine the following (amongst other things): (1) the length of line(s) within a county/district, and (2) the length of line(s) grouped by a specific attribute.  There are two inputs files, one file contains polylines and one file contains polygons.  The polyline file is an internal file containing sensitive non-public data (the reason for no attached workflow or other data).  The polygon file is from a state resource.  I have tried to use the Spatial Match tool with the polygon file (counties/districts) for Target input and polyline file for Universe input.  I've chosen every matching option and still don't understand my results, fully; even after reading support documentation.  My universe input consists of 341 records with a total length of X.  I am trying to get a result providing the 341 records and the matching county/district with total length of X.  Obviously, I am doing something wrong.  Thanks for reading my long post and providing feedback.

9 REPLIES 9
AndrewDMerrill
13 - Pulsar

It sounds like you need to Append the polygon and polyline data and use the Spatial Process Tool to get the intersection.

2023-11-15_19-25_Maps.png

2023-11-15_19-25_Maps2.png

w_gore
8 - Asteroid

That sound like the step(s) I need to include.  I can't seem to append the polyline and polygon into a record with both spatial objects.  I've included a screenshot with more information.

AndrewDMerrill
13 - Pulsar

This is what the workflow would look like. Just be aware that the Append tool will likely warn you about how many records you are creating (hopefully the number of counties isn't too high).

 

2023-11-16_13-59_Spatial Processing.png

w_gore
8 - Asteroid

Yes, I expected the error/warning for the append.  The Spatial Process combine is generating the 341 polyline records time X counties.  However, the SpatialObj_Process is [Null] b/c specified action could not be applied to the spatial object types provided.  I know this should not be difficult to perform. Again, thanks for the help everyone.

AndrewDMerrill
13 - Pulsar

Did you set Spacial Process to "Intersect"?

w_gore
8 - Asteroid

Bingo!.  After making that change and filtering out the [Null], I/m at my 399 total records.  This should be the original amount, plus where there is an intersect.  Now, I need to think of my next process step.

w_gore
8 - Asteroid

After making all of the above changes, I'm still getting a total linear length greater than my total per input records.  Other suggestions before I work with my Alteryx contact(s)?

AndrewDMerrill
13 - Pulsar

Did you set the Spatial Object Field in the Spatial Info Tool to the processed (intersection) field? Easy check is that "null" cells should return 0 distance, if you have a distance then you used the wrong spatial object. This can also be avoided if you use the Select Tool to select off any spatial objects that are not the processed intersection object field. Here is a sample of what your workflow should look like (You can ignore branch 1 that was just for testing to get the total distance of all polylines).

Workflow.png

Total Distance:

Total Distance.png

Intersection Distances:

Intersection Distances.png

w_gore
8 - Asteroid

Thanks Andrew and the rest of the folks who chimed in.  The solved my issue.  I have only one record set where my distance is different before and after use of spatial tools.  I believe I can determine the cause for this anomaly. 

Labels