Coordinate Table To Point (Defense)

Summary

Creates a point feature class from coordinates stored in a table.

Usage

  • The output point feature class will contain all fields from the input table.

Parameters

LabelExplanationData Type
Input Table

The table containing the source coordinates.

Table View
Output Point Feature Class

The feature class containing the output point features.

Feature Class
X Field (longitude, UTM, MGRS, USNG, GARS, GEOREF)

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

Field
Input Coordinate Format

Specifies the format of the input table coordinates.

  • Decimal Degrees - One FieldCoordinates will be formatted in a decimal degrees coordinate pair stored in a single field with coordinates separated by a space, comma, or slash.
  • Decimal Degrees - Two FieldsCoordinates will be formatted in a decimal degrees coordinate pair stored in two table fields. This is the default.
  • Degrees and Decimal Minutes - One FieldCoordinates 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.
  • Degrees and Decimal Minutes - Two FieldsCoordinates will be formatted in a degrees and decimal minutes coordinate pair stored in two table fields.
  • Degrees, Minutes, and Seconds - One FieldCoordinates 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.
  • Degrees, Minutes, and Seconds - Two FieldsCoordinates will be formatted in a degrees, minutes, and seconds coordinate pair stored in two table fields.
  • Global Area Reference SystemCoordinates will be formatted in Global Area Reference System.
  • World Geographic Reference System Coordinates will be formatted in World Geographic Reference System.
  • Universal Transverse Mercator BandsCoordinates will be formatted in Universal Transverse Mercator coordinate bands.
  • Universal Transverse Mercator ZonesCoordinates will be formatted in Universal Transverse Mercator coordinate zones.
  • United States National GridCoordinates will be formatted in United States National Grid.
  • Military Grid Reference SystemCoordinates will be formatted in Military Grid Reference System.
String
Y Field (latitude)
(Optional)

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

The Y Field (latitude) parameter is used when the Input Coordinate Format parameter is set to Decimal Degrees - Two Fields, Degrees and Decimal Minutes - Two Fields, or Degrees Minutes and Seconds - Two Fields.

Field
Input Coordinate System
(Optional)

The spatial reference of the output feature class. The default is GCS_WGS_1984.

Spatial Reference

arcpy.defense.CoordinateTableToPoint(in_table, out_feature_class, x_or_lon_field, in_coordinate_format, {y_or_lat_field}, {coordinate_system})
NameExplanationData Type
in_table

The table containing the source coordinates.

Table View
out_feature_class

The feature class containing the output point features.

Feature Class
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 output feature class. The default is GCS_WGS_1984.

Spatial Reference

Code sample

CoordinateTableToPoint example 1 (Python window)

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

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

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

# Description: Create points from tabular data and create buffers around them.

# Import system modules
import arcpy

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

# Create points
input_table = r"C:/CSV/TableToPoint.csv"
result_point = "Output_Point"
arcpy.CoordinateTableToPoint_defense(input_table, result_point, "x", "DD_2", "y")

# Create buffers
result_buffer = "Output_Buffer"
arcpy.Buffer_analysis(result_point, result_buffer, "50 Meters")