| Constructor and Description |
|---|
UnitSquareModel(int count)
Create an instance of the model with the specified number of points.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraints(File constraintsFile,
List<org.tinfour.common.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<org.tinfour.common.IConstraint> |
getConstraints()
Gets the current list of constraints for the model/
|
org.tinfour.utils.loaders.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.
|
org.tinfour.utils.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<org.tinfour.common.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
|
org.tinfour.common.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
|
org.tinfour.common.Vertex |
getVertexForIndex(int index)
Get the vertex with the specified vertex index.
|
List<org.tinfour.common.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(org.tinfour.common.IMonitorWithCancellation monitor)
Load the metadata and data associated with the file for this model
and compile a list of vertices for access by the application.
|
void |
xy2geo(double x,
double y,
double[] geo)
If defined, converts a pair of scaled Cartesian coordinates
to a latitude and longitude.
|
public UnitSquareModel(int count)
count - an integer greater than 3.public int getVertexCount()
IModelgetVertexCount in interface IModelpublic double getMaxX()
IModelpublic double getMinX()
IModelpublic double getMaxY()
IModelpublic double getMinY()
IModelpublic double getMaxZ()
IModelpublic double getMinZ()
IModelpublic double getArea()
IModelpublic double getNominalPointSpacing()
IModelgetNominalPointSpacing in interface IModelpublic void load(org.tinfour.common.IMonitorWithCancellation monitor)
throws IOException
IModelload in interface IModelmonitor - an optional monitor for tracking progress (null
if not used)IOException - If a non-recoverable IO condition is encountered
when reading the source file.public File getFile()
IModelpublic String getName()
IModelpublic String getDescription()
IModelgetDescription in interface IModelpublic List<org.tinfour.common.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 isLoaded()
IModelpublic org.tinfour.common.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<org.tinfour.common.Vertex> getPerimeterVertices()
IModelgetPerimeterVertices in interface IModelpublic org.tinfour.utils.LinearUnits getLinearUnits()
getLinearUnits in interface IModelpublic boolean isCoordinateSystemGeographic()
IModelisCoordinateSystemGeographic in interface IModelpublic org.tinfour.common.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 boolean hasConstraints()
IModelhasConstraints in interface IModelpublic List<org.tinfour.common.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 void addConstraints(File constraintsFile, List<org.tinfour.common.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 org.tinfour.utils.loaders.ICoordinateTransform getCoordinateTransform()
IModelgetCoordinateTransform in interface IModelCopyright © 2019. All rights reserved.