How to automatically calculate the angle between two intersecting polylines

16077
33
Jump to solution
05-01-2016 02:43 PM
FatmaŞenol
Occasional Contributor II

Hello,

I have 52338 polygons which needs to be edited using the following rules;

The distance between the intersection point and the closest vertices on two  intersecting

polylines should be at least 1.2 meter as shown below. On the  other hand the distance

between two closest vertices should not be less than 2 meters. What I'm trying to do is

automatically calculate  the optimum angle angle between two polylines to meet the given

two rules as I explained above.

Intersection.jpg

ArcGIS Desktop doesn't have such built-in tool to calculate the angle as far as I know.

Is there any tool or script that you could suggest ?  If there is no such solution it would

also be great, to select vertices which are  2 meters apart from the intersection point.

I will be grateful for any help you could provide.

Regards

0 Kudos
33 Replies
FatmaŞenol
Occasional Contributor II

Hello,

I want to thank you Dan Patterson and  Wes Miller for their extremely helpful  suggestions and comments.

I couldn't find `find angle` tool without Dan's help. I can't thank you enough  both of you for your help

Regards

0 Kudos
WesMiller
Regular Contributor III

I remember the tool would do give false results if the buffers would overlap. Have you tried setting the buffer size smaller? You'll need to change the buffer and change the distance in the generate near table to solve. That was one of the differences between my solution and Darren Wiens solution. If you run the model from edit you should be able to add the buffers and show the buffers and see the overlaps

0 Kudos
FatmaŞenol
Occasional Contributor II

No, I haven't tried setting the buffer size smaller but I will try and get back to you as soon as possible. Thank you.

0 Kudos
FatmaŞenol
Occasional Contributor II

Hello,

I tried smaller buffer size (0.5 meters) and there are still some false results If I'm not mistaken.

The attached screenshot shows a part of the resulting layer. I took the screenshot of each

step I followed and they are available for your review at  the following URL:

Find_Angle . Thank you for your attention to this matter.

Result.jpg

0 Kudos
WesMiller
Regular Contributor III

Did you change the distance in both places

0 Kudos
FatmaŞenol
Occasional Contributor II

Thank you for your reply. Yes, I changed the distance in both places. However, I need  to double check and re-run the model

to be sure.

0 Kudos
FatmaŞenol
Occasional Contributor II

I changed the distance in both places and re-run the model. 322 intersections out of 9803 were selected. Red points show where the near angle is between 20 and 30 degrees. I'm a little bit confused about false results. I attached the screenshots for your review.

Distance.jpg

near_table.jpg

Result.jpg

0 Kudos
WesMiller
Regular Contributor III

Could you upload a sample of data? Where some false results are being returned.

FatmaŞenol
Occasional Contributor II

Thank you for your kind reply. You can download the data set at the following URL:

Dropbox - Dataset.gdb.rar

0 Kudos
FatmaŞenol
Occasional Contributor II

Did you have a chance to look at the data set I uploaded ?

0 Kudos