[geos-devel] Buffer(box3d()) not returning same SRID

David Blasby dblasby at refractions.net
Tue Feb 17 20:09:55 EST 2004

Tyler Mitchell wrote:

> What's the SRID handling logic that goes on when I embed functions like:
> buffer( box3d ( wkb_geometry ) )
> If I'm comparing this with other geometries that initially had the same 
> SRID, I find I have to add:
> setsrid(buffer( box3d ( wkb_geometry ) ),nnnnnn)
> to make it work.  Yet if I only use Buffer or box3d I don't get this 
> problem.  
> I know my example is a bit weird but bear with me...

Box3d's dont have an SRID.  When they get converted to geometries, they 
have an SRID of -1.  If you do an envelope(<geometry>), you'll get 
something with the same SRID.

The confusing part is that postgis/postgresql will auto-convert types 
for you so you have to be careful.

  buffer( box3d ( wkb_geometry ) )

is probably converting WKB to GEOMETRY to BOX3D to GEOMETRY.


More information about the geos-devel mailing list