com.vividsolutions.jump.io
Class ShapefileReader
java.lang.Object
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:
| Parameter | Meaning |
| 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.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ShapefileReader
public ShapefileReader()
- Creates new ShapeReader
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
getShapefile
protected Shapefile getShapefile(java.lang.String shpfileName,
java.lang.String compressedFname)
throws java.lang.Exception
- Throws:
java.lang.Exception
getDbfFile
protected DbfFile getDbfFile(java.lang.String dbfFileName,
java.lang.String compressedFname)
throws java.lang.Exception
- Throws:
java.lang.Exception