[postgis-users] invalid geometry crashes postgres when trying to use buffer

Kevin Neufeld kneufeld at refractions.net
Wed Dec 9 09:26:19 PST 2009


Try reducing the precision of your geometry.

PostGIS doesn't actually have a precision reducer function yet, but ST_SnapToGrid comes close.

-- Kevin

Christophe Diericx wrote:
> Hello everyone,
> 
> Issuing the following query (while trying to repair an invalid
> geometry):
> 
> ** select buffer(ST_GeomFromText('mypoly',32767),0)
> 
> crashes postgresql hard (extract from the postgresql error-log here:
> http://paste.pocoo.org/show/155923/).
> 
> 'mypoly' can be seen here: http://paste.pocoo.org/show/155921/.
> 
> 32767 corresponds to the following proj4 string: "+proj=lcc
> +lat_1=49.8333333333 +lat_2=51.1666666667 +lat_0=90 +lon_0=4.3569397222
> +x_0=150000.01256 +y_0=5400088.4378 +ellps=intl
> +towgs84=81,120,129,0,0,0,0 +units=m +no_defs"
> 
> Some more information about my setup:
> 
> -- select postgis_full_version()
> "POSTGIS="1.3.5" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.0, 21 Dec 2007"
> USE_STATS"
> -- select version()
> "PostgreSQL 8.3.7 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.4
> (Ubuntu 4.2.4-1ubuntu3)"
> 
> Is this a known issue and is this fixed in later builds?
> 
> Does anyone have an idea for a workaround with my current versions?
> 
> Thanks in advance for all reactions!
> 
> Christophe
> _______________________________________________
> 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