Convert Points To Lat/Long

8755
9
Jump to solution
07-31-2017 07:05 PM
MattDawson1
New Contributor II

I’m new to GIS. Using ArcGIS Pro 2.0.0. Here is what I am looking to accomplish:

 

I’m having trouble locating the correct process on how to do step 3, and I’m looking for some tips on how to accomplish this.

 

Thanks in advance for any help and/or resources you could point me towards.

1 Solution

Accepted Solutions
MattDawson1
New Contributor II

Using Rebecca's tip helped me get the desired output. I ran the “Feature To Point” process as outlined above, then ran the “Convert Coordinate Notation” tool (with the point layer as the input table) with “Shape” as the input coordinate format and “DD numeric” as the output format.

I went this route because I kept getting errors when trying to use the Convert Coordinate Notation step on the geometry attribute data.

Thank you to both of you for your help. It is great to have individuals like yourself here to help newcomers like me.

View solution in original post

9 Replies
DanPatterson_Retired
MVP Emeritus

You can use Add Geometry Attributes to get the coordinates of the centroids of a polygon file directly.  You can specify native units or units of the data frame.  Just saves a step... then export the table using the Table to Excel tool to finish up

MattDawson1
New Contributor II

Dan,

Thanks for the reply! When used "Add Geometry Attributes" I got the following failed process message. I can see the issue is around permissions, but I don't know what that exactly means or how to resolve it.

Failed script AddGeometryAttributes...
Traceback (most recent call last):
  File "c:\users\tmk\appdata\local\programs\arcgis\pro\Resources\ArcToolbox\Scripts\AddGeometryAttributes.py", line 376, in <module>
    addGeomAtts.execute()
  File "c:\users\tmk\appdata\local\programs\arcgis\pro\Resources\ArcToolbox\Scripts\AddGeometryAttributes.py", line 73, in execute
    self.updateCursorFields = ucur.fields
RuntimeError: The user does not have permission to execute the operation. [Update capability is not set]
Failed to execute (AddGeometryAttributes).

Any suggestions on what I might have to do to fix this?

0 Kudos
DanPatterson_Retired
MVP Emeritus

Matt

Well the tool is available at all license levels... so it must be the location of the file that is the issue.  Export to a new featureclass in a new geodatabase in a short simple, local folder.. or to a shapefile, then try again.  There is an off chance that there are some fields that are write protected.. check those in properties of the table.

MattDawson1
New Contributor II

Dan,

It worked when I referenced a file located on my desktop. I was originally referencing a file on the ArcGIS portal. Thanks for the tip.

One final question on the outputs: I am accustomed to seeing lat/long in a specific format. Near the top of the image below I see what I am accustomed to: 87.9460361 W, 41.8607206 N. Why do I see significantly different numbers under the X & Y values below? I'm sure it is a logical reason, but I don't understand it. Is there a way to convert these X/Y values to what I am used to seeing and/or is there a setting I should select when running the Geometry Attribute script?

I want to take the output of this table into another application, and I think I need the lat/long in a format like the W and N numbers above.

Thanks again for your help. It is much appreciated!Add Geography Attributes Output

0 Kudos
DanPatterson_Retired
MVP Emeritus

Those are projected coordinates.  I suspect that they might be Web Mercator (commonly used).  If your data files are in geographic coordinates (aka, long/lat), then make sure you specify to use the 'native' or coordinates of the data rather than the data frame.

RebeccaStrauch__GISP
MVP Emeritus

You can also look at Convert Coordinate Notation—Data Management toolbox | ArcGIS Desktop   to convert to a number of different formats.

MattDawson1
New Contributor II

Using Rebecca's tip helped me get the desired output. I ran the “Feature To Point” process as outlined above, then ran the “Convert Coordinate Notation” tool (with the point layer as the input table) with “Shape” as the input coordinate format and “DD numeric” as the output format.

I went this route because I kept getting errors when trying to use the Convert Coordinate Notation step on the geometry attribute data.

Thank you to both of you for your help. It is great to have individuals like yourself here to help newcomers like me.

RebeccaStrauch__GISP
MVP Emeritus

Happy to hear it is working for you.  Make sure to mark one of the answers as correct (Dan's, or your summary) to close the thread.

I should mention on more thing (a couple bugs) I found with the Convert Coordinate Notation with ArcMap 10.3.1...and is supposed to be fixed in 10.4/10.5.x, so my guess it is not a problem in Pro...but you may want to check.

BUG-000092962 : Convert Coordinate Notation tool does not apply the specified Geographic Transformation from the Environments > Output Coordinates setting.
BUG-000092945 : Convert Coordinate Notation tool truncates decimal degree values to 4 or 5 decimal places. This results in data that is 2 1/2 meter away from the original data.

I was doing a lot of coordinate manipulation/conversion etc., so chances are you would not see it anyway...but thought I would mention it in case your spot checks are off a bit.

just an fyi.

0 Kudos
MargaretMaher
Esri Contributor

The easiest way to do this is to go to View > Data Frame Properties > Coordinate System tab.  Open Geographic Coordinate Systems > North America, and select "NAD 1983" with nothing after it, for example.  Click Apply and OK, and set the Geographic Transformation if one is needed.  Open the Attribute table for the point layer, and add two fields, named X_DD and Y_DD for example, defined as Double fields.  Select the X_DD field, and using the Calculate Geometry tool, calculate the X-coordinate in the Coordinate System of the ArcMap Data Frame.  Using the same tool calculate the Y-coordinate, also in the coordinate system of the Data Frame.

Incidentally, the above coordinates cannot be in Web Mercator.  Mercator coordinates are negative in X (Longitude) in North America.  those values are either StatePlane or UTM coordinates, because both X and Y are positive numbers.

You might want to check out my book, "Lining up data in ArcGIS: a guide to map projections" which is available from Esri Press or from Amazon or other booksellers.  Disclaimer - I am an Esri employee and do not receive royalties on the sale of the book.

Margaret Maher 

Senior Support Services Analyst