[postgis-devel] What is the meaning if this NOTICE?

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Mar 22 11:39:25 PDT 2012


> -----Original Message-----
> From: postgis-devel-bounces at postgis.refractions.net [mailto:postgis-devel-
> bounces at postgis.refractions.net] On Behalf Of Sandro Santilli
> Sent: Thursday, March 22, 2012 2:31 PM
> To: PostGIS Development Discussion
> Subject: Re: [postgis-devel] What is the meaning if this NOTICE?
> 
> On Thu, Mar 22, 2012 at 01:32:34PM -0400, Pierre Racine wrote:
> > > > Actually the message sent by the trunk looks more like this:
> > > >
> > > > ERROR:  GEOSDifference: TopologyException: found non-noded
> > > > intersection
> > > between LINESTRING (-1.11776e+06 848032, -1.11774e+06 848063) and
> > > LINESTRING (-1.11774e+06 848063, -1.11776e+06 848032) at -
> > > 1117759.3668995597 848039.56686744024
> > >
> > > Different symptoms of the same cause: numerical robustness.
> >
> > Is there anything I can do to get ST_Difference to work on those geometries? I
> tried ST_MakeValid(ST_CollectionExtract(geom, 3)) without success.
> 
> You can try ST_SnapToGrid with some 1e-10 value and grow from there if it still
> fails.

I could isolate the failing geometries:

SELECT ST_Difference(
ST_GeomFromText('MULTIPOLYGON(((-1120500.00000013 850931.058865365,-1120500.00000013 851343.388500772,-1120500.00000013 851342.238600771,-1120496.65482404 851347.702866896,-1120488.2740757 851356.66736311,-1120475.56378846 851364.505057843,-1120448.70477548 851378.286221993,-1120447.69940276 851378.689748921,-1120440.32576317 851357.158137073,-1120435.49444425 851322.788721263,-1120439.08241679 851294.543989806,-1120437.08611496 851276.059482963,-1120435.97528635 851259.701222352,-1120431.47099444 851238.612432494,-1120416.54172253 851215.534832325,-1120399.76268441 851199.494131292,-1120404.78873931 851195.238476585,-1120414.14077069 851192.192829119,-1120435.4492337 851202.892120665,-1120445.31481631 851203.76767834,-1120452.34940064 851194.387925372,-1120452.50056247 851179.316627005,-1120447.52084739 851165.629495313,-1120440.73809176 851146.699650935,-1120434.55137682 851134.558705589,-1120414.65523656 851124.253336113,-1120392.18853 851117.961191857,-1120375.92967723 851123.814483288,-1120359.53347133 851121.112594648,-1120348.51497642 851112.340636411,-1120344.12604554 851105.443070777,-1120314.93162247 851096.797095781,-1120317.00807309 851088.768433952,-1120314.5302225 851058.390606756,-1120311.07632126 851038.276318,-1120311.89114728 851023.193301808,-1120323.47429901 851008.830646795,-1120336.49428002 851006.76695239,-1120344.40604474 851000.425198249,-1120353.8668527 850987.843696471,-1120365.0988556 850977.664571017,-1120375.16613279 850969.06392488,-1120383.49885531 850963.763924916,-1120382.65193552 850949.264678604,-1120368.32362042 850941.467289378,-1120349.54875334 850944.801411807,-1120334.23192044 850937.671863004,-1120324.22077932 850928.221770058,-1120315.70995155 850916.355432305,-1120300.91308137 850913.173098367,-1120288.96180155 850923.156946778,-1120279.31628622 850924.269985056,-1120268.83616514 850916.590613397,-1120261.54698315 850911.706431078,-1120246.76556003 850905.684936531,-1120227.89241943 850903.268633352,-1120212.26722039 850909.361927021,-1120201.17850399 850912.913187173,-1120193.03566029 850917.292952443,-1120186.53214665 850921.171228147,-1120181.71359048 850922.897135356,-1120170.39303879 850895.639780152,-1120172.01391215 850890.953800797,-1120177.00241446 850890.252953257,-1120183.30947182 850890.104004746,-1120195.64661105 850886.385209307,-1120210.94361343 850883.499574907,-1120218.64743321 850872.027239986,-1120237.00004624 850868.948941289,-1120254.5324087 850866.355303515,-1120275.1210498 850866.610980746,-1120291.72500085 850864.520470015,-1120302.83839249 850862.385085408,-1120311.67508748 850878.029567817,-1120317.46370188 850885.109053783,-1120348.98490992 850902.938841338,-1120356.22117232 850904.822183077,-1120369.12678006 850904.634652826,-1120391.54554217 850898.310371599,-1120398.3018761 850897.2256077,-1120408.36326436 850905.236804122,-1120411.02068127 850906.799841289,-1120413.78309611 850908.006180984,-1120416.94580317 850910.497149623,-1120421.58509254 850914.591372869,-1120426.22438116 850918.685596335,-1120431.36920605 850923.70680221,-1120429.95035878 850933.787257425,-1120426.82230843 850945.696613161,-1120429.2235644 850953.406278383,-1120434.00882467 850958.321740774,-1120437.70060035 850959.025219069,-1120445.38153632 850955.462538648,-1120451.90352691 850949.224159955,-1120460.5731574 850950.23325811,-1120469.68405535 850953.704924687,-1120476.09680994 850954.434665507,-1120480.57312263 850947.202833025,-1120487.09816537 850934.353737541,-1120496.99430665 850929.891288942,-1120500.00000013 850931.058865365)),((-1120454.65059965 851398.987794579,-1120454.65059965 851398.987794578,-1120471.29740418 851390.752207082,-1120454.65059965 851398.987794579)))')
,
ST_GeomFromText('POLYGON((-1120500.00000013 851253.462787063,-1120500.00000013 851299.817938382,-1120492.149841 851293.841788941,-1120482.97960723 851276.763128119,-1120483.65063424 851268.831820142,-1120487.13396466 851262.139058603,-1120494.20548705 851256.380154043,-1120500.00000013 851253.462787063))')
)

I'll try snapping...

Pierre



More information about the postgis-devel mailing list