public class DefaultResolution extends ISOMetadata implements Resolution
Resolution
as an union (in the C/C++ sense):
only one of the properties in this class can be set to a non-empty value.
Setting any property to a non-empty value discard all the other ones.
See the constructor javadoc
for information about which property has precedence on copy operations.Defined in the sis-metadata module
identifiers, LOGGER
Constructor and Description |
---|
DefaultResolution()
Constructs an initially empty resolution.
|
DefaultResolution(Resolution object)
Constructs a new instance initialized with the values from the specified metadata object.
|
Modifier and Type | Method and Description |
---|---|
static DefaultResolution |
castOrCopy(Resolution object)
Returns a SIS metadata implementation with the values of the given arbitrary implementation.
|
Double |
getDistance()
Returns the ground sample distance.
|
RepresentativeFraction |
getEquivalentScale()
Returns the level of detail expressed as the scale of a comparable hardcopy map or chart.
|
void |
setDistance(Double newValue)
Sets the ground sample distance.
|
void |
setEquivalentScale(RepresentativeFraction newValue)
Sets the level of detail expressed as the scale of a comparable hardcopy map or chart.
|
getIdentifierMap, getIdentifiers, getStandard
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, freeze, isModifiable, nonNullCollection, nonNullList, nonNullSet, singleton, unmodifiable, writeCollection, writeList, writeSet
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
public DefaultResolution()
public DefaultResolution(Resolution object)
If both scale and distance are specified, then the scale will have precedence and the distance is silently discarded.
object
- The metadata to copy values from, or null
if none.castOrCopy(Resolution)
public static DefaultResolution castOrCopy(Resolution object)
null
, then this method returns null
.DefaultResolution
, then it is returned unchanged.DefaultResolution
instance is created using the
copy constructor
and returned. Note that this is a shallow copy operation, since the other
metadata contained in the given object are not recursively copied.object
- The object to get as a SIS implementation, or null
if none.null
if the argument was null.public RepresentativeFraction getEquivalentScale()
getEquivalentScale
in interface Resolution
null
.public void setEquivalentScale(RepresentativeFraction newValue)
newValue
is non-null, then this method automatically
discards the distance.newValue
- The new equivalent scale.@ValueRange(minimum=0.0, isMinIncluded=false) public Double getDistance()
getDistance
in interface Resolution
null
.public void setDistance(Double newValue)
newValue
- The new distance.Copyright © 2010–2013 The Apache Software Foundation. All rights reserved.