[Thuban-commits] r2855 - trunk/thuban/Extensions/importMP

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Jul 27 06:48:52 CEST 2008


Author: elachuni
Date: 2008-07-27 06:48:51 +0200 (Sun, 27 Jul 2008)
New Revision: 2855

Modified:
   trunk/thuban/Extensions/importMP/pfm.py
Log:
Polygons are now always generated closed when importing an PFM.


Modified: trunk/thuban/Extensions/importMP/pfm.py
===================================================================
--- trunk/thuban/Extensions/importMP/pfm.py	2008-07-24 09:09:46 UTC (rev 2854)
+++ trunk/thuban/Extensions/importMP/pfm.py	2008-07-27 04:48:51 UTC (rev 2855)
@@ -329,6 +329,9 @@
                     poly['long'].append (-float (match.group('long')))
                     poly['lat'].append (-float (match.group('lat')))
                     data = data[match.end() + 1:]
+            if poly['long'][-1] != poly['long'][0] or poly['lat'][-1] != poly['lat'][0]:
+                poly['long'].append(poly['long'][0])
+                poly['lat'].append(poly['lat'][0])
             try:
                 poly['parsedType'] = polygonTypes[poly['Type']]
             except KeyError, e:



More information about the Thuban-commits mailing list