Package org.locationtech.jts.jump.io
Class ShapefileReader
- java.lang.Object
-
- org.locationtech.jts.jump.io.ShapefileReader
-
- All Implemented Interfaces:
JUMPReader
public class ShapefileReader extends Object implements JUMPReader
ShapefileReader is aJUMPReader
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 Summary
Constructors Constructor Description ShapefileReader()
Creates new ShapeReader
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
read
public FeatureCollection read(DriverProperties dp) throws IllegalParametersException, Exception
Main method to read a shapefile. Most of the work is done in the org.geotools.* package.- Specified by:
read
in interfaceJUMPReader
- Parameters:
dp
- 'InputFile' or 'DefaultValue' to specify output .shp file.- Throws:
IllegalParametersException
Exception
-
getShapefile
protected Shapefile getShapefile(String shpfileName, String compressedFname) throws Exception
- Throws:
Exception
-
-