[postgis-users] What can i do if polygons are not valid????

Andreas Laggner andreas.laggner at fal.de
Fri Aug 17 02:04:08 PDT 2007


Hi,

who can tell me something about the error? It occurs with this 
statements and i guess it is because 122 polygons from ffh are not valid!

create table natura2000
    (ffh_name character varying(80), ffh_land character varying(3), ffh 
smallint, ffh_id smallint,
     spa_name character varying(80), spa_land character varying(3), spa 
smallint, spa_id smallint) with oids;
select 
addgeometrycolumn('','natura2000','the_geom','31467','MULTIPOLYGON',2);
alter table natura2000 drop constraint enforce_geotype_the_geom;
insert into natura2000
    select 
t1.name,t1.bland,t1.ffh,t1.ffh_id,t2.name,t2.bland,t2.spa,t2.spa_id,
            geomunion(t1.the_geom, t2.the_geom)
    from ffh t1, spa t2 where t1.the_geom && t2.the_geom;

ERROR: GEOS union() threw an error!
SQL Status:XX000

ffh 27000 rows (122 not valid), spa 1800 rows

Are there any possibilities to repair ffh or what else can i do????

bye      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