c = unit.getConverterToAny(newUnit);
} catch (ConversionException e) {
// Use IllegalStateException because the public API is an AbstractCS member method.
throw new IllegalStateException(Errors.format(Errors.Keys.IllegalUnitFor_2, "axis", unit), e);
}
properties.put(DefaultCoordinateSystemAxis.MINIMUM_VALUE_KEY, c.convert(axis.getMinimumValue()));
properties.put(DefaultCoordinateSystemAxis.MAXIMUM_VALUE_KEY, c.convert(axis.getMaximumValue()));
properties.put(DefaultCoordinateSystemAxis.RANGE_MEANING_KEY, axis.getRangeMeaning());
return new DefaultCoordinateSystemAxis(properties, newAbbr, newDir, newUnit);
}