public class ModelAdapter extends Object implements IModel
| Modifier and Type | Field and Description |
|---|---|
protected int |
serialIndex |
| Constructor and Description |
|---|
ModelAdapter(File file)
Construct a model tied to the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraints(File constraintsFile,
List<IConstraint> constraints)
Adds constraints to the model
|
boolean |
areConstraintsLoaded()
Indicates if the constraint source for the model has been loaded
|
boolean |
areVerticesLoaded()
Indicates if the vertex source for the model has been loaded
|
void |
geo2xy(double latitude,
double longitude,
double[] xy)
If defined, converts a pair of geographic (latitude,longitude)
coordinates to a pair of scaled Cartesian coordinates.
|
double |
getArea()
Gets the overall area of the model, in the units squared associated
with the horizontal coordinate system.
|
List<IConstraint> |
getConstraints()
Gets the current list of constraints for the model/
|
ICoordinateTransform |
getCoordinateTransform()
Gets the coordinate transform associated with the model.
|
String |
getDescription()
Gets a shortdescription of the model
|
File |
getFile()
Gets the file associated with the model
|
String |
getFormattedCoordinates(double x,
double y)
Get a string representation for the specified model coordinates.
|
String |
getFormattedX(double x)
Get a string representation of the specified model X coordinate.
|
String |
getFormattedY(double y)
Get a string representation of the specified model X coordinate.
|
LinearUnits |
getLinearUnits()
Gets the linear units for the coordinate system used by the data.
|
double |
getMaxX()
Gets the maximum x coordinate in the sample
|
double |
getMaxY()
Gets the maximum y coordinate in the sample
|
double |
getMaxZ()
Gets the maximum z coordinate in the sample
|
double |
getMinX()
Gets the minimum x coordinate in the sample
|
double |
getMinY()
Gets the minimum y coordinate in the sample
|
double |
getMinZ()
Gets the minimum z coordinate in the sample
|
String |
getName()
Get the name or identification associated with the model.
|
double |
getNominalPointSpacing()
Gets the estimated nominal point spacing for the model
|
List<Vertex> |
getPerimeterVertices()
Gets a list of the vertices that lie on the perimeter
of the TIN.
|
double |
getReferenceReductionFactor()
Gets the reduction factor for the reference TIN
|
IIncrementalTin |
getReferenceTin()
Gets the "reference" TIN that was created when the data was
first loaded.
|
long |
getTimeToLoadInMillis()
Gets the time required to load the model, in milliseconds.
|
long |
getTimeToSortInMillis()
Gets the time required to perform the post-loading Hilbert sort
on the vertices, in milliseconds.
|
int |
getVertexCount()
Get the number of samples in the model
|
Vertex |
getVertexForIndex(int index)
Get the vertex with the specified vertex index.
|
List<Vertex> |
getVertexList()
Gets the list of vertices currently stored in the model; for efficiency
purposes, this is simply a reference to internal storage and
not a safe copy.
|
boolean |
hasConstraints()
Indicates whether the model has constraints and is thus a
Constrained Delaunay Triangulation (CDT).
|
boolean |
hasConstraintsSource()
Indicates that the model has a definition for a constraint source.
|
boolean |
hasVertexSource()
Indicates that the model has a definition for a vertex source.
|
boolean |
isCoordinateSystemGeographic()
Indicates whether the coordinates used by this instance are geographic in
nature.
|
boolean |
isLoaded()
Indicates whether the content of the model was already loaded.
|
void |
load(IMonitorWithCancellation monitor)
Read the specified file.
|
void |
xy2geo(double x,
double y,
double[] geo)
If defined, converts a pair of scaled Cartesian coordinates
to a latitude and longitude.
|
public ModelAdapter(File file)
file - a valid text or comma-separated value filepublic void load(IMonitorWithCancellation monitor) throws IOException
load in interface IModelmonitor - an optional monitor for tracking progress (null if not used)IOException - In the event of a non-recoverable error related to I/O
or file access.public double getMinX()
public double getMaxX()
public double getMinY()
public double getMaxY()
public double getMinZ()
public double getMaxZ()
public double getNominalPointSpacing()
IModelgetNominalPointSpacing in interface IModelpublic double getArea()
IModelpublic File getFile()
IModelpublic String getName()
IModelpublic String getDescription()
IModelgetDescription in interface IModelpublic int getVertexCount()
IModelgetVertexCount in interface IModelpublic List<Vertex> getVertexList()
IModelgetVertexList in interface IModelpublic String getFormattedCoordinates(double x, double y)
IModelgetFormattedCoordinates in interface IModelx - the x coordinate in the model coordinate systemy - the y coordinate in the model coordinate systempublic String getFormattedX(double x)
IModelgetFormattedX in interface IModelx - the x coordinate in the model coordinate system.public String getFormattedY(double y)
IModelgetFormattedY in interface IModely - the y coordinate in the model coordinate system.public boolean isCoordinateSystemGeographic()
isCoordinateSystemGeographic in interface IModelpublic boolean isLoaded()
IModelpublic IIncrementalTin getReferenceTin()
IModelgetReferenceTin in interface IModelpublic double getReferenceReductionFactor()
IModelgetReferenceReductionFactor in interface IModelpublic long getTimeToLoadInMillis()
IModelgetTimeToLoadInMillis in interface IModelpublic long getTimeToSortInMillis()
IModelgetTimeToSortInMillis in interface IModelpublic List<Vertex> getPerimeterVertices()
IModelgetPerimeterVertices in interface IModelpublic LinearUnits getLinearUnits()
getLinearUnits in interface IModelpublic Vertex getVertexForIndex(int index)
IModelgetVertexForIndex in interface IModelindex - an arbitrary integer.public void xy2geo(double x,
double y,
double[] geo)
IModelpublic void geo2xy(double latitude,
double longitude,
double[] xy)
IModelpublic void addConstraints(File constraintsFile, List<IConstraint> constraints)
IModeladdConstraints in interface IModelconstraintsFile - if the constraints were derived from a file, a
valid reference; otherwise, a nullconstraints - a valid list of constraints.public boolean hasConstraints()
IModelhasConstraints in interface IModelpublic List<IConstraint> getConstraints()
IModelgetConstraints in interface IModelpublic boolean hasVertexSource()
IModelhasVertexSource in interface IModelpublic boolean areVerticesLoaded()
IModelareVerticesLoaded in interface IModelpublic boolean hasConstraintsSource()
IModelhasConstraintsSource in interface IModelpublic boolean areConstraintsLoaded()
IModelareConstraintsLoaded in interface IModelpublic ICoordinateTransform getCoordinateTransform()
IModelgetCoordinateTransform in interface IModelCopyright © 2019. All rights reserved.