Package org.geotools.referencing.wkt

Examples of org.geotools.referencing.wkt.Parser.parseObject()


    /**
     * 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


        // 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);
View Full Code Here

        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
Copyright © 2018 www.massapi.com. 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.