[postgis-users] extent buffer issue

"R. Müller" r.mueller at unicomp-berlin.de
Fri Sep 22 00:12:04 PDT 2006


you're right - my fault. But i'm sure, there was a version, this 
construct was working ... ;-)

the 'extent' was  for aggregating geometries, as in my query i don't 
know how much points are involved. sometimes only one. And thats the 
case where the query was failing.

probably its better to 'collect' the geometries than 'extent' them, as 
collect returns a valid geometry(-collection) ?


regards

ronald



Paul Ramsey wrote:
> Strictly speaking, what you are doing is creating an illegal case...  
> here is what happens:
> 
> geomfromtext() - creates a point
> extent() - creates a box representing the point... it's a point, so all 
> for corners of the box are coincident
> buffer() - buffer doesn't work on boxes, only on geometries, so the box 
> is first cast into a geometry, a polygon in fact, with all the points 
> coincident... that's illegal
> 
> Try this as a confirmation:
> 
>   ^
> 
> When you cast the 0-dimensional box as a geometry, the geometry is 
> invalid.  The only workaround would be for the box->geometry cast to 
> recognize the two corner cases (box is actually a line, box is actually 
> a point) can cast to those specializations instead.
> 
> P
> 
> On 21-Sep-06, at 7:44 AM, R. Müller wrote:
> 



More information about the postgis-users mailing list