2004-12-20  Bernhard Herzog  <bh@intevation.de>

	* po/hu.po, po/it.po, po/pt_BR.po, po/ru.po: Simple msgmerge
	update to bring at least the msgid up to 1.0.1 and make it easier
	for translators

2004-12-20  Bernhard Herzog  <bh@intevation.de>

	* NEWS: And some more: I forgot some translation updates.

2004-12-20  Bernhard Herzog  <bh@intevation.de>

	* NEWS: More updates for 1.0.1: Mention the svgexport plugin.  Add
	more details to the list of other fixes

2004-12-20  Bernhard Herzog  <bh@intevation.de>

	* NEWS: Update for 1.0.1

	* MANIFEST.in: Add some missing files

2004-12-20  Bernhard Herzog  <bh@intevation.de>

	* po/de.po: Updated.

2004-12-20  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/about.py (About.__init__): Added years of contribution
	  for each contributor.

2004-12-20  Bernhard Herzog  <bh@intevation.de>

	* po/fr.po, po/es.po: Updates from Daniel Calvelo Aros.  The
	updates were done for HEAD so I backported them to
	thuban-1-0-branch.

2004-12-20  Bernhard Herzog  <bh@intevation.de>

	Prepare for a 1.0.1 release

	* Thuban/version.py (thuban_release): Set to "1"

	* setup.py (setup call): version 1.0.1

	* setup.cfg (copyright): extend to 2004

2004-12-20  Bernhard Herzog  <bh@intevation.de>

	* setup.py (bdist_inno.user_options): New options
	compression-method and compression-solid to control how Innosetup
	compresses.
	(bdist_inno.initialize_options): Initilize the new options
	(bdist_inno.generate_iss): Use the new otions if they were given

2004-12-17  Bernhard Herzog  <bh@intevation.de>

	* setup.py: windows build: Removed the absolute path names and
	made all prfixes relative to the directory containing setup.py.
	Makes it a little easier to adapt to a different system.

2004-12-17  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/about.py (unicodeToLocale): Use getdefaultlocale
	instead of getlocale because it yields a usable encoding name on
	a german windows 2000

2004-12-16  Bernhard Herzog  <bh@intevation.de>

	Make the test suite work with PostGIS 0.8.2 and PostgreSQL 7.4
	Yet another backport from HEAD

	* test/postgissupport.py (find_postgis_sql): Different postgis
	versions put the postgis.sql file into slightly different places
	so we have to look in both.  The updated doc string describes this
	is more detail.

	* test/test_postgis_db.py
	(TestPostGISSpecialCases.test_column_name_quoting): The return
	value of UniqueValues is unsorted, so it has to be sorted for
	comparison.

2004-12-16  Bernhard Herzog  <bh@intevation.de>

	* test/postgissupport.py (PostgreSQLServer.is_running)
	(skip_if_addgeometrycolumn_does_not_use_quote_ident): Doc-string
	fixes backported from HEAD

2004-12-16  Bernhard Herzog  <bh@intevation.de>

	Add support for PostGIS tables with LINESTRING geomentries.
	Fixes RT#2299

	* Thuban/Model/postgisdb.py (shapetype_map): Add LINESTRING

	* test/postgissupport.py
	(PostgreSQLServer.get_default_static_data_db): Rename the "roads"
	table to "roads-multi" because it now uses MULTILINESTRING
	geometries and introduce a new "roads" table that uses LINESTRING
	(coords_to_multilinestring): Make the doc string more precise
	(coords_to_linestring): New.  Create a LINESTRING WKT
	representatin
	(wkt_converter): Add coords_to_linestring
	(upload_shapefile): Rephrase the doc-string a bit.

	* test/test_postgis_db.py (TestPostGISShapestoreArc)
	(LineStringTests)
	(TestPostGISShapestoreLineString)
	(TestPostGISShapestoreMultiLineString): Split
	TestPostGISShapestoreArc into a base class LineStringTests and two
	derived classes TestPostGISShapestoreLineString for LINESTRING
	geometries and TestPostGISShapestoreMultiLineString for
	MULTILINESTRING geometries.  Most test methods are in the base
	class with the exception of tests that explicitly check the raw
	format.

2004-12-16  Bernhard Herzog  <bh@intevation.de>

	Fix for RT#2237

	* Thuban/UI/projdialog.py (ProjFrame._show_proj_panel): If the
	panel to be shown is the UnknownProjPanel disable the OK and Try
	buttons.  Otherwise enable them.
	(ProjFrame.__GetProjection): The UnknownProjPanel returns None for
	the parameters.  In that case __GetProjection also returns None
	now.

2004-12-16  Jan-Oliver Wagner <jan@intevation.de>

	Some fixes of gns2shp extension.

	* Extensions/gns2shp/test/__init__.py: New. Make this directory a
	package.

	* Extensions/gns2shp/test/test_gns2shp.py: Add some import paths
	dynamically.

	* Extensions/gns2shp/test/README: Simplified description how to test.

	* Extensions/gns2shp/gns2shp.py (gns2shp): Fixed doc-string,
	fixed some dimensions of fields according to the GNS documentation
	which seems to change undocumented.
	Now killing trailing \n and/or \r from MODIFY_DATE.
	This fixes RT#2453.

2004-12-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/classgen.py (GenQuantilesPanel.__init__): Set the
	minimum number of classes to 2.  The calculate_quantiles needs at
	least two and raises an exception otherwise.  
	Fixes RT#2549

2004-12-15  Bernhard Herzog  <bh@intevation.de>

	Backports from HEAD

	* Thuban/UI/about.py (About.__init__): Add the
	thuban@intevation.de address and rephrase the email address
	section as in HEAD

	* Thuban/UI/exceptiondialog.py (ExceptionDialog.dialog_layout):
	Improved button string to stronger clearify that Thuban will be
	closed when hitting the button.

	* Thuban/UI/multiplechoicedialog.py: Add missing import of
	wxPython.wx itself (as opposed to the contents of wxPython.wx).
	For some reason wxPython.wx is available as wxPython.wx.wx in at
	least some 2.4 releases.  Fixes RT#2482 wrt. wxPython 2.4.

	* Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
	try to keep the same region visible when the map actually contains
	something

	* test/test_viewport.py
	(ViewPortTest.test_changing_map_projection): Check that changing
	the projection of an empty map shown in a viewport doesn't lead to
	exceptions in the viewport's handler for the
	MAP_PROJECTION_CHANGED messages

2004-12-13  Bernhard Herzog  <bh@intevation.de>

	Backport from HEAD: Make sure the region used to determine which
	shapes are visible actually matches the region on the printed
	page.  If this isn't done properly some shapes might not be
	printed.
	Fixes RT #2692

	* Thuban/UI/view.py (MapPrintout.draw_on_dc): The region for the
	renderer has to be at the same position as the mapregion

	* Thuban/UI/renderer.py (ExportRenderer.RenderMap): self.region
	has to be moved by (self.shiftx, self.shifty) too.

2004-11-27  Jan-Oliver Wagner <jan@intevation.de>

	New translation and backport of encoding unicode/locale.

	* Thuban/UI/about.py (About.__init__): Added unicode2Locale use.
	Added author for Hungarian translation.
	(unicodeToLocale): New. Convert Unicode to Locale encoding.

2004-11-27  Jan-Oliver Wagner <jan@intevation.de>

	* po/hu.po: New. Hungarian translation. Contributed
	by Norbert Solymosi.

2004-09-28  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Fixed
	a missing-bracket bug.

2004-08-06  Bernhard Herzog  <bh@intevation.de>

	Backport some fixes from HEAD

	* Thuban/UI/baserenderer.py: Fix some typos in comments and
	doc-strings
	(BaseRenderer.render_map_incrementally): Fix a logic bug in the
	optimization that tries not to draw layers under a raster layer.
	The bug was harmless.  All it effectively did was to produce
	strange messages about not being able to draw Layer instances for
	all vector layers below a raster layer.  Those layers would be
	invisible anyway because the raster layer currently always covers
	the entire window

2004-06-03  Bernhard Herzog  <bh@intevation.de>

	Backport some fixes from HEAD:

	* Thuban/Model/layer.py (Layer.TreeInfo): Convert the bounding box
	to a tuple before using it as arguments to the % operator.  This
	fixes the formatting issue filed in RT#2239 on 2004-01-13 and
	reported today on thuban-list by Jan Schüngel

	* test/test_layer.py (TestLayerModification.setUp): Save the
	filename as an instance variable so we can refer to it in tests
	(TestLayerModification.test_tree_info): Uncomment this method
	again and make it work.  This tests for the formatting issue
	filed in RT#2239 on 2004-01-13

2004-05-18  Jan-Oliver Wagner <jan@intevation.de>

	* Extensions/gns2shp/gns2shp.py (gns2shp): Fixed a bug
	by increasing a field size.

2004-04-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/classgen.py (GenQuantilesPanel.GetList): The row
	numbers given to ReadValue are ordinals. Backport from HEAD

2004-04-22  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/classgen.py (GenUniquePanel.__init__): Fixed two
	strings to be i18n now.

2004-04-19  Jan-Oliver Wagner <jan@intevation.de>

		* Thuban/UI/legend.py (LegendTree._OnRightClick): Grey out popup
		menu item Show Table if the corresponding layer has no table.

2004-03-11  Silke Reimer  <silke@intevation.de>

        Update debian directory:

        * debian/changelog: Added new version.
        * debian/rules: Updated management of patches (with cbds)
        * debian/control: Added cbds to dependencies
        * debian/patches/*: New. Adds better support for patches of thuban in
                        debian
        * debian/menu: Syntax of menu changed slightly
        * debian/setup.py.patch: removed because it has been moved to
                        debian/patches/setup.py.patch
        

2004-02-25  Bernhard Herzog  <bh@intevation.de>

	* libraries/thuban/wxproj.cpp (get_wx_version): New.  Return the
	version of wxWindows the module was compiled with so we can check
	that against the wxPython version.

	* Thuban/version.py (thuban_branch, thuban_release): New variables
	controlling which and how Thuban versions are shown.  See the
	comments for details.
	(verify_versions): Also check that the wx version that wxproj is
	compiled against matches that of the wxPython we use at runtime

2004-02-20  Bernhard Herzog  <bh@intevation.de>

	* Extensions/wms/wms.py (epsg_code_to_projection): Use
	get_system_proj_file to read the epsg projections.  The old way
	depended on the current directory being the top Thuban directory.

2004-02-20  Bernhard Herzog  <bh@intevation.de>

	* Extensions/svgexport/test/test_svgmapwriter.py
	(TestVirtualDC.test_clippath): Remove a debug print

2004-02-20  Bernhard Herzog  <bh@intevation.de>

	* Extensions/svgexport/__init__.py: New.  Turn
	Extensions/svgexport into a package.

	* Extensions/svgexport/svgmapwriter.py: Reorder the imports and
	doc-string a bit.  The doc-string must come first, otherwise it's
	not a doc-string.  The __future__ import must be the first thing
	after the doc-string.  Use only double quotes in doc-strings.
	Single quotes trip up emacs syntax highlighting if the text
	contains apostrophes.

2004-02-20  Bernhard Herzog  <bh@intevation.de>

	* Extensions/svgexport/test/__init__.py,
	Extensions/svgexport/test/test_svgmapwriter.py: New. Initial test
	suite for svgexport

	* test/runtests.py (find_test_modules): New. Function with the
	module finding code from main.
	(main): Use find_test_modules to figure out the default test
	modules and take modules from Extensions.svgexport.test too.

2004-02-19  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.OnInit): Make sure
	the mainwindow has a reference to the map of the initial session.
	This fixes a bug introduced with the fix for RT#2245

2004-02-19  Bernhard Herzog  <bh@intevation.de>

	* Extensions/svgexport/svgsaver.py,
	Extensions/svgexport/svgmapwriter.py,
	Extensions/svgexport/maplegend.py: Added again.  This time in the
	correct place.

2004-02-17  Bernhard Herzog  <bh@intevation.de>

	Fix for RT#2245

	* Thuban/UI/application.py (ThubanApplication.OnInit): 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 handlers, especially EVT_UPDATE_UI
	may want to access things from the application.
	(ThubanApplication.maps_changed): The mainwindow may not have been
	created yet, so check whether it has been created before calling
	its methods

	* Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
	have a map

2004-02-17  Bernhard Herzog  <bh@intevation.de>

	* test/test_svgmapwriter.py, Extensions/svgsaver.py,
	Extensions/svgmapwriter.py, Extensions/maplegend.py,
	extensions/svgexport/svgsaver.py,
	extensions/svgexport/svgmapwriter.py,
	extensions/svgexport/maplegend.py: Removed.  These files were in
	the wrong places or didn't work at all.

2004-02-16  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
	line

2004-02-16  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.

2004-02-15  Markus Rechtien  <markus@intevation.de>
	
	* Extensions/svgexport/svgmapwriter.py: New. Adds the capability
	to write a session to a file in SVG format.
	* Extensions/svgexport/svgsaver.py: New. Uses svgmapwriter.py
	to write a SVG map of a session.
	* Extensions/svgexport/maplegend: New. Writes a basic maplegend
	in SVG format for the current session.

2004-02-13  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): When the layer
	can't be created, return immediately after displaying the error
	message.

2004-02-11  Bernhard Herzog  <bh@intevation.de>

	Handle postgis tables with more than one geometry column.

	* Thuban/Model/postgisdb.py
	(PostGISTable._fetch_table_information): Delegate the creation of
	column objects to a different method so that we can extend that in
	derived classes
	(PostGISTable._create_col_from_description): New. Column object
	creation part of _fetch_table_information
	(PostGISShapeStore._create_col_from_description): New. Extend
	inherited method to handle geometry columns
	(PostGISShapeStore.__init__): New parameter geometry_column to
	specify which geometry column to use.  Optional but mandatory for
	tables with more than one geometry column
	(PostGISShapeStore._fetch_table_information): Also use the name of
	the geometry column when looking for the srid
	(PostGISShapeStore.ShapeType): Also use the name of the geometry
	column when looking for the shape type

	* test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
	NonConnectionStore to changes in the PostGISShapeStore

	* test/test_postgis_db.py
	(TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
	PostGISShapeStore with tables having two geometry columns.

2004-02-10  Bernhard Herzog  <bh@intevation.de>

	Fix some postgis problems.  What remains to be done is real
	handling of SRIDs as they affect how reprojection is done

	* Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
	doc-string
	(PostGISShapeStore._fetch_table_information): New. Extend
	inherited method to retrieve srid
	(PostGISShapeStore.BoundingBox): Handle tables without data.
	extent yields NULL for those
	(PostGISShapeStore.ShapesInRegion): Use the srid of the table.

	* test/test_postgis_db.py
	(TestPostGISSpecialCases.test_shapestore_empty_table): New test
	for the special case of a table without any data
	(TestPostGISShapestorePointSRID): New class with tests for a table
	that uses srids
	(PolygonTests): Fix a doc-string typo

	* test/postgissupport.py (PostGISDatabase.__init__): New parameter
	reference_systems with a specification of spacial reference
	systems to create in the new db.
	(PostgreSQLServer.new_postgis_db)
	(PostgreSQLServer.get_static_data_db): New parameter
	reference_systems to be passed through ultimately to
	PostGISDatabase.  In new_postgis_db also check whether an existing
	db already has the right srids
	(PostgreSQLServer.get_default_static_data_db): Add srids and a
	table that uses srids
	(PostGISDatabase.initdb): Create the entries for the reference
	systems
	(PostGISDatabase.has_data): Add reference_systems parameter to
	check for those too
	(upload_shapefile): New parameter srid to create tables with a
	specific srid

2004-02-06  Frank Koormann  <frank@intevation.de>

	* po/pt_BR.po: Fixed charset

2004-02-05  Frank Koormann  <frank@intevation.de>

	* po/pt_BR.po: Fixed format string for error message, missing %s
	added (Thuban/UI/application.py:273)

2004-02-03  Frank Koormann  <frank@intevation.de>
	
	First version of Portuguese (Brazilian) translation

	* po/pt_BR.po: New, translation of pot (2004-01-15 16:07+0300) for
	Brazilian Portuguese by Eduardo Patto Kanegae.

	* Thuban/UI/about.py (About.__init.py__): Added Eduardo to the list of
	translators.


2004-01-22  Frank Koormann  <frank@intevation.de>

	* Doc/manual/thuban-manual.xml: Added section on installation of
	Thuban under Win32 systems. Fixed image path references in the postgis
        section. Some minor source formattings.

2004-01-21  Frank Koormann  <frank@intevation.de>

	Make Thuban remember path selections (at least for one application run).

	* Thuban/UI/application.py (Application.OnInit): Initialize path as a 
	attribute of application object. Path is a dictionary of
	strings, currently with the items "data" and "projection".  
	(Application.SetPath): New, stores path for the specified item.
	(Application.Path): New, return path for the specified item.

	* Thuban/UI/mainwindow.py 
	(MainWindow.OpenSession, MainWindow.SaveSessionAs, 
	MainWindow.AddLayer, MainWindow.AddRasterLayer,
	MainWindow.TableOpen): Access "data" path information of the
	application.
	
	* Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport):
	Access "projection" path information of the application.

2004-01-05  Bernhard Herzog  <bh@intevation.de>

	* po/ru.po: Updated translations from Alex Shevlakov

2004-01-05  Bernhard Herzog  <bh@intevation.de>

	* po/Makefile, po/README: Move the description of how to generate
	the translation statistics to the README.

2003-12-23  Bernhard Herzog  <bh@intevation.de>

	* NEWS: Update for 1.0.0

	* po/it.po: Another update from Maurizio Napolitano

2003-12-23  Bernhard Herzog  <bh@intevation.de>

	* po/it.po: Updated translation from Maurizio Napolitano

2003-12-23  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/join.py (JoinDialog.__init__): Mark one more string
	for translation

	* Thuban/UI/mainwindow.py (MainWindow.TableRename)
	(MainWindow.RenameMap, MainWindow.RenameLayer): Mark some more
	strings for translation

	* po/de.po: Update with the newly marked strings.

2003-12-22  Bernhard Herzog  <bh@intevation.de>

	* HOWTO-Release: Fix the places where version numbers have to be
	updated

2003-12-22  Bernhard Herzog  <bh@intevation.de>

	* setup.py (setup call): 1.0.0, yeah!

	* Thuban/version.py (longversion): 1.0.0, yeah!

	* Thuban/Model/load.py (SessionLoader.__init__): Accept the
	1.0.0 namespace too

	* Thuban/Model/save.py (SessionSaver.write_session): Save with
	1.0.0 namespace

	* test/test_load.py (LoadSessionTest.dtd)
	(TestSingleLayer.file_contents)
	(TestNonAsciiColumnName.file_contents)
	(TestLayerVisibility.file_contents)
	(TestClassification.file_contents, TestLabels.file_contents)
	(TestLayerProjection.file_contents)
	(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
	(TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
	(TestPostGISLayerPassword.file_contents)
	(TestLoadError.file_contents, TestLoadError.test): Update for
	1.0.0 namespace

	* test/test_save.py (SaveSessionTest.dtd)
	(SaveSessionTest.testEmptySession)
	(SaveSessionTest.testSingleLayer)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer)
	(SaveSessionTest.test_dbf_table)
	(SaveSessionTest.test_joined_table)
	(SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace

2003-12-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/load.py (SessionLoader.start_label): Make sure the
	alignment flags are byte strings not unicode and that they have
	valid values

	* test/test_load.py (TestLabelLayer): New. Test loading (and
	indirectly saving) of maps with labels.

2003-12-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/tableview.py (TableGrid.OnDestroy)
	(TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
	unsubscribe all subscribers.
	(LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
	self.grid since it may already have been destroyed.
	Fixes RT #2256

2003-12-19  Bernhard Herzog  <bh@intevation.de>

	* po/fr.po, po/es.po: Updated translations from Daniel Calvelo

2003-12-16  Bernhard Herzog  <bh@intevation.de>
	
	* debian/bitmappath.patch, debian/setup.py.patch:
		added to ensure compliance with FHS for debian
	* debian/rules, debian/changelog:
	    added patches in rules to ensure compliance with FHS for debian

2003-12-16  Bernhard Herzog  <bh@intevation.de>

	* po/Makefile (mo): Make the output a bit nicer so that it prints
	statistics about the translations. Add a comment how produce even
	nicer statistics with sed.

2003-12-09  Frank Koormann   <frank@intevation.de>

	* Resources/Projections/defaults.proj:
	French projection sample with correct accents (UNICODE).

2003-12-05  Bernhard Herzog  <bh@intevation.de>

	* MANIFEST.in: Add the devtools directory

	* setup.py (setup call): Use license instead of licence. This
	silences a deprecation warning on Python 2.3

2003-12-05  Frank Koormann   <frank@intevation.de>

	Documentation synced with 1.0rc1

	* Doc/manual/thuban-manual.xml: 
	Minor formatting changes and references to database layers .
	Introduction.Internationalization: New section on i18n.
	MapManagement.AddingandRemovingLayers: Added item on database layers.	
	MapManagement.TheLegend: Added section and screenshot on popup menu.
	ProjectionManagement: Updated screenshot and sentence on EPSG.
	Appendix.SupportedDataSources: Added PostGIS.
	Appendix.WorkingwithPostGIS: New section.

	* Doc/manual/images/6_projection.png: Updated screenshot including 
	EPSG checkboxes.

	* Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.

	* Doc/manual/images/app_postgis_add_layer.png,
	Doc/manual/images/app_postgis_db_add.png, 
	Doc/manual/images/app_postgis_db_management.png:
	New screenshots focussing on database layers

2003-12-05  Frank Koormann   <frank@intevation.de>

	* Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
	write warning to stderr instead of rising a warning dialog

2003-12-03  Bernhard Herzog  <bh@intevation.de>

	Fix for RT #2243

	* Thuban/UI/mainwindow.py (MainWindow.has_selected_shape_layer):
	New. Like has_selected_layer but for shape layers only
	(_has_selected_shape_layer): New. Like _has_selected_layer but for
	shape layers only
	(layer_show_table command, layer_jointable command): Use these
	commands should only be available for shape layers

2003-12-03  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.Unsubscribe): Deal with
	publishers that are wx objects and may have been destroyed by wx
	already. Fixes RT #2242.

2003-12-03  Bernhard Herzog  <bh@intevation.de>

	* po/ru.po: Updates from Alex Shevlakov

2003-12-03  Silke Reimer <silkeintevation.de>

	* debian/control, debian/changelog: Added gdal-support to
		debian package, updated to new thuban version


2003-12-03  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Lib/version.py: New. Module for version number
	manipulations. The version of make_tuple here also deals better
	with more unusual version number strings, such as e.g.
	"1.2+cvs20031111"

	* Thuban/version.py (make_tuple): Removed. It's now in
	Thuban.Lib.version. Use that implementation instead.

	* test/test_lib_version.py: New. Tests for Thuban/Lib/version.py

2003-12-02  Bernhard Herzog  <bh@intevation.de>

	* MANIFEST.in: Add debian files

	* setup.py (setup call): Add packages for the Extensions so that
	they're installed too
	(data_files): Add READMEs and sample data from some Extensions

	* NEWS: Add note about the extensions in binary packages

2003-12-02  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/save.py (SessionSaver.write_session): Save files
	with the thuban-1.0rc1

	* Thuban/Model/load.py (SessionLoader.__init__): Recognize the
	thuban-1.0rc1 namespace too

	* test/test_save.py (SaveSessionTest.dtd)
	(SaveSessionTest.testEmptySession)
	(SaveSessionTest.testSingleLayer)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer)
	(SaveSessionTest.test_dbf_table)
	(SaveSessionTest.test_joined_table)
	(SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
	namespace

	* test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
	namespace
	(TestSingleLayer.file_contents)
	(TestNonAsciiColumnName.file_contents)
	(TestLayerVisibility.file_contents)
	(TestClassification.file_contents, TestLabels.file_contents)
	(TestLayerProjection.file_contents)
	(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
	(TestPostGISLayer.file_contents)
	(TestPostGISLayerPassword.file_contents)
	(TestLoadError.file_contents, TestLoadError.test): Update to
	thuban-1.0rc1 namespace

2003-12-01  Bernhard Herzog  <bh@intevation.de>

	* setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
	nt to better match Intevation's current w32 setup

	* HOWTO-Release: Add note about updating MANIFEST.in

	* MANIFEST.in: Add the Extensions

	* NEWS: Update for 1.0rc1

2003-12-01  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.AddLayer): Change the wild
	cards for the dialog so that shapefiles ending in all uppercase
	SHP are listed too

2003-11-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/version.py (longversion): Update to 1.0rc1

	* setup.py (setup call): Update version to 1.0rc1. Use the
	thuban@intevation.de email address as author email instead of my
	personal one.

2003-11-28  Bernhard Herzog  <bh@intevation.de>

	* po/de.po: Update german translation.

2003-11-28  Bernhard Herzog  <bh@intevation.de>

	Unify the filenames stored in .thuban files so that the .thuban
	files are more platform independend

	* Thuban/Model/save.py (unify_filename): New. Unify filenames so
	that they can be used on both windows and unix
	(SessionSaver.prepare_filename): New. Handle all filename
	transformations for filenames stored in the thuban file
	(SessionSaver.write_data_containers, SessionSaver.write_layer):
	Use prepare_filename

	* test/test_save.py (SaveSessionTest.testSingleLayer)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer)
	(SaveSessionTest.test_dbf_table)
	(SaveSessionTest.test_joined_table): Filenames are always stored
	with slashes on all currently supported platforms so adapt all
	tests to this

	* test/test_load.py (LoadSessionTest.filenames): With the new
	filename scheme the filenames in the tests should be
	understandable on all currently supported platforms so we turn
	this into an empty list because we don't have to normalize them
	anymore

2003-11-28  Bernhard Herzog  <bh@intevation.de>

	* test/test_layer.py (TestLayer.test_arc_layer_with_projection):
	Add the ellipsoid to the projection since some Proj versions
	complain if it's missing.

2003-11-27  Bernhard Herzog  <bh@intevation.de>

	Corect some bounding box projection problems

	* Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
	version of ForwardBBox
	(Projection._transform_bbox): New. common implementation of
	ForwardBBox and InverseBBox
	(Projection.ForwardBBox): Use _transform_bbox.

	* test/test_proj.py (TestProjection.test): Add test for
	InverseBBox

	* Thuban/Model/layer.py (Layer.LatLongBoundingBox)
	(Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
	new InverseBBox method to determine the unprojected bounding box
	(Layer.ShapesInRegion): Use the ForwardBBox method to project the
	bbox.

	* test/test_layer.py (TestLayer.test_point_layer_with_projection):
	Removed.
	(TestLayer.test_arc_layer_with_projection): New. This test is
	better able to test whether bounding boxes are projected correctly
	than test_point_layer_with_projection

	* Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
	InverseBBox to unproject bboxes

2003-11-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/about.py (About.__init__): Make sure we have ASCII
	source code.

2003-11-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.__getattr__): Removed. It was only
	there for backwards compatibility and all code relying on that
	should have been updated by now.

2003-11-25  Bernhard Herzog  <bh@intevation.de>

	* test/test_load.py (TestClassification.test): Add the missing
	round trip test.
	(TestClassification.file_contents): Update to the newest file
	format

2003-11-25  Bernhard Herzog  <bh@intevation.de>

	Add very experimental (and possibly dangerous) extension to draw
	polygons:

	* Extensions/drawshape/README: New. Brief installation
	instructions

	* Extensions/drawshape/drawshape.py: New. Implementation of the
	drawshape extensions

	* Extensions/drawshape/patch.diff: Patch to apply before the
	extension can be used.

2003-11-24  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/data.py (ShapefileStore._open_shapefile)
	(ShapefileStore.__init__): Factor opening the shapefile into a
	separate method (the new _open_shapefile). This makes the code a
	bit more readable but the real reason is that it makes some evil
	hacks easier. :-)

2003-11-24  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/load.py (SessionLoader.check_attrs): If no
	converter is specified for an attribute assume it's a string
	containing only Latin1 characters. Update doc-string accordingly.
	This change should fix many places where unicode objects might
	accidentally enter Thuban.

	* test/test_load.py (TestNonAsciiColumnName): New test to check
	what happens with column names in DBF files that contain non-ascii
	characters

2003-11-21  Bernhard Herzog  <bh@intevation.de>

	Enable the experimental attribute editing again and introduce a
	command line switch to actually activate it

	* Thuban/UI/main.py (options): New. Container for options set on
	the commmand line
	(main): Add the --enable-attribute-editing flag.

	* Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute
	editing is enabled use the grid ctrl which allows editing of the
	values

	* Thuban/Model/transientdb.py (AutoTransientTable.write_record):
	New. Just delegate this to the underlying table.

2003-11-20  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py (ProjFileReadTests.test_read_unreadable_file):
	Skip this test if run under non-posix systems since it only works
	there

2003-11-19  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/resource.py: Rework the way gdal support is
	determined so that we can give a reason in the about why gdal is
	not supported.
	(gdal_support_status): New. Variable holding a string with the
	reason for no gdal support

	* Thuban/UI/about.py (About.__init__): Add the reason why gdal is
	not supported to the message

2003-11-19  Bernhard Herzog  <bh@intevation.de>

	Remove the old table interface and its test cases

	* Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
	(DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
	anymore

	* Thuban/Model/transientdb.py (TransientTableBase)
	(AutoTransientTable): Do not derive from OldTableInterfaceMixin
	anymore

	* test/test_table.py: Removed since the old interface it tests is
	gone.

	* test/runtests.py (main): The old table interface is gone and
	with it the deprecation warnings so remove the code that turns
	these warnings into errors

2003-11-19  Bernhard Herzog  <bh@intevation.de>

	* test/test_table.py: Revert to revision 1.5 again. Changing the
	tests to use the new table interface is completely wrong since the
	whole purpose of the tests in this module is to test the old
	interface.

2003-11-18  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/postgisdb.py (PostGISConnection.MatchesParameters):
	New. Test whether the connection matches a set of connection
	parameters

	* Thuban/UI/dbdialog.py (DBFrame.conns_changed): Fix doc-string
	(DBFrame.OnAdd): Use the new MatchesParameters method when looking
	for existing connections with the same parameters and break out of
	the loop correctly.

	* test/test_postgis_db.py (TestBriefDescription)
	(TestPostGISSimple.test_brief_description): Rename
	TestBriefDescription to TestPostGISSimple and the test method to
	test_brief_description so that we can add more test methods.
	(TestPostGISSimple.test_matches_parameters): New. Test the new
	MatchesParameters method

2003-11-18  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Lib/connector.py (Publisher): Introduce a new flag,
	_was_destroyed, to indicate whether an publisher instance has
	already been destroyed.
	(Publisher.Unsubscribe): Only disconnect if the publisher has not
	been destroyed yet.
	(Publisher.Destroy): Set the _was_destroyed flag to true.

	* test/test_connector.py
	(TestPublisher.test_unsubscribe_after_destroy): New. Test that
	calling Unsubscribe after Destroy doesn't raise an exception

2003-11-14  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
	typo in doc-string

2003-11-13  Bernhard Herzog  <bh@intevation.de>

	Quote table and column names properly for postgis.

	* Thuban/Model/postgisdb.py (quote_identifier): New. Function to
	quote an identifier for use in an sql statement
	(PostGISColumn.__init__): Add the quoted_name attribute
	(PostGISTable.__init__): New instance variable quoted_tablename
	(PostGISTable._fetch_table_information): Use the quoted table
	name. New isntance variable quoted_geo_col with a quoted version
	of geometry_column
	(PostGISTable.NumRows, PostGISTable.RowIdToOrdinal)
	(PostGISTable.RowOrdinalToId): Use the quoted table name
	(PostGISTable.ReadValue, PostGISTable.ValueRange)
	(PostGISTable.UniqueValues, PostGISTable.SimpleQuery)
	(PostGISShapeStore.BoundingBox, PostGISShapeStore.Shape)
	(PostGISShapeStore.AllShapes, PostGISShapeStore.ShapesInRegion):
	Use quoted table and column names

	* test/test_postgis_db.py (TestPostGISSpecialCases)
	(TestPostGISIgnoredColumns): Rename the class to
	TestPostGISSpecialCases because that better describes the new
	cases
	(TestPostGISSpecialCases.test_unsupported_types)
	(TestPostGISSpecialCases.test): Rename the method to
	test_unsupported_types because we need a more descriptive name now
	that there are more methods
	(TestPostGISSpecialCases.test_table_name_quoting)
	(TestPostGISSpecialCases.test_column_name_quoting)
	(TestPostGISSpecialCases.test_shapestore_name_quoting): New test
	cases to test quoting of table and column names in PostGISTable
	and PostGISShapeStore

	* test/postgissupport.py
	(skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
	AddGeometryColumn desn't support table or column names with sapces
	or double quotes

2003-11-12  Jan-Oliver Wagner <jan@intevation.de>

	* Extensions/wms/__init__.py: New: Init to make this
	directory a package.

	* Extensions/wms/wms.py: New: Provide layers via OGC WMS.

2003-11-11  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/resource.py (EPSG_DEPRECATED_PROJ_FILE): New.
	Constant for the file woth deprecated epsg projections
	(get_system_proj_file): Update doc-string

	* Thuban/UI/projdialog.py (ProjFrame.build_dialog): Add a space
	above the EPS widgets, introduce a check box for the deprecated
	eps projections and a label for the epsg widgets
	(ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections
	too

2003-11-11  Bernhard Herzog  <bh@intevation.de>

	Avoid warnings when run under Python 2.3

	* Thuban/UI/baserenderer.py (BaseRenderer.draw_point_shape)
	(BaseRenderer.draw_label_layer): Coordinates must be ints.

	* Thuban/UI/renderer.py (MapRenderer.make_point): Turn this into a
	real method so that we can convert to int.
	(MapRenderer.label_font): The font size mist be an int.

	* Thuban/UI/common.py (Color2wxColour): The color values must be
	ints. Also, remove the unnecessary asserts.

	* test/test_load_0_8.py (TestUnicodeStrings.file_contents)
	(TestUnicodeStrings.test): Python source code should not contain
	non-ascii characters unless an encoding is specified in the file.
	Therefore use \x escapes in the string literals for non-ascii
	characters.

2003-11-11  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/resource.py (get_system_proj_file): Add a filename
	parameter so that this function can be used for all proj files in
	Resource/Projections
	(DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
	get_system_proj_file

	* Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
	ProjFile self.__sysProjFile use a dictionary of system ProjFile
	objects self._sys_proj_files
	(ProjFrame.build_dialog): Adapt to the new changes in the
	ProjectionList constructor. Add a check button to toggle whether
	EPSG projections are shown
	(ProjFrame._OnShowEPSG): New. Handler for the epsg check button
	events.
	(ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
	the busy cursor if the files have not yet been loaded by the
	dialog.
	(ProjFrame.load_system_proj): Add a parameter for the name of the
	proj file. Maintain the dictionary of system projections
	self._sys_proj_files

	* Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
	user_projs parameters into one parameter proj_files which is a
	list of proj files.
	(ProjectionList._subscribe_proj_files)
	(ProjectionList._unsubscribe_proj_files): New. Move
	subscription/unsubscription of projfile messages to separate
	methods
	(ProjectionList.Destroy): The unsubscribe is now done in
	_unsubscribe_proj_files
	(ProjectionList.update_projections): We now have a list of proj
	file objects
	(ProjectionList.SetProjFiles): New method to set a new list of
	proj file objects

	* test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
	Specify explicitly which system proj file to load.

2003-11-11  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/load.py (SessionLoader.Destroy): New. 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)
	(load_session): Call the handler's Destroy method to make sure
	that it gets garbage collected early. Otherwise it will be
	collected very late if at all and it holds some references to e.g.
	shapestores and the session which can lead to leaks (of e.g. the
	temporary files)

	* test/test_load.py (TestSingleLayer.test_leak): New. test for the
	resource leak in load_session

2003-11-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/baserenderer.py: Add a way to specify how layers in
	extensions are to be rendered.
	(_renderer_extensions): New. List with renderer for layers in
	extensions
	(add_renderer_extension): New. Add a renderer extension
	(init_renderer_extensions): New. Init the renderer extensions
	(BaseRenderer.render_map_incrementally): Search
	_renderer_extensions for how to draw unknown layer types
	(BaseRenderer.draw_raster_data): Add format parameter so that
	formats other than BMP can be drawn
	(BaseRenderer.draw_raster_layer): Pass an explicit format to
	draw_raster_data

	* Thuban/UI/renderer.py (raster_format_map): New. Mapping form the
	strings of the format parameter of draw_raster_data method to wx
	constants
	(MapRenderer.draw_raster_data): Add the format parameter and use
	raster_format_map to map it to the right wxwindows constant for
	wxImageFromStream

	* test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add
	the format parameter and record it
	(TestBaseRenderer.test_raster_no_projection): check the format
	paramter of the draw_raster_data method
	(TestBaseRenderer.test_renderer_extension): New. Test the renderer
	extension facility

2003-11-07  Bernhard Herzog  <bh@intevation.de>

	Tweak the usage of the sqlite database to make common use cases
	more responsive. In most cases copying the data to the sqlite
	database takes so long that using sqlite doesn't have enough
	advantages.

	* Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add
	comments about performance and query the min and max in separate
	statements because only that way will indexes be used.
	(TransientTableBase.UniqueValues): Add some comments about
	performance.
	(AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues):
	Do not copy the data to the transient DB but use the transient
	copy if it exists. See the new comments for the performance trade
	offs

	* test/test_transientdb.py
	(TestTransientTable.test_auto_transient_table): Make sure that the
	data is copied to the transient database at some point.

2003-11-03  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some
	globals to locals so that it's a bit faster

2003-11-03  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/baserenderer.py
	(BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
	method. ReadValue is faster than ReadRowAsDict since it only reads
	one cell especially now that the dbf file objects actually
	implement it.

	* Thuban/Model/table.py (DBFTable.ReadValue): Use the new
	read_attribute method of the dbf objects

2003-11-03  Bernhard Herzog  <bh@intevation.de>

	* Extensions/profiling/profiling.py (popup_dialog_box): New config
	variable to indicate whether the result should be shown in a
	dialog box
	(profile_screen_renderer, time_screen_renderer): Only show a
	dialog box if popup_dialog_box is true.
	(profile_screen_renderer): Flush stdout after the printing the
	first part of the "profiling..." message

	* Thuban/UI/baserenderer.py
	(BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
	brushes for the groups so that they're not created over and over
	again

	* Thuban/Model/classification.py (Classification.__getattr__)
	(Classification._compile_classification)
	(Classification._clear_compiled_classification): New. Methods to
	manage a 'compiled' representation of the classification groups
	which is created on demand
	(Classification.InsertGroup, Classification.RemoveGroup)
	(Classification.ReplaceGroup): reset the compiled representation
	(Classification.FindGroup): Use the compiled representation to
	find the matching group
	(ClassGroupRange.GetRangeTuple): New. Return the range as a tuple

2003-10-31  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/classification.py (Classification.SetDefaultGroup):
	Send a CLASS_CHANGED message
	(Classification.RemoveGroup): Send a CLASS_CHANGED message and do
	not return the removed group since it wasn't used.

	* test/test_classification.py
	(TestClassification.test_set_default_group): New. Test the
	SetDefaultGroup method
	(TestClassification.test_insert_group): New. Test the InsertGroup
	method
	(TestClassification.test_remove_group): New. Test the RemoveGroup
	method
	(TestClassification.test_replace_group): New. Test the
	ReplaceGroup method

2003-10-31  Bernhard Herzog  <bh@intevation.de>

	* test/test_classification.py (TestClassification.setUp):
	Subscribe to the CLASS_CHANGED messages
	(TestClassification.tearDown): New. Destroy the classification
	properly
	(TestClassification.test_defaults): Add tests for the default line
	width and whether no messages were sent yet
	(TestClassification.test_set_default_properties): Add tests for
	messages and setting the default line width
	(TestClassification.test_add_singleton)
	(TestClassification.test_add_range)
	(TestClassification.test_multiple_groups): Add tests for messages

2003-10-31  Bernhard Herzog  <bh@intevation.de>

	Some more refactoring in preparation for new tests:

	* test/test_classification.py (TestClassification.setUp): New.
	Instantiate the classification here. Update the test methods
	accordingly.
	(TestClassification.test_multiple_groups): Make sure that the two
	singletons matching 1 are considered different.

2003-10-31  Bernhard Herzog  <bh@intevation.de>

	* test/test_classification.py (red, green, blue): New. These
	constants were used in several cases. Update the relevant methods.
	(TestClassification.test_defaults)
	(TestClassification.test_set_default_properties)
	(TestClassification.test_add_singleton)
	(TestClassification.test_add_range)
	(TestClassification.test_multiple_groups)
	(TestClassification.test_deepcopy): New. These were formerly all
	part of the single method test.
	(TestClassification.test_deepcopy): Removed.
	(TestClassIterator): Removed. The test case is now a method of
	TestClassification since it tests part of the public interface of
	Classification
	(TestClassification.test_iterator): New. Used to be
	TestClassIterator effectively

2003-10-31  Jan-Oliver Wagner <jan@intevation.de>

	GUIfied the functions of the profiling extension.

	* /Extensions/profiling/__init__.py: New: Init to make this
	directory a package.

	* Extensions/profiling/profiling.py: Moved menu entries to
	the Extensions menu. Applied _() for strings.
	(profile_screen_renderer): Catch the detailed printout and present
	it in a dialog.
	(time_screen_renderer): Raise a dialog to present the result instead
	of printing it to stdout.

2003-10-31  Bernhard Herzog  <bh@intevation.de>

	* test/test_classification.py (TestClassGroupProperties)
	(TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
	(TestClassGroupSingleton, TestClassIterator, TestClassification):
	Split TestClassification into several classes, one for each class
	being tested. TestClassification itself now only tests
	Classification. This split makes changes to the tests a bit easier

2003-10-31  Bernhard Herzog  <bh@intevation.de>

	* Extensions/profiling/profiling.py: New. Extension to measure
	Thuban performance

2003-10-31  Frank Koormann <frank@intevation.de>

	Added two items to legend popup menu: Remove Layer and Show Layer Table

	* Thuban/UI/legend.py (LegendPanel._OnRemoveLayer,
	LegendPanel._OnShowTable): New event handlers, call the corresponding 
	mainwindow methods.
	(LegendTree._OnRightClick): Added items to popup menu.

2003-10-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle
	EVT_WINDOW_DESTROY
	(ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
	nothing but is convenient for the derived classes.

	* Thuban/UI/tableview.py
	(TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
	Unsubscribe the messages here not in OnClose because that might
	get called multiple times. Fixes RT #2196
	(TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
	anymore.

	* README: Update the minimum requirement for wxPython. Since we
	now use the EVT_WINDOW_DESTROY event, we need at least 2.4.0.4,
	the version in which that was introduced for all platforms

2003-10-30  Frank Koormann <frank@intevation.de>

	* Thuban/UI/join.py (JoinDialog.OnJoin): Wrapped the major parts of 
	the join process in a ThubanBeginBusyCursor, ThubanEndBusyCursor
	frame.

2003-10-30  Jan-Oliver Wagner <jan@intevation.de>

	Improved APR import extension, added further EPSG definitions
	and some cleanup regarding string class.

	* test/test_proj.py (TestProjection.test_get_projection_units_geo):
	Added test for alias 'longlat'.

	* Resources/Projections/epsg-deprecated.proj: New. Contains
	deprecated EPSG definitions.

	* Extensions/importAPR/odb.py (ODBBaseObject.TreeInfo): Added
	the variable names for objects.

	* Extensions/importAPR/apr.py (APR_BLnSym, APR_BMkSym, APR_BShSym): New.
	Copied from importAPR and provided with documentation.

	* Extensions/importAPR/importAPR.py (APR_BLnSym, APR_BMkSym, APR_BShSym):
	Moved to apr.py.
	(APR_View): Added object ref 'ITheme'.

	* Thuban/Lib/fileutil.py, Thuban/UI/proj4dialog.py: Replaced string
	split function by corresponding use of the string class method.

	* Thuban/Model/xmlwriter.py: Replaced string replace function by
	corresponding string method.

2003-10-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/baserenderer.py
	(BaseRenderer.draw_shape_layer_incrementally): Speed up the
	special case of a classification that only has the default group

2003-10-27  Bernhard Herzog  <bh@intevation.de>

	* po/fr.po, po/es.po: Updated translations from Daniel Calvelo

	* po/de.po: Update.

	* Thuban/UI/application.py
	(ThubanApplication.ShowExceptionDialog): Handle translation of the
	dialog message properly

2003-10-27  Bernhard Herzog  <bh@intevation.de>

	Rework how localization works so that we use wx's translation
	functions when running Thuban as a normal application but not when
	we don't need any UI, such as in the test suite. See the comment
	in Thuban/__init__.py for details

	* Thuban/__init__.py (_): Add one level of indirection to make the
	translation handling more flexible and to make it possible to use
	either wx's translation services or not.
	(gettext_identity, translation_function_installed)
	(install_translation_function): New function to help with this

	* Thuban/UI/__init__.py: Install the wx specific translation
	function if it's OK to do that

	* test/support.py (initthuban): Install a dummy translation
	function so that importing Thuban.UI doesn't install a wx specific
	one for which would need to import wxPython

2003-10-27  Bernhard Herzog  <bh@intevation.de>

	* HOWTO-Release: Source archives should be created first and the
	binary packages should be created from the source archives.
	There's an official debian package now so there's no need to test
	the rpm on debian anymore

2003-10-27  Bernhard Herzog  <bh@intevation.de>

	Several rendering changes:

	 - Render the selection into a separate bitmap so that only that
	   bitmap needs to be redrawn when the selection changes

	 - Render incrementally showing previews and allowing interaction
	   before rendering is complete

	 - Update the renderer interface a bit. Most parameters of
	   RenderMap are now parameters of the constructor

	* Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
	and the update region as parameters. Update the doc-string
	(BaseRenderer.render_map_incrementally): New. Generator function
	to renders the map incrementally
	(BaseRenderer.render_map): Remove the map argument (it's now in
	the constructor) and simply iterate over the
	render_map_incrementally generator to draw the map.
	(BaseRenderer.draw_shape_layer_incrementally)
	(BaseRenderer.draw_shape_layer): Renamed to
	draw_shape_layer_incrementally and changed into a generator that
	yields True every 500 shapes. Used by render_map_incrementally to
	render shape layers incrementally

	* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
	map and region parameters which are now in the constructor
	(ScreenRenderer.RenderMapIncrementally): New. Public frontend for
	the inherited render_map_incrementally.
	(BaseRenderer.draw_shape_layer): Removed.
	(ScreenRenderer.draw_selection_incrementally): New. The selection
	drawing part of the removed draw_shape_layer as a generator
	(ScreenRenderer.layer_shapes): Update because of the region
	parameter change
	(ExportRenderer.__init__): New. Extend the inherited constructor
	with the destination region for the drawing
	(ExportRenderer.RenderMap): Removed the map and region parameters
	which are now in the constructor

	* Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
	bitmap suitable for a preview in a tool
	(CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
	bitmap
	(MapPrintout.draw_on_dc): Adapt to new renderer interface
	(MapCanvas.OnPaint): Handle drawing the selection bitmap if it
	exists
	(MapCanvas.OnIdle): Update the logic to deal with incremental
	rendering and the selection bitmap
	(MapCanvas._do_redraw): Handle the instantiation of the render
	iterator and the redraws during rendering
	(MapCanvas._render_iterator): New. Generator to incrementally
	redraw both bitmaps
	(MapCanvas.Export): Adapt to new renderer interface.
	(MapCanvas.full_redraw): Reset the selection bitmap and the
	renderer iterator too
	(MapCanvas.redraw_selection): New. Force a redraw of the selection
	bitmap
	(MapCanvas.shape_selected): Only redraw the selection bitmap

	* test/test_baserenderer.py
	(TestBaseRenderer.test_polygon_no_projection)
	(TestBaseRenderer.test_raster_no_projection)
	(TestBaseRenderer.test_point_map_projection)
	(TestBaseRenderer.test_point_layer_and_map_projection)
	(TestBaseRenderer.test_point_layer_projection)
	(TestBaseRenderer.test_point_with_classification): Adapt to new
	renderer interface

2003-10-24  Bernhard Herzog  <bh@intevation.de>

	* libraries/thuban/wxproj.cpp (draw_polygon_shape)
	(point_in_polygon_shape, shape_centroid): Raise an exception if
	the shape can't be read. Previously invalid shape ids would lead
	to a segfault.

	* test/test_wxproj.py (TestShapeCentroid.test_invalid_shape_id):
	New. test whether an exception is raised for invalid shape ids

2003-10-24  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
	as alias for 'latlong'.

	* Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
	as alias for 'latlong'.

2003-10-24  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
	the projection even for the UnknownPanel.
	(UnknownProjPanel.__init__): Define the text and create the textctrl
	widget.
	(UnknownProjPanel._DoLayout): Replaced static text widget by the
	textctrl created in __init__.
	(UnknownProjPanel.SetProjection): Set the text for the text ctrl
	including the parameters of the projection.
	
2003-10-24  Jan-Oliver Wagner <jan@intevation.de>

	* Resources/Projections/epsg.proj: New. This is a list of
	EPSG codes with parameters for proj. The list has been
	generated using devtools/create_epsg.py based on the
	file nad/epsg of the proj 4.4.7 package. Four projection
	definitions have been deleted as they are not accepted by proj:
	"CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
	and "HD72 / EOV".

2003-10-22  Bernhard Herzog  <bh@intevation.de>

	Some more tweaks to the projection dialog which should fix RT
	#1886.

	* Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
	the ProjFile's messages and call the base class methods correctly
	(ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
	flag on the newly selected item too. Otherwise some other item is
	focused and the first time the focus is moved with the keyboard
	the selection moves in unexpected ways.

	* Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
	focus on the OK button, only on the projection list. That way the
	list really has the focus initially
	(ProjFrame.OnClose): Call the projection list's Destroy method to
	make it unsubscribe all messages

2003-10-21  Bernhard Herzog  <bh@intevation.de>

	Rework the projection dialog to fix a few bugs, including RT 2166
	and most of 2168

	* Thuban/UI/projlist.py: New. The class ProjectionList is a
	special wxListCtrl to show a list of projections in a more MVC
	fashion

	* Thuban/UI/projdialog.py (ProjFrame): Substantial changes
	throughout the class. The main change is to use the ProjectionList
	class instead of a normal wxListBox. Also, add an explicit
	"Unknown" projection to the projection choice control.
	(ProjPanel.__init__): Add an "unknown" ellipsoid
	(TMPanel.__init__, LCCPanel.__init__): Tweak the order of
	instantiation of the panel's controls to make the tab-order more
	natural

2003-10-21  Bernhard Herzog  <bh@intevation.de>

	* test/test_load.py (TestSingleLayer.file_contents)
	(TestSingleLayer.test): Add non-ascii characters to the titles of
	session, map and layer. This is effectively a port of the
	TestUnicodeStrings test in test_load_0_8.py which for some reason
	was only added there.

	* test/test_load_0_9.py (TestSingleLayer.file_contents)
	(TestSingleLayer.test): Same as in test_load.py: add non-ascii
	characters to the titles of session, map and layer,.

2003-10-21  Bernhard Herzog  <bh@intevation.de>

	Add EPSG projection handling to .thuban files

	* test/test_save.py (SaveSessionTest.dtd)
	(SaveSessionTest.testEmptySession)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer)
	(SaveSessionTest.test_dbf_table)
	(SaveSessionTest.test_joined_table)
	(SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
	(SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
	use a and epsg projection to test saving them

	* test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
	namespace
	(TestLayerVisibility.file_contents, TestLabels.file_contents)
	(TestLayerProjection.file_contents)
	(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
	(TestPostGISLayer.file_contents)
	(TestPostGISLayerPassword.file_contents)
	(TestLoadError.file_contents, TestLoadError.test): Update to use
	1.0-dev namespace
	(TestSingleLayer.file_contents, TestSingleLayer.test): Update to
	use 1.0-dev namespace and use an EPSG projection to test whether
	loading it works

	* test/test_load_0_9.py: New. Effectively a copy of test_load.py
	as of Thuban 0.9. These are now tests to determine whether Thuban
	can still read files generated by Thuban 0.9

	* Thuban/Model/save.py (SessionSaver.write)
	(SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
	namespace
	(SessionSaver.write_projection): Write the projection's epsg
	attribute

	* Thuban/Model/load.py (SessionLoader.__init__): Also accept the
	thuban-1.0-dev.dtd namespace
	(SessionLoader.check_attrs): Allow a callable object as conversion
	too
	(SessionLoader.start_projection, SessionLoader.end_projection)
	(SessionLoader.start_parameter): Handle the epsg attribute and
	rename a few instance variables to lower case

	* Resources/XML/thuban-1.0.dtd: New. Only difference to
	thuban-0.9.dtd is the epsg attribute for projections.

2003-10-21  Bernhard Herzog  <bh@intevation.de>

	* test/runtests.py (main): Let the user specify which tests to run
	on the command line

	* test/support.py (ThubanTestResult.getDescription): Override to
	give a better short description. The description can be used as a
	parameter to run_tests to run that particular test in isolation.

2003-10-21  Frank Koormann   <frank@intevation.de>

	Popup menu for legend. Scheduled for the 1.2 release this was too
	simple to implement: The popup menu is bound to the legend tree, while
	the events are hanlded by its anchestor, the legend panel. This
	allows reuse of all the event handlers already implemented for the 
	legend toolbar buttons.

	* Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros 
	to add handlers for the events issued by the popup menu.
 	(LegendPanel._OnToggleVisibility): Handler for toggling layer
	visibility event
    	(LegendPanel._OnProjection): Handler for layer projection event.
	(LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
	(LegendTree._OnRightClick): Event handler for right click, select item
	and pop up menu.
	(LegendTree.ToggleVisibility): Toggle layer visibility
	(LegendTree.LayerProjection): Raise layer projection dialog for
	current layer.

2003-10-21  Bernhard Herzog  <bh@intevation.de>

	* Resources/Projections/defaults.proj: Use correct DOCTYPE
	declaration. The top-level element is projectionlist not projfile

2003-10-20  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
	method to write a projfile and display a busy cursor and error
	dialogs.
	(ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
	(ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
	(ProjFrame.__FillAvailList): Translate "<None>" too and display a
	busy cursor while loading the user and system prj files.

2003-10-16  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/resource.py (projfile_cache): Introduce a cache for
	ProjFile objects
	(clear_proj_file_cache): New function to clear the cache. Mainly
	useful for use by the test suite
	(read_proj_file): Use the cache.

	* test/test_proj.py (TestProjFile): Clarify the doc-string
	(ProjFileReadTests): Update doc-string
	(ProjFileReadTests.test_get_system_proj_file): Check whether the
	system proj files is cached.
	(ProjFileLoadTestCase): New base class for the proj file tests
	derived from support.FileLoadTestCase to provide some common
	behavior.
	(TestLoadingProjFile)
	(TestLoadingProjFileWithEmptyProjectionlist.file_contents)
	(TestProjFileWithInvalidParameters.file_contents): Derive from
	ProjFileLoadTestCase
	(TestLoadingProjFile.test_caching): New. Test whether the cache
	works

2003-10-16 	Silke Reimer	<silke@intevation.de>

	* debian/*: New directory with configuration files for building a thuban
	  deb-package.

2003-10-14  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py: Execute support.run_tests when run as
	__main__ so that missing unsubscribes are detected
	(TestProjFile.tearDown): Destroy the proj_file properly

2003-10-14  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/messages.py (PROJECTION_ADDED)
	(PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
	the ProjFile objects

	* Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
	easily send messages when the projections change
	(ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
	when the change was successful

	* test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
	proj file messages
	(TestProjFile.test_add_remove)
	(TestProjFile.test_remove_non_existing)
	(TestProjFile.test_replace)
	(TestProjFile.test_replace_non_existing): Test whether the right
	messages are sent

2003-10-14  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py (TestProjFile.test): Refactor into several
	tests
	(TestProjFile.test_add_remove)
	(TestProjFile.test_remove_non_existing)
	(TestProjFile.test_replace)
	(TestProjFile.test_replace_non_existing): Some of the new
	individual test cases
	(TestProjFileSimple): New class for the rest of the test cases
	that came out of the refactoring
	(ProjFileTest): Derive from xmlsupport.ValidationTest so that the
	derived classes don't have to

2003-10-13  Bernhard Herzog  <bh@intevation.de>

	Add an optional EPSG code to the projection objects and extend the
	.proj file format accordingly.

	* Resources/XML/projfile.dtd (element projection): Add epsg
	attribute

	* Thuban/Model/proj.py (Projection.__init__): New parameter and
	instance variable epsg. Update doc-string
	(Projection.EPSGCode, Projection.Label): New methods to provide
	access to EPSG code and a label for use in dialogs

	* Thuban/Model/resource.py (ProjFileReader.start_projection)
	(ProjFileReader.end_projection, ProjFileSaver.write_projfile):
	Handle the epsg code attribute when reading or writing proj files

	* Thuban/UI/projdialog.py (ProjFrame._OnSave)
	(ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
	(ProjFrame.__FillAvailList): Use the projection's Label method to
	get the string for the list box

	* test/test_proj.py (TestProjection.test_label)
	(TestProjection.test_label_epsg)
	(TestProjection.test_epsgcode_for_non_epsg_projection)
	(TestProjection.test_epsgcode_for_real_epsg_projection): New tests
	for the label and EPSGCode methods
	(WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
	(WriteProjFileTests.test_write_empty_file): Create the ProjFile
	objects in the test cases and put the expected contents into the
	test case methods too. Update doTestWrite accordingly
	(TestLoadingProjFile)
	(TestLoadingProjFileWithEmptyProjectionlist): New classes with the
	read tests from TestProjFile.
	(TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
	tests are now in the new classes.
	(sample_projfile, sample_projfile_data)
	(sample_projfile2, sample_projfile_data2): Removed. Not used
	anymore.
	(TestProjFile.test_read_unreadable_file): No need to reset the
	permissions at the end anymore since we use a unique filename

2003-10-13  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py: Some more refactoring of the test cases
	(ProjFileTest): New base class for the proj file tests.
	(TestProjFile): Derive from ProjFileTest
	(TestProjFile.test_read_unreadable_file)
	(TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
	the new filename method to get a unique filename
	(TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
	(WriteProjFileTests): New class for proj file write tests.
	Contains the write test that were in TestProjFile originally.

2003-10-13  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py (TestProjFile.testRead)
	(TestProjFile.test_read_non_existing_file)
	(TestProjFile.test_read_unreadable_file)
	(TestProjFile.test_read_empty_file): Split into several methods.

2003-10-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/sizers.py: New file with custom sizers.

	* Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
	all projection type specific panels and put them into a
	NotebookLikeSizer. This way the dialog doesn't change its size
	when a different projection is selected
	(ProjFrame.__init__): Rename projection_panels
	projection_panel_defs and reuse projection_panels for a list of
	the instantiated panels.
	(ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
	(ProjFrame.__DoOnProjChoice): Changes due to the new handling of
	the panels
	(UnknownProjPanel._DoLayout): Place the newlines in the message
	differently to make the panel narrower.
	(TMPanel._DoLayout): Layout the parameters in one column.

2003-10-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
	that contains all the setup for the dialog's widgets, layout and
	event handling.
	(__): Call build_dialog to build the dialog.
	(ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
	Their functionality is now in build_dialog
	(ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
	(ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
	(ProjFrame.__DoOnProjChoice): Small updates due to slightly
	different widget names and hierarchy introduced with build_dialog.

2003-10-10  Bernhard Herzog  <bh@intevation.de>

	* README: Fix typo.

2003-10-09  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
	projection is already in the list. This is *a lot* faster when
	loading files with hundreds of projections since it saves a linear
	search. OTOH this will allow adding the same projection to the
	user.proj file multiple times in the projection dialog but we'll
	deal with that later

2003-10-09  Jan-Oliver Wagner <jan@intevation.de>

	* devtools: New. Directory for developer tools that are not intended
	for the regular user.

	* devtools/create_epsg.py: New. Convert the epsg file of proj into
	a python .proj file.

2003-10-09  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py
	(TestProjection.test_get_parameter_without_equals_sign): New. Test
	whether GetParameter handles parameters without "=" sign correctly

	* Thuban/Model/proj.py (Projection.GetParameter): Handle
	parameters that do not contain a "=". Update the doc-string

2003-10-08  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
	length limit on the projname text control

2003-10-08  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py (TestProjection.test_get_projection_units_geo)
	(TestProjection.test_get_projection_units_normal): New. Tests for
	the Projection.GetProjectedUnits method

2003-10-08  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
	Added missing 'val' parameter.

2003-10-08  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
	projection type of the currently selected projection is not known,
	i.e. there's no panel for it, use the UnknownProjPanel
	(ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
	the actual replacing of the proj panel into the new method
	_show_proj_panel.
	(UnknownProjPanel): Add doc-string.
	(UnknownProjPanel._DoLayout): Insert a newline into the text so
	that the panel is not so wide.

2003-10-08  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/resource.py (read_proj_file): Return the warnings
	too. Update the doc-string
	(get_proj_files): Removed. It wasn't used anywhere
	(get_system_proj_files, get_system_proj_file): Rename to
	get_system_proj_file and return the ProjFile object and not a list
	of ProjFile objects. Update the callers.
	(get_user_proj_files, get_user_proj_file): Rename to
	get_user_proj_file return the ProjFile object and not a list of
	ProjFile objects. Update the callers.
	(ProjFileReader.__init__): New instance variable for the warnings.
	Rename the __pf ivar to projfile. Update the methods referring to
	__pf
	(ProjFileReader.end_projection): Catch any errors raised when
	instantiating the projection and record that as an error. The
	projection will not be in the final ProjFile object.
	(ProjFileReader.GetWarnings): New method to return the warnings.

	* Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
	show the warnings from the projfile reader
	(ProjFrame._OnImport): Deal with any warnings returned by
	read_proj_file
	(ProjFrame.__FillAvailList): Deal with any warnings returned by
	get_system_proj_file or get_user_proj_file.

	* test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
	(TestProjFileWithInvalidParameters.file_contents): New test cases
	to test whether read_proj_file handles invalid projection
	parameters correctly
	(TestProjFile.test_get_system_proj_file): New. Simple test for
	resource.get_system_proj_file

2003-10-07  Bernhard Herzog  <bh@intevation.de>

	* test/test_derivedshapestore.py
	(TestDerivedShapeStoreExceptions.tearDown): Clear the session
	properly so that the temporary directories get deleted correctly

2003-10-06  Bernhard Herzog  <bh@intevation.de>

	Handle the title changes in a proper MVC way.

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
	canvas' TITLE_CHANGED messages
	(MainWindow.update_title): New. Update the main window's title
	(MainWindow.__SetTitle): Removed. Use update_title instead.
	(MainWindow.SetMap): Use update_title instead of __SetTitle
	(MainWindow.RenameMap): Do change the window title explicitly
	here. That's handled in a proper MVC way now.
	(MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
	messages

	* Thuban/Lib/connector.py (Conduit): New class to help classes
	that forward messages

	* Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
	(ViewPort): Derive from Conduit instead of Publisher
	(ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
	when calling the inherited versions
	(ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
	methods to subscribe and unsubscribe map messages
	(ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
	handle the map subscriptions
	(ViewPort.Map, ViewPort.map_projection_changed) 
	(ViewPort.layer_projection_changed): Add or update doc-strings

	* test/test_connector.py (TestPublisher.test_issue_simple): Fix
	typo
	(MyConduit): Helper class for the Conduit test.
	(TestConduit): Test cases for Conduit

	* test/test_connector.py: Use support.run_tests as main.

	* test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
	the TITLE_CHANGED messages
	(ViewPortTest.test_forwarding_title_changed): New test to check
	whether the viewport forwards the map's TITLE_CHANGED messages
	(TestViewportWithPostGIS.tearDown): Call the map's Destroy method
	after the port's because the latter may require a still functional
	map.

2003-10-06  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.maps_changed): Add
	doc-string

2003-10-06  Bernhard Herzog  <bh@intevation.de>

	* test/test_viewport.py (ViewPortTest.setUp)
	(SimpleViewPortTest.test_init_with_size): Move the test for the
	initial size as a constructor parameter from ViewPortTest.setUp
	method to a new separate test in SimpleViewPortTest.

2003-10-06  Bernhard Herzog  <bh@intevation.de>

	* test/test_viewport.py (MockView): New class derived from
	ViewPort with a mock implementation of GetTextExtent to be used in
	the test cases
	(ViewPortTest.setUp): Use MockView instead of ViewPort

	* Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
	into what would be a "pure virtual function" in C++: always raise
	NotImplementedError. Mock implementations for test cases don't
	belong into the real code

2003-10-02  Bernhard Herzog  <bh@intevation.de>

	* test/test_layer.py (TestLayer.test_empty_layer): Explicitly
	close the dbf file we create so that it's contents have been
	written properly.

	* libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
	libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
	Update to shapelib 1.2.10

2003-10-01  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
	it annoys lintian which warns about these files not being
	executable. The #! isn't necessary here since if you absolutely
	must execute them you can always say "python <filename>".

2003-09-26  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
	only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
	is ported to a newer the import will fail, so it should be noticed
	immediately that this function is gone.
	Fixes RT#1919

2003-09-26  Bernhard Herzog  <bh@intevation.de>

	Add a DTD for the projection files and make thuban write valid
	projection files

	* Resources/XML/projfile.dtd: New. DTD for thuban's projection
	files

	* Thuban/Model/resource.py (ProjFileSaver.write): Use
	'projectionlist' as the name in the document type declaration so
	that it matches the element type of the root element.

	* test/test_proj.py (sample_projfile, sample_projfile2): Use
	'projectionlist' as the name in the document type declaration just
	as it is done now in the files thuban would write
	(sample_projfile, sample_projfile_data): Fix spelling of
	"Mercator"
	(TestProjFile.doTestWrite): Validate the written and the expected
	XML data
	(TestProjFile): Derive from ValidationTest so that we can run xml
	validation tests

2003-09-24  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
	modify the list returned by map.Layers() in place since it is the
	actual list of layers used by the map.

2003-09-23  Jan-Oliver Wagner <jan@intevation.de>

	* Doc/manual/thuban-manual.xml: Added subsection to chapter
	Extensions to describe the extensions coming with the Thuban
	standard package (gns2shp and importAPR).

2003-09-23  Bernhard Herzog  <bh@intevation.de>

	* libraries/thuban/wxproj.cpp (project_point): if there's an
	inverse but no forward projection, convert to degrees after
	applying the inverse projection. Fixes RT#2096

	* test/test_wxproj.py: New. Test cases for wxproj.so. One test
	implicitly tests for the fix to RT#2096

	* test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
	Check that the sequences have the same lengths

	* Resources/Projections/defaults.proj (Geographic projection): Use
	a much more precise value for the to_meter attribute.

2003-09-22  Bernhard Herzog  <bh@intevation.de>

	* test/support.py (initthuban): Make sure to unset the LANG env.
	var. so that tests that compare translated strings work. Solves RT
	#2094

2003-09-22  Jan-Oliver Wagner <jan@intevation.de>

	Small improvement of APR import.

	* Extensions/importAPR/test/test_apr.py (aprTest.test_LClass): 
	Added tests for text-ranges.

	* Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
	returns a string object if the range is based on text.

	* Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
	range retrieval.

2003-09-22  Jan-Oliver Wagner <jan@intevation.de>

	Initial version of the importAPR extension which is in
	experimental state.

	* /Extensions/importAPR/, /Extensions/importAPR/samples/,
	/Extensions/importAPR/test/: New directories.

	* /Extensions/importAPR/samples/README: New: Howto load the samples.

	* /Extensions/importAPR/samples/iceland.apr: New: A sample APR
	file which refers to the Thuban Iceland demo data.

	* /Extensions/importAPR/test/README: New: Howto execute the tests.

	* /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.

	* /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
	as in '.apr'-files.

	* /Extensions/importAPR/odb.py: New: Classes for generic ArcView
	ODB Objects as in '.apr', '.avl' and other files.

	* /Extensions/importAPR/__init__.py: New: Init to make this
	directory a package.

	* /Extensions/importAPR/importAPR.py: New: Import a ArcView
	project file (.apr) and convert it to Thuban.

2003-09-22  Jan-Oliver Wagner <jan@intevation.de>

	* Extensions/gns2shp.gns2shp.py: The main module of gns2shp.

2003-09-19  Jan-Oliver Wagner <jan@intevation.de>

	* Doc/manual/thuban-manual.xml: Extended section 'Installation'
	with description on RPM installation and RPM binary package
	creation.

2003-09-18  Bernhard Herzog  <bh@intevation.de>

	* setup.py (data_files): Only add the mo files if the Locales
	directory actually exists, so that setup.py works with a fresh CVS
	checkout

2003-09-12  Jan-Oliver Wagner <jan@intevation.de>

	* Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
	in viewport, not anymore in view

2003-09-04  Jan-Oliver Wagner <jan@intevation.de>

	Introducing first Extension (gns2shp).

	* Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.

	* Extensions/__init__.py: New. init to make this dir a package.

	* Extensions/gns2shp/__init__.py: New. init to make this dir a package.

	* Extensions/gns2shp/test/README: New. some info on this test directory.

	* Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).

	* Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
	of Shapefile from GNS text file format

2003-09-03  Jan-Oliver Wagner <jan@intevation.de>

	Fix/workaround for bug #2019:
	https://intevation.de/rt/webrt?serial_num=2019

	* Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
	(IdentifyView.__init__): Added another button that allows to
	stop the identify mode.
	(IdentifyView.OnStop): New. Stops the identify mode.

2003-09-03  Jan-Oliver Wagner <jan@intevation.de>

	Introducing a new exception dialog that allows to exit the
	application immediately.
	This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060

	* Thuban/UI/exceptiondialog.py: New. A special exception dialog.

	* Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
	Made strings available to translations. Exchanged the simple
	ScrolledMessageDialog by the new ExceptionDialog.

2003-09-01  Bernhard Herzog  <bh@intevation.de>

	* NEWS: New. Summary of changes and release notes.

	* MANIFEST.in: Add NEWS

2003-09-01  Bernhard Herzog  <bh@intevation.de>

	* MANIFEST.in: Correct the include statement for the mo-files and
	include the documentation too.

	* setup.py (data_files): Add the .mo files
	(setup call): Up to version 0.9.0

2003-09-01  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
	parameter list to just parent and session
	(ChooseDBTableDialog.__set_properties): Removed. Setting the
	selection of empty list boxes is not allowed (and produces C++
	assertion errors) and the rest of the setup is better done in
	__init__ anyway.
	(ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
	(ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
	builtins True/False for booleans to avoid warnings from wxPython

	* Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
	ChooseDBTableDialog constructor parameters.

2003-09-01  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/postgisdb.py
	(PostGISTable): Extend doc-string
	(PostGISTable._fetch_table_information): Set the column index
	correctly, pretending ignored columns don't exist.

	* test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
	for postgis tables with data types not yet supported by thuban.

2003-08-29  Bernhard Herzog  <bh@intevation.de>

	* HOWTO-Release: Tweak item about running the tests.

2003-08-29  Jan-Oliver Wagner <jan@intevation.de>

	* /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.

2003-08-29  Bernhard Herzog  <bh@intevation.de>

	Add some missing parameters to projections. Proj complains about
	them on windows but for some reason not on Linux.

	* test/test_save.py (SaveSessionTest.testLayerProjection): Add
	missing required projection parameters

	* test/test_proj.py (TestProjFile.test): Add missing required
	projection parameters

	* test/test_load_0_8.py (TestLayerProjection.file_contents)
	(TestLayerProjection.test): Add missing required projection
	parameters and tests for them

	* test/test_load.py (TestLayerProjection.file_contents)
	(TestLayerProjection.test): Add missing required projection
	parameters and tests for them

	* test/test_layer.py (TestLayer.test_base_layer): Add missing
	required projection parameters

2003-08-29  Bernhard Herzog  <bh@intevation.de>

	* libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
	access the pj_errno because directly accessing pj_errno doesn't
	work on windows if the proj library is in a DLL

	* libraries/pyprojection/Projection_wrap.c: Update from Projection.i

2003-08-28  Bernhard Herzog  <bh@intevation.de>

	* test/test_proj.py: Import things from Thuban after calling
	initthuban

	* test/test_load.py (LoadSessionTest.filenames): New class
	variable with the filename attributes to normalize
	(LoadSessionTest.check_format): Pass self.filenames to
	sax_eventlist to normalize the filename attributes

	* test/xmlsupport.py: Add cvs keywords
	(SaxEventLister.__init__): New parameter filenames which indicates
	attributes that contain filenames
	(SaxEventLister.startElementNS): Normalize the filename attributes
	with os.path.normpath
	(sax_eventlist): New parameter filenames to pass through to
	SaxEventLister

	* test/test_derivedshapestore.py: Make this file callable as a
	program to execute the tests
	(TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
	the session to self.session so that it gets destroyed properly

	* test/test_layer.py (TestLayer.tearDown): Call the session's
	Destroy method

	* test/test_map.py (TestMapBase.tearDown): Destroy self.session
	too if it exists
	(TestMapAddLayer.test_add_layer): Bind the session to self.session
	so that it gets destroyed properly

	* test/postgissupport.py (reason_for_not_running_tests): Add a
	test for the existence of popen2.Popen4.

	* test/test_save.py (SaveSessionTest.tearDown): New. Provide a
	reliable way to destroy the sessions created in the test cases
	(SaveSessionTest.test_dbf_table): Bind the session to self.session
	so that it gets destroyed properly
	(SaveSessionTest.testLayerProjection): Bind the session to
	self.session so that it gets destroyed properly

	* test/test_session.py (UnreferencedTablesTests.tearDown): Make
	sure that the session is destroyed properly

	* test/test_shapefilestore.py: Make this callable as a program to
	execute the tests

	* test/test_scalebar.py: Remove unnecessary import of _ from
	Thuban

	* test/support.py (print_garbage_information): Call initthuban
	here because it may be called indirectly from test cases that test
	test support modules which do not use anything from thuban itself
	(ThubanTestProgram.runTests): Remove unnecessary debug print

2003-08-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/version.py (longversion): Update to 0.9

	* Thuban/UI/mainwindow.py: Remove some unused imports

	* README: Add section about required additional software. Add date
	and revision CVS keywords

	* HOWTO-Release: Add item about the translations. Add date and
	revision CVs keywords and change formatting to match README a bit
	better

	* po/de.po: Update for 0.9

	* test/README: Tweak the wording a little because many tests are
	not really unittest.

2003-08-27  Bernhard Herzog  <bh@intevation.de>

	As preparation for the 0.9 release, switch thuban files to a
	non-dev namespace

	* Thuban/Model/save.py (SessionSaver.write_session): Write files
	with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
	namespace

	* Thuban/Model/load.py (SessionLoader.__init__): Accept the
	http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too

	* test/test_save.py (SaveSessionTest.dtd)
	(SaveSessionTest.testEmptySession)
	(SaveSessionTest.testSingleLayer)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer)
	(SaveSessionTest.test_dbf_table)
	(SaveSessionTest.test_joined_table)
	(SaveSessionTest.test_save_postgis): Update for new namespace

	* test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
	(TestLayerVisibility.file_contents, TestLabels.file_contents)
	(TestLayerProjection.file_contents)
	(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
	(TestPostGISLayer.file_contents)
	(TestPostGISLayerPassword.file_contents)
	(TestLoadError.file_contents, TestLoadError.test): Update for new
	namespace

2003-08-27  Bernhard Herzog  <bh@intevation.de>

	Make the table interface distinguish between row ids (an integer
	that uniquely identifies a row) and row ordinals (a simple row
	count from 0 to NumRows() - 1)

	* Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
	(PostGISTable.RowOrdinalToId): New methods to conver between row
	ids and row ordinals
	(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
	parameter row_is_ordinal to indicate whether the row parameter is
	the row id or the ordinal

	* Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
	(TransientTableBase.RowOrdinalToId)
	(AutoTransientTable.RowIdToOrdinal)
	(AutoTransientTable.RowOrdinalToId): Same new methods as in
	PostGISTable.
	(TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
	(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
	Same new parameter as in PostGISTable.

	* Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
	(DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
	(MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
	(DBFTable.ReadValue, DBFTable.ReadRowAsDict)
	(MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
	parameter as in PostGISTable.

	* Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
	(DataTable.RowOrdinalToId): New methods to convert between row ids
	and row ordinals.
	(TableGrid.SelectRowById): New method to select a row based on its
	ID as opposed to its ordinal
	(DataTable.GetValue, TableGrid.OnRangeSelect)
	(TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
	(QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
	(LayerTableFrame.__init__): Convert between row ids and row
	ordinals as appropriate

	* test/postgissupport.py (PostGISDatabase.__init__): Add
	doc-string.
	(PostGISDatabase.initdb): The optional third item in a tuple in
	tables is now a (key, value) list with additional arguments to
	pass to upload_shapefile
	(upload_shapefile): New parameter gid_offset to allow gids that
	are not the same as the shapeids in the shapefile
	(PostgreSQLServer.get_default_static_data_db): Use the new
	gid_offset to make the gids in landmarks 1000 higher than the
	shapeids in the shapefile

	* test/test_viewport.py
	(TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
	new shapeids in the landmarks table

	* test/test_transientdb.py
	(TestTransientTable.run_iceland_political_tests)
	(TestTransientTable.test_transient_joined_table): Add tests for
	the new table methods and new keywords arguments.

	* test/test_postgis_db.py
	(TestPostGISTable.test_read_row_as_dict_row_count_mode)
	(TestPostGISTable.test_read_value_row_count_mode)
	(TestPostGISTable.test_row_id_to_ordinal)
	(TestPostGISTable.test_row_oridnal_to_id): New test for the new
	table methods and the new arguments
	(TestPostGISShapestorePoint.test_shapes_in_region)
	(TestPostGISShapestorePoint.test_shape_raw_data)
	(TestPostGISShapestorePoint.test_shape_points)
	(TestPostGISShapestorePoint.test_shape_shapeid)
	(TestPostGISShapestorePoint.test_all_shapes)
	(TestPostGISTable.test_simple_query)
	(TestPostGISTable.test_simple_query)
	(TestPostGISTable.test_simple_query)
	(TestPostGISTable.test_read_value)
	(TestPostGISTable.test_read_row_as_dict): Adapt to the new
	shapeids in the landmarks table

	* test/test_memory_table.py
	(TestMemoryTable.test_read_row_as_dict_row_count_mode)
	(TestMemoryTable.test_read_value_row_count_mode)
	(TestMemoryTable.test_row_id_to_ordinal)
	(TestMemoryTable.test_row_oridnal_to_id): New test for the new
	table methods and the new arguments

	* test/test_dbf_table.py
	(TestDBFTable.test_read_row_as_dict_row_count_mode)
	(TestDBFTable.test_read_value_row_count_mode)
	(TestDBFTable.test_row_id_to_ordinal)
	(TestDBFTable.test_row_oridnal_to_id): New test for the new table
	methods and the new arguments

2003-08-26  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
	more postgis specific but much faster method to get the bounding
	box

2003-08-26  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/postgisdb.py (PostGISTable.Title)
	(PostGISShapeStore.AllShapes): Add these missing methods.
	(PostGISShapeStore.ShapesInRegion): No need to raise
	StopIteration. We can simply return

	* test/test_postgis_db.py (TestPostGISTable.test_title)
	(TestPostGISShapestorePoint.test_all_shapes): New tests for the
	new methods

2003-08-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.

	* test/test_postgis_db.py (PolygonTests): New class containing
	those tests from TestPostGISShapestorePolygon that can also be
	used to test MUTLIPOLYGON tables
	(TestPostGISShapestorePolygon): Most tests are now in PolygonTests
	so derive from that
	(TestPostGISShapestoreMultiPolygon): New class with tests for
	MUTLIPOLYGON tables

	* test/postgissupport.py (PostGISDatabase.initdb): Allow the
	tables argument to have tuples with three items to override the
	WKT type used.
	(PostgreSQLServer.get_default_static_data_db): Use the above to
	create a polygon table with MUTLIPOLYGONs
	(point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
	(arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
	coords_to*
	(coords_to_multipolygon): New. Convert to MUTLIPOLYGON
	(wkt_converter): New. Map WKT types to converters
	(upload_shapefile): New parameter force_wkt_type to use a
	different WKT type than the default

2003-08-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py
	(ThubanApplication.run_db_param_dialog): New. Suitable as a
	db_connection_callback. Main difference is that the dialog run
	from this method doesn't have a parent so it can be used even when
	there is no main window
	(ThubanApplication.OpenSession): Use self.run_db_param_dialog if
	no db_connection_callback was given. This way the dialog pops up
	even when the .thuban file was given as a command line parameter.

2003-08-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
	before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
	which leads to an effectively frozen X session because the user
	can only interact with the dialog but the mouse is still grabbed
	by the canvas.
	Also, call the tool's Hide method before MouseLeftUp because
	MouseLeftUp may change the tool's coordinates.

2003-08-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
	LoadCancelled exceptions and handle them by returning immediately.

2003-08-25  Bernhard Herzog  <bh@intevation.de>

	GUI part of loading sessions with postgis connections which may
	require user interaction to get passwords or updated parameters

	* Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
	bit nucer and be more generic.
	(DBFrame.OnAdd): Adapt to new DBDialog interface

	* Thuban/UI/application.py (ThubanApplication.OpenSession): New
	optional parameter db_connection_callback which is passed to
	load_session.

	* Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
	Suitable as a db_connection_callback
	(MainWindow.OpenSession): Use self.run_db_param_dialog as the
	db_connection_callback of the application's OpenSession method


2003-08-25  Bernhard Herzog  <bh@intevation.de>

	Basic loading of sessions containing postgis connections:

	* Thuban/Model/load.py (LoadError): Add doc-string
	(LoadCancelled): New exception class to indicate a cancelled load
	(SessionLoader.__init__): Add the db_connection_callback parameter
	which will be used by the loader to get updated parameters and a
	password for a database connection
	(SessionLoader.__init__): Add the new XML elements to the
	dispatchers dictionary
	(SessionLoader.check_attrs): Two new conversions, ascii to convert
	to a byte-string object and idref as a generic id reference
	(SessionLoader.start_dbconnection)
	(SessionLoader.start_dbshapesource): New. Handlers for the new XML
	elements
	(load_session): Add the db_connection_callback to pass through the
	SessionLoader

	* test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
	New classes to test loading of sessions with postgis database
	connections.

2003-08-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
	replace it and the comment with __BuildDate__ by the Source: and
	Id: cvs keywords as used in the other files.

2003-08-25  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
	LoadError when a required attribute is missing. The code used to
	be commented out for some reason, but probably should have been
	active.

	* test/test_load.py (TestLoadError.test): Test the message in the
	LoadError too to make sure it really is about the missing
	attribute

2003-08-22  Bernhard Herzog  <bh@intevation.de>

	* test/test_save.py (SaveSessionTest.test_dbf_table) 
	(SaveSessionTest.test_joined_table): Add XML validation tests.

2003-08-22  Bernhard Herzog  <bh@intevation.de>

	Implement saving a session with a postgis connection

	* Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
	elements for database connections and shapestores using db
	connections
	(session): Add the dbconnections to the content model

	* Thuban/Model/save.py (SessionSaver.write_db_connections): New.
	Write the db connections
	(SessionSaver.write_session): Call write_db_connections to write
	the connection before the data sources
	(SessionSaver.write_data_containers): Handle postgis shapestores

	* test/test_save.py (SaveSessionTest.thubanids)
	(SaveSessionTest.thubanidrefs): Update for new DTD
	(SaveSessionTest.test_save_postgis): New. Test saving a session
	with postgis connections

	* Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
	(PostGISTable.TableName): New accessor methods for the connection
	and table name

	* test/test_postgis_db.py (TestPostGISTable.test_dbconn)
	(TestPostGISTable.test_dbname): New methods to test the new
	PostGISConnection methods

2003-08-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/postgisdb.py (ConnectionError): New exception class
	for exceptions occurring when establishing a Database connection
	(PostGISConnection.connect): Catch psycopg.OperationalError during
	connects and raise ConnectionError.

	* test/test_postgis_db.py (TestPostgisDBExceptions): New class for
	tests for database exceptions

2003-08-22  Bernhard Herzog  <bh@intevation.de>

	Prepare the test suite for tests with required authentication

	* test/postgissupport.py (PostgreSQLServer.__init__): Add instance
	variables with two predefined users/passwords, one for the admin
	and one for a non-privileged user.
	(PostgreSQLServer.createdb): Pass the admin name to initdb and add
	the non-privileged user to the database and set the admin password
	(PostgreSQLServer.wait_for_postmaster): Use the admin user name.
	Better error reporting
	(PostgreSQLServer.connection_params)
	(PostgreSQLServer.connection_string): New methods to return
	information about how to connect to the server
	(PostgreSQLServer.execute_sql): New. Convenience method to execute
	SQL statements
	(PostgreSQLServer.require_authentication): Toggle whether the
	server requires authentication
	(PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
	Add or alter users
	(PostGISDatabase.initdb): Pass the admin name one the
	subprocesses' command lines. Grant select rights on
	geometry_columns to everybody.
	(upload_shapefile): Use the admin name and password when
	connecting. Grant select rights on the new table to everybody.

	* test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
	server's new methods to get the connection parameters.

	* test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
	(TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
	server's new methods to get the connection parameters.

	* test/test_postgis_db.py
	(TestPostGISConnection.test_gis_tables_empty)
	(TestPostGISConnection.test_gis_tables_non_empty)
	(PostGISStaticTests.setUp): Use the server's new methods to get
	the connection parameters.

2003-08-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/about.py (About.__init__): Add the psycopg version.

	* Thuban/version.py: Add psycopg version

	* Thuban/Model/postgisdb.py (psycopg_version): New. Return the
	version of the psycopg module

2003-08-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
	(DBFrame.OnEdit): Removed because it's not used and wouldn't work
	at the moment. The functionality should probably be implemented
	some time, though.
	(DBFrame.OnRemove): Display a message if the connection can't be
	removed because it's still in use.

2003-08-22  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/about.py (About.__init__): split up the huge about
	text into elements/lists for easier translation. This fixes bug
	https://intevation.de/rt/webrt?serial_num=2058
	Also, made some forgotten string available for the i18n.

2003-08-21  Bernhard Herzog  <bh@intevation.de>

	Make postgis support really optional including insensitive menu
	items.

	* Thuban/Model/postgisdb.py (has_postgis_support): New. Return
	whether the postgis is supported.

	* Thuban/UI/dbdialog.py: Put the psycopg import into try..except
	to make postgis support optional

	* Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
	version of Thuban.Model.postgisdb.has_postgis_support
	(database_management command): Make it only sensitive if postgis
	is supported.

2003-08-21  Jan-Oliver Wagner <jan@intevation.de>

	* Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
	(section Adding and Removing Layers): Added text and described
	multi-selection.
	(chapter Extensions): New.

2003-08-21  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
	settings to allow multiple files to load into the map.
	Also reduced selection to *.shp as a default.

2003-08-20  Bernhard Herzog  <bh@intevation.de>

	Add dialogs and commands to open database connections and add
	database layers.

	* Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
	method to open the database connection management dialog
	(MainWindow.AddDBLayer): New method to add a layer from a database
	(_has_dbconnections): New helper function to use for sensitivity
	(database_management command, layer_add_db command): New commands
	that call the above new methods.
	(main_menu): Add the new commands to the menu.

	* Thuban/Model/postgisdb.py (PostGISConnection.__init__)
	(PostGISConnection.connect): Establish the actual connection in a
	separate method and call it in __init__. This makes it easier to
	override the behavior in test cases
	(PostGISConnection.BriefDescription): New method to return a brief
	description for use in dialogs.

	* test/test_postgis_db.py (NonConnection): DB connection that
	doesn't actually connect
	(TestBriefDescription): New class with tests for the new
	BriefDescription method

2003-08-19  Jan-Oliver Wagner <jan@intevation.de>

	Moved anything from extensions to libraries.

	* libraries: New.

	* libraries/ pyprojection, pyshapelib, shapelib, thuban: New.

	* libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
	Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
	been moved here from thuban/extensions/pyprojection/
	See there in the Attic for the older history.

	* libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
	dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
	shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
	have been moved here from thuban/extensions/pyshapelib/
	See there in the Attic for the older history.

	* libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
	files have been moved here from thuban/extensions/shapelib/
	See there in the Attic for the older history.

	* libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
	gdalwarp.cpp, wxproj.cpp: These files have been moved here from
	thuban/extensions/thuban/
	See there in the Attic for the older history.

	* MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.

	* extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
	gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.

	* extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
	Moved to libraries/shapelib.

	* extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
	shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
	ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
	Moved to libraries/pyshapelib.

	* extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
	LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
	Moved to libraries/pyprojection.

	* extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.

	* extensions: Removed.

2003-08-19  Bernhard Herzog  <bh@intevation.de>

	* test/test_viewport.py (ViewPortTest): We don't use the
	facilities of FileTestMixin so don't derive from it.
	(TestViewportWithPostGIS): New class with tests for using a
	viewport on a map with postgis layers.

2003-08-19  Bernhard Herzog  <bh@intevation.de>

	Add the db connection management to the session.

	* Thuban/Model/session.py (Session.__init__): New instance
	variable db_connections
	(Session.AddDBConnection, Session.DBConnections)
	(Session.HasDBConnections, Session.CanRemoveDBConnection)
	(Session.RemoveDBConnection): New methods to manage and query the
	db connections managed by the session
	(Session.OpenDBShapeStore): New method to open a shapestore from a
	db connection

	* Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
	messages for the db connection handling in the session

	* test/test_postgis_session.py: New. test cases for the session's
	db connection handling with postgis connections

2003-08-19  Bernhard Herzog  <bh@intevation.de>

	Add very basic postgis database support and the corresponding test
	cases. The test cases require a PostgreSQL + postgis installation
	but no existing database. The database will be created
	automatically by the test cases

	* test/README: Add note about skipped tests and the requirements
	of the postgis tests.

	* Thuban/Model/postgisdb.py: New. Basic postgis database support.

	* test/test_postgis_db.py: New. Test cases for the postgis
	support.

	* Thuban/Model/wellknowntext.py: New. Parser for well-known-text
	format

	* test/test_wellknowntext.py: New. Test cases for the
	wellknowntext parser

	* test/postgissupport.py: New. Support module for tests involving
	a postgis database.

	* test/support.py (execute_as_testsuite): Shut down the postmaster
	if it's still running after the tests

	* Thuban/Model/data.py (RAW_WKT): New constant for raw data in
	well known text format

2003-08-19  Jan-Oliver Wagner <jan@intevation.de>

	* Examples/simple_extensions/hello_world.py: New. Raises a Hello World
	message dialog.

2003-08-18  Bernhard Herzog  <bh@intevation.de>

	* test/support.py (ThubanTestResult.printErrors): Indent the
	reason for the skips in the output to make it a bit more readable.
	(execute_as_testsuite): New helper function to run a test suite
	and print some more information.
	(run_tests): Use execute_as_testsuite to run the tests

	* test/runtests.py (main): Use execute_as_testsuite to run the
	tests

2003-08-18  Bernhard Herzog  <bh@intevation.de>

	Fix some bugs in Thuban and the test suite that were uncovered by
	changes introduced in Python 2.3:

	* Thuban/Model/table.py (DBFTable.__init__): Make sure the
	filename is an absolute name

	* Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
	filename is an absolute name

	* test/test_save.py (SaveSessionTest.testRasterLayer): Use a
	unique filename to save to and use the correct relative filename
	in the expected output.
	(SaveSessionTest.test_dbf_table): Use the correct relative
	filename in the expected output.

	* test/test_layer.py (TestLayer.test_raster_layer): Update the
	test to check whether the filename is absolute.

2003-08-18  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/about.py (About.__init__): Added Silke Reimer.

2003-08-15  Bernhard Herzog  <bh@intevation.de>

	Change the way shapes are returned by a shape store. The
	ShapesInRegion method returns an iterator over actual shape
	objects instead of a list of shape ids.

	* Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
	id.
	(ShapefileStore.ShapesInRegion): Return an iterator over the
	shapes which yields shape objects instead of returning a list of
	shape ids
	(ShapefileStore.AllShapes): New. Return an iterator over all
	shapes in the shape store
	(DerivedShapeStore.AllShapes): New. Like in ShapefileStore

	* Thuban/Model/layer.py (Layer.ShapesInRegion): Update
	doc-string.

	* Thuban/UI/baserenderer.py
	(BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
	layer_shapes and make it return an iterator containg shapes
	instead of a list of ids.
	(BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
	layer_shapes() change

	* Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
	(ScreenRenderer.layer_shapes): Rename as in BaseRenderer

	* Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
	changes in the ShapesInRegion return value.
	(ViewPort._get_hit_tester): Remove commented out code

	* test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
	new return value.
	(SimpleShapeStore.AllShapes): New. Implement this method too.

	* test/test_layer.py (TestLayer.test_arc_layer)
	(TestLayer.test_polygon_layer, TestLayer.test_point_layer)
	(TestLayer.test_point_layer_with_projection)
	(TestLayer.test_derived_store): Adapt to changes in the
	ShapesInRegion return value.

	* test/test_shapefilestore.py
	(TestShapefileStoreArc.test_shapes_in_region)
	(TestShapefileStorePolygon.test_shapes_in_region)
	(TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
	in the ShapesInRegion return value.
	(TestShapefileStorePoint.test_all_shapes)
	(TestShapefileStoreArc.test_shape_shapeid): New tests for the new
	methods

	* test/test_derivedshapestore.py
	(TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
	the ShapesInRegion return value.
	(TestDerivedShapeStore.test_all_shapes)
	(TestDerivedShapeStore.test_shape_shapeid): New tests for the new
	methods

2003-08-15  Bernhard Herzog  <bh@intevation.de>

	Make the renderers deal correctly with raw vs. python level
	representation of shape geometries

	* Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
	Return a flag useraw in addition to the callable and the parameter
	to indicate whether the callable can deal with the raw shape data
	or uses the higher level python lists of coordinates. The callable
	now should accept either the raw data or the return value of the
	shape's Points() method.
	(BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
	change
	(BaseRenderer.projected_points): Instead of the shape id use the
	points list as parameter.
	(BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
	(BaseRenderer.draw_point_shape): Adapt to projected_points()
	change and accept the points list as parameter instead of the
	shape id.

	* Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
	the useraw flag as required by the BaseRenderer
	(ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
	changes.

	* test/test_baserenderer.py
	(TestBaseRenderer.test_point_with_classification): New test for
	rendering a map with classifications.

2003-08-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/viewport.py (ViewPort.find_shape_at)
	(ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
	(ViewPort._get_hit_tester, ViewPort.projected_points)
	(ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
	(ViewPort._find_label_at): Split the find_shape_at method into
	several new methods and use the functions in the hit-test module.

	* Thuban/UI/hittest.py: New module with Python-level hit-testing
	functions

	* test/test_hittest.py: New. Test for the new hittest module

2003-08-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
	projection to all corners of the bounding box to get a better
	approximation of the projected bounding box

	* test/test_layer.py (TestLayer.test_point_layer_with_projection):
	New. Test coordinate handling of a layer with a projection.
	Catches the bug fixed in Layer.ShapesInRegion

2003-08-15  Bernhard Herzog  <bh@intevation.de>

	Move some of the mock objects in test_baserenderer into their own
	module so they can easily be used from other tests

	* test/mockgeo.py: New test helper module with some mock objects
	for geometry related things like shapes, shapestores and
	projections.

	* test/test_mockgeo.py: New. Tests for the new helper module

	* test/test_baserenderer.py: Some of the mock-objects are in
	mockgeo now.

2003-08-12  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/about.py (About.__init__): Added Björn Broscheit.

2003-08-12  Bernhard Herzog  <bh@intevation.de>

	* po/de.po: New. German translations by Bjoern Broscheit

2003-08-12  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
	strings have to be one string literal.

2003-08-11  Bernhard Herzog  <bh@intevation.de>

	* test/support.py (FloatComparisonMixin.assertPointListEquals):
	New. This method was used in various derived classes, but it's
	better to have it here.

	* test/test_shapefilestore.py
	(ShapefileStoreTests.assertPointListEquals): Removed. It's now in
	FloatComparisonMixin

	* test/test_layer.py (TestLayer.assertPointListEquals): Removed.
	It's now in FloatComparisonMixin

	* test/test_derivedshapestore.py
	(TestDerivedShapeStore.assertPointListEquals): Removed. It's now
	in FloatComparisonMixin

2003-08-11  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
	error message

2003-08-08  Jan-Oliver Wagner <jan@intevation.de>

	* Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
	with version number.
	Changed title to reflect version number of Thuban.

2003-08-08  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
	the list corresponds to the "About" web page.

2003-08-08  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
	Make sure translated strings are recognized as one string literal.

	* Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
	Make sure translated strings are recognized as one string literal.

	* Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
	translated strings are recognized as one string literal.

	* Thuban/UI/application.py (ThubanApplication.OpenSession): Make
	sure translated strings are recognized as one string literal.

2003-08-07  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
	Simply delegates to the original shapestore.

	* test/test_derivedshapestore.py
	(TestDerivedShapeStore.test_raw_format): New. Test case for
	DerivedShapeStore.RawShapeFormat

2003-08-07  Bernhard Herzog  <bh@intevation.de>

	Add raw data interface to shape objects.

	* Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
	class to ShapefileShape which now holds shapefile specific
	information.
	(ShapefileShape.compute_bbox): Simplified to not cache any
	information. The way this method is used that shouldn't matter
	performance wise.
	(ShapefileShape.RawData): New. Return the shapeid which is the raw
	data format for shapes from shapefiles.
	(ShapefileStore.RawShapeFormat): New. Return the raw datatype used
	in the shape objects returned by a shapestore. For a
	ShapefileStore this is always RAW_SHAPEFILE.
	(RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
	method.

	* test/test_shapefilestore.py
	(TestShapefileStore.test_raw_format): New test to test the raw
	format feature of shapes.

	* Thuban/Model/layer.py: Remove the unused import of Shape from
	data. It was only there for interface compatibility but it's not
	used inside of Thuban and the generic Shape class has gone away.

	* Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
	the raw data format and only use an optimized version of its a
	shapefile.

2003-08-07  Bernhard Herzog  <bh@intevation.de>

	* test/test_baserenderer.py (SimpleShape): Shape class for the
	tests.
	(SimpleShapeStore.Shape): Use SimpleShape instead of
	Thuban.Model.data.Shape to make the tests independed of the coming
	changes.

2003-08-07  Bernhard Herzog  <bh@intevation.de>

	* test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
	(ThubanTestProgram): New classes that extend the respective
	classes from unittest. These new version support skipping tests
	under certain expected conditions. In the Thuban test suite we
	uses this for tests that require the optional gdal support.
	(run_tests): Use ThubanTestProgram instead of the unittest.main()

	* test/runtests.py (main): Use the new ThubanTestRunner instead of
	the normal one from unittest

	* test/test_layer.py (TestLayer.test_raster_layer): If this test
	is not run because gdal support isn't available report this to the
	runner.

	* test/test_baserenderer.py
	(TestBaseRenderer.test_raster_no_projection): Do not run this test
	if gdal support isn't available and report this to the runner.

2003-08-06  Bernhard Herzog  <bh@intevation.de>

	Rearrange the renderers a bit, partly in preparation for changes
	required for the postgis merge, partly to make it more testable.
	Also make the representation of coordinates in Shapes more
	consistent.

	* Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
	this class is now in BaseRenderer. This class is now practically
	only a specialization of BaseRenderer for rendering to an actual
	wx DC.
	(ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
	to get the shapetype specific rendering functions.

	* Thuban/UI/baserenderer.py: New file with the basic rendering
	logic. The code in this file is completely independend of wx.
	(BaseRenderer): Class with the basic rendering logic

	* test/test_baserenderer.py: New. Test cases for BaseRenderer

	* Thuban/UI/view.py (MapCanvas.__init__): New instance variable
	error_on_redraw to guard agains endless loops and stack overflows
	when there's a bug in the rendering code that raises exceptions.
	(MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
	rendering into a separate method _do_redraw so that error handling
	is a bit easier. When an exception occurs, set error_on_redraw to
	true. When it's true on entry to OnIdle do nothing and return
	immediately.

	* Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
	Shape object will always have the coordinates as a list of list of
	coordinate pairs (tuples).
	(Shape.compute_bbox): Adapt to new representation.

	* Thuban/UI/viewport.py (ViewPort.find_shape_at)
	(ViewPort.LabelShapeAt): Adapt to new coordinate representation in
	Shape objects.

	* test/test_shapefilestore.py
	(ShapefileStoreTests.assertFloatTuplesEqual)
	(ShapefileStoreTests.assertPointListEquals): Rename to
	assertPointListEquals and change purpose to checking equality of
	the lists returned by Shape.Points().
	(TestShapefileStoreArc.test_shape)
	(TestShapefileStorePolygon.test_shape)
	(TestShapefileStorePoint.test_shape): Use the new
	assertPointListEquals instead of assertFloatTuplesEqual

	* test/test_layer.py (TestLayer.assertFloatTuplesEqual)
	(TestLayer.assertPointListEquals): Rename to assertPointListEquals
	and change purpose to checking equality of the lists returned by
	Shape.Points().
	(TestLayer.test_arc_layer, TestLayer.test_arc_layer)
	(TestLayer.test_polygon_layer, TestLayer.test_point_layer)
	(TestLayer.test_derived_store): Use the new assertPointListEquals
	instead of assertFloatTuplesEqual

	* test/test_derivedshapestore.py
	(TestDerivedShapeStore.assertFloatTuplesEqual)
	(TestDerivedShapeStore.assertPointListEquals): Rename to
	assertPointListEquals and change purpose to checking equality of
	the lists returned by Shape.Points().
	(TestDerivedShapeStore.test_shape): Use the new
	assertPointListEquals instead of assertFloatTuplesEqual

2003-08-06  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
	a bounding box. A dialog is raised in case, no bounding box
	is found. This fixes bug #2043:
	https://intevation.de/rt/webrt?serial_num=2043

2003-08-05  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/color.py (Color.__repr__): Make the repr of a color
	object look like a Color instantiation. Formerly it looked like a
	tuple.

	* test/test_color.py (TestColor.test_repr)
	(TestColor.test_equality, TestColor.test_inequality): New. test
	some more apects of the Color class
	(TestTransparent.test_repr, TestTransparent.test_hex)
	(TestTransparent.test_equality): New. Test cases for the
	Transparent object.

2003-08-04  Jan-Oliver Wagner <jan@intevation.de>

	* Doc/manual/thuban-manual.xml: a number of small improvements.
	The resulting file is the version submitted for GREAT-ER II.

2003-08-01  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/resource.py, Thuban/UI/projdialog.py,
	Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
	Thuban/Model/resource.py: Insert cvs keywords and doc-strings.

	* Thuban/UI/common.py: Insert cvs keywords and doc-strings.
	(Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
	(ThubanEndBusyCursor): Add doc-strings

2003-08-01  Bernhard Herzog  <bh@intevation.de>

	First step towards PostGIS integration. More abstraction by movin
	more code from the layer to the shapestore. More methods of the
	layer are now simply delegated to the equivalent method of the
	shapestore. The SHAPETYPE_* constants are now in data not in
	layer.

	* Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
	(SHAPETYPE_POINT, Shape): Move these constants and classes from
	layer.py to data.py
	(ShapefileStore.__init__): More Initialization for the new methods
	and functionality.
	(ShapefileStore.ShapeType, ShapefileStore.NumShapes)
	(ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
	(ShapefileStore.Shape): New methods that were formerly implemented
	in the layer.
	(DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
	(DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
	(DerivedShapeStore.BoundingBox): New. DerivedShapeStore
	equivalents of the new shape methods. These versions are simply
	delegated to the original shapstore.

	* Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
	(SHAPETYPE_POINT, Shape): Removed. They're now in data.py
	(Layer.SetShapeStore): Removed the initializatin of instance
	variables that were needed for the stuff that's now in
	ShapefileStore
	(Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
	(Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
	shapestore.

	* Thuban/UI/classifier.py, Thuban/UI/renderer.py,
	Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
	instead of layer.

	* test/test_shapefilestore.py: New. Tests for ShapefileStore.

	* test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.

	* test/test_layer.py: Import the SHAPETYPE_* constants from data
	instead of layer.
	(TestLayer.test_derived_store): Remove the test for the exception
	when instantiating the DerivedShapeStore with an incompatible
	table which is now in test_derivedshapestore.py. Add some more
	tests of the layer methods to determine whether they work for a
	DerivedShapeStore as well.

2003-07-31  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/thuban-manual.xml: Fix the list of required packages
	by just listing the name and where they can be found.

2003-07-31  Frank Koormann   <frank.koormann@intevation.de>

	* Doc/manual/thuban-manual.xml: 
	Changed the screenshot elements to figure.
	Changed some variablelist elements to itemizedlist.
	Added section on GDAL formats.

2003-07-31  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/thuban-manual.xml: Added a few sentences about
	the Fix Border Color option when generating classes.

2003-07-30  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py: Add docstrings. Rename specific
	Ramp instances to use lower_case_style.

	* Thuban/UI/classgen.py: Use renamed Ramp instances.
	
	* Thuban/UI/classifier.py: Add docstrings.

	* Thuban/UI/dock.py: Add docstrings.

	* test/test_classgen.py: Use renamed Ramp instances.

2003-07-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
	was never used in Thuban.

2003-07-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
	method directly instead of going through the transient_table
	method. This faster because transient_table may force the copy of
	a DBF file into the transient database and setting a table's title
	doesnm't affect the title of the associated transient table, so
	this fixes RT #2042

	* Thuban/UI/main.py (__version__): Don't import the already
	removed show_exception_dialog.

2003-07-29  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
	Put back this method and remove the equivalent function since we
	are setting the exception hook from within this class (OnInit).

2003-07-29  Jonathan Coles   <jonathan@intevation.de>

	* 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/8_int_error.png: New screen shots.

	* Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
	some points, and added more screen shots.

2003-07-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/data.py: Remove the now unused import of warnings

2003-07-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/data.py (SimpleStore): Removed. This class has been
	deprecated since before the 0.8 release and isn't used in Thuban
	itself anymore.

	* Thuban/Model/transientdb.py: Remove some unnecessary imports

2003-07-29  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.OnInit): set the 
	python exception hook here so that we are sure to catch any
	Thuban exception that happen during initialization.

	* Thuban/UI/main.py (main): Don't set the exception hook here,
	it will get set in ThubanApplication.OnInit.

2003-07-29  Jonathan Coles   <jonathan@intevation.de>
                                                                            
	* Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
	Removed and called it show_exception_dialog() so that the exception
	handler can be set before the class is created.
                                                                            
	* Thuban/UI/main.py (main): Install the exception handler before
	a ThubanApplication is created.
                                                                                
2003-07-29  Bernhard Herzog  <bh@intevation.de>

	* po/it.po: New. Italian translation by Maurizio Napolitano

	* po/ru.po: New. Russian translation by Alex Shevlakov

2003-07-29  Frank Koormann   <frank.koormann@intevation.de>

	* Doc/manual/thuban-manual.xml: Extended section on supported
	projections.
	
2003-07-29  Frank Koormann   <frank.koormann@intevation.de>

	* Doc/manual/thuban-manual.xml: gaspell-checked.

2003-07-29  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/images/3_5_legend.png: Added border to improve look
	on white background.

2003-07-29  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added 
	descriptions for the legend toolbar.

	* Doc/manual/images/4_2_raster_layer_properties.png: Removed
	cursor from dialog box.

2003-07-28  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/thuban-manual.xml: More screenshots and more chapters.

	* Doc/manual/images/2_4_session_tree.png, 
	Doc/manual/images/3_5_legend.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_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: New screenshots.

2003-07-24  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/thuban-manual.xml: Chapter on Projection Management.

2003-07-24  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/thuban-manual.xml: Added EPS images and wrote
	chapter on Layer Management.

	* Doc/manual/Makefile: New. Makefile to generate all formats for the
	manual and images.

2003-07-24  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
	it annoys lintian which warns about these files not being
	executable. The #! isn't necessary here since if you absolutely
	must execute them you can always say "python <filename>".

	* Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
	superfluous code to set brush and pen for point shapes

	* Thuban/UI/viewport.py: Remove commented out code that wouldn't
	belong in viewport anyway

2003-07-24  Frank Koormann   <frank.koormann@intevation.de>

	* Doc/manual/thuban-manual.xml: Added section on table management.

2003-07-24  Bernhard Herzog  <bh@intevation.de>

	* test/runtests.py (main): Recognize the long "verbose" option
	correctly.

2003-07-22  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/thuban-manual.xml: Continue to write first revision
	of the manual.

	* Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
	with Begin/EndDrawing() calls to ensure we aren't doing to
	many updates to the dc during rendering.
	(ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
	a pen and brush argument so they need to be passed to the function.

	* Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
	Calculates the minimum and maximum scale values. Factored out
	of set_view_transform so that it could be used to zoom all the
	way into a single point.
	(ViewPort.set_view_transform): Call calc_min_max_scales().
	(ViewPort.FitSelectedToWindow): Zoom to the maximum scale
	if only a single point is selected.

	* 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/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_movedown.png,
	Doc/manual/images/3_5_moveup.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: New. Images for the documentation.

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/messages.py (MAP_REPLACED): New message.

	* Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
	after the new map has been assigned

	* Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
	Delegate MAP_REPLACED to the canvas too
	(MainWindow.prepare_new_session): Removed. Thanks to the new
	MAP_REPLACED message it's no longer needed
	(MainWindow.OpenSession, MainWindow.NewSession):
	prepare_new_session has been removed.

	* Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
	MAP_REPLACED so that we can close the dialog if a new map is set.
	(Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
	(Classifier.map_replaced): Handle MAP_REPLACED by closing the
	dialog

	* test/test_viewport.py (SimpleViewPortTest)
	(SimpleViewPortTest.test_default_size): Add doc-strings
	(ViewPortTest.setUp): Bind map to self.map so we can use it in
	tests. Subscribe to MAP_REPLACED messages too.
	(ViewPortTest.tearDown): No need to explicitly unsubscribe
	(ViewPortTest.test_set_map): New test for the SetMap method.

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* test/test_viewport.py (SimpleViewPortTest.test_default_size):
	Move this test from ViewPortTest.setUp to this new separate test
	case. setUp is not the place for the actual tests.
	(ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
	more of the test from setUp to the new test test_inital_settings.
	(ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
	(ViewPortTest.test_proj_conv): Split test_proj_conv into
	test_win_to_proj and test_proj_to_win and make the tests easier to
	understand
	(ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
	(ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
	(ViewPortTest.test_unprojected_rect_around_point)
	(ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
	Reformat to increase readability.

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* test/runtests.py: The test suite can now be run without an X
	connection. To make sure this remains true, remove the DISPLAY
	environment variable so that an error occurs if the wxGTK is
	imported accidentally

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/viewport.py: Remove unused imports

	* Thuban/UI/view.py: Remove unused imports

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* test/test_export.py Remove unused imports. The OutputTransform
	function is now in viewport.py and is called output_transform
	(TestScalebar.test_output_transform)
	(TestScalebar.test_OutputTransform): Renamed to
	test_output_transform and updated to use output_transform instead
	of OutputTransform

	* Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
	renamed.
	(MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
	renamed to output_transform

	* Thuban/UI/viewport.py (OutputTransform, output_transform):
	Rename to output_transform

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.__init__): Rename
	classificationField to classificatin_column and init it here so
	that it can be used in SetClassificationColumn
	(Layer.GetClassificationColumn, Layer.GetClassificationField):
	Rename to GetClassificationColumn.
	(Layer.SetClassificationColumn, Layer.SetClassificationField):
	Rename to SetClassificationColumn and issue a LAYER_CHANGED
	message if the column changes.
	(Layer._classification_changed, Layer.ClassChanged): Rename to
	_classification_changed. Update the callers.
	(Layer.SetShapeStore): Further field->column renames.

	* Thuban/Model/load.py (SessionLoader.start_classification) 
	(SessionLoader.start_clpoint): Updates because of
	field->column method name changes in the Layer class

	* Thuban/Model/save.py (SessionSaver.write_classification): Updates
	because of field->column method name changes in the Layer class

	* Thuban/UI/classifier.py (Classifier.__init__)
	(Classifier._OnTry, Classifier._OnRevert): Updates because of
	field->column method name changes in the Layer class

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
	because of field->column method name changes in the Layer class

	* Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
	of field->column method name changes in the Layer class

	* test/test_save.py (SaveSessionTest.testClassifiedLayer)
	(SaveSessionTest.testClassifiedLayer): Update because of
	field->column method name changes in the Layer class

	* test/test_layer.py (SetShapeStoreTests.setUp)
	(SetShapeStoreTests.test_sanity): Update because of field->column
	method name changes in the Layer class
	(TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
	(TestLayerModification.test_sanity)
	(TestLayerModification.test_initial_settings): remove unsued code
	and rename to test_sanity.
	(TestLayerModification.test_set_classification): New test for
	SetClassification and SetClassificationField.

2003-07-18  Bernhard Herzog  <bh@intevation.de>

	* test/test_classgen.py (TestFixedRamp.test): Extend test to check
	the non-fixed values as well. The old test would have accepted a
	fixed ramp that only returnes the fixed properties

2003-07-17  Jonathan Coles   <jonathan@intevation.de>

	* Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
	shots for the manual. The XCF file is the source image and
	has additional layers to support changes.

	* Doc/manual/thuban-manual.xml: Wrote an initial Introduction.

	* Thuban/UI/classifier.py (Classifier.__BuildClassification):
	Return both the new class and the field name.

	* Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't 
	fit the map to the window as this changes any zoom level that
	the user may have set.

2003-07-16  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py (generate_singletons,
	generate_uniform_distribution, generate_quantiles): Remove
	fixes parameter, but maintain the same functionality by having
	the calling function pass a FixedRamp object for the ramp.
	(FixedRamp): New. Adapts a ramp to have fixed property values.

	* Thuban/Model/classification.py: Use new CLASS_CHANGED message.
	(Classification): Inherit from Publisher.
	(Classification.__init__): Remove the layer parameter. 
	Classifications no longer need to have a parent layer.
	(Classification.GetField, Classification.GetFieldType, 
	Classification.SetFieldInfo): Removed. The field name is stored
	in the layer, and the type can be retreived by calling
	Layer.GetFieldType().
	(Classification._set_layer, Classification.GetLayer): Removed.
	Classifications no longer have a parent layer.

	* Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
	classification. 
	(Layer.SetShapeStore): Reset the classification first while
	we still have the old shape store to work with.
	(Layer.GetClassificationField, Layer.SetClassificationField):
	New. Method for getting/setting the field to classify on.
	(Layer.SetClassification): Simplified now that the layer 
	simply has to hold a reference to the classification and not
	tell the classification who owns it.
	Fixes RTbug #2023.

	* Thuban/Model/load.py (SessionLoader.start_classification):
	Set the field name on the layer, not the classification.

	* Thuban/Model/messages.py: Add CLASS_CHANGED for when a
	classification is modified.

	* Thuban/Model/save.py (SessionSaver.write_classification):
	Get the field name and type from the layer.

	* Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
	parameter records to rows and add docstring. Fixes RTbug #1997.

	* Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
	ramp when we need to fix certain values of a ramp rather than
	using the old fixes parameter. Fixes RTbug #2024.

	* Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
	parameter.
	(ClassTable.Reset): Add fieldType parameter and use it, rather
	than asking the classification.
	(Classifier.__init__): Remember the original class's field
	and ask the layer for the field type, rather than the classification.
	(Classifier.__SetGridTable): Retrieve the field and field type
	for the table because they are not in the classification.
	(Classifier._OnTry, Classifier._OnRevert): Set the classification
	field on the layer in addition to the classification itself.

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
	classification field from layer.

	* Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
        classification field from layer. Split up tests and remove
	*-imports. Fixes RTbug #1992.

	* test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.

	* test/test_classification.py
	(TestClassification.test_classification): Remove tests for methods
	that no longer exist.

	* test/test_layer.py (SetShapeStoreTests.setUp): Classification
	__init__ no longer has a field parameter, use SetClassificationField.
	(SetShapeStoreTests.test_sanity): Use layer object to get class
	field info.

	* test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
	SetClassificationField on layer to set class field info.

	* test/test_viewport.py: Renamed from test/test_view.py.

2003-07-16  Jan-Oliver Wagner <jan@intevation.de>

	* Doc/manual/thuban-manual.xml: Added authors and an initial
	coarse structure.

2003-07-15  Bernhard Herzog  <bh@intevation.de>

	* test/support.py (FloatComparisonMixin): This is a mix-in class
	and therefore should not be derived from any other class.

	* test/test_range.py (RangeTest): FloatComparisonMixin is a
	mix-in, so derive from TestCase as well.

2003-07-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
	draw_func handling a bit to remove one layer of indirection. This
	makes the renderer about 10% faster in the non-classifying case
	and the code a bit cleaner
	(MapRenderer.draw_point_shape): Add the pen and brush parameters
	and set them in the dc. Now the draw_point_shape method and
	wxproj's draw_polygon_shape function have basically the same
	signature so that both can be directly used as draw_func

2003-07-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/save.py (SessionSaver.write_classification): Encode
	string values (in addition to the labels) as UTF 8

	* Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
	values if the field type is string

	* test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
	saving a session with non-ascii string classification values.

	* test/test_load.py (TestClassification.file_contents)
	(TestClassification.test): Check for non-ascii values in string
	classifications

2003-07-14  Jonathan Coles   <jonathan@intevation.de>

	* test/test_view.py: New. Tests for ViewPort.

2003-07-14  Frank Koormann   <frank@intevation.de>

	* Thuban/Model/load.py (SessionLoader.start_map): Encode map 
	title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013

	* test/test_load_0_8.py (TestUnicodeStrings): New, test load of 
	unicode strings from session file: session title, map title and 
	projection name.
	
2003-07-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/viewport.py (Tool.MouseUp): Should have called
	drag_stop, not drag_move when the mouse is released.

2003-07-10  Jonathan Coles   <jonathan@intevation.de>

	The most important part of this is the seperation of view.py into
	two pieces. viewport.py now has a class called ViewPort which
	contains all the non-wx parts of view.py and can therefore be
	tested. view.py contains only the wx-specific parts and is fairly
	simple.

	* Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
	RTTbug #1992.
	* Thuban/UI/viewport.py: New. Contains non-wx view functionality.
	RTTbug #1992.

	* Thuban/Model/classgen.py (generate_singletons,
	generate_uniform_distribution, generate_quantiles):
	Added 'fixes' parameter so that property attributes can
	be held constant over the generated classification groups.
	(CustomRamp.GetProperties): Remove unused variables.

	* Thuban/Model/map.py (Map.SetProjection): Send the old
	projection as an argument to listeners of the MAP_PROJECTION_CHANGED
	event.

	* Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records' 
	parameter which is a list of records that restricts which
	records are saved. Fixes RTbug #1997.

	* Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
	Port exception dialog from GREAT-ER. Fixes RTbug #1993.

	* Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
	to allow the user to fix line color/width on generated groups.
	(ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
	functions to optionally fix group properties.

	* Thuban/UI/main.py (main): Set exception hook to the 
	ShowExceptionDialog. Fixes RTbug #1993.

	* Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
	the table window when it is selectd to be shown.

	* Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
	Export Selection button and move the export buttons underneath
	the table.
	(QueryTableFrame.UpdateStatusText): Added event argument so
	that it can respond to grid selection events. The status text
	is now updated even when the table is not associated with a
	layer as was previously assumed.
	(QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
	UpdateStatusText responds to these events.
	(QueryTableFrame.OnSaveAs): Renamed to doExport.
	(QueryTableFrame.doExport): Helper function that saves the
	entire table, or selected rows, to a file.
	(QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
	Respond to export button events and call doExport.

	* extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
	the function doesn't return NULL without first setting a Python
	Error.

	* test/runtests.py (main): Only print "Unknown option" for
	unsupported options.

	* test/support.py (FloatComparisonMixin.assertFloatEqual): Take
	optional epsilon argument to specify floating point accuracy.
	(FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
	for each item test.

	* test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
	tests for saving selected records.

	* test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
        tests for saving selected records.

	* test/test_map.py (TestMapWithContents.test_set_projection):
	MAP_PROJECTION_CHANGED events send the old projection.

	* test/test_session.py 
	(TestSessionWithContent.test_forward_map_projection): 
	MAP_PROJECTION_CHANGED events send the old projection.

	* test/test_table.py (TableTest): Update tests to use non-deprecated
	functions.

2003-07-08  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/transientdb.py (TransientTableBase.Width): The type
	constants in the column objects are the standard ones defined in
	the table module.

	* test/test_transientdb.py
	(TestTransientTable.test_transienttable_to_dbf): New. Test whether
	exporting transient tables as DBF works. This should catch the bug
	just fixed in TransientTableBase.Width.

2003-07-08  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
	interpolated colors correctly.

	* test/test_classgen.py (TestCustomRamp.test_color_interpolation):
	New. Test case for the fix in classgen.py

2003-07-08  Bernhard Herzog  <bh@intevation.de>

	* test/runtests.py (main): Make the default output less verbose
	and add a verbosity option (-v) to get the old output

2003-07-08  Bernhard Herzog  <bh@intevation.de>

	* Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
	0.9.

	* Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
	New. Return the join type

	* Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
	DTD
	(SessionSaver.write_data_containers): Save the join type for
	joined tables

	* Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
	namespace
	(SessionLoader.start_jointable): Handle the jointype attribute

	* test/test_load_0_8.py: New. Effectively a copy of test_load.py
	as of Thuban 0.8. These are now tests to determine whether Thuban
	can still read files generated by Thuban 0.8

	* test/test_load.py (LoadSessionTest.dtd)
	(TestSingleLayer.file_contents)
	(TestLayerVisibility.file_contents, TestLabels.file_contents)
	(TestLayerProjection.file_contents)
	(TestRasterLayer.file_contents, TestJoinedTable.file_contents)
	(TestJoinedTable.file_contents)
	(TestLoadError.file_contents): Update for new DTD
	(TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
	for new join type attribute

	* test/test_save.py (SaveSessionTest.dtd)
	(SaveSessionTest.testEmptySession)
	(SaveSessionTest.testSingleLayer)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer)
	(SaveSessionTest.test_dbf_table)
	(SaveSessionTest.test_joined_table): Update for new DTD
	(SaveSessionTest.test_joined_table): Add test for new join type
	attribute

2003-07-04  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/table.py (_find_dbf_column_names): New. Helper
	function for table_to_dbf
	(table_to_dbf): Deal with names longer than the 10 character limit

	* test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
	doc-string
	(TestTableToDBF.test_table_to_dbf_long_col_names): New test for
	long column names

2003-07-03  Bernhard Herzog  <bh@intevation.de>

	* Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax

2003-07-03  Bernhard Herzog  <bh@intevation.de>

	* Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
	for the Thuban manual and README with some basic information about
	the manual

2003-07-03  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
	Update doc-string
	(TransientJoinedTable.create): Do not modify the column objects of
	the input tables in place and copy all columns of the input tables
	into the joined table after all.

	* test/test_transientdb.py
	(TestTransientTable.test_transient_joined_table_same_column_name):
	Update to reflect the new behavior
	(TestTransientTable.test_transient_joined_table_with_equal_column_names):
	Update to reflect the new behavior
	(TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
	New test case for a bug which modified the column objects in place

2003-07-02  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py (generate_singletons, 
	generate_uniform_distribution, generate_quantiles,
	GenQuantiles0): Make sure maxValue isn't less than
	one, otherwise we could divide by zero.

	* test/test_classgen.py (ClassGenTest.doClassRangeTest,
	ClassGenTest.doClassSingleTest): Call doBoundsTest to
	check the end classification groups against the
	proper property values.
	(ClassGenTest.doBoundsTest): New. Checks the first and
	last classification groups to make sure their properties 
	are the correct upper and lower bounds for a color ramp.

2003-07-02  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py (generate_singletons, 
	generate_uniform_distribution, generate_quantiles,
	GenQuantiles0): The denominator was one to high when
	calculating the index for the ramp causing the index
	to never to reach one.

2003-07-02  Jonathan Coles   <jonathan@intevation.de>

	Changed the singature of ClassGroupRange.__init__ and
	ClassGroupRange.SetRange() so that the min/max values are
	passed as a tuple. This makes a better calling scheme for
	when a Range object is passed instead.

	* Thuban/Model/classgen.py: Fixed parameters to 
	ClassGroupRange constructor.

	* Thuban/Model/classification.py (ClassGroupRange.__init__):
	Consolidate the min/max parameters into a single _range which
	can either be a tuple or a Range object.
	(ClassGroupRange.SetRange): Consolidate the min/max parameters 
	into a single _range which can either be a tuple or a Range object.

	* Thuban/Model/load.py (SessionLoader.start_clrange): Fix
	call to ClassGroupRange constructor to use a tuple.

	* Thuban/Model/layer.py (Layer.SetClassification): Switch
	the classification instance variable to the new class 
	before calling _set_layer otherwise subscribers to a 
	LAYER_CHANGED event will not see any difference.

	* test/test_classification.py: Fix tests of ClassGroupRange
	so that they use the new signature.

	* test/test_load.py: Fix use of ClassGroupRange so that it 
	uses the new signature.

	* test/test_load_0_2.py: Fix use of ClassGroupRange so that it 
	uses the new signature.

	* test/test_save.py: Fix use of ClassGroupRange so that it 
	uses the new signature.


2003-07-01  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
	Import used objects/class from color.
	(generate_singletons): We don't
	need the numGroups parameter anymore because we are using
	the new ramps with GetProperties().
	(generate_uniform_distribution): Use new ramp method
	GetProperties().
	(generate_quantiles, GenQuantiles0): Use new ramp method 
	GetProperties().
	(CustomRamp.SetNumGroups): Removed. The ramps now map
	a value from 0 to 1 to class properties so the number
	of groups is not needed ahead of time.
	(CustomRamp.next): Removed. CustomRamp does not support
	interation anymore.
	(CustomRamp.GetProperties): Returns a ClassGroupProperties
	object based on the index value from 0 to 1 that is
	passed to it.
	(GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
	Made into instances of Monochromatic class instread of
	deriving from it.
	(HotToCold.SetNumGroups): Removed. See CustomRamp.
	(HotToCold.next): Removed. See CustomRamp.

	* Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
	(Classification.SetField, Classification.SetFieldType): 
	Replaced with SetFieldInfo.
	(Classification.SetFieldInfo): New. Does a better job of
	what SetField and SetFieldType used to do by combining
	their function since they should really always be done
	at the same time.
	(Classification.SetLayer): Renamed to _set_layer.
	(Classification._set_layer): Should only be called from
	Layer's SetClassification. This does not cause a recursive 
	call as SetLayer did because we know that Layer knows about
	the classification.

	* Thuban/Model/color.py: Fixes RTbug #1971.
	(_Transparent): Renamed from Transparent so it doesn't
	conflict with the module variable.
	(Transparent, Black): Renamed from Color.Transparent, 
	Color.Black so they are not class variables.

	* Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
	(Layer.Destroy): We don't need to call SetClassification
	anymore to clear out the back reference in the classifcation
	to the layer. It's better to set it to None using _set_layer,
	and we won't be creating another clas object too.
	(Layer.SetClassification): Classification._set_layer is not
	recursive so remove all the locking variables. Also clean
	up the code so that it remains unchanged if something fails.

	* Thuban/Model/load.py: Fixes RTbug #1971.
	(SessionLoader.start_classification): Call 
	Classification.SetFieldInfo().

	* Thuban/Model/save.py: Removed import of Color which wasn't
	being used.

	* Thuban/UI/classgen.py: Fixes RTbug #1972.
	(ClassGenDialog.__init__): Color ramps are now instances 
	already so we don't need to create any new objects.
	(ClassGenDialog.OnOK): Check for numGroups is no longer 
	necessary because we never use it.

	* Thuban/UI/classifier.py: Fixes RTbug #1971.
	(Classifier.__BuildClassification, Classifier.__SetGridTable):
	Call Classification.SetFieldInfo() instead of SetFieldType.

	* Thuban/UI/renderer.py: Fixes RTbug #1971.

	* Thuban/UI/view.py: Fixes RTbug #1974, 1971.
	(MapCanvas.__init__): Subscribe to the idle time event. Set
	background color to white.
	(MapCanvas.OnPaint): Set a flag indicating that we should
	render the map during idle time. If we already have a bitmap
	just draw it now.
	(MapCanvas.OnIdle): New. Render the map only during idle time.
	This also fixes a problem with the busy cursor under gtk.

	* test/test_classgen.py (ClassGenTest.test_generate_singletons):
	Fix calls to generate_singletons because the signature changed.

	* test/test_classification.py: Fix color references and
	change calls to Classification.[SetField|SetFieldType] to
	SetFieldInfo.

	* test/test_load.py: Fix color references.

	* test/test_load_0_2.py: Fix color references.

	* test/test_save.py (SaveSessionTest.testClassifiedLayer):
	Change calls to Classification.[SetField|SetFieldType] to
        SetFieldInfo.

2003-07-01  Frank Koormann   <frank.koormann@intevation.de>

	MERGE from the greater-ms3 branch.

	* test/test_transientdb.py
	(TestTransientTable.test_transient_joined_table_with_equal_column_names):
	New. Test join of two tables with partly equal column names.

	* Thuban/Model/transientdb.py (TransientJoinedTable.create):
	If duplicates in left and right tables column names are found, 
	append '_' (underscores) to the name until it is unique.
	Create always new internal names for the resulting table and reference
	columns in the join statement with <table>.<column>

2003-07-01  Bernhard Herzog  <bh@intevation.de>

	* test/test_transientdb.py
	(TestTransientTable.test_transient_joined_table_same_column_name):
	New. Test whether joining on columns with the same names in both
	tables works.
	
	* Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
	sure to use the right internal names even when joining on field
	with the same names in both tables. Also, detect duplicate names
	in the joined table correctly.

2003-07-01  Frank Koormann   <frank@intevation.de>

	* Thuban/UI/renderer.py (ExportRenderer.render_legend):
	Reverse List of layers to render in same order as in desktop legend.
 
2003-06-30  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/version.py (make_tuple): Takes a version string
	and splits it into a tuple of at most three integers.
	Used make_tuple() to make tuple versions of the version
	numbers.

	* Thuban/UI/about.py: Add Thuban email addresses.

2003-06-30  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/version.py: SQLite/PySQLite version dependencies
	were too high.

2003-06-30  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/version.py: Update version to 0.8.1
	
	* MANIFEST.in: Added Projections so that default.proj is
	included.

2003-06-26  Jonathan Coles   <jonathan@intevation.de>

	New About box with lots more information including library
	versions and credits. More/better version checking before
	Thuban starts.

	* Thuban/UI/about.py: New. New About box that displays
	library version information and credits.

	* Thuban/version.py: Added new 'versions' dictionary which
	contains the verions of various libraries which are checked
	when the module loads.
	(verify_versions): Check all version numbers and returns
	a list of errors.

	* Thuban/UI/classifier.py (Classifier.__EnableButtons):
	Reset the status of the buttons as the situation warrants,
	but in a better more reliable way by not relying on the
	current status to determine what needs to change.

	* Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
	(verify_versions): Remove most of the code since it is
	now in Thuban.version.verify_versions.o

	* Thuban/UI/mainwindow.py (MainWindow.About): Call new
	About box in Thuban.UI.about.

	* extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
	Returns the version of gdal library being used as a string.

	* extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
	Removed.
	(get_proj_version): Return the version of PROJ that the file
	was compiled with.
	(get_gtk_version): Return th version of GTK that the file
	was compiled with.

2003-06-25  Jonathan Coles   <jonathan@intevation.de>
 
	* Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
	of the SelectPropertiesDialog should be self so the window
	appears on top.
	(ClassGroupPropertiesCtrl.DoEdit): The parent
	of the SelectPropertiesDialog should be self so the window
	appears on top.

	* Thuban/UI/resource.py: Cleaned up how we determine file
	extensions.
	(GetImageResource): Return an wxImage from our Resources.

2003-06-24  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/renderer.py (ExportRenderer.render_legend):
	Check that a layer has a classification before trying
	to get it. Raster layers don't have classifications.

2003-06-23  Jonathan Coles   <jonathan@intevation.de>
	
	* setup.py: Add Resources/XML to resource list.
    
2003-06-23  Jonathan Coles   <jonathan@intevation.de>

	* setup.cfg: Fix copyright dates
    
2003-06-23  Jonathan Coles   <jonathan@intevation.de>

	* MANIFEST.in: Update with Resources/XML

	* setup.py: Don't include Locale resources yet as we don't
	have any and it causes problems building the distribution
	for Windows. Update version to 0.8.0.

	* Doc/thuban.dtd: Removed since it is now in Resources/XML.

	* Thuban/UI/mainwindow.py: Add blank line at the end because
	file was not being read correctly building the Windows
	distribution.

2003-06-23  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.About): Fix text.

	* Thuban/version.py: Temporarily update longversion for
	the 0.8 release so that it doesn't have the cvs revision.

2003-06-23  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
	to make sure that we don't create reentrant possibilities with
	wxYield.

	* Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
	directly to avoid the wxSafeYield() call which generates an 
	OnPaint event causing infinite recursion. Don't try to catch
	exception anymore. This was for before there were limits on map
	scaling.

2003-06-23  Bernhard Herzog  <bh@intevation.de>

	Bug fix for RT #1961:

	* Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
	Register DerivedShapestores with the session

	* Thuban/Model/session.py (Session.Tables): Make sure each table
	is only listed once.

	* test/test_load.py (TestJoinedTable.test): Add check_format call.
	Update file contents to match the one written out.

2003-06-20  Bernhard Herzog  <bh@intevation.de>

	* test/xmlsupport.py (SaxEventLister.startElementNS)
	(SaxEventLister.endElementNS): Do not include the qname. Python
	2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
	is (presumably incorrectly) None, whereas it's a string with the
	element name in the later versions.

	* test/test_xmlsupport.py (TestEventList.test_even_list_simple)
	(TestEventList.test_even_list_namespace): Update tests to reflect
	the new behaviour
	(TestEventList.test_even_list_id_normalization): Fix doc-string

2003-06-20  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
	by deriving classes to determine if that layer supports shapes.
	(Layer): Override HasShapes and return true.

	* Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
	instead of a direct call to wx[Begin|End]CusyCursor().
	(GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
	table data.

	* Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
	New. Wrappers around the wxWindows functions that allow us to 
	make additional calls such as wxYield which gives the native 
	system a chance to update the cursor correctly.

	* Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
        instead of a direct call to wx[Begin|End]CusyCursor().

	* Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
	instead of a direct call to wx[Begin|End]CusyCursor().
	(MapCanvas.find_shape_at): Check if the current search layer
	support shapes, otherwise go on to the next layer.

	* test/test_layer.py: Add tests in each type of layer for
	HasClassification() and HasShapes()

2003-06-20  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
	turning on the busy cursor to allow the system to change the
	cursor before we begin painting. This fixes a problem that
	was occuring only under GTK. Fixes RTbug #1840.

2003-06-20  Bernhard Herzog  <bh@intevation.de>

	* Resources/XML/thuban-0.8.dtd: New DTD for the new file format
	version.

	* Thuban/Model/save.py (sort_data_stores): New. Make topological
	sort of the data sources so they can be written with sources that
	data sources that depend on other data sources come after the
	sources they depend on.
	(SessionSaver.__init__): Add idmap instance variable to map from
	objects to the ids used in the file.
	(SessionSaver.get_id, SessionSaver.define_id)
	(SessionSaver.has_id): New. Methods to manage the idmap
	(SessionSaver.write): Use thuban-0.8.dtd
	(SessionSaver.write_session): Add a namespace on the session and
	write out the data sources before the maps.
	(SessionSaver.write_data_containers): New. Write the data
	containers.
	(SessionSaver.write_layer): Layer elements now refer to a
	shapestore and don't contain filenames anymore.

	* Thuban/Model/load.py (LoadError): Exception class to raise when
	errors in the files are discovered
	(SessionLoader.__init__): Define dispatchers for elements with a
	thuban-0.8 namespace too.
	(SessionLoader.check_attrs): New helper method to check and
	convert attributes
	(AttrDesc): New. Helper class for SessionLoader.check_attrs
	(SessionLoader.start_fileshapesource)
	(SessionLoader.start_derivedshapesource)
	(SessionLoader.start_filetable, SessionLoader.start_jointable):
	Handlers for the new elements in the new fileformat
	(SessionLoader.start_layer): Handle the shapestore attribute in
	addition to filename.
	(SessionLoader.start_table, SessionLoader.end_table): Removed.
	They were never used in the old formats and aren't needed for the
	new.

	* Thuban/Model/session.py (Session.DataContainers): New method to
	return all "data containers", i.e. shapestores and tables

	* test/xmlsupport.py (SaxEventLister.__init__)
	(SaxEventLister.startElementNS, sax_eventlist): Add support to
	normalize IDs.

	* test/test_xmlsupport.py
	(TestEventList.test_even_list_id_normalization): New test case for
	id normalization

	* test/test_load.py (LoadSessionTest.check_format): Use ID
	normalization
	(LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
	class atrributes used for ID normalization
	(TestSingleLayer, TestLayerVisibility, TestLabels.test)
	(TestLayerProjection.test, TestRasterLayer.test): Adapt to new
	file format
	(TestJoinedTable): New test for loading sessions with joined
	tables.
	(TestLoadError): New. Test whether missing required attributes
	cause a LoadError.

	* test/test_save.py (SaveSessionTest.thubanids)
	(SaveSessionTest.thubanidrefs): New class attributes for ID
	normalization in .thuban files.
	(SaveSessionTest.compare_xml): Use id-normalization.
	(SaveSessionTest.testEmptySession)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer): Adapt to new file format.
	(SaveSessionTest.testLayerProjection): The filename used was the
	same as for testSingleLayer. Use a different one.
	(SaveSessionTest.test_dbf_table)
	(SaveSessionTest.test_joined_table): New test cases for saving the
	new data sources structures.
	(TestStoreSort, MockDataStore): Classes to test the sorting of the
	data stores for writing.

	* test/runtests.py: Add CVS keywords

2003-06-20  Jonathan Coles   <jonathan@intevation.de>

	* test/test_session.py
	(UnreferencedTablesTests.test_unreferenced_tables_with_joins):
	Use the cultural_landmark-point.dbf file for the store so that
	the table rows and shape count match.

2003-06-20  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
	an exception if the number of shapes is different from the
	number of rows in the table. Address RTbug #1933.

	* test/test_layer.py (TestLayer.test_derived_store): Add
	a test for the new exception in DerivedShapeStore.__init__.

	* test/support.py (FloatTestCase): Removed since there is
	already FloatComparisonMixin. Fixes RTbug #1954.
	(FloatComparisonMixin.assertFloatEqual): Include test for
	infinity that was part of FloatTestCase.

	* test/test_range.py (RangeTest): Inherit from
	support.FloatComparisonMixin now that we don't have
	support.FloatTestCase.

2003-06-20  Bernhard Herzog  <bh@intevation.de>

	* test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
	the implementation in xmlsupport instead.
	(SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport

	* test/test_proj.py: Import sax_eventlist from xmlsupport instead
	of test_save

2003-06-20  Bernhard Herzog  <bh@intevation.de>

	* test/test_load.py (LoadSessionTest.check_format): New helper
	method to make sure the test files we load might have been written
	by the current thuban version.
	(ClassificationTest.TestLayers, TestSingleLayer.test)
	(TestLayerVisibility.test, TestClassification.test)
	(TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
	Add check_format() calls and fix the thuban data to match the data
	that would be written by saving the session loaded from it.

	* test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
	the same class and function in test_save.

	* test/test_xmlsupport.py (TestEventList): New. test cases for
	sax_eventlist

2003-06-20  Bernhard Herzog  <bh@intevation.de>

	* Resources/XML/thuban.dtd: Add comment about which versions of
	Thuban are covered by this DTD
	(map): Fix content model for layers and raster layers. There can
	be any number or layers and raster layers in any order.

2003-06-20  Jonathan Coles   <jonathan@intevation.de>

	This is mainly about fixing RTbug #1949.

	* Thuban/Model/classification.py: Remove "from __future__"
	import statement since python 2.2 is the earliest supported
	version.

	* Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
	Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
	depending on the units this projection *forwards* into.

	* Thuban/Model/save.py (SessionSaver.write_classification):
	Remove unnecessary use of lambdas and nested functions.

	* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
	adjustment here if the map projection uses degrees.

	* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
	scale adjust code since it is now done before calling
	this method. Don't do anything if the map projection
	is None.

2003-06-19  Bernhard Herzog  <bh@intevation.de>

	Move version specific load tests to their own file.

	* test/test_load.py: Expand the doc-string to explain a bit how to
	handle file format changes.
	(TestClassification.test): Update the docstring as this test is
	not about Thuban 0.2 anymore.

	* test/test_load_0_2.py: New file with the load tests for thuban
	files created with Thuban 0.2 and earlier.

2003-06-19  Bernhard Herzog  <bh@intevation.de>

	Add XML validation to some of the tests. Validation will only be
	done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
	To make the DTD available to the test cases it's moved into
	Resources/XML

	* Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
	for versions up to and including 0.2. Two slight changes: added an
	encoding specification and fixed the comment which refered to
	GRASS, not Thuban

	* test/xmlsupport.py: New support module for tests involving XML.
	Currently there's a mix-in class for XML validation.

	* test/test_xmlsupport.py: New. Tests for the xmlsupport module

	* test/test_save.py (SaveSessionTest): Derive from ValidationTest
	so that we can validate the
	(SaveSessionTest.testEmptySession)
	(SaveSessionTest.testSingleLayer)
	(SaveSessionTest.testSingleLayer)
	(SaveSessionTest.testLayerProjection)
	(SaveSessionTest.testRasterLayer)
	(SaveSessionTest.testClassifiedLayer): Validate the generated XML

	* test/runtests.py (main): Call print_additional_summary instead
	of print_garbage_information

	* test/support.py (resource_dir): New function to return the
	"Resource" subdirectory
	(print_additional_summary): New function to combine several
	summary functions
	(run_tests): Use print_additional_summary instead of calling
	print_garbage_information directly

2003-06-19  Bernhard Herzog  <bh@intevation.de>

	* Doc/thuban.dtd (classification): Correct the content model of
	the classification element.
	(projection): Add the "name" attribute

2003-06-19  Frank Koormann   <frank.koormann@intevation.de>

	MERGE from the greater-ms3 branch.

	* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
	scale if projection is latlong to get better estimate.

	Fix problem of hidden properties dialog under windows after double
	click on layer tree:
	The tree control always gets an Expanded / Collapsed event after 
	the ItemActivated  on double click, which raises the main window again. 	We add a second ItemActivated event to the queue, which simply 
	raises the already displayed window.

	* Thuban/UI/legend.py (LegendTree.__init__): Instance variable 
	raiseProperties initialized to prevent endless loops
	(LegendTree._OnItemActivated): Depending on self.raiseProperties
	simply raise the properties or open the dialog and issue a second
	event.

2003-06-18  Jonathan Coles   <jonathan@intevation.de>

	* setup.py: Fix a few problems that occured under Windows.

2003-06-18  Jonathan Coles   <jonathan@intevation.de>

	When Thuban loaded the map was redrawn twice because the
	legend was being opened after the mainwindow was created
	and not during its creation. This meant the map was drawn
	initially and then had to be redrawn when the legend 
	caused the display to change. Now the legend is opened
	in the mainwindow constructor which resolves this issue.

	Also, although we were checking for the existence of 
	gdal and gdalwarp modules, the gdalwarp extension was
	still being compiled (which may fail if the system doesn't
	have gdal installed). the build_ext command to setup.py
	now accepts the flags --with-gdal and --without-gdal.
	If --without-gdal is specified setup.py will try to 
	use the gdal parameters specified by gdal-config. Under
	windows, those parameters have to be set in setup.py
	as with proj4 an wxWindows.

	* setup.py: Use a list instead of seperate variables for
	extension parameters so we can create a generic function
	that runs an appropriate *-config script.
	(run_cs_script): Renamed from run_wx_script and modified
	to accept a second argument which is a list of lists to
	be filled in by the values returned from running the command.
	(thuban_build_ext): New. Extends the build_ext command and
	provides the options --with-gdal/--without-gdal which then
	optionally includes the gdalwarp extension.

	* Thuban/Model/resource.py: First check if we can import
	the gdalwarp Thuban extension before checking for gdal.
	Also added some comments.
	
	* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
	the map is None which may be the case if none has been loaded
	yet.

	* Thuban/UI/main.py (main): Remove call to ShowLegend.

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().

	* Thuban/UI/renderer.py: Check for gdal support before importing
	gdalwarp.
	(MapRenderer.render_map): Only try to optimize if we have gdal
	support otherwise nothing will get drawn.

	* Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called 
	during startup before a map has been created. Check if map is None 
	before using it and do nothing if it is.

2003-06-17  Jonathan Coles   <jonathan@intevation.de>

	Fix the problem with raster layers under Windows that caused
	Thuban to crash. The view should respond to layer projection
	changed events to update the display. Changes to a projection
	should not cause the map to be set to full extent.
	
	* Thuban/UI/view.py (MapCanvas.__init__): New instance variable
	current_map_proj to remember the current map projection so that
	when the projection changes we know what the previous projection
	was. 
	(MapCanvas.SetMap): Unsubscribe and subscribe to 
	LAYER_PROJECTION_CHANGED events.
	(MapCanvas.projection_changed): Split into two methods that respond
	to map and layer projection changes.
	(MapCanvas.map_projection_changed): New. Takes the current view and
	projects it using the new projection. This does not cause the
	map to be redrawn at full extent.
	(MapCanvas.layer_projection_changed): New. Cause a redraw which
	will draw each layer in its new projection.
	
	* extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
	VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
	under Windows.
	
	* extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
	to twice sizeof(void*) because there are two digits for each
	hex byte.

2003-06-16  Bernhard Herzog  <bh@intevation.de>

	Update to the layer interface: Direct access to the table,
	shapetable, shapefile and filename attributes is now actively
	deprecated by issuing deprecation warnings for all places where
	this happens.

	* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
	to the instance variables table, shapetable, shapefile and
	filename via __getattr__ so that we can issue a deprecation
	warning.
	(Layer.SetShapeStore): Don't set the deprecated instance variables
	any more
	(Layer.SetShapeStore): Don't use deprecated layer instance
	variables
	(Layer.Destroy): No need to explicitly remove the instance
	variables any more
	(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
	instance variables

	* Thuban/UI/classgen.py (ClassGenDialog.__init__)
	(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
	(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
	use deprecated layer instance variables

	* Thuban/UI/classifier.py (Classifier.__init__): Don't use
	deprecated layer instance variables

	* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
	(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
	instance variables

	* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
	deprecated layer instance variables

	* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
	deprecated layer instance variables

	* Thuban/Model/save.py (SessionSaver.write_layer): Don't use
	deprecated layer instance variables

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
	(MapRenderer.polygon_render_param): Don't use deprecated layer instance
	variables

	* test/runtests.py (main): Turn Thuban's deprecation warnings into
	errors so that they're cought by the tests

	* test/test_load.py (TestSingleLayer.test): Don't use deprecated
	layer instance variables

2003-06-16  Jonathan Coles   <jonathan@intevation.de>

	Fix a problem under Windows whereby if the user double-clicks on a
	layer in the legend that tree item will expand or collapse as well
	as open the layer properties dialog. The state of the tree item
	should not be affected.

	* Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
	preventExpandCollapse and subscribe to expanding and collapsing 
	events.
	(LegendTree.OnItemExpandCollapse): New. Responds to expanding and 
	collapsing events and will veto the event if it has been triggered 
	by the user double clicking on a layer.
	(LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
	that an expanding/collapsing event should be vetoed.

2003-06-13  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/classifier.py (Classifier.OnClose)
	(Classifier.map_layers_removed)
	(Classifier.layer_shapestore_replaced): Unsubscribe the messages
	in OnClose and not in map_layers_removed or
	layer_shapestore_replaced to make sure it always happens when the
	dialog is closed

2003-06-13  Jonathan Coles   <jonathan@intevation.de>

	This puts back a fix for Windows where a panel is needed so that
	the background of the table view appears correctly.

	* Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
	object that can be used by derived classes to place any 
	controls (including the grid) onto.
	(QueryTableFrame.__init__): Use the panel as the parent window
	for all the controls. Reparent the grid so that the panel is
	the parent. Call UpdateStatusText() to correctly initialize
	the status bar.

2003-06-13  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
	from wxFrame (as opposed to wxDialog like the other classes)
	but otherwise behaves like the other classes. This is needed
	for the TableView which isn't really a dialog and needs to
	have a status bar and control buttons.

	* Thuban/UI/tableview.py (TableGrid.__init__): Create an 
	instance variable to keep track of how many rows are selected.
	Subscribe once to the the events we are interested in.
	(ThubanGrid.OnRangeSelect): Only handle event if event handling
	hasn't been turned off.
	(ThubanGrid.OnSelectCell): Only handle event if event handling
	hasn't been turned off.
	(ThubanGrid.ToggleEventListeners): Rather than subscribe None
	as an event listener (which changes the event handler stack)
	simply set an instance variable to False. This is checked in
	the event handlers.
	(ThubanGrid.GetNumberSelected): Return the number of currently
	selected rows.
	(TableFrame): Inherit from ThubanFrame so we can have a 
	status bar and control buttons.
	(QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
	Explicitly set which items are selected in the operator choice and
	action choice so there is always a valid selection. Fixes RTbug #1941.
	Subscribe to grid cell selection events so we can update the
	status bar.
	(QueryTableFrame.UpdateStatusText): Update the status bar with
	how many rows are in the grid, how many columns, and how many
	rows are selected.
	(QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
	Call UpdateStatusText when cells are (de)selected.
	(QueryTableFrame.OnQuery): Use the string value in the value
	combo if either the selected item index is 0 or if the string
	cannot be found in the predefined list (this happens if the
	user changes the text). Fixes RTbug #1940.
	Only turn off the grid event listeners if there a query comes
	back with a none empty list of ids. in the case that the list
	is empty this causes a grid.ClearSelection() call to actually
	clear the grid selection which causes the selected items in
	the map to be deselected. Fixes RTbug #1939.

	* test/test_save.py (XMLWriterTest.Encode): Check return values.
	Fixes RTbug #1851.

2003-06-13  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/identifyview.py (IdentifyView.__init__): Call
	self.selected_shape with the current selection to make sure the
	contents of the dialog are up to date when it's shown for the
	first time.
	The dialog used to work without this by luck. The recent fix to
	the connector module 'broke' a 'feature' the identify view was
	relying on, i.e that subscribing to a message in response to
	receiving a message of that type would mean that the new
	subscriber would also be called for the same message.
	
2003-06-12  Jonathan Coles   <jonathan@intevation.de>

	* extensions/thuban/gdalwarp.cpp: Removed debug printing as
	the image is rendered. Fixes RTbug #1937.

2003-06-12  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Lib/fileutil.py: As is done under Windows, create the
	user directory if it doesn't exist on a posix system. 
	Fixes RTbug #1815.

	* Thuban/Model/resource.py (get_user_proj_files): Moved the
	called to get_application_dir here, so that the directory
	will only be called if this method is invoked.

	* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
	the projfilepath if no projection is selected.

2003-06-12  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
	the scalebar if the current map has no projection set.

	* Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
	projfilepath label to just the basename of the projection file
	rather than include the entire path.

	* Thuban/Model/resource.py: Fix missed proj functions that 
	needed to be renamed.

2003-06-12  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: Removed assert statements that
	tested if the variable was an instance of Color. 

	* Thuban/Model/color.py (Color): Remove commented code that isn't
	used.
	(Transparent): Renamed from NoColor. Doesn't inherit from Color.
	Fixes RTbug #1835.
	(Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
	Needed now that the class doesn't inherit from Color.

2003-06-12  Jonathan Coles   <jonathan@intevation.de>

	* test/test_save.py (XMLWriterTest.testEncode): Explicitly
	check unicode strings.

	* test/test_layer.py: Check for existence of gdal.

2003-06-12  Jonathan Coles   <jonathan@intevation.de>
    
	* Thuban/Model/xmlreader.py: New. Contains the XMLReader class
	that was in load.py

	* Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
	that was in save.py

2003-06-12  Jonathan Coles   <jonathan@intevation.de>

	This is largely a collection of bug fixes. We also handle the
	case where gdal is not on the system. The XMLReader and XMLWriter
	classes were moved into there own files to resolve some circular
	import references and because they shouldn't really be in the
	file that is dediciated to reading/writing session files since
	they are also used elsewhere.

	* Thuban/Model/classgen.py: Renamed functions to follow the
	function_names_with_underscores style. Fixes RTbug #1903.
	(calculate_quantiles): Raise ValueError if 'percents' is invalid.

	* Thuban/Model/layer.py: Import gdal only if it available.
	(RasterLayer): Handle the case where the gdal library is unavailable.
	Addresses RTbug #1877.

	* Thuban/Model/load.py (XMLReader): Moved into seperate file
	xmlreader.py.

2003-06-12  Jonathan Coles   <jonathan@intevation.de>

	This is largely a collection of bug fixes. We also handle the
	case where gdal is not on the system. The XMLReader and XMLWriter
	classes were moved into there own files to resolve some circular
	import references and because they shouldn't really be in the
	file that is dediciated to reading/writing session files since
	they are also used elsewhere.

	* Thuban/Model/classgen.py: Renamed functions to follow the
	function_names_with_underscores style. Fixes RTbug #1903.
	(calculate_quantiles): Raise ValueError if 'percents' is invalid.

	* Thuban/Model/layer.py: Import gdal only if it available.
	(RasterLayer): Handle the case where the gdal library is unavailable.
	Addresses RTbug #1877.

	* Thuban/Model/load.py (XMLReader): Moved into seperate file
	xmlreader.py.

	* Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
	file xmlwriter.py.

	* Thuban/Model/resource.py: Renamed functions to following the
	function_names_with_underscores style.
	(has_gdal_support): New function that returns true if the gdal 
	library is available. Addresses RTbug #1877.

	* Thuban/UI/application.py (ThubanApplication.OpenSession):
	Display a message box if the gdal library is not available, but
	only if there are any layers that would use it. Addresses RTbug #1877.

	* Thuban/UI/classgen.py: Use renamed projection resource functions.
	(GenUniformPanel.__CalcStepping): Fix a slight discrepency 
	when using integers versus floats.

	* Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
	determine if the "Add Image Layer" menu option should be 
	greyed out or not. Addresses RTbug #1877.

	* Thuban/UI/projdialog.py: Use renamed projection resource functions.

	* Thuban/UI/renderer.py (MapRenderer.render_map): Only try to 
	optimize if a raster layer is visible. Fixes RTbug #1931.
	Only draw the raster layer if the gdal library is available.
	Addresses RTbug #1877.

	* test/test_classgen.py: Add tests for generate_singletons,
	generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
	(test_calculate_quantiles): Fix some tests to catch the new
	ValueError that is raised.

	* test/test_proj.py: Use renamed projection resource functions.

	* test/test_save.py (SaveSessionTest.testClassifiedLayer): New
	test for saving classified layers. Fixes RTbug #1902.
	(XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.

2003-06-12  Jan-Oliver Wagner <jan@intevation.de>

	Fix for http://intevation.de/rt/webrt?serial_num=1900.

	* Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.

	* Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
	multiplechoicedialog.py rather than from the wxPython library.

2003-06-11  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/Lib/fileutil.py (get_application_dir): Minor stability
	update.

2003-06-11  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/Lib/fileutil.py (get_application_dir): New function to
	determine the absolute .thuban/thuban directory under 
	"posix" (os.expanduser) and "nt" (read AppData registry key). 

	* Thuban/Model/resource.py: Use get_application_dir

	* Thuban/UI/application.py (ThubanApplication.read_startup_files): 
	Use get_application_dir.

2003-06-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
	the messages MAP_LAYERS_REMOVED messages
	(LayerTableFrame.OnClose): Unsubscribe from it.
	(LayerTableFrame.map_layers_removed): New. Receiver for
	MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
	dialog is showing is removed.

2003-06-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
	of the receivers list so that unsubscribing in a receiver doesn't
	modify it while iterating over it.

	* test/test_connector.py
	(ConnectorTest.test_disconnect_in_receiver): New. Test whether
	unsubscribing in a receiver works correctly. See docstring for
	details

2003-06-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
	message.

	* Thuban/Model/layer.py (Layer.SetShapeStore): Send
	LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
	LAYER_CHANGED will still be sent if the classification changes.

	* Thuban/UI/classifier.py (Classifier.__init__): Add the map as
	parameter so we can subscribe to some of its messages
	(Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
	and the layer's LAYER_SHAPESTORE_REPLACED
	(Classifier.unsubscribe_messages): New. Unsubscribe from message
	subscribed to in __init__
	(Classifier.map_layers_removed)
	(Classifier.layer_shapestore_replaced): receivers for the messages
	subscribed to in __init__. Unsubscribe and close the dialog

	* Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
	the map to the Classifier dialog

	* test/test_layer.py (SetShapeStoreTests): Derive from
	SubscriberMixin as well so we can test messages
	(SetShapeStoreTests.setUp): Subscribe to some of the layer's
	messages
	(SetShapeStoreTests.tearDown): Clear the messages again
	(SetShapeStoreTests.test_sanity): Expand the doc-string and check
	for the modified flag too
	(SetShapeStoreTests.test_set_shape_store_modified_flag): New test
	to check whether SetShapeStore sets the modified flag
	(SetShapeStoreTests.test_set_shape_store_different_field_name)
	(SetShapeStoreTests.test_set_shape_store_same_field)
	(SetShapeStoreTests.test_set_shape_store_same_field_different_type):
	Add tests for the messages. This checks both the new
	LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED

2003-06-06  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/mainwindow.py: Improved and partly added help texts for
	the menu items.

2003-06-05  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/identifyview.py (IdentifyView.__init__):
	Layout reimplemented without panel. Make life easier to fit the list
	in the dialog.

2003-06-05  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
	once on initialisation (Former implementation resulted in multiple
	entries for each projection).
	(ProjFrame.__FillAvailList): selectProj as second optional parameter, 
	if set, select the projection found under the specified name. This 
	overwrites any other selection estimate.
	Removed projchoice filling from this method.
	(ProjFrame._OnSave, ProjFrame._OnAddToList): 
	Updated call of ProjFrame.__FillAvailList
	(LCCPanel._DoLayout): Moved parameter controls in more common order.

	* Resources/Projections/defaults.proj: Extended defaults representing
	various common European projections.

2003-06-05  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/identifyview.py (IdentifyView.__init__): 
	Use ListCtrl instead of GridCtrl

	* Thuban/Model/resource.py: 
	Guess location of .thuban directory from tempdir parent directory.

	* Thuban/UI/application.py (ThubanApplication.read_startup_files):
	Guess location of .thuban directory from tempdir parent directory.

2003-06-04  Bernhard Herzog  <bh@intevation.de>

	Do not cache the values returned by the tree widget's
	GetFirstChild and GetNextChild methods because it led to lots of
	segfaults. The new way requires more brute force but is more
	reliable.

	* Thuban/UI/legend.py (LegendTree.__init__): Remove instance
	variable layer2id
	(LegendTree.find_layer): New method to do with brute force what
	layer2id tried to accomplish
	(LegendTree._OnMsgLayerChanged)
	(LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
	Use find_layer instead of layer2id
	(LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
	update layer2id anymore
	(LegendTree._OnMsgMapLayersRemoved) 
	(LegendTree._OnMsgMapLayersAdded): Get by without layer2id.

2003-06-03  Thomas Koester  <tkoester@intevation.de>

	* Thuban/Model/classgen.py (GenQuantiles0): New function.

2003-06-02  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
	New commands.
	(main_menu): Add the new commands.
	(MainWindow.TableRename): New. Implementation of the table_rename
	command.
	(MainWindow.RenameLayer): New. Implementation of the layer_rename
	command.

	* Thuban/Model/session.py (Session.AddTable): call self.changed to
	set the modified flag

	* test/test_session.py (TestSessionSimple.test_add_table): Test
	whether the modified flag is set properly

	* Thuban/Model/base.py (TitledObject.SetTitle): Call changed
	instead of issue so that the modified flags get updated.

	* test/test_base.py (SomeTitledObject): Derive from Modifiable
	instead of Publisher to reflect reality better and to accomodate
	the fact that SetTitle now calls changed instead of issue

2003-06-02  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
	acquisition has to happen before the try in a try-finally.

2003-06-02  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
	possible that a layer is removed that is not currently selected in
	the legend so don't check for this.

2003-05-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.Destroy): Set all instance
	variables to None that have direct or indirect references to
	shapefiles or dbf files to make sure that they do go away and the
	files are closed.

2003-05-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
	availImgListIndices when a new image list is created
	
2003-05-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/legend.py (LegendTree.__init__): New instance variable
	changing_selection to indicate whether the LegendTree code itself
	is currently changing the selection
	(LegendTree.normalize_selection): New method to normalize the
	selection by selecting the layer item even if the user clicked on
	the classification.
	(LegendTree._OnSelChanged): normalize the selection. This works
	around a bug in wx which doesn't keep track of the selection
	properly when subtrees are deleted.

2003-05-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
	maximum and minimum scale factors.

	* test/test_classgen.py (ClassGenTest.test): Update to reflect the
	changes in classgen.py

2003-05-30  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py: Remove ClassGenerator class but make
	all the methods functions. Fixes RTBug #1903.

	* Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
	to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
	RTBug #1907.

	* Thuban/UI/classgen.py: Use classgen functions that were part
	of the ClassGenerator class. Put try/finally blocks around
	code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
	RTBug #1904.

	* Thuban/UI/classifier.py: Remove unused import of ClassGenerator.

	* Thuban/UI/legend.py: The legend was cleared and repopulated any
	time something changed which caused some state to be lost such
	as which children were expanded or collapsed. Fixes RTBug #1901.
	(LegendTree._OnMsgMapLayersAdded): Add only new layers.
	(LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in 
	the legend but not in the map.
	(LegendTree.__FillTree): Move main functionality out into smaller
	methods that can be used by other methods.
	(LegendTree.__FillTreeLayer): Reuse old slots in the image list
	if they are available.
	(LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
	that we override the wxTreeCtrl method. Iterate over children
	and call __RemoveLayer.
	(LegendTree.__AddLayer): New. Add a new layer to the legend.
	(LegendTree.__RemoveLayer): Remove a layer from the legend.
	(LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
	Should only be called with the id of a layer branch.
	(LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
	Returns the root item or creates one if necessary.

	* Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
	ProjectRasterFile with tuple arguments instead of strings.

	* Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
	with try/finally. Fixes RTBug #1904.

	* Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
        with try/finally. Fixes RTBug #1904.
	(MapCanvas.FitSelectedToWindow): If a single point is selected
	simply center it on the display. Fixes RTBug #1849.

	* extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
	to be compiled as a standalone app. Now the code can only be
	called from Python which simplifies the parameter passing.
	(ProjectRasterFile): Handle Python arguments. Remove code that
	checks for a destination dataset. Add more clean up code.

	* test/test_map.py (TestMapWithContents.test_raise_layer_top,
	TestMapWithContents.test_lower_layer_bottom): 
	Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
	Fixes RTBug #1907.

	* Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
	extent to the map when the legend is toggled. Fixes RTBug #1881.

2003-05-29  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
	unsubscribes all that is subcribed in __init__.

2003-05-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
	(MainWindow.CanDuplicateLayer): New methods to implement the
	Layer/Duplicate command.
	(layer_duplicate command): New.
	(main_menu): Add layer_duplicate to the Layer menu.

2003-05-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
	renderer so that NULL/None values get displayed differently (by a
	gray rectangle).
	(TableGrid.__init__): Override the default renderers

2003-05-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.SetShapeStore): Set the
	classification to "None" if the type of the field has changed.

	* test/test_layer.py (SetShapeStoreTests): New. Class with a few
	test for the Layer.SetShapeStore method

2003-05-28  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
	does not necessarily have a filename).

2003-05-28  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
	sort the selection list for the dialog.

2003-05-28  Frank Koormann  <frank.koormann@intevation.de>

	* extensions/thuban/wxproj.cpp 
	(project_point): Removed cast to int for projected point coordinates.
	(shape_centroid): Return last point if all polygon vertices fall 
	to one point.
 
2003-05-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
	with layers that don't have shapestores, i.e. raster layers.

2003-05-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/table.py (DBFTable.__init__): Omit the extension
	when determining the title from the filename.

	* test/test_dbf_table.py (TestDBFTable.test_title): Update to
	reflect changes in the way the title is derived from the filename

2003-05-28  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.TableShow): 
	Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.

2003-05-27  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
	delegate SelectedLayer.
	(MainWindow.LayerUnjoinTable): Implement.
	(_can_unjoin): New. Helper function for the sensitivity of the
	layer/unjoin command.

	* Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
	(DerivedShapeStore.OrigShapeStore): New. Return the original
	shapestore. Used to figure out how to unjoin.
	(DerivedShapeStore.Shapefile): Fix a typo.

2003-05-27  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
	well
	(JoinDialog.__init__): Use the layer parameter and only build the
	left choice when a layer is given
	(JoinDialog.OnJoin): Handle layer joins as well
	(JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
	that the user selects the "Select..." item. The sensitivitly
	updating is now in update_sensitivity
	(JoinDialog.y): New method to refactor the sensitivity update of
	the join button into its own method.

	* Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.

2003-05-27  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (table_close command): Make it sensitive
	iff there are unreferenced tables in the session

2003-05-27  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/messages.py (TABLE_REMOVED): New message.

	* Thuban/Model/session.py (Session.UnreferencedTables): New method
	to return tables that are not referenced by other tables or shape
	stores and can be removed.
	(Session.RemoveTable): Issue a TABLE_REMOVED message after
	removing the table

	* Thuban/UI/mainwindow.py: Remove unused imports
	(MainWindow.TableClose): Implement.

	* Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
	messages so that the frame will be automatically closed when a new
	session is opened or the table is removed.
	(TableFrame.OnClose): Unsubscribe the Subscriptions made in
	__init__
	(TableFrame.close_on_session_replaced)
	(TableFrame.close_on_table_removed): New. Subscribers that close
	the window

	* test/test_session.py (TestSessionMessages.test_remove_table)
	(TestSessionSimple.test_remove_table): Move the test to
	TestSessionSimple and add test for the TABLE_REMOVED message
	(TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
	(TestSessionSimple.test_unreferenced_tables) New. Test for the
	UnreferencedTables method.
	(UnreferencedTablesTests): New. Class with some more sophisticated
	tests for UnreferencedTables.

2003-05-27  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
	display has some unwanted side effects. Removed again.
 
2003-05-27  Frank Koormann  <frank.koormann@intevation.de>

	* Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.

	* Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer" 

2003-05-27  Jan-Oliver Wagner <jan@intevation.de>

	* test/test_menu.py (MenuTest.test): Added test for
	Menu.RemoveItem().

	* Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
	the menu.

2003-05-27  Frank Koormann  <frank.koormann@intevation.de>
	
	Nonmodal dialogs without parent (i.e. they can fall behind the main
	window)

	* Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
	all dialogs in the dialogs dictionary and the canvas.

	* Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
	parent, i.e. can fall behind other windows.
	(NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
	dictionary before removing it.

	* Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog

	* Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
	* Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
	* Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog

2003-05-27  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
	tableview dialog
	(MainWindow.TableShow): Use ShowTableView to open the dialogs.
	Also, don't use the table's titles as the dialog names. The titles
	aren't guaranteed to be unique.
	(MainWindow.TableOpen): Open a table view dialog after opening the
	table

2003-05-27  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
	effect can be achieved by simply closing the window showing the
	table.
	(MainWindow.TableHide): Removed.
	(main_menu): Removed "table_hide"

2003-05-27  Frank Koormann  <frank.koormann@intevation.de>

	Fix legend tree display problems under Win32

	* Thuban/UI/legend.py:  BMP_SIZE_W = 15
	(LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
	(LegendTree.__FillTreeLayer): Explicitely set SelectedImage.

	* Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.

2003-05-27  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
	'after' now allows to insert separators almost anywhere in the menu.

2003-05-27  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the 
	"S" of selection box label to hint on hot key (Alt-S). Works under 
	Win32 but is ignored under GTK.

2003-05-26  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
	Center Choices.

2003-05-26  Bernhard Herzog  <bh@intevation.de>

	Remove the Precision methods again. They're too DBF specific to be
	part of the table interface and they're only used in table_to_dbf
	anyway.
	
	* Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
	fixed precision of 12 for doubles.
	(TransientTableBase.Precision): Removed
	(AutoTransientTable.Width): Delegate to self.table.

	* Thuban/Model/table.py (DBFTable.Precision)
	(MemoryTable.Precision): Removed.
	(MemoryTable.Width): Use a fixed precision of 12 for doubles.
	(table_to_dbf): Use a fixed precision of 12 for floats unless the
	column object specifies something else.

	* test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
	test for table_to_dbf

2003-05-26  Bernhard Herzog  <bh@intevation.de>

	* test/test_transientdb.py
	(TestTransientTable.run_iceland_political_tests): Fix a comment.

2003-05-26  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
	implementation. Mark parts of the file format strings for
	localization.

	* Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
	file and add the table to the tables managed by the session

	* test/test_session.py (TestSessionSimple.test_open_table_file):
	New. test case for OpenTableFile

2003-05-26  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
	Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
	Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
	Replace the true/false of wxWindows by True/False of Python 2.2.1.

2003-05-26  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
	already a selection present, update the grid accordingly.

	* Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
	resizeable and increase its initial size.

2003-05-26  Frank Koormann  <frank.koormann@intevation.de>

	Table export functionality

	* Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width): 
	Return width (in characters) for a column.
	(DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
	(table_to_dbf): Write table to dbf file.
	(table_to_csv): Write table to csv file.

	* Thuban/Model/transientdb.py (TransientTableBase.Width, 
	TransientTableBase.Precision): Return column width and precision.

	* Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
	or table_to_csv depending on file selection.

	* test/test_dbf_table.py: 
	Test table_to_dbf (extension of former part of test).

	* test/test_csv_table.py:
	Test table_to_csv.

2003-05-23  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
	Use QueryTableFrame instead of TableFrame.

	* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
	table window with 'Layer Table:' instead of 'Table:'.

2003-05-23  Jan-Oliver Wagner <jan@intevation.de>

	Give all tables a title via mix-in TitledObject.LayerShowTable

	* Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
	only if it exists.

	* Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
	and call its init-method with a default title. Remove Title() method.

	* Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
	AutoTransientTable): mix-in TitledObject and call its init-method with
	a default title. Remove Title() method.

2003-05-23  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/session.py (Session.AddShapeStore): Define
	AddShapeStore analogously to AddTable.

	* test/test_session.py (TestSessionSimple.test_add_shapestore):
	New. Test for AddShapeStore

2003-05-23  Jan-Oliver Wagner <jan@intevation.de>

	Introducing QueryTableFrame and a very coarse ShowTable implementation.

	* Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
	class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
	The latter implements the selection GUI without dependency on a layer.
	LayerTableFrame now is derived from QueryTableFrame and connects
	to a layer.

	* Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
	implementation that still needs work.

	* Thuban/Model/layer.py (Layer.TreeInfo): Added filename.

2003-05-22  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/Model/transientdb.py (TransientJoinedTable.__init__): 
	Added "outer_join = False" as optional parameter.
	(TransientJoinedTable.create): If outer join is true, perform a
	"LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
	the left table. Records not matching are filled with 0 / None.

	* Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
	(JoinDialog.OnJoin): Consider outer join check box.

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
	somewhat safer way. Storing the traceback in a local variable can
	lead to memory leaks

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
	the wxMessageDialog's Destroy() method.

2003-05-22  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/join.py (JoinDialog.__init__): Make use of 
	TransientTable.Title()

2003-05-22  Frank Koormann  <frank.koormann@intevation.de>

	Join Dialog, initial version.

	* Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.

	* Thuban/UI/join.py (JoinDialog): Functional implementation of 
	former framework. Renamed Table1/Table2 to LeftTable/RightTable
	in all occurences.

	* Thuban/Model/transientdb.py (TransientJoinedTable.__doc__): 
	Typo fixed.

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	Give the tables titles so that the GUI can display more meaningful
	names. For now the titles are fixed but depend on e.g. filenames
	or the titles of the joined tables.

	* Thuban/Model/transientdb.py (TransientTable.Title)
	(TransientJoinedTable.Title, AutoTransientTable.Title): New.

	* Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.

	* test/test_transientdb.py
	(TestTransientTable.test_auto_transient_table_title): New. Test
	for the Title method
	(TestTransientTable.test_transient_joined_table)
	(TestTransientTable.test_transient_table): Add test for the Title
	methods

	* test/test_memory_table.py (TestMemoryTable.test_title): New.
	Test for the Title method

	* test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
	the Title method

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
	Provide a better way to destroy the layers
	(TestLayer.test_base_layer, TestLayer.test_arc_layer)
	(TestLayer.test_point_layer, TestLayer.test_empty_layer)
	(TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
	the new way to destroy the layers.
	(TestLayer.test_derived_store): New. Test for using a layer with a
	DerivedShapeStore

	* Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
	filename if the shape store actually has one.

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
	for the filename

	* test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
	for the FileName method
	(TestDBFTableWriting.test_write): Fix spelling of filename

2003-05-22  Thomas Koester  <tkoester@intevation.de>

	* Thuban/Model/range.py, test/test_range.py: Brought over new Range
	from SciParam that now really is immutable.

2003-05-22  Frank Koormann  <frank.koormann@intevation.de>

	Layer Top/Bottom placement added to legend.

	* Thuban/UI/legend.py 
	(LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
	bound to tool events.
	(LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
	New, methods binding the event methods with the map methods.

	* Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place 
	layer at top/bottom of layer stack.

	* Resources/Bitmaps/top_layer.xpm: New button icon.

	* Resources/Bitmaps/bottom_layer.xpm: New button icon.

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/session.py (Session.RemoveTable): New method to
	remove tables

	* test/test_session.py (TestSessionSimple.test_remove_table): New.
	Test for RemoveTable

2003-05-22  Thomas Koester  <tkoester@intevation.de>

	* Thuban/Model/classgen.py: Added short module doc string and CVS id.
	(ClassGenerator.GenUniformDistribution): Use new Range __init__, too.

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	Implement a way to discover dependencies between tables and
	shapestores.

	* Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
	(TransientJoinedTable.Dependencies)
	(AutoTransientTable.SimpleQuery): New. Implement the dependencies
	interface
	(TransientJoinedTable.__init__): Keep tack of the original table
	objects in addition to the corresponding transient tables.

	* Thuban/Model/table.py (DBFTable.Dependencies)
	(MemoryTable.Dependencies): New. Implement the dependencies
	interface

	* Thuban/Model/data.py (ShapeTable): New. Helper class for
	ShapefileStore
	(ShapefileStore.__init__): Use ShapeTable instead of
	AutoTransientTable
	(ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
	(ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
	methods for filename and type
	(ShapefileStore.Dependencies): New. Implement the dependencies
	interface
	(DerivedShapeStore): New class to replace SimpleStore. The main
	difference to SimpleStore is that it depends not on a shapefile
	but another shapestore which expresses the dependencies a bit
	better
	(SimpleStore.__init__): Add deprecation warning.

	* test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
	Test for the Dependencies method.

	* test/test_memory_table.py (TestMemoryTable.test_dependencies):
	New. Test for the Dependencies method.

	* test/test_transientdb.py
	(TestTransientTable.test_auto_transient_table_dependencies): New.
	Test for the Dependencies method.
	(TestTransientTable.test_transient_joined_table): Add test for the
	Dependencies method.

	* test/test_session.py (TestSessionSimple.setUp)
	(TestSessionSimple.tearDown): New. Implement a better way to
	destroy the sessions.
	(TestSessionSimple.test_initial_state)
	(TestSessionSimple.test_add_table): Bind session to self.session
	so that it's destroyed by tearDown
	(TestSessionSimple.test_open_shapefile): New. Test for
	OpenShapefile and the object it returns

2003-05-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/session.py (Session.AddTable): New method to
	register tables with the session.
	(Session.Tables): Return the tables registered with AddTable too.

	* test/test_session.py (TestSessionSimple.test_add_table): New.
	Test case for the AddTable method

2003-05-22  Frank Koormann  <frank.koormann@intevation.de>

	UI polishing updates: Place main buttons (OK, Cancel, etc) in the 
	lower right corner, center labels for selections, initialize controls
	in reasonable order for keyboard navigation. 

	* Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
	(ProjFrame.__DoOnProjAvail): Determine position of current projection
	using the wxListBox.FindString() method. Still a problem (#1886)

	* Thuban/UI/classifier.py 
	(Classifier.__init__, SelectPropertiesDialog.__init__)

	* Thuban/UI/classgen.py (ClassGenDialog.__init__, 
	(ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the 
	different classification types from here to __init__.
	(GenUniquePanel.__init__): Set the column width of the first field 
	in the Field ListCtrl to the full width.
 
	* Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
	Button to 'Export'. Center Buttons in Selection Box, set Focus to
	Grid. 
	(LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
	changes focus to the Selection when pressing "Alt-S".

	* Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
	the text if not visible. The italic font sometimes exceeds the
	rendering area.

2003-05-21  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
	to OnClose so that Thuban closes correctly.

	* Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
	DockFrame.OnClose, not DockFrame._OnClose.

2003-05-21  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
	references to 'inf' and use new Range __init__ to pass floats
	directly rather than converting them to strings first. 
	Fixes RTBug #1876.

	* Thuban/Model/classification.py (ClassGroupRange.SetRange):
	Use new Range ___init__ to pass floats.

	* Thuban/Model/layer.py (RasterLayer.__init__): Test if the
	filename is a valid image file. Throw IOError otherwise.

	* Thuban/Model/range.py: Brought over new Range from SciParam that
	is immutable and has an __init__ which can accept floats.

	* Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
	into try block. AddLayer doesn't throw any exceptions anymore. 
	(MainWindow.AddRasterLayer): Move constructor of RasterLayer into 
	try block.

	* Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
	the first item in choices. Fixes RTBug #1882.

	* Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
	has gone to 0 which is a serious problem. abort.
	(MapRenderer.draw_raster_layer): Catch IOError seperately and
	print the error from GDAL.

	* Thuban/UI/tableview.py (TableGrid.__init__): Call
	ToggleEventListeners to turn on listening. 
	(TableGrid.ToggleEventListeners): New. Turns event listening on
	and off so as to prevent excessive messages.
	(LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
	to suppress excessive messages when selecting many rows. 
	Fixes RTBug #1880.

	* Thuban/UI/view.py: Added checks against if scale == 0. This
	is a serious problem that can occur when an image without 
	geo data is loading and causes the map projection bounds to
	go to infinity. Right now, the solution is to simply try
	to recover.

	* extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
	to set the MFILEReceiver attributes even if the data is NULL.

	* extensions/thuban/gdalwarp.cpp: Improved the error handling
	and passed GDAL messages back up to the Python layer. Also
	tried to fix some memory leaks that were present in the original
	utility but didn't matter because the program aborted.

	* test/test_range.py: Copied over tests from SciParam. Removed
	tests against importing. Fixes RTBug #1867.

2003-05-21  Bernhard Herzog  <bh@intevation.de>

	* test/test_load.py: Remove unused imports and restructure the
	test code
	(LoadSessionTest): Split into one class for each test and turn
	LoadSessionTest itself into the base class for all such session
	tests.
	(ClassificationTest): New base class for load tests that test
	classifications
	(TestSingleLayer, TestLayerVisibility, TestClassification)
	(TestLabels, TestLayerProjection, TestRasterLayer): New classes
	for the individual tests

	* test/support.py (FileLoadTestCase.filename): New base class for
	file loading tests

2003-05-21  Jan-Oliver Wagner <jan@intevation.de>

	* Resources/Projections/defaults.proj: Renamed 'Universal Transverse
	Mercator' to 'UTM Zone 32' as a more convenient example.
	Added 'Gauss Krueger Zone 6'.

	* Data/iceland_sample_raster.thuban: political polygon now
	filled transparent to have the raster image visible at once.

2003-05-21  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to 
	OnClose() to keep in sync with extensions. Internally Thuban
	still uses "underscored" names.

2003-05-20  Jonathan Coles   <jonathan@intevation.de>

	This puts back Raster layer support. These layers support projections
	through the GDAL library. Currently, the CVS version is being used.
	There are no Debian packages available although this may change soon. 
	A GDAL driver was extended to support writing to memory rather to
	files.

	There is still some work that needs to be done, such as some error
	handling when loading invalid images or when there is a problem
	projecting the image. This putback simply checks in the majority
	of the work.

	* setup.py: Add gdalwarp library extension.

	* Thuban/Model/layer.py (BaseLayer.HasClassification): New.
	Defaults to False, but can be overridden by subclasses if they
	support classification.
	(RasterLayer): New. Defines a new layer that represents an
	image.

	* Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
	tag handler.
	(SessionLoader.start_layer): Encode the filename.
	(SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
	New. Supports reading a rasterlayer tag.

	* Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.

	* Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
	get a string in Latin1. If we get such as string convert it to
	unicode first, otherwise leave if alone before encoding.
	(SessionSaver.write_layer): Add support for writing both Layers
	and RasterLayers.

	* Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery): 
	The right argument may not be a string, it could also be a Column.

	* Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
	Make initial window size 600x400. Fixes RTBug #1872.

	* Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
	the dialog is constructed so that we can support layers that
	do not have classifications.
	(Classifier._OnTry): Only build a classification if the layer
	supports one.

	* Thuban/UI/legend.py: Change all checks that a layer is an
	instance of Layer into checks against BaseLayer.
	(LegendTree.__FillTreeLayer): Only add children to a branch if
	the layer supports classification.

	* Thuban/UI/mainwindow.py (MainWindow.NewSession,
	MainWindow.OpenSession): Don't proceed with an action if the 
	user chooses Cancel when they are asked to save changes.
	(MainWindow.AddRasterLayer): New. Open a dialog to allow the
	user to select an image file. Create a new RasterLayer and add
	it to the map.

	* Thuban/UI/renderer.py (MapRenderer.render_map): Add support
	for rendering RasterLayer layers.
	(MapRenderer.draw_raster_layer): Actually method that calls
	the GDALWarp python wrapper and constructs an image from the
	data returned.

	* Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
	Choices symbols to match those used in the table query method.
	Replace deprecated method calls on table with new method names.

	* Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
	how small the scale can get. This still needs more testing.

	* extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
	Provides a driver to output in .bmp format.

	* extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h: 
	New. Provides IO routines which write to memory, rather than a file.

	* extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
	of the gdalwarp utility provided in GDAL. Added function calls
	that can be accessed from python.

	* Data/iceland_sample_raster.thuban: New. Sample file that uses
	a raster layer.

	* Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
	layer image data.

	* Doc/thuban.dtd: Added rasterlayer attribute definition.

	* test/test_layer.py, test/test_load.py, test/test_save.py: Added
	tests associated with the raster layer code.

	* test/test_transientdb.py
	(TestTransientTable.test_auto_transient_table_query): Added a test 
	for using a Column object as the "right" parameter to a query.

2003-05-19  Frank Koormann  <frank.koormann@intevation.de>

	* Thuban/version.py (get_changelog_date): 
	Catch exceptions if ChangeLog does not exist.

	* Thuban/UI/view.py (MapCanvas.Export): Bugfix

2003-05-19  Frank Koormann  <frank.koormann@intevation.de>

	Extended version information for Thuban

	* Thuban/version.py: New, version information for Thuban: Last
	modification date and last ChangeLog entry date.

	* Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
	information: Display Thuban, wxPython and Python version.

2003-05-16  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/save.py: Remove some unused imports including the
	__future__ import for nested_scopes as Thuban relies on Python 2.2
	now.
	(XMLWriter.encode): Remove the special case for a None argument.
	In the saver encode is always called with a string argument.

2003-05-16  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/__init__.py: Remove the work-around for the locale bug
	in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
	of the bug was that e.g. float("1.2") would fail. Thuban now
	requires 2.4.x.
	
2003-05-16  Frank Koormann   <frank.koormann@intevation.de>

	Printing enhancement and WMF export (under Win32)

	* Thuban/UI/renderer.py (ExportRenderer): New, derived from
	ScreenRenderer. Renders Map, Legend and Scalebar for export.
	(PrinterRenderer): New, derived from ExportRenderer. Replaces the old 
	PrintRender.

	* Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
	to fullfil information needed for PrinterRenderer.
	(MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
	(MapCanvas.Print): Adapted to new MapPrintout.
	(OutputTransform): General calculations to transform from canvas
	coordinates to export/printing devices.

	* Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also 
	new method_command to call ExportMap, with platform dependency (only
	__WXMSW__)
  
	* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
	of scalebar drawing area as new parameters.
	
	* Thuban/Model/scalebar.py (roundInterval): round long instead of int

	* Thuban/UI/legend.py (ScalebarBitmap.__SetScale): 
	Update to extended scalebar.DrawScalebar header.

	* test/test_export.py: New, test Thuban.UI.view.OutputTransform()

	* test/test_scalebar.py: Made test executable as standalone.

2003-05-16  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/table.py (Table): Remove this compatibility alias
	for DBFTable.

	* test/test_table.py: Import DBFTable as Table because that alias
	doesn't exist anymore.

	* Thuban/UI/classgen.py: Remove some unused imports

2003-05-14  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
	Fix docstring.
	(ClassGenerator.GenUniformDistribution): Fix spelling of method name.
	(ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
	values of the supplied range to determine the beginning and end
	bounds of the generated classes.

	* Thuban/Model/range.py (Range.number_re): Now accepts floats that
	do not have a leading 0 (.5 is now accepted as well as 0.5).

	* Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
	call to ClassGenerator.GenUniformDistribution.

	* Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows 
	layout bug with the 'Projection' label.

	* test/support.py (FloatTestCase): New. Needed for the Range tests.

	* test/test_range.py: New. Imported from SciParam.

2003-05-12  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
	to table.UniqueValues() with calls that retrieve all the values
	from the table. This will need to be replaced by a method on table
	which can simply return the list (perhaps more efficiently).

2003-05-12  Jonathan Coles   <jonathan@intevation.de>

	The return value of ClassGenerator.CalculateQuantiles has changed.
	Refer to the documentation for details.

	* test/test_classgen.py: Modified Quantile tests to use the
	new return values.

	* Thuban/Model/classgen.py 
	(ClassGenerator.GenQuantiles): Add comments describing the parameters,
	use new return values from CalculateQuantiles to produce the correct 
	range bounds in the Classification.
	(ClassGenerator.CalculateQuantiles): Add more comments describing
	the return values and parameters. Make minor adjustments to improve
	the legibility of the code. Fix problem with adjusted not being set
	in most cases.

2003-05-12  Frank Koormann <frank.koormann@intevation.de>
	
	* Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode 
	and latin1. Fixes #1851 finally.

2003-05-09  Jonathan Coles   <jonathan@intevation.de>

	* test/test_classgen.py: New. Tests the Quantile algorithm.

	* Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
	Clean up debugging statement, add comments, fix a small bug in the
	returned adjusted percentiles.
	
2003-05-09  Jonathan Coles   <jonathan@intevation.de>

	Introduces Range class from SciParam into the ClassGroupRange class,
	and such ranges can now be saved and loaded from disk.

	Quantiles are now available in the Classification Generator.

	Initial support for building Queries on a table. Doesn't do anything
	but run some tests.

	* Thuban/Model/classification.py: Explicit imports.
	(ClassGroupRange): Use the Range class to store the underlying
	range information. The interface remains the same, except for
	GetRange(), and you can also supply a Range object as the min 
	parameter to SetRange or __init__.

	* Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
	string appropriately for use in Thuban. Fixes RTbug #1851.
	(SessionLoader.end_projection): Handle the context of the
	projection tag a bit better by looking at what objects are not
	None. There was an assumption that a projection tag for a map
	could occur before any layers.
	(SessionLoader.start_clrange): Provide backward compatibility for
	reading min/max values as well as the new range parameter.

	* Thuban/Model/map.py: Explicit imports.

	* Thuban/Model/resource.py: Import _.
	(ProjFileSaver.write): write header using projfile.dtd.

	* Thuban/Model/save.py: Explicit imports.
	(XMLWriter.encode): New. Encode the given string from a format
	used by Thuban into UTF-8. Fixes RTbug #1851.

	* Thuban/UI/classgen.py: Explicit imports.
	(ClassGenDialog.__init__): Clean up the code and add support
	for Quantiles.
	(ClassGenDialog.OnOK): Add support for Quantiles.
	(GenQuantilesPanel): New. Input panel for Quantiles.
	(ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
	GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py

	* Thuban/Model/classgen.py: New. Contains all the classes named above.

	* Thuban/UI/classifier.py: Explicit imports.
	(ClassTable.GetValueAsCust, ClassTable.__ParseInput, 
	ClassTable.SetValueAsCustom): Reworked to use new Range class.

	* Thuban/UI/legend.py: Explicit imports.

	* Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
	a Table menu and associated method calls.
	(MainWindow.choose_color): Removed. No longer needed.

	* Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
	should be disabled if no projection is selected in the available
	list.

	* Thuban/UI/renderer.py: Explicit imports.

	* Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
	with correctly selecting the rows and issuing the right events.
	Be sure to call Skip() to allow the grid to do some of its own
	handling which allows the rows to actually be selected.
	(LayerTableGrid.select_shapes): Rename from select_shape. Supports
	selecting multiple shapes.
	(LayerTableFrame): Support for building Queries.
	(LayerTableFrame.select_shapes): Allow multiple shapes to be selected.

	* Thuban/UI/tree.py: Explicit imports.

	* Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
	table view can call it.

	* test/test_classification.py: Explicit imports.
	(TestClassification.test_ClassGroupRange): Fix test for new
	Range class.

	* Doc/thuban.dtd: Add range parameter for clrange.

	* Thuban/Model/range.py: Taken from SciParam. Used as the underlying
	object in ClassGroupRange, and also uesd for inputting ranges in
	the classifer table and elsewhere.

	* Thuban/UI/join.py: New. Initial Join dialog. No real functionality
	yet.

2003-05-09  Frank Koormann <frank.koormann@intevation.de>

	* Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.

2003-05-08  Frank Koormann <frank.koormann@intevation.de>

	Coding style updates

	* test/test_scalebar.py: Replaced tab indentation by spaces.

	* Thuban/UI/scalebar.py: Explicit imports.

2003-05-08  Frank Koormann <frank.koormann@intevation.de>

	* Thuban/UI/scalebar.py 
	(ScaleBar.DrawScalebar): Format string bug fixed.

2003-05-08  Frank Koormann <frank.koormann@intevation.de>

	Reorganization of scalebar component (no wx in Thuban/Model)

	* Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py 
	(deriveInterval): 
	Calculate scalebar interval and unit which fits in width for scale.
	(roundInterval): Round float.

	* Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering

	* test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.

	* Thuban/UI/legend.py: Import Thuban.UI.scalebar

2003-05-08  Frank Koormann <frank.koormann@intevation.de>

	* Thuban/UI/legend.py (ScalebarBitmap.SetCanvas): 
	Initialize ScaleBar with canvas.map

	* Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New, 
	round intervals to display smarter lengths
	(ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a 
	layer. If the maps has no projection applied grey the scalebar.

2003-05-07  Frank Koormann <frank.koormann@intevation.de>
	
	Basic Scalebar features added.

	* Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.

	* Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
	(ScaleBarBitmap): New, links the scalebar bitmap with view messages
	and the renderer.

	* Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.

	* Thuban/UI/messages.py: SCALE_CHANGED added.

2003-05-07  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/session.py (Session.__init__): New instance
	variable shapestores to hold a list of all open shapestore objects
	(Session.ShapeStores): New. Accessor method for the shapestores
	list.
	(Session._add_shapestore, Session._clean_weak_store_refs): New.
	Internal methods to maintain the shapestores list.
	(Session.Tables): New. Return all tables open in the session.
	(Session.OpenShapefile): Insert the new ShapeStore into the
	shapestores list.

	* test/test_session.py (TestSessionSimple.test_initial_state): Add
	tests for ShapeStores and Tables
	(TestSessionWithContent.test_shape_stores)
	(TestSessionWithContent.test_tables): New. Test cases for
	ShapeStores and Tables

2003-05-07  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
	Add comments about the optimizations used.
	(AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
	Implement the ReadValue table interface method.

	* test/test_transientdb.py
	(TestTransientTable.run_iceland_political_tests)
	(TestTransientTable.test_transient_joined_table): Add tests for
	ReadValue

2003-05-07  Frank Koormann <frank.koormann@intevation.de>

	* Resources/Bitmaps/fulllayerextent.xpm,
	Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
	new icons.
 
2003-05-06  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
	New. Simply delegate to the transient table's version.

	* test/test_transientdb.py
	(TestTransientTable.test_auto_transient_table_query): New. Test
	case for AutoTransientTable's SimpleQuery

2003-05-06  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
	Implement a simple query method for the query dialog
	(TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
	the row index or shapeid.
	(TransientTable.create): Insert the right value of the row index
	(TransientJoinedTable.create): Copy the row index of the left
	table to the joined result table

	* test/test_transientdb.py
	(TestTransientTable.test_transient_table_read_twice): Fix
	doc-string
	(TestTransientTable.test_transient_table_query): New. Test for the
	SimpleQuery method

2003-05-06  Bernhard Herzog  <bh@intevation.de>

	Convert all table users to use the new table interface. This only
	covers Thuban itself, not GREAT-ER or other applications built on
	Thuban yet, so the compatibility interface stays in place for the
	time being but it now issues DeprecationWarnings.

	Finally, the new Table interface has a new method, HasColumn.

	* Thuban/Model/table.py (OldTableInterfaceMixin): All methods
	issue deprecation warnings when they're. The warnings refer to the
	caller of the method.
	(OldTableInterfaceMixin.__deprecation_warning): New. Helper method
	for the deprecation warnings

	* test/test_table.py: Ignore the deprecation warnings for the old
	table in the tests in this module. The purpose of the tests is to
	test the old interface, after all.

	* test/test_transientdb.py
	(TestTransientTable.run_iceland_political_tests): Use the
	constants for the types. Add a test for HasColumn
	(TestTransientTable.test_transient_joined_table): Adapt to new
	table interface. Add a test for HasColumn
	(TestTransientTable.test_transient_table_read_twice): Adapt to new
	table interface

	* Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
	Adapt to new table interface

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
	new table interface

	* Thuban/UI/controls.py (RecordListCtrl.fill_list)
	(RecordTable.SetTable): Adapt to new table interface

	* Thuban/UI/classifier.py (Classifier.__init__)
	(Classifier.__init__): Adapt to new table interface

	* Thuban/UI/classgen.py (ClassGenDialog.__init__)
	(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
	to new table interface

	* Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
	(AutoTransientTable.HasColumn): Implement the new table interface
	method
	(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
	(AutoTransientTable.UniqueValues): Adapt to new table interface

	* Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
	Adapt to new table interface

	* test/test_layer.py (TestLayer.open_shapefile): Helper method to
	simplify opening shapefiles a bit easier.
	(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
	(TestLayer.test_point_layer): Use the new helper method
	(TestLayer.test_get_field_type): New. Test for the GetFieldType
	method

	* test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
	the new table method

	* test/test_memory_table.py (TestMemoryTable.test_has_column):
	Test for the new table method HasColumn

2003-05-06  Jonathan Coles   <jonathan@intevation.de>

	Addresses the "Selection Extent" wish of RTbug #1787.

	* Resources/Bitmaps/fulllayerextent.xpm,
	Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
	extent. These are just place holders for the real bitmaps.

	* Thuban/Model/layer.py (Shape): Since a Shape is immutable only
	calculate the bounding box once (the first time compute_bbox() is 
	called).
	(Layer.ShapesBoundingBox): New. Given a list of shape ids, return
	the bounding box for the shapes in lat/long coordinates. 

	* Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
	option.
	(MainWindow.has_selected_shapes): New. Returns true if there are 
	any selected shapes.
	(MainWindow.FullSelectionExtent): New. Calls 
	MapCanvas.FitSelectedToWindow() when the user selects the menu option.
	(_has_selected_shapes): New. Returns true if there are any 
	selected shapes.

	* Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
	true if there are any selected shapes.

	* Thuban/UI/view.py (MapCanvas): Added delegated method
	HasSelectedShapes.
	(MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
	shapes on the canvas using the map projection (if any).

	* test/test_layer.py (TestLayer.test_arc_layer): Add some tests
	for Layer.ShapesBoundingBox().

2003-05-06  Bernhard Herzog  <bh@intevation.de>

	* Resources/Projections/defaults.proj: Fix spelling of Mercator

2003-05-05  Jonathan Coles   <jonathan@intevation.de>

	Addresses the "Full Layer Extent" wish of RTbug #1787.

	* Resources/Projections/defaults.proj: Added UK National Grid.

	* Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
	(MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
	when the user selects the menu option.

	* Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
	scales the given layer on the canvas using the map projection.

2003-05-05  Bernhard Herzog  <bh@intevation.de>

	Convert the table implementations to a new table interface. All
	tables use a common mixin class to provide backwards compatibility
	until all table users have been updated.

	* Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
	provide backwards compatibility for table classes implementing the
	new interface
	(DBFTable, MemoryTable): Implement the new table interface. Use
	OldTableInterfaceMixin as base for compatibility
	(DBFColumn, MemoryColumn): New. Column description for DBFTable
	and MemoryTable resp.

	* test/test_dbf_table.py: New. Test cases for the DBFTable with
	the new table interface.

	* test/test_memory_table.py: New. Test cases for the MemoryTable
	with the new table interface.

	* test/test_table.py: Document the all tests in this file as only
	for backwards compatibility. The equivalent tests for the new
	interface are in test_memory_table.py and test_dbf_table.py
	(MemoryTableTest.test_read): field_info should be returning tuples
	with four items
	(MemoryTableTest.test_write): Make doc-string a more precise.

	* Thuban/Model/transientdb.py (TransientTableBase): Convert to new
	table interface. Derive from from OldTableInterfaceMixin for
	compatibility.
	(TransientTableBase.create): New intance variable column_map to
	map from names and indices to column objects
	(TransientTable.create): Use the new table interface of the input
	table
	(AutoTransientTable): Convert to new table interface. Derive from
	from OldTableInterfaceMixin for compatibility.
	(AutoTransientTable.write_record): Removed. It's not implemented
	yet and we still have to decide how to handle writing with the new
	table and data framework.

	* test/test_transientdb.py
	(TestTransientTable.run_iceland_political_tests)
	(TestTransientTable.test_transient_joined_table): Use the new
	table interface

2003-05-05  Jonathan Coles   <jonathan@intevation.de>

	This is namely a collection of UI updates to improve user interactivity.
	Tabbing between controls now exists and you can use ESC to close dialog
	boxes; ENTER will active the default button.

	* Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
	order that the controls are created so that tabbing works correctly. 
	(ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the 
	wxDialog can handle the default button correctly.
	(ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
	same reasons as for OnOK.
	(GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
	when we ask the table for the maximum/minimum values of a field
	which could take a very long time.

	* Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
	order that the controls are created so that tabbing works correctly.
	(SelectPropertiesDialog.__init__): Rearrange the order that the 
	controls are created so that tabbing works correctly.

	* Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
	to derive from a wxDialog but behave like the original implementation
	which was derived from a wxFrame. wxDialog provides useful key
	handling functionality like ESC calling OnCancel and ENTER calling
	OnOK which is lost with wxFrame.

	* Thuban/UI/mainwindow.py: Add "..." to menu items that will open
	new dialogs.

	* Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
	order that the controls are created so that tabbing works correctly.
	(ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
	(ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
	(ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
	(ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
	can provide the "UK National Grid" as a default projection.
	(UTMPanel.__init__): Rearrange the order that the controls are 
	created so that tabbing works correctly.

2003-05-05  Bernhard Herzog  <bh@intevation.de>

	* extensions/thuban/wxproj.cpp: Fix some of the comments.
	(project_point): If a map projection but no layer projection is
	given, convert degrees to radians before applying the map
	projection.

	* Thuban/UI/tableview.py (TableGrid.disallow_messages)
	(TableGrid.allow_messages): New methods to make it possible to
	inhibit message sending.
	(TableGrid.issue): Only send the message if not inhibited.
	(LayerTableGrid.select_shape): Use the new methods to make sure
	that no ROW_SELECTED message is sent while we're updating the
	selected rows to match the selected shapes.

2003-05-02  Jan-Oliver Wagner <jan@intevation.de>

	Implementation of MemoryTable.

	* Thuban/Model/table.py (MemoryTable): New. Quite simple table
	implementation that operates on a list of tuples. All of the data
	are kept in the memory.

	* test/test_table.py (MemoryTableTest): New.

	* test/test_transientdb.py (SimpleTable): Removed.
	(TestTransientTable.test_transient_joined_table,
	(TestTransientTable.test_transient_table_read_twice): Replaced
	SimpleTable by MemoryTable.

2003-04-30  Jonathan Coles   <jonathan@intevation.de>

	* Data/iceland_sample.thuban: Now contains correct projections
	for each of the layers.

	* Resources/Projections/defaults.proj: Geographic projection
	contains unit conversion parameter.

2003-04-30  Jonathan Coles   <jonathan@intevation.de>

	The most important part of this putback is the projection changes.
	It should now be possible to specify the projection that a layer
	is in and then specify a different projection for the map. The
	projection dialog has an extra parameter for a geographic projection
	which lets the user select if the input is in degrees or radians.

	* Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
	to say that the parameter is a tuple of unprojected 
	points (which is what the callers to this method were assuming).
	Also, since the points are unprojected we need to projected them.

	* Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp, 
	LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
	groups are selected, move the layer up/down. Fixes RTbug #1833.

	* Thuban/UI/mainwindow.py: Move menu item map_rename up.

	* Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing 
	parameter in call to SetClientData.
	(GeoPanel): Add support for selecting the units that the
	source data is in (Radians or Degrees).

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
	the rendering loop by reducing the number of if's, removing the
	unnecessary try/except block, and checking if the old group
	is the same as the new one (which happens a lot if there is 
	no classification, or lots of shapes are in the same group).

	* Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
	around the redraw routine to try to catch problems that the user
	may create by selecting invalid projections for the data set and
	map. Clears the display if there are any problems and prints the
	error.
	(MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
	rectangle.

	* extensions/thuban/wxproj.cpp (project_point): First invert the
	supplied point (which should be in projected coordinates) using
	the layer's projection and then project the point using the
	map's projection.
	(project_points): Use project_point() to project each point.

2003-04-30  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
	don't set the Classification to None if the classfication field
	is None (ie only a DEFAULT).

2003-04-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py: Fix some typos.

	* Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
	not pop up the dialog if the selection becomes empty (this could
	happen if e.g. a new selection is opened while the identify tool
	is active and dialog had been closed)

2003-04-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/transientdb.py (TransientTableBase.__init__): New
	instance variable read_record_last_result
	(TransientTableBase.read_record): Make sure reading the same
	record twice works. The implementation uses the new instance
	variable read_record_last_result

	* test/test_transientdb.py
	(TestTransientTable.test_transient_table_read_twice): New test
	case for the above bug-fix.

2003-04-29  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.

	* Thuban/UI/classgen.py: Remove all uses of Str2Num.

	* Thuban/UI/classifier.py: Remove all uses of Str2Num.
	(ClassTable.SetValueAsCustom): Rename keyword argument in 
	ClassGroup* constructors to match argument name.

2003-04-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/session.py (Session.Destroy): Explicitly close the
	transient DB if it exists to make sure it doesn't leave a journal
	file in the temp directory.

	* Thuban/Model/transientdb.py (TransientDatabase.close): Set
	self.conn to None after closing the connection to make sure it's
	not closed twice

2003-04-29  Jonathan Coles   <jonathan@intevation.de>

	Add a visible parameter in the layer XML tag. The default value is
	"true". If anything other than "false" is specified we also assume
	"true". Addresses RTbug #1025.

	* Doc/thuban.dtd: Add visible parameter to a layer.

	* Thuban/Model/layer.py (BaseLayer.__init__): Change default value
	of visible from 1 to True.
	(Layer.__init__): Change default value of visible from 1 to True.

	* Thuban/Model/load.py (SessionLoader.start_layer): Read visible
	parameter.

	* Thuban/Model/save.py (SessionSaver.write_layer): Save visible
	parameter.

	* test/test_load.py: Add new test data contents_test_visible.
	(LoadSessionTest.setUp): save test data.
	(LoadSessionTest.testLayerVisibility): Test if the visible flag
	is loaded correctly.

	* test/test_save.py (SaveSessionTest.testSingleLayer): Add test
	for saving an invisible layer.

2003-04-29  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
	legend dialog box and tell it to change its map to the one
	supplied to SetMap(). Fixes RTbug #1770.

2003-04-29  Bernhard Herzog  <bh@intevation.de>

	Next step of table implementation. Introduce a transient database
	using SQLite that some of the data is copied to on demand. This
	allows us to do joins and other operations that require an index
	for good performance with reasonable efficiency. Thuban now needs
	SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
	haven't tested that.
	
	* Thuban/Model/transientdb.py: New. Transient database
	implementation.

	* test/test_transientdb.py: New. Tests for the transient DB
	classes.

	* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
	classes to help automatically remove temporary files and
	directories.
	(Session.__init__): New instance variables temp_dir for the
	temporary directory and transient_db for the SQLite database
	(Session.temp_directory): New. Create a temporary directory if not
	yet done and return its name. Use AutoRemoveDir to have it
	automatically deleted
	(Session.TransientDB): Instantiate the transient database if not
	done yet and return it.

	* Thuban/Model/data.py (ShapefileStore.__init__): Use an
	AutoTransientTable so that data is copied to the transient DB on
	demand.
	(SimpleStore): New class that simply combines a table and a
	shapefile

	* Thuban/Model/table.py (Table, DBFTable): Rename Table into
	DBFTable and update its doc-string to reflect the fact that this
	is only the table interface to a DBF file. Table is now an alias
	for DBFTable for temporary backwards compatibility.

	* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
	the last reference to the session goes away so that the temporary
	files are removed properly.

	* test/test_load.py (LoadSessionTest.tearDown): Remove the
	reference to the session to make sure the temporary files are
	removed.

2003-04-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
	the __parser instance variable into a normal local variable in
	read. It's only used there and read will never be called more than
	once. Plus it introduces a reference cycle that keeps can keep the
	session object alive for a long time.

2003-04-29  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/proj.py (Projection): Removed Set*() methods to make 
	Projection an immutable item. Fixes RTbug #1825. 
	(Projection.__init__): Initialize instance variables here.
	(ProjFile.Replace): New. Replace the given projection object with
	the new projection object. This solves the problem of needing the 
	mutator Projection.SetProjection() in the ProjFrame class and
	allows a projection to change parameters without changing its 
	location in the file.

	* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
	be of type wxSAVE and should verify overwriting a file.

	* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new 
	ProjFile.Replace() method instead of the mutator 
	Projection.SetProjection(). Also requires that we reassign the
	client data to the new projection.

	* test/test_proj.py (TestProjection.test): Test GetName() and
	GetAllParameters()
	(TestProjFile.test): Remove tests for Set*() methods. Add tests
	for Replace().

2003-04-25  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/save.py (SessionSaver.write_projection): Make sure
	to save the name of the projection.

	* test/test_save.py (SaveSessionTest.testLayerProjection): New
	test to verify layer projections are saved correctly.

2003-04-25  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/proj.py (Projection.SetName): Set the name
	to "Unknown" if name is None.
	(Projection.SetAllParameters): New. Set the projection's
	parameter list to the one supplied.
	(Projection.SetProjection): New. Set the projection's 
	properties to those of the supplied Projection.

	* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
	the dialog title to include the map's title.
	(MainWindow.LayerProjection): Set the dialog title to include
	the layer's title.

	* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
	error dialogs into a single method call.
	(ProjFrame.__VerifyButtons): Add more states to check.
	(ProjFrame.__GetProjection): Return the current state of an
	edited projection or None.
	(ProjFrame.__FillAvailList): Remove checks for states that
	shouldn't exist.
	(ProjFrame._OnNew): Clear all selected items and supply
	a projection panel if necessary.

	* test/test_proj.py (TestProjFile.test): Add tests for
	ProjFile.SetAllParameters, ProjFile.SetProjection,
	ProjFile.SetName.

2003-04-25  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now 
	takes an optional argument to select the current projection.
	This does not guarantee that the item is visible due to
	limited wxWindows functionality. Fixes RTBug #1821.

2003-04-25  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/load.py (SessionLoader.start_projection): Remember
	the projection name and use it when constructing the Projection
	object.

	* Thuban/Model/proj.py (Projection.__init__): Change the default
	value for 'name' to None and then test if name is equal to None
	in the body of the constructor. This way the caller doesn't have to
	know what the default value should be. Namely, useful in load.py 
	where we have to pick a default value if the 'name' parameter
	doesn't exist in the XML file.

	* test/test_load.py (LoadSessionTest.testLayerProjection): New.
	Tests a file where a layer has a projection.

2003-04-25  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
	tree for projection information.

	* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from 
	XMLReader.GetFileName.
	(SessionLoader): Added support for loading projection tags that
	appear inside a layer.

	* Thuban/Model/proj.py (ProjFile): Document the class. Move 
	back to using a list because the order of the projections in 
	the file is important to maintain. Fixes RTbug #1817.

	* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
	to ProjFile.GetFilename.

	* Thuban/Model/save.py (SessionSaver.write_layer): Save projection
	information.

	* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
	ProjFrame._OnSaveAs. Removed old dead code from previous
	implementation.
	(ProjFrame._OnExport): Add support for exporting more than one
	projection to a single file.
	(ProjFrame.__FillAvailList): use string formatting (% operator) 
	to build strings that are (partly) translated. Fixes RTbug #1818.

	* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
	class.

2003-04-24  Bernhard Herzog  <bh@intevation.de>

	* po/es.po: Updated Spanish translation by Daniel Calvelo Aros

	* po/fr.po: New. French translation by Daniel Calvelo Aros

	* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
	empty strings.

2003-04-24  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
	implement the interface that the ProjFrame dialog expects.

	* Thuban/Model/proj.py (Projection.SetName): New. Allows the
	name of the projection to be changed.
	(ProjFile): Use a dictionary instead of a list so that removing
	projections is easier and we are sure about uniqueness.
	(ProjFile.Remove): Remove the given projection object.

	* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): 
	Return a list with only one projection file instead of searching for 
	any projection file. This simplifies many things if the user can
	only have one system file and one user file.

	* Thuban/UI/classgen.py: Change all references to 
	genCombo to genChoice.

	* Thuban/UI/mainwindow.py: Add a Projection option under the
	layer menu.
	(MainWindow.LayerProjection): New. Open up a projection window
	for a layer.

	* Thuban/UI/projdialog.py: Large changes to how the dialog is
	laid out. Use three panels instead of one. One for the list of
	projections, one for the edit controls, and one for the buttons.
	Fixed resizing problems so that the dialog resizes correctly
	when the projection panel changes. Added import/export, save, and
	new buttons/functionality.

2003-04-24  Bernhard Herzog  <bh@intevation.de>

	First step towards table management. Introduce a simple data
	abstraction so that we replace the data a layer uses more easily
	in the next step.

	* Thuban/Model/data.py: New file with a simple data abstraction
	that bundles shapefile and dbffile into one object.

	* Thuban/Model/session.py (Session.OpenShapefile): New method to
	open shapefiles and return a shape store object

	* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
	object instead of a shapefile filename. This introduces a new
	instance variable store holding the datastore. For intermediate
	backwards compatibility keep the old instance variables.
	(open_shapefile): Removed. No longer needed with the shape store.
	(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
	get the shape store used by a layer.
	(Layer.Destroy): No need to explicitly destroy the shapefile or
	table anymore.

	* Thuban/UI/mainwindow.py (MainWindow.AddLayer)
	(MainWindow.AddLayer): Use the session's OpenShapefile method to
	open shapefiles

	* Thuban/Model/load.py (ProcessSession.start_layer): Use the
	session's OpenShapefile method to open shapefiles

	* test/test_classification.py
	(TestClassification.test_classification): Use the session's
	OpenShapefile method to open shapefiles and build the filename in
	a more platform independed way

	* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
	Implement to have a session to use in the tests
	(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
	(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
	session's OpenShapefile method to open shapefiles
	(TestLayerLegend.setUp): Instantiate a session so that we can use
	it to open shapefiles.
	(TestLayerLegend.tearDown): Make sure that all references to
	layers and session are removed otherwise we may get a resource
	leak

	* test/test_map.py (TestMapAddLayer.test_add_layer)
	(TestMapWithContents.setUp): Instantiate a session so that we can
	use it to open shapefiles.
	(TestMapWithContents.tearDown): Make sure that all references to
	layers, maps and sessions are removed otherwise we may get a
	resource leak
	("__main__"): use support.run_tests() so that more info about
	uncollected garbage is printed

	* test/test_save.py (SaveSessionTest.testSingleLayer): Use the
	session's OpenShapefile method to open shapefiles
	("__main__"): use support.run_tests() so that more info about
	uncollected garbage is printed

	* test/test_selection.py (TestSelection.tearDown): Make sure that
	all references to the session and the selection are removed
	otherwise we may get a resource leak
	(TestSelection.get_layer): Instantiate a session so that we can
	use it to open shapefiles.
	("__main__"): use support.run_tests() so that more info about
	uncollected garbage is printed

	* test/test_session.py (TestSessionBase.tearDown)
	(TestSessionWithContent.tearDown): Make sure that all references
	to the session and layers are removed otherwise we may get a
	resource leak
	(TestSessionWithContent.setUp): Use the session's OpenShapefile
	method to open shapefiles

2003-04-24  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/load.py (XMLReader.read): Should have been checking
	if the file_or_filename object had the 'read' attribute.

2003-04-23  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/resource.py: Fixes RTbug #1813.
	(ReadProjFile): Add documentation about which exceptions are raised. 
	Always pass the exceptions up to the caller.
	(GetProjFiles): If the directory can't be read return an empty list.
	If any of the proj files can't be read skip that file and go
	on to the next one.

	* test/test_proj.py: Added test cases to handle nonexistent files,
	unreadable files, and files that don't parse correctly.

2003-04-23  Jonathan Coles   <jonathan@intevation.de>

	Projection dialog. Allows the user to select from a list
	of projection templates and optionally edit them and save new ones.

	* Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
	(ProjPanel): Base class for projection specific panels.
	(TMPanel): Projection panel for Transverse Mercartor.
	(UTMPanel): Projection panel for Universal Transverse Mercartor.
	(LCCPanel): Projection panel for Lambert Conic Conformal.
	(GeoPanel): Projetion panel for Geographic Projection.

2003-04-23  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
	promote symmetry. There now exists XMLReader and XMLWriter.
	(XMLReader.read): New. Call to read the given file descriptor or
	filename.
	(XMLReader.close): New. Make sure the file is closed.
	(XMLReader.GetFileName): New. Return just the file name that is being
	read from.
	(XMLReader.GetDirectory): New. Return just the directory of the file
	that is being read.
	(XMLReader.AddDispatchers): New. Take a dictionary which contains
	the names of functions to call as the XML tree is parsed.
	(XMLReader.startElementNS): Updated to use new dispatcher dictionary.
	(XMLReader.endElementNS): Updated to use new dispatcher dictionary.
	(SessionLoader): Removed class variables start_dispatcher and
	end_dispatcher since this functionality is now part of a class
	instance. Fixes RTbug #1808.
	(SessionLoader.__init__): Add dispatcher functions.
	(load_xmlfile): Code was moved into the XMLReader.read().
	(load_session): Use modified SessionLoader.

	* Thuban/Model/map.py (Map.GetProjection): New. Returns the 
	map's projection.

	* Thuban/Model/proj.py (Projection.GetParameters): Renamed to 
	GetAllParameters. 
	(Projection.GetParameter): Returns the value for the given parameter.

	* Thuban/Model/resource.py: Use XMLReader and XMLWriter.
	(GetProjFiles): Renamed from GetProjections. Now returns a list
	of ProjFile objects.
	(GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
	a list of ProjFile objects whose files are not user defined.
	(GetUserProjFiles): Renamed from GetUserProjections. Returns a
	list of ProjFile objects whose files are user defined.
	(ProjFileReader): Extend new XMLReader.

	* Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
	promote symmetry.

	* Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
        control instead of a wxComboBox. wxChoice controls do not generate
	events as the uses highlights possible choices which fixes problems
	with resizing the dialog when the use selects an option.

	* Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
	control instead of a wxComboBox.

	* Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
	dialog.

	* test/test_proj.py (TestProjection.test): New tests for GetParameter
	method.

2003-04-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py: Remove some unused imports and global
	constants

	* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
	(IdentifyGridCtrl.selected_shape): Use table, not shapetable.

2003-04-17  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
	(Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
	anymore.
	(Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
	(Layer.ShapeType, Layer.Shape): No need to call
	self.open_shapefile since it's always called in __init__

	* Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
	In wxPython 2.4 there's no need to extend MainLoop anymore since
	wxPython itself makes sure OnExit is called.

2003-04-16  Jonathan Coles   <jonathan@intevation.de>

	Initial putback of projection management code. Includes new
	classes to read and write projection files. The current load
	and save classes were abstracted a bit so they could be reused.
	The Projection class was extended to provide new methods and
	have a name.

	* Thuban/Model/load.py (XMLProcessor): New. Contains all the
	general XML reading methods that were part of ProcessSession.

	* Thuban/Model/proj.py (Projection.__init__): Accepts an optional
	name.
	(ProjFile): New. Represents a file that contains projection
	information.

	* Thuban/Model/resource.py: New. Contains general utilities
	for read and writing projection files.

	* Thuban/Model/save.py (XMLSaver): New. Contains all the 
	general XML writing methods that were part of SessionSaver.
	(SessionSaver): Renamed from Saver.

	* test/test_proj.py: New test cases for the projection
	file read and write functions.

2003-04-16  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: Use repr() around values 
	in the ClassGroup*.__repr__() methods so it is clearer when
	a value is a string and when it is a number.

	* test/test_load.py: Rework the classification test to test
	that we can load old files. 
	(testLabels): Test a file where the groups have labels.

2003-04-16  Bernhard Herzog  <bh@intevation.de>

	Safer implementation of the performance enhancements of the
	low-level renderer:
	
	* extensions/thuban/wxproj.cpp (extract_projection)
	(extract_pointer): Rename extract_projection to extract_pointer
	and redefine its purpose to return the pointer stored in a CObject
	returned by the object's cobject method. Update all callers.
	(s_draw_info, free_draw_info, draw_polygon_init): Implement the
	handling of these low-level parameters so that each s_draw_info
	instance is handled as a CObject at python level that also
	contains real references to the actual python objects which
	contain the values in the struct. Add free_draw_info as the
	destructor.
	(draw_polygon_shape): Add the py_draw_info parameter which must a
	cobject containing an s_draw_info pointer.

	* Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
	method to instantiat the low-level render parameter
	(MapRenderer.draw_shape_layer): Use the new method. Remove some
	commented out code.
	(MapRenderer.draw_polygon_shape): Make the first parameter not the
	layer but the low-level render parameter
	(ScreenRenderer.draw_shape_layer): Use the low-level render
	parameter.

2003-04-15  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: Implemented __repr__ for
	the ClassGroup* classes to make debugging a bit easier.
	(ClassGroup.SetLabel): Check that the string is an instance
	of StringTypes not StringType. Accounts for Unicode strings.

	* Thuban/Model/color.py: Implemented __repr__ to make 
	debugging a bit easier.

	* Thuban/Model/save.py (Saver.write_classification): Need to
	save the group label.

	* test/test_load.py (testClassification): New. Loads the
	iceland_sample_test.thuban file and checks if it was loaded
	correctly.

2003-04-15  Jonathan Coles   <jonathan@intevation.de>

	* extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
	to improve rendering performance by initializing the variables
	that are not change each time draw_polygon_shape() is called.
	The values are stored in a global struct draw_info.
	(draw_polygon_shape): Removed initialization code that is
	now in draw_polygon_init().

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
	drawing initialization call to draw_polygon_init()
	(MapRenderer.draw_polygon_shape): Use new signature of
	draw_polygon_shape.

	* Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
	weirdness by setting the range to (1, maxint).

	* Thuban/Model/classification.py (ClassGroupProperties): Make
	instance variables private and optimize comparison operator
	by first checking if the color references are the same.
	(ClassGroupSingleton): Make instance variables private.
	(ClassGroupRange): Make instance variables private.

	* HOWTO-Release: Filled in missing steps for releasing packages.

2003-04-15  Bernhard Herzog  <bh@intevation.de>

	First stab at internationalized messages:

	* Thuban/__init__.py (_): Implement the translation function for
	real using the python gettext module.

	* Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
	translate empty strings.

	* Thuban/UI/application.py (ThubanApplication.read_startup_files):
	Add a missing space to a warning message

	* po/README: New. Notes about the management of the translation
	files.

	* po/Makefile: New. Makefile to help manage the translation files.

	* po/es.po: New. Spanish translation by Daniel Calvelo Aros

	* MANIFEST.in: Include the *.mo files in Resources/Locale and the
	translations and support files in po/

	* setup.py (data_files): Add the *.mo files to the data_files too

	* README: Add note about the translations when building from CVS

2003-04-14  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/dock.py: Fixes some window resizing problems most
	noticable under windows. Always assume the button bitmaps will 
	be there. Code clean up. 
	(DockabelWindow.Dock, DockableWindow.UnDock): Force all the
	images for the dock/undock button to the same images.
	Work around for RTbug #1801. 

	* Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
	be allowed to grow within the sizer. Fixes a bug under Windows
	where the toolbar wasn't being drawn.

2003-04-14  Frank Koormann   <frank.koormann@intevation.de>

	* Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
	Updated design to try to make the button functionality more
	transparent.

2003-04-14  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
	finalize the intialization of the panel.

	* Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the 
	creation of the panel. Should be the last thing called in the
	initializer of a subclass.

	* Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
	set the current selections in the combo boxes. This is needed
	under Windows.

	* Thuban/UI/classifier.py (Classifier.__init__): Add a top
	level panel to the dialog so that the background colors are
	consistent under Windows.

2003-04-11  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classgen.py: Change color ramps to start at white 
	not black.

	* Thuban/UI/legend.py: Enable/disable the legend buttons when
	the legend changes. Fixes RTbug #1793.

	* test/test_classification.py: Added test for copying of
	classifications.

2003-04-11  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/resource.py: New. Centralize the loading of resources 
	such as bitmaps.

	* Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
	added images to the move buttons, added 'reverse' button.
	(CustomRampPanel.__init__): Added images to the move buttons.
	(GreyRamp): New. Generates a ramp from white to black.
	(HotToColdRamp): New. Generates a ramp from cold to hot colors.

	* Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
	ID_PROPERTY_*.
	(Classifier.__init__): Minor changes to the layout.
	(Classifier._OnTitleChanged): Listen for when the user edits the
	title and update the dialog's title and the layer's title.

	* Thuban/UI/dock.py: Use new bitmaps for the control buttons.

	* Thuban/UI/legend.py: Use new bitmaps for the control buttons.
	(LegendTree._OnMsgLayerTitleChanged): Change the displayed title
	if the layer's title changes.

	* Thuban/UI/mainwindow.py: Added new menu item and associated code
	to open a dialog to rename the map. 
	(MainWindow): Use new resource class to import bitmaps.

2003-04-11  Jonathan Coles   <jonathan@intevation.de>

	* Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.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/layer_properties.xpm,
	Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
	Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
	New.

2003-04-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: (ClassGroupRange.__init__): 
	Should pass group to ClassGroup constructor.

2003-04-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: (ClassGroup): Move all the common
	methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
	here. Implement SetVisible(), IsVisible().
	(ClassGroup.__init__): Add group parameter which acts as a copy
	constructor.

	* Thuban/UI/classifier.py (ClassTable): Add a new column for the
	"Visible" check boxes.
	(Classifier): Rename the buttons and refactor the code to match
	the new labels.

	* Thuban/UI/legend.py: Classify button is now called "Properties".
	Refactored the code to change variable names.
	(LegendTree.__FillTreeLayer): Only list a group if it is visible.

	* Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
	MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
	renamed to MainWindow.LayerEditProperties.
	(MainWindow.ToggleLegend): Don't include map name in legend title.
	(MainWindow.SetMap): Added the map name to the window title.
	(MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
	MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
	Functionality is found in the layer properties dialog.

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
	draw visible groups.

2003-04-09  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classgen.py: Modifications to allow simple
	addition and selection of new color schemes.
	(MonochromaticRamp): New. Generates a ramp between two colors.
	(RedRamp): New. Generates a ramp of all red.
	(GreenRamp): New. Generates a ramp of all green.
	(BlueRamp): New. Generates a ramp of all blue.

2003-04-09  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py (Classification.__deepcopy__):
	Need to copy over field and fieldType attributes.

	* Thuban/Model/table.py (Table.field_range): New. Retrive the
	maximum and minimum values over the entire table for a given
	field.
	(Table.GetUniqueValues): New. Retrieve all the unique values
	in the table for a given field.

	* Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
	(GenUniquePanel): New. Controls to allow the user to select
	which unique field values they would like in the classification.
	(CustomRampPanel): Code that was in ClassGenDialog that allows
	the user to select the properties for a custom ramp.
	(ClassGenerator.GenUniformDistribution): Was called GenerateRanges.

	* Thuban/UI/classifier.py: Removed a lot of debugging code.
	(Classifier._SetClassification): Callback method so that the
	class generator can set the classification in the grid.
	(ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
	editing of a group properties class into a wxWindows control.

	* Thuban/UI/dock.py: It was decided that if the user closes
	a dockable window the window should simply hide itself. That
	way if the user wants to show the dock again it appears in the
	same place as it was when it was closed.
	(DockableWindow.Destroy): Call renamed method OnDockDestroy().
	(DockableWindow._OnButtonClose): Hide the window instead of 
	destroying it.
	(DockableWindow._OnClose): Hide the window instead of 
	destroying it.

	* Thuban/UI/legend.py (LegendTree): Use a private method to 
	consistently set the font and style of the text. Fixes RTbug #1786.

	* Thuban/UI/mainwindow.py: Import just the Classifier class.

2003-04-07  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
	to the map module

2003-04-07  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
	favor of ToggleSessionTree
	(MainWindow.ToggleSessionTree): New method to toggle visibility of
	the session tree.
	(MainWindow.SessionTreeShown): New method to return whether the
	session tree is currently shown.
	(MainWindow.ToggleLegend): New method to toggle visibility of the
	legend
	(MainWindow.ShowLegend): Implement in terms of ToggleLegend and
	LegendShown
	(MainWindow.LegendShown): New method to return whether the legend
	is currently shown.
	(_method_command): Add checked parameter so we can define check
	menu items
	(_has_tree_window_shown, _has_legend_shown): Use the appropriate
	mainwindow methods.
	(show_session_tree, show_legend commands): Removed.
	(toggle_session_tree, toggle_legend commands): New commands to
	toggle the visibility of the dialogs

2003-04-07  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classgen.py: Fix Windows problem.

	* Thuban/UI/dock.py: Fix Windows problem.

	* Thuban/UI/mainwindow.py: Use False instead of false.
	(MainWindow.ShowLegend): Remove unnecessary switch parameter.

2003-04-07  Jonathan Coles   <jonathan@intevation.de>

	Since we now say that the order of the groups in a classification
	matters, it makes sense to be able to manipulate that order. Most
	of the changes to Thuban/Model/classification.py are to that end.

	* Thuban/Model/classification.py (Classification.AppendGroup,
	Classification.InsertGroup, Classification.ReplaceGroup,
	Classification.RemoveGroup, Classification.GetGroup): Do as the
	names imply.
	(Classification.FindGroup): This was called GetGroup, but GetGroup
	takes an index, while FindGroup takes a value.
	(Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
	REFERENCE. Currently there is a cyclic reference between the layer
	and its classification. If the classification doesn't need to know
	its owning layer we can change this, since it may make sense to be
	able to use the same classification with different layers.

	* Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()

	* Thuban/UI/classgen.py: Use Classification.AppendGroup(), 
	not AddGroup()

	* Thuban/UI/classifier.py: Now that we can depend on the order in 
	a Classification and have methods to manipulate that order we don't
	need to use our own data structures in the grid. We can simply make
	the grid/table access the information they need from a copy of 
	the classification object.
	(Classifier._OnCloseBtn): Event handler for when the user clicks
	'Close'. This is needed so if the user applies changes and then
	continues to change the table the user has the option of discarding
	the most recent changes and keeping what they applied.

	* Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
	into the same group.

	* extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
	with a really old version of proj, PJ_VERSION won't even be defined.
	If it isn't defined then just compile so that the function always
	returns Py_False.

	* test/test_classification.py: Fix tests to use the renamed methods.
	Still need to write tests for the new methods.

2003-04-04  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py (Classifier.__SelectField): Move the
	call to SetSelection out of the method and before the call
	to __SelectField in __init__. This prevents a recursion of events
	when _OnFieldSelect is triggered by the user.

2003-04-04  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: Rename Color.None to 
	Color.Transparent.
	(ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill): 
	Don't bother copying the color, since Colors are immutable.

	* Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
	Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
	Thuban/UI/renderer.py, Thuban/UI/view.py:
	Rename Color.None to Color.Transparent.
    
	* test/test_classification.py, test/test_load.py: Rename Color.None 
	to Color.Transparent.

2003-04-04  Jonathan Coles   <jonathan@intevation.de>
 
	* Thuban/Model/classification.py: Fix assert calls.
	(ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
	Copy the color parameter rather than hold onto a reference.

	* Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
	the color object.
	(NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
	are sure there exists only one refernce to Color.None in the system.
	This allows us to use 'is' rather than the comparision functions.
	
	* Thuban/Model/save.py: Fix assert calls.
	
	* Thuban/UI/classifier.py: Fix assert calls.
	(ClassGrid._OnCellDClick): Call up to the classifier to open the 
	dialog to edit the groups properties.
	(ClassGrid._OnCellResize): Make sure that the scollbars are drawn
	correctly if a cell is resized.
	(ClassTable.SetClassification): New. Changes the classification
	that is in the table.
	(ClassTable.__SetRow): Allow groups to be prepended.
	(Classifier): New code for opening the EditProperties and 
	GenerateRanges dialogs.
	(SelectPropertiesDialog.__GetColor): Only set the color in the
	color dialog if the current color is not None.
	
	* Thuban/UI/dock.py: Fix assert calls.
	
	* Thuban/UI/legend.py: Fix assert calls.
	
	* Thuban/UI/renderer.py: Fix assert calls.
	
	* Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
	classifications.
	(GenRangePanel): Panel specific to range generation.
	(GenSingletonPanel): Panel specific to singleton generation.
	(ClassGenerator): Class responsible for actually generating
	the classification from the data gathered in the dialog box.
	(PropertyRamp): Generates properties whose values range from
	a starting property to an ending property.

2003-04-03  Bernhard Herzog  <bh@intevation.de>

	* test/support.py (print_garbage_information): New function that
	prints information about still connected messages and memory
	leaks.
	(run_suite): Removed.
	(run_tests): New function for use as a replacement of
	unittest.main in the test_* files. This one calls
	print_garbage_information at the end.

	* test/runtests.py (main): Use support.print_garbage_information

	* test/test_layer.py: Use support.run_tests instead of
	unittest.main so we get memory leak information
	(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
	(TestLayer.test_point_layer, TestLayer.test_empty_layer)
	(TestLayerLegend.test_visibility): Call the layer's Destroy method
	to fix a memory leak.

	* test/test_classification.py: Use support.run_tests instead of
	unittest.main so we get memory leak information
	(TestClassification.test_classification): Call the layer's Destroy
	method to fix a memory leak.

2003-04-02  Bernhard Herzog  <bh@intevation.de>

	* extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
	Handle the reference counts of the return value and errors in
	PyArg_ParseTuple correctly.

	* Thuban/UI/application.py (ThubanApplication.OpenSession): Make
	sure the filename is absolute to avoid problems when saving the
	session again

	* Thuban/Model/table.py: Remove unnecessary import. Fix a typo.

2003-04-01  Jonathan Coles   <jonathan@intevation.de>

	*  Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
	that there actually are points in the returned list of points
	before trying to index into the list. The list may be empty if
	the shape is a Null Shape.

2003-04-01  Bernhard Herzog  <bh@intevation.de>

	* test/test_map.py: Don't use from <module> import *

2003-04-01  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/session.py: Use LAYER_CHANGED instead of 
	LAYER_LEGEND_CHANGED

	* Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
	self.Destroy() to close the window after yesterday's changes.

	* test/test_map.py, test/test_session.py: Fix messages that
	are sent from maps and layers.

2003-03-31  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py: Commented out some debugging statements.
	(ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
	RTbug #1769.

	* Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and 
	position (although position doesn't work yet under GTK).
	(DockableWindow.Destroy): New. Called when the window must be
	closed. Namely needed when the DockFrame closes and must close
	its children.
	(DockFrame): Listen for EVT_CLOSE and destroy all children.

	* Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
	when then window is told to close.
	(LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
	comment in source for more info.

	* Thuban/UI/main.py: Show the legend by default when Thuban starts.

	* Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
	symmetry with other such methods.
	(MainWindow.ShowLegend): Show the legend docked by default.

2003-03-28  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py: Support for highlighting a specific
	group within the grid when the classification dialog is opened.	
	Also contains a lot of debugging printouts which will later
	be removed.

	* Thuban/UI/dock.py: Complete rework on the dock code so that
	that it is fairly removed from the rest of the Thuban application.
	It is easy to add new docks which the rest of the program having
	to be aware of them.

	* Thuban/UI/legend.py: Modifications to support selecting a 
	specific group in the classification dialog. Changed how layers
	are drawn when the layer is visible/invisible.

	* Thuban/UI/mainwindow.py: Removed legend specific code and
	replaced it with calls to the new dock code.

	* Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
	to check if scale > 0. Trying to track down a divide by zero.

2003-03-26  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
	(LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
	now part of DockableWindow. 
	(LegendPanel.DoOnSelChanged): Select the current layer in the
	map.
	(LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
	with the selected layer and/or group.

2003-03-26  Jonathan Coles   <jonathan@intevation.de>

	This putback contains the code for dockable windows. There is
	no support in wxWindows as of this date for windows that can
	attach themselves to other windows. 

	The current model contains a DockableWindow which has a parent 
	window for when it is detached and a dock window that it puts 
	its contents in when it is docked. The contents of a DockableWindow 
	must be a DockPanel. DockPanel itself derives from wxPanel.

	* Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
	message, not a LAYER_LEGEND_CHANGED message.

	* Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.

	* Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
	as one of the style properties for the fieldTypeText item to
	be sure that its size is correct when the text changes.

	* Thuban/UI/dock.py: New. Classes for the DockPanel and
	DockableWindow.

	* Thuban/UI/legend.py: Added some more buttons and made the
	LegendPanel a DockPanel.

	* Thuban/UI/mainwindow.py: Added sash windows to the main window
	and supporting functions for manipulating the sashes.
	(MainWindow.ShowLegend): Create a DockableWindow with the 
	LegendPanel as the contents.

	* Thuban/UI/messages.py: Added DOCKABLE_* messages

	* Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
	not LAYER_LEGEND_CHANGED, messages.

2003-03-25  Jonathan Coles   <jonathan@intevation.de>

	* setup.py: Added custom script bdist_rpm_build_script so that
	when the rpm is built the path to wx-config is correct.

	* setup.cfg: Added line saying to use the custom build script

2003-03-20  Jonathan Coles   <jonathan@intevation.de>

        Initial implementation of the Legend. 

	* Thuban/UI/legend.py: New. Creates a window that shows the map's
	Legend information and allows the user to add/modify classifications
	and how the layers are drawn on the map.

	* setup.py: New command 'build_docs' which currently uses
	happydoc to generate html documentation for Thuban.

	* Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
	Returns a string which is appropriately describes the group.

	* Thuban/Model/layer.py (Layer.SetClassification): Generate a
	LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.

	* Thuban/Model/map.py (Map): Rename messages and use new, more
	specific, messages.

	* Thuban/Model/messages.py: New message to indicate that a layer's
	data has changed (LAYER_CHANGED). New map messages to indicate
	when layers have been added/removed/changed or if the stacking order
	of the layers has changed.

	* Thuban/Model/session.py: Rename and use new messages.

	* Thuban/UI/classifier.py: Remember if any changes have actually
	been applied so that if the dialog is cancelled without an application
	of changes we don't have to set a new classification.
	(ClassDataPreviewer): Pulled out the window specific code and put it
	ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
	symbols on any DC.
	
	* Thuban/UI/mainwindow.py: New code to open the legend.

	* Thuban/UI/view.py: Use new message names.

2003-03-19  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/main.py (verify_versions): New. Checks the versions
	of Python, wxPython, and some other libraries.

	* extensions/thuban/wxproj.cpp (check_version): Checks the given
	version against what wxproj was compiled with.
	(check_version_gtk): If wxproj was compiled with gtk then check
	the given version against the version of the gtk library 
	currently being used.

2003-03-14  Bernhard Herzog  <bh@intevation.de>

	* test/test_command.py: Run the tests when the module is run as a
	script

2003-03-14  Bernhard Herzog  <bh@intevation.de>

	Implement selection of multiple selected shapes in the same layer:

	- Introduce a new class to hold the selection. This basically
	  replaces the interactor which was nothing more than the
	  selection anyway. A major difference is of course that the new
	  selection class supports multiple selected shapes in one layer
	
	- Move the object that represents the selection from the
	  application to the canvas. The canvas is a better place than the
	  application because the selection represents which shapes and
	  layer of the map displayed by the canvas are selected and
	  affects how the map is drawn.

	- Make the selection and its messages publicly available through
	  the mainwindow.

	- The non-modal dialogs do not get a reference to the interactor
	  anymore as they can simply refer to their parent, the
	  mainwindow, for the what the interactor had to offer.

	* Thuban/UI/selection.py: New module with a class to represent the
	selection.

	* Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
	these unused messages

	* Thuban/UI/application.py (ThubanApplication.OnInit)
	(ThubanApplication.OnExit, ThubanApplication.SetSession): The
	interactor is gone now.
	(ThubanApplication.CreateMainWindow): There is no interactor
	anymore so we pass None as the interactor argument for now for
	compatibility.

	* Thuban/UI/view.py (MapCanvas.delegated_messages)
	(MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
	Unsubscribe, delegate messages according to the delegated_messages
	class variable.
	(MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
	attributes from instance variables as described with the
	delegated_methods class variable.
	(MapCanvas.__init__): New instance variable selection holding the
	current selection
	(MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
	pass them on to the renderer
	(MapCanvas.SetMap): Clear the selection when a different map is
	selected.
	(MapCanvas.shape_selected): Simple force a complete redraw. The
	selection class now takes care of only issueing SHAPES_SELECTED
	messages when the set of selected shapes actually does change.
	(MapCanvas.SelectShapeAt): The selection is now managed in
	self.selection

	* Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
	(MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
	Unsubscribe, delegate messages according to the delegated_messages
	class variable.
	(MainWindow.delegated_methods, MainWindow.__getattr__): Get some
	attributes from instance variables as described with the
	delegated_methods class variable.
	(MainWindow.__init__): The interactor as ivar is gone. The
	parameter is still there for compatibility. The selection messages
	now come from the canvas.
	(MainWindow.current_layer, MainWindow.has_selected_layer):
	Delegate to the the canvas.
	(MainWindow.LayerShowTable, MainWindow.Classify)
	(MainWindow.identify_view_on_demand): The dialogs don't need the
	interactor parameter anymore.

	* Thuban/UI/tableview.py (TableFrame.__init__)
	(LayerTableFrame.__init__, LayerTableFrame.OnClose)
	(LayerTableFrame.row_selected): The interactor is gone. It's job
	from the dialog's point of view is now done by the mainwindow,
	i.e. the parent. Subscribe to SHAPES_SELECTED instead
	of SELECTED_SHAPE
	
	* Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
	is gone. It's job from the dialog's point of view is now done by
	the mainwindow, i.e. the parent.
	
	* Thuban/UI/classifier.py (Classifier.__init__): The interactor is
	gone. It's job from the dialog's point of view is now done by the
	mainwindow, i.e. the parent.

	* Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
	gone. It's job from the dialog's point of view is now done by the
	mainwindow, i.e. the parent.
	(SessionTreeCtrl.__init__): New parameter mainwindow which is
	stored as self.mainwindow. The mainwindow is need so that the tree
	can still subscribe to the selection messages.
	(SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
	(SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
	selection is now accessible through the mainwindow. Subscribe to
	SHAPES_SELECTED instead of SELECTED_SHAPE

	* Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
	SHAPES_SELECTED message now.
	(IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
	so deal with multiple shapes
	(IdentifyView.__init__, IdentifyView.OnClose): The interactor is
	gone. It's job from the dialog's point of view is now done by the
	mainwindow, i.e. the parent.

	* Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
	parameter is now a list of shape ids.
	(RecordTable.SetTable): The second parameter is now a list of
	indices.

	* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
	selected_shape parameter and ivar to selected_shapes. It's now a
	list of shape ids.
	(MapRenderer.draw_label_layer): Deal with multiple selected
	shapes. Rearrange the code a bit so that the setup and shape type
	distinctions are only executed once.

	* test/test_selection.py: Test cases for the selection class

2003-03-11  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/load.py: Temporary fix so that the xml reader
	doesn't cause Thuban to crash.

	* Thuban/Model/layer.py: Handle the cyclic references between
	a layer and its classification better, and be sure to disconnect
	the classification from the layer when the layer is destroyed
	so that we don't maintain a cyclic reference that may not be
	garbage collected.

	* Thuban/Model/classification.py: See comment for layer.py.

2003-03-12  Jan-Oliver Wagner <jan@intevation.de>

	* HOWTO-Release: New. Information on the steps for releasing
	a new version of Thuban.

2003-03-11  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
	Use True instead of true.
	(Classifier): Should have a single panel in which all the controls lie.

	* Thuban/UI/proj4dialog.py: Add normal border.

	* Thuban/UI/tree.py: Fixed problem with bad item images under Windows.

	* Thuban/UI/mainwindow.py: Use True instead of true.

	* setup.py: Update some definitions to use wxWindows2.4 files

	* Data/iceland_sample_class.thuban: Fixed file so that the
	field_type information is present.

2003-03-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py (Classifier.__init__): Make the
	field type label grow so that when the text changes the
	size is updated correctly. This may be a wxWindows bug.

2003-03-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/application.py: Changed SESSION_CHANGED to
	SESSION_REPLACED.

	* Thuban/UI/classifier.py: Wrap text with _(). 
	(ClassGrid.CreateTable): Set dimensions and size hints here,
	instead of in Reset, so we only set the size once.

	* Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!

	* Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
	Call Close() instead of Shutdown().

	* Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.

	* Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
	Go back to using OnClose() instead of Shutdown().

2003-03-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py (Classifier): SelectField() needed
	to know the old field index as well as the new one.

2003-03-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py (Classifier): Use __SelectField()
	to correctly set the table information and call this from
	__init__ and from _OnFieldSelect so that all the information
	is up to date when the dialog opens and when a field is changed.

2003-03-10  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py (Classification): Don't use
	layer's message function directly, use the ClassChanged() method
	when then classification changes. SetField/SetFieldType/SetLayer
	must keep the information about field name and field type in
	sync when an owning layer is set or removed.

	* Thuban/Model/layer.py: Added ClassChanged() so that the 
	classification can tell the layer when its data has changed.
	(Layer.SetClassification): Accepts None as an arguement to 
	remove the current classification and correctly handles
	adding a new classification.

	* Thuban/Model/load.py: Comment out print statement

	* test/test_classification.py, test/test_save.py: New and
	improved tests.

2003-03-07  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: Implemented __copy__ and
	__deepcopy__ for ClassGroup* and ClassGroupProperites so
	they can easily be copied by the classifier dialog.
	(ClassGroupProperites.__init__): The default line color should
	have been Color.Black.

	* Thuban/UI/classifier.py: Setting and Getting table values now
	uses a consistent set of functions.
	(Classifier): Now non-modal. Has field type label which changes
	as the field changes. Keep track of buttons in a list so that
	we can enable/disable the buttons when the None field is selected.
	(SelectPropertiesDialog): Add buttons to make the colors transparent.

	* Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
	does what OnClose did, but can be called by the application to
	close a window. Needed when a session changes, and we have to
	close the classifier windows.

	* Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
	Shuts down open dialogs. Used when a new session is created
	or a session is opened.
	(MainWindow.SaveSession): Should only call application.SaveSession()
	if we don't call SaveSessionAs first.
	(MainWindow.Classify): Allow different classifier dialogs for
	different layers.

	* Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
	the parent class handle it. Add Shutdown() to unsubscibe from
	event notification and call the parent Shutdown(). This was
	necessary so the application can close the tree window.

2003-03-06  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py: Minor documentation changes,
	Addition of __eq__ and __ne__ methods.
	(Classification.SetLayer): prevent recursion between this method
	and Layer.SetClassification().

	* Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.

	* Thuban/Model/layer.py (SetClassification): prevent recursion 
	between this method and Classification.SetLayer().

	* test/test_classification.py, test/test_load.py,
	test/test_session.py: Fixed and added tests for the classification
	classes.

2003-03-06  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/classifier.py (ClassGrid.__init__)
	(ClassGrid.CreateTable): Move the SetSelectionMode call to
	CreateTable because otherwise it triggers an assertion in
	wxPython/wxGTK 2.4.

2003-03-05  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/common.py: Move FIELDTYPE constants back to table.py.

	* Thuban/Model/load.py: import FIELDTYPE constants from table.

	* Thuban/UI/classifier.py: import FIELDTYPE constants from table.

	* Thuban/Model/table.py: Put FIELDTYPE constants back.

2003-03-05  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/UI/classifier.py: Added class documentation.
	Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
	Store just the groups in the table and generate the other
	column information when it is requested. Add "None" field
	to pull-down to select no classification.

	* Thuban/common.py: Moved FIELDTYPE constants from table.py 
	(Str2Num): Only catch ValueError exceptions.

	* Thuban/Model/classification.py: Class documentation. Renaming
	of methods with Stroke to Line. Groups are stored in a single
	list with the default as the first element. Groups are searched
	in the order they appear in the list.

	* Thuban/Model/color.py: Documentation.

	* Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
	the kind of data represented by a field.

	* Thuban/Model/load.py (ProcessSession): Use proper string
	conversion function; fixes RTbug #1713.

	* Thuban/Model/save.py (Saver): Store field type information.

	* Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
	(Table): Add field_info_by_name() to retrieve field information
	by specifying the field name, not the number.

	* Thuban/UI/mainwindow.py: Function name changes.

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
	get the layer classification once. Don't try to classify 
	values when the field is None: just use the default properties.

	* Thuban/UI/view.py: Function name changes.

	* Doc/thuban.dtd: Add field_type attribute to a classification.

2003-03-04  Bernhard Herzog  <bh@intevation.de>

	* Doc/thuban.dtd: Use correct syntax for optional attributes. Make
	the fill and stroke layer attributes optional with suitable
	default values. Add the stroke_width layer attribute. Use correct
	syntax for empty elements. Make the attribute list for labels
	refer to the label element.

2003-03-04  Bernhard Herzog  <bh@intevation.de>

	* setup.py (thuban_build_py.build): Add a comment about distutils in
	Python 2.3 containing some of the functionality we implement in
	setup.py ourselves.

	* Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
	before the selection mode. Doing it the other way round triggers
	an assertion in wxWindows.

	* Thuban/Model/save.py (escape): Fix typo in doc-string

	* Thuban/Model/classification.py: Remove unnecessary wxPython
	import

2003-03-04  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/Model/classification.py (ClassGroupRange.GetProperties):
	Parameter 'value' should default to None.

	* Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
	the class attribute __classification is now private.

	* Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
	Classifier to ClassGrid. Added support for removing selected rows,
	which including code for keeping track of when cells are selected,
	and deselected.
	(ClassTable): Support for added/removing rows. Fixed a problem
	with __ParseInput whereby it would not allow strings (only numbers)
	to be entered.
	(Classifier): Added button and supporting code for removing
	selected rows.

2003-02-27  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/common.py: Moved color conversion functions into
	Thuban/UI/common.py.
	(Str2Num): Now converts the float (not the string) to a long/int
	so that an exception isn't thrown.

	* Thuban/UI/common.py: Common functions used in several UI modules

	* Thuban/Model/classification.py: Changed the class hierarchy
	so that a Classification consists of Groups which return
	Properties when a value matches a Group.

	* Thuban/Model/layer.py: Fixed name resolution problem.

	* Thuban/Model/load.py: Use new Classification and Group functions.

	* Thuban/Model/save.py (Saver.write_attribs): Fixes a test case 
	failure. 
	(Saver.write_classification): Use new Classification and Group
	functions.

	* Thuban/UI/classifier.py: Changes to use new Classification and Group
	functions. Fix to create a tuple with a single value instead of
	simply returning the value.

	* Thuban/UI/renderer.py: Use new Classification and Group functions.
	Use common.py functions.

	* Thuban/UI/tree.py: Use common.py functions.
	
	* test/test_classification.py: Use new Classification and Group
	classes.

2003-02-24  Jonathan Coles   <jonathan@intevation.de>

	* Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
	functions from Thuban color objects to wxWindow colour objects.

	* Thuban/Model/classification.py (Classification): Renamed
	GetProperties() to GetClassData(). Used the new iterator
	in TreeInfo().
	(ClassIterator): Iterator implementation to iterate over the
	ClassData objects in a classification object.

	* Thuban/Model/save.py (Saver.write_classificaton): Uses
	the new iterator to save the classification information.

	* Thuban/UI/classifier.py (SelectPropertiesDialog): Support
	for changing the stroke and fill colors and previewing the
	changes.

	* Thuban/UI/mainwindow.py (MainWindow.OpenSession, 
	MainWindow.SaveSessionAs): Text string changes so the dialogs
	have more meaningful titles.

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
	Classification method name from GetProperties to GetClassData.

	* Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
	instead of accessing now non-existent class variables.

2003-02-24  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
	unneeded Shape() call. Rendering is substantially faster without
	it and it avoids some problems with broken shape files.

2003-02-20  Frank Koormann   <frank@intevation.de>

	Force minimal size of identify and label dialogs. The autosizing 
	looked too ugly.

	* Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
	* Thuban/UI/labeldialog.py (LabelDialog.dialog_layout): 
	Set size of listctrl.
	* Thuban/UI/identifyview.py (IdentifyView.__init__): 
	Set size of dialog.

2003-02-19  Jonathan Coles   <jonathan@intevation.de>

	* test/test_classification.py, test/test_layer.py, 
	test/test_load.py, test/test_map.py, test/test_session.py:
	Updated the tests to use the new functions that are in the
	respective classes.

	* Thuban/Model/classification.py (Classification):
	Uses the new ClassData* classes. Modification messages are 
	passed up to the parent layer (if it exists).
	(ClassData): New class to encapsulate the common data in each
	classification property. 
	(ClassDataDefault): Represents the Default class. data.
	(ClassDataPoint): Represents a single class. data point
	(ClassDataRange): Represents a class. range
	(ClassDataMap): Represents a class. map (unused).

	* Thuban/Model/color.py: Added Color.None to represent something
	with no color. Color.Black represents the color black.
	(NoColor): Helper class derived from Color to represent something
	with no color.

	* Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
	stroke_width attributes. Made the 'classification' attribute private.
	New methods for setting/getting the classification.

	* Thuban/Model/load.py (ProcessSession): Use new methods on Layer
	to get the classifcation and use the new ClassData* classes to
	hold the classification data. Use Str2Num to convert numbers 
	properly.

	* Thuban/Model/save.py (Saver): Use new Color and Classification
	methods

	* Thuban/UI/classifier.py (ClassGrid): New class to represent a
	custom grid.
	(ClassTable): Support for editing Values and Labels and for
	changing what type (point or range) of data is stored in each
	property based on how the user enters the data.
	(Classifier): Support for saving the new classifications and
	launching the dialog to edit a property.
	(SelectPropertiesDialog): New class for editing the visual
	properties of a classification (stroke color, width, and fill color) 
	(ClassPreviewer): Took the Draw method from ClassRenderer and
	made most of it into this new class. Intend to use this class in 
	the SelectPropertiesDialog for previewing changes.

	* Thuban/UI/renderer.py: Use new Color and Classification methods.

	* Thuban/UI/tree.py: Formatting changes.

	* Doc/thuban.dtd: Add 'label' element

	* Thuban/common.py: New. Contains common routines used throughout
	the code. 
	(Str2Num): Takes a string and converts it to the "best" type of
	number.

2003-02-14  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
	dragging flag is always set to 0 even when the tool implementation
	raises an exception

2003-02-11  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.splash_screen): New
	method to create a splash screen.
	(ThubanApplication.ShowMainWindow): New. Show the main window.
	Needed so the splash screen can display the mainwindow
	(ThubanApplication.OnInit): Call the
	new splash_screen method to determine whether the application
	should display a splash screen. If it displays a splash screen do
	not immediately show the main window.

2003-02-11  Jonathan Coles  <jonathan@intevation.de>

	* Thuban/Model/classification.py: Added import line to fix
	feature conflicts between running on python2.2 and python2.1.

	* Thuban/UI/classifier.py (ClassTable): Didn't need to hang
	onto the clinfo parameter, so removed the deepcopy().

2003-02-10  Jonathan Coles  <jonathan@intevation.de>

	* Thuban/Model/save.py (Saver.open_element, Saver.close_element):
	Added element_open variable to track opening and closing of tags
	so that tags that don't span more than one line are closed with
	/> instead of </tag_name>. Use the GetDefault*() methods of
	the Classification class.

	* Thuban/Model/classification.py (Classificaton): Added set and
	get methods for the default data. The class also takes a layer
	reference so that modification messages can be sent. Fixed the
	methods to use the new ClassData class.
	(ClassData): New class to encapsulate the classification data

	* Thuban/Model/layer.py (Layer): Remove the
	Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
	SetDefault*() methods on the layer's classification object.
	(Layer.__init__): Use the new SetDefault*() methods in the
	Classification class.

	* Thuban/Model/load.py (ProcessSession): Use the new ClassData
	object instead of a dictionary.

	* Thuban/UI/classifier.py (ClassRenderer): New class to
	draw the classifications in the dialog box's table.
	(Classifier): Modified to use the ClassRenderer class.

	* Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
	methods of the Classification class.

	* Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
	of the ClassData class.

	* test/test_classification.py, test/test_layer.py,
	test/test_map.py, test/test_session.py: Fix the tests to work
	with the above code changes.

2003-02-03  Jonathan Coles  <jonathan@intevation.de>

	* Thuban/Model/classification.py (Classification): Added getNull()
	to return the NullData reference

	* Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
	Layer.SetStrokeWidth): Modified these functions to change the
	null data in the classification rather than keep these values
	directly in the Layer class. Menu options to change these values
	work again.

2003-01-28  Jonathan Coles  <jonathan@intevation.de>

	* Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
	Fixed crashing problem on some systems. Dialog box shows
	classification data.

	* Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
	Colors in the tree view.

	* Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
	the tree info for classifications. Commented out unnecessary lines.

	* Thuban/Model/classification.py (Classification.TreeInfo): New
	function to add information about the classification into the
	tree view.

2003-01-27  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/__init__.py (_): New.

	* Thuban/Model/classification.py, Thuban/Model/extension.py,
	Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
	Thuban/Model/session.py, Thuban/UI/application.py,
	Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
	Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
	Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
	Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
	Thuban/Lib/fileutil.py: Replace user string by _() for i18n.

2003-01-27  Jonathan Coles  <jonathan@intevation.de>

	* Thuban/Model/layer.py: Classification initialization calls.

	* Thuban/Model/classification.py: Created class to encapsulate
	a layer classification. Supports specific data points and
	ranges.

	* Thuban/Model/load.py: Added support for loading classification
	information.

	* Thuban/Model/save.py: Added support for saving classification
	information.

	* Thuban/UI/classifier.py: Initial class for a dialog box for
	specifying classification information.

	* Thuban/UI/mainwindows.py: Support for opening the classifier
	dialog.

	* Thuban/UI/renderer.py: Support for drawing a layer with the
	classification information.

	* Data/iceland_sample_class.thuban: iceland_sample with
	classification data.

	* test/test_classification: Tests for the Classification class.

2002-12-09  Bernhard Herzog  <bh@intevation.de>

	* test/test_command.py: New. Tests for the command classes.

	* Thuban/UI/command.py (ToolCommand): New class for tool commands.
	(Command.IsTool): New method to distinguish between command
	switching tools and other commands.

	* Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
	the tool to avoid direct assignments to instance variables
	(MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
	(MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
	change the tool

	* Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
	active tool's command turns insensitive, disable the tool.
	(_tool_command): Use the new ToolCommand class

	* Examples/simple_extensions/simple_tool.py (simple_tool): Use the
	SelectTool method to change the tool
	(iconfile): Use the ToolCommand class

2002-12-03  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
	the case of selected items that are not children of Layers or Maps
	properly. Previously this bug would trigger an assertion in
	wxWindows.

2002-11-06  Frank Koormann  <franmk.koormann@intevation.de>

	* Thuban/UI/mainwindow.py: Altered the order of tools in the
	toolbar: First now are all navigation tools (Zoom In/Out, Pan,
	Full Extent).

2002-10-23  Bernhard Herzog  <bh@intevation.de>

	* setup.py (setup call): version now 0.1.3

	* MANIFEST.in: Add the files in test/

	* test/README: Add note about tests requiring the iceland data

	* Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
	copyright notice.

2002-10-18  Bernhard Herzog  <bh@intevation.de>

	* test/test_map.py
	(TestMapWithContents.test_projected_bounding_box): Use an explicit
	epsilon.

	* test/support.py (FloatComparisonMixin.assertFloatEqual)
	(FloatComparisonMixin.assertFloatSeqEqual): give a more useful
	message if the assertion fails and don't return the return value
	of self.assert_. In assertFloatSeqEqual the return meant that not
	all items of the sequence were compared.

2002-09-20  Bernhard Herzog  <bh@intevation.de>

	* test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil

	* Thuban/Lib/fileutil.py: Fixup some whitespace and typos

	* test/test_map.py (TestMapWithContents.test_tree_info): Create
	the string with the bounding box on the fly because of platform
	differences in the way %g is handled.

	* test/test_layer.py (TestLayer.test_empty_layer): Create an empty
	DBFfile too because Thuban layers can't yet cope missing DBF
	files.

2002-09-20  Bernhard Herzog  <bh@intevation.de>

	* test/test_menu.py: Use initthuban instead of
	add_thuban_dir_to_path to initialize Thuban.

	* test/support.py (FloatComparisonMixin.assertFloatEqual): New.
	Mixin class for float comparisons
	(SubscriberMixin): New. Mixin class to test messages sent through
	the Connector class

	* test/README: Fix a typo and add the -v flag to the command for
	individual tests

	* test/test_session.py: New. Test cases for Thuban.Model.session

	* test/test_proj.py: New. Test cases for Thuban.Model.proj

	* test/test_map.py: New. Test cases for Thuban.Model.map

	* test/test_layer.py: New. Test cases for Thuban.Model.layer

	* test/test_label.py: New. Test cases for Thuban.Model.label

	* test/test_connector.py: New. Test cases for Thuban.Lib.connector

	* test/test_color.py: New. Test cases for Thuban.Model.color

	* test/test_base.py: New. Test cases for Thuban.Model.base

2002-09-13  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/session.py (Session.forwarded_channels): Forward
	the CHANGED channel too.

	* Thuban/Model/map.py (Map.forwarded_channels): Forward the
	CHANGED channel too.
	(Map.__init__): Call the Modifiable constructor as well.

	* Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
	event if the modified flag changes.
	(Modifiable.changed): Tweak the doc-string.

	* Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
	(MainWindow.set_position_text): Put the code that puts the text
	with the mouse position into the status bar into the new method
	set_position_text so that it can overwritten in derived classes.

2002-09-12  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
	message box on the main window.

2002-09-11  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
	the 'E' because it's less likely to interfere with other menu
	entries.
	(MainWindow.build_menu): remove an incorrect comment.

2002-09-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.Map): New.
	(_tool_command): Add sensitive parameter
	(_has_visible_map): Sensitivity callback to tools and other
	commands that require a visible map. Use it in map_zoom_in_tool,
	map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
	and map_full_extent

2002-09-06  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
	VIEW_POSITION

2002-09-04  Frank Koormann  <frank.koormann@intevation.de>

	* Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")

2002-09-02  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py: Get rid of the idle redraw. This is done by
	wxWindows already and our implementation doesn't work correctly
	with wxGTK 2.3:
	(MapCanvas.__init__): Remove the instance variable
	(MapCanvas.OnPaint): Always call do_redraw when there's a map to
	be drawin
	(MapCanvas.OnIdle): Removed.

	* Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
	a parameter to determine the size of the rectangle.
	(MapCanvas.find_shape_at): Create the box around the point on a
	layer by layer basis and make the size depend on the shape type.
	This solves a problem with the selection of point shapes at the
	border of the layer's bounding box

2002-08-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
	for the sensitivity  of remove layer.
	(_can_remove_layer): New. Sensitivity callback for remove layer
	(Command layer_remove): Use _can_remove_layer

	* Thuban/Model/map.py (Map.CanRemoveLayer): New method to
	determine whether a given layer can be deleted.

	* Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
	(MapCanvas.do_redraw): Get rid of the unused update_region
	instance variable

	* Thuban/UI/view.py: Add/update some doc-strings.

	* test/: new subdirectory with a bunch of unit tests.

	* test/README, test/test_table.py, test/test_save.py,
	test/test_menu.py, test/test_load.py: Initial set of tests and
	brief instructions on how to run them

2002-08-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
	arcs with multiple parts.

	* Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
	Handle degenrate rectangles.

	* Thuban/Model/table.py: Make writing records work correctly:
	(Table.__init__): Keep track of whether the DBF is open for
	writing
	(Table.write_record): Open the DBF file for writing when necessary

2002-08-27  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/table.py (Table.write_record, Table.__init__): Open
	dbf files only for reading by default. Use a new writable dbf
	object for writing.

2002-08-26  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py: Refactor the context creation:
	(MainWindow.Context): New method to return a context
	(MainWindow.invoke_command, MainWindow.update_command_ui): Use the
	new method

	* Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
	layer table specific code from TableGrid into LayerTableGrid
	(TableFrame, LayerTableFrame): Split the layer table specific code
	from TableFrame into LayerTableFrame
	(LayerTableGrid.select_shape): Remove a debug print

	* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
	LayerTableFrame

2002-08-23  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.__init__): Make sure we have an
	absolute filename.

2002-08-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/table.py (Table.write_record): New method to write
	records.
	(Table.__init__): Open the DBF file for writing too.

	* Thuban/UI/controls.py (RecordTable.SetValue): Write the value
	into the underlying table.

	* extensions/shapelib/shapefil.h (DBFCommit),
	extensions/shapelib/dbfopen.c (DBFCommit): New API function to
	commit any changes made to the DBF file.

	* Thuban/UI/mainwindow.py (make_check_current_tool)
	(_tool_command): Put the code that generates the "checked"
	callback into a separate function so that we can reuse it
	elsewhere

	* Thuban/Model/save.py (Saver): New class to handle serializing a
	session into an XML file. The main reason to introduce a class is
	that applications built on Thuban can derive from it so that they
	can save additional information in a session file.
	(save_session): Delegate almost all the work to the Saver class.
	Rename the filename argument to file because it may be a file like
	object now.

	* Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
	code. Remove the little test code which would be executed when the
	module is run as a script which didn't work anymore since it can't
	import the other Thuban modules.
	(ProcessSession, load_session): Refactor the ProcessSession to
	have one method for each element start and end tag so that derived
	classes can easily override the processing of individual tags.
	Also, always parse with namespaces enabled because applications
	built on top of Thuban will likely use namespaces if they extend
	the session file format.

2002-08-21  Bernhard Herzog  <bh@intevation.de>

	* setup.py (ThubanInstall.run): Don't repr install_lib_orig
	because thubaninit_contents will do it for us.

2002-08-16  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
	tree window already open

2002-08-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
	with self.

	* Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
	when we have actually captured it.

	* Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
	shapefile and destroy the table.

	* Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.

2002-08-14  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
	instance variable columns
	(RecordTable.GetTypeName): row and col may be negative in some
	cases.

	* setup.py (InstallLocal.initialize_options)
	(InstallLocal.finalize_options, InstallLocal.user_options): New
	option create-init-file to build a thubaninit.py when running
	install_local
	(InstallLocal.run): Create the thubaninit.py module when requested
	(thubaninit_contents): Split the template into several parts and
	create a new function thubaninit_contents that creates the
	contents of a thubaninit module.
	(ThubanInstall.run): Use the new function to create the thubaninit
	module.

2002-07-30  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.OnExit): Do some
	cleanup.
	(ThubanApplication.MainLoop): Extend to automatically call OnExit.

	* Thuban/Model/session.py (Session.Destroy): Don't bypass the
	direct base class' Destroy method.

	* Thuban/Model/map.py (Map.ClearLayers): New method to delete all
	layers.
	(Map.Destroy): Destroy the label_layer as well and call the
	inherited Desatroymethod first so that no more messages are
	issued.
	(Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
	message if the stacking order actually has changed. Add
	doc-strings.
	(Map.BoundingBox): Correct the doc-string.
	(Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
	(Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.

	* Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
	all labels.

2002-07-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/map.py (Map.subscribe_layer_channels)
	(Map.unsubscribe_layer_channels): Put the code that (un)subscribes
	to a layer's channels into separate methods.
	(Map.RemoveLayer, Map.AddLayer): Call the new methods
	(Map.Destroy): Unsubscribe from a layer's channels before
	destroying it.

	* Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
	selected_layer parameter to searched_layer which is the layer to
	search in.
	(MapCanvas.SelectShapeAt): New parameter layer to restrict the
	search to that layer. Return the selected layer and shape.

	* Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
	typo

2002-07-24  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py (ThubanApplication.create_session):
	Extend the doc string.
	(ThubanApplication.subscribe_session)
	(ThubanApplication.unsubscribe_session): New methods to
	subscribe/unsubscribe to/from session channels.
	(ThubanApplication.SetSession): Call the new methods here.
	(ThubanApplication.maps_changed, ThubanApplication.set_map):
	Renamed set_map to maps_changed. Its now a subscriber for
	MAPS_CHANGED.

	* Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
	x-coordinate in case of simple clicks

	* Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
	don't pass it as a parameter

	* Thuban/Model/session.py (Session.RemoveMap): New

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
	window size into a parameter.

2002-07-23  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/menu.py (Menu.item_index): Also search for menus not
	just commands.

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
	parameter list a bit to allow setting the window title and the
	initial message in the status bar. Update the callers.

	* Thuban/UI/application.py (ThubanApplication.OnInit)
	(ThubanApplication.CreateMainWindow): Put the mainwindow
	instantiation into a separate method so that it can be overridden
	by a subclass.

2002-07-19  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/session.py: Issue a CHANGED message every time
	another changed message is issued to make it easier to get
	notified of changes.
	(Session): Update the doc string
	(Session.forward): Issue changed-events as CHANGED as well.
	(Session.changed): Overwrite the inherited version to issue
	CHANGED events as well.

	* Thuban/UI/tree.py: We can now simply subscribe to the session's
	CHANGED channel to be informed of changes.
	(SessionTreeCtrl.session_channels): Not needed any longer.
	(SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
	Only have to (un)subscribe CHANGED

	* Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.

	* Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
	for the wxPython locale bug to __init__.py so that it's
	automatically executed by anybody using UI code from Thuban.

2002-07-18  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/main.py (main): app no longer needs to be global

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
	as parameter and store it in an instance variable
	(MainWindow.invoke_command, MainWindow.update_command_ui)
	(MainWindow.save_modified_session, MainWindow.NewSession)
	(MainWindow.OpenSession, MainWindow.SaveSession)
	(MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
	application object.

	* Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
	the main window with self.

	* Thuban/UI/context.py: New module with the context class

	* Thuban/UI/command.py (Command): Update doc string.

	* Thuban/UI/mainwindow.py (MainWindow.invoke_command,
	MainWindow.update_command_ui): Pass an instance of the context
	class to the command's methods
	(check_current_tool, call_method): Handle the new context
	implementation

	* Examples/simple_extensions/simple_tool.py (simple_tool,
	check_simple_tool): Handle the new context implementation

	* Examples/simple_extensions/simple_command.py (simple_command):
	Handle the new context implementation. Update the comments about
	the context.

	* Thuban/UI/application.py (ThubanApplication.SetSession): Add
	doc-string
	(ThubanApplication.Session): New method to return the session
	object

	* Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
	interactor's selected_layer may not be a layer of the current
	session when the tree is updated while a new session is being set.

2002-07-17  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/tree.py (color_string): Removed. No longer used.
	(SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
	update_tree into update_tree and add_items. The tree now uses a
	more generic way to display the contents of the tree.
	(SessionTreeCtrl): Add a doc string explaining the TreeInfo method

	* Thuban/Model/layer.py (Layer.TreeInfo),
	Thuban/Model/extension.py (Extension.TreeInfo),
	Thuban/Model/map.py (Map.TreeInfo),
	Thuban/Model/session.py (Session.TreeInfo):
	Add TreeInfo methods to implement the new tree view update scheme

2002-07-16  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/application.py: Don't use "import from" for the
	MainWindow. It can't always be resolved.
	(ThubanApplication.OnInit): change reference to MainWindow
	accordingly.

	* Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
	completely

2002-07-10  Bernhard Herzog  <bh@intevation.de>

	* setup.py (create_init_module): New configurable variable whose
	default depends on the platform we're running on.
	(ThubanInstall.initialize_options): Initialize
	self.create_init_module from the global create_init_module
	(ThubanInstall.user_options): indictate that the options
	create-init-module and init-module-dir have arguments.

	* setup.py: In the setup call change the version number to include
	cvs.

	* MANIFEST.in: Add the files in Examples

2002-07-09  Bernhard Herzog  <bh@intevation.de>

	* setup.py: In the setup call, use the thuban homepage as the
	value of the url parameter.

	* Examples: New subdirectory for examples.

	* Examples/simple_extensions/simple_tool.xpm,
	Examples/simple_extensions/simple_tool.py,
	Examples/simple_extensions/simple_command.py,
	Examples/simple_extensions/README: Simple examples showing how to
	add new commands and tools.

	* setup.cfg (bdist_rpm): Add the default value for prefix and tell
	bdist_rpm that we also have an install script.
	(bdist_inno): Add 2002 to the copyright notice.

	* setup.py: Create a file in python's site-packages directory to
	make installation of Thuban as a library easier.
	(ThubanInstall.user_options): Add two new options,
	create-init-module and init-module-dir
	(ThubanInstall.expand_with_pure_python_dirs): New method to expand
	filenames for installation in the default directories.
	(ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
	the inherited methods to capture some filenames before they're
	transformed too much by distutils.
	(ThubanInstall.run): Create the init module if requested.
	(ThubanInstall.thuban_init_filename): New method to return the
	full name of the init module.
	(ThubanInstall.get_outputs): Append the filename of the init
	module.

2002-07-08  Bernhard Herzog  <bh@intevation.de>

	* setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
	handle the prefix properly which means that the default for the
	installation prefix should be /usr for RPMs and /usr/local when
	doing a normal source install.
	(bdist_rpm_install_script): Script to override the default install
	commands in the specfile generated by the bdist_rpm command.
	(thuban_bdist_rpm.user_options): Add a prefix option
	(thuban_bdist_rpm.initialize_options): Init the prefix option.
	Create the script files for the spec files as empty files here
	(thuban_bdist_rpm._make_spec_file): Override the inherited method
	to fill the script files with content.

	* Thuban/Model/save.py (relative_filename): Wrapper around
	Thuban.Lib.fileutil.relative_filename that accepts an empty dir
	argument. save_session now automatically uses this version,
	solving a problem when saving to a relative filename.

	* setup.py: In the setup call, make sure that the library
	directories are under $prefix/lib not directly under $prefix.

2002-06-20  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/Model/extension.py: new module to handle extension objects.
	* Thuban/Model/messages.py: new messages for extensions.
	* Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
	Session.AddExtension): new for handling extensions.
	Also some other minor changes to round up extension handling.
	* Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
	of Extension titles and title and names of its objects.

2002-05-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
	the events for a command.
	(MainWindow.add_toolbar_command, MainWindow.add_menu_command):
	Call bind_command_events to bind the events. add_toolbar_command
	can now bind events too so that it's possible to have commands
	that are only available through the toolbar.
	(MainWindow.init_ids): New instance variable events_bound to keep
	track of for which commands events have been bound.

2002-05-28  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/menu.py: New module to build and manage menus.

	* Thuban/UI/mainwindow.py: Remove some unused imports.
	(MainWindow.__init__, main_menu): move the definition of the main
	menu from __init__ to the Menu instance main_menu.
	(MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
	build the menu bar and sub-menus from a menu description.

	* Thuban/UI/application.py (ThubanApplication.OnInit): Read the
	startup file
	(ThubanApplication.read_startup_files): New method to run
	~/.thuban/thubanstart.py

	* Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
	Move the toolbar definition to the Menu instance main_toolbar.
	(MainWindow.build_toolbar): New method to build the toolbar
	similar to the build_menu methods

2002-05-23  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
	layer_outline_color. Fix it in the definition of the command too.

	* Thuban/UI/command.py (Command): Fix typo in doc string

2002-05-22  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
	in the docstring

2002-05-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
	when the shapefile is empty.
	(Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
	now return None for empty shapefiles. Update doc-strings.

	* Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
	the layer's bbox being None.

	* Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
	layer's bbox being None.

	* Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
	necessary.
	(MapCanvas.__init__): New instance variables, last_selected_layer
	and last_selected_shape to determine how the selection has
	changed.

	* Thuban/UI/tableview.py (TableGrid.__init__): Do not call
	AutoSizeColumns because it will cause a traversal of the entire
	table which for large .dbf files will take a very long time.

2002-05-14  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
	maximum depth for the tree than shapelib does by default.

2002-05-10  Bernhard Herzog  <bh@intevation.de>

	* setup.py (py_modules): The shptree modules doesn't have a
	wrapper, so don't include it in the py_modules

2002-05-08  Bernhard Herzog  <bh@intevation.de>

	* extensions/shapelib/shptree.c (compare_ints): Make arguments
	const void * as in the qsort prototype
	(SHPTreeFindLikelyShapes): Remove some unused variables.

	* Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
	maintains to redraw the window during a drag.
	(MapCanvas.unprojected_rect_around_point): New method to determine
	a small region around a point for hit-testing.
	(MapCanvas.find_shape_at): Only test the shapes in a small region
	around the point.

	* setup.py: Increment the version to 0.1.2

	* Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
	debug print and set session to None after unsubscribing

2002-05-07  Bernhard Herzog  <bh@intevation.de>

	* Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
	the file to have a .thuban extension.

	* Thuban/UI/tree.py (session_channels): New class constant with
	all the session channels to subscribe to to update the tree
	(SessionTreeCtrl.session_changed): Remember the session so that we
	can unsubscribe properly. Use the new class constant to
	unsubscribe from the old session and subscribe to the new one.
	(SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
	subscriptions of the SessionTreeCtrl.
	(SessionTreeView.OnClose): Call the tree's unsubscribe_all method.

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
	Session Tree" command to the file menu.

	* Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
	as update_region to the renderer.

	* Thuban/UI/renderer.py
	(ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
	update box is now directly a tuple, not a wxRect anymore.

	* Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
	prints.

2002-05-07  Bernhard Herzog  <bh@intevation.de>

	* setup.py: Add the shptree extension module. See
	extensions/pyshapelib/ChangeLog for more details.

	* extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
	extensions/shapelib/dbfopen.c: Really update to the versions of
	shapelib 1.2.9. For some reason it wasn't really done on
	2002-04-11.

	* extensions/shapelib/shptree.c: Modified version of shptree.c of
	shapelib 1.2.9. The only real difference is the use of qsort
	instead of a bubble sort implementation

	* Thuban/Model/layer.py (Layer.__init__): New instance variable
	shapetree to hold the shapelib quadtree for the shapefile
	(Layer.open_shapefile): Create the quad tree.
	(Layer.ShapesInRegion): New method to return the ids of shapes in
	a given region using the quad tree.

	* extensions/thuban/wxproj.cpp (project_points): Fix some typos in
	comment
	(draw_polygon_shape): Accept both arcs and polygons.
	(initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
	the api.

	* Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
	return the shape ids to be rendered in a given layer.
	(MapRenderer.draw_shape_layer): Call layer_ids to get the list of
	ids. Use draw_polygon_shape to draw arc shapes as well.
	(ScreenRenderer.RenderMap): New parameter for the rectangle that
	has to be updated
	(ScreenRenderer.layer_ids): Make use of the layer's quadtree by
	calling it's ShapesInRegion method.

	* Thuban/UI/view.py (MapCanvas.__init__): New instance variable
	update_region for the update region.
	(MapCanvas.OnPaint): Maintain the update region
	(MapCanvas.do_redraw): Pass the bounding box of the update_region
	to the renderer when drawing the bitmap. Reset the update_region.

2002-05-03  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
	MainWindow.OpenSession): Change the file extension of the session
	files to .thuban

	* Thuban/Model/session.py (Session.AddMap, forwarded_channels):
	Move the map channels to be forwarded by the session into the
	class constant with forwarded_channels. Also add
	LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
	forwarded_channels

	* Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
	typo and some rewording).

2002-05-02  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py: Keep the temporary bitmap used during drawing
	around to speed up most redraws:
	(MapCanvas.__init__): New instance variable bitmap which holds the
	bitmap
	(MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
	self.bitmap to draw.
	(MapCanvas.full_redraw): New method to force a full redraw
	including the bitmap
	(MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
	make sure the bitmap is redrawn.
	(MapCanvas.projection_changed, MapCanvas.set_view_transform,
	MapCanvas.shape_selected): Call full_redraw instead of readraw to
	make sure the bitmap is redrawn.
	(MapCanvas.OnSize): New method to handle size events so that the
	bitmap can be redrawn.

2002-04-29  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
	canvas' VIEW_POSITION event
	(MainWindow.view_position_changed): Handler for VIEW_POSITION.
	Update the text in the status-bar accordingly.

	* Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
	(MapCanvas.__del__): Implement because Publisher.__del__ has to be
	called.
	(MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
	current_position
	(MapCanvas.set_current_position): New method to set
	current_position. Issue a VIEW_POSITION event
	(MapCanvas.CurrentPosition): New public method to return the value
	of current_position. Should be called when the VIEW_POSITION event
	is processed.
	(MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
	Update the position.
	(MapCanvas.OnLeaveWindow): Set the position to None.

	* Thuban/UI/messages.py (VIEW_POSITION): New message for the
	position in the statusbar

2002-04-26  Frank Koormann <frank@intevation.de>

	* Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data

2002-04-24  Frank Koormann <frank@intevation.de>

	* Resources/Bitmaps/identify.xpm: shadow added

	* Resources/Bitmaps/fullextent.xpm: new

2002-04-22  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/tree.py (update_tree): added test for None on map bounding
	box

2002-04-21  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new

	* Thuban/UI/tree.py (update_tree): added added map extent

	* Thuban/UI/mainwindow.py (_method_command): extended by parameter
	icon; added map_full_extend as tool

2002-04-19  Jan-Oliver Wagner <jan@intevation.de>

	* Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
	saving _new_ sessions

	* Thuban/Model/session.py (create_empty_session): new session
	don't have a filename (set to None)

	* Thuban/UI/tree.py (update_tree): added filename and modified flag

	* Thuban/Model/load.py (ProcessSession): convert projection
	parameters from unicode to regular string

	* Data/iceland_sample.session: Added UTM Zone 26 projection.

2002-04-11  Bernhard Herzog  <bh@intevation.de>

	* extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
	extensions/shapelib/dbfopen.c: Update to the versions of shapelib
	1.2.9

	* setup.py (Lib.wxproj extension): Don't link shpopen.c and put
	the pyshapelib directoy into the list of include dirs, so that
	pyshapelib_api.h can be found.

	* extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
	holds the pyshapelib C-API
	(draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
	pyshapelib_api to access the shapelib functions.
	(initwxproj): Import the c_api from the shapelib module and
	initialize pyshapelib_api.

2002-04-04  Bernhard Herzog  <bh@intevation.de>

	* setup.py (thuban_bdist_rpm.initialize_options): Use
	initialize_options to create the scripts for the rpm.

	* extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /

2002-04-03  Bernhard Herzog  <bh@intevation.de>

	* setup.py: Increment version to 0.1.1

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
	Layer" and "Remove Layer" commands from the layer menu to the map
	menu

2002-02-15  Bernhard Herzog  <bh@intevation.de>

	* Thuban/Model/layer.py (Layer.Shape): list append only takes one
	argument (python <= 1.5.2 erroneously accepted multiuple
	arguments)

2002-02-04  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
	RecordGrid in the identifyview.
	(IdentifyView.__init__): Use IdentifyGridCtrl instead of
	IdentifyListCtrl. The grid allows editing of the values.

	* Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
	implementing a grid for a single row of a thuban table.

	* Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
	layers by default. Easier to use than the previous default of only
	searching through the select layer which meant that if no layer
	was selected, you couldn't select a shape.

	* Thuban/UI/tableview.py (TableGrid.__init__): Fix typo

	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
	stroke_width attribute

	* Thuban/Model/save.py (save_session): Write the new stroke_width
	attribute

	* Thuban/Model/load.py (ProcessSession.startElement): Read the
	stroke_width attribute

	* Thuban/Model/layer.py (Layer.__init__): New parameter and
	instance variable stroke_width
	(Layer.SetStrokeWidth): Set the stroke_width.

2002-02-01  Bernhard Herzog  <bh@intevation.de>

	* extensions/thuban/wxproj.cpp (project_points): Fix two
	off-by-one errors in the last loop that joins the various parts
	together.

2002-01-14  Bernhard Herzog  <bh@intevation.de>

	* setup.py (data_dist.make_distribution): Fix some typos

2001-09-18  Bernhard Herzog  <bh@intevation.de>

	* README: Slight tweaking in preparation for the 0.1 release

	* setup.cfg: Add section for sdist to create both tgz and zip
	archives

	* setup.py: increase version number to 0.1
	(data_dist): New command class for data distribution

2001-09-14  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
	Handle the case of no layer (i.e. layer is None) properly.

	* Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
	Set the initial selection of the combo boxes to reflect the
	projection we're starting with in a way that works on windows,
	too.

	* Thuban/Lib/connector.py (Connector.print_connections): Print the
	puiblisher's ids in hex to make it easier to compare them to the
	standard repr of python methods

	* Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
	messages

2001-09-13  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
	deselect the layer if no layer is selected

	* Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
	idle time when there actually is something to draw. If there's
	nothing to draw simply clear the window
	(MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
	(MapCanvas.SetMap): force a redraw in all cases because
	FitMapToWindow doesn't always do it.
	(MapCanvas.ZoomFactor): Add an optional parameter, center, to
	specify the point to move into the center of the window
	(ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
	dragged, zoon in/out by a factor of 2
	(MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
	index, i.e. reversed drawing order) so that objects appearing to
	be in from of others are selected first. This is probably mostly
	relevant for point shapes where the symbols used may overlap

	* Thuban/Model/session.py (create_empty_session): Unset the
	modified bit before returning it

	* Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
	create_empty_session session to create the new, empty session.

	* Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
	the tool bitmaps.
	(MainWindow.OnClose, MainWindow.save_modified_session): Separate
	the code that asks whether the session should be saved into the
	new method save_modified_session.
	(MainWindow.OpenSession, MainWindow.NewSession): Use the new
	method to save modified session here too.

2001-09-11  Bernhard Herzog  <bh@intevation.de>

	* setup.py (InnoIconItem): fix typo

	(thuban_bdist_inno.run):
	(bdist_inno.run): Move the decision not to create symlinks on
	non-nt platforms to thuban_bdist_inno and do it unconditinally
	since we never want to create the symlinks here

2001-09-10  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
	identify view immediately

	* Thuban/UI/controls.py: New file with two classes RecordListCtrl
	and SelectableRecordListCtrl that implement the code shared by the
	identify view and the label dialog

	* Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
	new class RecordListCtrl

	* Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
	return value of GetValue is None instead of using it as a boolean
	directly so that Zero numbers are handled properly.
	(LabelListCtrl): Derive from the new class
	SelectableRecordListCtrl

	* Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
	(Proj4Dialog.dialogLayout): Make the window resizable and set the
	size of the text control explicitly to make the sizers work on
	both Windows and X.

2001-09-07  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
	that can limit the search to the currently selected layer.
	(MapCanvas.SelectShapeAt): Make sure that the currently selected
	layer stays selected even when no shape is found
	(MapCanvas.FitRectToWindow): If the rect has zero with or zero
	height do nothing (avoids zero division errors)

2001-09-06  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
	Correct the spelling of SessionTreeCtrl. dabbrev is too damn
	convenient :-)
	(SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
	a new instvar layer_to_item to map layers to tree items
	(SessionTreeCtrl.layer_selected): Select the appropriate tree item
	to match the current selection in the interactor

	* Thuban/UI/interactor.py (Interactor.SelectedLayer):
	(Interactor.HasSelectedLayer): New methods to query the current
	selection

	* Thuban/UI/mainwindow.py (MainWindow.current_layer):
	(MainWindow.has_selected_layer): Simply call the appropriate
	interactor method

	* Thuban/UI/mainwindow.py (MainWindow.__init__):
	(MainWindow.LayerShowTable):
	(MainWindow.identify_view_on_demand): Store the interactor in an
	instvar and use that reference instead of going through main.app

	* Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
	* Thuban/UI/application.py (ThubanApplication.OnInit):
	* Thuban/UI/main.py (main): Create the session tree view in main
	with the new mainwindow method ShowSessionTree and not directly
	the application's OnInit method

	* Thuban/UI/tree.py (myTreeCtrlPanel):
	(SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
	TreeCtrl isntead of a panel. This affects most method since we now
	refer to self instead of self.tree
	(SessionTreeView): New class implementing a non-modal dialog
	showing the session tree.

	* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
	layer to the tableview dialog.

	* Thuban/UI/tableview.py: Add some doc-strings
	(TableGrid):
	(TableGrid.OnRangeSelect):
	(TableGrid.OnSelectCell):
	(TableFrame.__init__):
	(TableFrame.row_selected):
	Selecting rows in the grid view now updates the selected shapes
	through the TableFrame. To achieve this we derive TableGrid from
	Publisher and introduce the message type ROW_SELECTED which the
	TableFrame subscribes to and which is issued by OnRangeSelect and
	OnSelectCell

	(DataTable.SelectRow): Removed because it's no longer needed in
	the row/shape selection scheme

	* Thuban/UI/dialogs.py: New file implementing common classes for
	dialogs

	* Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
	the SELECTED_SHAPE message anymore. This is now handled by the
	parent.
	(TableGrid.select_shape): Only update the selection if the shape
	is not None.
	(TableFrame): Inherit from the new NonModalDialog class.
	(TableFrame.__init__, TableFrame.select_shape): Handle the
	SELECT_SHAPE message.
	(TableFrame.OnClose): Extend the inherited method to unsubscribe
	SELECT_SHAPE

	* Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
	(MainWindow.add_dialog):
	(MainWindow.dialog_open):
	(MainWindow.remove_dialog):
	(MainWindow.get_open_dialog): New methods to maintain a dictionary
	of opened non-modal dialogs.

	(MainWindow.__init__): Initialize the new non-modal dictionary
	management code
	(MainWindow.LayerShowTable): maintain separate dialogs for each
	table using the non-modal dialog management code to only open a
	view once for each table.

	(MainWindow.IdentifyTool):
	(MainWindow.__init__):
	(MainWindow.identify_view_on_demand): Don't open the identify view
	in IdentifyTool anymore. This will be done automatically by the
	new method identify_view_on_demand which handles the
	SELECTED_SHAPE message so that the identify view will be opened on
	demand

	* Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
	the interactor argument. The SELECTED_SHAPE message is now handled
	by the parent.
	(IdentifyView.__init__): Add the interactor argument so that we
	can handle the SELECTED_SHAPE message here
	(IdentifyView.selected_shape): New method to handle the
	SELECTED_SHAPE messages

	* Thuban/UI/identifyview.py (IdentifyView): Derive from the new
	NonModalDialog class
	(IdentifyView.OnClose): Extend the inherited version to
	unsubscribe SELECT_SHAPE

	* Thuban/Model/session.py (Session.UnsetModified): Remove debug prints

2001-09-05  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.

	* Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
	interactor to pass through to the MapCanvas

	* Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
	argument to the MainWindow constructor to get rid of the ugly hack
	that made main.app available early just so that the mapcanvas
	could access the interactor object.

2001-09-04  Bernhard Herzog  <bh@intevation.de>

	* Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
	that runs a modal message box
	(MainWindow.OnClose): Use the new method
	(MainWindow.RemoveLayer): Just do nothing in case no layer is
	selected. The command should be grayed out anyway, so there's no
	need to pop up a message box.
	(MainWindow.AddLayer): Pop up a message box with an error message
	if the shape file can't be opened

	* Thuban/Model/layer.py (Layer.__init__): Open the shapefile
	immediately. This will cause an exception in case the file can't
	be opened and we can display an appropriate message.

	* MANIFEST.in: Add extensions/pyprojection/LICENSE

	* setup.py (thuban_bdist_rpm): New class implementing a Thuban
	specific bdist_rpm command.

	* Thuban/UI/main.py: Catch ImportError exceptions when importing
	the locale module because it may not be available on some
	installations.

	* extensions/pyprojection/LICENSE: Copy of the license text in
	Projection.i. Having it in a separate file makes it easier to
	refer to license text in e.g. RPMs

2001-09-03  Bernhard Herzog  <bh@intevation.de>

	* setup.py: use wx-config instead of wxgtk-config because it's
	more generic

	* setup.py (ThubanInstall.get_outputs): Add the symlink in
	<prefix>/bin to the outputs
	(ThubanInstall.link_file): New method to link files. We need this
	because the standard copy_files refuses to link non-existing
	files.
	(ThubanInstall.run): Remove the leading install root from the
	script filename if an install root was specified and use the new
	link_file method

	* Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
	the window when the first layer is added to the map.

	* setup.py (ThubanInstall.run): Honor the build root (self.root)
	when linking thuban.py to <prefix>/bin

2001-08-31  Bernhard Herzog  <bh@intevation.de>

	* setup.py: In the setup call, the install parameters shouldn't
	have trailing slashes because distutils on non-posix platforms
	doesn't like that. The same applies to other directories like
	"Resources/Bitmaps"

	In the configuration section for nt, move the wxWindows directory
	optins into the part clearly marked as editable.

	(InstallLocal.initialize_options):
	(InstallLocal.user_options): remove the currently unused debug
	flag
	(thuban_build_py.find_all_modules): Add this method so that it
	works for our case of having packages and modules in one
	distribution as well.
	(ThubanInstall.initialize_options):
	(ThubanInstall.finalize_options):
	(ThubanInstall.user_options):
	(ThubanInstall.boolean_options): Add new options, do-symlink and
	extra files. Since these are the first ThubanInstall specific
	options, override user_options and boolean_options
	(ThubanInstall.run): Honor the new do-symlink and extra-files
	options.
	(ThubanInstall.get_outputs): Add to override the base-class's
	version and add the extra-files to the outputs
	(bdist_inno): New class for windows distributions with Inno Setup
	(InnoIconItem): Helper class for bdist_inno
	(thuban_bdist_inno): Thuban specific version of bdist_inno. Added
	this together with the appropriate parameters, to the setup call.

	* setup.cfg (bdist_inno): added new section for the inno setup
	installer

	* Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
	changing_selection to avoid recursive selection events when
	modifying the selection in response to a selection event.
	(myTreeCtrlPanel.normalize_selection): Set the new inst var when
	changing the tree's selection.
	(myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
	we're not being called indirectly from normalize_selection.

	* Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
	event.Check only if the command is actuall checkable.
	(MainWindow.__init__): Call the toolbar's Realize method to make
	sure that the items are actually shown

2001-08-28  Bernhard Herzog  <bh@intevation.de>

	* setup.py: Fix some doc strings

	* ChangeLog: started

