[postgis-users] Inserting geometry

strk at refractions.net strk at refractions.net
Mon Jan 31 14:12:06 PST 2005


On Mon, Jan 31, 2005 at 06:43:06PM +0100, Markus Schaber wrote:
> 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:

PostGIS < 1.0 had BOX-only geometry, so
# 'BOX3D(1 2,3 4)'::box3d::geometry
always worked 

--strk;


> 
> 
> 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



> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list