/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Georectified) */ public DefaultGeorectified(final Georectified object) { super(object); if (object != null) { checkPointDescription = object.getCheckPointDescription(); cornerPoints = copyList(object.getCornerPoints(), Point.class); centerPoint = object.getCenterPoint(); pointInPixel = object.getPointInPixel(); transformationDimensionDescription = object.getTransformationDimensionDescription(); transformationDimensionMapping = copyCollection(object.getTransformationDimensionMapping(), InternationalString.class); checkPoints = copyCollection(object.getCheckPoints(), GCP.class); // checkPointAvailability is required to be 'true' if there is a description. if (checkPointDescription != null || object.isCheckPointAvailable()) { booleans |= CHECK_POINT_MASK; } } }
/** * Constructs a new instance initialized with the values from the specified metadata object. * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Georectified) */ public DefaultGeorectified(final Georectified object) { super(object); if (object != null) { checkPointDescription = object.getCheckPointDescription(); cornerPoints = copyList(object.getCornerPoints(), Point.class); centerPoint = object.getCenterPoint(); pointInPixel = object.getPointInPixel(); transformationDimensionDescription = object.getTransformationDimensionDescription(); transformationDimensionMapping = copyCollection(object.getTransformationDimensionMapping(), InternationalString.class); checkPoints = copyCollection(object.getCheckPoints(), GCP.class); // checkPointAvailability is required to be 'true' if there is a description. if (checkPointDescription != null || object.isCheckPointAvailable()) { booleans |= CHECK_POINT_MASK; } } }