Clip shapefile by envelope


PurposeThis sample's purpose is to show pure ArcGIS Engine developers how to accomplish basic geoprocessing tasks using ITopologicalOperator. Applications like this are suitable for batch driven processing. The application takes a source shapefile and the extents of a clipping envelope. These are used to export the features inside the clipping envelope to a newly created shapefile.

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 with valid data for the following parameters: input shapefile and output shapefile.
  2. A new shapefile of the clip will be created.

Additional information

Parameters for the envelope have been hardcoded. To use a different envelope, edit the following lines from the top of ClipShapefileByEnv.cpp:
 
double xMin = -130.0;
double xMax = -114.0;
double yMin = 31.0;
double yMax = 41.5;


ClipShapefileByEnv.h Header file
ClipShapefileByEnv.cpp Implementation file
LicenseUtilities.h Licensing header file
LicenseUtilities.cpp Licensing 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




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime