Create a shapefile from a text file with XY values


Purpose
This sample demonstrates how to create a points shapefile from a text file that contains latitude, longitude, and value pairs. The text file contains one pair per line, and each latitude, longitude, and value data item is separated by white space (for example, tab delimited).

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Run the application. Since this is a command-line application, you can use Ant to run it, you can execute its Java Archive (JAR) file from the command line, or you can use your integrated development environment (IDE) to compile and run it. As with all other samples, it requires no arguments to run.
  2. This application prints each point feature's location and the value of the value field that was created and stored for each one.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

geodatabase/CreateShapefile.java Main class.




Additional Requirements
  • A text file with each point on a separate line and tab-delimited values for the longitude, latitude, and value of each point.

Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic