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

org.geolatte.geom.crs.trans.TransformOperation 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.trans;

import org.geolatte.geom.Position;
import org.geolatte.geom.Positions;
import org.geolatte.geom.crs.CoordinateReferenceSystem;

/**
 * Created by Karel Maesen, Geovise BVBA on 2019-03-27.
 */
public interface TransformOperation

{ CoordinateReferenceSystem

getSource(); CoordinateReferenceSystem getTarget(); CoordinateOperation getOperation(); default Q forward(P pos) { double[] out = new double[getTarget().getCoordinateDimension()]; getOperation().forward(pos.toArray(null), out); return Positions.mkPosition(getTarget().getPositionClass(), out); } default P reverse(Q pos) { double[] out = new double[getSource().getCoordinateDimension()]; getOperation().reverse(pos.toArray(null), out); return Positions.mkPosition(getSource().getPositionClass(), out); } TransformOperation reversed(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy