Generate Coordinate Notations (Defense)

Summary

Converts source coordinates in a table to multiple coordinate formats.

The tool uses an input table with coordinates and outputs a new table with fields for the following coordinate formats: Decimal Degrees, Degrees and Decimal Minutes, Degrees Minutes and Seconds, Global Area Reference System, World Geographic Reference System, Universal Transverse Mercator, United States National Grid, and Military Grid Reference System.

Usage

  • The output table maintains the original fields of the input table and adds text fields for the converted notations, including the following:

    • DDLat—Decimal Degrees latitude field
    • DDLon—Decimal Degrees longitude field
    • DDMLat—Degree and Decimal Minutes latitude field
    • DDMLon—Degree and Decimal Minutes longitude field
    • DMSLat—Degrees, Minutes, and Seconds latitude field
    • DMSLon—Degrees, Minutes, and Seconds longitude field
    • UTM_BANDS—Universal Transverse Mercator Bands
    • MGRS—Military Grid Reference System
    • USNG—United States National Grid
    • GARS—Global Area Reference System
    • GEOREF—World Geographic Reference System

Syntax

GenerateCoordinateNotations(in_table, out_table, x_or_lon_field, in_coordinate_format, {y_or_lat_field}, {coordinate_system})
ParameterExplanationData Type
in_table

The table containing the source coordinates.

Table View
out_table

The output table containing the converted coordinates.

Table
x_or_lon_field

The field in the input table containing the x or longitude coordinates.

Field
in_coordinate_format

Specifies the format of the input table coordinates.

  • DD_1Coordinates will be formatted in a decimal degrees coordinate pair stored in a single field with coordinates separated by a space, comma, or slash.
  • DD_2Coordinates will be formatted in a decimal degrees coordinate pair stored in two table fields. This is the default.
  • DDM_1Coordinates will be formatted in a degrees and decimal minutes coordinate pair stored in a single table field with coordinates separated by a space, comma, or slash.
  • DDM_2Coordinates will be formatted in a degrees and decimal minutes coordinate pair stored in two table fields.
  • DMS_1Coordinates will be formatted in a degrees, minutes, and seconds coordinate pair stored in a single table field with coordinates separated by a space, comma, or slash.
  • DMS_2Coordinates will be formatted in a degrees, minutes, and seconds coordinate pair stored in two table fields.
  • GARSCoordinates will be formatted in Global Area Reference System.
  • GEOREF Coordinates will be formatted in World Geographic Reference System.
  • UTM_BANDSCoordinates will be formatted in Universal Transverse Mercator coordinate bands.
  • UTM_ZONESCoordinates will be formatted in Universal Transverse Mercator coordinate zones.
  • USNGCoordinates will be formatted in United States National Grid.
  • MGRSCoordinates will be formatted in Military Grid Reference System.
String
y_or_lat_field
(Optional)

The field in the input table containing the y or latitude coordinates.

The y_or_lat_field parameter is used when the in_coordinate_format parameter is set to DD_2, DDM_2, or DMS_2.

Field
coordinate_system
(Optional)

The spatial reference of the coordinates in the output table. The default is GCS_WGS_1984.

Spatial Reference

Code sample

GenerateCoordinateNotations example 1 (Python window)

The following Python window script demonstrates how to use the GenerateCoordinateNotations function.

import arcpy
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.GenerateCoordinateNotations_defense(r"C:/CSV/TableToPoint.csv", 
                                          "TableWithMGRS", "x", "DD_2", "y")
GenerateCoordinateNotations example 2 (stand-alone script)

The following example uses the GenerateCoordinateNotations function in a sample workflow script.

# Description: Add additional coordinate fields to data and then create points 
#              from output table.

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.env.overwriteOutput = True

# Add additional coordinate formats
in_coords = r"C:/CSV/TableToPoint.csv"
out_table = "TableWithMGRS"
arcpy.GenerateCoordinateNotations_defense(in_coords, out_table, "x", "DD_2", "y")

# Create points
result_point = "Output_Point"
arcpy.CoordinateTableToPoint_defense(out_table, result_point, "MGRS", "MGRS")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics