Update features using an updated cursor


PurposeThe code is a good example of an update feature cursor, which maximises update performance on simple datasets. In this example, the X, Y coordinates of the geometry of point features in a shapefile are written to new fields on the shapefile. While this sample works on shapefiles, it can easily be modified to work with simple geodatabase feature classes.

How to use

If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Run the application, passing in the full path to an input shapefile as the parameter.

Additional information

WARNING: this will modify the input shapefile.

AddXY.h Header file
AddXY.cpp Implementation file
LicenseUtilities.h License header file
LicenseUtilities.cpp License implementation file
PathUtilities.h Path parsing header file
PathUtilities.cpp Path parsing implementation file
Makefile.Windows Windows Makefile
Makefile.Solaris Solaris Makefile
Makefile.Linux Linux Makefile
Download the CPP files

Download the files for all languages




Additional Requirements
  • a feature dataset

Development licensing Deployment licensing
Engine Developer Kit Engine