[postgis-users] problem with buffer srid

Paul Ramsey pramsey at refractions.net
Wed Feb 14 12:34:53 PST 2007


Markus Schaber wrote:
> Hi, Galois,
> 
> "Galois" <galois at mundo-r.com> wrote:
> 
>>     I´m wondering what happens when you make a buffer from a geom with a srid. I´ve just buffered one geom but it has no srid (-1), is it normal? I´ve got a line table ( from which i buffered) and a point table ( which want to compare with the buffer), both the same srid. But the buffer maked from the line geom don´t have srid assigned and postgis doesn´t permit me to compare. 
> 
> So you say, that buffering loses the srid? I'm tempted to regard this
> as a bug.

I would too, but it doesn't occur on my version:

  select asewkt(buffer(setsrid(makepoint(0,0),4326),1));

What version are you using that exhibits this behavior?

>> My answer is, how can i buffer something and obtein the resuls with the source-srid?
> 
> setsrid(buffer(yourgeom, 42), getsrid(yourgeom))
> 
> 
> Regards,
> Markus
> 


-- 

   Paul Ramsey
   Refractions Research
   http://www.refractions.net
   pramsey at refractions.net
   Phone: 250-383-3022
   Cell: 250-885-0632



More information about the postgis-users mailing list