public class ConstraintLoader extends Object
| Constructor and Description |
|---|
ConstraintLoader() |
| Modifier and Type | Method and Description |
|---|---|
int |
getTotalPointCount()
Gets the total number of points read from the constraint file; or zero if
the content of the constraint file hasn't been read.
|
List<org.tinfour.common.IConstraint> |
readConstraintsFile(File file)
Reads the content of a constraints file which may be either a Shapefile or
a text file in the supported format.
|
void |
setCoordinateTransform(org.tinfour.utils.loaders.ICoordinateTransform transform)
Set a coordinate transform to be applied to the input coordinates.
|
static void |
writeConstraintFile(File file,
List<org.tinfour.common.IConstraint> list)
Writes a text file representing the content of the specified list of
constraints
|
static void |
writeConstraintFile(Path path,
List<org.tinfour.common.IConstraint> list)
Writes a text file representing the content of the specified list of
constraints
|
public List<org.tinfour.common.IConstraint> readConstraintsFile(File file) throws IOException
file - a valid file.IOException - in the event of a format violation or unrecoverable I/O
exception.public int getTotalPointCount()
public static void writeConstraintFile(File file, List<org.tinfour.common.IConstraint> list) throws IOException
file - the output file referencelist - a valid list of constraintsIOException - in the event of a non-recoverable I/O conditionpublic static void writeConstraintFile(Path path, List<org.tinfour.common.IConstraint> list) throws IOException
path - the path for writing the filelist - a valid list of constraintsIOException - in the event of a non-recoverable I/O conditionpublic void setCoordinateTransform(org.tinfour.utils.loaders.ICoordinateTransform transform)
transform - A valid transform or a null if no transform is to
be applied.Copyright © 2019. All rights reserved.