public final class Transformation extends Object implements AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close() |
static Transformation |
create(CoordinateReference source,
CoordinateReference target)
Creates a transformation for the given references.
|
protected void |
finalize() |
CoordinateReference |
getSourceReference()
Returns the source coordinate reference.
|
CoordinateReference |
getTargetReference()
Returns the target coordinate reference.
|
boolean |
isIdentity() |
Bounds |
transform(Bounds bounds)
Transforms the bounds from the source reference to the target reference.
|
Coordinate |
transform(Coordinate point)
Transforms a point from the source reference to the target reference.
|
Point |
transform(Point point)
Transforms a point from the source reference to the target reference.
|
public void close()
close
in interface AutoCloseable
@NotNull public CoordinateReference getSourceReference()
@NotNull public CoordinateReference getTargetReference()
@Nullable public Coordinate transform(@NotNull Coordinate point)
point
- Point
.null
if the point does not exist in the target reference.@Nullable public Point transform(@NotNull Point point)
point
- Point
.null
if the point does not exist in the target reference, null
if the point is not defined in the source reference@Nullable public Bounds transform(@NotNull Bounds bounds)
bounds
- Bounds
.null
if the bounds does not exist in the target reference, null
if the bounds is not defined in the source reference.public boolean isIdentity()
@NotNull public static Transformation create(@NotNull CoordinateReference source, @NotNull CoordinateReference target) throws IllegalArgumentException
source
- Source coordinate reference.target
- Target coordinate reference.IllegalArgumentException
- when no transformation can be set up.