Class DefaultGeorectified
java.lang.Object
org.apache.sis.metadata.AbstractMetadata
org.apache.sis.metadata.ModifiableMetadata
org.apache.sis.metadata.iso.ISOMetadata
org.apache.sis.metadata.iso.spatial.AbstractSpatialRepresentation
org.apache.sis.metadata.iso.spatial.DefaultGridSpatialRepresentation
org.apache.sis.metadata.iso.spatial.DefaultGeorectified
- All Implemented Interfaces:
Serializable
,Emptiable
,LenientComparable
,IdentifiedObject
,org.opengis.metadata.spatial.Georectified
,org.opengis.metadata.spatial.GridSpatialRepresentation
,org.opengis.metadata.spatial.SpatialRepresentation
- Direct Known Subclasses:
MI_Georectified
public class DefaultGeorectified
extends DefaultGridSpatialRepresentation
implements org.opengis.metadata.spatial.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.
Providing the check point description implies
that check point availability is
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.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
- Version:
- 1.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.metadata.ModifiableMetadata
ModifiableMetadata.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.geometry.primitive.Point
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.private static final byte
Mask for thecheckPointAvailable
boolean value.private org.opengis.util.InternationalString
Description of geographic position points used to test the accuracy of the georeferenced grid data.private Collection<org.opengis.metadata.spatial.GCP>
Geographic references used to validate georectification of the data.private List<org.opengis.geometry.primitive.Point>
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 in the grid spatial dimensions.private org.opengis.metadata.spatial.PixelOrientation
Point in a pixel corresponding to the Earth location of the pixel.private static final long
Serial number for inter-operability with different versions.private org.opengis.util.InternationalString
Description of the information about which grid dimensions are the spatial dimensions.private Collection<org.opengis.util.InternationalString>
Information about which grid dimensions are the spatial dimensions.Fields inherited from class org.apache.sis.metadata.iso.spatial.DefaultGridSpatialRepresentation
booleans, TRANSFORMATION_MASK
Fields inherited from class org.apache.sis.metadata.iso.ISOMetadata
identifiers
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an initially empty georectified object.DefaultGeorectified
(org.opengis.metadata.spatial.Georectified object) Constructs a new instance initialized with the values from the specified metadata object. -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultGeorectified
castOrCopy
(org.opengis.metadata.spatial.Georectified object) Returns a SIS metadata implementation with the values of the given arbitrary implementation.org.opengis.geometry.primitive.Point
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.org.opengis.util.InternationalString
Returns a description of geographic position points used to test the accuracy of the georeferenced grid data.Collection<org.opengis.metadata.spatial.GCP>
Returns the geographic references used to validate georectification of the data.List<org.opengis.geometry.primitive.Point>
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.org.opengis.metadata.spatial.PixelOrientation
Returns the point in a pixel corresponding to the Earth location of the pixel.org.opengis.util.InternationalString
Returns a general description of the transformation.Collection<org.opengis.util.InternationalString>
Returns information about which grid dimensions are the spatial dimensions.boolean
Returns an indication of whether or not geographic position points are available to test the accuracy of the georeferenced grid data.void
setCenterPoint
(org.opengis.geometry.primitive.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
(org.opengis.util.InternationalString newValue) Sets the description of geographic position points used to test the accuracy of the georeferenced grid data.void
setCheckPoints
(Collection<? extends org.opengis.metadata.spatial.GCP> newValues) Sets the geographic references used to validate georectification of the data.void
setCornerPoints
(List<? extends org.opengis.geometry.primitive.Point> newValues) Sets the corner points.void
setPointInPixel
(org.opengis.metadata.spatial.PixelOrientation newValue) Sets the point in a pixel corresponding to the Earth location of the pixel.void
setTransformationDimensionDescription
(org.opengis.util.InternationalString newValue) Sets a general description of the transformation.void
setTransformationDimensionMapping
(Collection<? extends org.opengis.util.InternationalString> newValues) Sets information about which grid dimensions are the spatial dimensions.Methods inherited from class org.apache.sis.metadata.iso.spatial.DefaultGridSpatialRepresentation
castOrCopy, getAxisDimensionProperties, getCellGeometry, getNumberOfDimensions, isDefined, isTransformationParameterAvailable, setAxisDimensionProperties, setCellGeometry, setNumberOfDimensions, setTransformationParameterAvailable
Methods inherited from class org.apache.sis.metadata.iso.spatial.AbstractSpatialRepresentation
castOrCopy, getScope, setScope
Methods inherited from class org.apache.sis.metadata.iso.ISOMetadata
getIdentifier, getIdentifierMap, getIdentifiers, getStandard, setIdentifier, transitionTo
Methods inherited from class org.apache.sis.metadata.ModifiableMetadata
checkWritePermission, collectionType, copyCollection, copyList, copyMap, copySet, deepCopy, nonNullCollection, nonNullList, nonNullMap, nonNullSet, singleton, state, writeCollection, writeList, writeMap, writeSet
Methods inherited from class org.apache.sis.metadata.AbstractMetadata
asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.metadata.spatial.GridSpatialRepresentation
getAxisDimensionProperties, getCellGeometry, getNumberOfDimensions, isTransformationParameterAvailable
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
CHECK_POINT_MASK
private static final byte CHECK_POINT_MASKMask for thecheckPointAvailable
boolean value. -
checkPointDescription
private org.opengis.util.InternationalString checkPointDescriptionDescription of geographic position points used to test the accuracy of the georeferenced grid data. -
cornerPoints
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 in the grid spatial dimensions. There are four corner points in a georectified grid; at least two corner points along one diagonal are required. -
centerPoint
private org.opengis.geometry.primitive.Point centerPointEarth 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. -
pointInPixel
private org.opengis.metadata.spatial.PixelOrientation pointInPixelPoint in a pixel corresponding to the Earth location of the pixel. -
transformationDimensionDescription
private org.opengis.util.InternationalString transformationDimensionDescriptionDescription of the information about which grid dimensions are the spatial dimensions. -
transformationDimensionMapping
Information about which grid dimensions are the spatial dimensions. -
checkPoints
Geographic references used to validate georectification of the data.
-
-
Constructor Details
-
DefaultGeorectified
public DefaultGeorectified()Constructs an initially empty georectified object. -
DefaultGeorectified
public DefaultGeorectified(org.opengis.metadata.spatial.Georectified object) Constructs a new instance initialized with the values from the specified metadata object. This is a shallow copy constructor, because the other metadata contained in the given object are not recursively copied.- Parameters:
object
- the metadata to copy values from, ornull
if none.- See Also:
-
-
Method Details
-
castOrCopy
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 returnsnull
. - 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, because the other metadata contained in the given object are not recursively copied.
- Parameters:
object
- the object to get as a SIS implementation, ornull
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.
- If the given object is
-
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 interfaceorg.opengis.metadata.spatial.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 givennewValue
isfalse
, then this method automatically hides the check point description property. The description can be shown again by revertingcheckPointAvailability
totrue
.- Parameters:
newValue
-true
if check points are available.
-
getCheckPointDescription
public org.opengis.util.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 ifisCheckPointAvailable()
returnstrue
.- Specified by:
getCheckPointDescription
in interfaceorg.opengis.metadata.spatial.Georectified
- Returns:
- description of geographic position points used to test accuracy, or
null
.
-
setCheckPointDescription
public void setCheckPointDescription(org.opengis.util.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 givennewValue
is non-null, then this method automatically sets the check point availability property totrue
.- Parameters:
newValue
- the new check point description.
-
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 interfaceorg.opengis.metadata.spatial.Georectified
- Returns:
- the corner points.
-
setCornerPoints
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 org.opengis.geometry.primitive.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 renamedgetCentrePoint()
in GeoAPI 4.0 for compliance with ISO 19115:2014.- Specified by:
getCenterPoint
in interfaceorg.opengis.metadata.spatial.Georectified
- Returns:
- the center point, or
null
.
-
setCenterPoint
public void setCenterPoint(org.opengis.geometry.primitive.Point newValue) Sets the center point.Upcoming API change
This method may be renamedsetCentrePoint(…)
in GeoAPI 4.0 for compliance with ISO 19115:2014.- Parameters:
newValue
- the new center point.
-
getPointInPixel
public org.opengis.metadata.spatial.PixelOrientation getPointInPixel()Returns the point in a pixel corresponding to the Earth location of the pixel.- Specified by:
getPointInPixel
in interfaceorg.opengis.metadata.spatial.Georectified
- Returns:
- earth location of the pixel, or
null
.
-
setPointInPixel
public void setPointInPixel(org.opengis.metadata.spatial.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 org.opengis.util.InternationalString getTransformationDimensionDescription()Returns a general description of the transformation.- Specified by:
getTransformationDimensionDescription
in interfaceorg.opengis.metadata.spatial.Georectified
- Returns:
- general description of the transformation, or
null
.
-
setTransformationDimensionDescription
public void setTransformationDimensionDescription(org.opengis.util.InternationalString newValue) Sets a general description of the transformation.- Parameters:
newValue
- the new general description.
-
getTransformationDimensionMapping
Returns information about which grid dimensions are the spatial dimensions.- Specified by:
getTransformationDimensionMapping
in interfaceorg.opengis.metadata.spatial.Georectified
- Returns:
- information about which grid dimensions are the spatial dimensions, or
null
.
-
setTransformationDimensionMapping
public void setTransformationDimensionMapping(Collection<? extends org.opengis.util.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
Returns the geographic references used to validate georectification of the data.- Specified by:
getCheckPoints
in interfaceorg.opengis.metadata.spatial.Georectified
- Returns:
- geographic references used to validate georectification.
-
setCheckPoints
Sets the geographic references used to validate georectification of the data.- Parameters:
newValues
- the new check points values.
-