[postgis-users] Documenting performance tip

Markus Schaber schabios at logi-track.com
Fri Feb 4 01:21:38 PST 2005


Hi, Strk,

strk at refractions.net schrieb:
> Markus, thanks for the insight.
> A side-effect of your suggestion is that users will end up
> actually using box2d type in their tables.
> I think they should be warned that those column won't retain
> their original precision between dump/reloads.
> More so now that box2d canonical ascii output has been changed
> to use default precision (%g).
> What do you think ?

Exactly for this reason, I actually try to store a geometry in the column.

SELECT addGeometryColumn('mydb','mytable','bbox','4326','GEOMETRY','2');
UPDATE mytable set bbox = setsrid(box3d(geom_column)::geometry, 4326);

That creates a "geometry" column and inserts a box3d back-casted to
geometry into it. PostGIS 1.0 stores a POLYGON with 5 Ordinates, while
PostGIS 0.8.1 stores something that ouputs as "SRID=4326;BOX3D(...)"
although the column is of type geometry. Both should be without loss.

Markus



--
markus schaber | dipl. informatiker
logi-track ag | rennweg 14-16 | ch 8001 zürich
phone +41-43-888 62 52 | fax +41-43-888 62 53
mailto:schabios at logi-track.com | www.logi-track.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050204/02b569e5/attachment.pgp>


More information about the postgis-users mailing list