public class CoordinateOperationContext extends Object implements Serializable
DefaultCoordinateOperationFactory
to choose the most suitable coordinate transformation between two CRS.
CoordinateOperationContext
is part of the API used by SIS for implementing the late binding
model. See package javadoc for a note on early binding versus
late binding implementations.Defined in the sis-referencing
module
Locale
. The EPSG database contains ISO2 and ISO3
identifiers that we can use.Constructor and Description |
---|
CoordinateOperationContext()
Creates a new context with no area of interest and the best accuracy available.
|
CoordinateOperationContext(Extent area,
double accuracy)
Creates a new context with the given area of interest and desired accuracy.
|
Modifier and Type | Method and Description |
---|---|
Extent |
getAreaOfInterest()
Returns the spatio-temporal area of interest, or
null if none. |
double |
getDesiredAccuracy()
Returns the desired accuracy in metres.
|
void |
setAreaOfInterest(Extent area)
Sets the spatio-temporal area of interest, or
null if none. |
void |
setAreaOfInterest(GeographicBoundingBox area)
Sets the geographic component of the area of interest, or
null if none. |
void |
setDesiredAccuracy(double accuracy)
Sets the desired accuracy in metres.
|
public CoordinateOperationContext()
public CoordinateOperationContext(Extent area, double accuracy)
area
- the area of interest, or null
if none.accuracy
- the desired accuracy in metres, or 0 for the best accuracy available.
See getDesiredAccuracy()
for more details about what we mean by "best accuracy".public Extent getAreaOfInterest()
null
if none.null
if none.Extents.getGeographicBoundingBox(Extent)
public void setAreaOfInterest(Extent area)
null
if none.area
- the spatio-temporal area of interest, or null
if none.public void setAreaOfInterest(GeographicBoundingBox area)
null
if none.
This convenience method set the bounding box into the spatio-temporal Extent
.
The reverse operation can be done with Extents.getGeographicBoundingBox(getAreaOfInterest())
.
area
- the geographic area of interest, or null
if none.public double getDesiredAccuracy()
When searching for the most accurate operation, SIS considers only the operations specified by the authority. For example the Molodensky method is a better datum shift approximation than Abridged Molodensky. But if all coordinate operations defined by the authority use the Abridged Molodensky method, then SIS will ignore the Molodensky one.
public void setDesiredAccuracy(double accuracy)
getDesiredAccuracy()
for more details about what we mean by "most accurate".accuracy
- the desired accuracy in metres.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.