[postgis-users] extent buffer issue
Paul Ramsey
pramsey at refractions.net
Thu Sep 21 10:58:22 PDT 2006
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:
select isvalid(extent(geomfromtext('Point(1 1)',-1)));
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:
> hi to all,
>
> the following test-case produces a floating point exception on my box:
>
> select buffer(extent(geomfromtext('Point(1 1)',-1)),1);
>
> the exact error message is in german (sorry for that):
>
> FEHLER: Fliesskommafehler
> DETAIL: Eine ungueltige Fliesskommaoperation wurde signalisiert.
> Das bedeutet wahrscheinlich ein Ergebnis ausserhalb des gueltigen
> Bereiches oder eine ungueltige Operation, zum Beispiel Division
> durch null.
>
> and means (freely translated) :
> ERROR : floating point exception
> DETAILS : an invalid floating point operation was detected. which
> probably means that a result is out of valid range or invalid
> operation, for instance division by zero.
>
> my postgis-version is :
> POSTGIS="1.1.0CVS" GEOS="2.2.2" PROJ="Rel. 4.4.9, 29 Oct 2004"
> USE_STATS DBPROC="0.3.1" RELPROC="0.3.1"'
>
> my postgresql-version is :
> PostgreSQL 8.0.8 on x86_64-pc-linux-gnu, compiled by GCC x86_64-pc-
> linux-gnu-gcc (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
>
> my box is :
> Linux 2.6.10 #2 SMP Tue Feb 15 14:14:46 CET 2005 x86_64 AMD Athlon
> (tm) 64 Processor 3500+ GNU/Linux
>
> does anybody know this issue ?
>
> regards
>
> ronald
> _______________________________________________
> 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