Creating bounding boxes

Like regular geometries, a bounding box can be created from its textual representation:

SELECT 'BOX(319590 5817855,391590 5818055)'::box2d;  

It can also be created using a function, ST_MakeBox2D, which accepts two points:

SELECT ST_MakeBox2D(
ST_MakePoint(319590,5817855),
ST_MakePoint(391590,5818055)
);

The first argument is a lower-left point, with coordinates of (minX,minY), and the second is an upper-right point, with coordinates of (maxX,maxY).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset