public class ShapefileReader extends Object implements JUMPReader
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. | |
| CompressedFileTemplate | 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. | |
| Constructor and Description |
|---|
ShapefileReader()
Creates new ShapeReader
|
| Modifier and Type | Method and Description |
|---|---|
protected DbfFile |
getDbfFile(String dbfFileName,
String compressedFname) |
protected Shapefile |
getShapefile(String shpfileName,
String compressedFname) |
FeatureCollection |
read(DriverProperties dp)
Main method to read a shapefile.
|
public FeatureCollection read(DriverProperties dp) throws IllegalParametersException, Exception
read in interface JUMPReaderdp - 'InputFile' or 'DefaultValue' to specify output .shp file.IllegalParametersExceptionExceptionprotected Shapefile getShapefile(String shpfileName, String compressedFname) throws Exception
ExceptionCopyright © 2015. All rights reserved.