public class ShapefileReader extends AbstractJUMPReader
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 or .tgz NOT a .gz) with .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. | |
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
COMPRESSED_FILE_PROPERTY_KEY  | 
static java.lang.String | 
DEFAULT_VALUE_PROPERTY_KEY  | 
static java.lang.String | 
FILE_PROPERTY_KEY  | 
| Constructor and Description | 
|---|
ShapefileReader()
Creates new ShapeReader 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected DbfFile | 
getDbfFile(java.lang.String srcFileName,
          java.lang.String compressedFname)
Get's a DbfFile. 
 | 
protected DbfFile | 
getDbfFile(java.lang.String srcFileName,
          java.lang.String compressedFname,
          java.nio.charset.Charset charset)  | 
protected Shapefile | 
getShapefile(java.lang.String shpfileName,
            java.lang.String compressedFname)  | 
FeatureCollection | 
read(DriverProperties dp)
Main method to read a shapefile. 
 | 
getExceptionspublic static final java.lang.String FILE_PROPERTY_KEY
public static final java.lang.String DEFAULT_VALUE_PROPERTY_KEY
public static final java.lang.String COMPRESSED_FILE_PROPERTY_KEY
public FeatureCollection read(DriverProperties dp) throws IllegalParametersException, java.lang.Exception
read in interface JUMPReaderread in class AbstractJUMPReaderdp - 'InputFile' or 'DefaultValue' to specify output .shp file.IllegalParametersExceptionjava.lang.Exceptionprotected Shapefile getShapefile(java.lang.String shpfileName, java.lang.String compressedFname) throws java.lang.Exception
java.lang.Exceptionprotected DbfFile getDbfFile(java.lang.String srcFileName, java.lang.String compressedFname) throws java.lang.Exception
srcFileName - either a pass to a dbf or an archive file (*.zip etc.) accompanied by the compressedFname it containscompressedFname - java.lang.Exceptionprotected DbfFile getDbfFile(java.lang.String srcFileName, java.lang.String compressedFname, java.nio.charset.Charset charset) throws java.lang.Exception
java.lang.Exception