As you know GeoTools uses OpenGIS declared APIs; BoundingBox and Envelope for example.


picture from geotools docs.


Represents a two-dimensional envelope. This interface combines the ideas of GeographicBoundingBox with those of Envelope. It provides convenience methods to assist in accessing the formal properties of this object. Those methods (for example getMinX()) match common usage in existing libraries like Java2D.


A minimum bounding box or rectangle. Regardless of dimension, an Envelope can be represented without ambiguity as two direct positions (coordinate points). To encode an Envelope. it is sufficient to encode these two points. This is consistent with all of the data types in this specification, their state is represented by their publicly accessible attributes.

I read the docs. Both of them describe a bounding region, but what is the difference?And what need to declare both? Where do you use them?


The main difference is that a bounding box is 2 dimensional while an envelope has 2 or more dimensions. A dimension is a "direction" so for a bounding box there are 2 (North and East or X and Y) while for an envelope there can be lots like North, East, Up, or X, Y and time, or X,Y,Z,T.

  • at least in PostGIS there as a box3d ... – Nicklas Avén Oct 11 '15 at 13:27
  • Can you help me to understand better what you wrote? I didn't pick up what dimension means exactly. - @iant – Diogo Caribé May 19 '17 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.