[postgis-users] dropping bboxes doesn't work ?!
Markus Schaber
schabi at logix-tt.com
Mon Oct 17 02:14:53 PDT 2005
Hi, Ronald,
R. Müller wrote:
> good news : this seems to be not the problem, it works as well for me.
> but in my cases the following query reports :
>
> 'select box2d(geom),hasbbox(geom),astext(geom) from geotable limit 1'
>
> "BOX(97622 1047225,97825 1047410)";t;"LINESTRING(9.7825 52.36125,9.7804
> 52.3615,9.7649 52.3677,9.7622 52.3705)"
Okay, this query does outputs three things for every row:
- the bounding box (either calculated or cached)
- whether there's a cached bbox
- the textual representation of the geometry (which never includes the
bbox).
> 'select astext(dropbbox(geom)) from geotable' returns in the first row
>
> "LINESTRING(9.7825 52.36125,9.7804 52.3615,9.7649 52.3677,9.7622 52.3705)"
>
> after that the first query returns the same result as above :-( !?
Oh, I think I understand where your problem is. SELECT statements in SQL
usually do not modify the data stored in the tables, they only return
modified copies of the Data to the user.
Could you try
UPDATE geotable SET geom=dropbbox(geom);
and tell us whether your problem remains?
Btw, removing the bboxes will save you a very small amount of disk
space, but will slow down most query operations, e. G. index access with
&&, very much, expecially for geometries with lots of coordinates. Are
you really shure that you want to drop them?
Markus
More information about the postgis-users
mailing list