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 IVertexReader
public double getXMax()
getXMax
in interface IVertexReader
public double getYMin()
getYMin
in interface IVertexReader
public double getYMax()
getYMax
in interface IVertexReader
public double getZMin()
getZMin
in interface IVertexReader
public double getZMax()
getZMax
in interface IVertexReader
public double getTimeForLoad()
public boolean isSourceInGeographicCoordinates()
isSourceInGeographicCoordinates
in interface IVertexReader
public 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 IVertexReader
monitor
- 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 Closeable
close
in interface AutoCloseable
IOException
public ICoordinateTransform getCoordinateTransform()
getCoordinateTransform
in interface IVertexReader
public void setCoordinateTransform(ICoordinateTransform transform)
setCoordinateTransform
in interface IVertexReader
public LinearUnits getLinearUnits()
Copyright © 2021. All rights reserved.