[GIS] Convert Longitude and Latitude values from database to Decimal Degrees

arcgis-desktopcoordinatesexcel

I am getting data from a SQL Server, with values for longitude and latitude stored as "raw" values i.e. there are no negative signs in front of longitudes, and no decimals in either longitudes or latitudes. For example, a point in Colorado is given long/lat values in the database as:

Longitude: 104905936 Latitude: 3980741

These should be: -104.905936 and 39.80741

Is there a way to change these values within ArcMap after I bring the table in as a database file? If this must be done in Excel, can anyone recommend an efficient way of adding the negative sign and the decimal point in the correct spots?

Best Answer

the easiest way in ArcMap if all your digits are formatted (9 and 8 digits, in other words 6 decimal places) is to use the field calculator(with Python syntax below) :

!longitude!/(-1000000)

!latitude!/(1000000)

just make sure that they are stored in new fields of "float" type, otherwise they will be rounded to the closest integer.

Related Question