Re: [FreeGeoCZ] invalid polygon geometry
Dan Barta <[email protected]>
| Newsgroups | gmane.comp.gis.grass.cz |
|---|---|
| Message-ID | <[email protected]> |
Diky za podnety, pokusim se shrnout: ---------------------------- 1) nejjednodussi je proste vadne polygony vyhazet, napr. takto: ---------------------------- TRUNCATE TABLE "polygon"; INSERT INTO "polygon" SELECT * FROM "polygonZaloha" WHERE ST_IsValid(the_geom); sic ono to vyhaze i ty prvky s relativne snesitelnymi (=pro export prekonatelnymi) problemy (cca 10% z 1600) ---------------------------- 2) vyber jen nekterych chyb podle typu konci padem ---------------------------- SELECT gid, ST_IsValidReason(the_geom) AS invalid from "polygon" where ST_IsValid(the_geom) <> true; NOTICE: Self-intersection at or near point -640685 -1.04412e+06 NOTICE: Holes are nested at or near point -640810 -1.04419e+06 NOTICE: Holes are nested at or near point -640778 -1.04425e+06 NOTICE: Ring Self-intersection at or near point -641245 -1.04472e+06 NOTICE: Holes are nested at or near point -640974 -1.04437e+06 NOTICE: Holes are nested at or near point -640722 -1.04436e+06 NOTICE: IllegalArgumentException: Number of points must be 0 or >3 NOTICE: IllegalArgumentException: Number of points must be 0 or >3 ERROR: POSTGIS2GEOS conversion failed ********** Chyba ********** 3) pokus o napravu Mam Ubuntu 9.10 na nem postgis 1.4.0. Ani stabilni 1.5.0 funkci ST_MakeValid() nema. V trunk-devel 2.0 uz se neco chysta [1] a da se to zpetne importovat[2] jako funkce cleaGeometry(), ale na mem vzorku to spadne stejne jako vyse: TRUNCATE TABLE "polygon"; INSERT INTO "polygon" SELECT * FROM "polygonZaloha"; UPDATE "polygon" SET the_geom = cleanGeometry(the_geom) WHERE NOT ST_IsValid(the_geom); Toz tak jsou realizovane vase postrehy, pokud jsem neco opomnel dejte vedet. diky a zdravi Dan Barta [1] http://trac.osgeo.org/postgis/ticket/399 [2] http://www.sogis1.so.ch/sogis/dl/postgis/cleanGeometry.sql _______________________________________________ FreeGeoCZ mailing list [email protected] http://mailman.fsv.cvut.cz/mailman/listinfo/freegeocz