Sunday, 19 May 2019

arcgis desktop - Converting Direction Of Travel OSM vectors from "system" to another?


I have a painful doubt according Direction of Travel (DOT) vectors in OSM data. I'm using ArcGIS10, and a OSM data shapefile.



I have a OSM road layer, that has many "Both ways" vectors and many "One way". I'll consider only One way for my study.


Its DOT was performed as it was created the vector in its origin: The DOT is set from the start point of the vector to its finishing point.


But, I want to change this system to mine, which is:



  • Each vector has a Reference Node and a Non-Reference Node.

  • The Reference Node is the southernmost node and if the latitudes of both end nodes are identical and their longitudes differ, the Reference Node is the westernmost node.


An example:


Example


So, if I have a One way vector, I'm going to add its DOT with a letter T if it goes to the Reference Node or with a letter "F" to the Non-Ref node. An example:



Example DOT


Considering that OSM one way vectors are set in another "system", how can I have it into my system?



Answer



I tried the angle system of ChrisW, and it works!


I computed the bearing for each line, coded each bearing as: NE - NW - SE - SW in another field. Then flipped it, if there was a -1 on its "one way" attribute field, and voilĂ , there you have!!.


Here is an example:


Example


All I need now is to know how to compare automatically. I have thought about it, but I'm not getting any ideas. I have proposed in another question: Here the link


This comparison is not as simple as I thought.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...