get vertex coordinates

8870
12
Jump to solution
02-08-2012 02:43 AM
J_B__K_
New Contributor III
Hi,

it's been a while since my last python scripting - now I need to solve this problem and I'm stuck 😞 I know it is something easy, but I can't make it work, so I'm asking for help... I want to get coordinates (X and Y) of each vertex of line - that is easy with http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Reading_geometries/002z0000001t000000/ - but in every loop I need to get coordinates of next two point as well (for making some calculations) and that is my problem....

Any help with this little problem please?

Thank you so much!

Bart
0 Kudos
12 Replies
J_B__K_
New Contributor III
Very nice - This is actually quite usefull to me - I have done some projects in the past doing network anaylysis on logging roads... And I was looking for a way to apply some factors that would describe how "difficult" the road is to manuver (road type as well as each segment's vertical/horizontal complexity). When I get back to my routing project (months away), I'll try to post some code that uses z values as well. Thanks for posting the code...


Glad you've found it usefull! This is exactly the purpose - to make network analysis more precise by considering road´s "curvature"... I'm focusing on this theme in my diploma thesis...

Thanks for advice with adding and using fields!
0 Kudos
JodieGosselin
New Contributor III
Very nice - This is actually quite usefull to me - I have done some projects in the past doing network anaylysis on logging roads... And I was looking for a way to apply some factors that would describe how "difficult" the road is to manuver (road type as well as each segment's vertical/horizontal complexity). When I get back to my routing project (months away), I'll try to post some code that uses z values as well. Thanks for posting the code...




Hi Chris! Did you ever happen to have time to update the code to take into account Z values?  Thanks!
0 Kudos
ChrisSnyder
Regular Contributor III
Sadly I did not - but it would be pretty easy to include using the code example above.

In fact it could be easier, since all you really would need to calculate is slope of each segment (and then calculate a mean, or max or whatever).

It'd be even cooler to "length weight" the mean angle/slope values too...

You know - an even cooler researchy thing... Go drive around in a car with a GPS (tracking on), and build a data driven model based on actual observations (what exactly is the correlation between geometry complexity and speed). Logging roads would be way more fun than the city... Maybe get a turbo WRX or something to help with the field recon :cool:.
0 Kudos