public class ModelFromText extends ModelAdapter implements IModel
serialIndex| Constructor and Description |
|---|
ModelFromText(File file)
Construct a model tied to the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Gets a shortdescription of the model
|
org.tinfour.utils.LinearUnits |
getLinearUnits()
Gets the linear units for the coordinate system used by the
data.
|
void |
load(org.tinfour.common.IMonitorWithCancellation monitor)
Read the specified file.
|
String |
toString() |
addConstraints, areConstraintsLoaded, areVerticesLoaded, geo2xy, getArea, getConstraints, getCoordinateTransform, getFile, getFormattedCoordinates, getFormattedX, getFormattedY, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getName, getNominalPointSpacing, getPerimeterVertices, getReferenceReductionFactor, getReferenceTin, getTimeToLoadInMillis, getTimeToSortInMillis, getVertexCount, getVertexForIndex, getVertexList, hasConstraints, hasConstraintsSource, hasVertexSource, isCoordinateSystemGeographic, isLoaded, xy2geoclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddConstraints, areConstraintsLoaded, areVerticesLoaded, geo2xy, getArea, getConstraints, getCoordinateTransform, getFile, getFormattedCoordinates, getFormattedX, getFormattedY, getMaxX, getMaxY, getMaxZ, getMinX, getMinY, getMinZ, getName, getNominalPointSpacing, getPerimeterVertices, getReferenceReductionFactor, getReferenceTin, getTimeToLoadInMillis, getTimeToSortInMillis, getVertexCount, getVertexForIndex, getVertexList, hasConstraints, hasConstraintsSource, hasVertexSource, isCoordinateSystemGeographic, isLoaded, xy2geopublic ModelFromText(File file)
Delimiters Specifications in text files depend on the presence of a delimiter character to separate data fields given on a single line. Typically delimiters are specified using a space, tab, comma, or pipe (vertical bar character). Files with the extension ".csv" (for comma-separated-value) are assumed to be comma-delimited. Otherwise, the constructor will attempt to inspect the content of the specified file and determine the delimiter based on internal clues. If a file includes a mix of potential delimiters, such as both spaces and commas, the delimiter will be determined on the basis of precedence (in increasing order, space, tab, comma, and pipe).
An application may also override the automatically determined delimiter through the setDelimiter() method. Geographic coordinates If the values in the file are in geographic coordinates, the input file must include a header row indicating which columns are latitude and longitude. This feature serves two purposes, it informs the model that the coordinates are geographic and it dispels any ambiguity about which column is which. Geographic coordinate values must be giving in standard decimal numeric form using negative numbers for southern latitudes and western longitudes (quadrants and degrees-minutes-seconds notion are not supported at this time).
For example:
latitude, longitude, z
42.5, 73.33, 2001
file - a valid text or comma-separated value filepublic void load(org.tinfour.common.IMonitorWithCancellation monitor)
throws IOException
load in interface IModelload in class ModelAdaptermonitor - 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 String getDescription()
IModelgetDescription in interface IModelgetDescription in class ModelAdapterpublic org.tinfour.utils.LinearUnits getLinearUnits()
getLinearUnits in interface IModelgetLinearUnits in class ModelAdapterCopyright © 2019. All rights reserved.