maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] [PATCH] [ocitysmap] Fix GEOS Intersection error whe


From: Étienne Loks
Subject: Re: [Maposmatic-dev] [PATCH] [ocitysmap] Fix GEOS Intersection error when dealing with malformed ways
Date: Thu, 19 Apr 2012 01:19:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20120329 Icedove/10.0.3

On 19/04/2012 00:49, Jeroen van Rijn wrote:
On Thu, Apr 19, 2012 at 00:39, Étienne Loks<address@hidden>  wrote:
+            try:
+                cursor.execute(query % {'way':'way'})
+            except psycopg2.InternalError:
+                # This exception generaly occurs when inappropriate ways have
+                # to be cleaned. Using a buffer of 0 generaly helps to clean
+                # them. This operation is not applied by default for
+                # performance.
+                db.rollback()
+                cursor.execute(query % {'way':'st_buffer(way, 0)'})

That's a very quick fix for the GEOS error.

Reading through the patch it looks to be that if psycopg2 fails for
another reason, however unlikely that might seem, you end up with a
runaway process?

Unless I am loosing my Python the exception will raise a second time while executing the query with the buffer without being catch.

Best regards,

--
Étienne Loks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]