Package org.apache.sis.metadata.iso.spatial

## Class DefaultGeorectified

- Object
- - AbstractMetadata
  - - ModifiableMetadata
    - - ISOMetadata
      - - AbstractSpatialRepresentation
        - - DefaultGridSpatialRepresentation
          - - DefaultGeorectified

- All Implemented Interfaces:
    `Serializable`, `Emptiable`, `LenientComparable`, `IdentifiedObject`, `Georectified`, `GridSpatialRepresentation`, `SpatialRepresentation`

      public class DefaultGeorectified
      extends DefaultGridSpatialRepresentation
      implements Georectified

  Grid whose cells are regularly spaced in a geographic or projected coordinate reference system. Any cell in the grid can be geolocated given its grid coordinate and the grid origin, cell spacing, and orientation indication of whether or not geographic.

  The following properties are mandatory or conditional (i.e. mandatory under some circumstances) in a well-formed metadata according ISO 19115:

  `MD_Georectified` `├─numberOfDimensions…………………………………………………` Number of independent spatial-temporal axes. `├─axisDimensionProperties……………………………………` Information about spatial-temporal axis properties. `│ ├─dimensionName……………………………………………………` Name of the axis. `│ └─dimensionSize……………………………………………………` Number of elements along the axis. `├─cellGeometry…………………………………………………………………` Identification of grid data as point or cell. `├─transformationParameterAvailability……` Whether parameters for transformation exists. `├─checkPointAvailability………………………………………` Whether geographic position points are available to test the accuracy of the georeferenced grid data. `├─checkPointDescription…………………………………………` Description of geographic position points used to test the accuracy of the georeferenced grid data. `├─cornerPoints…………………………………………………………………` Earth location in the coordinate reference system and the grid coordinate of the cells at opposite ends. `└─pointInPixel…………………………………………………………………` Point in a pixel corresponding to the Earth location of the pixel.
  Providing the check point description implies that check point availability is `true`. The setter methods will ensure that this condition is not violated.
  Limitations
  - Instances of this class are not synchronized for multi-threading. Synchronization, if needed, is caller's responsibility.
  - Serialized objects of this class are not guaranteed to be compatible with future Apache SIS releases. Serialization support is appropriate for short term storage or RMI between applications running the same version of Apache SIS. For long term storage, use `XML` instead.
  Since:
    0.3
  See Also:
    Serialized Form

  Defined in the `sis-metadata` module

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class ModifiableMetadata

      `ModifiableMetadata​.State`

  - ### Field Summary

    - ### Fields inherited from class ISOMetadata

      `identifiers`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultGeorectified()` | Constructs an initially empty georectified object.
    `DefaultGeorectified​(Georectified object)` | Constructs a new instance initialized with the values from the specified metadata object.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static DefaultGeorectified` | `castOrCopy​(Georectified object)` | Returns a SIS metadata implementation with the values of the given arbitrary implementation.
    `Point` | `getCenterPoint()` | Returns the Earth location in the coordinate system defined by the Spatial Reference System and the grid coordinate of the cell halfway between opposite ends of the grid in the spatial dimensions.
    `InternationalString` | `getCheckPointDescription()` | Returns a description of geographic position points used to test the accuracy of the georeferenced grid data.
    `Collection<GCP>` | `getCheckPoints()` | Returns the geographic references used to validate georectification of the data.
    `List<Point>` | `getCornerPoints()` | Returns the Earth location in the coordinate system defined by the Spatial Reference System and the grid coordinate of the cells at opposite ends of grid coverage along two diagonals.
    `PixelOrientation` | `getPointInPixel()` | Returns the point in a pixel corresponding to the Earth location of the pixel.
    `InternationalString` | `getTransformationDimensionDescription()` | Returns a general description of the transformation.
    `Collection<InternationalString>` | `getTransformationDimensionMapping()` | Returns information about which grid dimensions are the spatial dimensions.
    `boolean` | `isCheckPointAvailable()` | Returns an indication of whether or not geographic position points are available to test the accuracy of the georeferenced grid data.
    `void` | `setCenterPoint​(Point newValue)` | Sets the center point.
    `void` | `setCheckPointAvailable​(boolean newValue)` | Sets an indication of whether or not geographic position points are available to test the accuracy of the georeferenced grid data.
    `void` | `setCheckPointDescription​(InternationalString newValue)` | Sets the description of geographic position points used to test the accuracy of the georeferenced grid data.
    `void` | `setCheckPoints​(Collection<? extends GCP> newValues)` | Sets the geographic references used to validate georectification of the data.
    `void` | `setCornerPoints​(List<? extends Point> newValues)` | Sets the corner points.
    `void` | `setPointInPixel​(PixelOrientation newValue)` | Sets the point in a pixel corresponding to the Earth location of the pixel.
    `void` | `setTransformationDimensionDescription​(InternationalString newValue)` | Sets a general description of the transformation.
    `void` | `setTransformationDimensionMapping​(Collection<? extends InternationalString> newValues)` | Sets information about which grid dimensions are the spatial dimensions.

    - ### Methods inherited from class DefaultGridSpatialRepresentation

      `castOrCopy, getAxisDimensionProperties, getCellGeometry, getNumberOfDimensions, isTransformationParameterAvailable, setAxisDimensionProperties, setCellGeometry, setNumberOfDimensions, setTransformationParameterAvailable`

    - ### Methods inherited from class AbstractSpatialRepresentation

      `castOrCopy`

    - ### Methods inherited from class ISOMetadata

      `getIdentifier, getIdentifierMap, getIdentifiers, getStandard, setIdentifier, transitionTo`

    - ### Methods inherited from class ModifiableMetadata

      `checkWritePermission, checkWritePermission, collectionType, copyCollection, copyList, copyMap, copySet, freeze, isModifiable, nonNullCollection, nonNullList, nonNullMap, nonNullSet, singleton, state, unmodifiable, writeCollection, writeList, writeMap, writeSet`

    - ### Methods inherited from class AbstractMetadata

      `asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString`

    - ### Methods inherited from class Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface GridSpatialRepresentation

      `getAxisDimensionProperties, getCellGeometry, getNumberOfDimensions, isTransformationParameterAvailable`

- - ### Constructor Detail

    - #### DefaultGeorectified

          public DefaultGeorectified()

      Constructs an initially empty georectified object.

    - #### DefaultGeorectified

          public DefaultGeorectified​(Georectified object)

      Constructs a new instance initialized with the values from the specified metadata object. This is a shallow copy constructor, since the other metadata contained in the given object are not recursively copied.
      Parameters:
        `object` - the metadata to copy values from, or `null` if none.
      See Also:
        `castOrCopy(Georectified)`

  - ### Method Detail

    - #### castOrCopy

          public static DefaultGeorectified castOrCopy​(Georectified object)

      Returns a SIS metadata implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:
      - If the given object is `null`, then this method returns `null`.
      - Otherwise if the given object is already an instance of `DefaultGeorectified`, then it is returned unchanged.
      - Otherwise a new `DefaultGeorectified` 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.
      Parameters:
        `object` - the object to get as a SIS implementation, or `null` if none.
      Returns:
        a SIS implementation containing the values of the given object (may be the given object itself), or `null` if the argument was null.

    - #### isCheckPointAvailable

          public boolean isCheckPointAvailable()

      Returns an indication of whether or not geographic position points are available to test the accuracy of the georeferenced grid data.
      Specified by:
        `isCheckPointAvailable` in interface `Georectified`
      Returns:
        whether or not geographic position points are available to test accuracy.

    - #### setCheckPointAvailable

          public void setCheckPointAvailable​(boolean newValue)

      Sets an indication of whether or not geographic position points are available to test the accuracy of the georeferenced grid data.
      Effect on other properties
      If and only if the given `newValue` is `false`, then this method automatically hides the check point description property. The description can be shown again by reverting `checkPointAvailability` to `true`.
      Parameters:
        `newValue` - `true` if check points are available.

    - #### getCheckPointDescription

          public InternationalString getCheckPointDescription()

      Returns a description of geographic position points used to test the accuracy of the georeferenced grid data. This value is non-null only if `isCheckPointAvailable()` returns `true`.
      Specified by:
        `getCheckPointDescription` in interface `Georectified`
      Returns:
        description of geographic position points used to test accuracy, or `null`.

    - #### setCheckPointDescription

          public void setCheckPointDescription​(InternationalString newValue)

      Sets the description of geographic position points used to test the accuracy of the georeferenced grid data.
      Effect on other properties
      If and only if the given `newValue` is non-null, then this method automatically sets the check point availability property to `true`.
      Parameters:
        `newValue` - the new check point description.

    - #### getCornerPoints

          public List<Point> getCornerPoints()

      Returns the Earth location in the coordinate system defined by the Spatial Reference System and the grid coordinate of the cells at opposite ends of grid coverage along two diagonals.
      Specified by:
        `getCornerPoints` in interface `Georectified`
      Returns:
        the corner points.

    - #### setCornerPoints

          public void setCornerPoints​(List<? extends Point> newValues)

      Sets the corner points. The list size should be 2 or 4. The list should contain at least two corner points along one diagonal. or may contains the 4 corner points of the georectified grid.

      The first corner point shall correspond to the origin of the grid.

      Parameters:
        `newValues` - the new corner points.

    - #### getCenterPoint

          public Point getCenterPoint()

      Returns the Earth location in the coordinate system defined by the Spatial Reference System and the grid coordinate of the cell halfway between opposite ends of the grid in the spatial dimensions.
      Upcoming API change
      This method may be renamed `getCentrePoint()` in GeoAPI 4.0 for compliance with ISO 19115:2014.
      Specified by:
        `getCenterPoint` in interface `Georectified`
      Returns:
        the center point, or `null`.

    - #### setCenterPoint

          public void setCenterPoint​(Point newValue)

      Sets the center point.
      Upcoming API change
      This method may be renamed `setCentrePoint(…)` in GeoAPI 4.0 for compliance with ISO 19115:2014.
      Parameters:
        `newValue` - the new center point.

    - #### getPointInPixel

          public PixelOrientation getPointInPixel()

      Returns the point in a pixel corresponding to the Earth location of the pixel.
      Specified by:
        `getPointInPixel` in interface `Georectified`
      Returns:
        earth location of the pixel, or `null`.

    - #### setPointInPixel

          public void setPointInPixel​(PixelOrientation newValue)

      Sets the point in a pixel corresponding to the Earth location of the pixel.
      Parameters:
        `newValue` - the new point in a pixel.

    - #### getTransformationDimensionDescription

          public InternationalString getTransformationDimensionDescription()

      Returns a general description of the transformation.
      Specified by:
        `getTransformationDimensionDescription` in interface `Georectified`
      Returns:
        general description of the transformation, or `null`.

    - #### setTransformationDimensionDescription

          public void setTransformationDimensionDescription​(InternationalString newValue)

      Sets a general description of the transformation.
      Parameters:
        `newValue` - the new general description.

    - #### getTransformationDimensionMapping

          public Collection<InternationalString> getTransformationDimensionMapping()

      Returns information about which grid dimensions are the spatial dimensions.
      Specified by:
        `getTransformationDimensionMapping` in interface `Georectified`
      Returns:
        information about which grid dimensions are the spatial dimensions, or `null`.

    - #### setTransformationDimensionMapping

          public void setTransformationDimensionMapping​(Collection<? extends InternationalString> newValues)

      Sets information about which grid dimensions are the spatial dimensions. The given list should contain at most 2 elements.
      Parameters:
        `newValues` - the new transformation mapping.

    - #### getCheckPoints

          public Collection<GCP> getCheckPoints()

      Returns the geographic references used to validate georectification of the data.
      Specified by:
        `getCheckPoints` in interface `Georectified`
      Returns:
        geographic references used to validate georectification.

    - #### setCheckPoints

          public void setCheckPoints​(Collection<? extends GCP> newValues)

      Sets the geographic references used to validate georectification of the data.
      Parameters:
        `newValues` - the new check points values.