com.vividsolutions.jump.io
Class ShapefileReader

java.lang.Object
  extended by com.vividsolutions.jump.io.ShapefileReader
All Implemented Interfaces:
JUMPReader

public class ShapefileReader
extends java.lang.Object
implements JUMPReader

ShapefileReader is a JUMPReader specialized to read Shapefiles.

DataProperties for the JUMPReader load(DataProperties) interface:

ParameterMeaning
InputFile or DefaultValue File name for the input .shp file
NOTE: The input .dbf is assumed to be 'beside' (in the same directory) as the .shp file.
CompressedFile File name (.zip NOT a .gz) with a .shp and .dbf file inside
Uses a modified version of geotools to do the .dbf and .shp file reading. If you are reading from a .zip file, the dbf file will be copied to your temp directory and deleted after being read.


Field Summary
static java.lang.String COMPRESSED_FILE_PROPERTY_KEY
           
static java.lang.String DEFAULT_VALUE_PROPERTY_KEY
           
static java.lang.String FILE_PROPERTY_KEY
           
 
Constructor Summary
ShapefileReader()
          Creates new ShapeReader
 
Method Summary
 FeatureCollection read(DriverProperties dp)
          Main method to read a shapefile.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE_PROPERTY_KEY

public static final java.lang.String FILE_PROPERTY_KEY
See Also:
Constant Field Values

DEFAULT_VALUE_PROPERTY_KEY

public static final java.lang.String DEFAULT_VALUE_PROPERTY_KEY
See Also:
Constant Field Values

COMPRESSED_FILE_PROPERTY_KEY

public static final java.lang.String COMPRESSED_FILE_PROPERTY_KEY
See Also:
Constant Field Values
Constructor Detail

ShapefileReader

public ShapefileReader()
Creates new ShapeReader

Method Detail

read

public FeatureCollection read(DriverProperties dp)
                       throws IllegalParametersException,
                              java.lang.Exception
Main method to read a shapefile. Most of the work is done in the org.geotools.* package.

Specified by:
read in interface JUMPReader
Parameters:
dp - 'InputFile' or 'DefaultValue' to specify output .shp file.
Throws:
IllegalParametersException
java.lang.Exception