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

org.geolatte.geom.crs.trans.EnvelopeTransform 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.Envelope;
import org.geolatte.geom.Position;
import org.geolatte.geom.crs.CoordinateReferenceSystem;

/**
 * Created by Karel Maesen, Geovise BVBA on 2019-03-28.
 */
public class EnvelopeTransform

{ final private TransformOperation operation; public EnvelopeTransform(TransformOperation operation) { this.operation = operation; } public Envelope forward(Envelope

envelope) { P ll = envelope.lowerLeft(); P ur = envelope.upperRight(); Q tll = operation.forward(ll); Q tur = operation.forward(ur); return new Envelope<>(tll, tur, operation.getTarget()); } public Envelope

reverse(Envelope envelope) { Q ll = envelope.lowerLeft(); Q ur = envelope.upperRight(); P tll = operation.reverse(ll); P tur = operation.reverse(ur); return new Envelope<>(tll, tur, operation.getSource()); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy