Package org.geotools.referencing.crs

Examples of org.geotools.referencing.crs.AbstractCRS


     *
     * @throws FactoryException if an error occured while querying the factory.
     */
    @Test
    public void testIntern() throws FactoryException {
        final AbstractCRS epsgCrs = (AbstractCRS) CRS.decode("EPSG:4326");
        final String      wkt     = epsgCrs.toWKT();
        final AbstractCRS wktCrs  = (AbstractCRS) CRS.parseWKT(wkt);

        assertTrue   ("equals ignore metadata",  epsgCrs.equals(wktCrs, false));
        assertFalse  ("equals compare metadata", epsgCrs.equals(wktCrs, true));
        assertFalse  ("equals",   epsgCrs.equals(wktCrs));
        assertNotSame("identity", epsgCrs, wktCrs);

        // Parsing the same thing twice?
        final AbstractCRS wktCrs2 = (AbstractCRS) CRS.parseWKT(wkt);
        assertTrue  ("equals ignore metadata",  wktCrs.equals(wktCrs2, false));
        assertTrue  ("equals compare metadata", wktCrs.equals(wktCrs2, true));
        assertEquals("equals",   wktCrs, wktCrs2);
        assertSame  ("identity", wktCrs, wktCrs2);
    }
View Full Code Here


     */
    @Test
    public void testCoordinateFormat() {
        final Date epoch = new Date(1041375600000L); // January 1st, 2003
        final DefaultTemporalDatum datum = new DefaultTemporalDatum("Time", epoch);
        final AbstractCRS crs = new DefaultCompoundCRS("WGS84 3D + time",
                    DefaultGeographicCRS.WGS84, DefaultVerticalCRS.ELLIPSOIDAL_HEIGHT,
                    new DefaultTemporalCRS("Time", datum, DefaultTimeCS.DAYS));
        final CoordinateFormat format = new CoordinateFormat(Locale.FRANCE);
        format.setCoordinateReferenceSystem(crs);
        format.setTimeZone(TimeZone.getTimeZone("GMT+01:00"));
View Full Code Here

TOP

Related Classes of org.geotools.referencing.crs.AbstractCRS

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.