throws UnsupportedOperationException, MismatchedDimensionException
{
final DefaultEllipsoidalCS cs;
final DefaultEllipsoid e;
if (!(coordinateSystem instanceof DefaultEllipsoidalCS)) {
throw new UnsupportedImplementationException(coordinateSystem.getClass());
}
final Ellipsoid ellipsoid = ((GeodeticDatum) datum).getEllipsoid();
if (!(ellipsoid instanceof DefaultEllipsoid)) {
throw new UnsupportedImplementationException(ellipsoid.getClass());
}
cs = (DefaultEllipsoidalCS) coordinateSystem;
e = (DefaultEllipsoid) ellipsoid;
if (coord1.length!=2 || coord2.length!=2 || cs.getDimension()!=2) {
/*