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
Hi again,
Just to clear something out, when I said i need the individual of a segment formed by 2 GPS points, I actually "just" need the radius of one curve as a whole and not the radius of 3 GPS points within the same curvature. If the shape of one curve take 100 GPS points, I would need the radius of the curve from its beginning to the end and not for each set of 3 points within that same curve.
Hi Xavier,
Can you post a small subset of your data? Take out any confidential business attributes that you don't want to share.
If you don't want to reveal the actual location of your coordinate, omit the .prj file in you post.
Done, thank you. And to correct what I wrote earlier, there is one point every meter (4 feet)
Hi Xavier,
Attached script to calculate radius of curvature based on the points you select on the layer.
Setup:
Note: CircularRegressionHelper.py is dan's code as is from Circular Regression
This will get you started, but the old version has been modified to deal with real world projected coordinates (ie in the 100,000s and 1,000,000s as would be the case for a UTM projection. the 3 point (aka linear solution) is simply there to provide an estimate of the center of the circle for the non-linear solution. It is the latter that is used to generate the circle. Prior to reporting results, you should test the results against known generated circular arcs with and without scatter normal to the curve but this should get you started.
wow thank you so much for this precious help.
I tried to compare the results from your script and the one I had using the curve calculator (advanced editing tool). To be able to use the curve calculator, I created a line shapefile and made 2 tangents and then drew the chord and then measured the chord and the arc distance between the 2 tangents. I'm well aware that it is very basic and maybe not very acurate but this was all I had before asking for help here and the results I have from your script seems to be similar from the one I had using the curve calculator. Of course, I will need to do more tests in order to see how acurate it is and if this will be enough for our needs (but I'm sure it is) but I wanted to thank you both for your help. I'll come back for a follow-up on my tests results later on.
Edit : Okay now I have different results. It's not per say a different result but rather -it appears- a different scale.
Here is what I have from the curve calculator and what I have using your script
As you can see, I get a radius of 283 using the curve calculator and 0.00270 or 0.00363 using your script. Is it just because of the scale used in your script ? Or is it really a different result ?
Edit2 : Well, now it appears I have a different result. Using the same method, here is what I have. I use the measure tool to measure the arc and chord distances. And of course, the highlighted points are the ones selected for the script. Is it again just the scale ?
Hi Xavier,
Looks like curve calculator is giving results in linear units feet or meter. the script produces results in decimal degrees. You may want to project you points and try again. You can use project tool to project it to your local projected coordinate system
Hello Riyas,
I changed the coordinates to the one I use in a different shapefile which is GCS_WGS_1984 but it doesn't change anything. Should the coordinates be projected instead ? And to be honest, it would be better for our need to have the radius given in meters instead of decimal degrees. Is it something that can be easily modified in the script ?