It turns out that (at least) ArcMap 9.2 provides a pretty simple method to quickly calculate a number of geographic coordinates. A few things are important to consider though:
Converting Polygon to Point data:
Unless you're interested in the locations of polygon boundaries (shorelines, property boundaries, etc. - in which case you will convert the polygon boundaries to nodes), you will want to create a point coverage to represent centroids. Be sure to choose whether that center location will be the true center, or be preserved within the bounds of the polygon:
- Show ArcToolbox in ArcMap (or ArcCatalog)
- Open the Feature to Point tool
(Under Data Management Tools :: Features :: Feature to Point) - Press Show Help to read more about the tool
- Select a polygon or line feature to use as in input featre
- Set an output location and name for the resulting feature class
- Check the "Inside" check box to calculate a centroid within the boundary of a given feature (i.e. a "bent" polygon similar to the shape of Florida can have a centroid in the Gulf of Mexico if "Inside" is not selected)
There is insufficient information on the internets about this process works. There is a simple and automated calculator built into atribute table field calculations. To make this work properly in this situation (calculating geographic latitude/longitude coordinates) the coordinate system must be set to a geographic coordinate system, rather than a projected coordinate system.
Calculating Lat/Long Coordinates:
- Add a point coverage to a project
- Change the data frame to a geographic coordinate system
- Right click on the data frame heading in the table of contents pane and choose Properties
- Navigate to the Coordinate System tab
- Expand the Predefined branch
- Expand the Geographic Coordinate Systems branch
- Expand the North America branch
- Choose North American 1983 HARN and click OK
- Choose Yes if prompted with a coordinate system warning
- Right click on the data frame heading in the table of contents pane and choose Properties
- Open the layer's Attribute Table and add the following fields /types (LONG_DD is indeed string 3, not a typo)
Field Name LATITUDE LONGITUDE LAT_DD LAT_MM LAT_SS LONG_DD LONG_MM LONG_SS DATUM | Type/Length Text (string), 20 Text, 20 Text, 2 Text, 2 Text, 9 Text, 3 Text, 2 Text, 9 Text, 25 |
- Go ahead and calculate "North American 1983 HARN" (or whatever coordinate system you used) in the DATUM field. Whomever uses this data in the future will need to the method used to calculate the units
- Now begin to calculate the units. Right click the LATITUDE field and select Calculate Geometry
- Set the Property to "Select Y Coordinate of Point" (Latitude = y, and Longitude = x)
! Note that Latitude = y and Longitude = x. Usually you'll ask for "x/y coordinates" in geometry class, however surveyors ask for "a northing and an easting" - which flips the order of the x and y values around.
- Select "Use coordinate system of the data frame" to use the geographic coordinate system. After this, the Units will change from various length units of measure (meters, feet, etc.) to a number of DMS choices
- Select "Packed DMS Format (+/- DDD.MMSSssssss")" and hit OK
- Repeat this for LONGITUDE with "Select X Coordinate of Point"
- Use the Field Calculator to populate the remaining fields using the following formulas
- LAT_DD: left([LATITUDE], 2)
- LAT_MM: mid([LATITUDE], 4, 2)
- LAT_SS: right([LATITUDE], 8)/1000000
- LONG_DD: left([LONGITUDE], 3)
- LONG_MM: mid([LONGITUDE], 5, 2)
- LONG_SS: right([LONGITUDE], 8)/1000000
- Finally, be sure to Calculate Geometry again on the LATITUDE and LONGITUDE fields (Using the coordinate system of the data frame) but set the units to Decimal Degrees. Until this is finished, the values look like decimal degrees, but if these coordinates are projected, they will be incorrect - perhaps by a long way. A good trick is to see if any values after the decimal are greater than x.599999. If there are any values between x.6 and x.9, those are indeed decimal degrees.
See also:
Angular Unit Conversion (convert between DD, DMS, and radians)
How To: Populate x, y, or z point data fields of an attribute table
How To: Calculate Latitude and Longitude values using the Field Calculator
12 comments:
thanks a f-n million for posting this! it really saved my ass at work today, since I should know how to do this kinda thing but clearly, I don't. until now!
keep up the good work!
/ Martin, Sweden
thanks a lot man -- could not find this info anywhere!!!
Saweeet! I cant believe my luck, thx, this should be the simplest task...
This is totally brilliant, thanks so much :D :D :D
Thank you for posting this!! It saved me from a whole lot of trouble :)
same as other commenters; this post was super helpful. Thank you for doing ersi's job for them!
Thanks for posting, everyone else had these complicated methods that don't work!
Thanks so much for posting this!!!!!! could not find it anywhere. I just did a task that has been bordering me for so long. Once more thanks.
Thanks, this was really helpful.
cloudbeginners
aws inspector
openshift vs kubernetes
azure data lake
arm templates
azure traffic manager
azure bastion
luxurious property of jaipur
kurti sharara set
traditional kurtis for women
best coaching classes for class 10 in gurgaon
azure expressroute
azure application gateway
azure resource group
azure blueprints
azure firewall
Fairbet7
Fairbet7 id
Post a Comment