@Deprecated public class GeneralEnvelope extends GeneralEnvelope implements Cloneable
This class is kept as a workaround for the "not yet working"
constructor in the Apache SIS class, and for some methods not yet ported to SIS (because of uncertain value).
Note that the
reorderCorners() method in Geotk has been renamed
simplify() in SIS,
reduceToDomain(false) has been renamed as
|Constructor and Description|
Constructs an empty envelope with the specified coordinate reference system.
Constructs a new envelope with the same data than the specified envelope.
Constructs a georeferenced envelope from a grid envelope transformed using the specified math transform.
Constructs two-dimensional envelope defined by a
|Modifier and Type||Method and Description|
Fixes rounding errors up to a given tolerance level.
add, add, castOrCopy, clone, intersect, normalize, setCoordinateReferenceSystem, setEnvelope, setEnvelope, setRange, setToInfinite, setToNaN, simplify, subEnvelope, translate
contains, contains, contains, equals, getLowerCorner, getMedian, getSpan, getUpperCorner, intersects, intersects, toSimpleEnvelopes
public GeneralEnvelope(CoordinateReferenceSystem crs)
crs- The coordinate reference system.
public GeneralEnvelope(Envelope envelope)
envelope- The envelope to copy.
public GeneralEnvelope(Rectangle2D rect)
Rectangle2D. The coordinate reference system is initially undefined.
rect- The rectangle to copy.
public GeneralEnvelope(GridEnvelope gridEnvelope, PixelInCell anchor, MathTransform gridToCRS, CoordinateReferenceSystem crs) throws IllegalArgumentException
anchorvalue. This constructor creates an envelope containing entirely all pixels on a best effort basis - usually accurate for affine transforms.
Note: The convention is specified as a
PixelInCell code instead than
the more detailed
PixelOrientation, because the later is restricted to the
two-dimensional case while the former can be used for any number of dimensions.
gridEnvelope- The grid envelope in integer coordinates.
anchor- Whatever grid coordinates map to pixel center or pixel corner.
gridToCRS- The transform (usually affine) from grid envelope to the CRS.
crs- The CRS for the envelope to be created, or
MismatchedDimensionException- If one of the supplied object doesn't have a dimension compatible with the other objects.
IllegalArgumentException- if an argument is illegal for some other raisons, including failure to use the provided math transform.
public void roundIfAlmostInteger(double factor, int maxULP)
ordinates[i]at dimension i, this method multiplies the ordinate value by the given factor, then round the result only if the product is close to an integer value. The threshold is defined by the
maxULPargument in ULP units (Unit in the Last Place). If and only if the product has been rounded, it is divided by the factor and stored in this envelope in place of the original ordinate.
This method is useful after envelope calculations subject to rounding errors, like the
GeneralEnvelope(GridEnvelope, PixelInCell, MathTransform, CoordinateReferenceSystem)
factor- The factor by which to multiply ordinates before rounding and divide after rounding. A recommended value is 360.
maxULP- The maximal change allowed in ULPs (Unit in the Last Place).
public Rectangle2D toRectangle2D() throws IllegalStateException
Rectangle2Dwith the minimum and maximum values of this
Envelope. This envelope must be two-dimensional before this method is invoked.
IllegalStateException- if this envelope is not two-dimensional.
Copyright © 2009–2015 Geotoolkit.org. All rights reserved.