Adds a point to this envelope. The resulting envelope is the smallest envelope that
contains both the original envelope and the specified point.
After adding a point, a call to
#contains(DirectPosition)with the added point as an argument will return
true, except if one of the point
ordinates was
Double#NaN in which case the corresponding ordinate has been ignored.
Pre-conditions
This method assumes that the specified point uses the same CRS than this envelope.
For performance reasons, it will no be verified unless Java assertions are enabled.
Spanning the anti-meridian of a Geographic CRS
This method supports envelopes spanning the anti-meridian. In such cases it is possible to
move both envelope borders in order to encompass the given point, as illustrated below (the
new point is represented by the
+ symbol):
textThe default implementation moves only the border which is closest to the given point.