[postgis-users] odd results from intersection and geomunion
Dylan Beaudette
dylan.beaudette at gmail.com
Mon Oct 8 12:57:15 PDT 2007
Hi,
I am performing some simple geometry operations on two data sets which are
both of type POLYGON and all have valid geometries.
Here is the general idea:
select geomunion(
intersection(geom_A,
buffer( collect(geom_B ))
)
)
group by ...
This query produces two unexpected results:
1. without the GeomUnion: among the POLYGON geomtypes I am also getting some
others...
ogc_fid | isvalid | area | geometrytype | numgeometries
---------+---------+------------------+--------------------+---------------
1051918 | t | 0 | GEOMETRYCOLLECTION | 0
1051930 | t | 99567.4770585895 | MULTIPOLYGON | 2
1072895 | t | 0 | GEOMETRYCOLLECTION | 0
1073017 | t | 566721.275024042 | MULTIPOLYGON | 2
.. not sure how these other types are getting in there - artifacts from the
digitization? Adding a check for geometrytype != GEOMETRYCOLLECTION filters
out some of the noise, but I cannot figure out why they are there in the
first place.
2. with the GeomUnion: I get an error:
NOTICE: TopologyException: side location conflict
(-2.11292e+06,-140347,-140347)
ERROR: GEOS union() threw an error!
System information:
Linux Debian/Unstable
All components of PostGIS built from source
GEOS: 2.2.3
Postgresql: 8.1.3
PostGIS: 1.2.1
Any ideas?
thanks in advance
Dylan
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
More information about the postgis-users
mailing list