[postgis-users] Calculating bbox/extent for set of polygons: ERROR I don't understand

Matthew Pettis matthew.pettis at gmail.com
Sun Aug 19 20:55:02 PDT 2007


Hi,

I'm trying to calculate a minimum bbox/extent for a group of polygons with a
similar attribute.  For this specific case, I am trying to find a
bbox/extent for all of the voting precincts within the same county.

here is the sql I'm executing:
=====================
select
distinct
    extent(the_geom) as the_extent
from
    shp_precincts
where
    county_id = 72
;
=====================

'the_geom' is a polygon representing a voting precinct, and the where clause
subsets to all voting precincts belonging to a specific county.  I get the
following error which I don't understand or know how to correct:

=====================
ERROR:  could not identify an ordering operator for type box2d
HINT:  Use an explicit ordering operator or modify the query.
=====================

Any help is appreciated in resolving this.  What I ultimately want to do is
have a result set that has a bounding box for each county based on the
polygons of precincts that belong to that county.

tia,
Matt
-- 
It is from the wellspring of our despair and the places that we are broken
that we come to repair the world.
-- Murray Waas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070819/e82f5dac/attachment.html>


More information about the postgis-users mailing list