* GEOCENTRIC CRS
* ---------------------------------------------------------------------- */
else if (type.equalsIgnoreCase("geocentric")) {
final String csCode = getString(result, 7, code);
final String dmCode = getString(result, 8, code);
final CoordinateSystem cs = createCoordinateSystem(csCode);
final GeodeticDatum datum = createGeodeticDatum (dmCode);
final Map<String,Object> properties = generateProperties(name, epsg, area, scope, remarks);
if (cs instanceof CartesianCS) {
crs = factory.createGeocentricCRS(properties, datum, (CartesianCS) cs);
} else if (cs instanceof SphericalCS) {
crs = factory.createGeocentricCRS(properties, datum, (SphericalCS) cs);
} else {
result.close();
throw new FactoryException(Errors.format(
ErrorKeys.ILLEGAL_COORDINATE_SYSTEM_FOR_CRS_$2,
cs.getClass(), GeocentricCRS.class));
}
}
/* ----------------------------------------------------------------------
* ENGINEERING CRS
* ---------------------------------------------------------------------- */
else if (type.equalsIgnoreCase("engineering")) {
final String csCode = getString(result, 7, code);
final String dmCode = getString(result, 8, code);
final CoordinateSystem cs = createCoordinateSystem(csCode);
final EngineeringDatum datum = createEngineeringDatum(dmCode);
final Map<String,Object> properties = generateProperties(name, epsg, area, scope, remarks);
crs = factory.createEngineeringCRS(properties, datum, cs);
}
/* ----------------------------------------------------------------------