@Test public void testTransformToWGS84() throws Exception { String wkt = "GEOGCS[\"GDA94\"," + " DATUM[\"Geocentric Datum of Australia 1994\"," + " SPHEROID[\"GRS 1980\", 6378137.0, 298.257222101, AUTHORITY[\"EPSG\",\"7019\"]]," + " TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], " + " AUTHORITY[\"EPSG\",\"6283\"]], " + " PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]]," + " UNIT[\"degree\", 0.017453292519943295], " + " AXIS[\"Geodetic longitude\", EAST], " + " AXIS[\"Geodetic latitude\", NORTH], " + " AXIS[\"Ellipsoidal height\", UP], " + " AUTHORITY[\"EPSG\",\"4939\"]]"; CoordinateReferenceSystem gda94 = CRS.parseWKT(wkt); ReferencedEnvelope bounds = new ReferencedEnvelope3D( 130.875825803896, 130.898939990319, -16.4491956225999, -16.4338185791628, 0.0, 0.0, gda94); ReferencedEnvelope worldBounds3D = bounds.transform(DefaultGeographicCRS.WGS84_3D, true); assertEquals(DefaultGeographicCRS.WGS84_3D, worldBounds3D.getCoordinateReferenceSystem()); ReferencedEnvelope worldBounds2D = bounds.transform(DefaultGeographicCRS.WGS84, true); assertEquals(DefaultGeographicCRS.WGS84, worldBounds2D.getCoordinateReferenceSystem()); }
public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient) throws TransformException, FactoryException { return transform(targetCRS, lenient, 5); }
ReferencedEnvelope3D extends ReferencedEnvelope implements BoundingBox3D { public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient) throws TransformException, FactoryException { return transform(targetCRS, lenient, 5); } }
ReferencedEnvelope3D extends ReferencedEnvelope implements BoundingBox3D { public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient) throws TransformException, FactoryException { return transform(targetCRS, lenient, 5); } ReferencedEnvelope3D();  ReferencedEnvelope3D(CoordinateReferenceSystem crs);  ReferencedEnvelope3D(
            final double x1,
            final double x2,
            final double y1,
            final double y2,
            final double z1,
            final double z2,
            final CoordinateReferenceSystem crs);  ReferencedEnvelope3D(final ReferencedEnvelope3D envelope);  ReferencedEnvelope3D(final BoundingBox3D bbox);  ReferencedEnvelope3D(final Envelope envelope, final CoordinateReferenceSystem crs);  ReferencedEnvelope3D(final org.opengis.geometry.Envelope envelope);  ReferencedEnvelope3D(
            final ReferencedEnvelope3D envelope, final CoordinateReferenceSystem crs); }
ReferencedEnvelope3D extends ReferencedEnvelope implements BoundingBox3D { public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient) throws TransformException, FactoryException { return transform(targetCRS, lenient, 5); } ReferencedEnvelope3D();  ReferencedEnvelope3D(CoordinateReferenceSystem crs);  ReferencedEnvelope3D(
            final double x1,
            final double x2,
            final double y1,
            final double y2,
            final double z1,
            final double z2,
            final CoordinateReferenceSystem crs);  ReferencedEnvelope3D(final ReferencedEnvelope3D envelope);  ReferencedEnvelope3D(final BoundingBox3D bbox);  ReferencedEnvelope3D(final Envelope envelope, final CoordinateReferenceSystem crs);  ReferencedEnvelope3D(final org.opengis.geometry.Envelope envelope);  ReferencedEnvelope3D(
            final ReferencedEnvelope3D envelope, final CoordinateReferenceSystem crs); static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q); static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2); void init(); void init(double x1, double x2, double y1, double y2, double z1, double z2); void init(Coordinate p1, Coordinate p2); void init(Coordinate p); @Override void init(Envelope env); void init(ReferencedEnvelope3D env); void setToNull(); double getDepth(); double getMinZ(); double getMaxZ(); double getVolume(); double minExtent(); double maxExtent(); void expandToInclude(Coordinate p); void expandBy(double distance); void expandBy(double deltaX, double deltaY, double deltaZ); void expandToInclude(double x, double y, double z); @Override void expandToInclude(DirectPosition pt); void translate(double transX, double transY, double transZ); Coordinate centre(); boolean intersects(ReferencedEnvelope3D other); boolean intersects(Coordinate p); @SuppressWarnings("deprecation") boolean overlaps(Coordinate p); boolean intersects(double x, double y, double z); boolean contains(Coordinate p); boolean contains(double x, double y, double z); boolean covers(double x, double y, double z); boolean covers(Coordinate p); boolean covers(ReferencedEnvelope3D other); double distance(ReferencedEnvelope3D env); void init(BoundingBox bounds); int getDimension(); double getMinimum(final int dimension); double getMaximum(final int dimension); double getMedian(final int dimension); double getSpan(final int dimension); DirectPosition getLowerCorner(); DirectPosition getUpperCorner(); boolean isEmpty(); boolean contains(DirectPosition pos); boolean contains(final BoundingBox3D bbox); boolean intersects(final BoundingBox3D bbox); ReferencedEnvelope3D intersection(ReferencedEnvelope3D env); void include(final BoundingBox3D bbox); void expandToInclude(ReferencedEnvelope3D other); void include(double x, double y, double z); void setBounds(final BoundingBox3D bbox); BoundingBox toBounds(final CoordinateReferenceSystem targetCRS); ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient); ReferencedEnvelope transform(
            final CoordinateReferenceSystem targetCRS,
            final boolean lenient,
            final int numPointsForTransformation); @Override int hashCode(); @Override boolean equals(final Object other); boolean boundsEquals3D(final org.opengis.geometry.Envelope other, double eps); @Override void include(double x, double y); }
ReferencedEnvelope3D extends ReferencedEnvelope implements BoundingBox3D { public ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient) throws TransformException, FactoryException { return transform(targetCRS, lenient, 5); } ReferencedEnvelope3D();  ReferencedEnvelope3D(CoordinateReferenceSystem crs);  ReferencedEnvelope3D(
            final double x1,
            final double x2,
            final double y1,
            final double y2,
            final double z1,
            final double z2,
            final CoordinateReferenceSystem crs);  ReferencedEnvelope3D(final ReferencedEnvelope3D envelope);  ReferencedEnvelope3D(final BoundingBox3D bbox);  ReferencedEnvelope3D(final Envelope envelope, final CoordinateReferenceSystem crs);  ReferencedEnvelope3D(final org.opengis.geometry.Envelope envelope);  ReferencedEnvelope3D(
            final ReferencedEnvelope3D envelope, final CoordinateReferenceSystem crs); static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q); static boolean intersects(Coordinate p1, Coordinate p2, Coordinate q1, Coordinate q2); void init(); void init(double x1, double x2, double y1, double y2, double z1, double z2); void init(Coordinate p1, Coordinate p2); void init(Coordinate p); @Override void init(Envelope env); void init(ReferencedEnvelope3D env); void setToNull(); double getDepth(); double getMinZ(); double getMaxZ(); double getVolume(); double minExtent(); double maxExtent(); void expandToInclude(Coordinate p); void expandBy(double distance); void expandBy(double deltaX, double deltaY, double deltaZ); void expandToInclude(double x, double y, double z); @Override void expandToInclude(DirectPosition pt); void translate(double transX, double transY, double transZ); Coordinate centre(); boolean intersects(ReferencedEnvelope3D other); boolean intersects(Coordinate p); @SuppressWarnings("deprecation") boolean overlaps(Coordinate p); boolean intersects(double x, double y, double z); boolean contains(Coordinate p); boolean contains(double x, double y, double z); boolean covers(double x, double y, double z); boolean covers(Coordinate p); boolean covers(ReferencedEnvelope3D other); double distance(ReferencedEnvelope3D env); void init(BoundingBox bounds); int getDimension(); double getMinimum(final int dimension); double getMaximum(final int dimension); double getMedian(final int dimension); double getSpan(final int dimension); DirectPosition getLowerCorner(); DirectPosition getUpperCorner(); boolean isEmpty(); boolean contains(DirectPosition pos); boolean contains(final BoundingBox3D bbox); boolean intersects(final BoundingBox3D bbox); ReferencedEnvelope3D intersection(ReferencedEnvelope3D env); void include(final BoundingBox3D bbox); void expandToInclude(ReferencedEnvelope3D other); void include(double x, double y, double z); void setBounds(final BoundingBox3D bbox); BoundingBox toBounds(final CoordinateReferenceSystem targetCRS); ReferencedEnvelope transform(CoordinateReferenceSystem targetCRS, boolean lenient); ReferencedEnvelope transform(
            final CoordinateReferenceSystem targetCRS,
            final boolean lenient,
            final int numPointsForTransformation); @Override int hashCode(); @Override boolean equals(final Object other); boolean boundsEquals3D(final org.opengis.geometry.Envelope other, double eps); @Override void include(double x, double y); static ReferencedEnvelope3D EVERYTHING; }