public final class ShapeReader extends Object
This class respects the Shapefile's Coordinate Reference System if one is
defined; otherwise, it's assumed that the data is unprojected and referenced
to WGS84 datum. All features are transformed to a target CRS specified by
the field targetEpsgCode
.
Modifier and Type | Field and Description |
---|---|
(package private) static String |
OSM_ID_ATTRIBUTE
The name of the shapefile attribute to be used for feature
identification.
|
int |
targetEpsgCode
The EPSG code of the CRS into which features should be transformed.
|
Constructor and Description |
---|
ShapeReader(File file) |
Modifier and Type | Method and Description |
---|---|
Dataset |
dataset() |
int |
epsgCode() |
Collection<LineString> |
readFrom(File file)
Reads linestrings from ESRI Shapefiles.
|
public final int targetEpsgCode
static final String OSM_ID_ATTRIBUTE
public ShapeReader(File file)
public int epsgCode()
public Dataset dataset()
public Collection<LineString> readFrom(File file) throws Exception
file
- the Shapefilefile
Exception