@Override protected void finalize() { delete(); }
public double[] TransformPoint(double x, double y, double z) { double[] ret = new double[3]; TransformPoint(ret, x, y, z); return ret; }
private Envelope transform( Envelope bbox, SpatialReference requestSr, SpatialReference nativeSr ) { double[][] points = getBoundarySamplePointsAndEnsureXyOrder( bbox ); CoordinateTransformation transform = CreateCoordinateTransformation( requestSr, nativeSr ); transform.TransformPoints( points ); transform.delete(); double[] minXY = new double[] { points[0][0], points[0][1] }; double[] maxXY = new double[] { points[0][0], points[0][1] }; for ( double[] point : points ) { if ( point[0] < minXY[0] ) { minXY[0] = point[0]; } if ( point[1] < minXY[1] ) { minXY[1] = point[1]; } if ( point[0] > maxXY[0] ) { maxXY[0] = point[0]; } if ( point[1] > maxXY[1] ) { maxXY[1] = point[1]; } } Point min = new DefaultPoint( null, null, null, minXY ); Point max = new DefaultPoint( null, null, null, maxXY ); return new DefaultEnvelope( min, max ); }
public static CoordinateTransformation CreateCoordinateTransformation( final SpatialReference src, final SpatialReference dst) { final long cPtr = osrJNI.CreateCoordinateTransformation( SpatialReference.getCPtr(src), src, SpatialReference.getCPtr(dst), dst); return cPtr == 0 ? null : new CoordinateTransformation(cPtr, true); }
public int Transform(final CoordinateTransformation trans) { return ogrJNI.Geometry_Transform(this.swigCPtr, this, CoordinateTransformation.getCPtr(trans), trans); }
public static CoordinateTransformation CreateCoordinateTransformation(SpatialReference src, SpatialReference dst) { long cPtr = osrJNI.CreateCoordinateTransformation(SpatialReference.getCPtr(src), src, SpatialReference.getCPtr(dst), dst); return (cPtr == 0) ? null : new CoordinateTransformation(cPtr, true); }
public int Transform(CoordinateTransformation trans) { return ogrJNI.Geometry_Transform(swigCPtr, this, CoordinateTransformation.getCPtr(trans), trans); }
protected void finalize() { delete(); }
public double[] TransformPoint(final double x, final double y, final double z) { final double[] ret = new double[3]; TransformPoint(ret, x, y, z); return ret; }
public double[] TransformPoint(final double x, final double y) { return TransformPoint(x, y, 0); }
public double[] TransformPoint(double x, double y) { return TransformPoint(x, y, 0); }