@Test public void test404000Parsing() throws IOException, ParseException, NoSuchAuthorityCodeException, FactoryException { final String wkt = "LOCAL_CS[\"Wildcard 2D cartesian plane in metric unit\", \n" + " LOCAL_DATUM[\"Unknown\", 0], \n" + " UNIT[\"m\", 1.0], \n" + " AXIS[\"x\", EAST], \n" + " AXIS[\"y\", NORTH], \n" + " AUTHORITY[\"EPSG\",\"404000\"]]"; final Parser parser = new Parser(); CoordinateReferenceSystem observed = parser.parseCoordinateReferenceSystem(wkt); final String check = parser.format(observed); CoordinateReferenceSystem expected = CRS.decode("EPSG:404000"); assertTrue( "Internal CS", CRS.equalsIgnoreMetadata( expected.getCoordinateSystem(), observed.getCoordinateSystem())); assertTrue(CRS.equalsIgnoreMetadata(expected, observed)); assertTrue(expected.equals(observed)); assertEquals("Incorrect reading", expected, observed); assertFalse(check.contains("semi_major")); assertFalse(check.contains("semi_minor")); }
public CoordinateReferenceSystem parseCoordinateReferenceSystem(final String text) throws ParseException { final Element element = getTree(text, new ParsePosition(0)); final CoordinateReferenceSystem crs = parseCoordinateReferenceSystem(element); element.close(); return crs; }
Parser extends MathTransformParser { public CoordinateReferenceSystem parseCoordinateReferenceSystem(final String text) throws ParseException { final Element element = getTree(text, new ParsePosition(0)); final CoordinateReferenceSystem crs = parseCoordinateReferenceSystem(element); element.close(); return crs; } }
Parser extends MathTransformParser { public CoordinateReferenceSystem parseCoordinateReferenceSystem(final String text) throws ParseException { final Element element = getTree(text, new ParsePosition(0)); final CoordinateReferenceSystem crs = parseCoordinateReferenceSystem(element); element.close(); return crs; } Parser();  Parser(final Symbols symbols);  Parser(final Symbols symbols, final ReferencingFactoryContainer factories);  Parser(
            final Symbols symbols,
            final DatumFactory datumFactory,
            final CSFactory csFactory,
            final CRSFactory crsFactory,
            final MathTransformFactory mtFactory); }
Parser extends MathTransformParser { public CoordinateReferenceSystem parseCoordinateReferenceSystem(final String text) throws ParseException { final Element element = getTree(text, new ParsePosition(0)); final CoordinateReferenceSystem crs = parseCoordinateReferenceSystem(element); element.close(); return crs; } Parser();  Parser(final Symbols symbols);  Parser(final Symbols symbols, final ReferencingFactoryContainer factories);  Parser(
            final Symbols symbols,
            final DatumFactory datumFactory,
            final CSFactory csFactory,
            final CRSFactory crsFactory,
            final MathTransformFactory mtFactory); CoordinateReferenceSystem parseCoordinateReferenceSystem(final String text); static Class<?> getClassOf(String element); static String getNameOf(final Class<?> type); @SuppressWarnings("PMD.CloseResource") static void main(String[] args); }
Parser extends MathTransformParser { public CoordinateReferenceSystem parseCoordinateReferenceSystem(final String text) throws ParseException { final Element element = getTree(text, new ParsePosition(0)); final CoordinateReferenceSystem crs = parseCoordinateReferenceSystem(element); element.close(); return crs; } Parser();  Parser(final Symbols symbols);  Parser(final Symbols symbols, final ReferencingFactoryContainer factories);  Parser(
            final Symbols symbols,
            final DatumFactory datumFactory,
            final CSFactory csFactory,
            final CRSFactory crsFactory,
            final MathTransformFactory mtFactory); CoordinateReferenceSystem parseCoordinateReferenceSystem(final String text); static Class<?> getClassOf(String element); static String getNameOf(final Class<?> type); @SuppressWarnings("PMD.CloseResource") static void main(String[] args);  }