Hello,
I have a shapefile of gps positions (sucession of points, with X Y Z data) of hundreds of kilometers of road
and I'd like to know if it possible with ArcGis 10 to determine the radius of each curvature.
Example : I have one segment of a road represented by 100 gps points and I'd like to draw the curves and measure the radius of each curvature.
Is there a tool for that ? Or a script ?
I hope I will be able to find the help I need here because I'm lost.
Thank you
The old toolset should only be applied to projected data. There are some issues that were addressed in newer versions which aren't posted anywhere since I am still waiting for ArcScript 2.0 to appear.
Hello,
I read Riyas's message too quickly . Haven't noticed that the coordinates had to be projected. That said, do you know Dan if there is an easy way to change the radius to meters instead of decimal in the script ? Is it even possible ? I've looked on the internet on how to convert the distance from decimal to meters and it seems much harder than I thought it would be. I've even ran into an old thread (2004) where you were already helping others but sadly, it didn't really help.
Take your input file, which I presume is in decimal degrees (aka a GCS geographic coordinate system)
Run the Project Tool on it to produce a NEW file with projected coordinates (for example, project to a UTM projection for your area)
zip and email me a copy of your shapefile for testing purposes. My work email is on my profile. This back and forth stuff trying to get something working that I did 6 or 7 years ago is getting tiring...If I get the chance before classes start, I will test it in the newer version and zip and email you that toolbox and script if you like. Just include an email for yourself in the email you send to me
Hello Dan,
Message has been sent on your email.
Hi Xavier,
I just noted that the coordinate system you have used for your XY shape file is wrong. You have specified a projected coordinate system while your shapes are actually in geographic coordinates.
Please make below correction (you'll need to do this for both your XY and Circle shape file is shared earlier.).
Also please replace lines 79 to 81 in the radius of curvature.py i shared earlier with below. Below code will use coordinates from the shape to calculate radius instead of X, Y field. Attaching radius of curvature.py again with corrections.
with arcpy.da.SearchCursor(lyr, ["SHAPE@XY"], "", "","", ["","ORDER BY NoLigne"]) as cursor:
for row in cursor:
Coords.append([row[0][0], row[0][1]])
I received a data set from Xavier and it was projected into a Canadian MTM zone 8 projection. I haven't checked the file you were using, but the one I have has longitude and Latitude columns in the table, but the file was definitely projected, or he projected it prior to sending it to me.
Morning Riyas,
I did what asked but now I have an issue when I use the script, it tells me
Start Time: Tue Sep 02 08:48:42 2014
Running script curvature...
Failed script curvature...
Traceback (most recent call last):
File "C:\curvature\radius of curvature.py", line 80, in <module>
for row in cursor:
RuntimeError: An invalid SQL statement was used. [SELECT Shape FROM XY_Project ORDER BY NoLigne]
Failed to execute (curvature).
Interesting, Can you confirm your shape file XY_Project contains Shape and NoLigne fields?
Yes Riyas, it does contain shape (point ZM) and NoLigne (0 to 4863).
Would you like me to send it to you ?
Lets make this quick.
Can you install team viewer and share your partner id and password to my email id?