Package org.geotools.referencing.wkt

Examples of org.geotools.referencing.wkt.Parser


    /**
     * Tests the distance between points function
     */
    public void testOrthodromicDistance() throws Exception {
        final Parser parser = new Parser();
        final DefaultProjectedCRS crs  = (DefaultProjectedCRS) parser.parseObject(NAD83_BC);
        double d = JTS.orthodromicDistance(new Coordinate(1402848.1938534670, 651571.1729878788),
                                           new Coordinate(1389481.3104009738, 641990.9430108378), crs);
        double realValue = 16451.33114;
        assertEquals(realValue, d, 0.1);
    }
View Full Code Here


     * Creates an instance of the specified authority.
     */
    private Command(final String authority) {
        factory = (authority == null) ? CRS.getAuthorityFactory(false) :
                ReferencingFactoryFinder.getCRSAuthorityFactory(authority, HINTS);
        formatter = new Parser();
    }
View Full Code Here

     * Creates inconditionnaly the WKT parser. This is factored out as a single private method
     * for making easier to spot the places in this code that need to create the parser and the
     * datum-alias patch.
     */
    private void createParser(final DatumFactory datumFactory, final MathTransformFactory mtFactory) {
        parser = new Parser(Symbols.DEFAULT, datumFactory, this, this, mtFactory);
    }
View Full Code Here

     * Creates a new console instance using {@linkplain System#in standard input stream},
     * {@linkplain System#out standard output stream}, {@linkplain System#err error output stream}
     * and the system default line separator.
     */
    public Console() {
        super(new Preprocessor(new Parser()));
        numberSeparator = getNumberSeparator(numberFormat);
    }
View Full Code Here

     * Creates a new console instance using the specified input stream.
     *
     * @param in The input stream.
     */
    public Console(final LineNumberReader in) {
        super(new Preprocessor(new Parser()), in);
        numberSeparator = getNumberSeparator(numberFormat);
    }
View Full Code Here

    public void testCRS_NorthingEasting() throws Exception {
        // get some test data
        final File testMosaic = TestData.file(this, "/crs_nztm");
        assertTrue(testMosaic.exists());

        final Parser parser = new Parser();
        final DefaultProjectedCRS crs_EN = (DefaultProjectedCRS) parser.parseObject(NZTM_WKT_EN);
        final DefaultProjectedCRS crs_NE = (DefaultProjectedCRS) parser.parseObject(NZTM_WKT_NE);

        final ImageMosaicReader reader = (ImageMosaicReader) new ImageMosaicFormat()
                .getReader(testMosaic);

        assertNotNull(reader);
View Full Code Here

TOP

Related Classes of org.geotools.referencing.wkt.Parser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.