|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.srs.coordtrans.IlvFittedTransform
public class IlvFittedTransform
A transformation that transforms coordinates using a polynomial transform between two sets of points. The coefficients of the polynomial whose degree can be specified are computed using least square fitting algorithm. This transformation includes an optimization for polynomial of degree up to 4.
| Constructor Summary | |
|---|---|
IlvFittedTransform(IlvCoordinate[] sourcePoints,
IlvCoordinate[] destinationPoints,
int degree)
Creates a new 2D polynomial transform. |
|
IlvFittedTransform(IlvFittedTransform source)
Creates a new fitted transform which is a copy of the specified transformation. |
|
IlvFittedTransform(IlvInputStream stream)
Reads an IlvFittedTransform from the specified
input stream. |
|
| Method Summary | |
|---|---|
static IlvFittedTransform |
CreateTransform(IlvCoordinate UL,
IlvCoordinate LR,
IlvCoordinateTransformation transform,
int degree,
double controlPointModifier)
Creates an interpolation function for the specified coordinate transformation, for the area of interest which corners are specified. |
Iterator |
getDestinationPoints()
Returns an iterator over the destination points. |
IlvMathTransform |
getInverse()
Returns the inverse transformation of this transformation. |
int |
getSourceDimension()
The dimension of source coordinates. |
Iterator |
getSourcePoints()
Returns an iterator over the source points. |
int |
getTargetDimension()
The dimension of target coordinates. |
boolean |
isIdentity()
Returns true if this transformation is an identity. |
IlvCoordinate[] |
transform(IlvCoordinate[] sourceCP,
IlvCoordinate[] targetCP)
Transforms the specified array of points, and stores the result in the specified coordinate array. |
IlvCoordinate |
transform(IlvCoordinate sourceCP,
IlvCoordinate targetCP)
Transforms the specified source point, and stores the result in the specified coordinate. |
void |
write(IlvOutputStream stream)
Writes this transformation to the specified output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvFittedTransform(IlvCoordinate[] sourcePoints,
IlvCoordinate[] destinationPoints,
int degree)
sourcePoints - The source points.destinationPoints - The points to fit.degree - The degree of the interpolation.
IllegalArgumentException - If the number of points does not
allow for a polynomial of degree degree to be found.public IlvFittedTransform(IlvFittedTransform source)
source - The source transform
public IlvFittedTransform(IlvInputStream stream)
throws IlvReadFileException
IlvFittedTransform from the specified
input stream.
stream - The IlvInputStream.
IlvReadFileException - if the transformation cannot be
read from the input stream.| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
write in interface IlvPersistentObjectstream - The IlvOutputStream.
Java.io.IOException - If an error occurs.
IOException - thrown when an exception occurs during
the write operation for this object.public int getSourceDimension()
getSourceDimension in interface IlvMathTransformpublic int getTargetDimension()
getTargetDimension in interface IlvMathTransform
public IlvCoordinate transform(IlvCoordinate sourceCP,
IlvCoordinate targetCP)
throws IlvCoordinateTransformationException
null, a new
coordinate is created and returned.
transform in interface IlvMathTransformIlvCoordinateTransformationException
public IlvCoordinate[] transform(IlvCoordinate[] sourceCP,
IlvCoordinate[] targetCP)
throws IlvCoordinateTransformationException
null, a new array of coordinates is created and returned.
transform in interface IlvMathTransformIlvCoordinateTransformationExceptionpublic IlvMathTransform getInverse()
getInverse in interface IlvMathTransformpublic boolean isIdentity()
true if this transformation is an identity.
isIdentity in interface IlvMathTransformtrue if this transformation is an identity.public Iterator getSourcePoints()
IlvCoordinate[] sources = new IlvCoordinate[numPoints];
IlvCoordinate[] dest = new IlvCoordinate[numPoints];
for (Iterator i = transform.getSourcePoints(); i.hasNext() ; ) {
IlvCoordinate c = (IlvCoordinate)i.next();
}
public Iterator getDestinationPoints()
for (Iterator i = transform.getDestinationPoints(); i.hasNext() ; ) {
IlvCoordinate c = (IlvCoordinate)i.next();
}
public static IlvFittedTransform CreateTransform(IlvCoordinate UL,
IlvCoordinate LR,
IlvCoordinateTransformation transform,
int degree,
double controlPointModifier)
throws IlvCoordinateTransformationException
controlPointModifier parameter allows to specify a
modifier to the number of points for the specified degree (example,
1.20 means use 20% more points that the theoretical number of points
needed for a polynomial of degree degree).
UL - The upper left coordinate of the area of interest, expressed
in the source coordinate system.LR - The lower right coordinate of the area of interest, expressed
in the source coordinate system.transform - The transformation to interpolate.degree - The degree of the interpolation function.controlPointModifier - The modifier to the number of control
points used. This must be greater than 1.
IlvCoordinateTransformationException - if some points could not
be transformed.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||