@Test public void testCustomAxisLength() throws FactoryException, ParseException { DefaultMathTransformFactory factory = new DefaultMathTransformFactory(); ParameterValueGroup parameters = factory.getDefaultParameters("Lambert_Conformal_Conic_2SP"); final double majorAxis = 6.3712e+6; final double minorAxis = 6.3712e+6; parameters.parameter("semi_major").setValue(majorAxis); parameters.parameter("semi_minor").setValue(minorAxis); parameters.parameter("latitude_of_origin").setValue(25.0); parameters.parameter("standard_parallel_1").setValue(25.0); parameters.parameter("standard_parallel_2").setValue(25.0); parameters.parameter("longitude_of_origin").setValue(-95.0); parameters.parameter("false_easting").setValue(0.0); parameters.parameter("false_northing").setValue(0.0); GeographicCRS base = DefaultGeographicCRS.WGS84; MathTransform mt = factory.createParameterizedTransform(parameters); CartesianCS cs = DefaultCartesianCS.PROJECTED; CoordinateReferenceSystem crs = new DefaultProjectedCRS("Lambert", base, mt, cs); final String wkt = crs.toWKT(); assertTrue(wkt.contains("semi_major")); assertTrue(wkt.contains("semi_minor")); final Parser parser = new Parser(); CoordinateReferenceSystem check = parser.parseCoordinateReferenceSystem(wkt); assertEquals(wkt, check.toWKT()); }
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); 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); static void main(String[] args);  }