Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Map Tool - Trade Radius Dotted Lines

DanM
Alteryx Community Team
Alteryx Community Team
Created

 

We recently had a user that was looking to distinguish polygons between each other using dashed lines, a style not currently available in the Report Map Tool. But that’s alright, we can use the opportunity to showcase how you can be creative in Alteryx by using a few tools.  

 

Point Map.png

 

In cifically filter out the record IDs you want to change or use the Sample tool to pull random records, or 1 of every N Records. (FYI – if you use the record ID, you will want to remove that column after you have split the records, due to the record ID used later in the mapping process.)

 

Once you have selected the polygons you want to use, you will need to break those polygons into individual points using the Poly-Split tool. Here, choose Polygon field and Split to Points. Splitting the polygon into points will allow you to adjust the polygon by each point.

 

Then, you'll want to remove some of the points to create the “dotted line” effect by using the Sample tool. This tool's settings will want 1 of every N Record selected (you can change the N=3 to any number you like that will have the spacing effect you want).

 

Now that you have removed some points, you'll want to do a few things to give the points a grouping effect. In order to do this, add another Record ID tool, then filter the record ID by odd and even numbers. You can do this using the Filter tool and using the expression mod([Record ID],2)>0. Then add Record ID tools to the T and F anchors to complete the grouping effect when you add them both to a Union tool.

 

Grouping the points allows you to build your Polylines. After the Union tool, add a Poly-Build tool. The Build method will be Sequence Polyline using the SpatialObj and the RecordID, as the Source and Group fields, respectively.

 

Your final step is to add a Map tool and pull in the data from your Poly-Build tool, as well as the original centroid points of the polygons with which you created the split lines, and finally the remaining polygons you want to be represented as full lines around the radius. When configuring the Map tool, remember that the points coming from the Poly-Build are actually lines and not Polygons. Your layering will need to have Points, Lines, and Polygons to complete the map.

Attachments
Comments
spranivo
5 - Atom

Excellent work flow!

ialvaran
5 - Atom

 

Thanks for sharing this post. I am wondering how to "force" the centroids and the trade area dotted lines to be on top of everything in the map i.e. street names, street lines, etc.

 

Thank you.

 

 

JessicaS
Alteryx Alumni (Retired)

Hi @ialvaran,

 

You can control the order of the map layers by selecting them on the layers tab and using the arrows to move up and down. To your question, you can move 'base layers - lines' down below the trade area.

 

2018-02-09_9-33-42.png

 

For much more detail on making your maps look snazzy check out the tool mastery article on report map

https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Tool-Mastery-Report-Map/ta-p/37225

 

Thanks,

Cstep35
5 - Atom

Very helpful, 

 

Currently trying to include this in one of my flows. I noticed that the legend shows the output as a solid line vs. dotted. 

 

In my current flow I have changed the color so the legend can appropriately differentiate between my dotted and solid lines. 

 

I was wondering if there were any thoughts on how to change the legend symbol to indicate a dotted vs. a solid line, so that in the future I could use this method but have one color for both my dotted and solid lines.

 

Thank you!

 

Edit: As it happens I ran into a roadblock here. I was trying to do this with a polygon I created in a separate KML. The number of points I used to create the polygon was so small, that when I attempted this method the dotted line was jagged, uneven, and didn't truly bound the area I wanted it to. 

 

I can go back and include additional points in the KML to overcome this. Out of curiosity, is there anyway to add points along a the straight lines of an irregular polygon so this can work more effectively?

 

Thank you!