[postgis-users] ERROR: GEOS difference() threw an error!

Andreas Laggner andreas.laggner at fal.de
Fri Oct 12 05:26:45 PDT 2007


Hi Regina,

i was curious who you are....sadly i could not find a photo from you, 
but i found some blogs and i like them:

So the point is this - if you are spending your time simply learning how 
to use proprietary tools instead of really trying to understand the 
fundamentals that drive these tools, you have totally missed the boat 
and you will be forever playing catchup.

I have found that Open source really enforces understanding fundamentals 
more than proprietary does and that is a very good thing because that 
knowledge has a longer shelf-life.


The querys you sent to me:
No1: runs through without results
No2: ran over 6 hour before a canceled it??
No3: i get the error very fast:
NOTICE:  TopologyException: found non-noded intersection between 
3.65518e+06 5.52796e+06, 3.65519e+06 5.52798e+06 and 3.65518e+06 
5.52796e+06, 3.65519e+06 5.52798e+06 3.65519e+06 5.52798e+06
ERROR: GEOS difference() threw an error!
SQL Status:XX000
No4: runs for 5 hours now - i will cancel this query soon

have a nice weekend!!

hasta luego      Andreas




Obe, Regina schrieb:
> Andreas,
>
> I'm not sure what causes the below problem you described, but just to help zooming in further on the location of the problem, can you try the following statements separately and let us know if any return an error and how many records you get from each. 
>
> SELECT ffh_id, st_geometrytype(ST_Union(the_geom)) As gtype
>     FROM test_natura_full 
> GROUP BY ffh_id
> HAVING st_isvalid(ST_union(the_geom)) = false;
>
> SELECT spa_id, st_geometrytype(ST_union(the_geom)) As 
>  the_geom
>     FROM test_natura_full 
> GROUP BY spa_id
> HAVING st_isvalid(ST_union(the_geom)) = false;
>
> SELECT 
>  ffh_singlerep.ffh_name,ffh_singlerep.ffh_land,ffh_singlerep.ffh,ffh_singlerep.ffh_id, 
>     null as spa_name,null as spa_land,null as spa,null as spa_id,
>     ST_Difference(ffh_singlerep.the_geom, test_natura_full.the_geom) As 
>  the_geom
>  FROM ffh_singlerep INNER JOIN (SELECT ffh_id, ST_union(the_geom) As 
>  the_geom    
> FROM test_natura_full GROUP BY ffh_id) As test_natura_full ON 
>  ffh_singlerep.ffh_id = test_natura_full.ffh_id
>     AND ST_Intersects(ffh_singlerep.the_geom, test_natura_full.the_geom)
>  WHERE ST_IsEmpty(ST_Difference(ffh_singlerep.the_geom, 
>  test_natura_full.the_geom)) = false;
>
>
>  SELECT null as ffh_name,null as ffh_land,null as ffh,null as ffh_id,    
>  spa_singlerep.spa_name,spa_singlerep.spa_land,spa_singlerep.spa,spa_singlerep.spa_id, 
>
>     ST_Difference(spa_singlerep.the_geom, test_natura_full.the_geom) As 
>  the_geom
>  FROM spa_singlerep INNER JOIN  (SELECT spa_id, ST_union(the_geom) As 
>  the_geom
>     FROM test_natura_full GROUP BY spa_id) As test_natura_full ON 
>  spa_singlerep.spa_id = test_natura_full.spa_id
>     AND ST_Intersects(spa_singlerep.the_geom,test_natura_full.the_geom)
>  WHERE ST_IsEmpty(ST_Difference(spa_singlerep.the_geom, 
>  test_natura_full.the_geom)) = false;
>
>
> Hope this helps,
> Regina
>  
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Andreas Laggner
> Sent: Tuesday, October 09, 2007 9:20 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] ERROR: GEOS difference() threw an error!
>
> Andreas Laggner schrieb:
>   
>> can someone tell me what causes this Error?
>>
>> ERROR: GEOS difference() threw an error!
>> SQL Status:XX000
>>     
> More Informations from the postgresql Logfile:
> NOTICE:  TopologyException: found non-noded intersection between 
> 3.81546e+06 5.4495e+06, 3.81559e+06 5.44944e+06 and 3.81546e+06 
> 5.4495e+06, 3.81551e+06 5.44948e+06 3.81551e+06 5.44948e+06
> ERROR:  GEOS difference() threw an error!
>
>   
>> the query:
>> INSERT INTO test_natura_full
>> SELECT 
>> ffh_singlerep.ffh_name,ffh_singlerep.ffh_land,ffh_singlerep.ffh,ffh_singlerep.ffh_id, 
>>
>>    null as spa_name,null as spa_land,null as spa,null as spa_id,
>>    ST_Difference(ffh_singlerep.the_geom, test_natura_full.the_geom) As 
>> the_geom
>> FROM ffh_singlerep INNER JOIN (SELECT ffh_id, ST_union(the_geom) As 
>> the_geom
>>    FROM test_natura_full GROUP BY ffh_id) As test_natura_full ON 
>> ffh_singlerep.ffh_id = test_natura_full.ffh_id
>>    AND ST_Intersects(ffh_singlerep.the_geom, test_natura_full.the_geom)
>> WHERE ST_IsEmpty(ST_Difference(ffh_singlerep.the_geom, 
>> test_natura_full.the_geom)) = false
>> UNION
>> SELECT null as ffh_name,null as ffh_land,null as ffh,null as ffh_id,
>>    
>> spa_singlerep.spa_name,spa_singlerep.spa_land,spa_singlerep.spa,spa_singlerep.spa_id, 
>>
>>    ST_Difference(spa_singlerep.the_geom, test_natura_full.the_geom) As 
>> the_geom
>> FROM spa_singlerep INNER JOIN  (SELECT spa_id, ST_union(the_geom) As 
>> the_geom
>>    FROM test_natura_full GROUP BY spa_id) As test_natura_full ON 
>> spa_singlerep.spa_id = test_natura_full.spa_id
>>    AND ST_Intersects(spa_singlerep.the_geom,test_natura_full.the_geom)
>> WHERE ST_IsEmpty(ST_Difference(spa_singlerep.the_geom, 
>> test_natura_full.the_geom)) = false;
>>
>>
>> I had no problems with a small dataset (15 and 4 polygons), here i 
>> have 28000 and 1500 rows. All geometries are valid and singlepart 
>> Polygons.
>>
>> Cheers      Andreas
>>
>>
>>     
>
>
>   


-- 
Dipl. Geoökologe Andreas Laggner
Institut für Ländliche Räume (LR)
Bundesforschungsanstalt für Landwirtschaft (FAL)

Institute of Rural Studies
Federal Agricultural Research Centre (FAL)

Bundesallee 50
D-38116 Braunschweig

Tel.: (+49) (0)531 596 5515
Fax: (+49) (0)531 596 5599
E-mail: andreas.laggner at fal.de
Homepage: http://www.lr.fal.de/ 




More information about the postgis-users mailing list