Converting azimuth from degrees to radians using Field Calculator; only zeros show up.

4908
16
Jump to solution
10-02-2018 10:11 PM
RachelDiPietro
New Contributor II

I am attempting to convert the azimuth field in a shapefile from degrees to radians using the Field Calculator, but after providing the equation, all the attributes in the new field show up as zero. Equation is [azimuth]*(pi/180). I also tried the calculation using the approximate decimal value of pi/180 and got the same result.

Attached are screenshots of the dialogue window and the problem with the zeros in the attribute table.

Is there a way to fix this without having to use Python or R, and if so how?

Any help would be greatly appreciated!

0 Kudos
16 Replies
RachelDiPietro
New Contributor II

It worked!

Thank you so much for all your help!

Best,

Rachel DiPietro

0 Kudos
DanPatterson_Retired
MVP Emeritus

Rachel... glad it worked out

0 Kudos
RachelDiPietro
New Contributor II

Whoops. Looks like I had forgotten the switch to Python parser. My apologies for the inconvenience!

Thank you again!

0 Kudos
RachelDiPietro
New Contributor II

Now there is a new error...

The syntax worked for the first two data sets out of seven after switching to 'Double' fields, but now I am getting this:

I have tried each of the syntax examples provided, exactly as they are with my field name. I changed none of the syntax from the first two datasets that did work vs the two I am working on now that don't work, and yet I received a general syntax error.

0 Kudos
DanPatterson_Retired
MVP Emeritus

If the inputs aren't numeric (ie numbers) then Double won't work.  And the error is less important to me than showing the table and the inputs to the field calculator

0 Kudos
RachelDiPietro
New Contributor II

It was the parser. I had Python code on a VB Script. Working fine now.

Thank you again!

0 Kudos
DanPatterson_Retired
MVP Emeritus

progress on multiple fronts... that is good

0 Kudos