All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geolatte.geom.crs.EllipsoidalCoordinateSystem3DM Maven / Gradle / Ivy

Go to download

This geoLatte-geom library offers a geometry model that conforms to the OGC Simple Features for SQL specification.

The newest version!
package org.geolatte.geom.crs;

import org.geolatte.geom.G3DM;

import java.util.Arrays;
import java.util.List;

/**
 * Created by Karel Maesen, Geovise BVBA on 28/11/14.
 */
public class EllipsoidalCoordinateSystem3DM extends CoordinateSystem {

    private final static List REQUIRED_AXIS_NORMAL_ORDER = Arrays.asList(0, 1, 2, 3);

    public EllipsoidalCoordinateSystem3DM(EllipsoidalAxis first, EllipsoidalAxis second, StraightLineAxis heightAxis,
                                          MeasureStraightLineAxis other) {
        super(first, second, heightAxis, other);
        checkAxes();
    }

    private void checkAxes() {
        List order = getAxisNormalOrder();
        if (!order.containsAll(REQUIRED_AXIS_NORMAL_ORDER)) {
            throw new IllegalArgumentException("Require order 0, 1, 2 and 3 axes");
        }
    }

    @Override
    public Class getPositionClass() {
        return G3DM.class;
    }

    @Override
    public CoordinateSystem merge(OneDimensionCoordinateSystem coordinateSystem) {
        throw new UnsupportedOperationException();
    }

    @Override
    public CoordinateSystem extend(CoordinateSystemAxis axis) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean hasZ() {
        return true;
    }

    @Override
    public boolean hasM() {
        return true;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy