/** Returns the legacy code for the datum type. */ @Override final int getLegacyDatumType() { final int ordinal = type.ordinal(); if (ordinal >= 0 && ordinal < LEGACY_CODES.length) { assert type.equals(TYPES[ordinal]) : type; return LEGACY_CODES[ordinal]; } return 0; }
if (vertical == null) { vertical = (VerticalCRS) candidate; if (VerticalDatumType.ELLIPSOIDAL.equals( vertical.getDatum().getVerticalDatumType())) { vi = i;
/** * Creates an operation between a geographic and a vertical coordinate reference systems. The * default implementation accepts the conversion only if the geographic CRS is a tri dimensional * one and the vertical CRS is for {@linkplain VerticalDatumType#ELLIPSOIDAL height above the * ellipsoid}. More elaborated operation, like transformation from ellipsoidal to geoidal * height, should be implemented here. * * @param sourceCRS Input coordinate reference system. * @param targetCRS Output coordinate reference system. * @return A coordinate operation from {@code sourceCRS} to {@code targetCRS}. * @throws FactoryException If the operation can't be constructed. * @todo Implement GEOT-352 here. */ protected CoordinateOperation createOperationStep( final GeographicCRS sourceCRS, final VerticalCRS targetCRS) throws FactoryException { if (VerticalDatumType.ELLIPSOIDAL.equals(targetCRS.getDatum().getVerticalDatumType())) { final Matrix matrix = swapAndScaleAxis( sourceCRS.getCoordinateSystem(), targetCRS.getCoordinateSystem()); return createFromAffineTransform(AXIS_CHANGES, sourceCRS, targetCRS, matrix); } throw new OperationNotFoundException(getErrorMessage(sourceCRS, targetCRS)); }
return type().equals(((DefaultVerticalDatum) object).type());
return type().equals(((DefaultVerticalDatum) object).type());
/** * If the pending {@code DefaultVerticalExtent} can use the given CRS, completes the extent now. * This method invokes {@link DefaultVerticalExtent#setVerticalCRS(VerticalCRS)} with the given CRS if: * * <ul> * <li>datum type is {@link VerticalDatumType#GEOIDAL},</li> * <li>increasing height values are up, and</li> * <li>axis unit of measurement is the given linear unit.</li> * </ul> * * This method processes also all other {@code VerticalInfo} instances in the chained list. * * @return the new head of the chained list (may be {@code this}), or {@code null} if the list * became empty as a result of this operation. */ final VerticalInfo resolve(final VerticalCRS crs) { if (crs != null && VerticalDatumType.GEOIDAL.equals(crs.getDatum().getVerticalDatumType())) { return resolve(crs, crs.getCoordinateSystem().getAxis(0)); } return this; }
/** * If the pending {@code DefaultVerticalExtent} can use the given CRS, completes the extent now. * This method invokes {@link DefaultVerticalExtent#setVerticalCRS(VerticalCRS)} with the given CRS if: * * <ul> * <li>datum type is {@link VerticalDatumType#GEOIDAL},</li> * <li>increasing height values are up, and</li> * <li>axis unit of measurement is the given linear unit.</li> * </ul> * * This method processes also all other {@code VerticalInfo} instances in the chained list. * * @return the new head of the chained list (may be {@code this}), or {@code null} if the list * became empty as a result of this operation. */ final VerticalInfo resolve(final VerticalCRS crs) { if (crs != null && VerticalDatumType.GEOIDAL.equals(crs.getDatum().getVerticalDatumType())) { return resolve(crs, crs.getCoordinateSystem().getAxis(0)); } return this; }
if (VerticalDatumType.OTHER_SURFACE.equals(datum.getVerticalDatumType())) { final VerticalDatumType type = VerticalDatumTypes.guess(datum.getName().getCode(), datum.getAlias(), cs.getAxis(0)); if (!VerticalDatumType.OTHER_SURFACE.equals(type)) { datum = datumFactory.createVerticalDatum(referencing.getProperties(datum, true), type);
if (VerticalDatumType.OTHER_SURFACE.equals(datum.getVerticalDatumType())) { final VerticalDatumType type = VerticalDatumTypes.guess(datum.getName().getCode(), datum.getAlias(), cs.getAxis(0)); if (!VerticalDatumType.OTHER_SURFACE.equals(type)) { datum = datumFactory.createVerticalDatum(referencing.getProperties(datum, true), type);