public class VertexReaderShapefile extends Object implements IVertexReader, Closeable
| Constructor and Description |
|---|
VertexReaderShapefile(File file)
Construct an instance for the specified Shapefile
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ICoordinateTransform |
getCoordinateTransform() |
LinearUnits |
getLinearUnits()
Gets the linear units for the horizontal coordinate system from
the Shapefile.
|
double |
getTimeForLoad()
Gets the total time to load a file (including the time required for
pre-sort if enabled).
|
double |
getXMax()
Gets the maximum x coordinate in the sample
|
double |
getXMin()
Gets the minimum x coordinate in the sample
|
double |
getYMax()
Gets the maximum y coordinate in the sample
|
double |
getYMin()
Gets the minimum y coordinate in the sample
|
double |
getZMax()
Gets the maximum z coordinate in the sample
|
double |
getZMin()
Gets the minimum z coordinate in the sample
|
boolean |
isSourceInGeographicCoordinates()
Indicates whether the source data was in geographic coordinates
|
List<Vertex> |
read(IMonitorWithCancellation monitor)
Read the records from the Shapefile and use them to populate vertices.
|
void |
setCoordinateTransform(ICoordinateTransform transform) |
void |
setDbfFieldForZ(String dbfFieldForZ)
Sets the name of the field in the DBF file to use as a source for Z
coordinates for data.
|
void |
setVerticalCoordinateTransform(IVerticalCoordinateTransform verticalTransform)
Sets the vertical coordinate transform to be used when reading the
file (if any).
|
public VertexReaderShapefile(File file) throws IOException
file - a Shapefile referenceIOException - in the event of an unrecoverable I/O conditionpublic void setDbfFieldForZ(String dbfFieldForZ)
dbfFieldForZ - a valid string, or a null to use the Z coordinates from
the Shapefile geometry file (the 0shp file).public void setVerticalCoordinateTransform(IVerticalCoordinateTransform verticalTransform)
verticalTransform - a valid instance if a transform is to be
applies; a null reference if no transform is required.public double getXMin()
getXMin in interface IVertexReaderpublic double getXMax()
getXMax in interface IVertexReaderpublic double getYMin()
getYMin in interface IVertexReaderpublic double getYMax()
getYMax in interface IVertexReaderpublic double getZMin()
getZMin in interface IVertexReaderpublic double getZMax()
getZMax in interface IVertexReaderpublic double getTimeForLoad()
public boolean isSourceInGeographicCoordinates()
isSourceInGeographicCoordinates in interface IVertexReaderpublic List<Vertex> read(IMonitorWithCancellation monitor) throws IOException
The index of the vertex is set to be the Shapefile record number. Thus many vertices may be assigned with the same record number, particularly if the input is a polygon or line feature.
read in interface IVertexReadermonitor - an optional progress monitor, or null if not required.IOException - in the event of an unrecoverable I/O conditionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic ICoordinateTransform getCoordinateTransform()
getCoordinateTransform in interface IVertexReaderpublic void setCoordinateTransform(ICoordinateTransform transform)
setCoordinateTransform in interface IVertexReaderpublic LinearUnits getLinearUnits()
Copyright © 2021. All rights reserved.