/** * Constructs a new coordinate reference system with the same values than the specified one. * This copy constructor provides a way to convert an arbitrary implementation into a SIS one * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * * @param crs the coordinate reference system to copy. * * @see #castOrCopy(ImageCRS) */ protected DefaultImageCRS(final ImageCRS crs) { super(crs); datum = crs.getDatum(); }
/** * Validates the given coordinate reference system. * * @param object the object to validate, or {@code null}. */ public void validate(final ImageCRS object) { if (object == null) { return; } validateReferenceSystem(object); final AffineCS cs = object.getCoordinateSystem(); mandatory("ImageCRS: shall have a CoordinateSystem.", cs); container.validate(cs); final ImageDatum datum = object.getDatum(); mandatory("ImageCRS: shall have a Datum.", datum); container.validate(datum); }
/** * Validates the given coordinate reference system. * * @param object The object to validate, or {@code null}. */ public void validate(final ImageCRS object) { if (object == null) { return; } validateReferenceSystem(object); final AffineCS cs = object.getCoordinateSystem(); mandatory("ImageCRS: must have a CoordinateSystem.", cs); container.cs.dispatch(cs); final ImageDatum datum = object.getDatum(); mandatory("ImageCRS: must have a Datum.", datum); container.datum.validate(datum); }
/** * Constructs a new coordinate reference system with the same values than the specified one. * This copy constructor provides a way to convert an arbitrary implementation into a SIS one * or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. * * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p> * * @param crs the coordinate reference system to copy. * * @see #castOrCopy(ImageCRS) */ protected DefaultImageCRS(final ImageCRS crs) { super(crs); datum = crs.getDatum(); }