/** * Sets the denominator of the representative fraction on a source map. * This method stores the value in the * {@linkplain #setSourceSpatialResolution(Resolution) source spatial resolution}. * * @param newValue the new scale denominator. * * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#setEquivalentScale(RepresentativeFraction)}. */ @Deprecated public void setScaleDenominator(final RepresentativeFraction newValue) { checkWritePermission(); Resolution resolution = null; if (newValue != null) { resolution = sourceSpatialResolution; if (resolution instanceof DefaultResolution) { ((DefaultResolution) resolution).setEquivalentScale(newValue); } else { resolution = new DefaultResolution(newValue); } } /* * Invoke the non-deprecated setter method only if the reference changed, * for consistency with other deprecated setter methods in metadata module. */ if (resolution != sourceSpatialResolution) { setSourceSpatialResolution(resolution); } }
/** * Sets the denominator of the representative fraction on a source map. * This method stores the value in the * {@linkplain #setSourceSpatialResolution(Resolution) source spatial resolution}. * * @param newValue the new scale denominator. * * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#setEquivalentScale(RepresentativeFraction)}. */ @Deprecated public void setScaleDenominator(final RepresentativeFraction newValue) { checkWritePermission(sourceSpatialResolution); Resolution resolution = null; if (newValue != null) { resolution = sourceSpatialResolution; if (resolution instanceof DefaultResolution) { ((DefaultResolution) resolution).setEquivalentScale(newValue); } else { resolution = new DefaultResolution(newValue); } } /* * Invoke the non-deprecated setter method only if the reference changed, * for consistency with other deprecated setter methods in metadata module. */ if (resolution != sourceSpatialResolution) { setSourceSpatialResolution(resolution); } }