Hi, ср, 19 сент. 2018 г. в 12:52, Birgit Laggner <[email protected]>:
> Dear Darafei, > > in preparation of filing the ticket, I tested the ST_Union on my selected, > supposedly problematic geometries. Interestingly, the ST_Union worked > without a problem on my small selection table. I aborted the ticket > creation because I can't file this as a reproducible bug. > Things to consider: - ST_Union(geom, geom) and ST_Union([geom...]) are different code paths; - ST_Union([geom...]) may depend on order of the features; - These bugs are hard to fix as they are hard to reproduce when you're looking at it. Please file the bug/dataset even if you're not sure it is properly reproducible. > > My (then unnecessarily complicated workaround) of course worked fine, too. > That means, I am able to get my work done, unfortunately, I still don't > know what the original problem was. > > I am willing to let it rest and mark it as mysterious behaviour of a large > dataset, as long as nobody has a specific interest to go to the bottom of > the problem? > > Thanks a lot again for the idea with the wrapper to extract to problematic > rows. > > Kind regards, > Birgit > > ------------------------------ > *Von: *"Birgit Laggner" <[email protected]> > > *An: *"PostGIS Users Discussion" <[email protected]> > *Gesendet: *Mittwoch, 19. September 2018 09:47:41 > > *Betreff: *Re: [postgis-users] GEOSUnaryUnion: TopologyException: found > non-noded intersection BUT geom is valid > > Dear Darafei, > > good idea to write a wrapper to ferret out the offending rows. I had to > change it a bit because I don't use ST_Union(geometry, geometry) but the > aggregate ST_Union(geometry). Since I am not very experienced in writing > aggregates, I modified the wrapper that it fits for ST_Union(geometry[]) > and used it in my query with ST_Union_Fails(array_agg(geom)). > > I have found 3 groups with a total of 923 geometries which returned an > error with ST_Union. > > As soon as I get access to my old userID, I will file the them as a ticket. > > In the meantime I will try to union the problematic geometries in a loop > one at a time with st_makevalid after each loop - maybe that will work as a > workaround, now I could reduce the number of geometries dramatically. > > > Thank you very much for your help! > > Kind regards, > Birgit > > > > ------------------------------ > *Von: *"Darafei \"Komяpa\" Praliaskouski" <[email protected]> > *An: *"PostGIS Users Discussion" <[email protected]> > *Gesendet: *Mittwoch, 19. September 2018 02:46:42 > *Betreff: *Re: [postgis-users] GEOSUnaryUnion: TopologyException: found > non-noded intersection BUT geom is valid > > Hi, > This is not supposed to happen. > > Can you please isolate the offending rows unioning them pairwise and file > them as a ticket? Here's a handy helper function that returns True if Union > failed: > > create or replace function st_union_fails(geom1 geometry, geom2 geometry) > returns boolean > as $$ > begin > begin > geom1 = ST_Union(Geom1, geom2); > return false; > exception when others > then > return true; > end; > end; > $$ > language plpgsql; > > > > > вт, 18 сент. 2018 г. в 16:25, Birgit Laggner <[email protected]>: > >> Dear discussion group, >> >> I am trying to ST_Union several polygons and get a TopologyException >> (GEOSUnaryUnion: TopologyException: found non-noded intersection between >> LINESTRING (3.56442e+06 5.42679e+06, 3.56442e+06 5.42679e+06) and >> LINESTRING (3.56442e+06 5.42679e+06, 3.56442e+06 5.42679e+06) at >> 3564420.7944701263 5426786.9800475985). >> I have tested with ST_Valid and all polygons in the datasets are valid. >> >> The dataset is pretty large (53.5 Mio. polygons) and will probably get >> grouped into around 8.7 Mio resulting geometries during ST_Union. >> >> If I try to ST_Union the geometries near the point ST_Union mentions in >> the error message (ST_Buffer with up to 100 metres), everything works fine. >> I am out of ideas how to find the problematic geometry or at least how to >> work around the TopologyException. >> >> My PostGIS version is: "POSTGIS="2.3.3 r15473" GEOS="3.5.1-CAPI-1.9.1 >> r4246" SFCGAL="1.2.2" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL >> 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" TOPOLOGY >> RASTER" >> >> >> I would be very glad if anyone would come up with ideas how to solve my >> problem. >> >> Thanks a lot in advance! >> >> Regards, >> Birgit >> >> >> _______________________________________________ >> postgis-users mailing list >> [email protected] >> https://lists.osgeo.org/mailman/listinfo/postgis-users >> > -- > Darafei Praliaskouski > Support me: http://patreon.com/komzpa > > _______________________________________________ > postgis-users mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/postgis-users > > _______________________________________________ > postgis-users mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/postgis-users > _______________________________________________ > postgis-users mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/postgis-users -- Darafei Praliaskouski Support me: http://patreon.com/komzpa
_______________________________________________ postgis-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/postgis-users
