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 aJUMPReaderspecialized 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 DbfFilegetDbfFile(String dbfFileName, String compressedFname)protected ShapefilegetShapefile(String shpfileName, String compressedFname)FeatureCollectionread(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:
readin interfaceJUMPReader- Parameters:
dp- 'InputFile' or 'DefaultValue' to specify output .shp file.- Throws:
IllegalParametersExceptionException
-
getShapefile
protected Shapefile getShapefile(String shpfileName, String compressedFname) throws Exception
- Throws:
Exception
-
-