CompoundCRSDecoder { public static CoordinateReferenceSystem decode(String code) throws FactoryException { code = code.trim(); if (!isCompound(code)) { throw new NoSuchAuthorityCodeException("No compound CRS", AUTHORITY, code); } code = code.substring(PREFIX.length()); String[] parts = code.split(","); CoordinateReferenceSystem[] crss = new CoordinateReferenceSystem[parts.length]; for (int i = 0; i < crss.length; ++i) { crss[i] = CRS.decode(AUTHORITY + ":" + parts[i].trim()); } return new DefaultCompoundCRS("", crss); }  static boolean isCompound(String code); static CoordinateReferenceSystem decode(String code);  }
@Test public void compoundCrs() throws Exception { CoordinateReferenceSystem c = CompoundCRSDecoder.decode("urn:ogc:def:crs,crs:EPSG:6.12:3068,crs:EPSG:6.12:5783"); assertEquals(CRS.decode("EPSG:3068"), CRS.getHorizontalCRS(c)); assertEquals(CRS.decode("EPSG:5783"), CRS.getVerticalCRS(c)); }