[postgis-users] Postgis errors
Brent Wood
pcreso at pcreso.com
Thu Mar 10 15:48:10 PST 2005
Can anyone offer some advice?
The source data was downloded from a NOAA site, as topologically correct e00
files. If an upgrade for PostGIS/GEOS is likely to help I'll try to get the IT
staff to do this.
I have a "layer" which is giving me problems when queried with PostGIS.
The layer is derived from a table of MULTIPOLYGONS, each record being
datestamped and having a density value (ct).
I'm trying to derive the outer boundary for selected polygons at particular
dates, for specified density ranges. The SQL (embedded in a script to loop
through the required dates) is:
CT2a=1
CT2b=35
psql $DB -t -A -c "select $CT2a as new_ct,
transform(boundary(memgeomunion(simplify(the_geom,300))), 4326)
from natice
where _date = '$DATE'
and ct >= $CT2a
and ct <= $CT2b
group by new_ct;" >> ${DATE}.txt
I get occasional different errors, depending on whether & how much I simplify
the source data & memgeomunion seems more robust than geomunion.
with:
transform(boundary(memgeomunion(the_geom)),4326)
retrieving category 4 CT boundary (>41)
(68 polygons to merge)
NOTICE: TopologyException: side location conflict (-789350,2.03517e+06)
ERROR: GEOS union() threw an error!
but change the query to:
transform(boundary(memgeomunion(simplify(the_geom,600))),4326)
and it works perfectly.
Another PostGIS error which is simplify dependent (changing simplify can
prevent the error) is:
retrieving category 3 CT boundary (30 - 40)
(3 polygons to merge)
NOTICE: TopologyException: no outgoing dirEdge found
(-1.40494e+06,2.56829e+06)
ERROR: GEOS union() threw an error!
software versions installed:
PostgreSQL 7.4.2,
postgis_version
---------------------------------------
0.8 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
and I think geos-1.0-2
Any help appreciated.
Brent Wood
More information about the postgis-users
mailing list