[postgis-users] Inserting geometry

Markus Schaber schabios at logi-track.com
Mon Jan 31 09:43:06 PST 2005


Hi, Tom,

Kralidis,Tom [Burlington] schrieb:
> Whoops, thanks for the info.  I was trying to insert as a bbox.  A
> GeomFromBbox would be nice :)

In PostGIS 1.0, both box3d and box2d can be converted into a bbox by a
simple cast:


lwgeom=# select asText(('BOX3D(1 2,3 4)'::box3d)::geometry);
             astext
--------------------------------
 POLYGON((1 2,1 4,3 4,3 2,1 2))
(1 Zeile)

lwgeom=# select asText(('BOX(1 2,3 4)'::box2d)::geometry);
             astext
--------------------------------
 POLYGON((1 2,1 4,3 4,3 2,1 2))
(1 Zeile)

HTH,
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/20050131/cb850eae/attachment.pgp>


More information about the postgis-users mailing list