More

Adding new record with specific coordinates into shapefile using ArcGIS for Desktop?

Adding new record with specific coordinates into shapefile using ArcGIS for Desktop?


I need to create a new point record in my shapefile. When I use the Create Features tool in the Editor tool, I can click anywhere on my map to create a point, but when I go into the attribute table to change the point to exact lat/long I want, the point does not move to those coordinates.

Any ideas on how to add a point record into my shapefile with a specific lat/long properly?


The location coordinates of your feature are stored in a geometry/shape field in the attribute table, not a text readable field you can adjust. You can store the coordinates as attributes, but they won't actually control where the point is.

There are a few ways to address this:

  • First, you could just make a table/spreadsheet/csv of your coordinate pairs. Add the table to the map, right-click on it and select Display XY Data or use the Make XY Event Layer command on that table, then export the results to a feature class.
  • Second, you could actually create the point at the desired coordinate to start - rather than clicking to place the point, right-click and choose the Absolute X,Y option, which will allow you to type in the specific values (using the current CRS) at which to create the point.
  • Third, if you've already created the point and want to move it, you can double-click the point you wish to move, then right-click and choose the Move To option in a similar fashion to enter the specific coordinates you want to move the point to.

The coordinates in the attribute table are numeric values that are not linked with the geometry.

If you want to create a large number of points with exact coordinates, I suggest that you create a table with those coordinates, then use create an XY table event that you can merge with your existing shapefile.

If you need to move just a few points, then there is anonther icon just next to the one for editing attribute table (in the editor toolbar). This will allow you to update the coordinates of your vertices.

Finally, you can press F6 during edit to enter a point with absolute coordinates.


For individual points, if you've already created the attributes in the table, you can assign geometry by selecting the entry and using the replace geometry tool in the advanced editing tool bar. (Start editing the feature and select the template in create features window.)

Create the point using snap to vertices if relevant. Alternatively, move it to an absolute reference by right clicking with the Edit Vertices selection tool and selecting 'move to'.


Creating a new shapefile

You can create new shapefiles in ArcCatalog or by using the Create Feature Class tool. When you create a new shapefile, you must define the types of features it will contain, whether those features will represent routes (m-values), and whether those features will be three-dimensional (z-values). These properties can't be modified after the shapefile has been created. You can also define the coordinate system of the shapefile. If you choose to define the shapefile coordinate system later, it will be classified as Unknown until then.

The process of defining the new shapefile's attributes is separate from creating the shapefile itself. After creating the item, define its attributes by right-clicking it in ArcCatalog and clicking Properties. Because it must contain at least one attribute column, ArcCatalog adds a default column to the shapefile when it is created. For shapefiles, an integer column named Id is added as an attribute. Add the appropriate attributes to your shapefile. After the new attributes have been added as part of the shapefile, you can delete the default column if you decide you don't want to use it.

  1. Select a folder or folder connection in the Catalog tree.
  2. Click the File menu, point to New , then click Shapefile .
  3. Click in the Name text box and type a name for the new shapefile.
  4. Click the Feature Type drop-down arrow and click the type of geometry the shapefile will contain.
  5. Click Edit to define the shapefile's coordinate system.
  6. Select, import, or define a new coordinate system.

It's highly recommended that you define the shapefile's coordinate system now however, you can postpone this step until a later time. For more information, see Fundamentals of a shapefile's coordinate system.


Steps for adding x,y data as a layer

  1. Click File > Add Data > Add XY Data .
  2. Select the table that contains x,y coordinate data.
  3. Identify the columns that hold the x- and y-coordinates (and, optionally, the z-coordinate).
  4. Specify the coordinate system.

You can also add x,y data in tables as a new feature class using geoprocessing.

As an alternative, you can use the Catalog window to select the table that contains the x,y columns and create a feature class.


Add a shapefile to the map

You can access a shapefile in ArcGIS Pro using a folder connection in the Catalog pane.

  1. Add a connection to a folder.
  2. Browse to the location of the shapefile within the folder connection.
  3. Right-click the shapefile and select Add to Current Map to add the shapefile to the current map.

Alternatively, you can click Add Data on the Map tab on the ribbon and browse to the shapefile location.


Shapefile file extensions

Shapefiles are a simple, nontopological format for storing the geometric location and attribute information of geographic features. A shapefile is one of the spatial data formats that you can work with and edit in ArcGIS.

The shapefile format defines the geometry and attributes of geographically referenced features in three or more files with specific file extensions that should be stored in the same project workspace. They are:

  • .shp—The main file that stores the feature geometry required.
  • .shx—The index file that stores the index of the feature geometry required.
  • .dbf—The dBASE table that stores the attribute information of features required.

There is a one-to-one relationship between geometry and attributes, which is based on record number. Attribute records in the dBASE file must be in the same order as records in the main file.

Each file must have the same prefix, for example, roads.shp, roads.shx, and roads.dbf.

When viewing shapefiles in ArcCatalog (or any ArcGIS application), you will only see one file representing the shapefile however, you can use Windows Explorer to view all the files associated with a shapefile. When copying shapefiles, it is recommended that you do so in ArcCatalog or by using a geoprocessing tool. However, if you do copy a shapefile outside ArcGIS, be sure to copy all the files that make up the shapefile.


You'll set a visibility range for the layer so the huts don't display at small scales. You'll also set scale-based sizing for the layer so the symbols get larger as you zoom in. Finally, you'll choose a symbol that shows up well on the imagery basemap.

  1. In the Contents pane, click the Lodgings layer to select it if necessary. On the ribbon, under Feature Layer , click the Appearance tab.
  2. In the Visibility Range group, click the drop-down arrow next to Out Beyond and click 1:500,000 .

If 1:500,000 is not in the drop-down list, type the value directly into the input box or choose a different value.

The Symbology pane appears and displays options to format point symbols.

A slider appears under the Size property. It has two size stops (short vertical bars) that represent the minimum and maximum map scales for which symbol sizes can be set.

The first stop is set at 1:500,000. This is the smallest scale at which the layer is visible because of your visibility range setting.

This stop is set at 1:1,000, the largest scale to which you can assign a symbol size. You can zoom in closer than 1:1,000 on the map, but the symbol size won't increase. The second stop is currently selected (blue). Above the slider, the size value for the selected stop is 10 pt.

This will be the maximum size of your symbol.

When the map scale is 1:500,000, the Lodgings symbol will be 2 points in size. As you zoom in, the symbol size will gradually increase until it reaches a maximum size of 12 points.

At the current map scale, the symbol outline may not be noticeable.

In ArcGIS Pro , thin lines are simulated with transparency when antialiasing is turned on (as it is by default). If you need to see a thin line, such as a symbol outline, at all scales, turn off antialiasing.

The map zooms out to a regional scale and the symbols do not display on the map.

The layer displays and the features appear at their minimum size.


Import tables

You can import tables into a geodatabase using the context menu in the Catalog pane. dBASE, INFO, vector product format (VPF), OLE DB, or geodatabase tables can all be imported in this way. You have two options for importing tables when you right-click a geodatabase:

  • Table —Convert an input table to a dBASE table, a file geodatabase, a mobile geodatabase or enterprise geodatabase table using the Table To Table tool.
  • Table(s) —Import one or more tables into a file, mobile or enterprise geodatabase using the Table To Geodatabase tool.

When you import several tables at the same time with the Table To Geodatabase tool, each table imports into a new table. The tool automatically corrects any illegal or duplicate field names.


First, load up an instance of ArcMap or ArcCatalog. From the toolbar, select the ArcToolbox icon to pull up the ArcToolbox window. This is the icon that has a red toolbox.

Next, navigate through the options in the ArcToolbox window. First click on the “+” sign to the left of the “Data Management Tools” to open up the options. Then click on the “+” sign to the left of the “Features” toolset. Finally, click on the “Add XY Coordinates” tool.

This will bring up the Add XY Coordinates window. If you are working in ArcMap and have the data layer already loaded, then select the layer from the drop down list. Otherwise, if you need to load the layer or are accessing the tool from ArcCatalog, then select the folder icon and navigate to the directory on your computer or server where the GIS dataset is stored. Then hit the “OK” button to start the process.

In the lower right hand corner of ArcMap or ArcCatalog, the status of the process will show. Depending on the size of your GIS data file, this process will take anywhere from a few seconds to a few minutes.

Once the process has run, you can examine the added information by right clicking on your data layer and selecting”Load Attributes” (if loaded into ArcMap) or by selecting the layer in ArcCatalog and clicking on the preview tab and then selecting “table” as the viewing option.

Appending to the last columns of your attribute field will be three fields: Point_X (containing the X coordinates), Point)_Y (containing the Y coordinates), and Point_Z (usually empty unless the data set is enabled with elevation (z) values).


Adding New X/Y Data to a Map Layer

If you want to create new XY coordinate points in a Map Project, you will need to first create a new Shapefile (a kind of Map Layer) in ArcCatalog. It is best to create this new Shapefile as part of a Personal Geodatabase for your Map Project.

Create a New Point Shapefile Map Layer

  1. Open ArcCatalog
  2. Navigate to your Geodatabase. Right click on the title of your Personal Geodatabase, and chooose New --> Feature Class.
  3. Name the new Shapefile.
  4. Provide a shortned version of the name in the Alias field
  5. In the Type drop down list, choose Point Features. Click Next.
  6. In the New Feature Class dialog box, you will next set the Coordinate System for the new Shapefile. To make sure that the Shapefile you are creating has the same Coordinate System as the other Map Layers in your Map Project, you can import the Coordinate System of another Map Layer from your Project.
  7. In the New Feature Class dialog box, click the Import button. If the Look In: area of the dialog box does not display the Personal Geodatabase for your Map Project, navigate to your Map Project's Personal Geodatabase.
  8. Highlight one of the Map Layers in the Personal Geodatabase. Click Add. The name of the Coordinate System will now display in the Name area of the New Feature Class dialog box.
  9. Click Next. Make sure the box is checked next to Accept Default Resolution. Click Next.
  10. Click Finish.

The new Shapefile should display in your Personal Geodatabase.


Syntax

The table containing the fields with coordinate notations to convert.

The output feature class of points. The attribute table will contain all fields of the input table along with the fields containing converted values in the output format.

A field from the input table containing the longitude value. For DD_2, DDM_2, and DMS_2, this is the longitude field.

For DD_1, DDM_1, DMS_1, GARS, GEOREF, UTM, USNG, and MGRS, this is the field containing both latitude and longitude.

A field from the input table containing the latitude value. For DD_2, DDM_2, and DMS_2, this is the latitude field. This parameter is ignored for DD_1, DDM_1, DMS_1, GARS, GEOREF, UTM, USNG, and MGRS.

Coordinate format of the input fields. The default is DD_2.

  • DD_1 — Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
  • DD_2 — Longitude and latitude values are in two separate fields.
  • DDM_1 — Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
  • DDM_2 — Longitude and latitude values are in two separate fields.
  • DMS_1 — Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
  • DMS_2 — Longitude and latitude values are in two separate fields.
  • GARS — Global Area Reference System. Based on latitude and longitude, it divides and subdivides the world into cells.
  • GEOREF — World Geographic Reference System. A grid-based system that divides the world into 15-degree quadrangles and then subdivides into smaller quadrangles.
  • UTM — Based on the Universal Transverse Mercator projection. It divides the world into 6-degree slices of longitude, which are divided into 20 latitude bands. These grids are further described using eastings and northings to locate any point within the grid.
  • USNG — United States National Grid. Almost exactly the same as MGRS but uses North American Datum 1983 (NAD83) as its datum.
  • MGRS — Military Grid Reference System. Follows the UTM coordinates and divides the world into 6-degree longitude and 20 latitude bands, but MGRS then further subdivides the grid zones into smaller 100,000-meter grids. These 100,000-meter grids are then divided into 10,000-meter, 1,000-meter, 100-meter, 10-meter, and 1-meter grids.
  • SHAPE — Only available when a point feature layer is selected as input. The coordinates of each point are used to define the output format.

DD, DDM, and DMS are also valid keywords they can be used just by typing in (on dialog) or passing the value in scripting. However, keywords with underscore and a number tell whether the values are coming from one field or two fields.

Coordinate format to which the input notations will be converted. The default is DD_2.

  • DD_1 — Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
  • DD_2 — Longitude and latitude values are in two separate fields.
  • DDM_1 — Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
  • DDM_2 — Longitude and latitude values are in two separate fields.
  • DMS_1 — Both longitude and latitude values are in a single field. Two values are separated by a space, a comma, or a slash.
  • DMS_2 — Longitude and latitude values are in two separate fields.
  • GARS — Global Area Reference System. Based on latitude and longitude, it divides and subdivides the world into cells.
  • GEOREF — World Geographic Reference System. A grid-based system that divides the world into 15-degree quadrangles and then subdivides into smaller quadrangles.
  • UTM — Based on the Universal Transverse Mercator projection. It divides the world into 6-degree slices of longitude, which are divided into 20 latitude bands. These grids are further described using eastings and northings to locate any point within the grid.
  • USNG — United States National Grid. Almost exactly the same as MGRS but uses North American Datum 1983 (NAD83) as its datum.
  • MGRS — Military Grid Reference System. Follows the UTM coordinates and divides the world into 6-degree longitude and 20 latitude bands, but MGRS then further subdivides the grid zones into smaller 100,000-meter grids. These 100,000-meter grids are then divided into 10,000-meter, 1,000-meter, 100-meter, 10-meter, and 1-meter grids.

DD, DDM, and DMS are also valid keywords they can be used just by typing in (on dialog) or passing the value in scripting. However, keywords with underscore and a number tell whether the values are coming from one field or two fields.

Any field from the input table. The selected field will be copied to the output table. If the values of this field are unique, this may be used to join the output records back to the input table.

Spatial reference of the output point feature class. The default is GCS_WGS_1984.

If the output has a different coordinate system than the input, then the tool projects the data. If the input and output are in different datum, then a default transformation is calculated based on the coordinate systems of the input and the output, and the extent of the data.