Select to view content in your preferred language

determine the radius of a curvature from GPS points ?

16656
39
08-28-2014 11:32 AM
xavierberlo
New Contributor

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

Tags (1)
0 Kudos
39 Replies
DanPatterson_Retired
MVP Emeritus

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.

Timothy HalesJim Barry

0 Kudos
xavierberlo
New Contributor

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.

0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos
xavierberlo
New Contributor

Hello Dan,

Message has been sent on your email.

0 Kudos
RiyasDeen
Regular Contributor

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.).

  1. Use Define projection to set coordinate system as WGS 1984 (under Geographic Coordinates -> World)
  2. Use Project tool to project your data to Canada Lambert Conformal Conic (Under Project coordinate -> Continetal -> North America)

Untitled.png

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]])

0 Kudos
DanPatterson_Retired
MVP Emeritus

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.

0 Kudos
xavierberlo
New Contributor

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).

0 Kudos
RiyasDeen
Regular Contributor

Interesting, Can you confirm your shape file XY_Project contains Shape and NoLigne fields?

0 Kudos
xavierberlo
New Contributor

Yes Riyas, it does contain shape (point ZM) and NoLigne (0 to 4863).

Would you like me to send it to you ?

0 Kudos
RiyasDeen
Regular Contributor

Lets make this quick.

Can you install team viewer and share your partner id and password to my email id?

0 Kudos