Select to view content in your preferred language

Is There any way to add a line/Arrow to Attached at each of my Polygons present in a feature class layer?

1073
6
06-22-2017 08:03 AM
priyanksameer
New Contributor II

The reason i m asking is due to some requirement in a research and analysis where i wanted a vector attached to each of my polygons.The vector can be attached at the mid point or centroid or at the start/End point. Need your assistance on this one. Refer the Doc for more details.

Adding to this is there a way to any one specific side of all polygons in a feature layer?How?

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

Feature to Points you then have to option to use the first, 2nd, etc  point or the centroid depending which option you choose. 

You could sort by X coordinate and put those on the left, center or right etc.  Once you have the point you want to use, get a separate file and get the X, Y coordinates, ... calculate an Xend which equals X, and calculate Yend which equals Y + 100m (or some other appropriate number. 

You can then use the X, Y and Xend, Yend to form lines using XY to Line

0 Kudos
priyanksameer
New Contributor II

Thanks Dan,
I am new to ArcGis can you explain me in details. For eg if i have 3 polygons present in a layer so how should i do and what all tools would i require?

thanks for your support in advance.

I know how to convert polygons to points using Feature to points as mentioned. But if explained in detailed i might figure a solution to my problem.

I have buildings in a feature class and i have a road feature class i want to attach the arrows to the buildings based on the width of the road present ahead of them.

I tried using other methods it didn't worked out.

0 Kudos
DanPatterson_Retired
MVP Emeritus

In that case, if you have so few, just create a new feature class and draw the lines manually would be the quickest.  The other requirements will become evident when you open the aforementioned tools from Arctoolbox

0 Kudos
priyanksameer
New Contributor II

3 was an example,but my data contains 20000 plus buildings and roads present. I have developed many arcGIS models.. but i need some thing to crack the arrow logic.. XY to Line needs table or excel etc not a road feature layer... if i just can have arrows attached to all the buildings and then create an extender model based on buffer??

What do you think?? will that work Dan?

0 Kudos
DanPatterson_Retired
MVP Emeritus

The feature layers all will have tables, into which you can calculate geometry values either through arctoolbox tools or using the field calculator.  So it shouldn't be difficult to get the coordinates you need for the XY to Line tool.  I used that example because when you decide which point to use for your start coordinate of the line to make, it is easy to get the end coordinate.  Perhaps to simplify your situation,  choose the centroid as the start point of your line.... get its coordinates (X, Y) within the same file, get the extent height( in Y direction), then make you Xend, Yend equal to ....

Xend = X

Yend = Y + extent_height + 100

In that way the end of your line should be about 100 m above the polygon extent, with some margin for polygon rotation.

Using the field calculator and the tools is way faster than trying to put together a model which you would have to test anyway, so you may as well do it manually unless you intend to use the model every day.

0 Kudos
SarojThapa1
Occasional Contributor III

Check this link.

playground 

You can replace the current url with the image that symbolizes a vector. 

You will need the module "esri/symbols/PictureMarkerSymbol". 

0 Kudos