Package org.geotools.referencing.datum
Class DefaultImageDatum
Object
Formattable
AbstractIdentifiedObject
AbstractDatum
DefaultImageDatum
- All Implemented Interfaces:
Serializable,Datum,ImageDatum,IdentifiedObject
Defines the origin of an image coordinate reference system. An image datum is used in a local context only. For an
image datum, the anchor point is usually either the centre of the image or the corner of the image.
- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Field Summary
Fields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATORFields inherited from class Formattable
SINGLE_LINEFields inherited from interface Datum
ANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEYFields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDefaultImageDatum(String name, PixelInCell pixelInCell) Constructs an image datum from a name.DefaultImageDatum(Map<String, ?> properties, PixelInCell pixelInCell) Constructs an image datum from a set of properties.DefaultImageDatum(ImageDatum datum) Constructs a new datum with the same values than the specified one. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequals(AbstractIdentifiedObject object, boolean compareMetadata) Compare this datum with the specified object for equality.protected StringFormat the inner part of a Well Known Text (WKT) element.Specification of the way the image grid is associated with the image data attributes.inthashCode()Returns a hash value for this image datum.Methods inherited from class AbstractDatum
getAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScopeMethods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatchesMethods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTMethods inherited from interface Datum
getAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScopeMethods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Constructor Details
-
DefaultImageDatum
Constructs a new datum with the same values than the specified one. This copy constructor provides a way to wrap an arbitrary implementation into a Geotools one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. This constructor performs a shallow copy, i.e. the properties are not cloned.- Parameters:
datum- The datum to copy.- Since:
- 2.2
-
DefaultImageDatum
Constructs an image datum from a name.- Parameters:
name- The datum name.pixelInCell- the way the image grid is associated with the image data attributes.
-
DefaultImageDatum
Constructs an image datum from a set of properties. The properties map is given unchanged to the super-class constructor.- Parameters:
properties- Set of properties. Should contains at least"name".pixelInCell- the way the image grid is associated with the image data attributes.
-
-
Method Details
-
getPixelInCell
Specification of the way the image grid is associated with the image data attributes.- Specified by:
getPixelInCellin interfaceImageDatum- Returns:
- The way image grid is associated with image data attributes.
-
equals
Compare this datum with the specified object for equality.- Overrides:
equalsin classAbstractDatum- Parameters:
object- The object to compare tothis.compareMetadata-truefor performing a strict comparaison, orfalsefor comparing only properties relevant to transformations.- Returns:
trueif both objects are equal.
-
hashCode
public int hashCode()Returns a hash value for this image datum. Name, remarks and the like are not taken in account. In other words, two image datums will return the same hash value if they are equal in the sense of.equals(AbstractIdentifiedObject, false)- Overrides:
hashCodein classAbstractIdentifiedObject- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-
formatWKT
Format the inner part of a Well Known Text (WKT) element.Note: WKT of image datum is not yet part of OGC specification.
- Overrides:
formatWKTin classAbstractDatum- Parameters:
formatter- The formatter to use.- Returns:
- The WKT element name.
- See Also:
-