Package org.apache.sis.referencing.cs

Examples of org.apache.sis.referencing.cs.AbstractCS


     */
    @Test
    public void testForConvention() {
        final AbstractCRS toTest, expected, actual;
        toTest   =  new AbstractCRS(singletonMap(NAME_KEY, "My CRS"),
                    new AbstractCS (singletonMap(NAME_KEY, "My strange CS"),
                    HardCodedAxes.TIME, HardCodedAxes.ALTITUDE, HardCodedAxes.GEODETIC_LATITUDE, HardCodedAxes.GEODETIC_LONGITUDE));
        expected =  new AbstractCRS(singletonMap(NAME_KEY, "My CRS"),
                    new AbstractCS (singletonMap(NAME_KEY, "Coordinate system: East (deg), North (deg), Up (m), Future (d)."),
                    HardCodedAxes.GEODETIC_LONGITUDE, HardCodedAxes.GEODETIC_LATITUDE, HardCodedAxes.ALTITUDE, HardCodedAxes.TIME));
        actual   =  toTest.forConvention(AxesConvention.RIGHT_HANDED);

        assertEquals("forConvention(RIGHT_HANDED)", expected, actual);
        assertSame(actual,   toTest  .forConvention(AxesConvention.RIGHT_HANDED));
View Full Code Here


    public synchronized AbstractCRS forConvention(final AxesConvention convention) {
        ensureNonNull("convention", convention);
        final Map<AxesConvention,AbstractCRS> derived = derived();
        AbstractCRS crs = derived.get(convention);
        if (crs == null) {
            final AbstractCS cs = AbstractCS.castOrCopy(coordinateSystem);
            final AbstractCS candidate = cs.forConvention(convention);
            if (candidate == cs) {
                crs = this;
            } else {
                crs = createSameType(IdentifiedObjects.getProperties(this, IDENTIFIERS_KEY), candidate);
                for (final AbstractCRS existing : derived.values()) {
View Full Code Here

TOP

Related Classes of org.apache.sis.referencing.cs.AbstractCS

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.