[DebianGIS-dev] r2247 - in packages/thuban/branches/upstream/current: . Data Data/iceland Doc/technotes Extensions Extensions/gMapTiles Extensions/gMapTiles/sample Extensions/gMapTiles/test Extensions/gns2shp Extensions/gns2shp/test Extensions/importMP Extensions/importMP/test Extensions/svgexport Extensions/umn_mapserver Extensions/umn_mapserver/sample Extensions/umn_mapserver/test Extensions/wms Extensions/wms/test Resources Resources/XML Thuban Thuban/Lib Thuban/Model Thuban/UI libraries/pyshapelib libraries/thuban packaging/debian packaging/debian/patches packaging/windows po test

frankie at alioth.debian.org frankie at alioth.debian.org
Tue May 26 20:36:51 UTC 2009


Author: frankie
Date: 2009-05-26 20:36:51 +0000 (Tue, 26 May 2009)
New Revision: 2247

Added:
   packages/thuban/branches/upstream/current/Data/
   packages/thuban/branches/upstream/current/Data/iceland/
   packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.dbf
   packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.shp
   packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.shx
   packages/thuban/branches/upstream/current/Data/iceland/island.tfw
   packages/thuban/branches/upstream/current/Data/iceland/island.tif
   packages/thuban/branches/upstream/current/Data/iceland/political.dbf
   packages/thuban/branches/upstream/current/Data/iceland/political.shp
   packages/thuban/branches/upstream/current/Data/iceland/political.shx
   packages/thuban/branches/upstream/current/Data/iceland/roads-line.dbf
   packages/thuban/branches/upstream/current/Data/iceland/roads-line.shp
   packages/thuban/branches/upstream/current/Data/iceland/roads-line.shx
   packages/thuban/branches/upstream/current/Data/iceland_sample.thuban
   packages/thuban/branches/upstream/current/Data/iceland_sample_class.thuban
   packages/thuban/branches/upstream/current/Data/iceland_sample_raster.thuban
   packages/thuban/branches/upstream/current/Data/iceland_sample_size.thuban
   packages/thuban/branches/upstream/current/Data/iceland_sample_test.thuban
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/README.txt
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/__init__.py
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/exportGMapTiles.py
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/exporter.py
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/README.txt
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/sample.html
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/tile.py
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/test/
   packages/thuban/branches/upstream/current/Extensions/gMapTiles/test/test_gMapTileExport.py
   packages/thuban/branches/upstream/current/Extensions/gns2shp/README
   packages/thuban/branches/upstream/current/Extensions/importMP/
   packages/thuban/branches/upstream/current/Extensions/importMP/README
   packages/thuban/branches/upstream/current/Extensions/importMP/__init__.py
   packages/thuban/branches/upstream/current/Extensions/importMP/importMP.py
   packages/thuban/branches/upstream/current/Extensions/importMP/pfm.py
   packages/thuban/branches/upstream/current/Extensions/importMP/test/
   packages/thuban/branches/upstream/current/Extensions/importMP/test/snippets.py
   packages/thuban/branches/upstream/current/Extensions/importMP/test/test_pfm.py
   packages/thuban/branches/upstream/current/Extensions/svgexport/TODO
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.html
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.map
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/index.html
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test.map
   packages/thuban/branches/upstream/current/Extensions/wms/test/sample.xml
   packages/thuban/branches/upstream/current/packaging/debian/bitmappath.patch
   packages/thuban/branches/upstream/current/packaging/debian/patches/
   packages/thuban/branches/upstream/current/packaging/debian/patches/locale.patch
   packages/thuban/branches/upstream/current/packaging/debian/patches/setup.py.patch
   packages/thuban/branches/upstream/current/packaging/windows/Thuban-1.2.0_1.exe.readme.txt
   packages/thuban/branches/upstream/current/test/test_mapservpostgis.py
Removed:
   packages/thuban/branches/upstream/current/MANIFEST
   packages/thuban/branches/upstream/current/PKG-INFO
   packages/thuban/branches/upstream/current/Resources/Locale/
   packages/thuban/branches/upstream/current/po/thuban.pot
Modified:
   packages/thuban/branches/upstream/current/ChangeLog
   packages/thuban/branches/upstream/current/Doc/technotes/README
   packages/thuban/branches/upstream/current/Doc/technotes/coding_guidelines.txt
   packages/thuban/branches/upstream/current/Doc/technotes/release_process.txt
   packages/thuban/branches/upstream/current/Doc/technotes/string_representation.txt
   packages/thuban/branches/upstream/current/Extensions/gns2shp/gns2shp.py
   packages/thuban/branches/upstream/current/Extensions/gns2shp/test/README
   packages/thuban/branches/upstream/current/Extensions/gns2shp/test/ls.txt
   packages/thuban/branches/upstream/current/Extensions/gns2shp/test/test_gns2shp.py
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mapfile.py
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_export.py
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_handle.py
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_import.py
   packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test_mapserver.py
   packages/thuban/branches/upstream/current/Extensions/wms/__init__.py
   packages/thuban/branches/upstream/current/Extensions/wms/layer.py
   packages/thuban/branches/upstream/current/Extensions/wms/wms.py
   packages/thuban/branches/upstream/current/NEWS
   packages/thuban/branches/upstream/current/README
   packages/thuban/branches/upstream/current/Releasenotes.txt
   packages/thuban/branches/upstream/current/Resources/XML/thuban-1.1.dtd
   packages/thuban/branches/upstream/current/Resources/XML/thuban-1.2.1.dtd
   packages/thuban/branches/upstream/current/Thuban/Lib/fileutil.py
   packages/thuban/branches/upstream/current/Thuban/Model/load.py
   packages/thuban/branches/upstream/current/Thuban/Model/resource.py
   packages/thuban/branches/upstream/current/Thuban/Model/transientdb.py
   packages/thuban/branches/upstream/current/Thuban/UI/__init__.py
   packages/thuban/branches/upstream/current/Thuban/UI/application.py
   packages/thuban/branches/upstream/current/Thuban/UI/colordialog.py
   packages/thuban/branches/upstream/current/Thuban/UI/dock.py
   packages/thuban/branches/upstream/current/Thuban/UI/legend.py
   packages/thuban/branches/upstream/current/Thuban/UI/mainwindow.py
   packages/thuban/branches/upstream/current/Thuban/UI/projdialog.py
   packages/thuban/branches/upstream/current/Thuban/UI/view.py
   packages/thuban/branches/upstream/current/Thuban/UI/viewport.py
   packages/thuban/branches/upstream/current/Thuban/__init__.py
   packages/thuban/branches/upstream/current/Thuban/thuban_cfg.py
   packages/thuban/branches/upstream/current/Thuban/version.py
   packages/thuban/branches/upstream/current/libraries/pyshapelib/shptreemodule.c
   packages/thuban/branches/upstream/current/libraries/thuban/gdalwarp.cpp
   packages/thuban/branches/upstream/current/setup.py
   packages/thuban/branches/upstream/current/test/postgissupport.py
   packages/thuban/branches/upstream/current/test/test_baserenderer.py
   packages/thuban/branches/upstream/current/test/test_layer.py
   packages/thuban/branches/upstream/current/test/test_save.py
Log:
[svn-upgrade] Integrating new upstream version, thuban (1.2.1+svn2877)

Modified: packages/thuban/branches/upstream/current/ChangeLog
===================================================================
--- packages/thuban/branches/upstream/current/ChangeLog	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/ChangeLog	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,5 +1,121 @@
+2009-05-18 Didrik Pinte <dpinte at dipole-consulting.com>
+
+  * Thuban/UI/colordialog.py : update wxpython lib to wx (will not work with 2.4)
+  * Thuban/UI/dock.py : removed deprecated call to SetSashBorder
+  * Thuban/UI/projdialog.py : fix a utf problem when calling pyprojection
+  
+2009-05-18 Didrik Pinte <dpinte at dipole-consultin.com>
+
+  * Thuban/UI/application.py : removed unneeded hardcoded load of extensions
+
+2009-05-18 Didrik Pinte <dpinte at dipole-consulting.com>
+
+  * Thuban/UI/__init__.py, application.py : bugfix for wxpython 2.8
+  * setup.py : removed some unneeded dll's from wxproj compilation
+  * Thuban/Lib/fileutil.py : added get_thuban_dir() method managing freezed path's
+  * Thuban/__init__.py, Thuban/Model/resource.py : uses the new get_thuban_dir() method
+
+2009-05-18 Didrik Pinte <dpinte at dipole-consulting.com>
+
+  * setup.py : updated to run with wxpython 2.8
+
+2009-04-04 Didrik Pinte <dpinte at dipole-consulting.com>
+
+  * Thuban/UI/mainwindow.py : completed command methods by allowing to remove
+    from menu and toolbar
+
+2009-03-30 Didrik Pinte <dpinte at dipole-consulting.com>
+
+   * Thuban/version.py : resetted to svn release (thanks to Bernhard check)
+
+2009-03-20 Didrik Pinte <dpinte at dipole-consulting.com>
+
+   * Thuban/Model/transient.db.py, Thuban/version.py : added support for sqlite3 module
+
+2009-03-18 Didrik Pinte <dpinte at dipole-consulting.com>
+
+   * Thuban/UI/view.py, viewport.py  : support mouse double click events
+   * Thuban/UI/mainwindow.py : support tools providing a wx.Bitmap icon in
+     place of a path to Thuban resources
+
+2009-02-19 Didrik Pinte <dpinte at dipole-consulting.com>
+
+    * Thuban/UI/dock.py : bugfix for docking/undocking events
+
+2008-12-03 Didrik Pinte <dpinte at dipole-consulting.com>
+
+    * Extensions/wms/layer.py : added a very simple caching mechanism
+
+2008-12-03 Didrik Pinte <dpinte at dipole-consulting.com>
+
+    * Extensions/wms/layer.py : bugfix in projection management
+
+2008-11-18 Didrik Pinte <dpinte at dipole-consulting.com>
+
+    * libraries/thuban/gdalwarp.cpp : support the use of GDAL MEM driver for GDAL
+      versions >= 1.5
+
+2008-007-24 Bernhard Reiter <bernhard at intevation.de>
+	
+	* NEWS: Added summary of changes since the 1.2.1 release. Fixed some
+	  typos.
+
+2008-007-24 Bernhard Reiter <bernhard at intevation.de>
+	
+	* Thuban/thuban_cfg.py: Enabled wms extension. 
+	*  Extensions/wms/__init__.py: Minor comment fix.
+
+2008-06-23  Didrik Pinte <dpinte at dipole-consulting.com>
+	* Extension/wms/__init__.py, wms.py, layer.py : copyright left to
+	Intevation.
+
+2008-06-19  Didrik Pinte <dpinte at dipole-consulting.com>
+	* Extension/wms/__init__.py, wms.py, layer.py : wms extension has been
+	update to use owslib 0.3. Extension is not stable but usable.
+
+2008-06-03  Bernhard Reiter <bernhard at intevation.de>
+
+	* test/test_baserenderer.py, testtest_layer.py: Give the
+	gdal_support_status if there is no gdal support. Gives a better hint
+	about why this is missing (e.g. no gdalwarp.so). Thanks to 
+	Anthony Lenton.
+
+2008-06-02  Bernhard Herzog  <bh at intevation.de>
+
+	* Resources/XML/thuban-1.2.1.dtd, Resources/XML/thuban-1.1.dtd:
+	Declare the attributes field and field_type of the element
+	classification as optional in the syntactically correct way.
+
+2008-05-23 Bernhard Reiter <bernhard at intevation.de>
+
+	* README: Added a hint that the requirements need to be installed
+	for building. Also added a section for installing, renaming the
+	former section to building.
+
+2008-04-18 Didrik Pinte <dpinte at dipole-consulting.com>
+
+	* Thuban/UI/legend.py : changed the use of wx.MemoryDC to 
+	wx.ScreenDC in order to allow compilation under Mac and wx 2.8
+
+	* libraries/pyshapelib/shptreemodule.c : bugfix coming from Debian
+	see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=469007
+
+2008-02-13 Bernhard Reiter <bernhard at intevation.de>
+
+	* test/test_save.py, Thuban/Model/load.py, setup.py: 
+	Mixed tabs and spaces indentation is bad, thus removed the tabs
+	from these inconsistant files.
+
+	* Doc/technotes/release_process.txt: Better use thuban-announce@
+	to announce. ;)
+
 2008-02-03 Bernhard Reiter <bernhard at intevation.de>
 
+	* Thuban/version.py, setup.py: Changing version number back to svn
+	now that 1.2.1 is released.
+
+2008-02-03 Bernhard Reiter <bernhard at intevation.de>
+
 	* NEWS: Adding release date.
 
 	* Releasenotes.txt: Adding release date and hint about reported

Added: packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.dbf
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.shp
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.shx
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/cultural_landmark-point.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/island.tfw
===================================================================
--- packages/thuban/branches/upstream/current/Data/iceland/island.tfw	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Data/iceland/island.tfw	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,6 @@
+                   0.002210782287085 
+                   0.000000000000000 
+                   0.000000000000000 
+                  -0.008333335025381 
+                 -24.548894608856457 
+                  66.562500332487303 

Added: packages/thuban/branches/upstream/current/Data/iceland/island.tif
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/island.tif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/political.dbf
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/political.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/political.shp
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/political.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/political.shx
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/political.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/roads-line.dbf
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/roads-line.dbf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/roads-line.shp
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/roads-line.shp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland/roads-line.shx
===================================================================
(Binary files differ)


Property changes on: packages/thuban/branches/upstream/current/Data/iceland/roads-line.shx
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: packages/thuban/branches/upstream/current/Data/iceland_sample.thuban
===================================================================
--- packages/thuban/branches/upstream/current/Data/iceland_sample.thuban	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Data/iceland_sample.thuban	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE session SYSTEM "thuban.dtd">
+<session title="Thuban sample session">
+    <map title="Iceland map">
+        <projection name="Unknown">
+            <parameter value="zone=26"/>
+            <parameter value="proj=utm"/>
+            <parameter value="ellps=clrk66"/>
+        </projection>
+        <layer visible="true" stroke="#000000" title="political" fill="#c0c0c0" stroke_width="1" filename="iceland/political.shp">
+            <projection name="Geographic">
+                <parameter value="proj=latlong"/>
+                <parameter value="to_meter=0.017453"/>
+                <parameter value="ellps=clrk66"/>
+            </projection>
+        </layer>
+        <layer visible="true" stroke="#000000" title="roads-line" fill="None" stroke_width="1" filename="iceland/roads-line.shp">
+            <projection name="Geographic">
+                <parameter value="proj=latlong"/>
+                <parameter value="to_meter=0.017453"/>
+                <parameter value="ellps=clrk66"/>
+            </projection>
+        </layer>
+        <layer visible="true" stroke="#000000" title="cultural_landmark-point" fill="#ffff00" stroke_width="1" filename="iceland/cultural_landmark-point.shp">
+            <projection name="Geographic">
+                <parameter value="proj=latlong"/>
+                <parameter value="to_meter=0.017453"/>
+                <parameter value="ellps=clrk66"/>
+            </projection>
+        </layer>
+    </map>
+</session>

Added: packages/thuban/branches/upstream/current/Data/iceland_sample_class.thuban
===================================================================
--- packages/thuban/branches/upstream/current/Data/iceland_sample_class.thuban	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Data/iceland_sample_class.thuban	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE session SYSTEM "thuban.dtd">
+<session title="Thuban sample session">
+    <map title="Iceland map">
+        <projection>
+            <parameter value="zone=26"/>
+            <parameter value="proj=utm"/>
+            <parameter value="ellps=clrk66"/>
+        </projection>
+        <layer stroke="#000000" filename="iceland/political.shp" fill="#c0c0c0" stroke_width="1" title="political"/>
+        <layer stroke="#ffffff" filename="iceland/roads-line.shp" fill="None" stroke_width="1" title="roads-line">
+            <classification field="RDLNTYPE" field_type="int">
+                <clnull>
+                    <cldata stroke="#ffffff" stroke_width="1" fill="None"/>
+                </clnull>
+                <clpoint value="1">
+                    <cldata stroke="#ff0000" stroke_width="1" fill="None"/>
+                </clpoint>
+                <clpoint value="2">
+                    <cldata stroke="#00aa00" stroke_width="1" fill="None"/>
+                </clpoint>
+                <clpoint value="3">
+                    <cldata stroke="#0000ff" stroke_width="1" fill="None"/>
+                </clpoint>
+            </classification>
+        </layer>
+        <layer stroke="#000000" filename="iceland/cultural_landmark-point.shp" fill="#000000" stroke_width="1" title="cultural_landmark-point">
+            <classification field="CLPTLABEL" field_type="string">
+                <clnull>
+                    <cldata stroke="#000000" stroke_width="1" fill="#000000"/>
+                </clnull>
+                <clpoint value="RUINS">
+                    <cldata stroke="#000000" stroke_width="1" fill="#ffffff"/>
+                </clpoint>
+                <clpoint value="FARM">
+                    <cldata stroke="#000000" stroke_width="1" fill="#ffff00"/>
+                </clpoint>
+            </classification>
+        </layer>
+    </map>
+</session>

Added: packages/thuban/branches/upstream/current/Data/iceland_sample_raster.thuban
===================================================================
--- packages/thuban/branches/upstream/current/Data/iceland_sample_raster.thuban	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Data/iceland_sample_raster.thuban	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE session SYSTEM "thuban.dtd">
+<session title="Thuban sample session">
+    <map title="Iceland map">
+        <projection name="Universal Transverse Mercator">
+            <parameter value="proj=utm"/>
+            <parameter value="zone=27"/>
+            <parameter value="ellps=clrk66"/>
+        </projection>
+        <rasterlayer visible="true" filename="iceland/island.tif" title="Iceland Image">
+            <projection name="Geographic">
+                <parameter value="proj=latlong"/>
+                <parameter value="to_meter=0.017453"/>
+                <parameter value="ellps=clrk66"/>
+            </projection>
+        </rasterlayer>
+        <layer visible="true" stroke="#000000" title="political" fill="None" stroke_width="1" filename="iceland/political.shp">
+            <projection name="Geographic">
+                <parameter value="proj=latlong"/>
+                <parameter value="to_meter=0.017453"/>
+                <parameter value="ellps=clrk66"/>
+            </projection>
+        </layer>
+        <layer visible="true" stroke="#000000" title="roads-line" fill="None" stroke_width="1" filename="iceland/roads-line.shp">
+            <projection name="Geographic">
+                <parameter value="proj=latlong"/>
+                <parameter value="to_meter=0.017453"/>
+                <parameter value="ellps=clrk66"/>
+            </projection>
+        </layer>
+        <layer visible="true" stroke="#000000" title="cultural_landmark-point" fill="#ffff00" stroke_width="1" filename="iceland/cultural_landmark-point.shp">
+            <projection name="Geographic">
+                <parameter value="proj=latlong"/>
+                <parameter value="to_meter=0.017453"/>
+                <parameter value="ellps=clrk66"/>
+            </projection>
+        </layer>
+    </map>
+</session>

Added: packages/thuban/branches/upstream/current/Data/iceland_sample_size.thuban
===================================================================
--- packages/thuban/branches/upstream/current/Data/iceland_sample_size.thuban	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Data/iceland_sample_size.thuban	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE session SYSTEM "thuban.dtd">
+<session title="Thuban sample session">
+    <map title="Iceland map">
+        <projection>
+            <parameter value="zone=26"/>
+            <parameter value="proj=utm"/>
+            <parameter value="ellps=clrk66"/>
+        </projection>
+        <layer stroke="#000000" filename="iceland/political.shp" fill="#c0c0c0" stroke_width="1" title="political"/>
+        <layer stroke="#ffffff" filename="iceland/roads-line.shp" fill="None" stroke_width="1" title="roads-line">
+            <classification field="RDLNTYPE" field_type="int">
+                <clnull>
+                    <cldata stroke="#ffffff" stroke_width="1" fill="None"/>
+                </clnull>
+                <clpoint value="1">
+                    <cldata stroke="#ff0000" stroke_width="1" fill="None"/>
+                </clpoint>
+                <clpoint value="2">
+                    <cldata stroke="#00aa00" stroke_width="1" fill="None"/>
+                </clpoint>
+                <clpoint value="3">
+                    <cldata stroke="#0000ff" stroke_width="1" fill="None"/>
+                </clpoint>
+            </classification>
+        </layer>
+        <layer stroke="#000000" filename="iceland/cultural_landmark-point.shp" fill="#000000" stroke_width="1" title="cultural_landmark-point">
+            <classification field="CLPTLABEL" field_type="string">
+                <clnull>
+                    <cldata stroke="#000000" stroke_width="1" size="4" fill="#000000"/>
+                </clnull>
+                <clpoint value="RUINS">
+                    <cldata stroke="#000000" stroke_width="1" size="8" fill="#ffffff"/>
+                </clpoint>
+                <clpoint value="FARM">
+                    <cldata stroke="#000000" stroke_width="1" size="20" fill="#ffff00"/>
+                </clpoint>
+            </classification>
+        </layer>
+    </map>
+</session>

Added: packages/thuban/branches/upstream/current/Data/iceland_sample_test.thuban
===================================================================
--- packages/thuban/branches/upstream/current/Data/iceland_sample_test.thuban	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Data/iceland_sample_test.thuban	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE session SYSTEM "thuban.dtd">
+<session title="Thuban sample session">
+    <map title="not the iceland map">
+        <projection>
+            <parameter value="zone=26"/>
+            <parameter value="proj=utm"/>
+            <parameter value="ellps=clrk66"/>
+        </projection>
+        <layer stroke="#000000" filename="iceland/political.shp" fill="#c0c0c0" stroke_width="1" title="political"/>
+        <layer stroke="#000000" filename="iceland/roads-line.shp" fill="None" stroke_width="1" title="roads-line">
+            <classification field="LENGTH" field_type="double">
+                <clnull label="">
+                    <cldata stroke="#000000" stroke_width="1" fill="None"/>
+                </clnull>
+                <clrange label="short roads" min="0.001" max="0.3996">
+                    <cldata stroke="#ffffff" stroke_width="1" fill="#ffffff"/>
+                </clrange>
+                <clrange label="less short" min="0.3996" max="0.7982">
+                    <cldata stroke="#ccf4cc" stroke_width="1" fill="#ccf4cc"/>
+                </clrange>
+                <clrange label="bit longer" min="0.7982" max="1.1968">
+                    <cldata stroke="#99ea99" stroke_width="1" fill="#99ea99"/>
+                </clrange>
+                <clrange label="where's the end?" min="1.1968" max="1.5954">
+                    <cldata stroke="#66e066" stroke_width="1" fill="#66e066"/>
+                </clrange>
+                <clrange label="long roads" min="1.5954" max="1.994">
+                    <cldata stroke="#33d633" stroke_width="1" fill="#33d633"/>
+                </clrange>
+            </classification>
+        </layer>
+        <layer stroke="#000000" filename="iceland/cultural_landmark-point.shp" fill="None" stroke_width="1" title="something else">
+            <classification field="CLPTLABEL" field_type="string">
+                <clnull label="">
+                    <cldata stroke="#000000" stroke_width="1" fill="None"/>
+                </clnull>
+                <clpoint label="" value="BUILDING">
+                    <cldata stroke="#0000ff" stroke_width="1" fill="#0000ff"/>
+                </clpoint>
+                <clpoint label="" value="FARM">
+                    <cldata stroke="#00aaff" stroke_width="1" fill="#00aaff"/>
+                </clpoint>
+                <clpoint label="" value="HUT">
+                    <cldata stroke="#00ffaa" stroke_width="1" fill="#00ffaa"/>
+                </clpoint>
+                <clpoint label="" value="LIGHTHOUSE">
+                    <cldata stroke="#00ff00" stroke_width="1" fill="#00ff00"/>
+                </clpoint>
+                <clpoint label="" value="OTHER/UNKNOWN">
+                    <cldata stroke="#aaff00" stroke_width="1" fill="#aaff00"/>
+                </clpoint>
+                <clpoint label="" value="RUINS">
+                    <cldata stroke="#ffaa00" stroke_width="1" fill="#ffaa00"/>
+                </clpoint>
+            </classification>
+        </layer>
+    </map>
+</session>

Modified: packages/thuban/branches/upstream/current/Doc/technotes/README
===================================================================
--- packages/thuban/branches/upstream/current/Doc/technotes/README	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Doc/technotes/README	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,7 +1,7 @@
 Readme for Thuban's Doc/devnotes
 ================================
 Author: Bernhard Herzog <bh at intevation.de>
-Last-Modified: $Date: 2004-02-26 11:22:30 +0000 (Do, 26 Feb 2004) $
+Last-Modified: $Date: 2004-02-26 12:22:30 +0100 (gio, 26 feb 2004) $
 Version: $Revision: 2093 $
 
 

Modified: packages/thuban/branches/upstream/current/Doc/technotes/coding_guidelines.txt
===================================================================
--- packages/thuban/branches/upstream/current/Doc/technotes/coding_guidelines.txt	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Doc/technotes/coding_guidelines.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,6 +1,6 @@
 Title: Coding Guidelines for Thuban
 Author: Bernhard Herzog <bh at intevation.de>
-Last-Modified: $Date: 2006-04-20 13:20:48 +0000 (Do, 20 Apr 2006) $
+Last-Modified: $Date: 2006-04-20 15:20:48 +0200 (gio, 20 apr 2006) $
 Version: $Revision: 2678 $
 
 

Modified: packages/thuban/branches/upstream/current/Doc/technotes/release_process.txt
===================================================================
--- packages/thuban/branches/upstream/current/Doc/technotes/release_process.txt	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Doc/technotes/release_process.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,7 +1,7 @@
 Title: The Thuban Release Process
 Author: Thuban development team
-Last-Modified: $Date: 2008-02-02 22:01:41 +0000 (Sa, 02 Feb 2008) $
-Version: $Revision: 2830 $
+Last-Modified: $Date: 2008-02-13 23:31:31 +0100 (mer, 13 feb 2008) $
+Version: $Revision: 2837 $
 
 How to Release a New Thuban Version
 
@@ -91,7 +91,7 @@
     - Write announcement including all major improvements.
 
 Old:    - Send announcement to following mailing lists:
-      thuban-list at intevation.de
+      thuban-announce at intevation.de
       freegis-list at intevation.de
 
     - Have a beer and thank all contributors :-)

Modified: packages/thuban/branches/upstream/current/Doc/technotes/string_representation.txt
===================================================================
--- packages/thuban/branches/upstream/current/Doc/technotes/string_representation.txt	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Doc/technotes/string_representation.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,6 +1,6 @@
 Title: String Representation in Thuban
 Author: Bernhard Herzog <bh at intevation.de>
-Last-Modified: $Date: 2007-04-24 23:12:17 +0000 (Di, 24 Apr 2007) $
+Last-Modified: $Date: 2007-04-25 01:12:17 +0200 (mer, 25 apr 2007) $
 Version: $Revision: 2758 $
 
 

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/README.txt
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/README.txt	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/README.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,10 @@
+This extension generates 256x256px png tiles out of Thuban maps, to be able to
+overlay the data on Google Maps.
+
+The extension reprojects and chops the tiles accordingly so that the data
+matches Google's imagery.
+
+For now the extension only generates the tiles, you'll need to write your
+own javascript to use them.  Check the "sample/" subdirectory for a very simple
+way of viewing the data you generate.
+

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/__init__.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/__init__.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/__init__.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,22 @@
+# Copyright (c) 2008 by Intevation GmbH
+# Authors:
+# Anthony Lenton <anthony at except.com.ar>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+# import the actual module
+import exportGMapTiles
+
+# perform the registration of the extension
+from Thuban import _
+from Thuban.UI.extensionregistry import ExtensionDesc, ext_registry
+
+ext_registry.add(ExtensionDesc(
+    name = 'exportGMapTiles',
+    version = '0.1.1',
+    authors= [ 'Anthony Lenton' ],
+    copyright = '2008 by Intevation GmbH',
+    desc = _("Export PNG tiles to be loaded with Google Maps\n" \
+             "as a GTileLayerOverlay.")))
+

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/exportGMapTiles.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/exportGMapTiles.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/exportGMapTiles.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,134 @@
+# Copyright (c) 2008 by Intevation GmbH
+# Authors:
+# Anthony Lenton <anthony at except.com.ar>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+""" This module allows you to save your data as png files to be served as a
+    Google Maps layer overlay. """
+
+import os
+import wx
+
+if __name__ != '__main__':
+    from Thuban.UI.command import registry, Command
+    from Thuban import _
+    from Thuban.UI.mainwindow import main_menu
+    from Thuban.UI import internal_from_wxstring
+
+from exporter import export
+
+DEFAULT_DESTINATION_FOLDER = os.path.join (os.getcwd(), "tiles")
+
+class exportGMapTilesDialog(wx.Dialog):
+    def __init__(self, parent, ID, title,
+                 pos=wx.DefaultPosition, size=wx.DefaultSize,
+                 style=wx.DEFAULT_DIALOG_STYLE):
+                     
+        # initialize the Dialog
+        wx.Dialog.__init__(self, parent, ID, title, pos, size, style)
+
+        # Destination folder
+        box_folder = wx.BoxSizer(wx.HORIZONTAL)
+        box_folder.Add(wx.StaticText(self, -1, _("Destination folder:")), 1,
+                     wx.ALL|wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 4)
+        self.text_folder = wx.TextCtrl(self, -1, DEFAULT_DESTINATION_FOLDER)
+        box_folder.Add(self.text_folder, 2, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
+        self.button_folder = wx.Button (self, -1, _("Choose folder"))
+        self.button_folder.Bind (wx.EVT_BUTTON, self.OnChooseFolder)
+        box_folder.Add(self.button_folder, 1,wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
+
+        # Zoom levels
+        box_zoom = wx.BoxSizer (wx.HORIZONTAL)
+        box_zoom.Add (wx.StaticText (self, -1, _("Minimum Zoom:")), 0,
+                      wx.ALL|wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 4)
+        self.minZoomSpin = wx.SpinCtrl (self, size=(60, -1), min=1, max=17)
+        self.Bind(wx.EVT_SPINCTRL, self.OnMinZoomChanged, self.minZoomSpin)
+        box_zoom.Add (self.minZoomSpin, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
+        box_zoom.Add (wx.StaticText (self, -1, _("Maximum Zoom:")), 0,
+                      wx.ALL|wx.ALIGN_LEFT|wx.ALIGN_CENTER_VERTICAL, 4)
+        self.maxZoomSpin = wx.SpinCtrl (self, size=(60, -1), min=1, max=17)
+        self.Bind(wx.EVT_SPINCTRL, self.OnMaxZoomChanged, self.maxZoomSpin)
+        box_zoom.Add (self.maxZoomSpin, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
+
+        #buttons
+        box_buttons = wx.BoxSizer(wx.HORIZONTAL)
+        button = wx.Button(self, wx.ID_OK, _("OK"))
+        box_buttons.Add(button, 0, wx.ALL, 5)
+        button = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
+        box_buttons.Add(button, 0, wx.ALL, 5)
+        #set the button funcitons
+        self.Bind(wx.EVT_BUTTON, self.OnOK, id=wx.ID_OK)
+        self.Bind(wx.EVT_BUTTON, self.OnCancel, id=wx.ID_CANCEL)
+      
+        # compose the final dialog
+        top = wx.BoxSizer(wx.VERTICAL)
+        top.Add(box_folder, 0, wx.EXPAND |wx.ALL, 5)
+        top.Add(box_zoom, 0, wx.EXPAND |wx.ALL, 5)
+        top.Add(box_buttons, 0, wx.ALIGN_RIGHT)
+        
+        # final layout settings
+        self.SetSizer(top)
+        top.Fit(self)
+
+    def OnMinZoomChanged (self, event):
+        if self.maxZoomSpin.GetValue() < self.minZoomSpin.GetValue():
+            self.maxZoomSpin.SetValue(self.minZoomSpin.GetValue())
+
+    def OnMaxZoomChanged(self, event):
+        if self.minZoomSpin.GetValue() > self.maxZoomSpin.GetValue():
+            self.minZoomSpin.SetValue(self.maxZoomSpin.GetValue())
+
+    def OnChooseFolder (self, event):
+        dlg = wx.DirDialog(self, _("Select a folder to save the tiles in"), ".")
+        if dlg.ShowModal() == wx.ID_OK:
+            pfm_filename = internal_from_wxstring(dlg.GetPath())
+            self.text_folder.ChangeValue (pfm_filename)
+        dlg.Destroy()
+
+    def RunDialog(self):
+        self.ShowModal()
+        self.Destroy()
+
+    def endDialog(self, result):
+        self.result = result
+        if self.result is not None:
+            self.EndModal(wx.ID_OK)
+        else:
+            self.EndModal(wx.ID_CANCEL)
+        self.Show(False)
+
+    def OnOK(self, event):
+        self.result = "OK"
+        self.dataFolder = self.text_folder.GetValue()
+        self.minZoom = self.minZoomSpin.GetValue()
+        self.maxZoom = self.maxZoomSpin.GetValue()
+        self.endDialog(self.result)
+
+    def OnCancel(self, event):
+        self.endDialog(None)
+
+
+def export_gmap_dialog(context):
+    """ Select the destination folder and zoom levels needed.
+
+    context -- The Thuban context.
+    """
+    dlg = exportGMapTilesDialog(context.mainwindow, -1,
+                       _("Export Google Maps tiles"))
+    dlg.RunDialog()
+    if dlg.result == "OK":
+        export (context, dlg.minZoom, dlg.maxZoom, dlg.dataFolder)
+
+# register the new command
+registry.Add(Command('export-gmaptiles', _("(experimental) ") + _('Export GMap Tiles'),
+                     export_gmap_dialog, helptext=_('Export as Google Map tiles')))
+
+# find the extension menu (create it anew if not found)
+extensions_menu = main_menu.FindOrInsertMenu('extensions',
+                                               _('E&xtensions'))
+
+# finally add the new entry to the menu
+extensions_menu.InsertItem('export-gmaptiles')
+

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/exporter.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/exporter.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/exporter.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,162 @@
+import os
+import math
+import mapscript
+from Extensions.umn_mapserver.mf_export import thuban_to_map, add_circle_symbol
+from Extensions.umn_mapserver.mapfile import MF_Map
+from Thuban.Model.proj import Projection
+try:
+    from PythonMagick import Image
+    pythonMagick = True
+except:
+    print "Coultn't import PythonMagick.  gMapTile will call convert instead."
+    pythonMagick = False
+
+cmd = 'convert -crop 256x256+%d+%d %s/%d/model.png %s/%d/%d.%d.png'
+
+T = 2048 # Big Tile size
+
+# Port to Python of Google Map's javascript GMercatorClass
+class Mercator (object):
+    def __init__(self, zoom):
+        self.tileSize = 256
+        self.zoom = zoom
+        self.tiles = 2 ** zoom
+        self.circumference = self.tileSize * self.tiles
+        self.semi = self.circumference / 2
+        self.radius = self.circumference / (2 * math.pi)
+        self.fE = -1.0 * self.circumference / 2.0
+        self.fN = self.circumference / 2.0 
+
+    def longToX (self, degrees):
+        longitude = math.radians(degrees + 180)
+        return (self.radius * longitude)
+
+    def latToY (self, degrees):
+        latitude = math.radians(degrees)
+        y = self.radius/2.0 * math.log((1.0 + math.sin(latitude)) /
+                                           (1.0 - math.sin(latitude)))
+        return self.fN - y
+
+    def xToLong (self, x):
+        longRadians = x/self.radius
+        longDegrees = math.degrees(longRadians) - 180
+        rotations = math.floor((longDegrees + 180)/360)
+        longitude = longDegrees - (rotations * 360)
+        return longitude
+
+    def yToLat (self, y):
+        y = self.fN - y
+        latitude = ((math.pi / 2) -
+                    (2 * math.atan(math.exp(-1.0 * y / self.radius))))
+        return math.degrees(latitude)
+
+def generate (mf, pixtents, zoom, folder):
+    """ Generate an image of the map, and then
+        Chop up in to 256x256px tiles.  'mf' is the mapObj object completely
+        configured except for its size and extents.
+        'pixtents' is the extents to be shown, in projected (pixel)
+        coordinates.
+        'zoom' is the zoom level for the image.
+        'folder' is the folder to save the tiles. """
+    c = Mercator(zoom)
+    extents = [pixtents[0] - c.semi, c.semi - pixtents[1],
+               pixtents[2] - c.semi, c.semi - pixtents[3]]
+    mf.set_size (pixtents[2] - pixtents[0], pixtents[1] - pixtents[3])
+    mf.set_extent (extents)
+    img = mf._mf_map.draw()
+    png = img.save(folder+'/%d/model.png' % (zoom,))
+    xTile = pixtents[0] // 256
+    yTile = pixtents[3] // 256
+    width = pixtents[2] - pixtents[0]
+    height = pixtents[1] - pixtents[3]
+    i = xTile
+    x = 0
+    if pythonMagick:
+        img = Image(str(folder+"/%d/model.png" % (zoom,)))
+    while x < width:
+        y = 0
+        j = yTile
+        while y < height:
+            if pythonMagick:
+                img2 = Image(img)
+                img2.crop ('256x256+%d+%d' % (x, y))
+                img2.write (str(folder+"/%d/%d.%d.png" % (zoom, i, j)))
+            else:
+                c = cmd % (x, y, folder, zoom, folder, zoom, i, j)
+                os.system(c)
+            y += 256
+            j += 1
+        x += 256
+        i += 1
+
+def export (context, minZoom, maxZoom, dataFolder, filename=None):
+    """ Use the Thuban context to render the current map to gMapTiles.
+        All zoom levels between 'minZoom' and 'maxZoom' will be generated.
+        Tiles will be saved to 'dataFolder'.
+        If 'filename' is not None, the map will be generated from this mapfile,
+        instead of using 'context' (for testing only). """
+    if filename is None:
+        mf = MF_Map(mapscript.mapObj(""))
+        mf.set_size (60, 50) # Set some size for thuban_to_map not to fail
+        add_circle_symbol (mf)
+        thuban_to_map (context, mf)
+    else:
+        mf = MF_Map(mapscript.mapObj(filename))
+    # We need all layers to have a projection, assume that they're
+    # using un-projected (lat/long) coordinates.  Probably an exception
+    # should be raised instead
+    for lindex in range(mf._mf_map.numlayers):
+        l = mf._mf_map.getLayer(lindex)
+        if l.getProjection() == '':
+            l.setProjection("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
+    mf.set_imagetype ('png')
+    mf._mf_map.imagecolor.setRGB(234, 234, 234)
+    mf._mf_map.transparent = 1
+    of = mapscript.outputFormatObj("GD/png")
+    of.transparent = 1
+    mf._mf_map.setOutputFormat (of)
+
+    if filename is None:
+        extents = context.mainwindow.canvas.map.BoundingBox() # Unprojected
+    else:
+        extents = mf.get_extent().get_rect()
+    if extents is None:
+        return
+    minx, miny, maxx, maxy = extents
+    for zoom in range(minZoom, maxZoom + 1):
+        try:
+            os.makedirs (os.path.join(dataFolder, str(zoom)))
+        except OSError:
+            pass # Lets assume that the directory already exists
+        coord = Mercator(zoom)
+        gMercator = ["proj=merc", "a=%f"%coord.radius, "b=%f"%coord.radius]
+        mf.set_projection (Projection(gMercator))
+        mminx = ((int(coord.longToX(minx))) // 256) * 256 # Projected (pixels)
+        mmaxx = ((int(coord.longToX(maxx)) + 255)// 256) * 256 - 1
+        mmaxy = ((int(coord.latToY(maxy))) // 256) * 256
+        mminy = ((int(coord.latToY(miny)) + 255)// 256) * 256 - 1
+        width = mmaxx - mminx
+        height = mminy - mmaxy
+        width = max (width, 1)
+        height = max (height, 1)
+        if width <= T and height < T:
+            pixtents = [mminx, mminy, mmaxx, mmaxy]
+            generate (mf, pixtents, zoom, dataFolder)
+        else:
+            x = mminx
+            while x < mmaxx:
+                y = mmaxy
+                while y < mminy:
+                    pixtents = [x, min(y + T - 1, mminy), min(x + T - 1, mmaxx), y]
+                    generate (mf, pixtents, zoom, dataFolder)
+                    y += T
+                x += T
+
+if __name__ == '__main__':
+    import sys
+    if len(sys.argv) <= 1:
+        print "-----\nUsage: python exporter.py <mapfile.map>"
+    else:
+        # Say, let's export only for zoom level seven.  I like seven.
+        export (None, 7, 7, 'tiles', sys.argv[-1])
+

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/README.txt
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/README.txt	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/README.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,20 @@
+This is a sample application of the gMapTiles extension.  To test this sample
+you need to:
+
+ * Use thuban to generate tiles for some data.
+
+ * Make tile.py accessible via web on your web server, and make sure that it has
+   execution permissions.  Let's say that the URL to tile.py is now
+   http://yourserver/tile.py.  If you open this URL in a web browser you should
+   see the message "Missing input arguments"
+
+ * Edit tile.py and replace the PATH_TO_TILES string constant for the absolute
+   path where you saved the tiles.
+
+ * Make sample.html accessible via web on your web server.  Edit sample.html
+   to use your own Google Maps API Key, and replace the URL_TO_TILE_PY string
+   constant with tile.py's absolute URL. (make sure your key is valid for the
+   sample's URL, more info, http://code.google.com/apis/maps/documentation/ )
+
+Enjoy!
+

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/sample.html
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/sample.html	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/sample.html	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+  <title>Google Map Tiles Proof of concept</title>
+  <script src="http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=[Insert your Google Maps API Key here]"
+          type="text/javascript">
+  </script>
+  <script type="text/javascript">
+
+var URL_TO_TILE_PY = "http://yourserver/tile.py";
+
+var map;
+
+function load() {
+	// Set up the initial map state.
+	if(document.implementation.hasFeature(
+	  "http://www.w3.org/TR/SVG11/feature#SVG","1.1")){ 
+		_mSvgEnabled = true;
+		_mSvgForced  = true;
+	}
+	map = new GMap2(document.getElementById("map"));
+	map.addControl(new GLargeMapControl());
+	map.addControl(new GMapTypeControl());
+	var omc = new GOverviewMapControl();
+	map.addControl(omc);
+	map.setCenter(new GLatLng(-42.423457,-60.292969),4);
+
+    var tilelayer = new GTileLayer(new GCopyrightCollection(), 0, 17);
+    tilelayer.getTileUrl = function(tile, zoom) {
+        var url = URL_TO_TILE_PY + "?x="+tile.x+"&y="+tile.y+"&z="+zoom;
+        //alert ("Called getTileUrl ("+tile.x+"/"+tile.y+", "+zoom+")\nReturning: " + url);
+        return url;
+    };
+    tilelayer.getOpacity = function() {return 0.6;}
+    map.addOverlay(new GTileLayerOverlay(tilelayer));
+
+}
+
+  </script>
+</head>
+<body onload="load()" onunload="GUnload()">
+<h2>The Map</h2>
+<div id="map" style="width: 800px; height: 500px"></div>
+</body>
+</html>
+

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/tile.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/tile.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/tile.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,32 @@
+#!/usr/bin/python
+import cgi
+import cgitb
+cgitb.enable()
+import cStringIO
+
+PATH_TO_TILES = "/path/to/tiles"
+
+size = 256 #image width and height
+
+def getTile(x, y, z):
+    z = int(z)
+    y = int(y)
+    x = int(x)
+    
+    try:
+        f = open('%s/%d/%d.%d.png' % (PATH_TO_TILES, z, x, y))
+    except IOError:
+        print "Content-type: text/plain\n\nNothing"
+        return
+
+    print "Content-type: image/png\n"
+    print f.read()
+
+if __name__ == "__main__":
+    form = cgi.FieldStorage()
+    if "x" in form and "y" in form and "z" in form:
+        getTile(form["x"].value, form["y"].value, form["z"].value)
+    else:
+        print "Content-type: text/html\n"
+        print """<html><body>Missing input arguments</body></html>"""
+


Property changes on: packages/thuban/branches/upstream/current/Extensions/gMapTiles/sample/tile.py
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/thuban/branches/upstream/current/Extensions/gMapTiles/test/test_gMapTileExport.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gMapTiles/test/test_gMapTileExport.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gMapTiles/test/test_gMapTileExport.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,59 @@
+import unittest
+import os, sys
+from Thuban.Model.layer import Layer
+from Thuban.Model.map import Map
+from Thuban.Model.session import Session
+from Thuban.UI.context import Context
+from Thuban.Lib.connector import ConnectorError
+
+mapscriptAvailable=True
+try:
+    import mapscript
+    from Extensions.gMapTiles.exporter import export
+except ImportError:
+    mapscriptAvailable=False
+
+def rm_rf(d):
+    for path in (os.path.join(d,f) for f in os.listdir(d)):
+        if os.path.isdir(path):
+            rm_rf(path)
+        else:
+            os.unlink(path)
+    os.rmdir(d)
+
+class DummyMainWindow(object):
+    def __init__(self, canvas):
+        self.canvas = canvas
+
+class DummyCanvas(object):
+    def __init__(self, map):
+        self.map = map
+    def Map(self):
+        return self.map
+    def VisibleExtent (self):
+        return self.map.BoundingBox()
+
+class TestGMapTileExport(unittest.TestCase):
+    def setUp(self):
+        self.session = Session("A Session")
+        self.map = Map("A Map")
+        self.session.AddMap(self.map)
+        shapefile = "../../../Data/iceland/political.shp"
+        self.store = self.session.OpenShapefile(shapefile)
+        layer = Layer("A Layer", self.store)
+        self.map.AddLayer(layer)
+
+    def testExport(self):
+        tileDir = 'temp'
+        if not mapscriptAvailable:
+            #Skip test...
+            return
+        mainwindow = DummyMainWindow(DummyCanvas(self.map))
+        context = Context(None, self.session, mainwindow)
+        export (context, 7, 7, tileDir)
+        self.session.Destroy()
+        rm_rf(tileDir)
+
+if __name__ == "__main__":
+    unittest.main()
+

Added: packages/thuban/branches/upstream/current/Extensions/gns2shp/README
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gns2shp/README	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/gns2shp/README	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,8 @@
+This extension converts Files of Geographic Names for Geopolitical Areas
+from GNS to Shapefile format.
+
+These files can be downloaded from
+http://earth-info.nga.mil/gns/html/cntry_files.html
+They are simple tab-separated value files.  A description of the meaning
+of each field can be found at
+http://earth-info.nga.mil/gns/html/gis_countryfiles.htm

Modified: packages/thuban/branches/upstream/current/Extensions/gns2shp/gns2shp.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gns2shp/gns2shp.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/gns2shp/gns2shp.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -17,9 +17,9 @@
 of some country files.
 """
 
-__version__ = '$Revision: 2817 $'
+__version__ = '$Revision: 2845 $'
 # $Source$
-# $Id: gns2shp.py 2817 2008-01-27 00:01:32Z bernhard $
+# $Id: gns2shp.py 2845 2008-06-20 05:20:03Z elachuni $
 
 import os, sys
 
@@ -58,10 +58,11 @@
 
     shp = shapelib.create(shp_filename, shapelib.SHPT_POINT)
     dbf = dbflib.create(dbf_filename)
+
     dbf.add_field('RC', dbflib.FTInteger, 1, 0)
     dbf.add_field('UFI', dbflib.FTInteger, 10, 0)
     dbf.add_field('UNI', dbflib.FTInteger, 10, 0)
-    dbf.add_field('UTM', dbflib.FTString, 4, 0)
+    dbf.add_field('MGRS', dbflib.FTString, 15, 0)
     dbf.add_field('JOG', dbflib.FTString, 7, 0)
     dbf.add_field('FC', dbflib.FTString, 1, 0)
     dbf.add_field('DSG', dbflib.FTString, 5, 0)
@@ -69,10 +70,11 @@
     dbf.add_field('CC1', dbflib.FTString, 2, 0)
     dbf.add_field('ADM1', dbflib.FTString, 2, 0)
     dbf.add_field('ADM2', dbflib.FTString, 200, 0)
-    dbf.add_field('DIM', dbflib.FTInteger, 10, 0)
+    dbf.add_field('POP', dbflib.FTInteger, 10, 0)
+    dbf.add_field('ELEV', dbflib.FTInteger, 10, 0)
     dbf.add_field('CC2', dbflib.FTString, 2, 0)
-    dbf.add_field('NT', dbflib.FTString, 1, 0)
-    dbf.add_field('LC', dbflib.FTString, 2, 0)
+    dbf.add_field('NT', dbflib.FTString, 2, 0)
+    dbf.add_field('LC', dbflib.FTString, 3, 0)
     dbf.add_field('SHORT_FORM', dbflib.FTString, 128, 0)
     dbf.add_field('GENERIC', dbflib.FTString, 128, 0)
     dbf.add_field('SORT_NAME', dbflib.FTString, 200, 0)
@@ -87,30 +89,32 @@
     i = 0
     for line in gns:
         if line[0] == '#': continue
-        RC, UFI, UNI, DD_LAT, DD_LONG, DMS_LAT, DMS_LONG, UTM, \
-            JOG, FC, DSG, PC, CC1, ADM1, ADM2, DIM, CC2, NT, LC, \
-            SHORT_FORM, GENERIC, SORT_NAME, FULL_NAME, FULL_NAME_ND, \
-            MODIFY_DATE  = line.split('\t')
-        RC = int(RC)
+        RC, UFI, UNI, LAT, LONG, DMS_LAT, DMS_LONG, MGRS, JOG, FC, DSG, PC, \
+            CC1, ADM1, ADM2, POP, ELEV, CC2, NT, LC, SHORT_FORM, GENERIC, \
+            SORT_NAME, FULL_NAME, FULL_NAME_ND, MODIFY_DATE = line.split('\t')
+        try: RC = int(RC)
+        except ValueError: RC = None
         UFI = int(UFI)
         UNI = int(UNI)
-        DD_LAT = float(DD_LAT)
-        DD_LONG = float(DD_LONG)
+        LAT = float(LAT)
+        LONG = float(LONG)
         try: PC = int(PC)
-        except: PC = None
-        try: DIM = int(DIM)
-        except: DIM = None
+        except ValueError: PC = None
+        try: POP = int(POP)
+        except ValueError: POP = None
+        try: ELEV = int(ELEV)
+        except ValueError: ELEV = None
         MODIFY_DATE = MODIFY_DATE[0:10] # kill trailing "\n" or "\r\n"
-        obj = shapelib.SHPObject(shapelib.SHPT_POINT, i, [[(DD_LONG, DD_LAT)]])
+        obj = shapelib.SHPObject(shapelib.SHPT_POINT, i, [[(LONG, LAT)]])
         shp.write_object(-1, obj)
-        dbf.write_record(i, { 'RC': RC, 'UFI': UFI, 'UNI': UNI, 'UTM': UTM,
-                              'JOG': JOG, 'FC': FC, 'DSG': DSG, 'PC': PC,
-                              'CC1': CC1, 'ADM1': ADM1, 'ADM2': ADM2,
-                              'DIM': DIM, 'CC2': CC2, 'NT': NT, 'LC': LC,
-                              'SHORT_FORM': SHORT_FORM, 'GENERIC': GENERIC,
-                              'SORT_NAME': SORT_NAME, 'FULL_NAME': FULL_NAME,
-                              'FULL_ND': FULL_NAME_ND,
-                              'MODIFY_DAT': MODIFY_DATE})
+
+        vals = {'RC': RC, 'UFI': UFI, 'UNI': UNI, 'MGRS':MGRS, 'JOG': JOG,
+                'FC': FC, 'DSG': DSG, 'PC': PC, 'CC1': CC1, 'ADM1': ADM1,
+                'ADM2': ADM2, 'POP': POP, 'ELEV': ELEV, 'CC2': CC2, 'NT': NT,
+                'LC': LC, 'SHORT_FORM': SHORT_FORM, 'GENERIC': GENERIC,
+                'SORT_NAME': SORT_NAME, 'FULL_NAME': FULL_NAME,
+                'FULL_ND': FULL_NAME_ND, 'MODIFY_DAT': MODIFY_DATE}
+        dbf.write_record(i, vals)
         i += 1
 
     del shp

Modified: packages/thuban/branches/upstream/current/Extensions/gns2shp/test/README
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gns2shp/test/README	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/gns2shp/test/README	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,4 +1,4 @@
-This directory contains tests of the gns2shl extension.
+This directory contains tests of the gns2shp extension.
 
 About file "ls.txt":
 

Modified: packages/thuban/branches/upstream/current/Extensions/gns2shp/test/ls.txt
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gns2shp/test/ls.txt	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/gns2shp/test/ls.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,89 +1,110 @@
-RC	UFI	UNI	DD_LAT	DD_LONG	DMS_LAT	DMS_LONG	UTM	JOG	FC	DSG	PC	CC1	ADM1	ADM2	DIM	CC2	NT	LC	SHORT_FORM	GENERIC	SORT_NAME	FULL_NAME	FULL_NAME_ND	MODIFY_DATE
-1	-1187145	-1749126	47.0666667	9.5000000	470400	93000	NT31	NL32-02	A	ADM1 		LS	00				N				BALZERS	Balzers	Balzers	1993-12-22
-1	-1187146	-1749127	47.0666667	9.5000000	470400	93000	NT31	NL32-02	P	PPL		LS	00				N				BALZERS	Balzers	Balzers	1993-12-22
-1	-1187147	-1749128	47.2166667	9.5000000	471300	93000	NT32	NL32-02	P	PPL		LS	00				N				BENDERN	Bendern	Bendern	1993-12-22
-1	-1187148	-1749129	47.0666667	9.6166667	470400	93700	NT41	NL32-02	T	PASS 		LS	00				N				BETTLERJOCH	Bettlerjoch	Bettlerjoch	1993-12-22
-1	-1187170	-1749130	47.1833333	9.5333333	471100	93200	NT42	NL32-02	P	PPL		LS	00				V				BLANKEN	Blanken	Blanken	1993-12-22
-1	-1187149	-1749131	47.1666667	9.5500000	471000	93300	NT42	NL32-02	T	MTS		LS	00				N				DREISCHWESTERN	Drei Schwestern	Drei Schwestern	1993-12-22
-1	-1187149	-1749132	47.1666667	9.5500000	471000	93300	NT42	NL32-02	T	MTS		LS	00				V				DREYSCHWESTERN	Drey Schwestern	Drey Schwestern	1993-12-22
-1	419575	535546	47.1500000	9.5166667	470900	93100	NT32	NL32-02	P	PPL		LS	00				V				EBAHOLZ	Ebaholz	Ebaholz	1999-01-26
-1	419575	535575	47.1500000	9.5166667	470900	93100	NT32	NL32-02	P	PPL		LS	00				N				EBENHOLZ	Ebenholz	Ebenholz	1999-01-26
-1	-1187152	-1749133	47.0500000	9.5666667	470300	93400	NT41	NL32-02	T	MT		LS	00				V				ENDERLINHORN	Enderlin Horn	Enderlin Horn	1993-12-22
-1	-1187150	-1749134	47.2166667	9.5166667	471300	93100	NT32	NL32-02	A	ADM1 		LS	00				N				ESCHEN	Eschen	Eschen	1993-12-22
-1	-1187151	-1749135	47.2166667	9.5166667	471300	93100	NT32	NL32-02	P	PPL		LS	00				N				ESCHEN	Eschen	Eschen	1993-12-22
-1	-1187150	-1749136	47.2166667	9.5166667	471300	93100	NT32	NL32-02	A	ADM1 		LS	00				V				ESCHENNEDELN	Eschen-Nedeln	Eschen-Nedeln	1993-12-22
-1	-1187152	-1749137	47.0500000	9.5666667	470300	93400	NT41	NL32-02	T	MT		LS	00				N				FALKNIS	Falknis	Falknis	1993-12-22
-1	-1187152	-1749138	47.0500000	9.5666667	470300	93400	NT41	NL32-02	T	MT		LS	00				V				FALKNISHORN	Falknis Horn	Falknis Horn	1993-12-22
-1	-1187153	-1749139	47.2000000	9.5833333	471200	93500	NT42	NL32-02	T	MT		LS	00				N				FRASTANZERSAND	Frastanzer Sand	Frastanzer Sand	1993-12-22
-1	-1187154	-1749140	47.1333333	9.5500000	470800	93300	NT42	NL32-02	T	MT		LS	00				N				FURSTENSTEIG	Fürstensteig	Furstensteig	1993-12-22
-1	419573	535544	47.1333333	9.5333333	470800	93200	NT42	NL32-02	P	PPL		LS	00				N				GAFLEI	Gaflei	Gaflei	1999-01-26
-1	-1187155	-1749141	47.1500000	9.6166667	470900	93700	NT42	NL32-02	T	MT		LS	00				N				GALLINAKOPF	Gallinakopf	Gallinakopf	1993-12-22
-1	-1187157	-1749142	47.2166667	9.5000000	471300	93000	NT32	NL32-02	P	PPL		LS	00				V				GAMBRIN	Gambrin	Gambrin	1993-12-22
-1	-1187156	-1749143	47.2166667	9.5000000	471300	93000	NT32	NL32-02	A	ADM1 		LS	00				N				GAMPRIN	Gamprin	Gamprin	1993-12-22
-1	-1187157	-1749144	47.2166667	9.5000000	471300	93000	NT32	NL32-02	P	PPL		LS	00				N				GAMPRIN	Gamprin	Gamprin	1993-12-22
-1	-1187156	-1749145	47.2166667	9.5000000	471300	93000	NT32	NL32-02	A	ADM1 		LS	00				V				GAMPRINBENDERN	Gamprin-Bendern	Gamprin-Bendern	1993-12-22
-1	-1187158	-1749146	47.1666667	9.5666667	471000	93400	NT42	NL32-02	T	MT		LS	00				N				GARSELLAKOPF	Garsellakopf	Garsellakopf	1993-12-22
-1	-1187160	-1749147	47.0500000	9.5833333	470300	93500	NT41	NL32-02	T	PK		LS	00				V				GRAUSPITZ	Grauspitz	Grauspitz	1993-12-22
-1	-1187192	-1749148	47.0500000	9.5833333	470300	93500	NT41	NL32-02	T	PK		LS	00				V				GRAUSPITZ	Grauspitz	Grauspitz	1993-12-22
-1	-1187159	-1749149	47.2333333	9.5333333	471400	93200	NT43	NL32-02	P	PPLX 		LS	00				N				HINTERERSCHELLENBERG	Hinterer Schellenberg	Hinterer Schellenberg	1993-12-22
-1	-1187160	-1749150	47.0500000	9.5833333	470300	93500	NT41	NL32-02	T	PK		LS	00				N				HINTERGRAUSPITZ	Hinter-Grauspitz	Hinter-Grauspitz	1993-12-22
-1	419566	535536	47.0500000	9.5500000	470300	93300	NT41	NL32-02	T	VAL		LS	00				N				LAWENA	Lawena	Lawena	1999-01-26
-1	-1187161	-1749151	47.1666667	9.5333333	471000	93200	NT42	NL32-02	A	PCLI 		LS	00				V				LICHTENSTEIN	Lichtenstein	Lichtenstein	1996-11-29
-1	-1187161	-1749152	47.1666667	9.5333333	471000	93200	NT42	NL32-02	A	PCLI 		LS	00				V				LIECHTENSTEIN	Liechtenstein	Liechtenstein	1996-11-29
-1	-1187161	-1749154	47.1666667	9.5333333	471000	93200	NT42	NL32-02	A	PCLI 		LS	00				N	GM	Liechtenstein	Fürstentum	LIECHTENSTEIN FURSTENTUM	Fürstentum Liechtenstein	Furstentum Liechtenstein	1996-11-29
-1	-1187161	-1749153	47.1666667	9.5333333	471000	93200	NT42	NL32-02	A	PCLI 		LS	00				C		Liechtenstein		LIECHTENSTEIN PRINCIPALITYOF	Principality of Liechtenstein	Principality of Liechtenstein	1996-11-29
-1	419565	535533	47.0500000	9.5000000	470300	93000	NT31	NL32-02	P	PPL		LS	00				N				MALS	Mäls	Mals	1999-01-26
-1	419572	535543	47.1333333	9.5333333	470800	93200	NT42	NL32-02	P	PPL		LS	00				N				MASESCHA	Masescha	Masescha	1999-01-26
-1	-1187162	-1749155	47.1333333	9.6166667	470800	93700	NT42	NL32-02	T	PASS 		LS	00				V				MATLAJOCH	Matla Joch	Matla Joch	1994-04-28
-1	-1187162	-1749159	47.1333333	9.6166667	470800	93700	NT42	NL32-02	T	PASS 		LS	00			AU	N				MATLERJOCH	Matlerjoch	Matlerjoch	1994-04-28
-1	-1187181	-1749157	47.1333333	9.6333333	470800	93800	NT42	NL32-02	T	MT		LS	00				V				MATLERKOPF	Matler Kopf	Matler Kopf	1993-12-22
-1	-1187162	-1749158	47.1333333	9.6166667	470800	93700	NT42	NL32-02	T	PASS 		LS	00			LS	N				MATTAJOCH	Mattajoch	Mattajoch	1994-04-28
-1	-1187164	-1749160	47.2166667	9.5333333	471300	93200	NT42	NL32-02	P	PPL		LS	00				V				MAUERN	Mauern	Mauern	1993-12-22
-1	-1187163	-1749161	47.2166667	9.5333333	471300	93200	NT42	NL32-02	A	ADM1 		LS	00				N				MAUREN	Mauren	Mauren	1993-12-22
-1	-1187164	-1749162	47.2166667	9.5333333	471300	93200	NT42	NL32-02	P	PPL		LS	00				N				MAUREN	Mauren	Mauren	1993-12-22
-1	-1187163	-1749163	47.2166667	9.5333333	471300	93200	NT42	NL32-02	A	ADM1 		LS	00				V				MAURENSCHAANWALD	Mauren-Schaanwald	Mauren-Schaanwald	1993-12-22
-1	-1187165	-1749164	47.2333333	9.5333333	471400	93200	NT43	NL32-02	P	PPLX 		LS	00				N				MITTLERERSCHELLENBERG	Mittlerer Schellenberg	Mittlerer Schellenberg	1993-12-22
-1	419574	535545	47.1500000	9.5000000	470900	93000	NT32	NL32-02	P	PPL		LS	00				V				MOLIHOLZ	Möliholz	Moliholz	1999-01-26
-1	419574	535574	47.1500000	9.5000000	470900	93000	NT32	NL32-02	P	PPL		LS	00				N				MUHLEHOLZ	Mühleholz	Muhleholz	1999-01-26
-1	-1187166	-1749165	47.0500000	9.6000000	470300	93600	NT41	NL32-02	T	MT		LS	00				N				NAAFKOPF	Naafkopf	Naafkopf	1993-12-22
-1	-1187166	-1749166	47.0500000	9.6000000	470300	93600	NT41	NL32-02	T	MT		LS	00				V				NAUFKOPF	Nauf Kopf	Nauf Kopf	1993-12-22
-1	-1187167	-1749167	47.2000000	9.5500000	471200	93300	NT42	NL32-02	P	PPL		LS	00				N				NENDELN	Nendeln	Nendeln	1993-12-22
-1	-1187168	-1749168	47.1166667	9.6333333	470700	93800	NT41	NL32-02	T	MT		LS	00				V				OCHSENBERG	Ochsenberg	Ochsenberg	1993-12-22
-1	-1187168	-1749169	47.1166667	9.6333333	470700	93800	NT41	NL32-02	T	MT		LS	00				N				OCHSENKOPF	Ochsenkopf	Ochsenkopf	1993-12-22
-1	-1187169	-1749170	47.1833333	9.5333333	471100	93200	NT42	NL32-02	A	ADM1 		LS	00				N				PLANKEN	Planken	Planken	1993-12-22
-1	-1187170	-1749171	47.1833333	9.5333333	471100	93200	NT42	NL32-02	P	PPL		LS	00				N				PLANKEN	Planken	Planken	1993-12-22
-1	-1187171	-1749172	47.0500000	9.7500000	470300	94500	NT51	NL32-02	T	MTS		LS	00				V				RATIKON	Rätikon	Ratikon	1993-12-22
-1	-1187171	-1749174	47.0500000	9.7500000	470300	94500	NT51	NL32-02	T	MTS		LS	00				V				RHAETIKON	Rhaetikon	Rhaetikon	1993-12-22
-1	-1187171	-1749175	47.0500000	9.7500000	470300	94500	NT51	NL32-02	T	MTS		LS	00				N				RHATIKON	Rhätikon	Rhatikon	1993-12-22
-1	-1187171	-1749176	47.0500000	9.7500000	470300	94500	NT51	NL32-02	T	MTS		LS	00				V				RHATIKONMOUNTAINS	Rhätikon Mountains	Rhatikon Mountains	1993-12-22
-1	419569	535539	47.1166667	9.5500000	470700	93300	NT41	NL32-02	P	PPL		LS	00				V				ROTABODA	Rotaboda	Rotaboda	1999-01-26
-1	419569	535573	47.1166667	9.5500000	470700	93300	NT41	NL32-02	P	PPL		LS	00				N				ROTENBODEN	Rotenboden	Rotenboden	1999-01-26
-1	-1187174	-1749189	47.2333333	9.5166667	471400	93100	NT33	NL32-02	P	PPL		LS	00				V				RUGELL	Rugell	Rugell	1993-12-22
-1	-1187173	-1749190	47.2333333	9.5166667	471400	93100	NT33	NL32-02	A	ADM1 		LS	00				N				RUGGELL	Ruggell	Ruggell	1993-12-22
-1	-1187174	-1749191	47.2333333	9.5166667	471400	93100	NT33	NL32-02	P	PPL		LS	00				N				RUGGELL	Ruggell	Ruggell	1993-12-22
-1	-1187175	-1749192	47.2333333	9.6333333	471400	93800	NT43	NL32-02	H	STM		LS	00				N				SAMINA	Samina	Samina	1993-12-22
-1	-1187176	-1749193	47.1666667	9.5833333	471000	93500	NT42	NL32-02	T	VAL		LS	00				N				SAMINATAL	Saminatal	Saminatal	1993-12-22
-1	-1187176	-1749194	47.1666667	9.5833333	471000	93500	NT42	NL32-02	T	VAL		LS	00				V				SAMINATHAL	Samina Thal	Samina Thal	1993-12-22
-1	-1187177	-1749195	47.1000000	9.6333333	470600	93800	NT41	NL32-02	T	PASS 		LS	00				N				SAREISERJOCH	Sareiser Joch	Sareiser Joch	1993-12-22
-1	-1187178	-1749196	47.1666667	9.5000000	471000	93000	NT32	NL32-02	A	ADM1 		LS	00				N				SCHAAN	Schaan	Schaan	1993-12-22
-1	-1187179	-1749197	47.1666667	9.5000000	471000	93000	NT32	NL32-02	P	PPL		LS	00				N				SCHAAN	Schaan	Schaan	1993-12-22
-1	-1187180	-1749198	47.2166667	9.5666667	471300	93400	NT42	NL32-02	P	PPL		LS	00				N				SCHAANWALD	Schaanwald	Schaanwald	1993-12-22
-1	-1187179	-1749199	47.1666667	9.5000000	471000	93000	NT32	NL32-02	P	PPL		LS	00				V				SCHAN	Schan	Schan	1993-12-22
-1	-1187181	-1749200	47.1333333	9.6333333	470800	93800	NT42	NL32-02	T	MT		LS	00				N				SCHEIENKOPF	Scheienkopf	Scheienkopf	1993-12-22
-1	-1187182	-1749201	47.2333333	9.5333333	471400	93200	NT43	NL32-02	A	ADM1 		LS	00				N				SCHELLENBERG	Schellenberg	Schellenberg	1993-12-22
-1	-1187183	-1749202	47.2333333	9.5333333	471400	93200	NT43	NL32-02	P	PPL		LS	00				N				SCHELLENBERG	Schellenberg	Schellenberg	1993-12-22
-1	-1187181	-1749203	47.1333333	9.6333333	470800	93800	NT42	NL32-02	T	MT		LS	00				V				SCHEUENKOPF	Scheuenkopf	Scheuenkopf	1993-12-22
-1	419570	535541	47.1333333	9.5500000	470800	93300	NT42	NL32-02	P	PPL		LS	00				N				SILUM	Silum	Silum	1999-01-26
-1	419568	535538	47.1166667	9.5666667	470700	93400	NT41	NL32-02	P	PPL		LS	00				N				SUCKA	Sücka	Sucka	1999-01-26
-1	-1187184	-1749204	47.1000000	9.5333333	470600	93200	NT41	NL32-02	A	ADM1 		LS	00				N				TRIESEN	Triesen	Triesen	1993-12-22
-1	-1187185	-1749205	47.1000000	9.5333333	470600	93200	NT41	NL32-02	P	PPL		LS	00				N				TRIESEN	Triesen	Triesen	1993-12-22
-1	-1187186	-1749206	47.1166667	9.5333333	470700	93200	NT41	NL32-02	A	ADM1 		LS	00				N				TRIESENBERG	Triesenberg	Triesenberg	1993-12-22
-1	-1187187	-1749207	47.1166667	9.5333333	470700	93200	NT41	NL32-02	P	PPL		LS	00				N				TRIESENBERG	Triesenberg	Triesenberg	1993-12-22
-1	-1187188	-1749208	47.2500000	9.5333333	471500	93200	NT43	NL32-02	H	MRSH 		LS	00				N				UNTERESRIET	Unteres Riet	Unteres Riet	1993-12-22
-1	-1187189	-1749209	47.1333333	9.5166667	470800	93100	NT32	NL32-02	A	ADM1 		LS	00				N				VADUZ	Vaduz	Vaduz	1993-12-22
-1	-1187190	-1749210	47.1333333	9.5166667	470800	93100	NT32	NL32-02	P	PPLC 		LS	00				N				VADUZ	Vaduz	Vaduz	1995-04-26
-1	419571	535542	47.0833333	9.5833333	470500	93500	NT41	NL32-02	T	VAL		LS	00				N				VALUNA	Valüna	Valuna	1999-01-26
-1	-1187191	-1749211	47.2333333	9.5333333	471400	93200	NT43	NL32-02	P	PPLX 		LS	00				N				VORDERERSCHELLENBERG	Vorderer Schellenberg	Vorderer Schellenberg	1993-12-22
-1	-1187192	-1749212	47.0500000	9.5833333	470300	93500	NT41	NL32-02	T	PK		LS	00				N				VORDERGRAUSPITZ	Vorder-Grauspitz	Vorder-Grauspitz	1993-12-22
-1	419567	535537	47.1000000	9.5333333	470600	93200	NT41	NL32-02	P	PPL		LS	00				V				WANGERBARG	Wangerbärg	Wangerbarg	1999-01-26
-1	419567	535572	47.1000000	9.5333333	470600	93200	NT41	NL32-02	P	PPL		LS	00				N				WANGERBERG	Wangerberg	Wangerberg	1999-01-26
+RC	UFI	UNI	LAT	LONG	DMS_LAT	DMS_LONG	MGRS	JOG	FC	DSG	PC	CC1	ADM1	ADM2	POP	ELEV	CC2	NT	LC	SHORT_FORM	GENERIC	SORT_NAME	FULL_NAME	FULL_NAME_ND	MODIFY_DATE
+1	-1187145	-1749126	47.066667	9.5	470400	93000	32TNT3796512694	NL32-02	A	ADM1		LS	01					V				BALZERS	Balzers	Balzers	2004-10-27
+1	-1187145	9224799	47.066667	9.5	470400	93000	32TNT3796512694	NL32-02	A	ADM1		LS	01					N		Balzers	Gemeinde	GEMEINDEBALZERS	Gemeinde Balzers	Gemeinde Balzers	2004-10-27
+1	-1187145	9224888	47.066667	9.5	470400	93000	32TNT3796512694	NL32-02	A	ADM1		LS	01					V				BALZERSMALS	Balzers / Mäls	Balzers / Mals	2004-10-27
+1	-1187146	-1749127	47.066667	9.5	470400	93000	32TNT3796512694	NL32-02	P	PPLA		LS	01					N				BALZERS	Balzers	Balzers	2004-10-27
+1	-1187147	-1749128	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	P	PPL		LS	03					N				BENDERN	Bendern	Bendern	2004-10-27
+1	-1187148	-1749129	47.066667	9.616667	470400	93700	32TNT4682412757	NL32-02	T	PASS		LS	00					N				BETTLERJOCH	Bettlerjoch	Bettlerjoch	1993-12-22
+1	-1187149	-1749131	47.166667	9.55	471000	93300	32TNT4168423832	NL32-02	T	MTS		LS	00					N				DREISCHWESTERN	Drei Schwestern	Drei Schwestern	1993-12-22
+1	-1187149	-1749132	47.166667	9.55	471000	93300	32TNT4168423832	NL32-02	T	MTS		LS	00					V				DREYSCHWESTERN	Drey Schwestern	Drey Schwestern	1993-12-22
+1	-1187150	-1749134	47.216667	9.516667	471300	93100	32TNT3912129371	NL32-02	A	ADM1		LS	02					V				ESCHEN	Eschen	Eschen	2004-10-27
+1	-1187150	-1749136	47.216667	9.516667	471300	93100	32TNT3912129371	NL32-02	A	ADM1		LS	02					V				ESCHENNEDELN	Eschen-Nedeln	Eschen-Nedeln	2004-10-27
+1	-1187150	9224821	47.216667	9.516667	471300	93100	32TNT3912129371	NL32-02	A	ADM1		LS	02					N		Eschen	Gemeinde	GEMEINDEESCHEN	Gemeinde Eschen	Gemeinde Eschen	2004-10-27
+1	-1187150	9224897	47.216667	9.516667	471300	93100	32TNT3912129371	NL32-02	A	ADM1		LS	02					V				ESCHENNENDELN	Eschen / Nendeln	Eschen / Nendeln	2004-10-27
+1	-1187151	-1749135	47.216667	9.516667	471300	93100	32TNT3912129371	NL32-02	P	PPLA		LS	02					N				ESCHEN	Eschen	Eschen	2004-10-27
+1	-1187152	-1749133	47.05	9.566667	470300	93400	32TNT4304110876	NL32-02	T	MT		LS	00					V				ENDERLINHORN	Enderlin Horn	Enderlin Horn	1993-12-22
+1	-1187152	-1749137	47.05	9.566667	470300	93400	32TNT4304110876	NL32-02	T	MT		LS	00					N				FALKNIS	Falknis	Falknis	1993-12-22
+1	-1187152	-1749138	47.05	9.566667	470300	93400	32TNT4304110876	NL32-02	T	MT		LS	00					V				FALKNISHORN	Falknis Horn	Falknis Horn	1993-12-22
+1	-1187153	-1749139	47.2	9.583333	471200	93500	32TNT4418227555	NL32-02	T	MT		LS	00					N				FRASTANZERSAND	Frastanzer Sand	Frastanzer Sand	1993-12-22
+1	-1187154	-1749140	47.133333	9.55	470800	93300	32TNT4171020128	NL32-02	T	MT		LS	00					N				FURSTENSTEIG	Fürstensteig	Furstensteig	1993-12-22
+1	-1187155	-1749141	47.15	9.616667	470900	93700	32TNT4675122018	NL32-02	T	MT		LS	00					N				GALLINAKOPF	Gallinakopf	Gallinakopf	1993-12-22
+1	-1187156	-1749143	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	A	ADM1		LS	03					V				GAMPRIN	Gamprin	Gamprin	2004-10-27
+1	-1187156	-1749145	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	A	ADM1		LS	03					V				GAMPRINBENDERN	Gamprin-Bendern	Gamprin-Bendern	2004-10-27
+1	-1187156	9224845	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	A	ADM1		LS	03					V				GEMEINDEGAMPRINBENDERN	Gemeinde Gamprin-Bendern	Gemeinde Gamprin-Bendern	2004-10-27
+1	-1187156	9224847	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	A	ADM1		LS	03					N		Gamprin	Gemeinde	GEMEINDEGAMPRIN	Gemeinde Gamprin	Gemeinde Gamprin	2004-10-27
+1	-1187157	-1749142	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	P	PPLA		LS	03					V				GAMBRIN	Gambrin	Gambrin	2004-10-27
+1	-1187157	-1749144	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	P	PPLA		LS	03					N				GAMPRIN	Gamprin	Gamprin	2004-10-27
+1	-1187157	9224858	47.216667	9.5	471300	93000	32TNT3785929363	NL32-02	P	PPLA		LS	03					V				GAMPRINBENDERN	Gamprin-Bendern	Gamprin-Bendern	2004-10-27
+1	-1187158	-1749146	47.166667	9.566667	471000	93400	32TNT4294723841	NL32-02	T	MT		LS	00					N				GARSELLAKOPF	Garsellakopf	Garsellakopf	1993-12-22
+1	-1187159	-1749149	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					V				HINTERERSCHELLENBERG	Hinterer Schellenberg	Hinterer Schellenberg	2004-10-27
+1	-1187159	9246078	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					V				HINTERSCHELLENBERG	Hinter-Schellenberg	Hinter-Schellenberg	2004-10-27
+1	-1187159	9246168	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					N				HINTERSCHELLENBERG	Hinterschellenberg	Hinterschellenberg	2004-10-27
+1	-1187160	-1749147	47.05	9.583333	470300	93500	32TNT4430710886	NL32-02	T	PK		LS	00					V				GRAUSPITZ	Grauspitz	Grauspitz	1993-12-22
+1	-1187160	-1749150	47.05	9.583333	470300	93500	32TNT4430710886	NL32-02	T	PK		LS	00					N				HINTERGRAUSPITZ	Hinter-Grauspitz	Hinter-Grauspitz	1993-12-22
+1	-1187161	-1749151	47.166667	9.533333	471000	93200	32TNT4042123823	NL32-02	A	PCLI		LS	00					V				LICHTENSTEIN	Lichtenstein	Lichtenstein	2007-02-28
+1	-1187161	-1749153	47.166667	9.533333	471000	93200	32TNT4042123823	NL32-02	A	PCLI		LS	00					C	eng			PRINCIPALITYOFLIECHTENSTEIN	Principality of Liechtenstein	Principality of Liechtenstein	2007-02-28
+1	-1187161	-1749154	47.166667	9.533333	471000	93200	32TNT4042123823	NL32-02	A	PCLI		LS	00					N	deu	Liechtenstein	Fürstentum	FURSTENTUMLIECHTENSTEIN	Fürstentum Liechtenstein	Furstentum Liechtenstein	2007-02-28
+1	-1187162	-1749155	47.133333	9.616667	470800	93700	32TNT4676620166	NL32-02	T	PASS		LS	00					V				MATLAJOCH	Matla Joch	Matla Joch	1994-04-28
+1	-1187162	-1749158	47.133333	9.616667	470800	93700	32TNT4676620166	NL32-02	T	PASS		LS	00				LS	N				MATTAJOCH	Mattajoch	Mattajoch	1994-04-28
+1	-1187162	-1749159	47.133333	9.616667	470800	93700	32TNT4676620166	NL32-02	T	PASS		LS	00				AU	N				MATLERJOCH	Matlerjoch	Matlerjoch	1994-04-28
+1	-1187163	-1749161	47.216667	9.533333	471300	93200	32TNT4038329380	NL32-02	A	ADM1		LS	04					V				MAUREN	Mauren	Mauren	2004-10-27
+1	-1187163	-1749163	47.216667	9.533333	471300	93200	32TNT4038329380	NL32-02	A	ADM1		LS	04					V				MAURENSCHAANWALD	Mauren-Schaanwald	Mauren-Schaanwald	2004-10-27
+1	-1187163	9224862	47.216667	9.533333	471300	93200	32TNT4038329380	NL32-02	A	ADM1		LS	04					N		Mauren	Gemeinde	GEMEINDEMAUREN	Gemeinde Mauren	Gemeinde Mauren	2004-10-27
+1	-1187164	-1749160	47.216667	9.533333	471300	93200	32TNT4038329380	NL32-02	P	PPLA		LS	04					V				MAUERN	Mauern	Mauern	2004-10-27
+1	-1187164	-1749162	47.216667	9.533333	471300	93200	32TNT4038329380	NL32-02	P	PPLA		LS	04					N				MAUREN	Mauren	Mauren	2004-10-27
+1	-1187165	-1749164	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					V				MITTLERERSCHELLENBERG	Mittlerer Schellenberg	Mittlerer Schellenberg	2004-10-27
+1	-1187165	9246077	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					V				MITTLERSCHELLENBERG	Mittler-Schellenberg	Mittler-Schellenberg	2004-10-27
+1	-1187165	9246167	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					N				MITTLERSCHELLENBERG	Mittlerschellenberg	Mittlerschellenberg	2004-10-27
+1	-1187166	-1749165	47.05	9.6	470300	93600	32TNT4557310895	NL32-02	T	MT		LS	00					N				NAAFKOPF	Naafkopf	Naafkopf	1993-12-22
+1	-1187166	-1749166	47.05	9.6	470300	93600	32TNT4557310895	NL32-02	T	MT		LS	00					V				NAUFKOPF	Nauf Kopf	Nauf Kopf	1993-12-22
+1	-1187167	-1749167	47.2	9.55	471200	93300	32TNT4165827536	NL32-02	P	PPL		LS	02					N				NENDELN	Nendeln	Nendeln	2004-10-27
+1	-1187168	-1749168	47.116667	9.633333	470700	93800	32TNT4804518324	NL32-02	T	MT		LS	00					V				OCHSENBERG	Ochsenberg	Ochsenberg	1993-12-22
+1	-1187168	-1749169	47.116667	9.633333	470700	93800	32TNT4804518324	NL32-02	T	MT		LS	00					N				OCHSENKOPF	Ochsenkopf	Ochsenkopf	1993-12-22
+1	-1187169	-1749170	47.183333	9.533333	471100	93200	32TNT4040825676	NL32-02	A	ADM1		LS	05					V				PLANKEN	Planken	Planken	2004-10-27
+1	-1187169	9224865	47.183333	9.533333	471100	93200	32TNT4040825676	NL32-02	A	ADM1		LS	05					N		Planken	Gemeinde	GEMEINDEPLANKEN	Gemeinde Planken	Gemeinde Planken	2004-10-27
+1	-1187170	-1749130	47.183333	9.533333	471100	93200	32TNT4040825676	NL32-02	P	PPLA		LS	05					V				BLANKEN	Blanken	Blanken	2004-10-27
+1	-1187170	-1749171	47.183333	9.533333	471100	93200	32TNT4040825676	NL32-02	P	PPLA		LS	05					N				PLANKEN	Planken	Planken	2004-10-27
+1	-1187171	-1749172	47.05	9.75	470300	94500	32TNT5696610993	NL32-02	T	MTS		LS	00					V				RATIKON	Rätikon	Ratikon	1993-12-22
+1	-1187171	-1749174	47.05	9.75	470300	94500	32TNT5696610993	NL32-02	T	MTS		LS	00					V				RHAETIKON	Rhaetikon	Rhaetikon	1993-12-22
+1	-1187171	-1749175	47.05	9.75	470300	94500	32TNT5696610993	NL32-02	T	MTS		LS	00					N				RHATIKON	Rhätikon	Rhatikon	1993-12-22
+1	-1187171	-1749176	47.05	9.75	470300	94500	32TNT5696610993	NL32-02	T	MTS		LS	00					V				RHATIKONMOUNTAINS	Rhätikon Mountains	Rhatikon Mountains	1993-12-22
+1	-1187173	-1749190	47.233333	9.516667	471400	93100	32TNT3910931224	NL32-02	A	ADM1		LS	06					V				RUGGELL	Ruggell	Ruggell	2004-10-27
+1	-1187173	9224866	47.233333	9.516667	471400	93100	32TNT3910931224	NL32-02	A	ADM1		LS	06					N		Ruggell	Gemeinde	GEMEINDERUGGELL	Gemeinde Ruggell	Gemeinde Ruggell	2004-10-27
+1	-1187174	-1749189	47.233333	9.516667	471400	93100	32TNT3910931224	NL32-02	P	PPLA		LS	06					V				RUGELL	Rugell	Rugell	2004-10-27
+1	-1187174	-1749191	47.233333	9.516667	471400	93100	32TNT3910931224	NL32-02	P	PPLA		LS	06					N				RUGGELL	Ruggell	Ruggell	2004-10-27
+1	-1187175	-1749192	47.233333	9.633333	471400	93800	32TNT4793931289	NL32-02	H	STM		LS	00					N				SAMINA	Samina	Samina	1993-12-22
+1	-1187176	-1749193	47.166667	9.583333	471000	93500	32TNT4421023851	NL32-02	T	VAL		LS	00					N				SAMINATAL	Saminatal	Saminatal	1993-12-22
+1	-1187176	-1749194	47.166667	9.583333	471000	93500	32TNT4421023851	NL32-02	T	VAL		LS	00					V				SAMINATHAL	Samina Thal	Samina Thal	1993-12-22
+1	-1187177	-1749195	47.1	9.633333	470600	93800	32TNT4806016471	NL32-02	T	PASS		LS	00					N				SAREISERJOCH	Sareiser Joch	Sareiser Joch	1993-12-22
+1	-1187178	-1749196	47.166667	9.5	471000	93000	32TNT3789423807	NL32-02	A	ADM1		LS	07					V				SCHAAN	Schaan	Schaan	2004-10-27
+1	-1187178	9224868	47.166667	9.5	471000	93000	32TNT3789423807	NL32-02	A	ADM1		LS	07					N		Schaan	Gemeinde	GEMEINDESCHAAN	Gemeinde Schaan	Gemeinde Schaan	2004-10-27
+1	-1187179	-1749197	47.166667	9.5	471000	93000	32TNT3789423807	NL32-02	P	PPLA		LS	07					N				SCHAAN	Schaan	Schaan	2004-10-27
+1	-1187179	-1749199	47.166667	9.5	471000	93000	32TNT3789423807	NL32-02	P	PPLA		LS	07					V				SCHAN	Schan	Schan	2004-10-27
+1	-1187180	-1749198	47.216667	9.566667	471300	93400	32TNT4290729398	NL32-02	P	PPL		LS	04					N				SCHAANWALD	Schaanwald	Schaanwald	2004-10-27
+1	-1187181	-1749157	47.133333	9.633333	470800	93800	32TNT4803020176	NL32-02	T	MT		LS	00					V				MATLERKOPF	Matler Kopf	Matler Kopf	1993-12-22
+1	-1187181	-1749200	47.133333	9.633333	470800	93800	32TNT4803020176	NL32-02	T	MT		LS	00					N				SCHEIENKOPF	Scheienkopf	Scheienkopf	1993-12-22
+1	-1187181	-1749203	47.133333	9.633333	470800	93800	32TNT4803020176	NL32-02	T	MT		LS	00					V				SCHEUENKOPF	Scheuenkopf	Scheuenkopf	1993-12-22
+1	-1187182	-1749201	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	A	ADM1		LS	08					V				SCHELLENBERG	Schellenberg	Schellenberg	2004-10-27
+1	-1187182	9224871	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	A	ADM1		LS	08					N		Schellenberg	Gemeinde	GEMEINDESCHELLENBERG	Gemeinde Schellenberg	Gemeinde Schellenberg	2004-10-27
+1	-1187183	-1749202	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLA		LS	08					N				SCHELLENBERG	Schellenberg	Schellenberg	2004-10-27
+1	-1187184	-1749204	47.1	9.533333	470600	93200	32TNT4047116415	NL32-02	A	ADM1		LS	09					V				TRIESEN	Triesen	Triesen	2004-10-27
+1	-1187184	9224876	47.1	9.533333	470600	93200	32TNT4047116415	NL32-02	A	ADM1		LS	09					N		Triesen	Gemeinde	GEMEINDETRIESEN	Gemeinde Triesen	Gemeinde Triesen	2004-10-27
+1	-1187185	-1749205	47.1	9.533333	470600	93200	32TNT4047116415	NL32-02	P	PPLA		LS	09					N				TRIESEN	Triesen	Triesen	2004-10-27
+1	-1187186	-1749206	47.116667	9.533333	470700	93200	32TNT4045918267	NL32-02	A	ADM1		LS	10					V				TRIESENBERG	Triesenberg	Triesenberg	2004-10-27
+1	-1187186	9224880	47.116667	9.533333	470700	93200	32TNT4045918267	NL32-02	A	ADM1		LS	10					N		Triesenberg	Gemeinde	GEMEINDETRIESENBERG	Gemeinde Triesenberg	Gemeinde Triesenberg	2004-10-27
+1	-1187186	9224895	47.116667	9.533333	470700	93200	32TNT4045918267	NL32-02	A	ADM1		LS	10					V				TRIESENBERGSTEGMALBUN	Triesenberg / Steg / Malbun	Triesenberg / Steg / Malbun	2004-10-27
+1	-1187187	-1749207	47.116667	9.533333	470700	93200	32TNT4045918267	NL32-02	P	PPLA		LS	10					N				TRIESENBERG	Triesenberg	Triesenberg	2004-10-27
+1	-1187188	-1749208	47.25	9.533333	471500	93200	32TNT4035733084	NL32-02	H	MRSH		LS	00					N				UNTERESRIET	Unteres Riet	Unteres Riet	1993-12-22
+1	-1187189	-1749209	47.133333	9.516667	470800	93100	32TNT3918220111	NL32-02	A	ADM1		LS	11					V				VADUZ	Vaduz	Vaduz	2004-10-27
+1	-1187189	9224884	47.133333	9.516667	470800	93100	32TNT3918220111	NL32-02	A	ADM1		LS	11					N		Vaduz	Gemeinde	GEMEINDEVADUZ	Gemeinde Vaduz	Gemeinde Vaduz	2004-10-27
+1	-1187190	-1749210	47.133333	9.516667	470800	93100	32TNT3918220111	NL32-02	P	PPLC		LS	11					N				VADUZ	Vaduz	Vaduz	2004-10-27
+1	-1187191	-1749211	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					V				VORDERERSCHELLENBERG	Vorderer Schellenberg	Vorderer Schellenberg	2004-10-27
+1	-1187191	9246076	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					V				VORDERSCHELLENBERG	Vorder-Schellenberg	Vorder-Schellenberg	2004-10-27
+1	-1187191	9246166	47.233333	9.533333	471400	93200	32TNT4037031232	NL32-02	P	PPLX		LS	08					N				VORDERSCHELLENBERG	Vorderschellenberg	Vorderschellenberg	2004-10-27
+1	-1187192	-1749148	47.05	9.583333	470300	93500	32TNT4430710886	NL32-02	T	PK		LS	00					V				GRAUSPITZ	Grauspitz	Grauspitz	1993-12-22
+1	-1187192	-1749212	47.05	9.583333	470300	93500	32TNT4430710886	NL32-02	T	PK		LS	00					N				VORDERGRAUSPITZ	Vorder-Grauspitz	Vorder-Grauspitz	1993-12-22
+1	419565	535533	47.05	9.5	470300	93000	32TNT3797710842	NL32-02	P	PPL		LS	01					N				MALS	Mäls	Mals	2004-10-27
+1	419566	535536	47.05	9.55	470300	93300	32TNT4177510867	NL32-02	T	VAL		LS	00					N				LAWENA	Lawena	Lawena	1999-01-26
+1	419567	535537	47.1	9.533333	470600	93200	32TNT4047116415	NL32-02	P	PPL		LS	10					V				WANGERBARG	Wangerbärg	Wangerbarg	2004-10-27
+1	419567	535572	47.1	9.533333	470600	93200	32TNT4047116415	NL32-02	P	PPL		LS	10					N				WANGERBERG	Wangerberg	Wangerberg	2004-10-27
+1	419568	535538	47.116667	9.566667	470700	93400	32TNT4298718285	NL32-02	P	PPL		LS	10					N				SUCKA	Sücka	Sucka	2004-10-27
+1	419569	535539	47.125	9.533333	470730	93200	32TNT4045219193	NL32-02	P	PPL		LS	10					V				ROTABODA	Rotaboda	Rotaboda	2004-10-27
+1	419569	535573	47.125	9.533333	470730	93200	32TNT4045219193	NL32-02	P	PPL		LS	10					N				ROTENBODEN	Rotenboden	Rotenboden	2004-10-27
+1	419570	535541	47.133333	9.55	470800	93300	32TNT4171020128	NL32-02	P	PPL		LS	10					N				SILUM	Silum	Silum	2004-10-27
+1	419571	535542	47.083333	9.583333	470500	93500	32TNT4427914590	NL32-02	T	VAL		LS	00					N				VALUNA	Valüna	Valuna	1999-01-26
+1	419572	535543	47.133333	9.533333	470800	93200	32TNT4044620119	NL32-02	P	PPL		LS	10					N				MASESCHA	Masescha	Masescha	2004-10-27
+1	419573	535544	47.133333	9.533333	470800	93200	32TNT4044620119	NL32-02	P	PPL		LS	10					N				GAFLEI	Gaflei	Gaflei	2004-10-27
+1	419574	535545	47.15	9.5	470900	93000	32TNT3790621955	NL32-02	P	PPL		LS	11					V				MOLIHOLZ	Möliholz	Moliholz	2004-10-27
+1	419574	535574	47.15	9.5	470900	93000	32TNT3790621955	NL32-02	P	PPL		LS	11					N				MUHLEHOLZ	Mühleholz	Muhleholz	2004-10-27
+1	419575	535546	47.15	9.516667	470900	93100	32TNT3917021963	NL32-02	P	PPL		LS	11					V				EBAHOLZ	Ebaholz	Ebaholz	2004-10-27
+1	419575	535575	47.15	9.516667	470900	93100	32TNT3917021963	NL32-02	P	PPL		LS	11					N				EBENHOLZ	Ebenholz	Ebenholz	2004-10-27

Modified: packages/thuban/branches/upstream/current/Extensions/gns2shp/test/test_gns2shp.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/gns2shp/test/test_gns2shp.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/gns2shp/test/test_gns2shp.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -9,9 +9,9 @@
 Test gns2shp extension.
 """
 
-__version__ = "$Revision: 2484 $"
+__version__ = "$Revision: 2845 $"
 # $Source$
-# $Id: test_gns2shp.py 2484 2004-12-18 22:40:45Z jan $
+# $Id: test_gns2shp.py 2845 2008-06-20 05:20:03Z elachuni $
 
 import unittest
 import os
@@ -48,7 +48,7 @@
         n = gns2shp(filename, dest_filename)
 
         # is the number of shapes correct?
-        eq(n, 88) # what gns2shp reports
+        eq(n, 109) # what gns2shp reports
         # and now the actually written ones
         shp = shapelib.ShapeFile(dest_filename)
         numshapes, shapetype, mins, maxs = shp.info()
@@ -61,7 +61,7 @@
         field_types = { 'RC': FTInteger,
                         'UFI': FTInteger,
                         'UNI': FTInteger,
-                        'UTM': FTString,
+                        'MGRS': FTString,
                         'JOG': FTString,
                         'FC': FTString,
                         'DSG': FTString,
@@ -69,7 +69,8 @@
                         'CC1': FTString,
                         'ADM1': FTString,
                         'ADM2': FTString,
-                        'DIM': FTInteger,
+                        'POP': FTInteger,
+                        'ELEV': FTInteger,
                         'CC2': FTString,
                         'NT': FTString,
                         'LC': FTString,

Added: packages/thuban/branches/upstream/current/Extensions/importMP/README
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/importMP/README	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/importMP/README	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,11 @@
+This extension imports Polish Map Files, the format used by Garmin GPS
+receivers.
+
+There's quite a complete description of the format here
+http://www.cgpsmapper.com/download/cGPSmapper-UsrMan-v02.4.pdf
+
+The extension works by first creating shapefiles that represent the data in the
+MP file and then loading the shapefiles in to thuban, so it effectively works
+like a MP to Shapefile converter, also.
+
+

Added: packages/thuban/branches/upstream/current/Extensions/importMP/__init__.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/importMP/__init__.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/importMP/__init__.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,22 @@
+# Copyright (c) 2008 by Intevation GmbH
+# Authors:
+# Anthony Lenton <anthony at except.com.ar>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+# import the actual module
+import importMP
+
+# perform the registration of the extension
+from Thuban import _
+from Thuban.UI.extensionregistry import ExtensionDesc, ext_registry
+
+ext_registry.add(ExtensionDesc(
+    name = 'importMP',
+    version = '0.1.1',
+    authors= [ 'Anthony Lenton' ],
+    copyright = '2008 by Intevation GmbH',
+    desc = _("Import a Polish Map File (.mp)\n" \
+             "and convert it to Thuban.")))
+

Added: packages/thuban/branches/upstream/current/Extensions/importMP/importMP.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/importMP/importMP.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/importMP/importMP.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,305 @@
+# Copyright (c) 2008 by Intevation GmbH
+# Authors:
+# Anthony Lenton <anthony at except.com.ar>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+""" A Polish Map File parser.  This module contains the UI and shapefile
+    saving code . """
+
+import os
+import wx
+
+if __name__ != '__main__':
+    from Thuban.UI.command import registry, Command
+    from Thuban import _
+    from Thuban.UI.mainwindow import main_menu
+    from Thuban.UI import internal_from_wxstring
+
+from Thuban.Model.layer import Layer
+from Thuban.Model.classification import Classification, ClassGroupProperties
+from Thuban.Model.classification import ClassGroupSingleton
+from Thuban.Model.color import Color
+import shapelib
+import dbflib
+from pfm import MPParser
+
+def pfm2shp (src_fname, dest_fname):
+    """Convert a file from Polish Map File into Shapefiles. """
+    fp = open(src_fname)
+    parser = MPParser()
+    parser.parse (fp)
+    
+    poi_shp_filename = dest_fname + '_poi.shp'
+    poi_dbf_filename = dest_fname + '_poi.dbf'
+    poi_shp = shapelib.create(poi_shp_filename, shapelib.SHPT_POINT)
+    poi_dbf = dbflib.create(poi_dbf_filename)
+    poi_dbf.add_field('Label', dbflib.FTString, 80, 0)
+    del poi_dbf
+    poi_dbf = dbflib.open(poi_dbf_filename, 'r+b')
+    i = 0
+    for poi in parser.pois:
+        obj = shapelib.SHPObject(shapelib.SHPT_POINT, i,
+                                 [[(poi['long'], poi['lat'])]])
+        poi_shp.write_object(-1, obj)
+        poi_dbf.write_record(i, { 'Label': poi.get('Label', '') })
+        i += 1
+    del poi_shp
+    del poi_dbf
+
+    polygon_shp_filename = dest_fname + '_polygon.shp'
+    polygon_dbf_filename = dest_fname + '_polygon.dbf'
+    polygon_shp = shapelib.create(polygon_shp_filename, shapelib.SHPT_POLYGON)
+    polygon_dbf = dbflib.create(polygon_dbf_filename)
+    polygon_dbf.add_field('Label', dbflib.FTString, 80, 0)
+    polygon_dbf.add_field('Type', dbflib.FTString, 80, 0)
+    del polygon_dbf
+    polygon_dbf = dbflib.open(polygon_dbf_filename, 'r+b')
+    i = 0
+    for poly in parser.polygons:
+        if poly['Type'].lower() == '0x4b': # Skip background
+            continue
+        obj = shapelib.SHPObject(shapelib.SHPT_POLYGON, i,
+                                 [zip (poly['long'], poly['lat'])])
+        polygon_shp.write_object(-1, obj)
+        polygon_dbf.write_record(i, {'Label': poly.get('Label', ''),
+                                     'Type': poly.get('parsedType', '')})
+        i += 1
+    del polygon_shp
+    del polygon_dbf
+
+    bg_shp_filename = dest_fname + '_bg.shp'
+    bg_dbf_filename = dest_fname + '_bg.dbf'
+    bg_shp = shapelib.create(bg_shp_filename, shapelib.SHPT_POLYGON)
+    bg_dbf = dbflib.create(bg_dbf_filename)
+    bg_dbf.add_field('Label', dbflib.FTString, 80, 0)
+    bg_dbf.add_field('Type', dbflib.FTString, 8, 0)
+    del bg_dbf
+    bg_dbf = dbflib.open(bg_dbf_filename, 'r+b')
+    i = 0
+    for poly in parser.polygons:
+        if poly['Type'].lower() == '0x4b': # Process background
+            obj = shapelib.SHPObject(shapelib.SHPT_POLYGON, i,
+                                     [zip (poly['long'], poly['lat'])])
+            bg_shp.write_object(-1, obj)
+            bg_dbf.write_record(i, {'Label': poly.get('Label', ''),
+                                    'Type': poly.get('Type', '')})
+            i += 1
+    del bg_shp
+    del bg_dbf
+
+    road_shp_filename = dest_fname + '_road.shp'
+    road_dbf_filename = dest_fname + '_road.dbf'
+    road_shp = shapelib.create(road_shp_filename, shapelib.SHPT_ARC)
+    road_dbf = dbflib.create(road_dbf_filename)
+    road_dbf.add_field('Label', dbflib.FTString, 80, 0)
+    road_dbf.add_field('Type', dbflib.FTString, 80, 0)
+    del road_dbf
+    road_dbf = dbflib.open(road_dbf_filename, 'r+b')
+    i = 0
+    for poly in parser.polylines:
+        obj = shapelib.SHPObject(shapelib.SHPT_ARC,
+                                 i, [zip (poly['long'], poly['lat'])])
+        road_shp.write_object(-1, obj)
+        road_dbf.write_record(i, {'Label': poly.get('Label', ''),
+                                  'Type': poly.get('parsedType', '')})
+        i += 1
+    del road_shp
+    del road_dbf
+    return parser
+
+def getPolygonClassification(polygons):
+    """ Returns a Classification with the needed ClassGroups to describe the
+        provided polygons """
+    clazz = Classification()
+    waterProps = ClassGroupProperties()
+    waterProps.SetFill (Color (0.7, 0.7, 1))
+    vegetProps = ClassGroupProperties()
+    vegetProps.SetFill (Color (0.7, 1, 0.7))
+    buildProps = ClassGroupProperties()
+    buildProps.SetFill (Color (0.6, 0.6, 0.6))
+    iceProps = ClassGroupProperties()
+    iceProps.SetFill (Color (1, 1, 1))
+    earthProps = ClassGroupProperties()
+    earthProps.SetFill (Color (0.9, 0.6, 0.3))
+    
+    typeProps = {'Parking Garage': buildProps, 'City': buildProps,
+                 'Car Park (Parking Lot)': buildProps, 'Glacier': iceProps,
+                 'University': buildProps, 'Hospital': buildProps,
+                 'Cemetery': buildProps, 'City Park': vegetProps,
+                 'National park': vegetProps, 'Reservation': vegetProps,
+                 'Depth area - blue 4': waterProps,
+                 'Depth area - blue 5': waterProps,
+                 'Depth area - blue 2': waterProps,
+                 'Depth area - blue 3': waterProps,
+                 'Depth area - blue 1': waterProps, 'Tundra': iceProps,
+                 'Man made area': buildProps, 'Industrial': buildProps,
+                 'Airport Runway': buildProps, 'Land - urban': buildProps,
+                 'Military': buildProps, 'Intermittent River/Lake': waterProps,
+                 'Lake': waterProps, 'Depth area - white 1': waterProps,
+                 'Airport': buildProps, 'State Park': vegetProps,
+                 'Land - non-urban': earthProps, 'Ocean': waterProps,
+                 'Scrub': vegetProps, 'River': waterProps, 'Bridge': buildProps,
+                 'Golf': vegetProps, 'Depth area - white': waterProps,
+                 'Marina': waterProps, 'Blue-Unknown': waterProps,
+                 'Orchard or plantation': vegetProps, 'Flats': earthProps,
+                 'Woods': vegetProps, 'Wetland': earthProps, 'Sea': waterProps,
+                 'Shopping Centre': buildProps, 'Land - white': iceProps,
+                 'Sport': buildProps}
+
+    types = list(set([p['parsedType'] for p in polygons]))
+    for t in types:
+        if t in typeProps.keys():
+            group = ClassGroupSingleton (value=t, props=typeProps[t], label=t)
+            clazz.AppendGroup (group)
+    return clazz
+
+def getPolylineClassification(polylines):
+    """ Returns a Classification with the needed ClassGroups to describe the
+        provided polylines """
+    clazz = Classification()
+    waterProps = ClassGroupProperties()
+    waterProps.SetLineColor (Color (0.5, 0.5, 0.8))
+    minorProps = ClassGroupProperties()
+    minorProps.SetLineColor (Color (0.1, 0.9, 0.1))
+    majorProps = ClassGroupProperties()
+    majorProps.SetLineColor (Color (1, 1, 0.1))
+    roadProps = ClassGroupProperties()
+    roadProps.SetLineColor (Color (0.4, 0.4, 0.4))
+    railProps = ClassGroupProperties()
+    railProps.SetLineColor (Color (0.2, 0.2, 0.2))
+    earthProps = ClassGroupProperties()
+    earthProps.SetLineColor (Color (0.9, 0.6, 0.3))
+    boundProps = ClassGroupProperties()
+    boundProps.SetLineColor (Color (0.1, 0.1, 0.1))
+    dangerProps = ClassGroupProperties()
+    dangerProps.SetLineColor (Color (1, 0.1, 0.1))
+
+    typeProps = {'River channel': waterProps, 'Alley-thick': roadProps,
+                 'Principal Highway-thick': minorProps,
+                 'Intermittent River': waterProps, 'Airport Runway': roadProps,
+                 'Danger line': dangerProps, 'Ramp': roadProps,
+                 'Arterial Road-medium': minorProps,
+                 'Major Highway-thick': majorProps,
+                 'Principal Highway-medium': majorProps, 'River': waterProps,
+                 'International Boundary': boundProps,
+                 'County Boundary': boundProps, 'Political Boundary':boundProps,
+                 'Ferry': waterProps, 'Bridge': roadProps, 'Road': roadProps,
+                 'Stream-thin': waterProps, 'Track/Trail': earthProps,
+                 'Railroad': railProps, 'Unpaved Road-thin': earthProps,
+                 'Arterial Road-thick': minorProps, 'Road-thin': roadProps,
+                 'Major Highway Connector-thick': majorProps,
+                 'Roundabout': minorProps}
+
+    types = list(set([p['parsedType'] for p in polylines]))
+    for t in types:
+        if t in typeProps.keys():
+            group = ClassGroupSingleton (value=t, props=typeProps[t], label=t)
+            clazz.AppendGroup (group)
+    return clazz
+
+def getBackgroundClassification():
+    """ Returns a Classification with a ClassGroup for the
+        background polygon """
+    clazz = Classification()
+    bgProps = ClassGroupProperties()
+    bgProps.SetFill (Color (1, 1, 0.9))
+    grp = ClassGroupSingleton (value="0x4b", props=bgProps, label="Background")
+    clazz.AppendGroup (grp)
+    return clazz
+
+
+
+def import_mp_dialog(context):
+    """Request filename from user and run importing of mp file.
+
+    context -- The Thuban context.
+    """
+    dlg = wx.FileDialog(context.mainwindow,
+                       _("Select MP file"), ".", "",
+                       _("Polish Map Files (*.mp)|*.mp|") +
+                       _("Text Files (*.txt)|*.txt|") +
+                       _("All Files (*.*)|*.*"),
+                       wx.OPEN|wx.OVERWRITE_PROMPT)
+    if dlg.ShowModal() == wx.ID_OK:
+        pfm_filename = internal_from_wxstring(dlg.GetPath())
+        dlg.Destroy()
+    else:
+        return
+
+    if pfm_filename.find ('.') == -1:
+        basename = filename
+    else:
+        basename = pfm_filename[:pfm_filename.rfind ('.')]
+
+    parser = pfm2shp (pfm_filename, basename)
+    # Now load the newly created shapefile
+    poi_filename = basename + '_poi.shp'
+    bg_filename = basename + '_bg.shp'
+    road_filename = basename + '_road.shp'
+    polygon_filename = basename + '_polygon.shp'
+    title = os.path.splitext(os.path.basename(pfm_filename))[0]
+    map = context.mainwindow.canvas.Map()
+    has_layers = map.HasLayers()
+
+    try:
+        store = context.session.OpenShapefile(bg_filename)
+    except IOError:
+        # the layer couldn't be opened
+        context.mainwindow.RunMessageBox(_('Add PFM Layer'),
+                           _("Can't open the file '%s'.") % bg_filename)
+    else:
+        layer = Layer(title + ' - Background', store)
+        layer.SetClassificationColumn ('Type')
+        layer.SetClassification (getBackgroundClassification())
+        map.AddLayer(layer)
+    try:
+        store = context.session.OpenShapefile(poi_filename)
+    except IOError:
+        # the layer couldn't be opened
+        context.mainwindow.RunMessageBox(_('Add PFM Layer'),
+                           _("Can't open the file '%s'.") % poi_filename)
+    else:
+        layer = Layer(title + ' - Points', store)
+        map.AddLayer(layer)
+
+    try:
+        store = context.session.OpenShapefile(polygon_filename)
+    except IOError:
+        # the layer couldn't be opened
+        context.mainwindow.RunMessageBox(_('Add PFM Layer'),
+                           _("Can't open the file '%s'.") % polygon_filename)
+    else:
+        layer = Layer(title + ' - Polygons', store)
+        layer.SetClassificationColumn ('Type')
+        layer.SetClassification (getPolygonClassification(parser.polygons))
+        map.AddLayer(layer)
+
+    try:
+        store = context.session.OpenShapefile(road_filename)
+    except IOError:
+        # the layer couldn't be opened
+        context.mainwindow.RunMessageBox(_('Add PFM Layer'),
+                           _("Can't open the file '%s'.") % road_filename)
+    else:
+        layer = Layer(title + ' - Lines', store)
+        layer.SetClassificationColumn ('Type')
+        layer.SetClassification (getPolylineClassification(parser.polylines))
+        map.AddLayer(layer)
+
+    if not has_layers:
+        # if we're adding a layer to an empty map, fit the
+        # new map to the window
+        context.mainwindow.canvas.FitMapToWindow()
+
+# register the new command
+registry.Add(Command('import-mp', _("(experimental) ") + _('Import PFM-file'),
+                     import_mp_dialog, helptext=_('Import a Polish Map File')))
+
+# find the extension menu (create it anew if not found)
+extensions_menu = main_menu.FindOrInsertMenu('extensions',
+                                               _('E&xtensions'))
+
+# finally add the new entry to the menu
+extensions_menu.InsertItem('import-mp')

Added: packages/thuban/branches/upstream/current/Extensions/importMP/pfm.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/importMP/pfm.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/importMP/pfm.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,361 @@
+# Copyright (C) 2008 by Intevation GmbH
+# Authors:
+# Anthony Lenton <anthony at except.com.ar>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+""" A Polish Map File parser.  This module contains the MPParser class, 
+    that does the real weight lifting for the importMP module. """
+
+import re
+
+class MPParseError(Exception):
+    def __init__(self, lNum, reason):
+        self.reason = reason
+        self.lineNumber = lNum
+    def __str__(self):
+        return "Line %d: %s" % (self.lineNumber, repr(self.reason))
+    def __repr__(self):
+        return "Line %d: %s" % (self.lineNumber, repr(self.reason))
+
+# These dictionaries should probably be moved in to a separate file
+polylineTypes = {'0x01': 'Major Highway-thick',
+                 '0x02': 'Principal Highway-thick',
+                 '0x03': 'Principal Highway-medium',
+                 '0x04': 'Arterial Road-medium',
+                 '0x05': 'Arterial Road-thick',
+                 '0x06': 'Road-thin',
+                 '0x07': 'Alley-thick',
+                 '0x08': 'Ramp',
+                 '0x09': 'Ramp',
+                 '0x0a': 'Unpaved Road-thin',
+                 '0x0b': 'Major Highway Connector-thick',
+                 '0x0c': 'Roundabout',
+                 '0x14': 'Railroad',
+                 '0x15': 'Shoreline',
+                 '0x16': 'Track/Trail',
+                 '0x18': 'Stream-thin',
+                 '0x19': 'Time-Zone',
+                 '0x1a': 'Ferry',
+                 '0x1b': 'Ferry',
+                 '0x1c': 'Political Boundary',
+                 '0x1d': 'County Boundary',
+                 '0x1e': 'International Boundary',
+                 '0x1f': 'River',
+                 '0x20': 'Land Contour (thin)',
+                 '0x21': 'Land Contour (medium)',
+                 '0x22': 'Land Contour (thick)',
+                 '0x23': 'Depth Contour (thin)',
+                 '0x24': 'Depth Contour (medium)',
+                 '0x25': 'Depth Contour (thick)',
+                 '0x26': 'Intermittent River',
+                 '0x27': 'Airport Runway',
+                 '0x28': 'Pipeline',
+                 '0x29': 'Power line',
+                 '0x2a': 'Marine Boundary (no line)',
+                 '0x2b': 'Marine Hazard (no line)',
+                 '0x0100': 'Miscellaneous line',
+                 '0x0101': 'Line',
+                 '0x0102': 'Cartographic line',
+                 '0x0103': 'Road',
+                 '0x0104': 'Clearing line',
+                 '0x0105': 'Contour line',
+                 '0x0106': 'Overhead cable',
+                 '0x0107': 'Bridge',
+                 '0x0108': 'Recommended route',
+                 '0x0109': 'Chart border',
+                 '0x0300': 'Depth contour',
+                 '0x0301': 'Depth contour value',
+                 '0x0307': 'Intertidal zone border',
+                 '0x0400': 'Obstruction line',
+                 '0x0401': 'Submarine cable',
+                 '0x0402': 'Submarine pipeline',
+                 '0x0403': 'Pile barrier',
+                 '0x0404': 'Fishing stakes',
+                 '0x0405': 'Supply pipeline area',
+                 '0x0406': 'Submarine cable area',
+                 '0x0407': 'Dumping ground',
+                 '0x0408': 'Explosive dumping ground',
+                 '0x0409': 'Danger line',
+                 '0x040a': 'Overhead cable',
+                 '0x040b': 'Submerged construction',
+                 '0x040c': 'Pier/jetty',
+                 '0x0500': 'Restriction',
+                 '0x0501': 'Anchoring prohibited',
+                 '0x0502': 'Fishing prohibited',
+                 '0x0503': 'Prohibited area',
+                 '0x0504': 'Military practice area',
+                 '0x0505': 'Anchoring and fishing prohibited',
+                 '0x0506': 'Limit of nature reservation',
+                 '0x0507': 'Restricted area',
+                 '0x0508': 'Minefield',
+                 '0x0600': 'Miscellaneous line',
+                 '0x0601': 'Cartographic line',
+                 '0x0602': 'Traffic separation line',
+                 '0x0603': 'International maritime boundary',
+                 '0x0604': 'Straight territorial sea baseline',
+                 '0x0605': 'Seaward limit of territorial sea',
+                 '0x0606': 'Anchorage area',
+                 '0x0607': 'Quarantine anchorage area',
+                 '0x0608': 'Fishery zone',
+                 '0x0609': 'Swept area',
+                 '0x060a': 'Traffic separation zone',
+                 '0x060b': 'Limit of exclusive economic zone',
+                 '0x060c': 'Established direction of traffic flow',
+                 '0x060d': 'Recommended direction of traffic flow',
+                 '0x060e': 'Harbour limit',
+                 '0x060f': 'Inadequately surveyed area',
+                 '0x0610': 'Inshore traffic zone',
+                 '0x0611': 'Limit of traffic lane',
+                 '0x0701': 'River channel',
+                 '0x0702': 'Submerged object',
+                 '0x0706': 'Chart boundary'}
+
+polygonTypes = {'0x01': 'City',
+                '0x02': 'City',
+                '0x03': 'City',
+                '0x04': 'Military',
+                '0x05': 'Car Park (Parking Lot)',
+                '0x06': 'Parking Garage',
+                '0x07': 'Airport',
+                '0x08': 'Shopping Centre',
+                '0x09': 'Marina',
+                '0x0a': 'University',
+                '0x0b': 'Hospital',
+                '0x0c': 'Industrial',
+                '0x0d': 'Reservation',
+                '0x0e': 'Airport Runway',
+                '0x13': 'Man made area',
+                '0x14': 'National park',
+                '0x15': 'National park',
+                '0x16': 'National park',
+                '0x17': 'City Park',
+                '0x18': 'Golf',
+                '0x19': 'Sport',
+                '0x1a': 'Cemetery',
+                '0x1e': 'State Park',
+                '0x1f': 'State Park',
+                '0x28': 'Ocean',
+                '0x3b': 'Blue-Unknown',
+                '0x32': 'Sea',
+                '0x3b': 'Blue-Unknown',
+                '0x3c': 'Lake',
+                '0x3d': 'Lake',
+                '0x3e': 'Lake',
+                '0x3f': 'Lake',
+                '0x40': 'Lake',
+                '0x41': 'Lake',
+                '0x42': 'Lake',
+                '0x43': 'Lake',
+                '0x44': 'Lake',
+                '0x45': 'Blue-Unknown',
+                '0x46': 'River',
+                '0x47': 'River',
+                '0x48': 'River',
+                '0x49': 'River',
+                '0x4b': 'Background',
+                '0x4c': 'Intermittent River/Lake',
+                '0x4d': 'Glacier',
+                '0x4e': 'Orchard or plantation',
+                '0x4f': 'Scrub',
+                '0x50': 'Woods',
+                '0x51': 'Wetland',
+                '0x52': 'Tundra',
+                '0x53': 'Flats',
+                '0x0100': 'Land - white',
+                '0x0101': 'Land - non-urban',
+                '0x0102': 'Land - urban',
+                '0x0103': 'Chart exclusion area',
+                '0x0104': 'Chart background',
+                '0x0105': 'Bridge',
+                '0x0300': 'Depth area - white 1',
+                '0x0301': 'Intertidal zone',
+                '0x0302': 'Depth area - blue 1',
+                '0x0303': 'Depth area - blue 2',
+                '0x0304': 'Depth area - blue 3',
+                '0x0305': 'Depth area - blue 4',
+                '0x0306': 'Depth area - blue 5',
+                '0x0307': 'Depth area - white',
+                '0x0400': 'Obstruction (invisible)',
+                '0x0401': 'Submarine cable (invisible)',
+                '0x0402': 'Submarine pipeline (invisible)',
+                '0x0403': 'Pile barrier (invisible)',
+                '0x0404': 'Fishing stakes (invisible)',
+                '0x0405': 'Supply pipeline area/line (invisible)',
+                '0x0406': 'Submarine cable area/line (invisible)',
+                '0x0407': 'Dumping ground (invisible)',
+                '0x0408': 'Explosive dumping ground (invisible)',
+                '0x0409': 'Danger line (invisible)',
+                '0x040a': 'Overhead cable (invisible)',
+                '0x040b': 'Submerged construction (invisible)',
+                '0x040c': 'Pier/jetty (invisible)',
+                '0x0500': 'Restriction area/line (invisible)',
+                '0x0501': 'Anchoring prohibited (invisible)',
+                '0x0502': 'Fishing prohibited (invisible)',
+                '0x0503': 'Prohibited area (invisible)',
+                '0x0504': 'Military practice area (invisible)',
+                '0x0505': 'Anchoring and fishing prohibited (invisible)',
+                '0x0506': 'Limit of nature reservation (invisible)',
+                '0x0507': 'Restricted area (invisible)',
+                '0x0508': 'Minefield (invisible)',
+                '0x0600': 'Miscellaneous area',
+                '0x0601': 'Cartographic area',
+                '0x0602': 'Traffic separation area',
+                '0x0603': 'International maritime boundary',
+                '0x0604': 'Straight territorial sea baseline',
+                '0x0605': 'Seaward limit of territorial sea',
+                '0x0606': 'Anchorage area',
+                '0x0607': 'Quarantine anchorage area',
+                '0x0608': 'Fishery zone',
+                '0x0609': 'Swept area',
+                '0x060a': 'Traffic separation zone',
+                '0x060b': 'Limit of exclusive economic zone',
+                '0x060c': 'Established direction of traffic flow',
+                '0x0701': 'Fishing area',
+                '0x0702': 'Restricted area',
+                '0x0703': 'Anchorage area',
+                '0x0704': 'Fishing Hot Spots chart'}
+
+class MPParser(object):
+    """ Polish Map File parser.  The main method is 'parse', which
+        receives a file object as its single argument.  The results of
+        the parsing can then be retrieved via 'pois', 'polygons', 'polylines',
+        and other attributes.
+    """
+    fields = {'poi': ['Data0', 'Label', 'Origin0'],
+              'rgn10': ['Data0', 'Label', 'Origin0'],
+              'rgn20': ['Data0', 'Label', 'Origin0'],
+              'polyline': ['Type', 'Data0', 'Origin0', 'Label'],
+              'rgn40': ['Type', 'Data0', 'Origin0', 'Label'],
+              'polygon': ['Type', 'Data0', 'Origin0', 'Label'],
+              'rgn80': ['Type', 'Data0', 'Origin0', 'Label'],
+              'img id': ['Name'] }
+    def __init__(self):
+        self.pois = []
+        self.polygons = []
+        self.polylines = []
+        self.parsedLines = 0
+        self.parsedSections = 0
+        self.mapName = ""
+
+    def parse (self, fp):
+        """ Parse a map file. 'fp' should be a readable file object.
+            After parsing the results can be accessed using 'pois', 'polylines',
+            'polygons', and other attributes.
+            Returns a dictionary with the results of the parsing, but this can
+            be most often discarded directly """
+        def sectionBounder (line):
+            return line[0] == '[' and line[-1] == ']'
+        def sectionEnd (line):
+            return (sectionBounder (line) and
+                   (line.lower() == '[end]' or
+                   line.lower().startswith('[end-')))
+        def sectionStart (line):
+            return sectionBounder (line) and not sectionEnd (line)
+        parsed = {}
+        for kind in self.fields.keys():
+            parsed[kind] = []
+        inSection = False
+        sectionName = None
+        lNum = 0 # Number of lines parsed so far
+        sNum = 0 # Number of sections parsed so far
+        for line in fp.readlines():
+            lNum += 1
+            line = line.strip()
+            if len(line) == 0 or line[0] == ';': # Drop blank lines and comments
+                continue
+            if not inSection:
+                if not sectionBounder (line):
+                    raise MPParseError (lNum, "Line not within a section")
+                elif sectionEnd (line):
+                    raise MPParseError (lNum, "Section End without a section")
+                else:
+                    sectionName = line[1:-1].lower()
+                    section = {}
+                    inSection = True
+                    sNum += 1
+            else:
+                if not sectionBounder (line):
+                    if sectionName in self.fields.keys():
+                        parts = line.split('=',1)
+                        if len(parts) != 2:
+                            raise MPParseError (lNum, "Invalid line")
+                        key, value = map(str.strip, parts)
+                        if key in self.fields[sectionName]:
+                            section[key] = value
+                elif sectionStart (line):
+                    raise MPParseError (lNum, "Section Start within a section")
+                else:
+                    if line.startswith ('[end-') and line[5:-1] != sectionName:
+                        raise MPParseError (lNum, "Section name mismatch")
+                    if sectionName in self.fields.keys():
+                        parsed[sectionName].append (section)
+                    inSection = False
+        # These last checks are a bit pedantic (not needed to do our
+        # job) but we're validating the source file a bit.
+        if inSection:
+            raise MPParseError (lNum, "End-of-file found within a section")
+        if len(parsed['img id']) == 0:
+            raise MPParseError (lNum, "No [IMG ID] section found")
+        elif len(parsed['img id']) > 1:
+            raise MPParseError (lNum, "Multiple [IMG ID] sections found")
+        else:
+            self.mapName = parsed['img id'][0].get ('Name', "")
+
+        # Ok, enough checks, set the data!
+        self.parsedLines = lNum
+        self.parsedSections = sNum
+
+        self.pois = parsed['poi'] + parsed['rgn10'] + parsed['rgn20']
+        twople = re.compile(r'\([-+]?(?P<lat>\d+(\.\d*)?|\.\d+), ' \
+                             r'*[-+]?(?P<long>\d+(\.\d*)?|\.\d+)\)')
+        for poi in self.pois:
+            assert poi.has_key ('Data0') or poi.has_key ('Origin0')
+            data = poi.get('Data0', poi.get('Origin0'))
+            match = twople.match (data)
+            if not match is None:
+                poi['long'] = -float (match.group('long'))
+                poi['lat'] = -float (match.group('lat'))
+        self.polygons = parsed['polygon'] + parsed['rgn80']
+        for poly in self.polygons:
+            poly['long'] = []
+            poly['lat'] = []
+            assert poly.has_key ('Data0') or poly.has_key ('Origin0')
+            data = poly.get('Data0', poly.get('Origin0'))
+            while len(data) > 0:
+                match = twople.match (data)
+                if not match is None:
+                    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:
+                # Attempt to read 0xe as 0x0e, for example
+                newType = '0x0' + poly['Type'][2:]
+                poly['parsedType'] = polygonTypes.get(newType, "")
+
+        self.polylines = parsed['polyline'] + parsed['rgn40']
+        for poly in self.polylines:
+            poly['long'] = []
+            poly['lat'] = []
+            assert poly.has_key ('Data0') or poly.has_key ('Origin0')
+            data = poly.get('Data0', poly.get('Origin0'))
+            while len(data) > 0:
+                match = twople.match (data)
+                if not match is None:
+                    poly['long'].append (-float (match.group('long')))
+                    poly['lat'].append (-float (match.group('lat')))
+                    data = data[match.end() + 1:]
+            try:
+                poly['parsedType'] = polylineTypes[poly['Type']]
+            except KeyError, e:
+                # Attempt to read 0xe as 0x0e, for example
+                newType = '0x0' + poly['Type'][2:]
+                poly['parsedType'] = polylineTypes.get(newType, "")
+        return parsed
+

Added: packages/thuban/branches/upstream/current/Extensions/importMP/test/snippets.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/importMP/test/snippets.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/importMP/test/snippets.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,492 @@
+# This file contains snippets used by the testing functions.
+# They should be in alphabetical order
+
+bounderMismatch = """
+[img 1]
+[end-yonk]
+"""
+
+caseSensitivity1 = """
+[IMG ID]
+[END-IMG ID]
+"""
+
+caseSensitivity2 = """
+[img ID]
+[enD-IMG id]
+"""
+
+caseSensitivity3 = """
+[ImG Id]
+[EnD-imG iD]
+"""
+
+doubleSectionClose = """
+[img id]
+[end-img id]
+[end-img id]
+"""
+
+headerWithComments = """[img id]
+This=is a test MPFile
+;I have no idea what it's about, But I shouldn't care
+; I do know that this is a comment
+; So it should be removed.
+; And blank lines should be removed too.
+
+=This isn't a comment.
+T=his; isn't either
+   ; let's say this is a comment
+   ; to be a bit more robust
+[end]
+"""
+
+incompleteSection = """
+[img id]
+"""
+
+justHeader = """
+[img id]
+Dummy=I'm a fake MPFile
+[end]
+"""
+
+mapWithName = """
+[img id]
+Name = My Test Map
+[end]
+"""
+
+miniLobos = """
+[IMG ID]
+CodePage=850
+LblCoding=9
+ID=54010076
+Name=Lobos
+[END-IMG ID]
+
+[Countries]
+Country1=Argentina~[0x1d]ARG
+[END-Countries]
+
+[Regions]
+Region1=Buenos Aires~[0x1d]BA
+CountryIdx1=1
+[END-Regions]
+
+[Cities]
+City1=Abbott
+RegionIdx1=1
+[END-Cities]
+
+[ZipCodes]
+ZipCode1=7200
+[END-ZipCodes]
+
+[Restrict]
+Nod=155306
+TraffPoints=155988,155306,155988
+TraffRoads=8609,8609
+Time=
+[END-Restrict]
+
+[DICTIONARY]
+;           0        1         2         3         4   
+;           1234567890123456789012345678901234567890123
+Level1RGN40=1111111111110000000111011111111111111111111
+Level2RGN40=1111111111110000000111011111111111111111111
+Level3RGN40=1111100101110000000111011111111011011101100
+Level4RGN40=1111000001110000000010001111111001001000000
+Level5RGN40=1100000000000000000010001011110000000000000
+Level6RGN40=1000000000000000000010001000010000000000000
+[END-DICTIONARY]
+
+[POI]
+Type=0x2500
+Label=Peaje Saladillo
+EndLevel=6
+StreetDesc=Ruta 205 Km. 167,00
+Data0=(-35.51966,-59.67464)
+[END]
+
+[POI]
+Type=0x4400
+Label=ACA
+EndLevel=6
+Data0=(-35.70035,-58.88981)
+[END]
+
+[POI]
+Type=0x5903
+Label=Saladillo
+EndLevel=6
+Data0=(-35.60043,-59.81360)
+[END]
+
+[POI]
+Type=0x6401
+EndLevel=6
+Data0=(-35.65026,-58.85069)
+[END]
+
+[POLYLINE]
+Type=0xa
+EndLevel=6
+RoadID=1970
+RouteParam=3,0,0,0,0,0,0,0,0,0,0,0
+Data0=(-35.07797,-59.09923),(-35.08840,-59.11088)
+Nod1=0,34258,0
+Nod2=1,34259,0
+[END]
+
+[POLYLINE]
+Type=0xa
+EndLevel=6
+RoadID=1973
+RouteParam=3,0,0,0,0,0,0,0,0,0,0,0
+Data0=(-35.24004,-59.48067),(-35.24277,-59.49114),(-35.24497,-59.49020)
+Nod1=0,29389,0
+Nod2=2,29386,0
+[END]
+
+[POLYGON]
+Type=0x17
+Label=Plaza Arturo Illia
+EndLevel=6
+Data0=(-35.76743,-58.49350),(-35.76776,-58.49378),(-35.76782,-58.49371)
+[END]
+
+"""
+
+missingZeroType = """
+[IMG ID]
+[END]
+
+[POLYGON]
+Type=0x0e
+Label=An Airport Runway
+EndLevel=6
+Data0=(-35.76743,-58.49350),(-35.76776,-58.49378),(-35.76782,-58.49371)
+[END]
+
+[POLYGON]
+Type=0xe
+Label=Another Airport Runway
+EndLevel=6
+Data0=(-35.76743,-58.49350),(-35.76776,-58.49378),(-35.76782,-58.49371)
+[END]
+
+"""
+
+mixedPois = """
+[IMG ID]
+[END]
+
+[RGN20]
+Type=0xd
+Label=BIALET MASSE
+City=Y
+CityIdx=17
+Origin0=(-31.315284,-64.461891)
+[END-RGN20]
+
+[RGN20]
+Type=0xc
+Label=VALLE HERMOSO
+City=Y
+CityIdx=184
+Origin0=(-31.117530,-64.482666)
+[END-RGN20]
+
+[RGN10]
+Type=0x3002
+Label=MATERNIDAD
+CityIdx=44
+Origin0=(-31.423515,-64.163887)
+[END-RGN10]
+
+[RGN10]
+Type=0x2b01
+Label=HOTEL
+CityIdx=92
+Origin0=(-31.092639,-64.477066)
+[END-RGN10]
+
+[POI]
+Type=0x2f08
+Label=Est. Salvador Maria
+EndLevel=6
+StreetDesc=F. C. G. R.
+CityIdx=28
+Data0=(-35.30298,-59.16738)
+[END]
+
+[POI]
+Type=0xe00
+Label=Salvador Maria
+EndLevel=6
+City=Y
+CityIdx=28
+Data0=(-35.29979,-59.16765)
+[END]
+
+"""
+
+mixedRGN40sAndPolylines = """
+[IMG ID]
+[END]
+
+[RGN40]
+Type=0x18
+Data0=(-31.172805,-64.999877),(-31.170059,-64.997474)
+[END-RGN40]
+
+[RGN40]
+Type=0x18
+Data0=(-31.124225,-64.999877),(-31.137958,-64.982543)
+[END-RGN40]
+
+[POLYLINE]
+Type=0xa
+EndLevel=6
+RoadID=4532
+RouteParam=3,0,0,0,0,0,0,0,0,0,0,0
+Data0=(-35.39861,-59.34420),(-35.40269,-59.34945)
+Nod1=0,29465,0
+Nod2=1,29456,0
+[END]
+
+[POLYLINE]
+Type=0xa
+EndLevel=6
+RoadID=4433
+RouteParam=3,0,0,0,0,0,0,0,0,0,0,0
+Data0=(-35.38428,-59.32179),(-35.37814,-59.31504)
+Nod1=0,29646,0
+Nod2=1,34580,0
+[END]
+
+"""
+
+mixedRGN80sAndPolygons = """
+[IMG ID]
+[END]
+
+[RGN80]
+Type=0x41
+Label=LA QUINTANA
+Data0=(-31.839323,-64.431465),(-31.843271,-64.430091),(-31.848936,-64.435241)
+[END-RGN80]
+
+[RGN80]
+Type=0x3c
+Label=EMBALSE LOS MOLINOS
+Data0=(-31.826664,-64.571586),(-31.826664,-64.572616),(-31.826320,-64.572273)
+[END-RGN80]
+
+[POLYGON]
+Type=0x19
+EndLevel=6
+Data0=(-35.40248,-59.32782),(-35.40348,-59.32778),(-35.40357,-59.32937)
+[END]
+
+[POLYGON]
+Type=0xb
+EndLevel=6
+Data0=(-35.40273,-59.32503),(-35.40338,-59.32611),(-35.40402,-59.32553)
+[END]
+
+"""
+
+nonsenseBounder = """
+[img id]
+[yonk]
+"""
+
+nothingness = ""
+
+polyTypes = """
+[IMG ID]
+[END]
+
+[POLYLINE]
+Type=0x1
+Data0=(-35.38428,-59.32179),(-35.37814,-59.31504)
+[END]
+
+[POLYGON]
+Type=0x1
+Data0=(-35.40273,-59.32503),(-35.40338,-59.32611)
+[END]
+
+"""
+
+RGN10s = """
+[IMG ID]
+[END]
+
+[RGN10]
+Type=0x2f04
+Label=FALDA DEL CARMEN
+CityIdx=6
+Origin0=(-31.583763,-64.456230)
+[END-RGN10]
+
+[RGN10]
+Type=0x2f03
+Label=BERTA MOTORSPORT
+CityIdx=6
+Origin0=(-31.647449,-64.408508)
+[END-RGN10]
+
+[RGN10]
+Type=0x2f01
+Label=ESSO
+CityIdx=6
+Origin0=(-31.658950,-64.409706)
+[END-RGN10]
+
+[RGN10]
+Type=0x2f01
+Label=YPF
+CityIdx=6
+Origin0=(-31.658950,-64.409019)
+[END-RGN10]
+"""
+
+RGN20s = """
+[IMG ID]
+[END]
+
+[RGN20]
+Type=0xc
+Label=MINA CLAVERO
+City=Y
+CityIdx=122
+Origin0=(-31.724071,-65.003494)
+[END-RGN20]
+
+[RGN20]
+Type=0x6
+Label=VILLA GENERAL BELGRANO
+City=Y
+CityIdx=200
+Origin0=(-31.976524,-64.558883)
+[END-RGN20]
+
+[RGN20]
+Type=0xb
+Label=LA FALDA
+City=Y
+CityIdx=92
+Origin0=(-31.099506,-64.477340)
+[END-RGN20]
+
+[RGN20]
+Type=0xd
+Label=VILLA CAEIRO
+City=Y
+CityIdx=190
+Origin0=(-31.291595,-64.462577)
+[END-RGN20]
+"""
+
+RGN40s = """
+[IMG ID]
+[END]
+
+[RGN40]
+Type=0x1f
+Label=RIO LOS CONDORITOS
+Data0=(-31.688133,-64.676124),(-31.686073,-64.674064),(-31.685730,-64.673210)
+[END-RGN40]
+
+[RGN40]
+Type=0x18
+Data0=(-31.463600,-64.859291),(-31.451927,-64.880577),(-31.446777,-64.897911)
+[END-RGN40]
+
+[RGN40]
+Type=0x18
+Data0=(-31.529861,-64.898086),(-31.530376,-64.900314),(-31.526428,-64.909240)
+[END-RGN40]
+
+[RGN40]
+Type=0x14
+Data0=(-30.821243,-64.993354),(-30.830513,-64.999877)
+[END-RGN40]
+"""
+
+RGN80s = """
+[IMG ID]
+[END]
+
+[RGN80]
+Type=0x41
+Data0=(-30.129791,-64.816200),(-30.133224,-64.814140),(-30.137859,-64.818092)
+[END-RGN80]
+
+[RGN80]
+Type=0x3
+Data0=(-30.712581,-64.813629),(-30.713096,-64.808303),(-30.720478,-64.803672)
+[END-RGN80]
+
+[RGN80]
+Type=0x41
+Label=LA QUINTANA
+Data0=(-31.839323,-64.431465),(-31.843271,-64.430091),(-31.848936,-64.435241)
+[END-RGN80]
+
+[RGN80]
+Type=0x3c
+Label=EMBALSE LOS MOLINOS
+Data0=(-31.826664,-64.571586),(-31.826664,-64.572616),(-31.826320,-64.572273)
+[END-RGN80]
+
+"""
+
+
+twoHeaderSections = """
+[img id]
+[end]
+; And now, for something completely different:
+[img id]
+[end]
+"""
+
+weirdTypes = """
+[IMG ID]
+[END]
+
+[POI]
+Type=0x999999
+Data0=(-35.51966,-59.67464)
+[END]
+
+[POI]
+Type=-3.14e27
+Data0=(-35.60043,-59.81360)
+[END]
+
+[POI]
+Type=Sarasa
+Data0=(-35.70035,-58.88981)
+[END]
+
+[POLYLINE]
+Type=0x123456789
+Data0=(-35.07797,-59.09923),(-35.08840,-59.11088)
+[END]
+
+[POLYLINE]
+Type=1919191919191919191919191919
+Data0=(-35.24004,-59.48067),(-35.24277,-59.49114),(-35.24497,-59.49020)
+[END]
+
+[POLYGON]
+Type=NobodyExpectsTheSpanishInquisition
+Data0=(-35.76743,-58.49350),(-35.76776,-58.49378),(-35.76782,-58.49371)
+[END]
+
+"""
+

Added: packages/thuban/branches/upstream/current/Extensions/importMP/test/test_pfm.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/importMP/test/test_pfm.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/importMP/test/test_pfm.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,138 @@
+# Copyright (c) 2008 by Intevation GmbH
+# Authors:
+# Anthony Lenton <anthony at except.com.ar>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+"""
+Tests for the PFM importer.
+"""
+import unittest
+from StringIO import StringIO
+from Extensions.importMP.pfm import MPParser, MPParseError
+import snippets
+
+class TestPFM (unittest.TestCase):
+    def testInitialValue(self):
+        """ Check that the parser has good initial values """
+        parser = MPParser()
+        self.assertEquals (parser.mapName, "")
+        self.assertEquals (parser.parsedLines, 0)
+        self.assertEquals (parser.parsedSections, 0)
+        self.assertEquals (parser.pois, [])
+        self.assertEquals (parser.polygons, [])
+        self.assertEquals (parser.polylines, [])
+
+    def testParsedLines(self):
+        """ Check that comments and blank lines are skipped correctly """
+        parser = MPParser()
+        parser.parse (StringIO(snippets.justHeader))
+        self.assertEquals (parser.parsedLines, 4)
+        parser = MPParser()
+        parser.parse (StringIO(snippets.headerWithComments))
+        self.assertEquals (parser.parsedLines, 12)
+
+    def testSections (self):
+        """ Check that sections are matched up properly """
+        parser = MPParser()
+        parser.parse (StringIO(snippets.justHeader))
+        self.assertEquals (parser.parsedSections, 1)
+        parser = MPParser()
+        mp = StringIO (snippets.nonsenseBounder)        
+        self.assertRaises (MPParseError, parser.parse, mp)
+        parser = MPParser()
+        mp = StringIO (snippets.bounderMismatch)
+        self.assertRaises (MPParseError, parser.parse, mp)
+        parser = MPParser()
+        mp = StringIO (snippets.doubleSectionClose)
+        self.assertRaises (MPParseError, parser.parse, mp)
+
+    def testCaseInsensitive (self):
+        """ Check that no exception is raised if capitals are used"""
+        parser = MPParser()
+        parser.parse (StringIO (snippets.caseSensitivity1))
+        parser = MPParser()
+        parser.parse (StringIO (snippets.caseSensitivity2))
+        parser = MPParser()
+        parser.parse (StringIO (snippets.caseSensitivity3))
+
+    def testIncompleteSection (self):
+        """ Check that an exception is raised if the last section is
+            left open """
+        parser = MPParser()
+        mp = StringIO(snippets.incompleteSection)
+        self.assertRaises (MPParseError, parser.parse, mp)
+
+    def testHeaderSection (self):
+        """ Check that the header section is parsed """
+        parser = MPParser ()
+        mp = StringIO(snippets.nothingness)
+        self.assertRaises (MPParseError, parser.parse, mp)
+        parser = MPParser()
+        mp = StringIO(snippets.twoHeaderSections)
+        self.assertRaises (MPParseError, parser.parse, mp)
+        parser = MPParser()
+        parser.parse(StringIO(snippets.mapWithName))
+        self.assertEquals (parser.mapName, "My Test Map")
+
+    def testSample (self):
+        parser = MPParser()
+        parser.parse (StringIO(snippets.miniLobos))
+        self.assertEquals(len(parser.pois), 4)
+        self.assertEquals(len(parser.polylines), 2)
+        self.assertEquals(len(parser.polygons), 1)
+
+    def testPolylines (self):
+        parser = MPParser()
+        parser.parse (StringIO(snippets.RGN40s))
+        self.assertEquals(len(parser.polylines), 4)
+        parser = MPParser()
+        parser.parse (StringIO(snippets.mixedRGN40sAndPolylines))
+        self.assertEquals(len(parser.polylines), 4)
+       
+    def testPolygons (self):
+        parser = MPParser()
+        parser.parse (StringIO(snippets.RGN80s))
+        self.assertEquals(len(parser.polygons), 4)
+        parser = MPParser()
+        parser.parse (StringIO(snippets.mixedRGN80sAndPolygons))
+        self.assertEquals(len(parser.polygons), 4)
+       
+    def testPois (self):
+        parser = MPParser()
+        parser.parse (StringIO(snippets.RGN10s))
+        self.assertEquals(len(parser.pois), 4)
+        parser = MPParser()
+        parser.parse (StringIO(snippets.RGN20s))
+        self.assertEquals(len(parser.pois), 4)
+        parser = MPParser()
+        parser.parse (StringIO(snippets.mixedPois))
+        self.assertEquals(len(parser.pois), 6)
+
+    def testDontCrashWithWeirdTypes (self):
+        parser = MPParser()
+        parser.parse (StringIO(snippets.weirdTypes))
+        self.assertEquals(len(parser.pois), 3)
+        self.assertEquals(len(parser.polylines), 2)
+        self.assertEquals(len(parser.polygons), 1)
+
+    def testMissingTwoCharFormatWorks (self):
+        """ Test that if the type 0xe works as well as 0x0e, for example"""
+        parser = MPParser()
+        parser.parse (StringIO(snippets.missingZeroType))
+        self.assertEquals(len(parser.polygons), 2)
+        self.assertEquals(parser.polygons[0]['parsedType'], "Airport Runway")
+        self.assertEquals(parser.polygons[1]['parsedType'], "Airport Runway")
+
+    def testTypesAreTheRightKind (self):
+        """ Test that types from polylines and polygons come from the
+            right list of types """
+        p = MPParser()
+        p.parse (StringIO(snippets.polyTypes))
+        self.assertEquals(p.polygons[0]['parsedType'], "City")
+        self.assertEquals(p.polylines[0]['parsedType'], "Major Highway-thick")
+
+if __name__ == "__main__":
+    unittest.main()
+

Added: packages/thuban/branches/upstream/current/Extensions/svgexport/TODO
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/svgexport/TODO	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/svgexport/TODO	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,65 @@
+TODO file for Thuban svgexport Extension
+
+For 1.0.2:
+
+* Add raster file export.
+
+  Spec REC-SVG11-20030114 includes no indication about embedding raster images.
+  Thus we probably have to write extra files.
+	
+	Substeps:
+		a) write shown raster file as .png, no matter which
+		   filename.
+		b) add filename construction based on used svg file.
+		   Difficulty: There can be several raster layers.
+		c) add <image> tag to .svg file
+
+	Considerations:
+		q1) What resolution to use for the PNG file? 
+
+		    As high as possible to avoid losing information.
+		    Will probably not be easy to decide if there are 
+		    complicated projections.
+
+		q2) Should be there one PNG file or is tiling better?
+
+		    One PNG per tile that Thuban is using seems to be
+		    a good approach.
+
+		q3) Image processing is happening in UI/renderer.py with
+		    the help of gdalwarp and and wx image function. 
+		    Shall we use wx as well? This would make this extension
+		    depend on wx and a GUI, but if we use something else like
+		    PIL (python-imaging) the results might be significantly
+		    different to what the user sees on screen. On the other 
+		    hand, this will already depend on the screen resolution.
+		    Or refactor renderer.py to use PIL as well? Probably not
+		    because of speed reasons.
+
+For 1.0.x, x>2:
+
+* find out why the memory shapes in class Testobjectexport
+  return points with negative values with projected_points
+
+Better support for variable Point sizes:
+* a real test for variable point sizes
+* save point size in an svg attribute value
+* Create a better legend for variable point symbols
+
+* add a progress bar or something so that the user is informed 
+  during exports of huge files. A simple interator return of 
+  draw_shape_layer_incrementally() might not be enough, because the user
+  might stop this operation when doing something.
+
+For later:
+
+* use styles for the geographic objects in one class in each layer
+  after making sure that Skencil can do this, too.
+
+* add a method to trigger the application down the pipe that new
+  files have just been written. First idea: Add a "save as" variant
+  which also asks for a command line to run after each "save".
+  The command line can be used to run something like 
+  "skencil-remote --updated-thubanmapsvgfile %s"
+
+* Think about adding preferences or options , e.g.: ignore the line Width.

Modified: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mapfile.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mapfile.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mapfile.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -24,9 +24,9 @@
  lineObj, pointObj
 """
 
-__version__ = "$Revision: 2340 $"
+__version__ = "$Revision: 2864 $"
 # $Source$
-# $Id: mapfile.py 2340 2004-09-03 17:00:10Z jschuengel $
+# $Id: mapfile.py 2864 2008-08-08 23:39:11Z elachuni $
 
 
 # ##################################################
@@ -42,6 +42,7 @@
 from Thuban.Model.classification import ClassGroupDefault, \
                                         ClassGroupSingleton, ClassGroupRange
 
+import mapscript
 from mapscript import layerObj, classObj, colorObj, styleObj, rectObj, symbolObj, \
                       pointObj, lineObj
                       
@@ -84,17 +85,30 @@
 scalebar_style_type = { 0:"0",
                         1:"1" }
 
-scalebar_position_type = { 0:"ul",
-                           1:"lr",
-                           2:"ur",
-                           3:"ll",
-                           6:"uc",
-                           7:"lc"}
+scalebar_position_type = { mapscript.MS_UL:"ul",
+                           mapscript.MS_LR:"lr",
+                           mapscript.MS_UR:"ur",
+                           mapscript.MS_LL:"ll",
+                           mapscript.MS_UC:"uc",
+                           mapscript.MS_LC:"lc"}
 
 layer_status_type = { 0:"OFF",
                       1:"ON",
                       2:"default"}
 
+layer_connection_type = { mapscript.MS_INLINE:"inline",
+                          mapscript.MS_SHAPEFILE:"shapefile",
+                          mapscript.MS_TILED_SHAPEFILE:"tiled shapefile",
+                          mapscript.MS_SDE:"sde",
+                          mapscript.MS_OGR:"ogr",
+                          mapscript.MS_POSTGIS:"postgis",
+                          mapscript.MS_WMS:"wms",
+                          mapscript.MS_ORACLESPATIAL:"oracle spatial",
+                          mapscript.MS_WFS:"wfs",
+                          mapscript.MS_GRATICULE:"graticule",
+                          mapscript.MS_MYGIS:"mygis",
+                          mapscript.MS_RASTER:"raster"}
+
 legend_position_type = { 0:"ul",
                          1:"lr",
                          2:"ur",
@@ -306,14 +320,14 @@
     defines a single symbol which is used in the Symbolset
     
     the following settings are used:
-    name, type,
+    name, type, filled,
     
     the following settings are not used:
-    sizex, sizey, points, numpoints, filled, stylelength,
+    sizex, sizey, points, numpoints, stylelength,
     style, imagepath, transparent, transparentcolor, character, antialias,
     font, gap, position, linecap, linejoin, linejoinmaxsize, setPoints(),
     getPoints(), setStyle()
-    """    
+    """
     def __init__(self, mf_symbol = "newone"):
         # create a circle Object like shown in Thuban
         # because Thuban don't support other symbols
@@ -321,13 +335,14 @@
 	# TODO: include the options to create a symbol, but
 	#      first implement a methode to edit Symbols in Thuban
         if mf_symbol == "newone":
-            mf_symbol = symbolObj("")            
+            mf_symbol = symbolObj("")
             newpoint = pointObj()
             newpoint.x = 1
             newpoint.y = 1
             newline = lineObj()
             newline.add(newpoint)
             mf_symbol.setPoints(newline)
+            mf_symbol.type = mapscript.MS_SYMBOL_ELLIPSE
         
         self._symbol = mf_symbol
     
@@ -409,7 +424,7 @@
     createLegendIcon(), insertStyle(), removeStyle(), moveStyleUp(),
     moveStyleDown()
     """
-    def __init__(self, mf_class):
+    def __init__(self, mf_class, map):
         """
         Initialized a class from them given mapscript Class Object
 	with a list of the included styles.
@@ -417,10 +432,11 @@
 	wich are holt as a List i think.
         """
         self._clazz = mf_class
+        self.map = map
         self._styles = []
         self._numstyles = mf_class.numstyles
         for i in range(0,self._numstyles,1):
-            self._styles.append(MF_Style(mf_class.getStyle(i)))
+            self._styles.append(MF_Style(mf_class.getStyle(i)), self.map)
         
         if self._clazz.getExpressionString() == '"(null)"':
             self._expression = None
@@ -464,24 +480,39 @@
         """
         added a thuban style object to the mapobject
         """
-        new_styleobj = MF_Style(styleObj(self._clazz))
         if type == "line":
+            new_styleobj = MF_Style(styleObj(self._clazz), self.map)
             new_styleobj.set_color(tb_style.GetLineColor())
+            new_styleobj.set_width(tb_style.GetLineWidth())
         elif type == "point":
             # set a default symbol to show circles not only a small dot
             # symbol "circle" must create before
             # TODO: create a Symbol (more see MF_SymbolSet)
             # first the default symbol circle will be created and the size 8
-            new_styleobj.set_symbolname('circle')
-            new_styleobj.set_size(8)
-            if tb_style.GetLineColor() != Transparent:
-                new_styleobj.set_linecolor(tb_style.GetLineColor())
-            new_styleobj.set_color(tb_style.GetFill())
+            new_styleobj = MF_Style(styleObj(self._clazz), self.map)
+            if tb_style.GetFill() == Transparent:
+                new_styleobj.set_symbolname('circle')
+                if tb_style.GetLineColor() != Transparent:
+                    new_styleobj.set_color(tb_style.GetLineColor())
+            else:
+                new_styleobj.set_symbolname('circle_filled')
+                new_styleobj.set_color(tb_style.GetFill())
+                if tb_style.GetLineColor() != Transparent:
+                    new_styleobj.set_linecolor(tb_style.GetLineColor())
+            new_styleobj.set_size(9)
         else:
-            new_styleobj.set_size(tb_style.GetLineWidth())
+    # Suppose this is a polygon.  We'll need two styles for applying
+    # the background color and outline width, as explained in
+    # http://mapserver.gis.umn.edu/docs/faq/faqsection_view?section=Map%20Output
+            if tb_style.GetFill() != Transparent:
+                new_styleobj = MF_Style(styleObj(self._clazz), self.map)
+                new_styleobj.set_color(tb_style.GetFill())
+    # And a second style.
+    # The order here matters (first the background, then the
             if tb_style.GetLineColor() != Transparent:
+                new_styleobj = MF_Style(styleObj(self._clazz), self.map)
                 new_styleobj.set_linecolor(tb_style.GetLineColor())
-            new_styleobj.set_color(tb_style.GetFill())
+                new_styleobj.set_width(tb_style.GetLineWidth())
 
 
 
@@ -501,7 +532,7 @@
     labelmaxscale, sizeunits, maxfeatures, offsite, transform, labelcache
     postlabelcache, labelitem, labelsizeitem, labelangleitem, labelitemindex
     labelsizeitemindex, labelangleitemindex, tileitem, tileindex, units
-    connection, connectiontype, numitems, filteritem, styleitem, requires
+    numitems, filteritem, styleitem, requires
     labelrequires, transparency, dump, debug, numprocessing, numjoins,
     removeClass(), open(), close(), getShape(), getNumResults(), getResult()
     getItem(), promote(), demote(), draw(), drawQuery(), queryByAttributes()
@@ -513,21 +544,19 @@
     getProcessing(), clearProcessing()   
     """
 
-    def __init__(self, mf_layer):
+    def __init__(self, mf_layer, map):
         """
 	Creates the Layer Object from the mapscript Layer Object.
 	the class objects in the layer object will be stored in
 	an array. The metadata are created as a new object.
         """
         self._mf_layer = mf_layer
-
+        self.map = map
         # Create Classes 
         # there could be more then 1 
-        i = -1
         self._classes = []
-        while i < self._mf_layer.numclasses-1:
-            i += 1
-            self._classes.append(MF_Class(self._mf_layer.getClass(i)))
+        for i in range (self._mf_layer.numclasses):
+            self._classes.append(MF_Class(self._mf_layer.getClass(i), self.map))
             
         self._projection = MF_Projection(self._mf_layer.getProjection())
         
@@ -543,6 +572,12 @@
     def get_data(self):
         return self._mf_layer.data
 
+    def get_connection(self):
+        return self._mf_layer.connnection
+
+    def get_connectiontype(self):
+        return self._mf_layer.connectiontype
+
     def get_classes(self):
         return self._classes
     
@@ -582,11 +617,17 @@
         self._mf_layer.name = newname 
     
     def set_data(self, newdata, type="shape"):
-        if type == "raster":
+        if type == "shape":
+            self._mf_layer.data = newdata[:-4]
+        else:
             self._mf_layer.data = newdata
-        else:
-            self._mf_layer.data = newdata[:-4]
-    
+
+    def set_connection (self, newconnection):
+        self._mf_layer.connection = newconnection
+
+    def set_connectiontype (self, newtype):
+        self._mf_layer.connectiontype = newtype
+
     def set_status(self, newstatus):
         # status can set to true or false from thuban.
         # but mapserver supports the default value
@@ -622,7 +663,7 @@
         """
         Add a thuban class object
         """ 
-        new_class = MF_Class(classObj(self._mf_layer))
+        new_class = MF_Class(classObj(self._mf_layer), self.map)
         self._classes.append(new_class)
         # set the class name to the Label form thuban if given,
         # else set it to the value
@@ -705,7 +746,7 @@
         new_class.set_status(tb_class.IsVisible())
 
     def remove_allclasses(self):
-        for i in range(0,len(self.get_classes()), 1):
+        for i in range(len(self.get_classes())):
             self._mf_layer.removeClass(i)
         self.set_classes([])
 
@@ -869,7 +910,7 @@
         self._layers = []
         self._i = 0
         while self._i < self._mf_map.numlayers:
-            self._layers.append(MF_Layer(self._mf_map.getLayer(self._i)))
+            self._layers.append(MF_Layer(self._mf_map.getLayer(self._i)), self)
             self._i += 1
 
         # Shapepath if not set, shapepath will be empty
@@ -886,7 +927,7 @@
         the new layer must create inside the mapobj, because mapscript
         need the mapscript object as parameter for layerObj
         """
-        new_layer = MF_Layer(layerObj(self._mf_map))
+        new_layer = MF_Layer(layerObj(self._mf_map), self)
         self._layers.append(new_layer)
         # the new created layer must remove from the mapobject
         # because all layer will create new in export.
@@ -988,18 +1029,17 @@
         self._mf_map.name = newname
     
     def set_extent(self, newextent):
-        # TODO: add the shown extend here instead of the total
-        # if no size is set or if it is zero, the size will set to 1.
-        if self.get_size()[0] == - 1:
-            print "define the size first to set extent"
-            print "size is now set to (1,1)"
-            self.set_size(1,1)
-        # if an empty map is export newextent will be none
+        """ Set the map's extent.  The map's size should already have been
+            set when you call this function, so this function will fail
+            if not.  Setting the size after the extent produces undesired
+            results anyway. """
+        width, height = self.get_size()
+        if width <= 0 or height <= 0:
+            raise mapscript.MapServerError, \
+                  "No size set before calling set_extent"
         if newextent:
-            self._newrect = MF_Rectangle(rectObj(newextent[0],newextent[1], \
-                                    newextent[2],newextent[3]))
-            self._mf_map.setExtent(newextent[0],newextent[1], \
-                                    newextent[2],newextent[3])    
+            self._newrect = MF_Rectangle(rectObj(*newextent))
+            self._mf_map.setExtent(*newextent)
     
     def set_size(self, newwidth, newheight):
         self._mf_map.width = newwidth
@@ -1034,12 +1074,13 @@
         # don't know why this error is produced and why it works
         # if it is placed here instead of the beginning.
         from Extensions.umn_mapserver.mf_import import AnnotationLayer
+        from Thuban.Model.postgisdb import PostGISShapeStore
         if hasattr(tb_layer,"extension_umn_layerobj"):
             #print tb_layer.extension_umn_layerobj
-            #new_layer = MF_Layer(layerObj(self._mf_map))
+            #new_layer = MF_Layer(layerObj(self._mf_map), self)
             new_layer = tb_layer.extension_umn_layerobj
         else:
-            new_layer = MF_Layer(layerObj(self._mf_map))
+            new_layer = MF_Layer(layerObj(self._mf_map), self)
             self._layers.append(new_layer)
             tb_layer.extension_umn_layerobj = new_layer
         new_layer.remove_allclasses()
@@ -1057,7 +1098,19 @@
             new_layer.set_status(tb_layer.Visible())
             new_layer.set_data(tb_layer.ShapeStore().FileName())
         else:
-            new_layer.set_data(tb_layer.ShapeStore().FileName())
+            if isinstance (tb_layer.ShapeStore(), PostGISShapeStore):
+                data = "%s from %s" % (tb_layer.ShapeStore().geometry_column,
+                                       tb_layer.ShapeStore().tablename)
+                new_layer.set_data (data, type="postgis")
+                params = []
+                for name in ("host", "port", "dbname", "user", "password"):
+                    val = getattr(tb_layer.ShapeStore().db, name)
+                    if val:
+                        params.append("%s=%s" % (name, val))
+                new_layer.set_connection (" ".join(params))
+                new_layer.set_connectiontype (mapscript.MS_POSTGIS)
+            else:
+                new_layer.set_data(tb_layer.ShapeStore().FileName())
             new_layer.set_status(tb_layer.Visible())
             new_layer.set_type(tb_layer.ShapeType())
             if tb_layer.GetClassificationColumn():
@@ -1347,7 +1400,7 @@
                 self._initcode, self._epsgcode = self._mfprojstring.split(':')
             else:  
                 self._params = []  
-                self._params = self._mfprojstring.split("+")
+                self._params = [p.strip() for p in self._mfprojstring.split("+")]
                 if self._params[0] == "":
                     self._params.remove("")
 
@@ -1403,14 +1456,14 @@
     """
     The following parameters, which the mapscript style obj
     contains, are used:
-    color, backgroundcolor, outlinecolor, size, symbolname
+    color, backgroundcolor, outlinecolor, size, symbolname, width
 
     The following are not used:
     symbol, sizescaled, minsize, maxsize, offsetx, offsety,
     antialias
     """
  
-    def __init__(self, mf_style):
+    def __init__(self, mf_style, map):
         """
 	Create a style object from the given mapscript style object.
 	The color Object from the color and the outlinecolor parameter
@@ -1419,6 +1472,7 @@
 	it will set to 'None'.
         """
         self._style = mf_style
+        self.map = map
         if self._style.color.red == -1:
             self._color = None
         else:
@@ -1431,6 +1485,9 @@
     def get_color(self):
         return self._color
     
+    def get_width(self):
+        return self._style.width
+    
     def get_outlinecolor(self):
         return self._outlinecolor
    
@@ -1450,11 +1507,14 @@
         new_color.set_thubancolor(tb_color)
         self._color = new_color
         self._style.color = new_color.get_mfcolor()
-    
+
     def set_size(self, newsize):
         self._style.size = newsize
+
+    def set_width(self, newwidth):
+        self._style.width = newwidth
     
     def set_symbolname(self, newsymbol):
         # its possible to use stringnames instead of numbers
-        self._style.symbolname = newsymbol
+        self._style.setSymbolByName (self.map._mf_map, newsymbol)
 

Modified: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_export.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_export.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_export.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -11,9 +11,9 @@
 UMN MapServer mapfiles.
 """
 
-__version__ = "$Revision: 2814 $"
+__version__ = "$Revision: 2864 $"
 # $Source$
-# $Id: mf_export.py 2814 2008-01-19 01:23:31Z bernhard $
+# $Id: mf_export.py 2864 2008-08-08 23:39:11Z elachuni $
 
 
 # ###################################
@@ -25,11 +25,11 @@
 import os
 
 # mapscript
+import mapscript
 from mapscript import mapObj
 
 # wxPython support
-from wx import FileDialog, \
-                        ID_OK, SAVE, OVERWRITE_PROMPT
+from wx import FileDialog, MessageDialog, OK, ID_OK, SAVE, OVERWRITE_PROMPT
 
 # Thuban
 # use _() already now for all strings that may later be translated
@@ -109,12 +109,17 @@
     """
     Added a circle object like the one shown in thuban
     """
-    if map.get_symbolset().get_symbol(1):
+    if map.get_symbolset().get_symbol(2):
         return
     else:
         new_symbol = MF_Symbol()
         new_symbol.set_name("circle")
-        new_symbol.set_type(2)
+        new_symbol.set_type(mapscript.MS_SYMBOL_ELLIPSE)
+        new_symbol.set_filled(False)
+        map.get_symbolset().add_symbol(new_symbol)
+        new_symbol = MF_Symbol()
+        new_symbol.set_name("circle_filled")
+        new_symbol.set_type(mapscript.MS_SYMBOL_ELLIPSE)
         new_symbol.set_filled(True)
         map.get_symbolset().add_symbol(new_symbol)
 
@@ -124,8 +129,8 @@
     that the file is generated automatic
     """
     thuban_umn_comment = "# \n" + \
-                                "# Map file generated by Thuban (umn_mapserver Extension) \n" + \
-                                "# \n \n"
+             "# Map file generated by Thuban (umn_mapserver Extension) \n" + \
+             "# \n \n"
     datafile = os.path.join(path,file)
     
     in_file = open(datafile,"r")
@@ -143,7 +148,12 @@
     the mapobj
     """
     theMap = context.mainwindow.canvas.Map().extension_umn_mapobj
-    
+    width, height = theMap.get_size() 
+    if width <= 0 or height <= 0:
+        dlg = MessageDialog (context.mainwindow,
+                 "You must set the map size before exporting", "Warning", OK)
+        dlg.ShowModal()
+        return
     dlg = FileDialog(context.mainwindow, "Save file as...", ".", "", 
                        "UMN MapServer Mapfiles (*.map)|*.map|"     \
                        "All files (*.*)|*.*",
@@ -155,12 +165,12 @@
     else:
         return
 
+    #add symbol
+    add_circle_symbol(theMap)
+    
     # set all thuban context to the mapobj
     thuban_to_map(context, theMap)
 
-    #add symbol
-    add_circle_symbol(theMap)
-    
     # shapepath vom mapfile
     theMap.set_shapepath("")
 

Modified: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_handle.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_handle.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_handle.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -11,9 +11,9 @@
 UMN MapServer mapfiles.
 """
 
-__version__ = "$Revision: 2827 $"
+__version__ = "$Revision: 2858 $"
 # $Source$
-# $Id: mf_handle.py 2827 2008-02-01 10:00:32Z dpinte $
+# $Id: mf_handle.py 2858 2008-07-29 06:17:34Z elachuni $
 
 
 # ###################################
@@ -214,8 +214,15 @@
         self.Show(False)
 
     def OnOK(self, event):
-        self.tb_map_umn.set_size(int(self.text_width.GetValue()), 
-                                 int(self.text_height.GetValue()))
+        try:
+            width = int(self.text_width.GetValue())
+            height = int(self.text_height.GetValue())
+        except ValueError, e:
+            dlg = wx.MessageDialog (self, "Width / Height: " + str(e),
+                                    "Warning", wx.OK)
+            dlg.ShowModal()
+            return
+        self.tb_map_umn.set_size(width, height)
         self.tb_map_umn.set_units(self.choice_units.GetStringSelection())
         if self.choice_status.GetStringSelection() == "True":
             self.tb_map_umn.set_status(True)

Modified: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_import.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_import.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/mf_import.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -11,9 +11,9 @@
 UMN MapServer mapfiles.
 """
 
-__version__ = "$Revision: 2817 $"
+__version__ = "$Revision: 2857 $"
 # $Source$
-# $Id: mf_import.py 2817 2008-01-27 00:01:32Z bernhard $
+# $Id: mf_import.py 2857 2008-07-27 05:30:28Z elachuni $
 
 
 
@@ -652,7 +652,7 @@
         if len(selectedlayer) != 0:
             # thuban map context
             tb_map = context.mainwindow.canvas.Map()
-            # set the titel and projection
+            # set the title and projection
             tb_map.SetTitle(mapobj.get_name())
             set_projection_to_tb(tb_map,mapobj)
 

Added: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.html
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.html	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.html	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,78 @@
+<!--
+Copyright (c) 2004 by Intevation GmbH
+Authors:
+Jan Schüngel <jschuengel at intevation.de>
+
+This program is free software under the GPL (>=v2)
+Read the file COPYING coming with Thuban for details.
+
+This is the templatefile to test the sample .map-file of 
+the umn_mapserver extension of Thuban as an UMN MapServer Application.
+
+$Revision: 2321 $
+$Source$
+$Id: iceland.html 2321 2004-08-03 11:59:30Z jschuengel $
+-->
+
+<html>
+<head>
+  <title>MapServer Iceland Sample Application</title>
+</head>
+
+<body bgcolor="#ffffff">
+
+<center><h1>MapServer Iceland Sample Application</h1></center>
+
+<hr><br>
+
+<form name="mapserv" method="GET" action="[program]">
+
+  <table border="0" align="center" cellpadding="10">
+    <tr>
+      <td> 
+        <input type="image" name="img" src="[img]" width="[mapwidth]" height="[mapheight]" border="1">
+      </td>
+      <td valign="top">
+        <b>Select Layers:</b><br>
+        <select multiple name="layer" size=5>
+          
+          <option value="cultural" [cultural_select]> Cultural (points)
+          <option value="cultural_type" [cultural_type_select]> Cultural Type (annontation)
+          <option value="roads" [roads_select]> Roads (line)
+          <option value="political" [political_select]> Political (polygon)
+          <option value="topographie" [topographie_select]> Topographie (raster)
+          	 
+        </select>
+		
+        <br><br><hr><br>
+        <!-- FORM SUBMIT BUTTON -->
+        <div> 
+          Zoom Size <input type=text name=zoomsize size=4 value=[zoomsize]><br>
+	  <input type=radio name=zoomdir value=1 [zoomdir_1_check]> 
+ 	  Zoom In<br>
+          <input type=radio name=zoomdir value=-1 [zoomdir_-1_check]>
+          Zoom Out<br>          
+          <input type=radio name=zoomdir value=0 [zoomdir_0_check]>
+      	  Pan<br>
+        </div>
+        <div>
+          <input type="submit" name="submit" value="Refresh Map">
+        </div>
+      </td>
+    </tr>
+  </table>
+
+  <input type="hidden" name="zoomsize" value=2>
+  
+  <input type="hidden" name="map" value="[map]">
+  <input type="hidden" name="program" value="[program]">
+  <input type="hidden" name="root" value="[root]">
+
+  <input type="hidden" name="imgext" value="[mapext]">
+
+  <input type="hidden" name="map_web_imagepath" value="[map_web_imagepath]">
+  <input type="hidden" name="map_web_imageurl" value="[map_web_imageurl]">
+
+</form>
+</body>
+</html>

Added: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.map
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.map	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/iceland.map	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,220 @@
+# Copyright (c) 2004 by Intevation GmbH
+# Authors:
+# Jan Schüngel <jschuengel at intevation.de>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+# This is a sample .map-to test the umn_mapserver extension
+# of Thuban.
+
+# $Revision: 2330 $
+# $Source$
+# $Id: iceland.map 2330 2004-08-09 11:42:11Z jschuengel $
+
+MAP
+NAME ISLAND
+STATUS ON 
+SIZE 600 450
+UNITS METERS 
+
+EXTENT 622877.17 7019306.94 1095667.78 7447709.31 
+SHAPEPATH "../../../Data/iceland"
+IMAGECOLOR 82 102 230 
+IMAGETYPE PNG
+
+PROJECTION
+   proj=utm
+   ellps=clrk66
+   zone=26
+   north
+
+   #"init=epsg:26915"
+END
+
+WEB
+   TEMPLATE iceland.html
+   # IMAGEPATH "/tmp/"
+   # IMAGEURL "/tmp/"
+   # LOG "/tmp/iceland.log"
+   MINSCALE 100000
+   MAXSCALE 3000000
+
+   METADATA
+      titel "Iceland Test"
+      author "Jan Schuengel"
+   END
+END
+
+# ##############################
+# Start of symbol definitions (we're only using one for the circle layer)
+# ##############################
+SYMBOL
+   NAME 'circle'
+   TYPE ELLIPSE
+   POINTS 1 1 END
+   FILLED TRUE
+END
+
+
+# ###############################
+# Beginn der Layer Definitionen #
+# ###############################
+LAYER # raster layer
+  NAME topographie
+  DATA "island.tif"
+  STATUS ON
+  TYPE RASTER
+  PROCESSING "BANDS=1" # use it to select which bands in a multispectral image are displayed
+  OFFSITE 82 102 230 # This parameters tells MapServer what pixel values to render as background (or ignore)
+
+   PROJECTION
+      proj=latlong
+      # to_meter=0.017453
+      ellps=clrk66 
+   END
+END
+
+LAYER 
+   NAME "political"
+   DATA political
+   TYPE POLYGON
+   STATUS OFF
+   CLASS
+      NAME "test"
+      STYLE
+        OUTLINECOLOR 0 0 0
+        COLOR 100 200 100
+      END
+      SIZE 2
+   END
+   
+   PROJECTION
+      proj=latlong
+      ellps=clrk66 
+   END
+
+   METADATA
+      "landinfo" "Iceland"
+      "origin"   "Thuban Sample Data"
+   END
+END
+
+LAYER 
+   NAME "roads"
+   DATA roads-line
+   GROUP infrastructure
+   TYPE LINE
+   STATUS ON
+   CLASS
+     NAME "Begin - 418"
+     EXPRESSION ([RDLINE_ID]<=418)
+     STYLE
+       COLOR 255 255 255
+       SIZE 1
+       SYMBOL 0
+      END
+    END
+    CLASS
+      NAME "419 - 836"
+      EXPRESSION ([RDLINE_ID] > 418 AND [RDLINE_ID] <= 836)
+      STYLE
+        COLOR 127 127 127
+        SIZE 1
+        SYMBOL 0
+      END
+    END
+    CLASS
+     NAME "837 - End"
+      EXPRESSION ([RDLINE_ID] > 836)
+      STYLE
+        COLOR 0 0 0
+        SIZE 1
+        SYMBOL 0
+      END
+    END
+    CLASS
+     NAME "Rest"
+      STYLE
+        COLOR 100 100 100
+        SIZE 1
+        Symbol 0
+      END
+    END
+    PROJECTION
+      proj=latlong
+      ellps=clrk66 
+    END
+END
+
+LAYER 
+   NAME "cultural"
+   DATA cultural_landmark-point
+   GROUP infrastructure
+   TYPE POINT
+   STATUS ON
+   CLASSITEM 'CLPOINT_'
+   CLASS
+      NAME "Point 9"
+      EXPRESSION '9'
+      STATUS OFF
+      STYLE
+         COLOR 255 200 0
+         SYMBOL 'circle'
+         SIZE 8
+      END
+   END
+   CLASS
+      NAME "test3"
+      # EXPRESSION /./ 
+      STYLE
+        COLOR 200 0 0
+	SYMBOL 'circle'
+        SIZE 7
+      END
+   END
+   CLASS
+      NAME "Point 11"
+      EXPRESSION "11" 
+      STYLE
+        COLOR 255 150 0
+	SYMBOL 'circle'
+        SIZE 7
+      END
+   END
+
+   PROJECTION
+      proj=latlong
+      ellps=clrk66 
+   END
+END
+
+LAYER
+   NAME "cultural_type"
+   TYPE ANNOTATION
+   DATA cultural_landmark-point
+   STATUS OFF
+   
+   LABELITEM "CLPTLABEL"
+   CLASSITEM "CLPTLABEL"
+   CLASS
+      EXPRESSION /./
+      # COLOR 232 232 232
+      LABEL
+        COLOR 0 0 0
+        # SHADOWCOLOR 218 218 218
+        # SHADOWSIZE 2 2
+        TYPE BITMAP
+        SIZE Small
+        POSITION AUTO
+        BUFFER 0
+      END
+    END
+    
+   PROJECTION
+      proj=latlong
+      ellps=clrk66 
+   END
+END
+
+END

Added: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/index.html
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/index.html	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/sample/index.html	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,60 @@
+<!--
+Copyright (c) 2004 by Intevation GmbH
+Authors:
+Jan Schüngel <jschuengel at intevation.de>
+
+This program is free software under the GPL (>=v2)
+Read the file COPYING coming with Thuban for details.
+
+This is a initialisationfile to test the sample .map-file of 
+the umn_mapserver extension of Thuban as an UMN MapServer Application.
+
+$Revision: 2322 $
+$Source$
+$Id: index.html 2322 2004-08-03 12:00:04Z jschuengel $
+-->
+
+<html>
+
+<head>
+  <title>MapServer Iceland Sample Application</title>
+</head>
+
+<body bgcolor="#FFFFFF">
+  <h2 align="center">
+    <br>
+    MapServer Iceland Sample Application
+  </h2>
+  <hr>
+  <p align="center">
+    This application showes the sample from the thuban &quot;umn mapserver&quot; extension.
+  <p align="center">
+    Click the &quot;Initalize&quot; button to show the map
+  <p>
+  
+  <!-- EDIT THE FORM ACTION -->
+  <form name="demo" method="GET" action="/scripts/mapserv" onSubmit="submit_form()">
+        <div align="center">
+        <input type="hidden" name="layer" value="political">
+        <input type="hidden" name="layer" value="cultural">
+        <input type="hidden" name="layer" value="cultural_type">
+        <input type="hidden" name="layer" value="roads">
+        <input type="hidden" name="layer" value="topographie">
+        
+        <input type="hidden" name="zoomsize" value=2>
+      
+	    <!-- EDIT THESE HIDDEN VARIABLES -->
+        <input type="hidden" name="map" value="/opt/mapserver/sample/iceland.map">
+        <input type="hidden" name="program" value="/scripts/mapserv">
+        <input type="hidden" name="root" value="/iceland_sample/">
+        <input type="hidden" name="map_web_imagepath" value="/tmp/">
+        <input type="hidden" name="map_web_imageurl" value="/tmp/">
+        <input type="submit" value="Initialize"></center>
+      </div>
+    </form>
+
+    <p><hr><p>
+
+</body>
+
+</html>

Added: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test.map
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test.map	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test.map	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,191 @@
+# Copyright (c) 2004 by Intevation GmbH
+# Authors:
+# Jan Schüngel <jschuengel at intevation.de>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with Thuban for details.
+
+# This is a test .map-file for automated tests of the umn_mapserver extension
+# of Thuban.
+
+# $Revision: 2275 $
+# $Source$
+# $Id: test.map 2275 2004-07-08 14:29:06Z jschuengel $
+
+MAP
+NAME ISLAND
+STATUS ON 
+SIZE 600 450
+
+EXTENT 622877.17 7019306.94 1095667.78 7447709.31 
+SHAPEPATH "../../../Data/iceland"
+IMAGECOLOR 255 255 255
+IMAGETYPE PNG
+
+  OUTPUTFORMAT
+    NAME png
+    MIMETYPE image/png
+    DRIVER GD/PNG
+    EXTENSION png
+    IMAGEMODE PC256
+    TRANSPARENT FALSE
+  END
+
+  SYMBOL
+    NAME "circle"
+    TYPE ELLIPSE
+    FILLED TRUE
+    POINTS
+      1 1
+    END
+  END
+
+PROJECTION
+   proj=utm
+   ellps=WGS84
+   zone=26
+   north
+
+   #"init=epsg:26915"
+END
+
+# Scalebarobject
+SCALEBAR
+      COLOR 0 0 0
+    IMAGECOLOR 255 255 255
+    INTERVALS 4
+    LABEL
+      SIZE MEDIUM
+      TYPE BITMAP
+      BUFFER 0
+      COLOR 0 0 0
+      FORCE FALSE
+      MINDISTANCE -1
+      MINFEATURESIZE -1
+      OFFSET 0 0
+      PARTIALS TRUE
+    END
+    POSITION LL
+    SIZE 200 3
+    STATUS OFF
+    STYLE 0
+    UNITS MILES
+  END
+
+# Legend
+LEGEND
+      IMAGECOLOR 255 255 255
+    KEYSIZE 20 10
+    KEYSPACING 5 5
+    LABEL
+      SIZE MEDIUM
+      TYPE BITMAP
+      BUFFER 0
+      COLOR 0 0 0
+      FORCE FALSE
+      MINDISTANCE -1
+      MINFEATURESIZE -1
+      OFFSET 0 0
+      PARTIALS TRUE
+      POSITION CC
+    END
+    POSITION LL
+    STATUS OFF
+  END
+
+
+WEB
+   TEMPLATE iceland.html
+   IMAGEPATH "/tmpimg/"
+   IMAGEURL "/tmpurl/"
+   #LOG "/tmp/iceland.log"
+   MINSCALE 100000
+   MAXSCALE 3000000
+
+   METADATA
+      titel "Iceland Test"
+   END
+END
+
+#
+# Start of symbol definitions (we're only using a few)
+#
+SYMBOL
+   NAME 'circle'
+   TYPE ELLIPSE
+   POINTS 1 1 END
+   FILLED TRUE
+END
+
+
+#################################
+# Beginn der Layer Definitionen #
+#################################
+LAYER 
+   NAME "political"
+   DATA political
+   TYPE POLYGON
+   STATUS ON
+   CLASS
+      NAME "testclass"
+      STYLE
+        OUTLINECOLOR 0 0 0
+        COLOR 100 200 100
+      END
+      SIZE 2
+   END
+   PROJECTION
+      proj=latlong
+      ellps=clrk66 
+   END
+END
+
+LAYER 
+   NAME "roads"
+   DATA roads-line
+   TYPE LINE
+   STATUS ON
+   CLASS
+      NAME "test2"
+      STYLE
+        #OUTLINECOLOR 0 0 0
+        color 0 0 0
+      END
+   END
+   PROJECTION
+      proj=latlong
+      ellps=clrk66 
+   END
+END
+
+LAYER 
+   NAME "cultural"
+   DATA cultural_landmark-point
+   TYPE POINT
+   STATUS default
+   CLASSITEM 'CLPOINT_'
+    CLASS
+      NAME "Punkt 9"
+      EXPRESSION "9"
+      STYLE
+        COLOR 200 200 0
+	   SYMBOL 'circle'
+        SIZE 7
+      END
+   END
+   CLASS
+      NAME "test3"
+      STYLE
+        COLOR 200 0 0
+	   SYMBOL 'circle'
+        SIZE 7
+      END
+   END
+   PROJECTION
+      proj=latlong
+      ellps=clrk66 
+   END
+END
+
+
+END

Modified: packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test_mapserver.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test_mapserver.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/umn_mapserver/test/test_mapserver.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -11,13 +11,14 @@
 Tests for UMN Mapserver extension.
 """
 
-__version__ = "$Revision: 2307 $"
+__version__ = "$Revision: 2858 $"
 # $Source$
-# $Id: test_mapserver.py 2307 2004-07-28 12:46:19Z jschuengel $
+# $Id: test_mapserver.py 2858 2008-07-29 06:17:34Z elachuni $
 
 # Import the testmodul from python
 import unittest
 
+import mapscript
 from mapscript import mapObj
 
 # Import  necessary classes from Thuban
@@ -53,7 +54,7 @@
         Testing Color Objects from MapServer.
         """
         # IMAGECOLOR  255 255 255
-        testcolor = MF_Color(self.testMap.imagecolor)        
+        testcolor = MF_Color(self.testMap.imagecolor)
         self.eq(testcolor.get_red(), 255)
         self.eq(testcolor.get_green(), 255)
         self.eq(testcolor.get_blue(), 255)
@@ -195,7 +196,7 @@
         # or maybe a grafik
         self.eq(testlayer.get_data(), "test")
         # check projection (used the pojection obj a little bit)
-        self.eq(testlayer.get_projection().get_projection(), "+proj=latlong+ellps=clrk66")
+        self.eq(testlayer.get_projection().get_projection(), "+proj=latlong +ellps=clrk66")
         # TYPE POLYGON
         self.eq(testlayer.get_type(), "point")
         testlayer.set_type("circle")
@@ -232,7 +233,7 @@
         """
         testscalebar = MF_Scalebar(self.testMap.scalebar)
         self.eq(testscalebar.get_position(mode="string"),"ll")
-        self.eq(testscalebar.get_position(), 3)
+        self.eq(testscalebar.get_position(), mapscript.MS_LL)
         self.eq(testscalebar.get_intervals(), 4)
         self.eq(testscalebar.get_status(mode="string"), "OFF")
 

Modified: packages/thuban/branches/upstream/current/Extensions/wms/__init__.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/wms/__init__.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/wms/__init__.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,17 +1,17 @@
-# Copyright (c) 2003, 2004 by Intevation GmbH
+# Copyright (c) 2003, 2004, 2008 by Intevation GmbH
 # Authors:
 # Jan-Oliver Wagner <jan at intevation.de> (2003, 2004)
+# Didrik Pinte <dpinte at dipole-consulting.com> (2008)
 #
 # This program is free software under the GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
 
-# first try out whether we can import the required module
-# of the PyOGCLib.
+# first try out whether we can import the required module OWSLib
 ok = True
 try:
-    import ogclib.WMSClient
+    import owslib
 except:
-    print "Problems with PyOGCLib (not installed?)"
+    print "Problems with OWSLib (not installed?)"
     ok = False
 
 if ok:
@@ -22,7 +22,7 @@
 
     ext_registry.add(ExtensionDesc(
         name = 'WMS',
-        version = '0.2.0',
-        authors= [ 'Jan-Oliver Wagner', 'Martin Schulze' ],
-        copyright = '2003, 2004 Intevation GmbH',
+        version = '0.3.0',
+        authors= [ 'Didrik Pinte', 'Jan-Oliver Wagner', 'Martin Schulze' ],
+        copyright = '2003, 2004, 2008 Intevation GmbH',
         desc = _("Provide layers via OGC WMS.")))

Modified: packages/thuban/branches/upstream/current/Extensions/wms/layer.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/wms/layer.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/wms/layer.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,5 +1,6 @@
-# Copyright (c) 2003, 2004, 2007 by Intevation GmbH
+# Copyright (c) 2003, 2004, 2007, 2008 by Intevation GmbH
 # Authors:
+# Didrik Pinte <dpinte at dipole-consulting.com>
 # Jan-Oliver Wagner <jan at intevation.de>
 # Martin Schulze <joey at infodrom.org>
 #
@@ -39,30 +40,27 @@
     GetMapImg(width, height, bbox)
 
 Requirements:
-    - PyOGCLib <http://www.sourceforge.net/projects/pyogclib>
+    - OWSLib <http://trac.gispython.org/projects/PCL/wiki/OwsLib>
 
-Requires the ogclib installed regularily on the system or checked out
-next to the Thuban checkout.  Or set the PYTHONPATH to the PyOGCLib
+Requires the owslib installed regularily on the system or checked out
+next to the Thuban checkout.  Or set the PYTHONPATH to the OWSLib
 directory before starting Thuban.
 
 """
 
-__version__ = "$Revision: 2785 $"
+__version__ = "$Revision: 2868 $"
 # $Source$
-# $Id: layer.py 2785 2007-11-27 23:39:49Z bernhard $
+# $Id: layer.py 2868 2008-12-08 08:50:53Z dpinte $
 
 
-from Thuban import internal_from_unicode
+from Thuban import internal_from_unicode, _
 from Thuban.Model.layer import BaseLayer
 from Thuban.Model.resource import get_system_proj_file, EPSG_PROJ_FILE, \
      EPSG_DEPRECATED_PROJ_FILE
 from Thuban.UI.common import ThubanBeginBusyCursor, ThubanEndBusyCursor
 
-from capabilities import WMSCapabilities
+from owslib.wms import WebMapService
 
-from ogclib.WMSClient import WMSClient
-
-
 def epsg_code_to_projection(epsg):
     """Find the projection for the given epsg code.
 
@@ -104,14 +102,16 @@
         self.error_msg = None
         self.wms_layers = []
         self.capabilities = None
+        self.cached_bbox = None
 
         # Change the cursor to demonstrate that we're busy but working
         ThubanBeginBusyCursor()
-        self.capabilities = WMSCapabilities(url)
+        self.wmsserver = WebMapService(url, version="1.1.1")
+        self.capabilities = [op.name for op in self.wmsserver.operations]
         ThubanEndBusyCursor()
 
         # name of the top layer of the remote map
-        foo = self.capabilities.getLayers()
+        foo = list(self.wmsserver.contents)                   
         if len(foo) == 0:
             self.error_msg = _('No layers found in remote resource:\n'\
                                '%s') % url
@@ -120,31 +120,37 @@
         self.wms_layers = [top_layer]
 
         # first projection of the top layer
-        foo = self.capabilities.getLayerSRS(top_layer)
+        foo = self.wmsserver[top_layer].crsOptions
         if len(foo) == 0:
             self.error_msg = _('No LatLonBoundingBox found for top layer %s')\
                              % top_layer
             return
-        top_srs = foo[0]
+        # extract only the EPSG code from the EPSG string 
+        # received 'EPSG:4326' but keep only '4326'
+        top_srs = foo[0].split(':')[1]
 
+        # LatLonBox of the top layer
+        bbox = self.wmsserver.contents[top_layer].boundingBoxWGS84
+        self.latlonbbox = (float(bbox[0]),
+                     float(bbox[1]),
+                     float(bbox[2]),
+                     float(bbox[3])) 
+        
         # BoundingBox of the top layer
-        bbox = self.capabilities.getLayerBBox(top_layer, top_srs)
-        if len(bbox) == 0:
-            self.error_msg = _('No BoundingBox found for layer %s and EPSG:')\
-                             % (top_layer, top_srs)
-            return
-        self.bbox = (float(bbox['minx']),
-                     float(bbox['miny']),
-                     float(bbox['maxx']),
-                     float(bbox['maxy']))
+        # Do we really need to know the bbox not in WGS84 ? 
+        bbox = self.wmsserver.contents[top_layer].boundingBox
+        if bbox is None or len(bbox) == 0:
+        #    self.error_msg = _('No BoundingBox found for layer %s and EPSG %s')\
+        #                     % (top_layer, top_srs)
+            self.bbox = None
+        else :
+            self.bbox = (float(bbox[0]),
+                     float(bbox[1]),
+                     float(bbox[2]),
+                     float(bbox[3]))
+        if self.bbox is None:
+            self.bbox =self.latlonbbox
 
-        # LatLonBox of the top layer
-        bbox = self.capabilities.getLayerLatLonBBox(top_layer)
-        self.latlonbbox = (float(bbox['minx']),
-                           float(bbox['miny']),
-                           float(bbox['maxx']),
-                           float(bbox['maxy']))
-
         # get projection
         p = epsg_code_to_projection(top_srs)
         self.SetProjection(p)
@@ -157,14 +163,14 @@
 
         # pre-determine the used format
         self.wmsformat, self.format = \
-            self.calcFormat(self.capabilities.getFormats())
+        self.calcFormat(self.wmsserver.getOperationByName('GetMap').formatOptions)
         if self.wmsformat is None:
             self.error_msg = \
                 _('No supported image format found in remote resource')
             return
 
         # get and set the title
-        self.SetTitle(internal_from_unicode(self.capabilities.getTitle()))
+        self.SetTitle(internal_from_unicode(self.wmsserver.identification.title))
 
 
     def LatLongBoundingBox(self):
@@ -251,7 +257,7 @@
         assuming that JPEG will always be supported on the server side
         with this encoding.
         """
-        return self.capabilities.getFormats()
+        return self.wmsserver.getOperationByName('GetMap').formatOptions
 
 
     def getLayers(self):
@@ -264,7 +270,7 @@
         title but doesn't have to have a name associated to it as
         well.  If no layers were found, an empty list is returned.
         """
-        return self.capabilities.getLayers()
+        return list(self.wmsserver.contents)
 
 
     def getLayerTitle(self, layer):
@@ -276,7 +282,7 @@
         If no such title or no such layer exists, an empty string is
         returned.
         """
-        return self.capabilities.getLayerTitle(layer)
+        return self.wmsserver[layer].title
 
 
     def getWMSFormat(self):
@@ -326,15 +332,28 @@
         bbox_dict = { 'minx': bbox[0], 'miny': bbox[1],
                       'maxx': bbox[2], 'maxy': bbox[3] }
 
+        if self.cached_bbox is not None:
+            for i in xrange(4):
+                if self.cached_bbox[i] != bbox[i]:
+                    break
+            else:
+                if self.cached_response is not None:
+                    return self.cached_response, self.format
+        self.cached_bbox = bbox
         # Change the cursor to demonstrate that we're busy but working
         ThubanBeginBusyCursor()
 
-        wmsclient = WMSClient()
-
         epsg_id = int(self.GetProjection().EPSGCode())
 
-        wms_response = wmsclient.getMap(self.url, self.wmsformat, width, height,
-                                   epsg_id, bbox_dict,
-                                   self.wms_layers, version = self.capabilities.getVersion())
+        wms_response = self.wmsserver.getmap(layers=self.wms_layers, 
+                                             styles=None, 
+                                             srs="EPSG:%s" % epsg_id, 
+                                             bbox=bbox, 
+                                             size=(width, height), 
+                                             format=self.wmsformat, 
+                                             transparent=False)
+        self.cached_response = wms_response.read()
+        
         ThubanEndBusyCursor()
-        return wms_response, self.format
+        
+        return self.cached_response , self.format

Added: packages/thuban/branches/upstream/current/Extensions/wms/test/sample.xml
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/wms/test/sample.xml	                        (rev 0)
+++ packages/thuban/branches/upstream/current/Extensions/wms/test/sample.xml	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,150 @@
+<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
+<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://www.digitalearth.gov/wmt/xml/capabilities_1_0_8.dtd"
+ [
+ <!ELEMENT VendorSpecificCapabilities EMPTY>
+ ]>  <!-- end of DOCTYPE declaration -->
+
+<!-- Based on the capabilities returned on March 15th 2004 from
+     http://frida.intevation.org/cgi-bin/frida_wms? -->
+
+<WMT_MS_Capabilities version="1.0.8" updateSequence="0">
+<Service> <!-- a service IS a MapServer mapfile -->
+  <Name>GetMap</Name> <!-- WMT defined -->
+  <Title>Frida - Freie Vektor-Geodaten Osnabrück</Title>
+  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://frida.intevation.org/cgi-bin/frida_wms?"/>
+  <ContactInformation>
+  </ContactInformation>
+</Service>
+
+<Capability>
+  <Request>
+    <GetCapabilities>
+      <Format>application/vnd.ogc.wms_xml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://frida.intevation.org/cgi-bin/frida_wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://frida.intevation.org/cgi-bin/frida_wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetCapabilities>
+    <GetMap>
+      <Format>image/gif</Format>
+      <Format>image/png</Format>
+      <Format>image/jpeg</Format>
+      <Format>image/wbmp</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://frida.intevation.org/cgi-bin/frida_wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://frida.intevation.org/cgi-bin/frida_wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetMap>
+    <GetFeatureInfo>
+      <Format>text/plain</Format>
+      <Format>text/html</Format>
+      <Format>application/vnd.ogc.gml</Format>
+      <DCPType>
+        <HTTP>
+          <Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://frida.intevation.org/cgi-bin/frida_wms?"/></Get>
+          <Post><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://frida.intevation.org/cgi-bin/frida_wms?"/></Post>
+        </HTTP>
+      </DCPType>
+    </GetFeatureInfo>
+  </Request>
+  <Exception>
+    <Format>application/vnd.ogc.se_xml</Format>
+    <Format>application/vnd.ogc.se_inimage</Format>
+    <Format>application/vnd.ogc.se_blank</Format>
+  </Exception>
+  <VendorSpecificCapabilities />
+  <Layer>
+    <Name>Osnabrueck</Name>
+    <Title>Frida - Freie Vektor-Geodaten Osnabrück</Title>
+    <SRS>31493</SRS>
+    <LatLonBoundingBox minx="7.92881" miny="52.2131" maxx="8.18349" maxy="52.341" />
+    <BoundingBox SRS="31493"
+                minx="3.427e+06" miny="5.787e+06" maxx="3.4442e+06" maxy="5.801e+06" />
+    <ScaleHint min="0.498903" max="49.8903" />
+    <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>gruenflaechen</Name>
+        <Title>Grünflächen</Title>
+        <SRS>EPSG:31493</SRS>
+        <LatLonBoundingBox minx="7.92984" miny="52.225" maxx="8.18033" maxy="52.3382" />
+        <BoundingBox SRS="EPSG:31493"
+                    minx="3.42707e+06" miny="5.78832e+06" maxx="3.444e+06" maxy="5.80069e+06" />
+    </Layer>
+    <Layer>
+      <Name>gewaesser</Name>
+      <Title>Gewässer</Title>
+      <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>gewaesserpolyl</Name>
+        <Title>Gewässerflächen</Title>
+        <SRS>EPSG:31493</SRS>
+        <SRS>EPSG:31494</SRS>
+        <LatLonBoundingBox minx="7.93531" miny="52.2328" maxx="8.17739" maxy="52.3353" />
+        <BoundingBox SRS="EPSG:31493"
+                    minx="3.42743e+06" miny="5.78919e+06" maxx="3.44381e+06" maxy="5.80038e+06" />
+        <BoundingBox SRS="EPSG:31494"
+                    minx="3.42742e+06" miny="5.78918e+06" maxx="3.44380e+06" maxy="5.80037e+06" />
+      </Layer>
+      <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>gewaesserlinien</Name>
+        <Title>Gewässerlinien</Title>
+        <SRS>EPSG:31493 EPSG:31492</SRS>
+        <LatLonBoundingBox minx="7.92914" miny="52.2311" maxx="8.14707" maxy="52.3273" />
+        <BoundingBox SRS="EPSG:31492"
+                    minx="3.427e+06" miny="5.78901e+06" maxx="3.44173e+06" maxy="5.79952e+06" />
+      </Layer>
+    </Layer>
+    <Layer>
+      <Name>strassen_all</Name>
+      <Title>Strassen sowie Beschriftung und Hintergrund</Title>
+      <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>strassenhinten</Name>
+        <Title>Strassenhintergrund</Title>
+        <SRS>EPSG:31493</SRS>
+        <LatLonBoundingBox minx="7.92885" miny="52.2185" maxx="8.18052" maxy="52.3398" />
+        <BoundingBox SRS="EPSG:31493"
+                    minx="3.427e+06" miny="5.78759e+06" maxx="3.444e+06" maxy="5.80088e+06" />
+      </Layer>
+      <Layer queryable="1" opaque="0" cascaded="0">
+        <Name>strassen</Name>
+        <Title>Strassen</Title>
+        <SRS>EPSG:31494 EPSG:31495</SRS>
+        <LatLonBoundingBox minx="7.92885" miny="52.2185" maxx="8.18052" maxy="52.3398" />
+        <BoundingBox SRS="EPSG:31494"
+                    minx="3.427e+06" miny="5.78759e+06" maxx="3.444e+06" maxy="5.80088e+06" />
+        <BoundingBox SRS="EPSG:31495"
+                    minx="3.427e+06" miny="5.78759e+06" maxx="3.444e+06" maxy="5.80088e+06" />
+      </Layer>
+      <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>beschriftung</Name>
+        <Title>Beschriftung</Title>
+        <SRS>EPSG:31494</SRS>
+        <SRS>EPSG:31495</SRS>
+        <LatLonBoundingBox minx="7.92885" miny="52.2185" maxx="8.18052" maxy="52.3398" />
+        <BoundingBox SRS="EPSG:31493"
+                    minx="3.427e+06" miny="5.78759e+06" maxx="3.444e+06" maxy="5.80088e+06" />
+        <ScaleHint min="0" max="4.98903" />
+      </Layer>
+      <Layer queryable="0" opaque="0" cascaded="0">
+        <Name>hauptbeschriftung</Name>
+        <Title>Hauptbeschriftung</Title>
+        <SRS>EPSG:31493</SRS>
+        <LatLonBoundingBox minx="7.92885" miny="52.2185" maxx="8.18052" maxy="52.3398" />
+        <BoundingBox SRS="EPSG:31493"
+                    minx="3.427e+06" miny="5.78759e+06" maxx="3.444e+06" maxy="5.80088e+06" />
+        <ScaleHint min="0" max="9.97806" />
+      </Layer>
+    </Layer>
+    <Layer queryable="1" opaque="0" cascaded="0">
+        <Name>sehenswuerdigkeiten</Name>
+        <Title>Sehenswürdigkeiten</Title>
+        <SRS>EPSG:31493 AUTO:42003 AUTO:42005</SRS>
+        <LatLonBoundingBox minx="7.94044" miny="52.2332" maxx="8.1586" maxy="52.3265" />
+        <BoundingBox SRS="EPSG:31493"
+                    minx="3.42777e+06" miny="5.78922e+06" maxx="3.44253e+06" maxy="5.79941e+06" />
+    </Layer>
+  </Layer>
+</Capability>
+</WMT_MS_Capabilities>

Modified: packages/thuban/branches/upstream/current/Extensions/wms/wms.py
===================================================================
--- packages/thuban/branches/upstream/current/Extensions/wms/wms.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Extensions/wms/wms.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,5 +1,6 @@
-# Copyright (C) 2003, 2004 by Intevation GmbH
+# Copyright (C) 2003, 2004, 2008 by Intevation GmbH
 # Authors:
+# Didrik Pinte <dpinte at dipole-consulting.com> (2008)
 # Jan-Oliver Wagner <jan at intevation.de> (2003, 2004)
 # Bernhard Herzog <bh at intevation.de> (2004)
 # Martin Schulze <joey at infodrom.org> (2004)
@@ -9,17 +10,11 @@
 
 """
 Provide layers via OGC WMS.
-
-This extension is in a very experimental stage!
-It just demonstrates how to add a special
-layer into Thuban via an extension.
-Some things are not wired, so be prepared for Exceptions
-everywhere.
 """
 
-__version__ = "$Revision: 2788 $"
+__version__ = "$Revision: 2848 $"
 # $Source$
-# $Id: wms.py 2788 2007-11-29 13:40:24Z bernhard $
+# $Id: wms.py 2848 2008-06-23 08:26:42Z dpinte $
 
 import os, sys
 import xml.dom.minidom
@@ -78,8 +73,8 @@
 
         self.combo_value = wx.ComboBox(self, self.ID_COMBOVALUE, size=(500,-1))
         self.combo_value.Append("")
-        self.combo_value.Append('http://demo.intevation.org/cgi-bin/frida-wms?')
-        self.combo_value.Append('http://wms.jpl.nasa.gov/wms.cgi?')
+        self.combo_value.Append('http://demo.intevation.org/cgi-bin/frida-wms')
+        self.combo_value.Append('http://wms.jpl.nasa.gov/wms.cgi')
         self.combo_value.SetSelection(0)
 
         button_ok = wx.Button(self, wx.ID_OK, _("OK"))

Deleted: packages/thuban/branches/upstream/current/MANIFEST
===================================================================
--- packages/thuban/branches/upstream/current/MANIFEST	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/MANIFEST	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,342 +0,0 @@
-COPYING
-ChangeLog
-MANIFEST
-MANIFEST.in
-NEWS
-README
-Releasenotes.txt
-setup.cfg
-setup.py
-thuban.py
-Doc/README
-Doc/ThubanModel.xmi
-Doc/manual/Makefile
-Doc/manual/README
-Doc/manual/mainwindow.png
-Doc/manual/mainwindow.xcf
-Doc/manual/thuban-manual-de.xml
-Doc/manual/thuban-manual.xml
-Doc/manual/images/1_2_legend_close.png
-Doc/manual/images/1_2_legend_dock.png
-Doc/manual/images/1_2_mainwindow.png
-Doc/manual/images/1_2_mainwindow.ps
-Doc/manual/images/1_2_mainwindow.sk
-Doc/manual/images/2_4_session_tree.png
-Doc/manual/images/3_2_fullextent.png
-Doc/manual/images/3_2_fulllayerextent.png
-Doc/manual/images/3_2_fullshapeextent.png
-Doc/manual/images/3_2_pan.png
-Doc/manual/images/3_2_zoomin.png
-Doc/manual/images/3_2_zoomout.png
-Doc/manual/images/3_3_identify.png
-Doc/manual/images/3_3_label.png
-Doc/manual/images/3_5_invisible.png
-Doc/manual/images/3_5_legend.png
-Doc/manual/images/3_5_movedown.png
-Doc/manual/images/3_5_moveup.png
-Doc/manual/images/3_5_popup_menu.png
-Doc/manual/images/3_5_props.png
-Doc/manual/images/3_5_tobottom.png
-Doc/manual/images/3_5_totop.png
-Doc/manual/images/3_5_visible.png
-Doc/manual/images/3_rename_map.png
-Doc/manual/images/4_2_layer_properties.png
-Doc/manual/images/4_2_raster_layer_properties.png
-Doc/manual/images/5_2_custom_ramp.png
-Doc/manual/images/5_2_quantiles.png
-Doc/manual/images/5_2_uniform_dist.png
-Doc/manual/images/5_2_unique_values.png
-Doc/manual/images/5_3_genclass.png
-Doc/manual/images/5_classification.png
-Doc/manual/images/6_projection.png
-Doc/manual/images/7_1_table_view.png
-Doc/manual/images/7_2_5_join.png
-Doc/manual/images/8_int_error.png
-Doc/manual/images/app_postgis_add_layer.png
-Doc/manual/images/app_postgis_db_add.png
-Doc/manual/images/app_postgis_db_management.png
-Doc/technotes/README
-Doc/technotes/coding_guidelines.txt
-Doc/technotes/release_process.txt
-Doc/technotes/string_representation.txt
-Examples/__init__.py
-Examples/simple_extensions/README
-Examples/simple_extensions/__init__.py
-Examples/simple_extensions/hello_world.py
-Examples/simple_extensions/simple_command.py
-Examples/simple_extensions/simple_tool.py
-Examples/simple_extensions/simple_tool.xpm
-Extensions/__init__.py
-Extensions/bboxdump/__init__.py
-Extensions/bboxdump/bboxdump.py
-Extensions/drawshape/README
-Extensions/drawshape/drawshape.py
-Extensions/drawshape/patch.diff
-Extensions/export_shapefile/__init__.py
-Extensions/export_shapefile/export_shapefile.py
-Extensions/gns2shp/__init__.py
-Extensions/gns2shp/gns2shp.py
-Extensions/gns2shp/test/README
-Extensions/gns2shp/test/__init__.py
-Extensions/gns2shp/test/ls.txt
-Extensions/gns2shp/test/test_gns2shp.py
-Extensions/importAPR/__init__.py
-Extensions/importAPR/apr.py
-Extensions/importAPR/importAPR.py
-Extensions/importAPR/odb.py
-Extensions/importAPR/samples/README
-Extensions/importAPR/samples/iceland.apr
-Extensions/importAPR/test/README
-Extensions/importAPR/test/test_apr.py
-Extensions/mouseposition/__init__.py
-Extensions/mouseposition/mouseposition.py
-Extensions/mouseposition/position.xpm
-Extensions/ogr/__init__.py
-Extensions/ogr/ogrdialog.py
-Extensions/ogr/ogrshapes.py
-Extensions/ogr/ogrstart.py
-Extensions/ogr/test/__init__.py
-Extensions/ogr/test/test_OGRShapestore.py
-Extensions/profiling/__init__.py
-Extensions/profiling/profiling.py
-Extensions/svgexport/__init__.py
-Extensions/svgexport/maplegend.py
-Extensions/svgexport/svgmapwriter.py
-Extensions/svgexport/svgsaver.py
-Extensions/svgexport/test/__init__.py
-Extensions/svgexport/test/test_svgmapwriter.py
-Extensions/umn_mapserver/README
-Extensions/umn_mapserver/__init__.py
-Extensions/umn_mapserver/mapfile.py
-Extensions/umn_mapserver/mf_export.py
-Extensions/umn_mapserver/mf_handle.py
-Extensions/umn_mapserver/mf_import.py
-Extensions/umn_mapserver/sample/README
-Extensions/umn_mapserver/test/README
-Extensions/umn_mapserver/test/test_mapserver.py
-Extensions/wms/__init__.py
-Extensions/wms/capabilities.py
-Extensions/wms/domutils.py
-Extensions/wms/infodialog.py
-Extensions/wms/layer.py
-Extensions/wms/parser.py
-Extensions/wms/properties.py
-Extensions/wms/wms.py
-Extensions/wms/test/adjustpath.py
-Extensions/wms/test/test_domutils.py
-Extensions/wms/test/test_ogclib.py
-Extensions/wms/test/test_parser.py
-Resources/Bitmaps/bottom_layer.xpm
-Resources/Bitmaps/close_12.xpm
-Resources/Bitmaps/dock_12.xpm
-Resources/Bitmaps/fullextent.xpm
-Resources/Bitmaps/fulllayerextent.xpm
-Resources/Bitmaps/fullselextent.xpm
-Resources/Bitmaps/group_use.xpm
-Resources/Bitmaps/group_use_all.xpm
-Resources/Bitmaps/group_use_none.xpm
-Resources/Bitmaps/group_use_not.xpm
-Resources/Bitmaps/hide_layer.xpm
-Resources/Bitmaps/identify.xpm
-Resources/Bitmaps/label.xpm
-Resources/Bitmaps/layer_properties.xpm
-Resources/Bitmaps/legend_icon_layer.xpm
-Resources/Bitmaps/legend_icon_map.xpm
-Resources/Bitmaps/lower_layer.xpm
-Resources/Bitmaps/pan.xpm
-Resources/Bitmaps/raise_layer.xpm
-Resources/Bitmaps/show_layer.xpm
-Resources/Bitmaps/top_layer.xpm
-Resources/Bitmaps/undock_12.xpm
-Resources/Bitmaps/zoom_in.xpm
-Resources/Bitmaps/zoom_out.xpm
-Resources/Locale/cs/LC_MESSAGES/thuban.mo
-Resources/Locale/de/LC_MESSAGES/thuban.mo
-Resources/Locale/es/LC_MESSAGES/thuban.mo
-Resources/Locale/fr/LC_MESSAGES/thuban.mo
-Resources/Locale/hu/LC_MESSAGES/thuban.mo
-Resources/Locale/it/LC_MESSAGES/thuban.mo
-Resources/Locale/pt_BR/LC_MESSAGES/thuban.mo
-Resources/Locale/ru/LC_MESSAGES/thuban.mo
-Resources/Projections/defaults.proj
-Resources/Projections/epsg-deprecated.proj
-Resources/Projections/epsg.proj
-Resources/XML/projfile.dtd
-Resources/XML/thuban-0.8.dtd
-Resources/XML/thuban-0.9.dtd
-Resources/XML/thuban-1.0.dtd
-Resources/XML/thuban-1.1.dtd
-Resources/XML/thuban-1.2.1.dtd
-Resources/XML/thuban.dtd
-Thuban/__init__.py
-Thuban/thuban_cfg.py
-Thuban/version.py
-Thuban/Lib/__init__.py
-Thuban/Lib/classmapper.py
-Thuban/Lib/connector.py
-Thuban/Lib/fileutil.py
-Thuban/Lib/version.py
-Thuban/Model/__init__.py
-Thuban/Model/base.py
-Thuban/Model/classgen.py
-Thuban/Model/classification.py
-Thuban/Model/color.py
-Thuban/Model/data.py
-Thuban/Model/extension.py
-Thuban/Model/label.py
-Thuban/Model/layer.py
-Thuban/Model/load.py
-Thuban/Model/map.py
-Thuban/Model/messages.py
-Thuban/Model/postgisdb.py
-Thuban/Model/proj.py
-Thuban/Model/range.py
-Thuban/Model/resource.py
-Thuban/Model/save.py
-Thuban/Model/scalebar.py
-Thuban/Model/session.py
-Thuban/Model/table.py
-Thuban/Model/transientdb.py
-Thuban/Model/wellknowntext.py
-Thuban/Model/xmlreader.py
-Thuban/Model/xmlwriter.py
-Thuban/UI/__init__.py
-Thuban/UI/about.py
-Thuban/UI/altpathdialog.py
-Thuban/UI/application.py
-Thuban/UI/baserenderer.py
-Thuban/UI/classgen.py
-Thuban/UI/classifier.py
-Thuban/UI/colordialog.py
-Thuban/UI/command.py
-Thuban/UI/common.py
-Thuban/UI/context.py
-Thuban/UI/controls.py
-Thuban/UI/dbdialog.py
-Thuban/UI/dialogs.py
-Thuban/UI/dock.py
-Thuban/UI/exceptiondialog.py
-Thuban/UI/extensionregistry.py
-Thuban/UI/hittest.py
-Thuban/UI/identifyview.py
-Thuban/UI/join.py
-Thuban/UI/labeldialog.py
-Thuban/UI/layerproperties.py
-Thuban/UI/legend.py
-Thuban/UI/main.py
-Thuban/UI/mainwindow.py
-Thuban/UI/menu.py
-Thuban/UI/messages.py
-Thuban/UI/multiplechoicedialog.py
-Thuban/UI/projdialog.py
-Thuban/UI/projlist.py
-Thuban/UI/rasterlayerproperties.py
-Thuban/UI/renderer.py
-Thuban/UI/resource.py
-Thuban/UI/scalebar.py
-Thuban/UI/selection.py
-Thuban/UI/sizers.py
-Thuban/UI/tableview.py
-Thuban/UI/tree.py
-Thuban/UI/view.py
-Thuban/UI/viewport.py
-devtools/create_epsg.py
-libraries/pyprojection/LICENSE
-libraries/pyprojection/MANIFEST.in
-libraries/pyprojection/Projection.i
-libraries/pyprojection/Projection.py
-libraries/pyprojection/Projection_wrap.c
-libraries/pyprojection/setup.py
-libraries/pyprojection/swighelp.txt
-libraries/pyshapelib/COPYING
-libraries/pyshapelib/ChangeLog
-libraries/pyshapelib/MANIFEST.in
-libraries/pyshapelib/NEWS
-libraries/pyshapelib/README
-libraries/pyshapelib/dbflib.i
-libraries/pyshapelib/dbflib.py
-libraries/pyshapelib/dbflib_wrap.c
-libraries/pyshapelib/pyshapelib_api.h
-libraries/pyshapelib/pytest.py
-libraries/pyshapelib/setup.py
-libraries/pyshapelib/shapelib.i
-libraries/pyshapelib/shapelib.py
-libraries/pyshapelib/shapelib_wrap.c
-libraries/pyshapelib/shptreemodule.c
-libraries/pyshapelib/testdbf.py
-libraries/shapelib/dbfopen.c
-libraries/shapelib/shapefil.h
-libraries/shapelib/shpopen.c
-libraries/shapelib/shptree.c
-libraries/thuban/gdalwarp.cpp
-libraries/thuban/swigPtrConvertHack.h
-libraries/thuban/wxPython_int.h
-libraries/thuban/wxproj.cpp
-packaging/debian/changelog
-packaging/debian/control
-packaging/debian/copyright
-packaging/debian/docs
-packaging/debian/menu
-packaging/debian/rules
-packaging/debian/thuban.1
-packaging/debian/watch
-packaging/windows/thubanstart.py
-po/Makefile
-po/README
-po/cs.po
-po/de.po
-po/es.po
-po/fr.po
-po/hu.po
-po/it.po
-po/pt_BR.po
-po/ru.po
-po/thuban.pot
-test/README
-test/localessupport.py
-test/mockgeo.py
-test/postgissupport.py
-test/runtests.py
-test/support.py
-test/test_base.py
-test/test_baserenderer.py
-test/test_classgen.py
-test/test_classification.py
-test/test_classmapper.py
-test/test_color.py
-test/test_command.py
-test/test_connector.py
-test/test_csv_table.py
-test/test_dbf_table.py
-test/test_derivedshapestore.py
-test/test_export.py
-test/test_fileutil.py
-test/test_hittest.py
-test/test_label.py
-test/test_layer.py
-test/test_lib_version.py
-test/test_load.py
-test/test_load_0_2.py
-test/test_load_0_8.py
-test/test_load_0_9.py
-test/test_load_1_0.py
-test/test_map.py
-test/test_memory_table.py
-test/test_menu.py
-test/test_mockgeo.py
-test/test_postgis_db.py
-test/test_postgis_session.py
-test/test_proj.py
-test/test_range.py
-test/test_save.py
-test/test_scalebar.py
-test/test_selection.py
-test/test_session.py
-test/test_shapefilestore.py
-test/test_stringrepresentation.py
-test/test_transientdb.py
-test/test_viewport.py
-test/test_wellknowntext.py
-test/test_wxproj.py
-test/test_xmlsupport.py
-test/xmlsupport.py

Modified: packages/thuban/branches/upstream/current/NEWS
===================================================================
--- packages/thuban/branches/upstream/current/NEWS	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/NEWS	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,4 +1,18 @@
+Changes up to Thuban 1.2.x DRAFT
+==========================
 
+- Problem fixes:
+
+  + Fix for shptreemodule.c coming from Debian #469007.
+  + DTDs 1.1 and 1.2.1 session files are valid DTDs again (Bernhard Herzog).
+  + Fix for Mac and wx 2.8. (Didrik Pinte)
+  + Minor improvements in code and documentation (Bernhard Reiter).
+
+ - Extensions
+
+   + wms: experimental migrated to owslib 0.3 (Didrik Pinte)
+
+
 Changes up to Thuban 1.2.1 (released 2008-02-03)
 ===========================
  - Rendering: Thuban's accelerated shapefile renderer is now 
@@ -54,7 +68,7 @@
    + wms: Some attemps to revive, but found out that PyOGClib is abandoned
      and does not work anymore. Needs work.
 
-   + Extentions are now all under the menu entry with the same name,
+   + Extensions are now all under the menu entry with the same name,
      their maturity will be indicated by leading string in the menu text. 
 
    + New installation wide configuration file thuban_cfg.py which by
@@ -88,7 +102,7 @@
 
  - Support for pysqlite2. (Didrik Pinte)
 
- - Added packagin directory, which already has an example how
+ - Added packaging directory, which already has an example how
    to load all extensions on windows. (Didrik Pinte)
 
  - Updated code to support new style wxPython 2.6 imports. So

Deleted: packages/thuban/branches/upstream/current/PKG-INFO
===================================================================
--- packages/thuban/branches/upstream/current/PKG-INFO	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/PKG-INFO	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,11 +0,0 @@
-Metadata-Version: 1.0
-Name: Thuban
-Version: 1.2.1
-Summary: Geographic data viewer
-Home-page: http://thuban.intevation.de/
-Author: Intevation GmbH
-Author-email: thuban at intevation.de
-License: GPL
-Description: Thuban is a viewer for geographic data written in Python
-        
-Platform: UNKNOWN

Modified: packages/thuban/branches/upstream/current/README
===================================================================
--- packages/thuban/branches/upstream/current/README	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/README	2009-05-26 20:36:51 UTC (rev 2247)
@@ -2,8 +2,8 @@
 Thuban - a Geographic Data Viewer
 =================================
 
-$Date: 2008-01-29 23:18:17 +0000 (Di, 29 Jan 2008) $
-$Revision: 2821 $
+$Date: 2008-05-23 14:24:56 +0200 (ven, 23 mag 2008) $
+$Revision: 2841 $
 
 Thuban is an interactive viewer for geographic data.  
 Python and the wxWidgets framework ensure great portability.
@@ -21,9 +21,19 @@
 About 4000 years ago it was the north star.
 
 
-Requirements
+Installation
 ------------
+As with most software there are two ways to install Thuban:
+a) Use a prepared package specific for your operating system.
+   This is the most convenient way. The packager will have the instructions
+   how to do this in detail, this is why it is not further described here.
+   A decent package management system will also handle the requirements.
 
+b) Build and install the software manually from sources.
+
+Requirements for building and running Thuban.
+------------
+
 Thuban requires the following software to be installed:
 
   Python     2.3.5    http://www.python.org
@@ -54,9 +64,12 @@
 Note that extensions might have their own additional requirements.
 
 
-Installation
-------------
+Building and installing
+-----------------------
 
+(First make sure the development variants of the software listed
+in the "Requirements" section above is installed.)
+
 Building Thuban (this compiles the extension modules but leaves them in
 a directory under build/):
 

Modified: packages/thuban/branches/upstream/current/Releasenotes.txt
===================================================================
--- packages/thuban/branches/upstream/current/Releasenotes.txt	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Releasenotes.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,4 +1,4 @@
-$Rev: 2831 $ [ Notes for a speciffic release might be changed after the source]
+$Rev: 2832 $ [ Notes for a speciffic release might be changed after the source]
              [ has been published, so check online for updates.               ]
 
 Release Notes for Thuban-1.2.1 (released 2008-02-03)
@@ -16,7 +16,7 @@
 have been fixed. The Thuban 1.2.x series seems a little less stable than
 usual because of the way we are half way there to fully support unicode
 internally. But thanks to our users, all reports help us to iron out
-the problems! Thanks to all you have send us feedback!
+the problems! Thanks to all that have send us feedback!
 
 Bernhard Reiter
 Didrik Pinte

Modified: packages/thuban/branches/upstream/current/Resources/XML/thuban-1.1.dtd
===================================================================
--- packages/thuban/branches/upstream/current/Resources/XML/thuban-1.1.dtd	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Resources/XML/thuban-1.1.dtd	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--    thuban-1.1.dtd
 
-    Copyright (C) 2001, 2003, 2004, 2005 by Intevation GmbH
+    Copyright (C) 2001, 2003, 2004, 2005, 2008 by Intevation GmbH
     Authors:
         Jan-Oliver Wagner <jan at intevation.de>
         Bernhard Herzog <bh at intevation.de>
@@ -9,9 +9,9 @@
     This program is free software under the GPL (>=v2)
     Read the file COPYING coming with Thuban for details.
 
-    $Revision: 2688 $
+    $Revision: 2842 $
     $Source$
-    $Id: thuban-1.1.dtd 2688 2006-06-30 12:27:20Z frank $
+    $Id: thuban-1.1.dtd 2842 2008-06-02 19:16:01Z bh $
 -->
 
 <!-- a session contains zero or more database connections zero or more
@@ -180,8 +180,8 @@
 
 <!-- Classification data -->
 <!ELEMENT classification (clnull?, clpoint*, clrange*, clpattern*, clcont*)>
-<!ATTLIST classification field CDATA>
-<!ATTLIST classification field_type CDATA>
+<!ATTLIST classification field CDATA #IMPLIED>
+<!ATTLIST classification field_type CDATA #IMPLIED>
 
 <!ELEMENT clnull (cldata*)>
 <!ELEMENT clpoint (cldata*)>

Modified: packages/thuban/branches/upstream/current/Resources/XML/thuban-1.2.1.dtd
===================================================================
--- packages/thuban/branches/upstream/current/Resources/XML/thuban-1.2.1.dtd	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Resources/XML/thuban-1.2.1.dtd	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--    
-    $Id: thuban-1.2.1.dtd 2826 2008-01-31 15:41:56Z bernhard $
-    $HeadURL: svn+ssh://bernhard@scm.wald.intevation.org/thuban/trunk/thuban/Resources/XML/thuban-1.2.1.dtd $
+    $Id: thuban-1.2.1.dtd 2842 2008-06-02 19:16:01Z bh $
+    $HeadURL: https://scm.wald.intevation.org/svn/thuban/trunk/thuban/Resources/XML/thuban-1.2.1.dtd $
 
     Copyright (C) 2001, 2003, 2004, 2005, 2008 by Intevation GmbH
     Authors:
@@ -177,8 +177,8 @@
 
 <!-- Classification data -->
 <!ELEMENT classification (clnull?, clpoint*, clrange*, clpattern*, clcont*)>
-<!ATTLIST classification field CDATA>
-<!ATTLIST classification field_type CDATA>
+<!ATTLIST classification field CDATA #IMPLIED>
+<!ATTLIST classification field_type CDATA #IMPLIED>
 
 <!ELEMENT clnull (cldata*)>
 <!ELEMENT clpoint (cldata*)>

Modified: packages/thuban/branches/upstream/current/Thuban/Lib/fileutil.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/Lib/fileutil.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/Lib/fileutil.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -9,10 +9,11 @@
 Functions to deal with filenames
 """
 
-__version__ = "$Revision: 1885 $"
+__version__ = "$Revision: 2875 $"
 
 import os
 import os.path
+import sys
 from tempfile import mktemp
 
 from string import join
@@ -159,7 +160,6 @@
     Under posix systems use the os.expanduser() method.
     Under Win32 try to read the "Explorer/Shell Folders/" value "AppData".
     """
-
     if os.name == 'posix':
         dir = os.path.expanduser("~/.thuban")
         if not os.path.isdir(dir):
@@ -191,13 +191,24 @@
             dir = os.path.join(guess, "thuban")
         if not os.path.isdir(dir):
            os.mkdir(dir)
+        
+        return str(dir)
 
-        return dir
-
     else:
         raise RuntimeError(_("No implementation of get_application_dir"
                        " available for platform") + os.name)
 
+def get_thuban_dir():
+    """Determine the path to the where the Thuban directory is stored 
+
+    This method is needed to solve problems when the application is frozen
+    """
+    if hasattr(sys, 'frozen'):
+        res_path = os.path.normpath(os.path.dirname(sys.executable))
+    else:
+        res_path = os.path.normpath(os.path.join(os.path.dirname(__file__), os.pardir ,os.pardir))
+    return res_path
+
 # bind the appropriate version of relative_filename for the platform
 # we're currently running on.
 if os.name == "posix":

Modified: packages/thuban/branches/upstream/current/Thuban/Model/load.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/Model/load.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/Model/load.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -12,7 +12,7 @@
 Parser for thuban session files.
 """
 
-__version__ = "$Revision: 2826 $"
+__version__ = "$Revision: 2837 $"
 
 import string, os
 
@@ -161,9 +161,9 @@
         """Clear all instance variables to cut cyclic references.
 
         The GC would have collected the loader eventually but it can
-	happen that it doesn't run at all until Thuban is closed (2.3
-	but not 2.2 tries a bit harder and forces a collection when the
-	interpreter terminates)
+        happen that it doesn't run at all until Thuban is closed (2.3
+        but not 2.2 tries a bit harder and forces a collection when the
+        interpreter terminates)
         """
         self.__dict__.clear()
 
@@ -528,8 +528,8 @@
         self.aLayer = None
 
     def start_classification(self, name, qname, attrs):
-    	# field and field_type are optional because the classification
-	# can also be empty, ie. have only a default.
+        # field and field_type are optional because the classification
+        # can also be empty, ie. have only a default.
         attrs = self.check_attrs(name, attrs,
                                  [AttrDesc("field", False),
                                   AttrDesc("field_type", False)])
@@ -537,7 +537,7 @@
         field = attrs["field"]
         fieldType = attrs["field_type"]
 
-	if field == "": return # no need to set classification column.
+        if field == "": return # no need to set classification column.
 
         dbFieldType = self.aLayer.GetFieldType(field)
 

Modified: packages/thuban/branches/upstream/current/Thuban/Model/resource.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/Model/resource.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/Model/resource.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -7,9 +7,9 @@
 
 """Handle resources loaded from files such as projections"""
 
-__version__ = "$Revision: 1964 $"
+__version__ = "$Revision: 2875 $"
 # $Source$
-# $Id: resource.py 1964 2003-11-19 19:48:47Z bh $
+# $Id: resource.py 2875 2009-05-18 14:12:22Z dpinte $
 
 
 import os
@@ -20,16 +20,15 @@
 import Thuban
 from Thuban import _
 
-from Thuban.Lib.fileutil import get_application_dir
+from Thuban.Lib.fileutil import get_application_dir, get_thuban_dir
 
 from Thuban.Model.xmlreader import XMLReader
 from Thuban.Model.xmlwriter import XMLWriter
 from Thuban.Model.proj import Projection, ProjFile
 from xml.sax import SAXParseException
 
-projdir = \
-        os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Projections")
 
+projdir = os.path.join(get_thuban_dir(), "Resources", "Projections")
 
 PROJ_EXT = ".proj"
 

Modified: packages/thuban/branches/upstream/current/Thuban/Model/transientdb.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/Model/transientdb.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/Model/transientdb.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -14,9 +14,9 @@
 Thuban session and is reconstructed when the session is opened.
 """
 
-__version__ = "$Revision: 2682 $"
+__version__ = "$Revision: 2871 $"
 # $Source$
-# $Id: transientdb.py 2682 2006-05-15 20:11:15Z dpinte $
+# $Id: transientdb.py 2871 2009-03-20 13:10:25Z dpinte $
 
 # Pysqlite version 1. and 2. behaves quiet differently
 # Pysqlite uses a different paramstyle.  The older version
@@ -24,15 +24,20 @@
 # and named.
 # The sqlite2 boolean variable is used to manage specific part of the code
 try:
-      # Using SQLITE 2.x
+
+    # Using SQLITE 3.x
+    import sqlite3 as sqlite
     sqlite2 = True
-    from pysqlite2 import dbapi2 as sqlite
 except ImportError:
-      # Using SQLITE 1.x
-    sqlite2 = False
-    import sqlite
+    try :
+        # Using SQLITE 2.x
+        sqlite2 = True
+        from pysqlite2 import dbapi2 as sqlite
+    except ImportError:
+        # Using SQLITE 1.x
+        sqlite2 = False
+        import sqlite
     
-
 from base import TitledObject
 
 import table

Modified: packages/thuban/branches/upstream/current/Thuban/UI/__init__.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/__init__.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/__init__.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -80,7 +80,7 @@
         Thuban.set_internal_encoding(encoding)
 
 
-install_wx_translation()
+#install_wx_translation()
 
 # We define a function that will return the internal representation
 # for a value returned from wxString.

Modified: packages/thuban/branches/upstream/current/Thuban/UI/application.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/application.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/application.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -10,7 +10,7 @@
 Thuban's application object.
 """
 
-__version__ = "$Revision: 2813 $"
+__version__ = "$Revision: 2876 $"
 
 import sys, os
 import os.path
@@ -32,6 +32,8 @@
 from Thuban.Model.layer import RasterLayer
 import Thuban.Model.resource
 
+from Thuban.UI import install_wx_translation
+
 from extensionregistry import ext_registry
 
 import view
@@ -53,10 +55,13 @@
     class derived from wxApp. In Thuban the application class holds
     references to the main window and the session.
     """
-
-    def OnInit(self):
+    
+    def OnInit(self):    
+        
         sys.excepthook = self.ShowExceptionDialog
 
+        install_wx_translation()
+        
         # Initialize instance variables before trying to create any
         # windows.  Creating windows can start an event loop if
         # e.g. message boxes are popped up for some reason, and event
@@ -115,7 +120,7 @@
                 try:
                     if tb.tb_next is not None:
                         # The ImportError exception was raised from
-                        # inside the thubanstart module.
+                        # inside the thubanstart module.                        
                         sys.stderr.write(_("Cannot import the thubanstart"
                                          " module\n"))
                         traceback.print_exc(None, sys.stderr)

Modified: packages/thuban/branches/upstream/current/Thuban/UI/colordialog.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/colordialog.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/colordialog.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -5,9 +5,9 @@
 # This program is free software under the GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
 
-__version__ = "$Revision: 2700 $"
+__version__ = "$Revision: 2877 $"
 # $Source$
-# $Id: colordialog.py 2700 2006-09-18 14:27:02Z dpinte $
+# $Id: colordialog.py 2877 2009-05-18 15:14:01Z dpinte $
 
 import wx
 
@@ -22,7 +22,7 @@
 # It was not available with the very first versions of wxWindows 2.4
 # (I don't know the exact version though)
 try:
-    from wxPython.lib.colourchooser import wxPyColourChooser
+    from wx.lib.colourchooser import wxPyColourChooser
     _wxPyColourChooser = True
     wx.InitAllImageHandlers() # should be somewhere at Thuban startup?
 except:

Modified: packages/thuban/branches/upstream/current/Thuban/UI/dock.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/dock.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/dock.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -14,7 +14,7 @@
 should derive from.
 """
 
-__version__ = "$Revision: 2766 $"
+__version__ = "$Revision: 2877 $"
 
 import resource
 
@@ -28,8 +28,11 @@
 
 from messages import DOCKABLE_DOCKED, DOCKABLE_UNDOCKED, DOCKABLE_CLOSED
 
-ID_BUTTON_DOCK = 4001
-ID_BUTTON_CLOSE = 4002
+# Commented ID's because ID's are the same as the ID's of the legend buttons ...
+#ID_BUTTON_DOCK = 4001
+#ID_BUTTON_CLOSE = 4002
+ID_BUTTON_DOCK = wx.ID_ANY
+ID_BUTTON_CLOSE = wx.ID_ANY
 
 PANEL_ID = 3141
 
@@ -54,7 +57,7 @@
 
         self.parent = parent
 
-        #self.SetDockParent(None)
+        self.SetDockParent(parent)
         #parent.SetPanel(self)
 
     def Create(self):
@@ -92,7 +95,7 @@
 class DockableWindow(Publisher):
 
     def __getattr__(self, attr):
-        return getattr(self.__topWindow, attr)
+        return getattr(self.__topWindow, attr)    
 
     def __init__(self, parent, id, name, title, dockWindow, orient):
         """Create the dockable window.
@@ -117,6 +120,7 @@
         else:
             self.__topWindow = self.__floatWindow
 
+        
         self.__floatSize     = None
         self.__floatPosition = None
 
@@ -192,6 +196,11 @@
         self.SetDockSize(self.__dockWindow.GetSize())
 
         if wasVisible: self.Show(True)
+        
+        # rebind the events to the correct window
+        # FIXME : should we remove the previous bindings ?
+        self.__topWindow.Bind(wx.EVT_BUTTON, self._OnToggleDock, self.__dockButton)
+        self.__topWindow.Bind(wx.EVT_BUTTON, self._OnButtonClose, self.__closeX) 
 
         self.issue(DOCKABLE_DOCKED, self.__id, self)
 
@@ -226,6 +235,11 @@
             self.SetPosition(self.__floatPosition)
         if self.__floatSize is not None:
             self.SetSize(self.__floatSize)
+            
+        # rebind the events to the correct window
+        # FIXME : should we remove the previous bindings ?
+        self.__topWindow.Bind(wx.EVT_BUTTON, self._OnToggleDock, self.__dockButton)
+        self.__topWindow.Bind(wx.EVT_BUTTON, self._OnButtonClose, self.__closeX) 
 
         self.__dockPanel.SetSize(self.__topWindow.GetClientSize())
 
@@ -279,7 +293,7 @@
     #
 
     def _OnButtonClose(self, event):
-        #self.Close()
+        self.Close()
         self.Show(False)
 
     def _OnClose(self, force = False):
@@ -364,11 +378,11 @@
 
         bmp = resource.GetBitmapResource(CLOSE_BMP, wx.BITMAP_TYPE_XPM)
 
-        closeX = wx.BitmapButton(self.__dockPanel, ID_BUTTON_CLOSE, bmp,
+        self.__closeX = wx.BitmapButton(self.__dockPanel, ID_BUTTON_CLOSE, bmp,
                           size = wx.Size(bmp.GetWidth() + 4,
                                         bmp.GetHeight() + 4),
                           style = wx.BU_EXACTFIT | wx.ADJUST_MINSIZE)
-        closeX.SetToolTip(wx.ToolTip(_("Close")))
+        self.__closeX.SetToolTip(wx.ToolTip(_("Close")))
 
         #
         # fill in the sizer in an order appropriate to the orientation
@@ -377,9 +391,9 @@
             headerBox.Add(text, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTRE_VERTICAL, 0)
             headerBox.Add((1, 5), 1, wx.GROW)
             headerBox.Add(self.__dockButton, 0, wx.ALIGN_RIGHT, 0)
-            headerBox.Add(closeX, 0, wx.ALIGN_RIGHT | wx.LEFT, 4)
+            headerBox.Add(self.__closeX, 0, wx.ALIGN_RIGHT | wx.LEFT, 4)
         else:
-            headerBox.Add(closeX, 0, wx.ALIGN_RIGHT | wx.BOTTOM, 4)
+            headerBox.Add(self.__closeX, 0, wx.ALIGN_RIGHT | wx.BOTTOM, 4)
             headerBox.Add(self.__dockButton, 0, wx.ALIGN_RIGHT, 0)
             headerBox.Add(text, 0, wx.ALIGN_LEFT | wx.ALIGN_CENTRE_VERTICAL, 0)
 
@@ -392,8 +406,8 @@
         sizer.SetSizeHints(self.__dockPanel)
         sizer.SetSizeHints(self.__floatWindow)
 
-        self.Bind(wx.EVT_BUTTON, self._OnToggleDock, self.__dockPanel, id=ID_BUTTON_DOCK)
-        self.Bind(wx.EVT_BUTTON, self._OnButtonClose, self.__dockPanel, id=ID_BUTTON_CLOSE)
+        self.__topWindow.Bind(wx.EVT_BUTTON, self._OnToggleDock, self.__dockButton)
+        self.__topWindow.Bind(wx.EVT_BUTTON, self._OnButtonClose, self.__closeX)
 
 
 class DockFrame(wx.Frame):
@@ -453,8 +467,7 @@
         sash.SetOrientation(orient)
         sash.SetAlignment(align)
         sash.SetSashVisible(DockFrame.layout2oppSash[align], True)
-        sash.SetSashBorder(DockFrame.layout2oppSash[align], True)
-
+        
         win = DockableWindow(self, id, name, title, sash, orient)
 
         self.__RegisterDock(name, win)

Modified: packages/thuban/branches/upstream/current/Thuban/UI/legend.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/legend.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/legend.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -6,7 +6,7 @@
 # This program is free software under the GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
 
-__version__ = "$Revision: 2700 $"
+__version__ = "$Revision: 2840 $"
 
 from  math import fabs, cos, pi
 
@@ -718,7 +718,7 @@
 
     def __init__(self, parent, map, mainWindow):
         # While the width is fixed, get the height _now_.
-        dc = wx.MemoryDC()
+        dc = wx.ScreenDC()
         textwidth, textheight = dc.GetTextExtent("%d"%0)
         self.width = 210
         self.height = textheight + 3*2 + 8

Modified: packages/thuban/branches/upstream/current/Thuban/UI/mainwindow.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/mainwindow.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/mainwindow.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -12,9 +12,9 @@
 The main window
 """
 
-__version__ = "$Revision: 2817 $"
+__version__ = "$Revision: 2873 $"
 # $Source$
-# $Id: mainwindow.py 2817 2008-01-27 00:01:32Z bernhard $
+# $Id: mainwindow.py 2873 2009-04-04 10:38:54Z dpinte $
 
 import os
 import copy
@@ -106,7 +106,7 @@
 
         # creat the menubar from the main_menu description
         self.SetMenuBar(self.build_menu_bar(main_menu))
-
+        
         # Similarly, create the toolbar from main_toolbar
         toolbar = self.build_toolbar(main_toolbar)
         # call Realize to make sure that the tools appear.
@@ -197,6 +197,13 @@
             if command.IsDynamic():
                 self.Bind(wx.EVT_UPDATE_UI, self.update_command_ui, id=ID)
 
+    def unbind_command_events(self, command, ID):
+        """Unbind the necessary events for the given command and ID"""
+        if self.events_bound.has_key(ID):
+            self.Unbind(wx.EVT_MENU, self.invoke_command, id=ID)
+            if command.IsDynamic():
+                self.Unbind(wx.EVT_UPDATE_UI, self.update_command_ui, id=ID)
+
     def build_menu_bar(self, menudesc):
         """Build and return the menu bar from the menu description"""
         menu_bar = wx.MenuBar()
@@ -266,6 +273,17 @@
             else:
                 print _("Unknown command %s") % name
 
+    def remove_menu_command(self, menu, name):
+        if name is None:
+            return
+        else:
+            command = registry.Command(name)
+            if command is not None:
+                assert isinstance(menu, wx.Menu)
+                ID = self.get_id(name)
+                menu.Remove(ID)
+                self.unbind_command_events(command, ID)
+
     def add_toolbar_command(self, toolbar, name):
         """Add the command with name name to the toolbar toolbar.
 
@@ -279,7 +297,10 @@
             command = registry.Command(name)
             if command is not None:
                 ID = self.get_id(name)
-                bitmap = resource.GetBitmapResource(command.Icon(),
+                if isinstance(command.Icon(), wx.Bitmap):
+                    bitmap = command.Icon()
+                else:
+                    bitmap = resource.GetBitmapResource(command.Icon(),
                                                     wx.BITMAP_TYPE_XPM)
                 toolbar.AddTool(ID, bitmap,
                                 shortHelpString = command.HelpText(),
@@ -288,6 +309,19 @@
             else:
                 print _("Unknown command %s") % name
 
+    def remove_toolbar_command(self, toolbar, name):
+        """Remove the command with name name from the toolbar
+        """
+        if name is None:
+            return
+        else:
+            command = registry.Command(name)
+            if command is not None:
+                ID = self.get_id(name)
+                assert isinstance(toolbar, wx.ToolBar)
+                toolbar.RemoveTool(ID)
+                self.unbind_command_events(command, ID)             
+                
     def Context(self):
         """Return the context object for a command invoked from this window
         """

Modified: packages/thuban/branches/upstream/current/Thuban/UI/projdialog.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/projdialog.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/projdialog.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -9,9 +9,9 @@
 
 """Projection dialog"""
 
-__version__ = "$Revision: 2816 $"
+__version__ = "$Revision: 2877 $"
 # $Source$
-# $Id: projdialog.py 2816 2008-01-26 22:21:53Z bernhard $
+# $Id: projdialog.py 2877 2009-05-18 15:14:01Z dpinte $
 
 import sys, os
 import wx
@@ -575,8 +575,11 @@
         # self.curProjPanel should always contain the most relevant data
         # for a projection
         if self.curProjPanel is not None:
+            # remove internal_from_wxstring call in profit of a str call
+            # Projection parameters must be str (otherwise swig does not treat them as is)
+            # this is kind of "works for me". I did not took time to investigate the real issue with internal_from_wxstring
             parameters = \
-                map(internal_from_wxstring,self.curProjPanel.GetParameters())
+                map(str,self.curProjPanel.GetParameters())
             if parameters is not None:
                 return Projection(parameters, self.projname.GetValue())
 

Modified: packages/thuban/branches/upstream/current/Thuban/UI/view.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/view.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/view.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -12,9 +12,9 @@
 
 from __future__ import generators
 
-__version__ = "$Revision: 2817 $"
+__version__ = "$Revision: 2870 $"
 # $Source$
-# $Id: view.py 2817 2008-01-27 00:01:32Z bernhard $
+# $Id: view.py 2870 2009-03-18 11:11:31Z dpinte $
 
 import os.path
 import time
@@ -122,6 +122,7 @@
         # subscribe the WX events we're interested in
         self.Bind(wx.EVT_PAINT, self.OnPaint)
         self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
+        self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDoubleClick)
         self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
         self.Bind(wx.EVT_MIDDLE_DOWN, self.OnMiddleDown)
         self.Bind(wx.EVT_MIDDLE_UP, self.OnMiddleUp)
@@ -131,7 +132,7 @@
         self.Bind(wx.EVT_IDLE, self.OnIdle)
 
     def __del__(self):
-        wx.Window.__del__(self)
+        #wx.Window.__del__(self)
         ViewPort.__del__(self)
 
     def PreviewBitmap(self):
@@ -401,6 +402,11 @@
                 self.dragging = 0
         self.MouseLeftUp(event)
 
+    def OnLeftDoubleClick(self, event):
+        """ Handle EVT_LEFT_DCLICK
+        """
+        self.MouseDoubleClick(event)
+
     def OnMotion(self, event):
         if self.dragging:
             self.tool.Hide(self.drag_dc)

Modified: packages/thuban/branches/upstream/current/Thuban/UI/viewport.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/UI/viewport.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/UI/viewport.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -11,9 +11,9 @@
 Classes for display of a map and interaction with it
 """
 
-__version__ = "$Revision: 2804 $"
+__version__ = "$Revision: 2870 $"
 # $Source$
-# $Id: viewport.py 2804 2008-01-09 00:34:37Z bernhard $
+# $Id: viewport.py 2870 2009-03-18 11:11:31Z dpinte $
 
 import sys
 from math import hypot
@@ -95,6 +95,9 @@
     def MouseUp(self, event):
         if self.dragging:
             self.drag_stop(event.m_x, event.m_y)
+    
+    def MouseDoubleClick(self, event):
+        pass
 
     def Cancel(self):
         self.dragging = 0
@@ -399,7 +402,7 @@
         if pheight:
             scales.append(wheight / pheight)
         if scales:
-            min_scale = 0.5 * min(scales)
+            min_scale = 0.1 * min(scales)
         else:
             min_scale = scale
 
@@ -431,6 +434,8 @@
             scale = min_scale
 
         self.scale = scale
+        if self.scale == 0:
+            raise Exception("Scale exception : %s %s") 
 
         # determine new offset to preserve the center
         self.offset = (wwidth/2 - scale * pcenterx,
@@ -642,6 +647,10 @@
         self.set_current_position(event)
         if self.tool is not None:
             self.tool.MouseMove(event)
+    
+    def MouseDoubleClick(self, event):
+        if self.tool is not None:
+            self.tool.MouseDoubleClick(event)
 
     def shape_selected(self, layer, shape):
         """Receiver for the SHAPES_SELECTED messages. Redraw the map."""

Modified: packages/thuban/branches/upstream/current/Thuban/__init__.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/__init__.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/__init__.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -8,6 +8,7 @@
 # Read the file COPYING coming with Thuban for details.
 
 import os
+import sys
 
 # Thuban Message Translation
 #
@@ -42,9 +43,9 @@
 
 # Thedirectory holding the translation files (actually they're in
 # language specific subdirectories of _message_dir)
-_message_dir = os.path.join(os.path.dirname(__file__), os.pardir, "Resources",
-                            "Locale")
 
+
+
 def _(s):
     """Return a localized version of the the string s
 
@@ -56,6 +57,9 @@
     """
     return _translation_function(s)
 
+from Lib.fileutil import get_thuban_dir;
+_message_dir = os.path.join(get_thuban_dir(), "Resources", "Locale")
+
 def gettext_identity(s):
     """Default gettext implementation which returns the string as is"""
     return s

Modified: packages/thuban/branches/upstream/current/Thuban/thuban_cfg.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/thuban_cfg.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/thuban_cfg.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -30,6 +30,16 @@
     print x
 
 try:
+    import Extensions.importMP
+except Exception, x:
+    print x
+
+try:
+    import Extensions.gMapTiles
+except Exception, x:
+    print x
+
+try:
     import Extensions.mouseposition
 except Exception, x:
     print x
@@ -52,9 +62,8 @@
 except Exception, x:
     print x
 
-# disabled for 1.2.1 release because PyOGCLib is buggy
-#try:
-#    import Extensions.wms
-#except Exception, x:
-#    print x
+try:
+    import Extensions.wms
+except Exception, x:
+    print x
 

Modified: packages/thuban/branches/upstream/current/Thuban/version.py
===================================================================
--- packages/thuban/branches/upstream/current/Thuban/version.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/Thuban/version.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -10,9 +10,9 @@
 Thuban version information
 """
 
-__version__ = "$Revision: 2821 $"
+__version__ = "$Revision: 2872 $"
 # $Source$
-# $Id: version.py 2821 2008-01-29 23:18:17Z bernhard $
+# $Id: version.py 2872 2009-03-30 10:03:02Z dpinte $
 
 
 # Note that this file defines the version number of Thuban for the about
@@ -41,7 +41,7 @@
 #
 
 thuban_branch = "1.2"
-thuban_release = "1"
+thuban_release = "svn"
 
 
 
@@ -115,21 +115,29 @@
 
 # PySQLite
 try:
-    from pysqlite2 import dbapi2 as sqlite
+    import sqlite3 as sqlite
 except ImportError:
-    import sqlite
+    try:
+        from pysqlite2 import dbapi2 as sqlite
+    except ImportError:
+        import sqlite
 versions['pysqlite'] = sqlite.version
 versions['pysqlite-tuple'] = make_tuple(sqlite.version)
 
 # SQLite
 try:
-    from pysqlite2._sqlite import sqlite_version
+    from sqlite3 import sqlite_version
     versions['sqlite'] = sqlite_version
     versions['sqlite-tuple'] = make_tuple(sqlite_version)
 except ImportError:
-    from _sqlite import sqlite_version
-    versions['sqlite'] = sqlite_version()
-    versions['sqlite-tuple'] = make_tuple(sqlite_version())
+    try:
+        from pysqlite2._sqlite import sqlite_version
+        versions['sqlite'] = sqlite_version
+        versions['sqlite-tuple'] = make_tuple(sqlite_version)
+    except ImportError:
+        from _sqlite import sqlite_version
+        versions['sqlite'] = sqlite_version()
+        versions['sqlite-tuple'] = make_tuple(sqlite_version())
 
 # GDAL
 from  Thuban.Model.resource import has_gdal_support

Modified: packages/thuban/branches/upstream/current/libraries/pyshapelib/shptreemodule.c
===================================================================
--- packages/thuban/branches/upstream/current/libraries/pyshapelib/shptreemodule.c	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/libraries/pyshapelib/shptreemodule.c	2009-05-26 20:36:51 UTC (rev 2247)
@@ -42,7 +42,7 @@
 shptree_dealloc(SHPTreeObject * self)
 {
     api->SHPDestroyTree(self->tree);
-    PyMem_DEL(self);
+    PyObject_Del(self);
 }
 
 /* Return the repr of the wrapper */

Modified: packages/thuban/branches/upstream/current/libraries/thuban/gdalwarp.cpp
===================================================================
--- packages/thuban/branches/upstream/current/libraries/thuban/gdalwarp.cpp	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/libraries/thuban/gdalwarp.cpp	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,5 +1,5 @@
 /******************************************************************************
- * $Id: gdalwarp.cpp 2712 2006-10-15 23:27:05Z bernhard $
+ * $Id: gdalwarp.cpp 2866 2008-11-18 09:49:59Z dpinte $
  *
  * Project:  High Performance Image Reprojector
  * Purpose:  Test program for high performance warper API.
@@ -160,7 +160,7 @@
 #define OPTS_ALPHA 2
 #define OPTS_INVERT_MASK_BITS 4
 
-CPL_CVSID("$Id: gdalwarp.cpp 2712 2006-10-15 23:27:05Z bernhard $");
+CPL_CVSID("$Id: gdalwarp.cpp 2866 2008-11-18 09:49:59Z dpinte $");
 
 static GDALDatasetH 
 GDALWarpCreateOutput( GDALDatasetH hSrcDS, const char *pszFilename, 
@@ -175,8 +175,14 @@
 static int             nForcePixels=0, nForceLines=0;
 static int             bEnableDstAlpha = FALSE, bEnableSrcAlpha = FALSE;
 static int             bMakeMask, bMakeAlpha, bInvertMask;
-const char             *pszSrcFilename = NULL, *pszDstFilename = "MEM:::";
+const char             *pszSrcFilename = NULL;
 
+#	if GDAL_VERSION_MINOR < 5
+const char			   *pszDstFilename = "MEM:::";
+# else
+const char			   *pszDstFilename = "IMG:::";
+# endif
+
 static PyMethodDef gdalwarp_methods[] = {
     { "ProjectRasterFile", ProjectRasterFile, METH_VARARGS },
     { "get_gdal_version", get_gdal_version, METH_VARARGS },

Added: packages/thuban/branches/upstream/current/packaging/debian/bitmappath.patch
===================================================================
--- packages/thuban/branches/upstream/current/packaging/debian/bitmappath.patch	                        (rev 0)
+++ packages/thuban/branches/upstream/current/packaging/debian/bitmappath.patch	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,35 @@
+diff -ur thuban.orig/usr/lib/thuban/Thuban/Model/resource.py thuban/usr/lib/thuban/Thuban/Model/resource.py
+--- thuban.orig/usr/lib/thuban/Thuban/Model/resource.py	2003-11-19 20:48:47.000000000 +0100
++++ thuban/usr/lib/thuban/Thuban/Model/resource.py	2003-12-03 15:36:41.000000000 +0100
+@@ -27,8 +27,14 @@
+ from Thuban.Model.proj import Projection, ProjFile
+ from xml.sax import SAXParseException
+ 
+-projdir = \
+-        os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Projections")
++# The directory where the default projections are stored has to be changed
++# for
++# the debian package to be conformant with the FHS
++#projdir = \
++#        os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Projections")
++projdir = "/usr/share/thuban/Resources/Projections"
++
++
+ 
+ 
+ PROJ_EXT = ".proj"
+diff -ur thuban.orig/usr/lib/thuban/Thuban/UI/resource.py thuban/usr/lib/thuban/Thuban/UI/resource.py
+--- thuban.orig/usr/lib/thuban/Thuban/UI/resource.py	2003-08-05 14:33:25.000000000 +0200
++++ thuban/usr/lib/thuban/Thuban/UI/resource.py	2003-12-03 15:35:51.000000000 +0100
+@@ -18,7 +18,10 @@
+ from wxPython.wx import wxBITMAP_TYPE_XPM, wxBITMAP_TYPE_ANY, wxBitmap, wxImage
+ 
+ 
+-bitmapdir = os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Bitmaps")
++# The directory where the toolbar icons are stored has to be changed for
++# the debian package to be conformant with the FHS
++#bitmapdir = os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Bitmaps")
++bitmapdir = "/usr/share/thuban/Resources/Bitmaps"
+ bitmap_extensions = {wxBITMAP_TYPE_XPM: ".xpm",
+                      wxBITMAP_TYPE_ANY: ""}
+ 

Added: packages/thuban/branches/upstream/current/packaging/debian/patches/locale.patch
===================================================================
--- packages/thuban/branches/upstream/current/packaging/debian/patches/locale.patch	                        (rev 0)
+++ packages/thuban/branches/upstream/current/packaging/debian/patches/locale.patch	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,17 @@
+--- Thuban/__init__.py.orig	2004-02-27 20:00:44.000000000 +0100
++++ Thuban/__init__.py	2004-02-27 20:00:47.000000000 +0100
+@@ -41,8 +41,12 @@
+ 
+ # Thedirectory holding the translation files (actually they're in
+ # language specific subdirectories of _message_dir)
+-_message_dir = os.path.join(os.path.dirname(__file__), os.pardir, "Resources",
+-                            "Locale")
++
++# The directory where the default projections are stored has to be changed
++# for the debian package to be conformant with the FHS
++#_message_dir = os.path.join(os.path.dirname(__file__), os.pardir, "Resources",
++#                            "Locale")
++_message_dir = "/usr/share/thuban/Resources/Locale"
+ 
+ def _(s):
+     """Return a localized version of the the string s

Added: packages/thuban/branches/upstream/current/packaging/debian/patches/setup.py.patch
===================================================================
--- packages/thuban/branches/upstream/current/packaging/debian/patches/setup.py.patch	                        (rev 0)
+++ packages/thuban/branches/upstream/current/packaging/debian/patches/setup.py.patch	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,20 @@
+--- setup.py.orig	2003-12-03 18:40:15.000000000 +0100
++++ setup.py	2003-12-03 15:33:20.000000000 +0100
+@@ -46,7 +46,7 @@
+     # Unix like system.
+    
+     # Directories where Proj4 is installed
+-    proj4_prefix = "/usr/local/"
++    proj4_prefix = "/usr/"
+     proj4_incdir =  os.path.join(proj4_prefix, "include")
+     proj4_libdir =  os.path.join(proj4_prefix, "lib")
+     proj4_lib = "proj"
+@@ -1132,7 +1132,7 @@
+                   # same directory.
+                   "install_lib": "$base/lib/thuban",
+                   "install_scripts": "$base/lib/thuban",
+-                  "install_data": "$base/lib/thuban",
++                  "install_data": "$prefix/share/thuban",
+ 
+                   # Don't print warning messages about the lib dir not
+                   # being on Python's path. The libraries are Thuban

Added: packages/thuban/branches/upstream/current/packaging/windows/Thuban-1.2.0_1.exe.readme.txt
===================================================================
--- packages/thuban/branches/upstream/current/packaging/windows/Thuban-1.2.0_1.exe.readme.txt	                        (rev 0)
+++ packages/thuban/branches/upstream/current/packaging/windows/Thuban-1.2.0_1.exe.readme.txt	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,20 @@
+Thuban 1.2.0 installation procedure :
+
+[1] check you have a working Python 2.4 environment
+
+[2] Dependencies :
+    - check you have wxPython 2.6.3 (
+      wxPython2.6-win32-unicode-2.6.3.3-py24.exeis available on sourceforge)
+      http://sourceforge.net/project/showfiles.php?group_id=10718&package_id=10559&release_id=432322
+
+    - check you have pysqlite 2.3 (pysqlite-2.3.3.win32-py2.4.exe)
+    http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/pysqlite-2.3.3.win32-py2.4.exe
+
+[3] If you want gdal to work, update your PATH so that it points to "c:\Program
+Files\Thuban\gdal\bin". To do this, go to system properties (right click on my
+computer, click settings). Click the “Advanced” tab and then at the bottom of
+that screen, click on “Environment Variables.”. Scroll down until you see PATH
+under the Variable column heading and. Click on it and then click the “Edit”
+button. Add ";c:\ProgramFiles\Thuban\gdal\bin" at the end of the line.
+
+[4] Launch Thuban and it should work fine

Deleted: packages/thuban/branches/upstream/current/po/thuban.pot
===================================================================
--- packages/thuban/branches/upstream/current/po/thuban.pot	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/po/thuban.pot	2009-05-26 20:36:51 UTC (rev 2247)
@@ -1,2540 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-02-02 22:03+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../Thuban/version.py:191
-#, python-format
-msgid "%s %s < %s"
-msgstr ""
-
-#: ../Thuban/version.py:197
-#, python-format
-msgid "Thuban was compiled with wx %(wxproj-wx)s but wxPython is %(wxPython)s"
-msgstr ""
-
-#: ../Thuban/Lib/connector.py:65
-#, python-format
-msgid "no receivers for channel %s of %s"
-msgstr ""
-
-#: ../Thuban/Lib/connector.py:70
-#, python-format
-msgid "receiver %s%s is not connected to channel %s of %s"
-msgstr ""
-
-#: ../Thuban/Lib/connector.py:94
-#, python-format
-msgid "Warning: %s.%s: %s%s\n"
-msgstr ""
-
-#: ../Thuban/Lib/connector.py:118
-#, python-format
-msgid "\tmethod %s of %s"
-msgstr ""
-
-#: ../Thuban/Lib/fileutil.py:87 ../Thuban/Lib/fileutil.py:141
-msgid "first argument must be an absolute filename"
-msgstr ""
-
-#: ../Thuban/Lib/fileutil.py:138
-msgid "Both parameters must have a drive letter"
-msgstr ""
-
-#: ../Thuban/Lib/fileutil.py:198
-msgid "No implementation of get_application_dir available for platform"
-msgstr ""
-
-#: ../Thuban/Lib/fileutil.py:208
-msgid "No implementation of relative_filename available for platform"
-msgstr ""
-
-#: ../Thuban/Model/classgen.py:338
-msgid "invalid index"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:309 ../Thuban/UI/classifier.py:759
-msgid "None"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:325
-msgid "Line Color"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:327
-#, python-format
-msgid "Line Width: %s"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:333
-#, python-format
-msgid "Size: %s"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:336
-msgid "Fill"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:342 ../Thuban/UI/classifier.py:842
-msgid "Classification"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:436
-msgid "lineWidth < 1"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:451
-msgid "size < 1"
-msgstr ""
-
-#: ../Thuban/Model/classification.py:656 ../Thuban/UI/classifier.py:529
-msgid "DEFAULT"
-msgstr ""
-
-#: ../Thuban/Model/data.py:316
-msgid "Table not compatible with shapestore."
-msgstr ""
-
-#: ../Thuban/Model/extension.py:90 ../Extensions/importAPR/importAPR.py:37
-#: ../Extensions/wms/wms.py:42
-#, python-format
-msgid "Extension: %s"
-msgstr ""
-
-#: ../Thuban/Model/label.py:91
-#, python-format
-msgid "Number of labels: %d"
-msgstr ""
-
-#: ../Thuban/Model/label.py:92
-#, python-format
-msgid "Label Layer: %s"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:298 ../Thuban/Model/layer.py:566
-#: ../Thuban/Model/session.py:432
-#, python-format
-msgid "Filename: %s"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:301 ../Thuban/Model/layer.py:569
-msgid "Shown"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:303 ../Thuban/Model/layer.py:571
-msgid "Hidden"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:304
-#, python-format
-msgid "Shapes: %d"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:308 ../Thuban/Model/layer.py:575
-#: ../Thuban/Model/map.py:287 ../Thuban/UI/rasterlayerproperties.py:52
-#, python-format
-msgid "Extent (lat-lon): (%g, %g, %g, %g)"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:310 ../Thuban/Model/layer.py:577
-msgid "Extent (lat-lon):"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:311
-#, python-format
-msgid "Shapetype: %s"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:314 ../Thuban/Model/layer.py:580
-#: ../Thuban/Model/map.py:292
-msgid "Projection"
-msgstr ""
-
-#: ../Thuban/Model/layer.py:319 ../Thuban/Model/layer.py:583
-#, python-format
-msgid "Layer '%s'"
-msgstr ""
-
-#: ../Thuban/Model/load.py:78
-#, python-format
-msgid "Invalid hexadecimal color specification %s"
-msgstr ""
-
-#: ../Thuban/Model/load.py:81
-#, python-format
-msgid "Invalid color specification %s"
-msgstr ""
-
-#: ../Thuban/Model/load.py:545
-msgid "xml field type differs from database!"
-msgstr ""
-
-#: ../Thuban/Model/load.py:610
-msgid "Classification range is not a number!"
-msgstr ""
-
-#: ../Thuban/Model/map.py:53
-msgid "Labels"
-msgstr ""
-
-#: ../Thuban/Model/map.py:290
-#, python-format
-msgid "Extent (projected): (%g, %g, %g, %g)"
-msgstr ""
-
-#: ../Thuban/Model/map.py:301
-#, python-format
-msgid "Map: %s"
-msgstr ""
-
-#: ../Thuban/Model/proj.py:82 ../Thuban/Model/resource.py:179
-msgid "Unknown"
-msgstr ""
-
-#: ../Thuban/Model/resource.py:46
-#, python-format
-msgid ""
-"No GDAL support because module '%s' cannot be imported. Python exception: '%"
-"s'"
-msgstr ""
-
-#: ../Thuban/Model/resource.py:135 ../Thuban/Model/resource.py:155
-#, python-format
-msgid "Could not read \"%s\": %s"
-msgstr ""
-
-#: ../Thuban/Model/resource.py:187
-#, python-format
-msgid "Error in projection \"%s\": %s"
-msgstr ""
-
-#: ../Thuban/Model/save.py:347
-msgid "Unsupported group type in classification"
-msgstr ""
-
-#: ../Thuban/Model/session.py:430
-msgid "Filename:"
-msgstr ""
-
-#: ../Thuban/Model/session.py:435
-msgid "Modified"
-msgstr ""
-
-#: ../Thuban/Model/session.py:437
-msgid "Unmodified"
-msgstr ""
-
-#: ../Thuban/Model/session.py:442
-#, python-format
-msgid "Session: %s"
-msgstr ""
-
-#: ../Thuban/Model/session.py:448
-msgid "unnamed session"
-msgstr ""
-
-#: ../Thuban/Model/session.py:450
-msgid "unnamed map"
-msgstr ""
-
-#: ../Thuban/UI/about.py:28
-msgid "About Thuban"
-msgstr ""
-
-#: ../Thuban/UI/about.py:47
-msgid "French"
-msgstr ""
-
-#: ../Thuban/UI/about.py:48
-msgid "German"
-msgstr ""
-
-#: ../Thuban/UI/about.py:51
-msgid "Hungarian"
-msgstr ""
-
-#: ../Thuban/UI/about.py:52
-msgid "Italian"
-msgstr ""
-
-#: ../Thuban/UI/about.py:53
-msgid "Portuguese (Brazilian)"
-msgstr ""
-
-#: ../Thuban/UI/about.py:54
-msgid "Russian"
-msgstr ""
-
-#: ../Thuban/UI/about.py:55
-msgid "Spanish"
-msgstr ""
-
-#: ../Thuban/UI/about.py:56
-msgid "Czech"
-msgstr ""
-
-#: ../Thuban/UI/about.py:65 ../Thuban/UI/about.py:67 ../Thuban/UI/about.py:69
-msgid "- not available"
-msgstr ""
-
-#: ../Thuban/UI/about.py:74
-msgid "Currently using:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:80
-#, python-format
-msgid "\tInternal encoding: %s\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:86
-msgid "Compiled for:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:92
-msgid "Extensions:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:97 ../Thuban/UI/about.py:146
-msgid "\tNone registered.\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:100
-msgid "Maintainers:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:105
-msgid "Lead Developer:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:108
-msgid "Developers:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:113
-msgid "Translators:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:118
-msgid "Other Contributors:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:124
-msgid ""
-"Questions and comments can be sent to the following addresses:\n"
-"\tGeneral list (public):\n"
-"\t\t<thuban-list at intevation.de>\n"
-"\tDevelopers list (public):\n"
-"\t\t<thuban-devel at intevation.de>\n"
-"\tThuban team at Intevation:\n"
-"\t\t<thuban at intevation.de>\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:132
-msgid ""
-"Details on the registered extensions:\n"
-"\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:137
-#, python-format
-msgid "Copyright %s\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:138
-msgid "Authors:\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:151
-msgid ""
-"Thuban is a program for exploring geographic data.\n"
-"\n"
-msgstr ""
-
-#: ../Thuban/UI/about.py:153
-msgid "Thuban is licensed under the GNU GPL v>=2"
-msgstr ""
-
-#: ../Thuban/UI/about.py:162 ../Thuban/UI/classgen.py:92
-#: ../Thuban/UI/dbdialog.py:277 ../Thuban/UI/dock.py:371
-#: ../Thuban/UI/join.py:66 ../Thuban/UI/layerproperties.py:82
-#: ../Thuban/UI/projdialog.py:210 ../Thuban/UI/tableview.py:389
-#: ../Extensions/wms/infodialog.py:77 ../Extensions/wms/wms.py:87
-msgid "Close"
-msgstr ""
-
-#: ../Thuban/UI/altpathdialog.py:25
-#, python-format
-msgid "Select an alternative data file for %s"
-msgstr ""
-
-#: ../Thuban/UI/altpathdialog.py:32 ../Thuban/UI/mainwindow.py:566
-#: ../Extensions/ogr/ogrstart.py:38
-msgid "Shapefiles (*.shp)"
-msgstr ""
-
-#: ../Thuban/UI/altpathdialog.py:33 ../Thuban/UI/mainwindow.py:567
-#: ../Thuban/UI/mainwindow.py:856 ../Extensions/ogr/ogrstart.py:43
-msgid "All Files (*.*)"
-msgstr ""
-
-#: ../Thuban/UI/altpathdialog.py:48
-#, python-format
-msgid ""
-"Found the following as an alternative for '%s':\n"
-"%s\n"
-"\n"
-"Please confirm with Yes or select alternative with No."
-msgstr ""
-
-#: ../Thuban/UI/altpathdialog.py:50
-msgid "Alternative Path"
-msgstr ""
-
-#: ../Thuban/UI/application.py:105
-msgid "Cannot import the thuban_cfg module."
-msgstr ""
-
-#: ../Thuban/UI/application.py:107
-msgid "Trying to read ~/.thuban/thubanstart.py."
-msgstr ""
-
-#: ../Thuban/UI/application.py:119 ../Thuban/UI/application.py:131
-msgid "Cannot import the thubanstart module\n"
-msgstr ""
-
-#: ../Thuban/UI/application.py:124
-msgid "No thubanstart module available\n"
-msgstr ""
-
-#: ../Thuban/UI/application.py:135
-msgid "No ~/.thuban directory\n"
-msgstr ""
-
-#: ../Thuban/UI/application.py:175
-msgid ""
-"This is the wxPython-based Graphical User Interface for exploring geographic "
-"data"
-msgstr ""
-
-#: ../Thuban/UI/application.py:263
-msgid ""
-"The current session contains Image layers,\n"
-"but the GDAL library is not available to draw them."
-msgstr ""
-
-#: ../Thuban/UI/application.py:268
-msgid "Library not available"
-msgstr ""
-
-#: ../Thuban/UI/application.py:277 ../Thuban/UI/mainwindow.py:479
-msgid "DB Connection Parameters"
-msgstr ""
-
-#: ../Thuban/UI/application.py:373
-#, python-format
-msgid ""
-"An unhandled exception occurred:\n"
-"%s\n"
-"(please report to http://thuban.intevation.org/bugtracker.html)\n"
-"\n"
-"%s"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:44
-msgid "Uniform Distribution"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:45
-msgid "Unique Values"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:46
-msgid "Quantiles from Table"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:48
-msgid "Custom Ramp"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:49
-msgid "Grey Ramp"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:50
-msgid "Red Ramp"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:51
-msgid "Green Ramp"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:52
-msgid "Blue Ramp"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:53
-msgid "Green-to-Red Ramp"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:54
-msgid "Hot-to-Cold Ramp"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:70
-msgid "Generate Classification"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:91
-msgid "Generate"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:120
-#, python-format
-msgid "Field: %s"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:124 ../Thuban/UI/classifier.py:977
-#, python-format
-msgid "Data Type: %s"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:128
-msgid "Generate:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:138
-msgid "Color Scheme:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:162
-msgid "Fix Border Color"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:169 ../Thuban/UI/classgen.py:936
-#: ../Thuban/UI/classgen.py:967
-msgid "Change"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:274
-msgid ""
-"Based on the data from the table and the input\n"
-"values, the exact quantiles could not be generated.\n"
-"\n"
-"Accept a close estimate?"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:277
-msgid "Problem with Quantiles"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:369
-msgid "Min:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:374
-msgid "Max:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:379 ../Thuban/UI/classgen.py:632
-msgid "Retrieve From Table"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:389
-msgid "Number of Groups:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:396
-msgid "Stepping:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:646
-msgid "Available"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:651 ../Thuban/UI/classgen.py:691
-msgid "Sort"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:654 ../Thuban/UI/classgen.py:694
-msgid "Reverse"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:686
-msgid "Use"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:832
-msgid "Retrieve from Table"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:840
-msgid "Apply to Range"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:847
-msgid "Number of Classes:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:930
-msgid "Start:"
-msgstr ""
-
-#: ../Thuban/UI/classgen.py:961
-msgid "End:"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:165
-msgid "The Default group cannot be removed."
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:273 ../Thuban/UI/classifier.py:310
-#: ../Thuban/UI/classifier.py:468
-msgid "Pattern"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:273 ../Thuban/UI/classifier.py:307
-#: ../Thuban/UI/classifier.py:467
-msgid "Singleton"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:318
-msgid "Visible"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:318
-msgid "Symbol"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:318 ../Thuban/UI/controls.py:33
-#: ../Thuban/UI/controls.py:177
-msgid "Value"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:318
-msgid "Label"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:463 ../Thuban/UI/classifier.py:466
-msgid "Default"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:469
-msgid "Range"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:470
-#: ../Extensions/umn_mapserver/mf_handle.py:1362
-msgid "Map"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:760
-msgid "Text"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:761
-msgid "Integer"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:762
-msgid "Decimal"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:821
-msgid "Generate Class"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:823 ../Thuban/UI/dbdialog.py:275
-msgid "Add"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:825
-msgid "Move Up"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:827
-msgid "Move Down"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:829
-msgid "Edit Symbol"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:831 ../Thuban/UI/dbdialog.py:276
-#: ../Thuban/UI/projdialog.py:118
-msgid "Remove"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:846
-msgid "Field: "
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1001 ../Thuban/UI/layerproperties.py:160
-msgid "Layer Properties"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1168
-msgid "Select Properties"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1179
-msgid "Preview:"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1196
-msgid "Change Line Color"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1202 ../Thuban/UI/classifier.py:1217
-msgid "Transparent"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1213
-msgid "Change Fill Color"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1226
-msgid "Line Width: "
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1243
-msgid "Size: "
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1263 ../Thuban/UI/colordialog.py:52
-#: ../Thuban/UI/dbdialog.py:108 ../Thuban/UI/dbdialog.py:222
-#: ../Thuban/UI/labeldialog.py:41 ../Thuban/UI/layerproperties.py:81
-#: ../Thuban/UI/projdialog.py:206 ../Extensions/bboxdump/bboxdump.py:71
-#: ../Extensions/ogr/ogrdialog.py:68 ../Extensions/ogr/ogrdialog.py:150
-#: ../Extensions/ogr/ogrdialog.py:262 ../Extensions/ogr/ogrdialog.py:368
-#: ../Extensions/umn_mapserver/mf_handle.py:162
-#: ../Extensions/umn_mapserver/mf_handle.py:278
-#: ../Extensions/umn_mapserver/mf_handle.py:368
-#: ../Extensions/umn_mapserver/mf_handle.py:525
-#: ../Extensions/umn_mapserver/mf_handle.py:749
-#: ../Extensions/umn_mapserver/mf_handle.py:977
-#: ../Extensions/umn_mapserver/mf_handle.py:1219
-#: ../Extensions/wms/properties.py:152 ../Extensions/wms/wms.py:85
-msgid "OK"
-msgstr ""
-
-#: ../Thuban/UI/classifier.py:1265 ../Thuban/UI/colordialog.py:53
-#: ../Thuban/UI/dbdialog.py:111 ../Thuban/UI/dbdialog.py:224
-#: ../Thuban/UI/labeldialog.py:42 ../Thuban/UI/projdialog.py:1036
-#: ../Extensions/bboxdump/bboxdump.py:76 ../Extensions/ogr/ogrdialog.py:71
-#: ../Extensions/ogr/ogrdialog.py:153 ../Extensions/ogr/ogrdialog.py:265
-#: ../Extensions/ogr/ogrdialog.py:371
-#: ../Extensions/umn_mapserver/mf_handle.py:164
-#: ../Extensions/umn_mapserver/mf_handle.py:280
-#: ../Extensions/umn_mapserver/mf_handle.py:370
-#: ../Extensions/umn_mapserver/mf_handle.py:527
-#: ../Extensions/umn_mapserver/mf_handle.py:751
-#: ../Extensions/umn_mapserver/mf_handle.py:979
-#: ../Extensions/umn_mapserver/mf_handle.py:1221
-#: ../Extensions/wms/properties.py:153
-msgid "Cancel"
-msgstr ""
-
-#: ../Thuban/UI/colordialog.py:39
-msgid "Select Color"
-msgstr ""
-
-#: ../Thuban/UI/controls.py:31
-msgid "Field"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:42 ../Extensions/ogr/ogrdialog.py:202
-msgid "Choose layer from database"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:60 ../Extensions/ogr/ogrdialog.py:220
-msgid "Databases"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:75 ../Extensions/ogr/ogrdialog.py:235
-msgid "Retrieve"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:83 ../Extensions/ogr/ogrdialog.py:243
-msgid "Tables"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:93 ../Extensions/ogr/ogrdialog.py:253
-msgid "ID Column"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:99
-msgid "Geometry Column"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:188
-msgid "Hostname:"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:192
-msgid "Port:"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:199
-msgid "Database Name:"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:207
-msgid "User:"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:212
-msgid "Password:"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:287
-msgid "Database Management"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:362 ../Thuban/UI/dbdialog.py:367
-msgid "Add Database"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:368
-#, python-format
-msgid "Connection '%s' already exists"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:389
-msgid "Remove Database Connection"
-msgstr ""
-
-#: ../Thuban/UI/dbdialog.py:390
-#, python-format
-msgid ""
-"The connection %s\n"
-"is still in use"
-msgstr ""
-
-#: ../Thuban/UI/dock.py:190
-msgid "Undock"
-msgstr ""
-
-#: ../Thuban/UI/dock.py:218
-msgid "Dock"
-msgstr ""
-
-#: ../Thuban/UI/exceptiondialog.py:23 ../Thuban/UI/exceptiondialog.py:61
-msgid "Thuban: Internal Error"
-msgstr ""
-
-#: ../Thuban/UI/exceptiondialog.py:43
-msgid "Proceed"
-msgstr ""
-
-#: ../Thuban/UI/exceptiondialog.py:44
-msgid "Exit Thuban now"
-msgstr ""
-
-#: ../Thuban/UI/extensionregistry.py:72
-msgid "Initialization not yet requested."
-msgstr ""
-
-#: ../Thuban/UI/extensionregistry.py:88
-msgid "Initialization successful."
-msgstr ""
-
-#: ../Thuban/UI/identifyview.py:44
-msgid "Identify Shape"
-msgstr ""
-
-#: ../Thuban/UI/identifyview.py:56
-msgid "Close Window"
-msgstr ""
-
-#: ../Thuban/UI/identifyview.py:57
-msgid "Stop Identify Mode"
-msgstr ""
-
-#: ../Thuban/UI/join.py:64
-msgid "Join"
-msgstr ""
-
-#: ../Thuban/UI/join.py:71 ../Thuban/UI/join.py:72
-#: ../Extensions/bboxdump/bboxdump.py:60 ../Extensions/bboxdump/bboxdump.py:65
-msgid "Select..."
-msgstr ""
-
-#: ../Thuban/UI/join.py:100 ../Thuban/UI/join.py:108
-msgid "Table:"
-msgstr ""
-
-#: ../Thuban/UI/join.py:111 ../Thuban/UI/join.py:114
-msgid "Field:"
-msgstr ""
-
-#: ../Thuban/UI/join.py:125
-msgid "Outer Join (preserves left table records)"
-msgstr ""
-
-#: ../Thuban/UI/join.py:173
-#, python-format
-msgid ""
-"Join failed:\n"
-"  %s"
-msgstr ""
-
-#: ../Thuban/UI/join.py:174
-msgid "Info"
-msgstr ""
-
-#: ../Thuban/UI/join.py:195
-#, python-format
-msgid ""
-"The joined table has %(joined)d rows but it must have %(needed)d rows to be "
-"used with the selected layer"
-msgstr ""
-
-#: ../Thuban/UI/join.py:200
-msgid "Join Failed"
-msgstr ""
-
-#: ../Thuban/UI/join.py:209 ../Thuban/UI/mainwindow.py:919
-#, python-format
-msgid "Table: %s"
-msgstr ""
-
-#: ../Thuban/UI/labeldialog.py:26
-msgid "Label Values"
-msgstr ""
-
-#: ../Thuban/UI/layerproperties.py:54
-msgid "Title: "
-msgstr ""
-
-#: ../Thuban/UI/layerproperties.py:65
-#, python-format
-msgid "Layer Type: %s"
-msgstr ""
-
-#: ../Thuban/UI/layerproperties.py:71
-msgid "Projection: None"
-msgstr ""
-
-#: ../Thuban/UI/layerproperties.py:73
-#, python-format
-msgid "Projection: %s"
-msgstr ""
-
-#: ../Thuban/UI/layerproperties.py:79 ../Thuban/UI/projdialog.py:200
-msgid "Try"
-msgstr ""
-
-#: ../Thuban/UI/layerproperties.py:80 ../Thuban/UI/projdialog.py:203
-msgid "Revert"
-msgstr ""
-
-#: ../Thuban/UI/legend.py:75
-msgid "Top Layer"
-msgstr ""
-
-#: ../Thuban/UI/legend.py:79
-msgid "Raise Layer"
-msgstr ""
-
-#: ../Thuban/UI/legend.py:83
-msgid "Lower Layer"
-msgstr ""
-
-#: ../Thuban/UI/legend.py:87
-msgid "Bottom Layer"
-msgstr ""
-
-#: ../Thuban/UI/legend.py:91
-msgid "Show Layer"
-msgstr ""
-
-#: ../Thuban/UI/legend.py:95
-msgid "Hide Layer"
-msgstr ""
-
-#: ../Thuban/UI/legend.py:99
-msgid "Edit Layer Properties"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:267 ../Thuban/UI/mainwindow.py:289
-#, python-format
-msgid "Unknown command %s"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:302
-#, python-format
-msgid "Unknown command ID %d"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:341
-#, python-format
-msgid "The Dialog named %s is already open"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:399
-#, python-format
-msgid "Select layer '%s' and pick a projection using Layer/Projection..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:452
-msgid "Exit"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:453
-msgid "The session has been modified. Do you want to save it?"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:468
-msgid "Open Session"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:490
-msgid "Save Session As"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:564
-msgid "Select one or more data files"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:579 ../Extensions/importAPR/importAPR.py:230
-#: ../Extensions/ogr/ogrstart.py:63
-msgid "Add Layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:580 ../Thuban/UI/mainwindow.py:606
-#: ../Thuban/UI/mainwindow.py:866 ../Extensions/gns2shp/gns2shp.py:156
-#: ../Extensions/importAPR/importAPR.py:231 ../Extensions/ogr/ogrstart.py:64
-#: ../Extensions/umn_mapserver/mf_import.py:274
-#: ../Extensions/umn_mapserver/mf_import.py:353
-#, python-format
-msgid "Can't open the file '%s'."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:592
-msgid "Select an image file"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:605
-msgid "Add Image Layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:634 ../Extensions/ogr/ogrstart.py:114
-msgid "Add Layer from database"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:635 ../Extensions/ogr/ogrstart.py:115
-#, python-format
-msgid "Can't open the database table '%s'"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:724
-#, python-format
-msgid "Copy of `%s'"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:754
-#, python-format
-msgid "Layer Table: %s"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:769
-#, python-format
-msgid "Map Projection: %s"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:783
-#, python-format
-msgid "Layer Projection: %s"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:816
-msgid "Join Layer with Table"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:838 ../Thuban/UI/mainwindow.py:1169
-#: ../Extensions/umn_mapserver/mf_handle.py:1386
-msgid "Legend"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:852 ../Thuban/UI/mainwindow.py:865
-msgid "Open Table"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:854
-msgid "DBF Files (*.dbf)"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:877
-msgid "Pick the tables to close:"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:878
-msgid "Close Table"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:898
-msgid "Pick the table to show:"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:899
-msgid "Show Table"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:910
-msgid "Join Tables"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:933
-msgid "Pick the table to rename:"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:934 ../Thuban/UI/mainwindow.py:946
-msgid "Rename Table"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:946
-msgid "Table Title:"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:995
-msgid "Map Title:"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:995
-msgid "Rename Map"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1008
-msgid "Layer Title:"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1008
-msgid "Rename Layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1061
-#, python-format
-msgid "Thuban - %s"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1063
-msgid "Thuban"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1158
-msgid "&New Session"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1159
-msgid "Start a new session"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1160
-msgid "&Open Session..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1161
-msgid "Open a session file"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1162
-msgid "&Save Session"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1163
-msgid "Save this session to the file it was opened from"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1164
-msgid "Save Session &As..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1165
-msgid "Save this session to a new file"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1166
-msgid "Session &Tree"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1168
-msgid "Toggle on/off the session tree analysis window"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1171
-msgid "Toggle Legend on/off"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1172
-msgid "&Database Connections..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1175
-msgid "E&xit"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1176
-msgid "Finish working with Thuban"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1179
-msgid "&About..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1180
-msgid "Info about Thuban authors, version and modules"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1184 ../Thuban/UI/mainwindow.py:1232
-msgid "Pro&jection..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1185
-msgid "Set or change the map projection"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1187
-msgid "&Zoom in"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1188
-msgid "Switch to map-mode 'zoom-in'"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1190
-msgid "Zoom &out"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1191
-msgid "Switch to map-mode 'zoom-out'"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1193
-msgid "&Pan"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1194
-msgid "Switch to map-mode 'pan'"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1196
-msgid "&Identify"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1198
-msgid "Switch to map-mode 'identify'"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1200
-msgid "&Label"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1201
-msgid "Add/Remove labels"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1203
-msgid "&Full extent"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1204
-msgid "Zoom to the full map extent"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1206
-msgid "&Full layer extent"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1207
-msgid "Zoom to the full layer extent"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1209
-msgid "&Full selection extent"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1211
-msgid "Zoom to the full selection extent"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1213
-msgid "E&xport"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1214
-msgid "Export the map to file"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1215
-msgid "Prin&t"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1216
-msgid "Print the map"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1217 ../Thuban/UI/mainwindow.py:1303
-msgid "&Rename..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1218
-msgid "Rename the map"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1219
-msgid "&Add Layer..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1220
-msgid "Add a new layer to the map"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1221
-msgid "&Add Image Layer..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1222
-msgid "Add a new image layer to the map"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1224
-msgid "Add &Database Layer..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1225
-msgid "Add a new database layer to active map"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1227
-msgid "&Remove Layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1228
-msgid "Remove selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1234
-msgid "Specify projection for selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1235
-msgid "&Duplicate"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1236
-msgid "Duplicate selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1238
-msgid "Re&name ..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1239
-msgid "Rename selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1241
-msgid "&Raise"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1242
-msgid "Raise selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1244
-msgid "&Lower"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1245
-msgid "Lower selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1247
-msgid "&Show"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1248
-msgid "Make selected layer visible"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1250
-msgid "&Hide"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1251
-msgid "Make selected layer unvisible"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1253
-msgid "Show Ta&ble"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1254
-msgid "Show the selected layer's table"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1256
-msgid "&Properties..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1258
-msgid "Edit the properties of the selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1259
-msgid "&Join Table..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1261
-msgid "Join and attach a table to the selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1264
-msgid "&Top"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1265
-msgid "Put selected layer to the top"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1267
-msgid "&Bottom"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1268
-msgid "Put selected layer to the bottom"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1270
-msgid "&Visible"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1272
-msgid "Toggle visibility of selected layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1289
-msgid "&Unjoin Table..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1291
-msgid "Undo the last join operation"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1298
-msgid "&Open..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1299
-msgid "Open a DBF-table from a file"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1300
-msgid "&Close..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1302
-msgid "Close one or more tables from a list"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1305
-msgid "Rename one or more tables"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1306
-msgid "&Show..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1308
-msgid "Show one or more tables in a dialog"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1309
-msgid "&Join..."
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1311
-msgid "Join two tables creating a new one"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1335
-msgid "&File"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1341
-msgid "&Map"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1342
-msgid "&Layer"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1356
-msgid "&Table"
-msgstr ""
-
-#: ../Thuban/UI/mainwindow.py:1362
-msgid "&Help"
-msgstr ""
-
-#: ../Thuban/UI/menu.py:90
-#, python-format
-msgid "Submenu %s doesn't exist"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:63 ../Thuban/UI/projdialog.py:779
-msgid "Transverse Mercator"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:64 ../Thuban/UI/projdialog.py:845
-msgid "Universal Transverse Mercator"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:65 ../Thuban/UI/projdialog.py:921
-msgid "Lambert Conic Conformal"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:66 ../Thuban/UI/projdialog.py:67
-#: ../Thuban/UI/projdialog.py:971
-msgid "Geographic"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:111
-msgid "Import..."
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:114
-msgid "Export..."
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:123
-msgid "Show EPSG:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:125
-msgid "Normal"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:128
-msgid "Deprecated"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:139
-msgid "Edit"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:149
-msgid "Name:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:157
-msgid "Projection:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:168 ../Thuban/UI/projdialog.py:651
-msgid "<Unknown>"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:184
-msgid "New"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:187
-msgid "Add to List"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:191
-msgid "Update"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:296
-#, python-format
-msgid ""
-"Warnings when reading \"%s\":\n"
-"\n"
-"%s"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:307
-msgid "Import"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:320 ../Thuban/UI/projdialog.py:620
-msgid "Warnings"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:338 ../Thuban/UI/tableview.py:387
-msgid "Export"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:391
-msgid "The following error occured:\n"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:393
-msgid "Error"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:462
-msgid "No Projections selected"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:472
-#, python-format
-msgid "Source of Projection: %s"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:504
-msgid "Multiple Projections selected"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:652
-msgid "Airy"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:653
-msgid "Bessel 1841"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:654
-msgid "Clarke 1866"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:655
-msgid "Clarke 1880"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:656
-msgid "GRS 1980 (IUGG, 1980)"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:657
-msgid "International 1909 (Hayford)"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:658
-msgid "WGS 84"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:670
-msgid "Ellipsoid:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:719
-msgid ""
-"Thuban does not know the parameters\n"
-"for the current projection and cannot\n"
-"display a configuration panel.\n"
-"\n"
-"The unidentified set of parameters is:\n"
-"\n"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:765
-msgid "Latitude:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:767
-msgid "Longitude:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:769 ../Thuban/UI/projdialog.py:913
-msgid "False Easting:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:771 ../Thuban/UI/projdialog.py:915
-msgid "False Northing:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:773
-msgid "Scale Factor:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:824
-msgid "Propose"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:826
-msgid "Southern Hemisphere"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:836
-msgid "Zone:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:873
-msgid "Can not propose: No bounding box found."
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:874 ../Thuban/UI/projdialog.py:1011
-msgid "Projection: Propose UTM Zone"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:904
-msgid "Latitude of first standard parallel:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:907
-msgid "Latitude of second standard parallel:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:909
-msgid "Central Meridian:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:911
-msgid "Latitude of origin:"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:961
-msgid "Degrees"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:962
-msgid "Radians"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:995
-msgid "Source Data is in: "
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:1024
-msgid "The current map extent center lies in UTM Zone"
-msgstr ""
-
-#: ../Thuban/UI/projdialog.py:1034
-msgid "Take"
-msgstr ""
-
-#: ../Thuban/UI/projlist.py:51
-msgid "Available Projections"
-msgstr ""
-
-#: ../Thuban/UI/projlist.py:112
-msgid "<None>"
-msgstr ""
-
-#: ../Thuban/UI/projlist.py:117
-#, python-format
-msgid "%s (current)"
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:42
-msgid "GDAL image information unavailable. See About box for details."
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:50
-msgid "Extent (lat-lon): None"
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:57
-msgid "Image Properties"
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:62
-#, python-format
-msgid "Source: %s"
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:72
-#, python-format
-msgid "Driver: %s"
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:75
-#, python-format
-msgid "Size: %ix%i"
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:78
-#, python-format
-msgid "Number of Bands: %i"
-msgstr ""
-
-#: ../Thuban/UI/rasterlayerproperties.py:94
-msgid "Opacity:"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:382
-msgid "Replace Selection"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:383
-msgid "Refine Selection"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:384
-msgid "Add to Selection"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:386
-msgid "Query"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:388
-msgid "Export Selection"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:414
-msgid "Selection"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:456
-#, python-format
-msgid "%i rows (%i selected), %i columns"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:536
-msgid "Export Table To"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:537
-msgid "DBF Files (*.dbf)|*.dbf|"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:538 ../Extensions/bboxdump/bboxdump.py:140
-msgid "CSV Files (*.csv)|*.csv|"
-msgstr ""
-
-#: ../Thuban/UI/tableview.py:539 ../Extensions/bboxdump/bboxdump.py:141
-#: ../Extensions/gns2shp/gns2shp.py:130
-#: ../Extensions/importAPR/importAPR.py:172
-#: ../Extensions/umn_mapserver/mf_import.py:535
-#: ../Extensions/umn_mapserver/mf_import.py:569
-#: ../Extensions/umn_mapserver/mf_import.py:635
-msgid "All Files (*.*)|*.*"
-msgstr ""
-
-#: ../Thuban/UI/tree.py:226
-msgid "Session"
-msgstr ""
-
-#: ../Thuban/UI/view.py:286
-msgid "Export Map"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:84
-msgid "File:"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:91
-msgid "Group by:"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:129
-#, python-format
-msgid "Bounding Box Dump %s"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:137
-msgid "Dump Bounding Boxes To"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:162
-#: ../Extensions/bboxdump/bboxdump.py:195
-#: ../Extensions/bboxdump/bboxdump.py:230
-msgid "Bounding Box Dump"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:163
-msgid "Collecting shapes ..."
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:196
-msgid "Dump bounding boxes of selected shapes ..."
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:238
-msgid "BBox Dump"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:239
-msgid "Dump Bounding Boxes of Layer Objects"
-msgstr ""
-
-#: ../Extensions/bboxdump/bboxdump.py:243
-#: ../Extensions/export_shapefile/export_shapefile.py:97
-#: ../Extensions/gns2shp/gns2shp.py:183
-#: ../Extensions/importAPR/importAPR.py:336
-#: ../Extensions/mouseposition/mouseposition.py:116
-#: ../Extensions/ogr/ogrstart.py:203 ../Extensions/svgexport/maplegend.py:178
-#: ../Extensions/svgexport/svgsaver.py:104
-msgid "E&xtensions"
-msgstr ""
-
-#: ../Extensions/bboxdump/__init__.py:21
-msgid ""
-"Dumps the bounding boxes of all\n"
-"shapes of the selected layer."
-msgstr ""
-
-#: ../Extensions/export_shapefile/export_shapefile.py:39
-#: ../Extensions/export_shapefile/export_shapefile.py:45
-#: ../Extensions/export_shapefile/export_shapefile.py:68
-msgid "Export Shapefile"
-msgstr ""
-
-#: ../Extensions/export_shapefile/export_shapefile.py:40
-msgid "No layer selected"
-msgstr ""
-
-#: ../Extensions/export_shapefile/export_shapefile.py:46
-msgid "Shapefile  Files (*.shp)|*.shp|"
-msgstr ""
-
-#: ../Extensions/export_shapefile/export_shapefile.py:69
-msgid "Storing shapes ..."
-msgstr ""
-
-#: ../Extensions/export_shapefile/export_shapefile.py:91
-#: ../Extensions/importAPR/importAPR.py:331
-msgid "(experimental) "
-msgstr ""
-
-#: ../Extensions/export_shapefile/export_shapefile.py:91
-msgid "Export Layer as Shapefile ..."
-msgstr ""
-
-#: ../Extensions/export_shapefile/export_shapefile.py:93
-msgid "Export the active layer as a Shapefile"
-msgstr ""
-
-#: ../Extensions/export_shapefile/__init__.py:22
-msgid "Exports the selected layer as a Shapefile."
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:128
-msgid "Select GNS file"
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:129
-msgid "Generate Files (*.txt)|*.txt|"
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:140
-msgid "gns2shp"
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:140
-msgid "Conversion failed"
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:143
-#, python-format
-msgid "gns2shp %s"
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:144
-#, python-format
-msgid "%d locations converted"
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:155
-msgid "Add GNS Layer"
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:179
-msgid "gns2shp..."
-msgstr ""
-
-#: ../Extensions/gns2shp/gns2shp.py:180
-msgid "Convert GNS-file into a shapefile"
-msgstr ""
-
-#: ../Extensions/gns2shp/__init__.py:22
-msgid ""
-"Converts GNS (Geographical Name Service\n"
-"of NIMA) to Shapefile format and\n"
-"displays the data."
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:108
-#, python-format
-msgid "Format version: %s"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:110
-#, python-format
-msgid "Project Name: %s"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:113
-#, python-format
-msgid "ODB File '%s'"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:170
-msgid "Select APR file"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:171
-msgid "ArcView Project Files (*.apr)|*.apr|"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:182
-#: ../Extensions/importAPR/importAPR.py:185
-#: ../Extensions/importAPR/importAPR.py:199
-#: ../Extensions/importAPR/importAPR.py:208
-#: ../Extensions/importAPR/importAPR.py:295
-msgid "Import APR"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:182
-msgid "Loading failed"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:186
-#, python-format
-msgid "%d objects loaded"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:200
-msgid "No view found in APR file"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:207
-msgid "Pick a View to import:"
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:296
-#, python-format
-msgid "Imported %d out of %d themes of view \"%s\" ..."
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:331
-msgid "Import apr-file..."
-msgstr ""
-
-#: ../Extensions/importAPR/importAPR.py:332
-msgid "Import a ArcView project file"
-msgstr ""
-
-#: ../Extensions/importAPR/__init__.py:20
-msgid ""
-"Import a ArcView project file (.apr)\n"
-"and convert it to Thuban."
-msgstr ""
-
-#: ../Extensions/importAPR/odb.py:123
-#, python-format
-msgid "Unknown Object list named: '%s'"
-msgstr ""
-
-#: ../Extensions/importAPR/odb.py:126
-#, python-format
-msgid "Unknown Value named: '%s' with value '%s'"
-msgstr ""
-
-#: ../Extensions/importAPR/odb.py:129
-#, python-format
-msgid "Unknown Object named: %s"
-msgstr ""
-
-#: ../Extensions/mouseposition/__init__.py:20
-msgid ""
-"On mouse click display the current coordinates\n"
-"in a dialog for easy further processing."
-msgstr ""
-
-#: ../Extensions/mouseposition/mouseposition.py:89
-msgid "Mouse Position Tool"
-msgstr ""
-
-#: ../Extensions/ogr/__init__.py:36
-msgid "Open a file supported by ogr."
-msgstr ""
-
-#: ../Extensions/ogr/ogrdialog.py:38
-msgid "Choose file format"
-msgstr ""
-
-#: ../Extensions/ogr/ogrdialog.py:118
-msgid "Choose layer"
-msgstr ""
-
-#: ../Extensions/ogr/ogrdialog.py:134 ../Extensions/wms/properties.py:113
-msgid "Layers"
-msgstr ""
-
-#: ../Extensions/ogr/ogrdialog.py:360
-msgid "URL:"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:39
-msgid "GML files (*.gml)"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:40
-msgid "MapInfo files (*.tab)"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:41
-msgid "DGN files (*.dgn)"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:42
-msgid "CSV files (*.csv)"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:44
-msgid "Select a data file"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:158 ../Extensions/ogr/ogrstart.py:186
-msgid "Open datasource"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:159 ../Extensions/ogr/ogrstart.py:187
-#, python-format
-msgid "Can't open the datasource '%s'"
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:204
-msgid "(testing) "
-msgstr ""
-
-#: ../Extensions/ogr/ogrstart.py:204
-msgid "Open layer via OGR"
-msgstr ""
-
-#: ../Extensions/profiling/__init__.py:20
-msgid ""
-"Provide a profiler and a timer\n"
-"for screen rendering."
-msgstr ""
-
-#: ../Extensions/svgexport/__init__.py:33
-msgid "Export the current map and legend in Thuban-map-SVG format."
-msgstr ""
-
-#: ../Extensions/svgexport/maplegend.py:137
-#: ../Extensions/svgexport/svgsaver.py:50
-msgid "Write SVG"
-msgstr ""
-
-#: ../Extensions/svgexport/maplegend.py:174
-msgid "Write SVG Legend"
-msgstr ""
-
-#: ../Extensions/svgexport/maplegend.py:175
-msgid "Write a basic Legend for the map."
-msgstr ""
-
-#: ../Extensions/svgexport/svgmapwriter.py:288
-msgid "Clash of layer names!\n"
-msgstr ""
-
-#: ../Extensions/svgexport/svgmapwriter.py:289
-msgid "Two layers probably have the same name, try renaming one."
-msgstr ""
-
-#: ../Extensions/svgexport/svgmapwriter.py:347
-msgid "Warning: Raster layer not written as "
-msgstr ""
-
-#: ../Extensions/svgexport/svgmapwriter.py:665
-msgid "Internal make_id() failure: "
-msgstr ""
-
-#: ../Extensions/svgexport/svgsaver.py:83
-msgid "Error: SVG not written!"
-msgstr ""
-
-#: ../Extensions/svgexport/svgsaver.py:84
-msgid "Could not write SVG because: "
-msgstr ""
-
-#: ../Extensions/svgexport/svgsaver.py:100
-msgid "Write SVG Map"
-msgstr ""
-
-#: ../Extensions/svgexport/svgsaver.py:101
-msgid "Export the map into an SVG file"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/__init__.py:32
-msgid ""
-"Provide management methods for UMN MapServer\n"
-".map-files. These can be created/imported/modified."
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_export.py:187
-msgid "Export mapfile"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_export.py:188
-msgid "Create a new mapfile"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_export.py:193
-#: ../Extensions/umn_mapserver/mf_handle.py:1351
-#: ../Extensions/umn_mapserver/mf_import.py:741 ../Extensions/wms/wms.py:153
-msgid "Experimenta&l"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_export.py:196
-#: ../Extensions/umn_mapserver/mf_handle.py:1354
-#: ../Extensions/umn_mapserver/mf_import.py:743
-msgid "&MapServer"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:79
-msgid "Map-Name:"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:86
-#: ../Extensions/umn_mapserver/mf_handle.py:617
-#: ../Extensions/umn_mapserver/mf_handle.py:921
-msgid "Size"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:91
-#: ../Extensions/umn_mapserver/mf_handle.py:446
-#: ../Extensions/umn_mapserver/mf_handle.py:466
-#: ../Extensions/umn_mapserver/mf_handle.py:926
-msgid "Width: "
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:96
-#: ../Extensions/umn_mapserver/mf_handle.py:453
-#: ../Extensions/umn_mapserver/mf_handle.py:473
-#: ../Extensions/umn_mapserver/mf_handle.py:931
-msgid "Height: "
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:113
-msgid "Image Type"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:125
-#: ../Extensions/umn_mapserver/mf_handle.py:961
-msgid "Unit Type"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:136
-#: ../Extensions/umn_mapserver/mf_handle.py:481
-msgid "ImageColor"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:148
-#: ../Extensions/umn_mapserver/mf_handle.py:492
-#: ../Extensions/umn_mapserver/mf_handle.py:640
-#: ../Extensions/umn_mapserver/mf_handle.py:866
-msgid "Change Color"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:250
-msgid "Template:"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:260
-msgid "Imagepath:"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:269
-msgid "Imageurl:"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:343
-msgid "Layer-Name:"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:349
-msgid "Edit Metadata"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:358
-msgid "Group:"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:441
-msgid "KeySize"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:461
-msgid "KeySpacing"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:520
-#: ../Extensions/umn_mapserver/mf_handle.py:972
-msgid "Change Label"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:629
-#: ../Extensions/umn_mapserver/mf_handle.py:855
-msgid "Color"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:649
-msgid "Type"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:662
-msgid "Offset"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:667
-msgid "X: "
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:674
-msgid "Y: "
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:698
-msgid "Buffer"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:710
-msgid "Minfeaturesize"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:723
-msgid "Mindistance"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:875
-msgid "Image Color"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:886
-msgid "Change ImageColor"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:893
-msgid "Intervals"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1358
-msgid "&Edit mapfile"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1363
-msgid "Edit the Map Setting"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1370
-msgid "Web"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1372
-msgid "Edit the Web Setting"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1378
-msgid "Layer"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1380
-msgid "Edit the Layer Setting of the active Layer"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1388
-msgid "Edit the Legend Setting"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1394
-msgid "Scalebar"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1396
-msgid "Edit the Scalebar Setting"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1402
-msgid "Metadata"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_handle.py:1404
-msgid "Edit the Metadata Setting"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:266
-#: ../Extensions/umn_mapserver/mf_import.py:345
-msgid "Error Loading Layer"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:267
-#: ../Extensions/umn_mapserver/mf_import.py:346
-#, python-format
-msgid "no shp file definied, maybe used a feature obj '%s'."
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:273
-#: ../Extensions/umn_mapserver/mf_import.py:352
-msgid "Open Shapepath"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:301
-msgid "Error Loading Raster Layer"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:302
-#, python-format
-msgid "Can't open the rasterlayer '%s'."
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:451
-msgid "Error Loading Expression"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:452
-#, python-format
-msgid "%s \n"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:502
-#: ../Extensions/umn_mapserver/mf_import.py:505
-#: ../Extensions/umn_mapserver/mf_import.py:549
-#: ../Extensions/umn_mapserver/mf_import.py:552
-msgid "Loading Layer"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:503
-#: ../Extensions/umn_mapserver/mf_import.py:550
-msgid "No Layer found."
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:506
-#: ../Extensions/umn_mapserver/mf_import.py:553
-#, python-format
-msgid "%s Layer loaded from file."
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:533
-#: ../Extensions/umn_mapserver/mf_import.py:567
-#: ../Extensions/umn_mapserver/mf_import.py:633
-msgid "Select MapFile file"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:534
-#: ../Extensions/umn_mapserver/mf_import.py:568
-#: ../Extensions/umn_mapserver/mf_import.py:634
-msgid "UMN MapServer Mapfiles (*.map)|*.map|"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:613
-#: ../Extensions/umn_mapserver/mf_import.py:705
-msgid "Layer loaded"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:614
-#: ../Extensions/umn_mapserver/mf_import.py:706
-#, python-format
-msgid "%s Layer loaded into Thuban"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:746
-msgid "Create new mapfile"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:748
-msgid "Create a new empty mapscript MapObj"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:753
-msgid "Import mapfile"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:754
-msgid "Import a mapfile"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:759
-msgid "Import layer from mapfile"
-msgstr ""
-
-#: ../Extensions/umn_mapserver/mf_import.py:761
-msgid "Import a layer from a mapfile"
-msgstr ""
-
-#: ../Extensions/wms/capabilities.py:117
-#, python-format
-msgid "Resource '%s' is neither local file nor URL"
-msgstr ""
-
-#: ../Extensions/wms/capabilities.py:143
-#, python-format
-msgid "Resource '%s' does support neither WMS version 1.1 nor 1.0"
-msgstr ""
-
-#: ../Extensions/wms/capabilities.py:156
-msgid "No capabilities available"
-msgstr ""
-
-#: ../Extensions/wms/capabilities.py:163
-#, python-format
-msgid "Can't open file '%s' for writing"
-msgstr ""
-
-#: ../Extensions/wms/capabilities.py:175
-#, python-format
-msgid "Can't open file '%s' for reading"
-msgstr ""
-
-#: ../Extensions/wms/infodialog.py:55
-msgid "WMS Information"
-msgstr ""
-
-#: ../Extensions/wms/infodialog.py:109
-msgid "Fees:"
-msgstr ""
-
-#: ../Extensions/wms/infodialog.py:113
-msgid "Access Constraints:"
-msgstr ""
-
-#: ../Extensions/wms/__init__.py:28
-msgid "Provide layers via OGC WMS."
-msgstr ""
-
-#: ../Extensions/wms/parser.py:173
-#, python-format
-msgid "No title found for layer #%d"
-msgstr ""
-
-#: ../Extensions/wms/parser.py:198
-#, python-format
-msgid "SRS '%s' is not numerical and not AUTO/NONE in layer '%s'"
-msgstr ""
-
-#: ../Extensions/wms/properties.py:79
-msgid "Edit WMS Properties"
-msgstr ""
-
-#: ../Extensions/wms/properties.py:108
-msgid "Title:"
-msgstr ""
-
-#: ../Extensions/wms/properties.py:131
-msgid "Format:"
-msgstr ""
-
-#: ../Extensions/wms/wms.py:74
-msgid "Select WMS Server"
-msgstr ""
-
-#: ../Extensions/wms/wms.py:132
-msgid "WMS"
-msgstr ""
-
-#: ../Extensions/wms/wms.py:148
-msgid "Add WMS layer ..."
-msgstr ""
-
-#: ../Extensions/wms/wms.py:149
-msgid "Add a WMS Layer"
-msgstr ""

Modified: packages/thuban/branches/upstream/current/setup.py
===================================================================
--- packages/thuban/branches/upstream/current/setup.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/setup.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -7,7 +7,7 @@
 
 """Distutils setup script for Thuban."""
 
-__version__ = "$Revision: 2821 $"
+__version__ = "$Revision: 2875 $"
 
 # Configuration:
 #
@@ -86,19 +86,20 @@
     basedir = os.path.dirname(sys.argv[0])
 
     # Directories where Proj4 is installed
-    proj4_prefix = os.path.join(basedir, "..", "proj-4.4.9", "src")
+    proj4_prefix = os.path.join(basedir, "..", "proj-4.5.0", "src")
     proj4_incdir =  proj4_prefix
     proj4_libdir =  proj4_prefix
     proj4_lib = "proj_i"
 
     # Define include and lib directories for wxWindows and 
-    wx_prefix = os.path.join(basedir, "..", "wxPython-2.6.3.3")
+    wx_prefix = os.path.join(basedir, "..", "wxPython-2.8.9.2")
     wx_inc = [os.path.join(wx_prefix, 'lib', 'vc_dll', 'mswuh'),
               os.path.join(wx_prefix, "include")]
     wx_lib = [os.path.join(wx_prefix, "lib", "vc_dll")]
 
     # Define include and lib directories for GDAL 
-    gdal_prefix = os.path.join(basedir, "..", "gdal-1.4.0")
+    #gdal_prefix = os.path.join(basedir, "..", "gdal-1.4.1")
+    gdal_prefix = os.path.join(basedir, "..", "gdal-1.5.4")
     gdal_inc = [os.path.join(gdal_prefix, 'alg'),
                 os.path.join(gdal_prefix, 'ogr'),
                 os.path.join(gdal_prefix, 'port'),
@@ -136,29 +137,28 @@
     # the values of wx_defs and wx_libs. copied from the wxPython
     # setup.py
     wx_cs_params[CS_DEFS] = \
-              [ ('WIN32', None),        # Some of these are no longer
-                ('__WIN32__', None),    # necessary.  Anybody know which?
-                ('_WINDOWS', None),
-                ('__WINDOWS__', None),
-                ('WINVER', '0x0400'),
-                ('__WIN95__', None),
-                ('STRICT', None),
+              [ #('WIN32', None),        # Some of these are no longer
+                #('__WIN32__', None),    # necessary.  Anybody know which?
+                #('_WINDOWS', None),
+                #('__WINDOWS__', None),
+                #('WINVER', '0x0400'),
+                #('__WIN95__', None),
+                #('STRICT', None),                        
 
-                ('__WXMSW__', None),
-                ('WXUSINGDLL', '1'),
+                #('__WXMSW__', None),
+                #('WXUSINGDLL', '1'),
 
-                ('SWIG_GLOBAL', None),
-                ('HAVE_CONFIG_H', None),
-                ('WXP_USE_THREAD', '1'),
+                #('SWIG_GLOBAL', None),
+                #('HAVE_CONFIG_H', None),
+                #('WXP_USE_THREAD', '1'),
                 ]
-    
+                   
     wx_cs_params[CS_INCDIRS] = wx_inc
     wx_cs_params[CS_LIBDIRS] = wx_lib
-    wx_cs_params[CS_LIBS] = ["wxmsw26uh"] \
-                      + ['kernel32', 'user32', 'gdi32', 'comdlg32',
-                         'winspool', 'winmm', 'shell32', 'oldnames',
-                         'comctl32', 'odbc32', 'ole32', 'oleaut32',
-                         'uuid', 'rpcrt4', 'advapi32', 'wsock32']
+    wx_cs_params[CS_LIBS] = ['wxmsw28uh_core' ]#'wxmsw28uh_core' , 'wxmsw28uh_stc', 'wxbase28uh' ,\
+                             #'wxmsw28uh_html' , 'wxmsw28uh_richtext' , 'wxmsw28uh_adv' , \
+                             #'wxmsw28uh_xrc' , 'wxmsw28uh_aui', 'wxmsw28uh_gl' , 'wxmsw28uh_gizmos' , \
+                             #'wxbase28uh_net' , 'wxbase28uh_xml']                    
 
     gdal_config_script = ""
     gdal_cs_params = [[] for i in range(CS_NUM_PARAMS)]
@@ -324,8 +324,8 @@
 
 #add the Lib content to the output
 if os.path.isdir("Lib"):
-	for d in os.listdir("Lib"):
-		data_files.append(("Lib", ["Lib/"+d]))
+        for d in os.listdir("Lib"):
+                data_files.append(("Lib", ["Lib/"+d]))
 
 
 #
@@ -942,14 +942,14 @@
         # Obviously have to build before we can install
 
         # add gdal to the build
-	for (dirpath, dnames, fnames) in os.walk('gdal'):			
-		files_in_dir = []
-		dp = '/'.join(dirpath.split('\\'))
-		for f in fnames:
-			if os.path.isfile(os.path.join(dirpath,f)):			
-				files_in_dir.append( dp + '/' + f)		
-		if len(files_in_dir) > 0:
-			data_files.append(( dp , files_in_dir))
+        for (dirpath, dnames, fnames) in os.walk('gdal'):                       
+                files_in_dir = []
+                dp = '/'.join(dirpath.split('\\'))
+                for f in fnames:
+                        if os.path.isfile(os.path.join(dirpath,f)):                     
+                                files_in_dir.append( dp + '/' + f)              
+                if len(files_in_dir) > 0:
+                        data_files.append(( dp , files_in_dir))
         # add thubaninit to the build
 
 
@@ -1071,7 +1071,7 @@
             "warn_dir": 0,
             "extra_files": ["COPYING", "Lib/proj.dll"],
             }
-	install_options["extra_files"].extend(self.get_gdal_content())
+        install_options["extra_files"].extend(self.get_gdal_content())
 
         # don't make a symlink because we're simulating windows, so
         # that we can generate the iss-file even on Linux
@@ -1083,12 +1083,12 @@
         '''
         Return the list of files in the gdal directory of the Thuban installation
         '''
-	gdal_files = []
-	for (dirpath, dnames, fnames) in os.walk('gdal'):		    
-	    if len(fnames) > 0:
-	        for file in fnames :
-		    gdal_files.append(dirpath + os.sep + file)
-	return gdal_files
+        gdal_files = []
+        for (dirpath, dnames, fnames) in os.walk('gdal'):
+            if len(fnames) > 0:
+                for file in fnames :
+                    gdal_files.append(dirpath + os.sep + file)
+        return gdal_files
 
 class thuban_build_docs(Command):
 
@@ -1168,7 +1168,7 @@
 """
 
 setup(name = "Thuban",
-      version = "1.2.1",
+      version = "1.2.1+svn",
       description = "Geographic data viewer",
       long_description = long_description,
       license = "GPL",
@@ -1180,8 +1180,8 @@
       packages = ["Thuban", "Thuban.Lib", "Thuban.Model", "Thuban.UI",
                   "Extensions", "Extensions.gns2shp", "Extensions.wms",
                   "Extensions.importAPR", "Extensions.profiling", 
-		          "Extensions.svgexport", "Extensions.mouseposition", 
-		          "Extensions.bboxdump", "Extensions.ogr", 
+                          "Extensions.svgexport", "Extensions.mouseposition", 
+                          "Extensions.bboxdump", "Extensions.ogr", 
                   "Extensions.umn_mapserver"],
       ext_modules = extensions,
       py_modules = py_modules,

Modified: packages/thuban/branches/upstream/current/test/postgissupport.py
===================================================================
--- packages/thuban/branches/upstream/current/test/postgissupport.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/test/postgissupport.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -7,9 +7,9 @@
 
 """Support module for tests that use a live PostGIS database"""
 
-__version__ = "$Revision: 2768 $"
+__version__ = "$Revision: 2857 $"
 # $Source$
-# $Id: postgissupport.py 2768 2007-05-09 22:06:29Z dpinte $
+# $Id: postgissupport.py 2857 2008-07-27 05:30:28Z elachuni $
 
 import sys
 import os
@@ -527,20 +527,22 @@
     first one found (looking under contrib first).  
 
     Debian (umcoming Etch) can do several version of postgresql
-    and thus has changed the paths. We try one location
-    in datadir2 only for Debian Etch postgresql-8.1.
+    and thus has changed the paths. We try locations for
+    postgresql-8.1 and 8.3.
 
     If the file is not found the return value is None.
     """
     bindir = run_config_script("pg_config --bindir").strip()
     datadir = os.path.join(bindir, "..", "share", "postgresql")
     datadir2 = os.path.join("/", "usr", "share", "postgresql-8.1-postgis")
+    datadir3 = os.path.join("/", "usr", "share", "postgresql-8.3-postgis")
 
     for filename in [os.path.join(datadir, "contrib", "postgis.sql"),
                      os.path.join(datadir, "postgis.sql"),
                      os.path.join(datadir, "lwpostgis.sql"),
                      os.path.join(datadir, "contrib", "lwpostgis.sql"),
-                     os.path.join(datadir2, "lwpostgis.sql") \
+                     os.path.join(datadir2, "lwpostgis.sql"),
+                     os.path.join(datadir3, "lwpostgis.sql"),
                     ]:
         if os.path.exists(filename):
             return filename

Modified: packages/thuban/branches/upstream/current/test/test_baserenderer.py
===================================================================
--- packages/thuban/branches/upstream/current/test/test_baserenderer.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/test/test_baserenderer.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -8,9 +8,9 @@
 
 """Test Thuban.Model.baserenderer"""
 
-__version__ = "$Revision: 2712 $"
+__version__ = "$Revision: 2843 $"
 # $Source$
-# $Id: test_baserenderer.py 2712 2006-10-15 23:27:05Z bernhard $
+# $Id: test_baserenderer.py 2843 2008-06-03 09:13:39Z bernhard $
 
 import os
 import binascii
@@ -102,7 +102,7 @@
                                resolution, dimensions, options):
 
         if not Thuban.Model.resource.has_gdal_support():
-            raise support.SkipTest("No gdal support")
+            raise support.SkipTest(Thuban.Model.resource.gdal_support_status)
 
         #print srcProj, dstProj,extents, resolution, dimensions, options
 
@@ -281,7 +281,7 @@
 
     def test_projected_raster_layer(self):
         if not Thuban.Model.resource.has_gdal_support():
-            raise support.SkipTest("No gdal support")
+            raise support.SkipTest(Thuban.Model.resource.gdal_support_status)
 
         layer = RasterLayer("raster layer",
                             os.path.join("..", "Data", "iceland",
@@ -347,7 +347,7 @@
 
     def test_projected_raster_decimalcommalocale(self):
         if not Thuban.Model.resource.has_gdal_support():
-            raise support.SkipTest("No gdal support")
+            raise support.SkipTest(Thuban.Model.resource.gdal_support_status)
 
         def _do_project_island():
             """Project island.tif and return result."""
@@ -381,7 +381,7 @@
         returned by gdalwarp.ProjectRasterFile to a BMP file data.
         """
         if not Thuban.Model.resource.has_gdal_support():
-            raise support.SkipTest("No gdal support")
+            raise support.SkipTest(Thuban.Model.resource.gdal_support_status)
 
         map = Map("TestBaseRenderer")
 

Modified: packages/thuban/branches/upstream/current/test/test_layer.py
===================================================================
--- packages/thuban/branches/upstream/current/test/test_layer.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/test/test_layer.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -9,9 +9,9 @@
 Test the Layer class
 """
 
-__version__ = "$Revision: 2774 $"
+__version__ = "$Revision: 2843 $"
 # $Source$
-# $Id: test_layer.py 2774 2007-06-22 22:14:15Z bernhard $
+# $Id: test_layer.py 2843 2008-06-03 09:13:39Z bernhard $
 
 import os
 import unittest
@@ -226,7 +226,7 @@
 
     def test_raster_layer(self):
         if not Thuban.Model.resource.has_gdal_support():
-            raise support.SkipTest("No gdal support")
+            raise support.SkipTest(Thuban.Model.resource.gdal_support_status)
 
         filename = self.build_path("island.tif")
         layer = RasterLayer("Test RasterLayer", filename)
@@ -475,7 +475,7 @@
 
     def test_raster_layer(self):
         if not Thuban.Model.resource.has_gdal_support():
-            raise support.SkipTest("No gdal support")
+            raise support.SkipTest(Thuban.Model.resource.gdal_support_status)
 
 
         filename = self.build_path("island.tif")

Added: packages/thuban/branches/upstream/current/test/test_mapservpostgis.py
===================================================================
--- packages/thuban/branches/upstream/current/test/test_mapservpostgis.py	                        (rev 0)
+++ packages/thuban/branches/upstream/current/test/test_mapservpostgis.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -0,0 +1,60 @@
+import unittest
+import os, sys
+import support
+from Thuban.Model.layer import Layer
+from Thuban.Model.map import Map
+from Thuban.Model.session import Session
+from Thuban.UI.context import Context
+from Thuban.Lib.connector import ConnectorError
+
+from test_postgis_db import PostGISStaticTests
+from Thuban.Model.postgisdb import PostGISShapeStore
+
+mapscriptAvailable=True
+try:
+    import mapscript
+    from Extensions.umn_mapserver.mf_export import thuban_to_map
+    from Extensions.umn_mapserver.mapfile import MF_Map
+except ImportError:
+    mapscriptAvailable=False
+    
+
+class DummyMainWindow(object):
+    def __init__(self, canvas):
+        self.canvas = canvas
+
+class DummyCanvas(object):
+    def __init__(self, map):
+        self.map = map
+    def Map(self):
+        return self.map
+    def VisibleExtent (self):
+        return self.map.BoundingBox()
+
+class TestPostGISMFExport(PostGISStaticTests):
+    def setUp(self):
+        PostGISStaticTests.setUp(self)
+        self.store = PostGISShapeStore(self.db, "political_multi")
+
+    def testExport(self):
+        if not mapscriptAvailable:
+            raise support.SkipTest("Couldn't import mapscript module")
+        session = Session("A Session")
+        map = Map("A Map")
+        session.AddMap(map)
+        layer = Layer("PostGIS Layer", self.store)
+        map.AddLayer(layer)
+        mainwindow = DummyMainWindow(DummyCanvas(map))
+        context = Context(None, session, mainwindow)
+        mf = MF_Map(mapscript.mapObj(""))
+        mf.set_size (600, 500)
+        thuban_to_map (context, mf)
+        try:
+            map.Destroy()
+        except ConnectorError:
+            pass
+        session.Destroy()
+
+if __name__ == "__main__":
+    support.run_tests()
+

Modified: packages/thuban/branches/upstream/current/test/test_save.py
===================================================================
--- packages/thuban/branches/upstream/current/test/test_save.py	2009-05-26 19:46:56 UTC (rev 2246)
+++ packages/thuban/branches/upstream/current/test/test_save.py	2009-05-26 20:36:51 UTC (rev 2247)
@@ -9,9 +9,9 @@
 Test saving a thuban session as XML
 """
 
-__version__ = "$Revision: 2826 $"
+__version__ = "$Revision: 2837 $"
 # $Source$
-# $Id: test_save.py 2826 2008-01-31 15:41:56Z bernhard $
+# $Id: test_save.py 2837 2008-02-13 22:31:31Z bernhard $
 
 import os
 import unittest
@@ -160,7 +160,7 @@
                     <classification>
                         <clnull label="">
                             <cldata fill="None" stroke="#000000"
-		    	        stroke_width="1"/>
+                                stroke_width="1"/>
                         </clnull>
                     </classification>
                 </layer>
@@ -232,7 +232,7 @@
                     <classification>
                         <clnull label="">
                             <cldata fill="None" stroke="#000000"
-		    	        stroke_width="1"/>
+                                stroke_width="1"/>
                         </clnull>
                     </classification>
                 </layer>
@@ -505,7 +505,7 @@
                         <classification>
                             <clnull label="">
                                 <cldata fill="None" stroke="#000000"
-				        stroke_width="1"/>
+                                        stroke_width="1"/>
                             </clnull>
                         </classification>
                     </layer>
@@ -532,8 +532,8 @@
             def _fetch_table_information(self):
                 # pretend that we've found a geometry column
                 self.geometry_column = "the_geom"
-		# pretend this is a ARC shape type.
-		self.shape_type = SHAPETYPE_ARC
+                # pretend this is a ARC shape type.
+                self.shape_type = SHAPETYPE_ARC
             def IDColumn(self):
                 """Return an object with a name attribute with value 'gid'"""
                 class dummycol:
@@ -576,7 +576,7 @@
                         <classification>
                             <clnull label="">
                                 <cldata fill="None" stroke="#000000"
-		    	            stroke_width="1"/>
+                                    stroke_width="1"/>
                             </clnull>
                         </classification>
                     </layer>




More information about the Pkg-grass-devel mailing list