/[thuban]/branches/WIP-pyshapelib-bramz/Thuban
ViewVC logotype

Log of /branches/WIP-pyshapelib-bramz/Thuban

View Directory Listing Directory Listing


Sticky Revision:
(Current path doesn't exist after revision 2835)

Revision 2734 - Directory Listing
Modified Thu Mar 1 12:42:59 2007 UTC (18 years ago) by bramz
made a copy

Revision 2729 - Directory Listing
Modified Tue Feb 20 10:52:38 2007 UTC (18 years ago) by bernhard
Original Path: trunk/thuban/Thuban
Thuban/version.py, setup.py: Getting ready for release 1.2.0.
Using this version number.


Revision 2725 - Directory Listing
Modified Tue Feb 20 10:36:20 2007 UTC (18 years ago) by bernhard
Original Path: trunk/thuban/Thuban
Thuban/UI/about.py: Reworked the about text. It shows now
when somebody was active on Thuban. Added a list of maintainers.
Bernhard Reiter is the current maintainer, following up on Bernhard Herzog. 


Revision 2718 - Directory Listing
Modified Fri Jan 5 23:43:49 2007 UTC (18 years, 2 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2007-01-06 Didrik Pinte <dpinte@itae.be>

       UTF-8 locales support reading non utf-8 files. This is a workaround and
       not a real bugfix. See
       http://wald.intevation.org/tracker/index.php?func=detail&aid=118 for
       more details

       * Thuban/UI/
       tableview.py, controls.py, baserenderer.py, view.py: decode text from
       iso-8859-1 encoding.




Revision 2712 - Directory Listing
Modified Sun Oct 15 23:27:05 2006 UTC (18 years, 4 months ago) by bernhard
Original Path: trunk/thuban/Thuban
* Thuban/UI/renderer.py: Added module variable verbose and
added verbose output before doing a raster projection.
Minor: Added (c) year 2006.

* test/test_baserenderer.py: Added new function
test_projected_raster_decimalcommalocale()
Added new author Bernhard Reiter and new copyright year 2006.

* libraries/thuban/gdalwarp.cpp(ProjectRasterFile): Adding
switching to LC_NUMERIC "C" and back before calling GDAL functions -
only #if python >=2.4 .


Revision 2710 - Directory Listing
Modified Tue Oct 10 08:31:44 2006 UTC (18 years, 4 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-10-10 Didrik Pinte <dpinte@itae.be>
    * Thuban/Model/layer.py (Layer.GetLabelPosFromShape): new method 
        extracted from Thuban/UI/viewport.py
    * Thuban/UI/viewport.py (Viewport.LabelShapeAt): uses new method



Revision 2709 - Directory Listing
Modified Tue Oct 3 09:34:51 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-09-28 Didrik Pinte <dpinte@itae.be>

       * Thuban/UI/classgen.py: bugfix due to wx2.6 update

       * Thuban/UI/view.py: removed non needed declaration

       * Thuban/UI/selection.py : typo correction



Revision 2708 - Directory Listing
Modified Sun Sep 24 20:01:23 2006 UTC (18 years, 5 months ago) by bernhard
Original Path: trunk/thuban/Thuban
* Thuban/Model/proj.py(_do_we_have_to_work_around_broken_proj): 
Making the test more robust for observed python 2.3 problems
with setlocale().


Revision 2700 - Directory Listing
Modified Mon Sep 18 14:27:02 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-09-18 Didrik Pinte <dpinte@itae.be>
    
        * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6



Revision 2699 - Directory Listing
Modified Mon Sep 18 13:59:40 2006 UTC (18 years, 5 months ago) by bernhard
Original Path: trunk/thuban/Thuban
Improved documentation.


Revision 2698 - Directory Listing
Modified Mon Sep 18 00:56:26 2006 UTC (18 years, 5 months ago) by bernhard
Original Path: trunk/thuban/Thuban
Fixed behaviour with the proj bug and python >=2.4 
when decimal_point != '.'. So de_DE locales will work fine again.


Revision 2697 - Directory Listing
Modified Mon Sep 18 00:45:37 2006 UTC (18 years, 5 months ago) by bernhard
Original Path: trunk/thuban/Thuban
* Thuban/UI/application.py: Fixed warning dialog when gdal is missing.
* Fixed Changelog a bit.


Revision 2691 - Directory Listing
Modified Thu Aug 31 12:40:30 2006 UTC (18 years, 6 months ago) by bernhard
Original Path: trunk/thuban/Thuban
Thuban/UI/about.py: Added Didrik Pinte as contributor. Extended
	  copyright range to include 2006.


Revision 2689 - Directory Listing
Modified Thu Aug 3 09:57:24 2006 UTC (18 years, 7 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-06-29 Didrik Pinte <dpinte@itae.be>

        * Thuban/UI/main.py: circular import fix.



Revision 2688 - Directory Listing
Modified Fri Jun 30 12:27:20 2006 UTC (18 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
New Classification "Pattern": Classify text attributes by regexp.

Revision 2687 - Directory Listing
Modified Thu Jun 29 13:50:16 2006 UTC (18 years, 8 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-06-29 Didrik Pinte <dpinte@itae.be>

    * Thuban/version.py: Bugfix determination of SQLite, the wright one !



Revision 2685 - Directory Listing
Modified Wed Jun 28 15:34:04 2006 UTC (18 years, 8 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-06-28 Didrik Pinte <dpinte@itae.be>

    * Thuban/version.py: Bugfix determination of SQLite on old and recent
        systems (support pysqlite1 and pysqlite2)



Revision 2684 - Directory Listing
Modified Tue Jun 27 16:11:35 2006 UTC (18 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
Thuban/version.py: Bugfix determination of SQLite on old systems.

Revision 2682 - Directory Listing
Modified Mon May 15 20:11:15 2006 UTC (18 years, 9 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-05-15 Didrik Pinte <dpinte@itae.be>
    Ashamed ... still some tabs in the files

    * Thuban/version.py : tabs removed
    * Thuban/Model/transientdb.py : tabs removed
        


Revision 2681 - Directory Listing
Modified Mon May 15 16:11:46 2006 UTC (18 years, 9 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-05-15 Didrik Pinte <dpinte@itae.be>
  * Thuban/version.py : coding style correction
  * Thuban/Model/transientdb.py : coding style correction
    


Revision 2680 - Directory Listing
Modified Mon May 15 14:36:50 2006 UTC (18 years, 9 months ago) by dpinte
Original Path: trunk/thuban/Thuban
2006-05-15 Didrik Pinte <dpinte@itae.be>
  * Thuban/version.py : Updated imports to support pysqlite2

  * Thuban/Model/transientdb.py : Updated imports to support pysqlite2
    Patched the querying system to support the param style of pysqlite2

--Cette ligne,

M    thuban/Thuban/Model/transientdb.py
M    thuban/Thuban/version.py
M    thuban/ChangeLog


Revision 2677 - Directory Listing
Modified Wed Apr 12 09:35:21 2006 UTC (18 years, 10 months ago) by bernhard
Original Path: trunk/thuban/Thuban
About dialog: Changed thuban_release mechanism to use "svn" instead of "cvs".


Revision 2674 - Directory Listing
Modified Wed Oct 19 08:56:47 2005 UTC (19 years, 4 months ago) by bernhard
Original Path: trunk/thuban/Thuban
* Thuban/UI/about.py: remove unused import of getdefaultlocale.
Added display of internal encoding to the about dialog text.

* Extensions/svgexport/__init__.py: changed version to "1.0.0+cvs".

Started to update the NEWS file.


Revision 2673 - Directory Listing
Modified Wed Oct 19 08:08:29 2005 UTC (19 years, 4 months ago) by bernhard
Original Path: trunk/thuban/Thuban
Preserving the internal encoding for the tests.
This hopefully fixes subsequent tests when runnin all via runtests.py.


Revision 2672 - Directory Listing
Modified Mon Oct 17 21:31:43 2005 UTC (19 years, 4 months ago) by bernhard
Original Path: trunk/thuban/Thuban
* Thuban/__init__.py (set_internal_encoding): added a forwards
and backward translation, so that we fail early if the
internal_encoding is bad.

* test/test_stringrepresentation.py: New file, for now testing
that set_internal_coding() is throwing an exception for bad exceptions.


Revision 2668 - Directory Listing
Modified Thu Aug 18 21:54:25 2005 UTC (19 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
(ScreenRenderer.draw_selection_incrementally): Call the right method
for the default size.


Revision 2659 - Directory Listing
Modified Wed Jul 27 21:51:31 2005 UTC (19 years, 7 months ago) by jan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_layer): Don't write any attributes anymore for
the layer element.
(SessionSaver.write_classification): Even if there is no classification
field, still write the classification because the clnull (default)
symbol will not be defined anymore as part of the layer element.


Revision 2658 - Directory Listing
Modified Wed Jul 27 21:50:30 2005 UTC (19 years, 7 months ago) by jan
Original Path: trunk/thuban/Thuban
(SessionLoader.start_classification): Change attribute 'field' and
'field_type' from obligatory to optional to allow empty classes
(ie.  only with a default=clnull).


Revision 2657 - Directory Listing
Modified Wed Jul 27 21:49:25 2005 UTC (19 years, 7 months ago) by jan
Original Path: trunk/thuban/Thuban
(Classification.TreeItem.build_info): Added output of size.


Revision 2647 - Directory Listing
Modified Tue Jul 5 20:04:35 2005 UTC (19 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
(About.__init__): Extend copyright notice to 2005


Revision 2644 - Directory Listing
Modified Tue Jul 5 16:30:51 2005 UTC (19 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/Model/layer.py (Layer.__mangle_bounding_box)
(Layer.ClipBoundingBox): Rename ClipBoundingBox to
__mangle_bounding_box.  See the comments in the code and RT #2845

* test/test_layer.py (TestLayer.test_arc_layer_with_projection):
Remove the explicit test of ClipBoundingBox.  The method isn't
public anymore and the direct call in the test wasn't necessary in
the first place.  If ClipBoundingBox (now __mangle_bounding_box)
isn't called, the return value of ShapesInRegion will be
different.


Revision 2643 - Directory Listing
Modified Tue Jul 5 16:00:48 2005 UTC (19 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
(ViewPort.set_view_transform): Handle
ZeroDivisionError exceptions.  I don't know when they happen
exactly.  It probably happens when the projections aren't set
properly.


Revision 2642 - Directory Listing
Modified Fri Jul 1 20:49:04 2005 UTC (19 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
First step towards unicode.  With this roughly we're at step 1
string_representation.txt

* Doc/technotes/string_representation.txt: New.  Document how
strings are represented in Thuban and how to get to a Unicode
Thuban.

* Thuban/__init__.py (set_internal_encoding)
(unicode_from_internal, internal_from_unicode): New. The first few
functions for the internal string representation

* Thuban/UI/about.py (unicodeToLocale): Removed.  Use
internal_from_unicode instead.

* Thuban/UI/__init__.py (install_wx_translation): Determine the
encoding to use for the internal string representation.  Also,
change the translation function to return strings in internal
representation even on unicode builds of wxPython

* Thuban/Model/load.py (SessionLoader.check_attrs): Decode
filenames too.
(SessionLoader.start_clrange): Use check_attrs to decode and check
the attributes.

* Thuban/Model/xmlreader.py (XMLReader.encode): Use
internal_from_unicode to convert unicode strings.

* Thuban/Model/xmlwriter.py (XMLWriter.encode): Use
unicode_from_internal when applicable

* test/runtests.py (main): New command line option:
internal-encoding to specify the internal string encoding to use
in the tests.

* test/support.py (initthuban): Set the internal encoding to
latin-1

* test/test_load.py (TestSingleLayer.test, TestClassification.test)
(TestLabelLayer.test): Use the internal string representation when
dealing with non-ascii characters

* test/test_load_1_0.py (TestSingleLayer.test)
(TestClassification.test, TestLabelLayer.test): Use the internal
string representation when dealing with non-ascii characters

* test/test_load_0_9.py (TestSingleLayer.test)
(TestClassification.test): Use the internal string representation
when dealing with non-ascii characters

* test/test_load_0_8.py (TestUnicodeStrings.test): Use the
internal string representation when dealing with non-ascii
characters

* test/test_save.py (XMLWriterTest.testEncode)
(SaveSessionTest.testClassifiedLayer): Use the internal string
representation when dealing with non-ascii characters where
applicable


Revision 2639 - Directory Listing
Modified Thu Jun 30 16:15:03 2005 UTC (19 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
(ScreenRenderer.draw_selection_incrementally):
untabify.


Revision 2635 - Directory Listing
Modified Tue Jun 28 06:48:45 2005 UTC (19 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban
(ScreenRenderer.draw_selection_incrementally):
Use the default size for rendering selected items of default type.
Fixes part 2 of https://intevation.de/rt/webrt?serial_num=3149


Revision 2625 - Directory Listing
Modified Thu May 12 14:54:30 2005 UTC (19 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add missing import, which led to an exception when opening a layer's projection.


Revision 2623 - Directory Listing
Modified Mon May 9 18:12:12 2005 UTC (19 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/Model/postgisdb.py (PostGISConnection.connect): Set the
connection to autoconnect.  Fixes RT#3148.

* test/test_postgis_db.py
(TestPostGISSpecialCases.test_simple_error_handling): New test
that attempts to reproduce RT#3148.


Revision 2618 - Directory Listing
Modified Fri May 6 14:18:31 2005 UTC (19 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_raster_data): Fixed signature to match that in BaseRenderer.
Use the new opacity argument in place of calling layer.Opacity(). In the case
where the format is not 'RAW', alpha_data is None and the loaded image has
alpha information, use the file's alpha information. This is still subject to
the layer's opacity setting.


Revision 2617 - Directory Listing
Modified Fri May 6 14:18:00 2005 UTC (19 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(BaseRenderer.draw_raster_layer): Pass the opacity of the layer to
draw_raster_data rather than the layer.
(BaseRenderer.draw_raster_data): Remove the layer parameter because the
function doesn't need to know about the layer. Add the optional opacity
parameter whose default is 1.0. Add 'PNG' as a supported graphics format.


Revision 2616 - Directory Listing
Modified Fri May 6 14:17:29 2005 UTC (19 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_layer): Added code to save the opacity and mask type of a
layer.


Revision 2615 - Directory Listing
Modified Fri May 6 14:17:03 2005 UTC (19 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionLoader.start_rasterlayer): Added code to read the opacity and mask
type of the layer and construct a new layer with the additional parameters.


Revision 2614 - Directory Listing
Modified Fri May 6 14:16:38 2005 UTC (19 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(RasterLayer): Added opacity and masktype parameters to the constructor, and
set the appropriate variables to those values.


Revision 2606 - Directory Listing
Modified Wed Apr 27 11:05:19 2005 UTC (19 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
Replace ShapefileStore by FileShapeStore.
(SessionSaver.write_data_containers): Only use methods of the
base class FileShapeStore.


Revision 2605 - Directory Listing
Modified Wed Apr 27 11:04:56 2005 UTC (19 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
Various small fixes in doc-strings.
(FileShapeStore): New class.
(ShapefileStore): Derive from FileShapeStore.
(ShapefileStore.__init__): Call __init__ of FileShapeStore,
rename self.table to self._table, initialize self._bbox
(ShapefileStore._open_shapefile): Use self._bbox instead of self.bbox
and self.FileName() instead of self.filename.
(ShapefileStore.Table): Use self._table instead of self.table.
(ShapefileStore.FileName): Removed (moved to FileShapeStore).
(ShapefileStore.BoundingBox):  Use self._bbox instead of self.bbox.


Revision 2602 - Directory Listing
Modified Mon Apr 25 15:01:48 2005 UTC (19 years, 10 months ago) by joey
Original Path: trunk/thuban/Thuban
Added a description according to the CVS log message


Revision 2601 - Directory Listing
Modified Sat Apr 23 16:40:33 2005 UTC (19 years, 10 months ago) by joey
Original Path: trunk/thuban/Thuban
Added a missing import


Revision 2599 - Directory Listing
Modified Wed Apr 13 16:08:33 2005 UTC (19 years, 10 months ago) by russell
Original Path: trunk/thuban/Thuban
Fixing bug #2921, panning with middle button not working without active tool


Revision 2597 - Directory Listing
Modified Thu Apr 7 19:46:29 2005 UTC (19 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
(ClassGrid.__init__): Use -1 as the ID.
(ID_CLASS_TABLE): Removed. It wasn't used anywhere except in
ClassGrid.__init__ and it's value is outside of the valid
range (must be < 32768).  wxPython 2.5 complains about it with an
exception.


Revision 2588 - Directory Listing
Modified Tue Mar 29 18:05:01 2005 UTC (19 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
(BMP_SIZE_W, BMP_SIZE_H): Set both to 16 to
match the site of the legend_icon_layer icon.  Otherwise wxpython
2.5 complains when the legend is created with the error:

PyAssertionError: C++ assertion "(bitmap.GetWidth() == m_width &&
bitmap.GetHeight() == m_height) || (m_width == 0 && m_height == 0)"
failed in ./src/generic/imaglist.cpp(81): invalid bitmap size in
wxImageList: this might work on this platform but definitely won't under
Windows.


Revision 2587 - Directory Listing
Modified Wed Mar 23 15:30:27 2005 UTC (19 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add support for adjusting the opacity of a raster layer.


Revision 2582 - Directory Listing
Modified Thu Mar 10 22:47:14 2005 UTC (19 years, 11 months ago) by jan
Original Path: trunk/thuban/Thuban
(About.__init__): Added status of the extensions to the about text.


Revision 2581 - Directory Listing
Modified Thu Mar 10 22:44:18 2005 UTC (19 years, 11 months ago) by jan
Original Path: trunk/thuban/Thuban
(ThubanApplication.OnInit): Add the initialization of the extensions.
(ThubanApplication.init_extensions): Init all extensions.


Revision 2580 - Directory Listing
Modified Thu Mar 10 22:39:11 2005 UTC (19 years, 11 months ago) by jan
Original Path: trunk/thuban/Thuban
(ExtensionDesc.__init__): Added »···optional parameter init_callback.
ExtensionDesc.init_ext): New. Executes the callback and sets
a status.


Revision 2571 - Directory Listing
Modified Fri Feb 18 14:54:17 2005 UTC (20 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Refactored baserenderer.py and renderer.py to remove baserenderer.py's
dependencies on wxPython. Added a new method projected_raster_layer()
that returns a raster layer image in projected space. This must be
implemented in classes derived from BaseRenderer. This also eliminates
the dependency on gdal in baserenderer.py.


Revision 2569 - Directory Listing
Modified Thu Feb 17 11:02:28 2005 UTC (20 years ago) by jan
Original Path: trunk/thuban/Thuban
Fixed doc-strings to comply with coding_guidelines.


Revision 2564 - Directory Listing
Modified Wed Feb 16 23:14:35 2005 UTC (20 years ago) by jan
Original Path: trunk/thuban/Thuban
(Map, Map.Destroy, Map.RemoveLayer, Map.ClearLayers,
Map.Layers, Map.HasLayers, Map.MoveLayerToTop,
Map.RaiseLayer, Map.LowerLayer, Map.MoveLayerToBottom,
Map.ProjectedBoundingBox, Map.GetProjection): Improved/added
doc string.
(Map.BoundingBox): Removed superfluous test for label_layer
and improved doc string.
(Map.TreeInfo): Added label_layer and improved sdo string.


Revision 2563 - Directory Listing
Modified Wed Feb 16 23:13:19 2005 UTC (20 years ago) by jan
Original Path: trunk/thuban/Thuban
Added import of _.
(Label, Label.__init__): Improved/added doc string.
LabelLayer, LabelLayer.__init__, LabelLayer.Labels,
LabelLayer.RemoveLabel, LabelLayer.ClearLabels):
Improved/added doc string.
(LabelLayer.AddLabel): Use already defined names for
align strings and improved doc string.
(LabelLayer.TreeInfo): New. Return the object data for
the tree view.


Revision 2562 - Directory Listing
Modified Wed Feb 16 21:14:47 2005 UTC (20 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Further wxPython 2.5 changes using patches from Daniel Calvelo Aros
so that that wxproj doesn't crash. Added GUI support for selecting
alpha channel (opacity can't be selected yet).


Revision 2561 - Directory Listing
Modified Tue Feb 8 20:34:29 2005 UTC (20 years ago) by bh
Original Path: trunk/thuban/Thuban
More wxPython 2.5 changes.  This time taken from a patch from
Daniel Calvelo Aros.

* Thuban/UI/tableview.py (QueryTableFrame.__init__)
(QueryTableFrame.__init__): Pass the size of a spacer as a single
item.

* Thuban/UI/projdialog.py (ProjFrame.build_dialog)
(ProjFrame.build_dialog): Pass the size of a spacer as a single
item.

* Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Pass the
size of a spacer as a single item.

* Thuban/UI/classifier.py (Classifier.dialog_layout): Pass the
size of a spacer as a single item.


Revision 2560 - Directory Listing
Modified Tue Feb 8 20:25:22 2005 UTC (20 years ago) by bh
Original Path: trunk/thuban/Thuban
Compatibility with wxPython 2.5.  The changes should make it work
better with 2.5 while still keeping compatibility with 2.4.  There
are still problems with 2.5, though.

* Thuban/UI/dock.py (DockableWindow.__CreateBorder): Pass the size
of a spacer as a single item.

* Thuban/UI/classifier.py (ClassGroupPropertiesCtrl): Derive only
from wxControl

* Thuban/UI/legend.py (LegendTree): When running with wxPython <
2.5, add an implementation of the GetFirstChild method that does
not require the second parameter.
(LegendTree.find_layer, LegendTree._OnMsgMapLayersAdded)
(LegendTree._OnMsgMapLayersRemoved, LegendTree.DeleteAllItems)
(LegendTree.DeleteChildren, LegendTree.__ShowHideLayer): Do not
pass the second parameter to GetFirstChild


Revision 2556 - Directory Listing
Modified Mon Feb 7 13:46:53 2005 UTC (20 years ago) by bernhard
Original Path: trunk/thuban/Thuban
	* Thuban/UI/classifier.py (ClassGrid.DeleteSelectedRows):
	Enable translation for message string.


Revision 2552 - Directory Listing
Modified Fri Jan 28 15:54:00 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Make layer's use_mask flag default to true. Support a bit array describing
the mask to use. Improve error handling in ProjectRasterFile (also addresses
RT #2947).


Revision 2551 - Directory Listing
Modified Thu Jan 27 14:19:41 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Add a new dialog box for raster layers. The dialog box allows
the user to toggle a mask that is generated by ProjectRasterFile
and is used to only draw the real parts of the projected image.


Revision 2544 - Directory Listing
Modified Mon Jan 24 11:19:53 2005 UTC (20 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
Rework the status bar updates a bit to make sure the message about
the projections is produced at the right times.

* Thuban/UI/mainwindow.py (MainWindow.update_status_bar_messages):
New class variable with messages that may require a status bar
update.
(MainWindow.view_position_changed)
(MainWindow.update_status_bar): Rename from view_position_changed
to update_status_bar.  It's meaning has changed now that it may
also generate messages about problems with projection settings.
(MainWindow.__init__): Use the new update_status_bar_messages
class variable to subscribe update_status_bar
(MainWindow.set_position_text): Update doc-string.  This method
has to be renamed at some point.  See doc-string and comments.
(MainWindow.OnClose): Unsubscribe update_status_bar from all
messages in update_status_bar_messages

* Thuban/UI/viewport.py (ViewPort.forwarded_map_messages): New
class attribute.  map messages to be forwarded by the viewport.
(ViewPort._subscribe_map, ViewPort._unsubscribe_map): (un)subscribe
the messages in forwarded_map_messages


Revision 2537 - Directory Listing
Modified Fri Jan 21 14:01:25 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Improved rendering raster layers by changing the return format of
the ProjectRasterFile function.


Revision 2534 - Directory Listing
Modified Fri Jan 21 08:31:16 2005 UTC (20 years, 1 month ago) by jan
Original Path: trunk/thuban/Thuban
(view_position_changed): Made string available for i18n.


Revision 2531 - Directory Listing
Modified Thu Jan 20 18:47:26 2005 UTC (20 years, 1 month ago) by bernhard
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py(view_position_changed): Added docstring
	and comment that the warning code here is a hack.


Revision 2529 - Directory Listing
Modified Thu Jan 20 17:55:23 2005 UTC (20 years, 1 month ago) by russell
Original Path: trunk/thuban/Thuban
Warn user about misprojected layers when their lat/lon bounding
box exceeds rational lat/lon values.


Revision 2528 - Directory Listing
Modified Thu Jan 20 13:14:14 2005 UTC (20 years, 1 month ago) by bernhard
Original Path: trunk/thuban/Thuban
	* Thuban/UI/about.py (unicodeToLocale()): Improved:
	Use 'ascii' and then 'replace' for other characters
	when getdefaultlocale returns None. Thanks to Bernhard H. .


Revision 2527 - Directory Listing
Modified Thu Jan 20 11:45:15 2005 UTC (20 years, 1 month ago) by bernhard
Original Path: trunk/thuban/Thuban
	* Thuban/UI/classgen.py (OnRetrieve()): Added a comment
	that OnRangeText might be called twice and using None as argument.


Revision 2526 - Directory Listing
Modified Thu Jan 20 11:30:52 2005 UTC (20 years, 1 month ago) by bernhard
Original Path: trunk/thuban/Thuban
	* Thuban/UI/classgen.py (OnRetrieve()): Add a OnRangeText(0)
	to work around a different in wx Behaviour noticed on MacOSX,
	thanks to Lorenzo Moretti and Daniel Calvelo for the fix.


Revision 2525 - Directory Listing
Modified Thu Jan 20 10:00:34 2005 UTC (20 years, 1 month ago) by bernhard
Original Path: trunk/thuban/Thuban
	* Thuban/UiI/about.py: take iso-8859-15 when getdefaultlocale returns
	None. (Fixes rt#2910.)


Revision 2520 - Directory Listing
Modified Tue Jan 11 16:52:40 2005 UTC (20 years, 1 month ago) by frank
Original Path: trunk/thuban/Thuban
* Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer):
	Fix indention bug.


Revision 2516 - Directory Listing
Modified Sun Jan 9 12:32:17 2005 UTC (20 years, 1 month ago) by frank
Original Path: trunk/thuban/Thuban
BugFix 2901: Explicitly copy layers ClassificationColumn since it
is not part of the layers Classification.


Revision 2514 - Directory Listing
Modified Mon Jan 3 16:21:17 2005 UTC (20 years, 2 months ago) by frank
Original Path: trunk/thuban/Thuban
Thuban/UI/renderer.py (ScreenRendererdraw_selection_incrementally):
    BugFix 2883: Former implementation only worked on classified point layers:
    KeyError was raised, now use the default size if field is None.


Revision 2511 - Directory Listing
Modified Mon Dec 27 16:31:32 2004 UTC (20 years, 2 months ago) by russell
Original Path: trunk/thuban/Thuban
The middle button now pans the map view.


Revision 2505 - Directory Listing
Modified Thu Dec 23 15:10:41 2004 UTC (20 years, 2 months ago) by jan
Original Path: trunk/thuban/Thuban
(ProjFrame.load_user_proj): Added a
\n to stderr after the warnings. Thanks to Russell Nelson.


Revision 2478 - Directory Listing
Modified Fri Dec 17 18:48:49 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/UI/about.py (unicodeToLocale): Use getdefaultlocale
instead of getlocale because getlocale doesn't return a usable
encoding name on a german windows 2000

* 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.


Revision 2472 - Directory Listing
Modified Thu Dec 16 15:18:57 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 2470 - Directory Listing
Modified Thu Dec 16 11:00:10 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
Fix for RT#2237

(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.


Revision 2462 - Directory Listing
Modified Wed Dec 15 16:42:56 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 2454 - Directory Listing
Modified Mon Dec 13 18:26:11 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 2451 - Directory Listing
Modified Mon Dec 13 17:51:11 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
* test/test_load.py (TestAltPath.test_01_single_path_error_fix)
(TestAltPath.test_02_path_error_fix_from_list)
(TestAltPath.test_05_path_error_fix_from_list_changed)
(TestAltPath.test_06_path_error_fix_from_list_fails): self.session
is destroyed in tearDown, so there's no need to do it in a test
case.

* Thuban/Model/load.py (SessionLoader.open_shapefile): Remove a
debug print


Revision 2449 - Directory Listing
Modified Mon Dec 13 13:37:40 2004 UTC (20 years, 2 months ago) by frank
Original Path: trunk/thuban/Thuban
Updated docstring for SessionLoader.open_shapefile


Revision 2446 - Directory Listing
Modified Mon Dec 13 11:52:34 2004 UTC (20 years, 2 months ago) by frank
Original Path: trunk/thuban/Thuban
Alternative Path feature:
	* test/test_load.py (TestAltPath): New, tests for alternative path feature
	in load_session()
	(Shapefile_CallBack): Helper, implements controllable callback.

	* Thuban/UI/application.py (ThubanApplication.OnInit):
	Added "alt_path" to self.path
	(ThubanApplication.OpenSession): Added shapefile_callback as second
	callback similar to db_connection_callback.
	(ThubanApplication.run_alt_path_dialog): New, implementaion of
	shapefile_callback. In addition to raising the dialog the control of
	self.path('alt_path') is implemented here.

	* Thuban/Model/load.py (SessionLoader.__init__): Added shapefile_callback.
	(SessionLoader.open_shapefile): Open shapefile, eventually with
	alternative path. This wrapps the "theSession.OpenShapefile(filename)"
	formerly used in start_fileshapesource()/start_layer().
	(SessionLoader.start_fileshapesource): Call open_shapefile().
	(SessionLoader.start_layer): Call open_shapefile().
	(load_session): Added shapefile_callback.

	* Thuban/UI/altpathdialog.py: New, implements dialogs for alternative path
	feature (search / check).


Revision 2441 - Directory Listing
Modified Thu Dec 9 10:50:34 2004 UTC (20 years, 2 months ago) by joey
Original Path: trunk/thuban/Thuban
Added missing character encoding so that Python doesn't barf upon
evaluating this file


Revision 2431 - Directory Listing
Modified Sun Dec 5 15:05:02 2004 UTC (20 years, 3 months ago) by joey
Original Path: trunk/thuban/Thuban
Added PNG, TIFF and GIF as supported bitmap image formats (helpful
for the WMS extension)


Revision 2428 - Directory Listing
Modified Sat Nov 27 21:40:01 2004 UTC (20 years, 3 months ago) by jan
Original Path: trunk/thuban/Thuban
(About.__init__): Added Norbert Solymosi for hungarian translation and
Ole Rahn as contrbutor. Moved Bernhard Reiter from Contributor
to Developer.


Revision 2413 - Directory Listing
Modified Mon Nov 22 11:16:35 2004 UTC (20 years, 3 months ago) by bernhard
Original Path: trunk/thuban/Thuban
* Thuban/Model/base.py (UnsetModified):
Fixed some typos in docstring.

* Thuban/UI/baserenderer.py (BaseRenderer.draw_polygon_shape()):
Added hints on the used algorithm for handling holes.


Revision 2396 - Directory Listing
Modified Thu Nov 18 20:17:43 2004 UTC (20 years, 3 months ago) by jan
Original Path: trunk/thuban/Thuban
(ViewPort._hit_point): Added optional parameter
size' defaulting to the previously fixed value 5.
Extended doc-string.
(Viewport._find_shape_in_layer): Resolved FIXME regarding flexibility
for symbols.
Now the size of the largest point symbol is determined to find out
about whether the point has been hit.
This fixes the problem that only clicks inside a fixed distance of
5 where found.


Revision 2394 - Directory Listing
Modified Wed Nov 17 22:02:29 2004 UTC (20 years, 3 months ago) by jan
Original Path: trunk/thuban/Thuban
(ScreenRenderer.draw_selection_incrementally):
Added consideration of the specific size of point symbols.
The property for each point symbol is retrieved and the size applied
for the rendering method.
Added doc-string.


Revision 2386 - Directory Listing
Modified Thu Oct 7 14:43:45 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(ID_SELPROP_SPINCTRL): Renamed to ID_SELPROP_SPINCTRL_LINEWIDTH.
(ID_SELPROP_SPINCTRL_LINEWIDTH): New Id replaces ID_SELPROP_SPINCTRL.
(ID_SELPROP_SPINCTRL_SIZE): New Id.
(SelectPropertiesDialog.__init__): Added a second spin control
for the size in case the corresponding layer is of point type.
(SelectPropertiesDialog._OnSpin): Renamed to _OnSpinLineWidth.
(SelectPropertiesDialog._OnSpinLineWidth): New. Former _OnSpin.
(SelectPropertiesDialog._OnSpinSize): New. Set size of property
and refresh preview.


Revision 2385 - Directory Listing
Modified Thu Oct 7 14:28:51 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(CustomRamp.GetProperties): Added size gradient.


Revision 2384 - Directory Listing
Modified Thu Oct 7 14:24:24 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
put Id and Source to the usual place


Revision 2383 - Directory Listing
Modified Thu Oct 7 14:19:48 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_classification): Write attribute 'size' for cldata
when the shape layer is of point type. This also now make the
test_load.py tests happy.


Revision 2377 - Directory Listing
Modified Sun Oct 3 21:45:48 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(BaseRenderer.draw_shape_layer_incrementally): If the draw function
is for points, call it with the size as additional parameter.
BaseRenderer.draw_point_shape): Added additional, optional parameter for
the size. Compute the radius using the size.


Revision 2376 - Directory Listing
Modified Sun Oct 3 21:23:25 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(ClassDataPreviewer.Draw): Added doc-string.
Also, now there is a return value that indicates whether the drawing
size exceeded the given rect extent and if so the new extent.
Finally, point objects are drawn depending on the size. If either
the width or height is exceeded, the new extent is returned.
(ClassRenderer.Draw): Now when calling the previewer drawing function,
evaluate the return value and, if not None, adapt the grid widget size
accordingly and redraw again.


Revision 2375 - Directory Listing
Modified Sun Oct 3 21:05:30 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(SessionLoader.start_cldata): Also parse the size attribute.


Revision 2374 - Directory Listing
Modified Sun Oct 3 21:01:31 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
Removed some trailing whitespaces.
(ClassGroupProperties.__init__): Set default size.
(ClassGroupProperties.SetProperties): Set the size.
(ClassGroupProperties.GetSize): New. Return the size.
(ClassGroupProperties.SetSize): New. Set the size.
(ClassGroupProperties__eq__): Compare also size.
(ClassGroupProperties__repr__): Print also size.


Revision 2366 - Directory Listing
Modified Fri Oct 1 18:24:10 2004 UTC (20 years, 5 months ago) by joey
Original Path: trunk/thuban/Thuban
Register properties dialog classes for both provided layer classes/types


Revision 2365 - Directory Listing
Modified Fri Oct 1 18:22:32 2004 UTC (20 years, 5 months ago) by joey
Original Path: trunk/thuban/Thuban
Utilise the new ClassMapper for global registration of properties
dialog classes (which are indeed layer-specific).


Revision 2364 - Directory Listing
Modified Fri Oct 1 18:18:49 2004 UTC (20 years, 5 months ago) by joey
Original Path: trunk/thuban/Thuban
Move the logic for checking whether a dialog is already opened (and
raising it to the users attention) and creating a new dialog into a
function of its own


Revision 2363 - Directory Listing
Modified Fri Oct 1 18:07:14 2004 UTC (20 years, 5 months ago) by joey
Original Path: trunk/thuban/Thuban
The map can be retrieved through the parent which is passed to the
constructor anyway and doesn't require an argument of its own,
required for the unification of arguments for general use through
properties-dialog selector.


Revision 2362 - Directory Listing
Modified Fri Oct 1 18:00:42 2004 UTC (20 years, 5 months ago) by joey
Original Path: trunk/thuban/Thuban
Unify arguments for general use through properties-dialog selector,
the map can be retrieved through the parent and doesn't require an
argument of its own.


Revision 2355 - Directory Listing
Modified Tue Sep 28 19:20:35 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(Extension): Improved doc-string.


Revision 2354 - Directory Listing
Modified Tue Sep 28 19:17:14 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(About.__init__): Added description
of the registered extensions with all of the information.


Revision 2353 - Directory Listing
Modified Tue Sep 28 19:13:21 2004 UTC (20 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
This module defines a registry for Extensions.


Revision 2343 - Directory Listing
Modified Mon Sep 20 08:13:32 2004 UTC (20 years, 5 months ago) by bernhard
Original Path: trunk/thuban/Thuban
Fixed typos in docstrings.


Revision 2339 - Directory Listing
Modified Fri Aug 20 16:59:21 2004 UTC (20 years, 6 months ago) by silke
Original Path: trunk/thuban/Thuban
Fix bug in projection handling of layers


Revision 2338 - Directory Listing
Modified Fri Aug 20 16:50:22 2004 UTC (20 years, 6 months ago) by silke
Original Path: trunk/thuban/Thuban
Changes to be consistent with coding style


Revision 2335 - Directory Listing
Modified Wed Aug 11 08:09:44 2004 UTC (20 years, 6 months ago) by silke
Original Path: trunk/thuban/Thuban
Small changes to encoding related stuff to avoid too many and too enhanced
imports of locale


Revision 2334 - Directory Listing
Modified Tue Aug 10 19:58:50 2004 UTC (20 years, 6 months ago) by silke
Original Path: trunk/thuban/Thuban
Fixed encoding problem of about dialog: Added function unicodeToLocale() to
convert special characters to users locale encoding


Revision 2299 - Directory Listing
Modified Mon Jul 26 16:08:07 2004 UTC (20 years, 7 months ago) by joey
Original Path: trunk/thuban/Thuban
Added the new ClassMapper


Revision 2297 - Directory Listing
Modified Thu Jul 22 13:07:52 2004 UTC (20 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/UI/viewport.py (ViewPort.VisibleExtent): New.  Return the
visible extent of the map in projected coordinates

* test/test_viewport.py (SimpleViewPortTest.test_default_size)
(SimpleViewPortTest.test_init_with_size): Add some VisibleExtent()
tests.
(SimpleViewPortTest.test_visible_extent): New. The real test for
VisibleExtent()


Revision 2289 - Directory Listing
Modified Fri Jul 16 19:47:29 2004 UTC (20 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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

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


Revision 2278 - Directory Listing
Modified Tue Jul 13 11:07:45 2004 UTC (20 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(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 The a
strange messages about not being able to draw Layer instances for
all vector layers below a raster layer which would be invisible
anyway because the raster layer currently always covers the entire
window


Revision 2239 - Directory Listing
Modified Mon Jun 14 10:15:03 2004 UTC (20 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
(__version__): 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.


Revision 2228 - Directory Listing
Modified Thu Jun 3 15:17:54 2004 UTC (20 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 2224 - Directory Listing
Modified Fri May 28 17:29:30 2004 UTC (20 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
Fix some typos.


Revision 2202 - Directory Listing
Modified Tue May 11 21:39:39 2004 UTC (20 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(Menu.FindOrInsertMenu): New. Find a given menu or, if not found,
insert it.


Revision 2200 - Directory Listing
Modified Fri May 7 20:20:43 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
(SelectPropertiesDialog.__GetColor): Now calls the abstract ColorDialog
instead of wxColourDialog.  This also removed the dependency to Color
class conversion from this function.


Revision 2199 - Directory Listing
Modified Fri May 7 20:12:16 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
Abstraction for color selection dialog(s).


Revision 2198 - Directory Listing
Modified Fri May 7 20:02:19 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
Removed. It is has been replaced by projdialog for quite a while
and is not used anymore.


Revision 2191 - Directory Listing
Modified Thu Apr 22 15:45:01 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
(GenUniquePanel.__init__): Fixed two strings to be i18n now.


Revision 2187 - Directory Listing
Modified Sun Apr 18 20:37:45 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
ID_POP_xxx: removed.
(LegendPanel.__init__): Removed EVT_MENU bindings.
(LegendTree._OnRightClick): Replace direct creation of
menu via wx Classes by applying the menu definition
as of Menu class of menu.py.


Revision 2186 - Directory Listing
Modified Sun Apr 18 20:37:01 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
New method commands: layer_to_top, layer_to_bottom, layer_visibility
(MainWindow.LayerToTop): New. Put current layer to the top.
(MainWindow.LayerToBottom): New. Put current layer to bottom.
(MainWindow.HideLayer, MainWindow.ShowLayer, _has_visible_map):
Replace 1,0 by True, False.
(MainWindow.ToggleLayerVisibility): New. Toggle visibility of
current layer.
(MainWindow.LayerShowTable): Removed raising of dialog.
(_has_selected_layer_visible): New. Support function.


Revision 2184 - Directory Listing
Modified Fri Apr 16 08:21:12 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
(MainWindow.LayerShowTable): Added docstring. Now for layers without a
ShapeStore a corresponding message is given to the user, that this
layer has no table to show.


Revision 2183 - Directory Listing
Modified Fri Apr 16 07:57:13 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
(ExceptionDialog.dialog_layout): Improved button string to stronger
clearify that Thuban will be closed when hitting the button.


Revision 2163 - Directory Listing
Modified Tue Apr 13 10:10:34 2004 UTC (20 years, 10 months ago) by joey
Original Path: trunk/thuban/Thuban
Raise the ShowTable() dialog/frame when the user attempts to display
it while it has been opened before already and not closed again.


Revision 2140 - Directory Listing
Modified Fri Mar 26 18:15:35 2004 UTC (20 years, 11 months ago) by bernhard
Original Path: trunk/thuban/Thuban
* Thuban/UI/about.py: Extended copyright to 2004 and added
information about the thuban-devel mailinglist.
* ChangeLog: Added changes.


Revision 2106 - Directory Listing
Modified Fri Mar 12 12:59:33 2004 UTC (20 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
Support views in addition to normal tables in the postgis shapestore

* Thuban/Model/postgisdb.py
(PostGISShapeStore._fetch_table_information): Add a fallback for
the case where the table name is not in the geometry_columns
table.  This is usually the case for views.  Also, set
self.shapestore here.
(PostGISShapeStore.ShapeType): No need to query the database all
the time.  The shape type is now determined in
_fetch_table_information

* test/postgissupport.py (PostgreSQLServer.new_postgis_db)
(PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
New parameter to specify views.
(PostGISDatabase.has_data): Also compare the views.  New views
parameter
(PostGISDatabase.initdb): Create the views.
(PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
view

* test/test_postgis_db.py
(TestPostGISShapestorePointFromViews): New.  Test a
PostGISShapeStore with a view
(TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
the geometry_column explicitly to test whether that works


Revision 2104 - Directory Listing
Modified Fri Mar 12 12:19:15 2004 UTC (20 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
Final step for explicit id/geometry columns: Loading and saving

* Resources/XML/thuban-1.1.dtd: New.  Derived from thuban-1.0.dtd
with the following changes:
(dbshapesource): Two new attributes id_column and geometry_column

* Thuban/Model/save.py (SessionSaver.write): Use the new dtd
(SessionSaver.write_session): Use the new namespace
(SessionSaver.write_data_containers): Write the new dbshapesource
parameters

* Thuban/Model/load.py (SessionLoader.__init__): New namespace for
the new file format version
(SessionLoader.start_dbshapesource): Handle the new db parameters

* test/test_save.py: Update to the new dtd and namespace
(SaveSessionTest.test_save_postgis): Update the NonConnectionStore
mock object to provide a working IDColumn method.

* test/test_load_1_0.py: New.  Copy of the test_load.py before
today's changes but with the round-trip tests removed.

* test/test_load_0_9.py: Update doc-string.

* test/test_load.py: Update all .thuban files to the new dtd and
namespace.
(TestPostGISLayer.file_contents): Add the new dbshapesource
paramters


Revision 2102 - Directory Listing
Modified Thu Mar 11 21:04:30 2004 UTC (20 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
the dialog is constructed. Add combo boxes to select id and
geometry column.  Rename some instance variables.
(ChooseDBTableDialog.GetTable): Return id and geometry column
names
(ChooseDBTableDialog.OnTableSelect): New. Event handler for
selections in the table list

* Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
and geometry_column

* Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
parameters for id_column and geometry column of PostGISShapeStore
here as well.

* Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
(_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
(PostGISConnection.GeometryTables): Use a better query to
determine which relations in the database might be usable for
shapestores.  Now supports views as well but is more PostgreSQL
specific
(PostGISConnection.table_columns): New. Somewhat experimental
method to let the db dialogs provide lists of columns to users so
that they can select id and geometry columns.
(PostGISTable.__init__): The default value of the id_column
parameter is now None it still means "gid" effectively, though.
(PostGISTable.IDColumn): New introspection method to return a
column object for the id column
(PostGISShapeStore.GeometryColumn): New introspection method to
return a column object for the geometry column

* test/test_postgis_db.py
(TestPostGISConnection.test_gis_tables_non_empty):
Removed. Subsumed by the new:
(TestPostGISConnection.test_gis_tables_with_views_and_tables):
New. Tes the GeometryTables and table_columns methods with actual
tables and views.
(PointTests.test_id_column, PointTests.test_geometry_column):
New. tests for the new methods.
(TestPostGISShapestorePoint.setUp)
(TestPostGISShapestorePointSRID.setUp)
(TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
instance variables needed by the new tests


Revision 2101 - Directory Listing
Modified Thu Mar 11 20:50:43 2004 UTC (20 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
fix syntax error.  I should have tested this :(


Revision 2099 - Directory Listing
Modified Thu Mar 11 20:45:03 2004 UTC (20 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
(GenQuantilesPanel.GetList): The row
numbers given to ReadValue are ordinals.


Revision 2096 - Directory Listing
Modified Thu Mar 11 13:50:53 2004 UTC (20 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
id_column to specify which column to use to identify rows.  Also
new instance variables id_column and quoted_id_column
(PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
(PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
(PostGISTable.SimpleQuery): Use the id column name provided to the
constructor instead of "gid"
(PostGISShapeStore.__init__): New parameter id_column analogously
to PostGISTable.__init__.  This parameter is simply passed through
to the base class constructor
(PostGISShapeStore._create_col_from_description): Fix typo in
doc-string
(PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
(PostGISShapeStore.ShapesInRegion): Use the id column name
provided to the constructor instead of "gid"

* test/postgissupport.py
(PostgreSQLServer.get_default_static_data_db): New static table
landmarks_point_id with an id column != "gid.  Update the comments
a bit.
(skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
doc-
(upload_shapefile): New parameter gid_column to use a name other
than "gid" for the column to store the shape ids

* test/test_postgis_db.py (TableTests): New.  Mixin-class
containing all tests previously in TestPostGISTable.  The actual
tests are the same but the code is a bit more configurable to
allow for different id columns etc.
(TestPostGISTable): Derive from TableTests now for the actual
tests.
(TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
except that it the landmarks_point_id table to test the id_column
parameter
(PointTests): Extend the doc-string
(TestPostGISShapestorePointExplicitGIDColumn)
(TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
from PointTests to test the explicit id_column parameter.  One
tests with the name of the column holding the shape ids, the other
uses PostgreSQL's OID column.  For the latter a number of methods
have to be overwritten to make them independent of the actual id
values.


Revision 2088 - Directory Listing
Modified Wed Feb 25 10:33:24 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 2076 - Directory Listing
Modified Thu Feb 19 15:19:39 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 2072 - Directory Listing
Modified Tue Feb 17 13:14:49 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 2068 - Directory Listing
Modified Mon Feb 16 19:42:04 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
(MapCanvas.Export): Remove accidentally added
line


Revision 2066 - Directory Listing
Modified Mon Feb 16 19:39:28 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
(MapCanvas.Export): Avoid UnboundLocalError.


Revision 2061 - Directory Listing
Modified Fri Feb 13 10:46:44 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.AddDBLayer): When the layer
can't be created, return immediately after displaying the error
message.


Revision 2059 - Directory Listing
Modified Wed Feb 11 09:05:40 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 2057 - Directory Listing
Modified Tue Feb 10 15:51:57 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 2053 - Directory Listing
Modified Tue Feb 3 19:12:03 2004 UTC (21 years, 1 month ago) by frank
Original Path: trunk/thuban/Thuban
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.


Revision 2051 - Directory Listing
Modified Wed Jan 21 17:09:15 2004 UTC (21 years, 1 month ago) by frank
Original Path: trunk/thuban/Thuban
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.


Revision 2040 - Directory Listing
Modified Tue Dec 23 11:37:04 2003 UTC (21 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 2036 - Directory Listing
Modified Mon Dec 22 17:49:43 2003 UTC (21 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 2034 - Directory Listing
Modified Mon Dec 22 16:35:16 2003 UTC (21 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 2032 - Directory Listing
Modified Mon Dec 22 14:54:47 2003 UTC (21 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 2022 - Directory Listing
Modified Fri Dec 5 13:36:10 2003 UTC (21 years, 3 months ago) by frank
Original Path: trunk/thuban/Thuban
Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
	write warning to stderr instead of rising a warning dialog


Revision 2019 - Directory Listing
Modified Wed Dec 3 18:56:23 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 2017 - Directory Listing
Modified Wed Dec 3 18:43:03 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.Unsubscribe): Deal with
publishers that are wx objects and may have been destroyed by wx
already. Fixes RT #2242.


Revision 2011 - Directory Listing
Modified Wed Dec 3 09:46:27 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 2004 - Directory Listing
Modified Tue Dec 2 13:25:55 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1995 - Directory Listing
Modified Mon Dec 1 16:09:10 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.AddLayer): Change the wild
cards for the dialog so that shapefiles ending in all uppercase
SHP are listed too


Revision 1993 - Directory Listing
Modified Fri Nov 28 16:43:48 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(longversion): Update to 1.0rc1


Revision 1989 - Directory Listing
Modified Fri Nov 28 12:00:54 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1985 - Directory Listing
Modified Thu Nov 27 16:04:42 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(ViewPort.map_projection_changed): Use
InverseBBox to unproject bboxes


Revision 1983 - Directory Listing
Modified Thu Nov 27 15:57:23 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1982 - Directory Listing
Modified Thu Nov 27 15:25:34 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1980 - Directory Listing
Modified Tue Nov 25 15:59:18 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(About.__init__): Make sure we have ASCII
source code.


Revision 1978 - Directory Listing
Modified Tue Nov 25 14:30:34 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(Layer.__getattr__): Removed. It was only
there for backwards compatibility and all code relying on that
should have been updated by now.


Revision 1972 - Directory Listing
Modified Mon Nov 24 19:23:08 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(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. :-)


Revision 1970 - Directory Listing
Modified Mon Nov 24 18:36:00 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1968 - Directory Listing
Modified Fri Nov 21 14:33:27 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 1964 - Directory Listing
Modified Wed Nov 19 19:48:47 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1961 - Directory Listing
Modified Wed Nov 19 15:46:03 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1956 - Directory Listing
Modified Tue Nov 18 15:37:38 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1955 - Directory Listing
Modified Tue Nov 18 15:37:31 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(PostGISConnection.MatchesParameters):
New. Test whether the connection matches a set of connection
parameters


Revision 1952 - Directory Listing
Modified Tue Nov 18 13:18:32 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(Publisher): Introdcue 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.


Revision 1950 - Directory Listing
Modified Fri Nov 14 16:39:36 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(IdentifyView.selected_shape): Fix typo in doc-string


Revision 1946 - Directory Listing
Modified Thu Nov 13 18:56:41 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
Quote table and column names properly for postgis.

(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


Revision 1941 - Directory Listing
Modified Tue Nov 11 18:27:48 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1940 - Directory Listing
Modified Tue Nov 11 18:27:39 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(EPSG_DEPRECATED_PROJ_FILE): New.
Constant for the file woth deprecated epsg projections
(get_system_proj_file): Update doc-string


Revision 1937 - Directory Listing
Modified Tue Nov 11 18:16:42 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
Avoid warnings when run under Python 2.3

(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.


Revision 1936 - Directory Listing
Modified Tue Nov 11 18:16:29 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
Avoid warnings when run under Python 2.3

(Color2wxColour): The color values must be
ints. Also, remove the unnecessary asserts.


Revision 1935 - Directory Listing
Modified Tue Nov 11 18:16:20 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
Avoid warnings when run under Python 2.3

(BaseRenderer.draw_point_shape)
(BaseRenderer.draw_label_layer): Coordinates must be ints.


Revision 1933 - Directory Listing
Modified Tue Nov 11 16:37:53 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1930 - Directory Listing
Modified Tue Nov 11 13:24:41 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(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)


Revision 1927 - Directory Listing
Modified Mon Nov 10 16:57:35 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1926 - Directory Listing
Modified Mon Nov 10 16:57:19 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1923 - Directory Listing
Modified Fri Nov 7 12:07:01 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
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.

(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


Revision 1921 - Directory Listing
Modified Mon Nov 3 18:42:27 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(ShapefileStore.ShapesInRegion): Bind some
globals to locals so that it's a bit faster


Revision 1919 - Directory Listing
Modified Mon Nov 3 17:33:36 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(DBFTable.ReadValue): Use the new
read_attribute method of the dbf objects


Revision 1918 - Directory Listing
Modified Mon Nov 3 17:33:19 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1914 - Directory Listing
Modified Mon Nov 3 14:17:51 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
brushes for the groups so that they're not created over and over
again


Revision 1912 - Directory Listing
Modified Mon Nov 3 13:55:41 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1909 - Directory Listing
Modified Fri Oct 31 18:16:34 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1895 - Directory Listing
Modified Fri Oct 31 10:13:32 2003 UTC (21 years, 4 months ago) by frank
Original Path: trunk/thuban/Thuban
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.


Revision 1892 - Directory Listing
Modified Thu Oct 30 18:16:53 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1891 - Directory Listing
Modified Thu Oct 30 18:16:39 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(ThubanFrame.__init__): Handle
EVT_WINDOW_DESTROY
(ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
nothing but is convenient for the derived classes.


Revision 1890 - Directory Listing
Modified Thu Oct 30 16:20:41 2003 UTC (21 years, 4 months ago) by frank
Original Path: trunk/thuban/Thuban
Thuban/UI/join.py (JoinDialog.OnJoin):
	Wrapped the major parts of the join process in a ThubanBeginBusyCursor,
	ThubanEndBusyCursor frame.


Revision 1887 - Directory Listing
Modified Thu Oct 30 09:26:32 2003 UTC (21 years, 4 months ago) by jan
Original Path: trunk/thuban/Thuban
Replaced string split function by corresponding use of the
string class method.


Revision 1886 - Directory Listing
Modified Thu Oct 30 09:21:54 2003 UTC (21 years, 4 months ago) by jan
Original Path: trunk/thuban/Thuban
Replaced string replace function by corresponding string method.


Revision 1885 - Directory Listing
Modified Thu Oct 30 09:20:15 2003 UTC (21 years, 4 months ago) by jan
Original Path: trunk/thuban/Thuban
Relaced string split function by corresponding
use of the string class method.


Revision 1879 - Directory Listing
Modified Wed Oct 29 17:43:40 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(BaseRenderer.draw_shape_layer_incrementally): Speed up the
special case of a classification that only has the default group


Revision 1874 - Directory Listing
Modified Mon Oct 27 17:36:49 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(ThubanApplication.ShowExceptionDialog): Handle translation of the
dialog message properly


Revision 1871 - Directory Listing
Modified Mon Oct 27 17:11:06 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1866 - Directory Listing
Modified Mon Oct 27 13:01:58 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1861 - Directory Listing
Modified Fri Oct 24 16:03:03 2003 UTC (21 years, 4 months ago) by jan
Original Path: trunk/thuban/Thuban
(ProjFrame.__init__): Added 'longlat' as alias for 'latlong'.


Revision 1860 - Directory Listing
Modified Fri Oct 24 16:01:39 2003 UTC (21 years, 4 months ago) by jan
Original Path: trunk/thuban/Thuban
(Projection.GetProjectedUnits): Added 'longlat' as alias for 'latlong'.


Revision 1858 - Directory Listing
Modified Fri Oct 24 15:12:58 2003 UTC (21 years, 4 months ago) by jan
Original Path: trunk/thuban/Thuban
(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.


Revision 1854 - Directory Listing
Modified Wed Oct 22 09:38:36 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1853 - Directory Listing
Modified Wed Oct 22 09:38:20 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1851 - Directory Listing
Modified Tue Oct 21 14:17:24 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
Rework the projection dialog to fix a few bugs, including RT 2166
and most of 2168

(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


Revision 1850 - Directory Listing
Modified Tue Oct 21 14:13:41 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
New. The class ProjectionList is a
special wxListCtrl to show a list of projections in a more MVC
fashion


Revision 1844 - Directory Listing
Modified Tue Oct 21 10:49:44 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1843 - Directory Listing
Modified Tue Oct 21 10:49:38 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(SessionSaver.write)
(SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
namespace
(SessionSaver.write_projection): Write the projection's epsg
attribute


Revision 1837 - Directory Listing
Modified Tue Oct 21 09:29:52 2003 UTC (21 years, 4 months ago) by frank
Original Path: trunk/thuban/Thuban
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.


Revision 1833 - Directory Listing
Modified Mon Oct 20 11:00:57 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1830 - Directory Listing
Modified Thu Oct 16 16:36:00 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1824 - Directory Listing
Modified Tue Oct 14 15:21:03 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1823 - Directory Listing
Modified Tue Oct 14 15:20:47 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(PROJECTION_ADDED)
(PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
the ProjFile objects


Revision 1819 - Directory Listing
Modified Mon Oct 13 15:55:43 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(ProjFrame._OnSave)
(ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
(ProjFrame.__FillAvailList): Use the projection's Label method to
get the string for the list box


Revision 1816 - Directory Listing
Modified Mon Oct 13 15:53:56 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(ProjFileReader.start_projection)
(ProjFileReader.end_projection, ProjFileSaver.write_projfile):
Handle the epsg code attribute when reading or writing proj files


Revision 1815 - Directory Listing
Modified Mon Oct 13 15:53:39 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1809 - Directory Listing
Modified Fri Oct 10 17:00:17 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1808 - Directory Listing
Modified Fri Oct 10 16:59:40 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
New file with custom sizers.


Revision 1806 - Directory Listing
Modified Fri Oct 10 10:36:34 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1802 - Directory Listing
Modified Thu Oct 9 15:18:35 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1797 - Directory Listing
Modified Thu Oct 9 10:00:06 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(Projection.GetParameter): Handle
parameters that do not contain a "=". Update the doc-string


Revision 1795 - Directory Listing
Modified Wed Oct 8 17:35:52 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(ProjFrame.__set_properties): Remove the
length limit on the projname text control


Revision 1791 - Directory Listing
Modified Wed Oct 8 14:47:53 2003 UTC (21 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
(get_user_proj_file): small bug-fix: Added missing 'val' parameter.


Revision 1789 - Directory Listing
Modified Wed Oct 8 13:10:45 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1786 - Directory Listing
Modified Wed Oct 8 10:39:11 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1782 - Directory Listing
Modified Mon Oct 6 17:31:54 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1780 - Directory Listing
Modified Mon Oct 6 17:31:31 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1778 - Directory Listing
Modified Mon Oct 6 17:30:32 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(Conduit): New class to help classes
that forward messages


Revision 1776 - Directory Listing
Modified Mon Oct 6 15:13:35 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(ThubanApplication.maps_changed): Add
doc-string


Revision 1771 - Directory Listing
Modified Mon Oct 6 11:28:38 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1766 - Directory Listing
Modified Wed Oct 1 09:52:28 2003 UTC (21 years, 5 months ago) by jan
Original Path: trunk/thuban/Thuban
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>".


Revision 1759 - Directory Listing
Modified Fri Sep 26 18:36:01 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1755 - Directory Listing
Modified Fri Sep 26 14:03:44 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(ProjFileSaver.write): Use
'projectionlist' as the name in the document type declaration so
that it matches the element type of the root element.


Revision 1750 - Directory Listing
Modified Wed Sep 24 15:46:27 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1706 - Directory Listing
Modified Wed Sep 3 08:31:26 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
(IdentifyView.ID_STOP): New.
(IdentifyView.__init__): Added another button that allows to
stop the identify mode.
(IdentifyView.OnStop): New. Stops the identify mode.


Revision 1704 - Directory Listing
Modified Wed Sep 3 07:02:36 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
(ThubanApplication.ShowExceptionDialog): Made strings available to
translations. Exchanged the simple
ScrolledMessageDialog by the new ExceptionDialog.


Revision 1703 - Directory Listing
Modified Wed Sep 3 06:58:47 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
a special exception dialog.


Revision 1695 - Directory Listing
Modified Mon Sep 1 12:45:07 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1693 - Directory Listing
Modified Mon Sep 1 11:23:26 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1667 - Directory Listing
Modified Thu Aug 28 10:21:05 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
Remove some unused imports


Revision 1666 - Directory Listing
Modified Thu Aug 28 10:20:32 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(longversion): Update to 0.9


Revision 1664 - Directory Listing
Modified Wed Aug 27 15:20:54 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1662 - Directory Listing
Modified Wed Aug 27 13:51:01 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1660 - Directory Listing
Modified Tue Aug 26 12:54:45 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(PostGISShapeStore.BoundingBox): Use a
more postgis specific but much faster method to get the bounding
box


Revision 1658 - Directory Listing
Modified Tue Aug 26 10:34:48 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1656 - Directory Listing
Modified Mon Aug 25 18:26:54 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1654 - Directory Listing
Modified Mon Aug 25 16:05:21 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1652 - Directory Listing
Modified Mon Aug 25 15:59:58 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1650 - Directory Listing
Modified Mon Aug 25 15:05:49 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(ThubanApplication.OpenSession): Catch
LoadCancelled exceptions and handle them by returning immediately.


Revision 1648 - Directory Listing
Modified Mon Aug 25 13:55:35 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1646 - Directory Listing
Modified Mon Aug 25 13:43:56 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 1644 - Directory Listing
Modified Mon Aug 25 12:44:55 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(__ThubanVersion__): Remove this and
replace it and the comment with __BuildDate__ by the Source: and
Id: cvs keywords as used in the other files.


Revision 1642 - Directory Listing
Modified Mon Aug 25 10:54:31 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1638 - Directory Listing
Modified Fri Aug 22 18:19:14 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1636 - Directory Listing
Modified Fri Aug 22 17:20:29 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1631 - Directory Listing
Modified Fri Aug 22 16:01:14 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1630 - Directory Listing
Modified Fri Aug 22 15:59:57 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1628 - Directory Listing
Modified Fri Aug 22 12:53:41 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
(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.


Revision 1625 - Directory Listing
Modified Thu Aug 21 16:02:23 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 1622 - Directory Listing
Modified Thu Aug 21 11:56:06 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
(MainWindow.AddLayer): Changed dialog settings to allow multiple files
to load into the map.  Also reduced selection to *.shp as a default.


Revision 1620 - Directory Listing
Modified Wed Aug 20 13:14:22 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1607 - Directory Listing
Modified Tue Aug 19 12:50:35 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1605 - Directory Listing
Modified Tue Aug 19 11:00:40 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1599 - Directory Listing
Modified Mon Aug 18 12:45:28 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 1595 - Directory Listing
Modified Mon Aug 18 10:03:13 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
(About.__init__): Added Silke Reimer.


Revision 1593 - Directory Listing
Modified Fri Aug 15 14:10:27 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1591 - Directory Listing
Modified Fri Aug 15 14:00:53 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 1589 - Directory Listing
Modified Fri Aug 15 12:49:08 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1587 - Directory Listing
Modified Fri Aug 15 10:31:07 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1583 - Directory Listing
Modified Tue Aug 12 16:13:41 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
(About.__init__): Added Björn Broscheit.


Revision 1579 - Directory Listing
Modified Tue Aug 12 12:34:07 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(UnknownProjPanel._DoLayout): Translated
strings have to be one string literal.


Revision 1572 - Directory Listing
Modified Mon Aug 11 10:20:08 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(JoinDialog.OnJoin): Add missing space to
error message


Revision 1568 - Directory Listing
Modified Fri Aug 8 13:33:03 2003 UTC (21 years, 7 months ago) by jan
Original Path: trunk/thuban/Thuban
(About.__init__): Reworked the hall of fame. Now
the list corresponds to the "About" web page.


Revision 1566 - Directory Listing
Modified Fri Aug 8 13:01:30 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Make sure translated strings are recognized as one string literal.


Revision 1564 - Directory Listing
Modified Thu Aug 7 19:19:56 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1562 - Directory Listing
Modified Thu Aug 7 17:53:37 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(MapRenderer.low_level_renderer): Check
the raw data format and only use an optimized version of its a
shapefile.


Revision 1559 - Directory Listing
Modified Thu Aug 7 17:32:20 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
update ChangeLog


Revision 1558 - Directory Listing
Modified Thu Aug 7 17:31:54 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
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 will go away
soon anyway.


Revision 1554 - Directory Listing
Modified Wed Aug 6 17:24:30 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
New file with the basic rendering
logic. The code in this file is completely independend of wx.
(BaseRenderer): Class with the basic rendering logic


Revision 1552 - Directory Listing
Modified Wed Aug 6 17:21:32 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.

* 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.


Revision 1551 - Directory Listing
Modified Wed Aug 6 17:21:07 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1549 - Directory Listing
Modified Wed Aug 6 11:18:29 2003 UTC (21 years, 7 months ago) by jan
Original Path: trunk/thuban/Thuban
(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


Revision 1546 - Directory Listing
Modified Tue Aug 5 12:38:52 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(Color.__repr__): Make the repr of a color
object look like a Color instantiation. Formerly it looked like a
tuple.


Revision 1542 - Directory Listing
Modified Fri Aug 1 16:13:49 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Insert cvs keywords and doc-strings.


Revision 1541 - Directory Listing
Modified Fri Aug 1 16:13:27 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Insert cvs keywords and doc-strings.
(Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
(ThubanEndBusyCursor): Add doc-strings


Revision 1539 - Directory Listing
Modified Fri Aug 1 14:27:57 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Import the SHAPETYPE_* constants from data
instead of layer.


Revision 1535 - Directory Listing
Modified Fri Aug 1 14:27:13 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1527 - Directory Listing
Modified Wed Jul 30 15:43:28 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add docstrings.


Revision 1526 - Directory Listing
Modified Wed Jul 30 15:43:06 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
 Use renamed Ramp instances.


Revision 1525 - Directory Listing
Modified Wed Jul 30 15:42:56 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add docstrings. Rename specific Ramp instances to use lower_case_style.


Revision 1523 - Directory Listing
Modified Wed Jul 30 13:10:33 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(QueueingPublisher): Removed. This class
was never used in Thuban.


Revision 1521 - Directory Listing
Modified Wed Jul 30 12:34:10 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1520 - Directory Listing
Modified Wed Jul 30 12:34:02 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(__version__): Don't import the already
removed show_exception_dialog.


Revision 1518 - Directory Listing
Modified Tue Jul 29 15:04:11 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ThubanApplication.ShowExceptionDialog):
        Put back this method and remove the equivalent function since we
        are setting the exception hook from within this class (OnInit).


Revision 1515 - Directory Listing
Modified Tue Jul 29 14:59:11 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Remove the now unused import of warnings


Revision 1513 - Directory Listing
Modified Tue Jul 29 14:56:48 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(SimpleStore): Removed. This class has been
deprecated since before the 0.8 release and isn't used in Thuban
itself anymore.


Revision 1511 - Directory Listing
Modified Tue Jul 29 14:48:57 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Remove some unnecessary imports


Revision 1505 - Directory Listing
Modified Tue Jul 29 14:29:12 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(main): Don't set the exception hook here,
        it will get set in ThubanApplication.OnInit.


Revision 1504 - Directory Listing
Modified Tue Jul 29 14:28:55 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ThubanApplication.OnInit): set the
        python exception hook here so that we are sure to catch any
        Thuban exception that happen during initialization.


Revision 1502 - Directory Listing
Modified Tue Jul 29 13:50:47 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(main): Install the exception handler before a ThubanApplication is created.


Revision 1501 - Directory Listing
Modified Tue Jul 29 13:50:35 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ThubanApplication.ShowExceptionDialog):
        Removed and called it show_exception_dialog() so that the exception
        handler can be set before the class is created.


Revision 1482 - Directory Listing
Modified Thu Jul 24 17:53:04 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Remove commented out code that wouldn't
belong in viewport anyway


Revision 1481 - Directory Listing
Modified Thu Jul 24 17:52:59 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(ScreenRenderer.draw_shape_layer): Remove
superfluous code to set brush and pen for point shapes


Revision 1480 - Directory Listing
Modified Thu Jul 24 17:52:48 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
Remove the #! line as
it annoys lintian which warns about these files not being
executable. The #1 isn't necessary here since if you absolutely
must execute them you can always say "python <filename>".


Revision 1468 - Directory Listing
Modified Tue Jul 22 14:03:14 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1467 - Directory Listing
Modified Tue Jul 22 14:02:57 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1464 - Directory Listing
Modified Fri Jul 18 18:20:40 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1460 - Directory Listing
Modified Fri Jul 18 15:23:48 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(MapCanvas.OnLeftDown): Capture the mouse.


Revision 1456 - Directory Listing
Modified Fri Jul 18 14:56:13 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/UI/viewport.py: Remove unused imports

* Thuban/UI/view.py: Remove unused imports


Revision 1454 - Directory Listing
Modified Fri Jul 18 14:41:04 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1452 - Directory Listing
Modified Fri Jul 18 12:57:59 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1448 - Directory Listing
Modified Thu Jul 17 14:59:41 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.ToggleLegend): Don't
        fit the map to the window as this changes any zoom level that
        the user may have set.


Revision 1447 - Directory Listing
Modified Thu Jul 17 14:59:29 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Classifier.__BuildClassification):
        Return both the new class and the field name.


Revision 1435 - Directory Listing
Modified Wed Jul 16 13:24:52 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ViewPort.find_shape_at): Get the classification field from layer.


Revision 1434 - Directory Listing
Modified Wed Jul 16 13:24:39 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_shape_layer): Get the classification field from layer.


Revision 1433 - Directory Listing
Modified Wed Jul 16 13:24:25 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1432 - Directory Listing
Modified Wed Jul 16 13:24:03 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGenDialog.OnOK): Use a fixed
        ramp when we need to fix certain values of a ramp rather than
        using the old fixes parameter.


Revision 1431 - Directory Listing
Modified Wed Jul 16 13:23:41 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(table_to_dbf, table_to_csv): Renamed
        parameter records to rows and add docstring.


Revision 1430 - Directory Listing
Modified Wed Jul 16 13:23:28 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_classification): Get the field name and type from the layer.


Revision 1429 - Directory Listing
Modified Wed Jul 16 13:23:14 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add CLASS_CHANGED for when a classification is modified.


Revision 1428 - Directory Listing
Modified Wed Jul 16 13:23:01 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionLoader.start_classification):
        Set the field name on the layer, not the classification.


Revision 1427 - Directory Listing
Modified Wed Jul 16 13:22:48 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1426 - Directory Listing
Modified Wed Jul 16 13:22:20 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1425 - Directory Listing
Modified Wed Jul 16 13:21:59 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1419 - Directory Listing
Modified Tue Jul 15 09:29:18 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1417 - Directory Listing
Modified Tue Jul 15 08:43:53 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1408 - Directory Listing
Modified Mon Jul 14 09:38:29 2003 UTC (21 years, 7 months ago) by frank
Original Path: trunk/thuban/Thuban
(SessionLoader.start_map): Encode map
	title to latin1.  Fixes https://intevation.de/rt/webrt?serial_num=2013


Revision 1405 - Directory Listing
Modified Thu Jul 10 16:49:57 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Tool.MouseUp): Should have called
    drag_stop, not drag_move when the mouse is released.


Revision 1404 - Directory Listing
Modified Thu Jul 10 16:31:07 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Removed.


Revision 1394 - Directory Listing
Modified Thu Jul 10 14:54:58 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1393 - Directory Listing
Modified Thu Jul 10 14:54:41 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.ShowTableView): Raise
        the table window when it is selectd to be shown.


Revision 1392 - Directory Listing
Modified Thu Jul 10 14:54:16 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(main): Set exception hook to the ShowExceptionDialog. Fixes RTbug #1993.


Revision 1391 - Directory Listing
Modified Thu Jul 10 14:54:02 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1390 - Directory Listing
Modified Thu Jul 10 14:53:38 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ThubanApplication.ShowExceptionDialog):
        Port exception dialog from GREAT-ER. Fixes RTbug #1993.


Revision 1389 - Directory Listing
Modified Thu Jul 10 14:53:27 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(table_to_dbf, table_to_csv): Added 'records'
        parameter which is a list of records that restricts which
        records are saved. Fixes RTbug #1997.


Revision 1388 - Directory Listing
Modified Thu Jul 10 14:53:15 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Map.SetProjection): Send the old
        projection as an argument to listeners of the MAP_PROJECTION_CHANGED
        event.


Revision 1387 - Directory Listing
Modified Thu Jul 10 14:53:03 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1386 - Directory Listing
Modified Thu Jul 10 14:52:48 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Contains non-wx view functionality.  RTTbug #1992.


Revision 1385 - Directory Listing
Modified Thu Jul 10 14:52:39 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Stripped out all non-wx functionality. Fixes RTTbug #1992.


Revision 1381 - Directory Listing
Modified Tue Jul 8 16:37:46 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1379 - Directory Listing
Modified Tue Jul 8 13:23:20 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1375 - Directory Listing
Modified Tue Jul 8 10:53:05 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1371 - Directory Listing
Modified Fri Jul 4 18:19:16 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1364 - Directory Listing
Modified Thu Jul 3 13:09:43 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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

* 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.


Revision 1361 - Directory Listing
Modified Wed Jul 2 12:59:20 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(generate_singletons,
        generate_uniform_distribution, generate_quantiles,
        GenQuantiles0): Make sure maxValue isn't less than
        one, otherwise we could divide by zero.


Revision 1359 - Directory Listing
Modified Wed Jul 2 10:51:49 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1355 - Directory Listing
Modified Wed Jul 2 09:37:23 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1354 - Directory Listing
Modified Wed Jul 2 09:37:07 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionLoader.start_clrange): Fix
        call to ClassGroupRange constructor to use a tuple.


Revision 1353 - Directory Listing
Modified Wed Jul 2 09:36:54 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1352 - Directory Listing
Modified Wed Jul 2 09:36:39 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixed parameters to ClassGroupRange constructor.


Revision 1351 - Directory Listing
Modified Tue Jul 1 16:17:02 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Classificatio.__init__): Remove unused lock variable.


Revision 1344 - Directory Listing
Modified Tue Jul 1 16:11:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1343 - Directory Listing
Modified Tue Jul 1 16:11:08 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixes RTbug #1971.


Revision 1342 - Directory Listing
Modified Tue Jul 1 16:10:54 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixes RTbug #1971.
(Classifier.__BuildClassification, Classifier.__SetGridTable):
        Call Classification.SetFieldInfo() instead of SetFieldType.


Revision 1341 - Directory Listing
Modified Tue Jul 1 16:10:42 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1340 - Directory Listing
Modified Tue Jul 1 16:10:25 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Removed import of Color which wasn't being used.


Revision 1339 - Directory Listing
Modified Tue Jul 1 16:10:14 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixes RTbug #1971.
(SessionLoader.start_classification): Call
        Classification.SetFieldInfo().


Revision 1338 - Directory Listing
Modified Tue Jul 1 16:10:00 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1337 - Directory Listing
Modified Tue Jul 1 16:09:43 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1336 - Directory Listing
Modified Tue Jul 1 16:09:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
 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.


Revision 1335 - Directory Listing
Modified Tue Jul 1 16:09:09 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1333 - Directory Listing
Modified Tue Jul 1 15:41:08 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
(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>


Revision 1328 - Directory Listing
Modified Tue Jul 1 12:01:58 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1324 - Directory Listing
Modified Tue Jul 1 09:28:47 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
Reverse List of layers to render in same order as in desktop legend.


Revision 1323 - Directory Listing
Modified Mon Jun 30 12:02:01 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add Thuban email addresses.


Revision 1322 - Directory Listing
Modified Mon Jun 30 12:01:50 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1319 - Directory Listing
Modified Mon Jun 30 10:26:45 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
SQLite/PySQLite version dependencies were too high.


Revision 1317 - Directory Listing
Modified Mon Jun 30 09:56:56 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Update version to 0.8.1


Revision 1309 - Directory Listing
Modified Thu Jun 26 17:00:44 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.About): Call new About box in Thuban.UI.about.


Revision 1308 - Directory Listing
Modified Thu Jun 26 17:00:31 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(wxCHECK_VERSION): Removed. Not needed.
(verify_versions): Remove most of the code since it is
        now in Thuban.version.verify_versions.o


Revision 1307 - Directory Listing
Modified Thu Jun 26 17:00:17 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1306 - Directory Listing
Modified Thu Jun 26 17:00:01 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1305 - Directory Listing
Modified Thu Jun 26 16:59:41 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. New About box that displays library version information and credits.


Revision 1303 - Directory Listing
Modified Wed Jun 25 09:39:51 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Cleaned up how we determine file extensions.
(GetImageResource): Return an wxImage from our Resources.


Revision 1302 - Directory Listing
Modified Wed Jun 25 09:39:33 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1298 - Directory Listing
Modified Tue Jun 24 18:00:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ExportRenderer.render_legend):
        Check that a layer has a classification before trying
        to get it. Raster layers don't have classifications.


Revision 1293 - Directory Listing
Modified Mon Jun 23 13:05:58 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add blank line at the end because
        file was not being read correctly building the Windows
        distribution.


Revision 1288 - Directory Listing
Modified Mon Jun 23 10:47:44 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Temporarily update longversion for
        the 0.8 release so that it doesn't have the cvs revision.


Revision 1287 - Directory Listing
Modified Mon Jun 23 10:47:11 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.About): Fix text.


Revision 1285 - Directory Listing
Modified Mon Jun 23 10:30:53 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1284 - Directory Listing
Modified Mon Jun 23 10:30:38 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ThubanBeginBusyCursor): Call wxSafeYield
        to make sure that we don't create reentrant possibilities with
        wxYield.


Revision 1282 - Directory Listing
Modified Mon Jun 23 09:47:18 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 1277 - Directory Listing
Modified Fri Jun 20 17:46:45 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1276 - Directory Listing
Modified Fri Jun 20 17:46:34 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use Thuban[Begin|End]BusyCursor()
        instead of a direct call to wx[Begin|End]CusyCursor().


Revision 1275 - Directory Listing
Modified Fri Jun 20 17:46:19 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1274 - Directory Listing
Modified Fri Jun 20 17:46:04 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
 Use Thuban[Begin|End]BusyCursor()
        instead of a direct call to wx[Begin|End]CusyCursor().
(GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
        table data.


Revision 1273 - Directory Listing
Modified Fri Jun 20 17:45:49 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(BaseLayer.HasShapes): New. Overridden
        by deriving classes to determine if that layer supports shapes.
(Layer): Override HasShapes and return true.


Revision 1271 - Directory Listing
Modified Fri Jun 20 16:43:04 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1268 - Directory Listing
Modified Fri Jun 20 16:10:12 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1261 - Directory Listing
Modified Fri Jun 20 14:14:42 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(DerivedShapeStore.__init__): Raise
        an exception if the number of shapes is different from the
        number of rows in the table. Address RTbug #1933.


Revision 1253 - Directory Listing
Modified Fri Jun 20 09:28:43 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1252 - Directory Listing
Modified Fri Jun 20 09:28:08 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ScaleBarBitmap.__SetScale): Do scale
        adjustment here if the map projection uses degrees.


Revision 1251 - Directory Listing
Modified Fri Jun 20 09:27:55 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_classification):
        Remove unnecessary use of lambdas and nested functions.


Revision 1250 - Directory Listing
Modified Fri Jun 20 09:27:43 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Projection.GetProjectedUnits): New.
        Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
        depending on the units this projection *forwards* into.


Revision 1249 - Directory Listing
Modified Fri Jun 20 09:27:19 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Remove "from __future__"
        import statement since python 2.2 is the earliest supported
        version.


Revision 1241 - Directory Listing
Modified Thu Jun 19 09:25:53 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
(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.


Revision 1240 - Directory Listing
Modified Thu Jun 19 09:25:31 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
(ScaleBar.DrawScaleBar): Apply conversion to scale if projection is
latlong to get better estimate.


Revision 1236 - Directory Listing
Modified Wed Jun 18 15:29:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1234 - Directory Listing
Modified Wed Jun 18 14:47:38 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Check for gdal support before importing gdalwarp.
(MapRenderer.render_map): Only try to optimize if we have gdal
        support otherwise nothing will get drawn.
(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.


Revision 1233 - Directory Listing
Modified Wed Jun 18 14:47:19 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.__init__): Call ShowLegend().


Revision 1232 - Directory Listing
Modified Wed Jun 18 14:47:06 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(main): Remove call to ShowLegend.


Revision 1231 - Directory Listing
Modified Wed Jun 18 14:46:57 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ScaleBarBitmap.__SetScale): Check if
        the map is None which may be the case if none has been loaded yet.


Revision 1230 - Directory Listing
Modified Wed Jun 18 14:46:43 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
First check if we can import
        the gdalwarp Thuban extension before checking for gdal.
        Also added some comments.


Revision 1221 - Directory Listing
Modified Tue Jun 17 15:24:45 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1219 - Directory Listing
Modified Mon Jun 16 17:42:54 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 1211 - Directory Listing
Modified Mon Jun 16 12:27:52 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1207 - Directory Listing
Modified Fri Jun 13 18:16:10 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1202 - Directory Listing
Modified Fri Jun 13 16:01:10 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1199 - Directory Listing
Modified Fri Jun 13 15:04:28 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1198 - Directory Listing
Modified Fri Jun 13 15:03:32 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1194 - Directory Listing
Modified Fri Jun 13 13:02:30 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1190 - Directory Listing
Modified Thu Jun 12 17:01:37 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ProjFrame.__DoOnProjAvail): Clear
        the projfilepath if no projection is selected.


Revision 1189 - Directory Listing
Modified Thu Jun 12 17:01:13 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1188 - Directory Listing
Modified Thu Jun 12 17:00:43 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
As is done under Windows, create the
        user directory if it doesn't exist on a posix system.


Revision 1181 - Directory Listing
Modified Thu Jun 12 16:29:06 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ProjFrame.__DoOnProjAvail): Set the
        projfilepath label to just the basename of the projection file
        rather than include the entire path.


Revision 1180 - Directory Listing
Modified Thu Jun 12 16:28:54 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ScaleBarBitmap.__SetScale): Don't draw
        the scalebar if the current map has no projection set.


Revision 1179 - Directory Listing
Modified Thu Jun 12 16:12:56 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fix missed proj functions that needed to be renamed.


Revision 1177 - Directory Listing
Modified Thu Jun 12 15:46:46 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1176 - Directory Listing
Modified Thu Jun 12 15:46:22 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Removed assert statements that tested if the variable was an instance of Color.


Revision 1171 - Directory Listing
Modified Thu Jun 12 12:52:37 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Contains the XMLWriter class that was in save.py


Revision 1170 - Directory Listing
Modified Thu Jun 12 12:52:19 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Contains the XMLReader class that was in load.py.


Revision 1167 - Directory Listing
Modified Thu Jun 12 12:42:34 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use renamed projection resource functions.


Revision 1165 - Directory Listing
Modified Thu Jun 12 12:42:10 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1164 - Directory Listing
Modified Thu Jun 12 12:41:44 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(_has_gdal_support): New. Used to
        determine if the "Add Image Layer" menu option should be
        greyed out or not. Addresses RTbug #1877.


Revision 1163 - Directory Listing
Modified Thu Jun 12 12:41:31 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use renamed projection resource functions.
(GenUniformPanel.__CalcStepping): Fix a slight discrepency
        when using integers versus floats.


Revision 1162 - Directory Listing
Modified Thu Jun 12 12:41:16 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1161 - Directory Listing
Modified Thu Jun 12 12:41:01 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1160 - Directory Listing
Modified Thu Jun 12 12:40:43 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(escape, XMLWriter): Moved into seperate file xmlwriter.py.


Revision 1159 - Directory Listing
Modified Thu Jun 12 12:40:27 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(XMLReader): Moved into seperate file xmlreader.py.


Revision 1158 - Directory Listing
Modified Thu Jun 12 12:40:11 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Import gdal only if it available.
(RasterLayer): Handle the case where the gdal library is unavailable.
        Addresses RTbug #1877.


Revision 1157 - Directory Listing
Modified Thu Jun 12 12:39:54 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Renamed functions to follow the
        function_names_with_underscores style. Fixes RTbug #1903.
(calculate_quantiles): Raise ValueError if 'percents' is invalid.


Revision 1155 - Directory Listing
Modified Thu Jun 12 12:17:11 2003 UTC (21 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban
import wxMultipleChoiceDialog from multiplechoicedialog.py rather than
from the wxPython library.


Revision 1154 - Directory Listing
Modified Thu Jun 12 12:14:19 2003 UTC (21 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban
A multiple choice dialog.


Revision 1152 - Directory Listing
Modified Wed Jun 11 11:06:27 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
Minor stability update


Revision 1150 - Directory Listing
Modified Wed Jun 11 10:45:49 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
(ThubanApplication.read_startup_files): Use get_application_dir.


Revision 1149 - Directory Listing
Modified Wed Jun 11 10:45:34 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
Use get_application_dir


Revision 1148 - Directory Listing
Modified Wed Jun 11 10:45:18 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban
(get_application_dir): New function to
	determine the absolute .thuban/thuban directory under
	"posix" (os.expanduser) and "nt" (read AppData registry key).


Revision 1146 - Directory Listing
Modified Tue Jun 10 12:00:16 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1144 - Directory Listing
Modified Tue Jun 10 11:56:55 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1142 - Directory Listing
Modified Tue Jun 10 09:41:57 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1140 - Directory Listing
Modified Fri Jun 6 11:18:51 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
Improved and partly added help texts for the menu items.


Revision 1138 - Directory Listing
Modified Thu Jun 5 15:59:57 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(IdentifyView.__init__):
	Layout reimplemented without panel. Make life easier to fit the list
	in the dialog.


Revision 1135 - Directory Listing
Modified Thu Jun 5 15:05:21 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(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.


Revision 1133 - Directory Listing
Modified Thu Jun 5 13:27:33 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(ThubanApplication.read_startup_files):
Guess location of .thuban directory from tempdir parent directory.


Revision 1132 - Directory Listing
Modified Thu Jun 5 13:27:17 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
Guess location of .thuban directory from tempdir parent directory.


Revision 1131 - Directory Listing
Modified Thu Jun 5 13:27:01 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(IdentifyView.__init__): Use ListCtrl instead of GridCtrl


Revision 1129 - Directory Listing
Modified Wed Jun 4 18:36:52 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1128 - Directory Listing
Modified Tue Jun 3 17:00:47 2003 UTC (21 years, 9 months ago) by tkoester
Original Path: trunk/thuban/Thuban
* Thuban/Model/classgen.py (GenQuantiles0): New function.


Revision 1126 - Directory Listing
Modified Mon Jun 2 14:15:43 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1124 - Directory Listing
Modified Mon Jun 2 14:14:25 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(Session.AddTable): call self.changed to
set the modified flag


Revision 1122 - Directory Listing
Modified Mon Jun 2 13:47:01 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(GenQuantilesPanel.GetList): Resource
acquisition has to happen before the try in a try-finally.


Revision 1121 - Directory Listing
Modified Mon Jun 2 13:46:45 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(TitledObject.SetTitle): Call changed
instead of issue so that the modified flags get updated.


Revision 1119 - Directory Listing
Modified Mon Jun 2 10:37:59 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(LegendTree._OnMsgMapLayersRemoved): It's
possible that a layer is removed that is not currently selected in
the legend so don't check for this.


Revision 1117 - Directory Listing
Modified Fri May 30 18:31:19 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1115 - Directory Listing
Modified Fri May 30 16:30:26 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(LegendTree.GetRootItem): Reset
availImgListIndices when a new image list is created


Revision 1113 - Directory Listing
Modified Fri May 30 15:59:49 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1111 - Directory Listing
Modified Fri May 30 09:54:48 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(MapCanvas.set_view_transform): Limit the
maximum and minimum scale factors.


Revision 1108 - Directory Listing
Modified Fri May 30 06:31:21 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.ToggleLegend): Apply a full
        extent to the map when the legend is toggled. Fixes RTBug #1881.


Revision 1105 - Directory Listing
Modified Fri May 30 06:30:15 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 1104 - Directory Listing
Modified Fri May 30 06:29:54 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(QueryTableFrame.OnQuery): Wrap code with try/finally. Fixes RTBug #1904.


Revision 1103 - Directory Listing
Modified Fri May 30 06:29:25 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_raster_layer): Call
        ProjectRasterFile with tuple arguments instead of strings.


Revision 1102 - Directory Listing
Modified Fri May 30 06:29:05 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 1101 - Directory Listing
Modified Fri May 30 06:28:39 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Remove unused import of ClassGenerator.


Revision 1100 - Directory Listing
Modified Fri May 30 06:28:21 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use classgen functions that were part
        of the ClassGenerator class. Put try/finally blocks around
        code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
        RTBug #1904.


Revision 1099 - Directory Listing
Modified Fri May 30 06:28:02 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Map.TopLayer, Map.BottomLayer): Renamed
        to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
        RTBug #1907.


Revision 1098 - Directory Listing
Modified Fri May 30 06:27:44 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Remove ClassGenerator class but make
        all the methods functions. Fixes RTBug #1903.


Revision 1096 - Directory Listing
Modified Thu May 29 10:03:07 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(LayerTableFrame.OnClose): Bug-fix: Now
unsubscribes all that is subcribed in __init__.


Revision 1094 - Directory Listing
Modified Wed May 28 18:59:46 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 1092 - Directory Listing
Modified Wed May 28 17:10:04 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(NullRenderer.Draw): New. Our own
renderer so that NULL/None values get displayed differently (by a
gray rectangle).
(TableGrid.__init__): Override the default renderers


Revision 1088 - Directory Listing
Modified Wed May 28 12:42:23 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1086 - Directory Listing
Modified Wed May 28 11:36:05 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(Layer.TreeInfo): Fixed a bug (a layer does not necessarily have a filename).


Revision 1084 - Directory Listing
Modified Wed May 28 10:25:09 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(MainWindow.TableClose, MainWindow.TableShow): sort the selection list
for the dialog.


Revision 1080 - Directory Listing
Modified Wed May 28 09:12:21 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(_can_unjoin): Add doc-string and cope
with layers that don't have shapestores, i.e. raster layers.


Revision 1078 - Directory Listing
Modified Wed May 28 09:07:30 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 1076 - Directory Listing
Modified Wed May 28 08:25:12 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(MainWindow.TableShow) Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.


Revision 1074 - Directory Listing
Modified Tue May 27 17:39:43 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1072 - Directory Listing
Modified Tue May 27 16:47:48 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1070 - Directory Listing
Modified Tue May 27 15:09:31 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/UI/mainwindow.py (table_close command): Make it sensitive
iff there are unreferenced tables in the session


Revision 1068 - Directory Listing
Modified Tue May 27 15:02:37 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 1066 - Directory Listing
Modified Tue May 27 14:18:05 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(QueryTableFrame.__init__): The "_S_election" display has some unwanted side
effects. Removed again.


Revision 1063 - Directory Listing
Modified Tue May 27 14:08:28 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(LegendTree.__FillTree): Use 'legend_icon_layer'


Revision 1061 - Directory Listing
Modified Tue May 27 13:11:18 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(Menu.RemoveItem): New. Remove an item from the menu.


Revision 1058 - Directory Listing
Modified Tue May 27 11:30:29 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
Dialog derived from NonModalNonParentDialog


Revision 1057 - Directory Listing
Modified Tue May 27 11:30:02 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(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.


Revision 1056 - Directory Listing
Modified Tue May 27 11:29:46 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(MainWindow.OnClose): Explicitly destroy all dialogs in the dialogs
dictionary and the canvas.


Revision 1054 - Directory Listing
Modified Tue May 27 10:38:16 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 1052 - Directory Listing
Modified Tue May 27 09:34:28 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
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"


Revision 1050 - Directory Listing
Modified Tue May 27 09:31:13 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
BMP_SIZE_W = 15
(LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
(LegendTree.__FillTreeLayer): Explicitely set SelectedImage.


Revision 1047 - Directory Listing
Modified Tue May 27 08:04:44 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(Menu.InsertSeparator): Additional optional parameter
'after' now allows to insert separators almost anywhere in the menu.


Revision 1045 - Directory Listing
Modified Tue May 27 06:54:03 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(QueryTableFrame.__init__): Underline the "S" of selection box label to
	hint on hot key (Alt-S). Works under Win32 but is ignored under GTK.


Revision 1043 - Directory Listing
Modified Mon May 26 19:27:15 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 1037 - Directory Listing
Modified Mon May 26 17:30:43 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.TableOpen): Real
implementation. Mark parts of the file format strings for
localization.


Revision 1036 - Directory Listing
Modified Mon May 26 17:30:29 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(Session.OpenTableFile): New. Open a dbf
file and add the table to the tables managed by the session


Revision 1035 - Directory Listing
Modified Mon May 26 17:03:08 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
Replace the true/false of wxWindows by True/False of Python 2.2.1.


Revision 1034 - Directory Listing
Modified Mon May 26 16:28:33 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(ProjFrame.__do_layout, ProjPanel._DoLayout): Center Choices.


Revision 1032 - Directory Listing
Modified Mon May 26 15:33:20 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(LayerTableFrame.__init__): If there is already a selection present,
update the grid accordingly.


Revision 1031 - Directory Listing
Modified Mon May 26 15:33:02 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(MainWindow.TableShow): Make the dialog resizeable and increase its
initial size.


Revision 1027 - Directory Listing
Modified Mon May 26 11:47:17 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(QueryTableFrame.OnSaveAs): Call table_to_dbf or table_to_csv depending on
	file selection.


Revision 1026 - Directory Listing
Modified Mon May 26 11:46:42 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
TrannsientTableBase.Width, TransientTableBase.Precision):
Return column width and precision.


Revision 1025 - Directory Listing
Modified Mon May 26 11:46:17 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(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.


Revision 1023 - Directory Listing
Modified Fri May 23 14:20:16 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(MainWindow.LayerShowTable): Prefix the table window with 'Layer Table:'
instead of 'Table:'.


Revision 1022 - Directory Listing
Modified Fri May 23 14:17:50 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(JoinDialog.OnJoin): Use _() for strings.  Use QueryTableFrame instead of
TableFrame.


Revision 1020 - Directory Listing
Modified Fri May 23 13:03:07 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(TransientTable, TransientJoinedTable, AutoTransientTable): mix-in
TitledObject and call its init-method with a default title. Remove
Title() method.


Revision 1019 - Directory Listing
Modified Fri May 23 12:56:34 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(DBFTable, MemoryTable): mix-in TitledObject and call its init-method with
a default title. Remove Title() method.


Revision 1018 - Directory Listing
Modified Fri May 23 12:54:24 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(TitledObject.SetTitle): Call method 'issue' only if it exists.


Revision 1016 - Directory Listing
Modified Fri May 23 11:05:59 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/Model/session.py (Session.AddShapeStore): Define
AddShapeStore analogously to AddTable.

* test/test_session.py (TestSessionSimple.test_add_shapestore):
New. Test for AddShapeStore


Revision 1014 - Directory Listing
Modified Fri May 23 09:26:23 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(MainWindow.TableShow): A very coarse implementation that still needs work.


Revision 1013 - Directory Listing
Modified Fri May 23 09:18:28 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(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.


Revision 1012 - Directory Listing
Modified Fri May 23 09:13:58 2003 UTC (21 years, 9 months ago) by jan
Original Path: trunk/thuban/Thuban
(Layer.TreeInfo): Added filename.


Revision 1010 - Directory Listing
Modified Fri May 23 08:27:20 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(JoinDialog.__init__): Checkbox for outer join.
(JoinDialog.OnJoin): Consider outer join check box.


Revision 1009 - Directory Listing
Modified Fri May 23 08:26:58 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(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.


Revision 1007 - Directory Listing
Modified Thu May 22 20:08:02 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(JoinDialog.OnJoin): Use exc_info in a
somewhat safer way. Storing the traceback in a local variable can
lead to memory leaks


Revision 1005 - Directory Listing
Modified Thu May 22 20:01:50 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
(JoinDialog.OnJoin): Make sure to really call
the wxMessageDialog's Destroy() method.


Revision 1003 - Directory Listing
Modified Thu May 22 19:46:34 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(JoinDialog.__init__): Make use of TransientTable.Title()


Revision 1002 - Directory Listing
Modified Thu May 22 19:41:57 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(TransientJoinedTable.__doc__): Typo fixed.


Revision 1001 - Directory Listing
Modified Thu May 22 19:40:27 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(MainWindow.TableJoin): Removed print.


Revision 1000 - Directory Listing
Modified Thu May 22 19:40:06 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(JoinDialog): Functional implementation of
	former framework. Renamed Table1/Table2 to LeftTable/RightTable
	in all occurences.


Revision 998 - Directory Listing
Modified Thu May 22 19:29:39 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 996 - Directory Listing
Modified Thu May 22 18:21:10 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 994 - Directory Listing
Modified Thu May 22 18:05:16 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 993 - Directory Listing
Modified Thu May 22 16:54:04 2003 UTC (21 years, 9 months ago) by tkoester
Original Path: trunk/thuban/Thuban
* Thuban/Model/range.py, test/test_range.py: Brought over new Range
from SciParam that now really is immutable.


Revision 991 - Directory Listing
Modified Thu May 22 16:51:44 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(Map.TopLayer(), Map.BottomLayer()): New, place
	layer at top/bottom of layer stack.


Revision 990 - Directory Listing
Modified Thu May 22 16:51:24 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
	bound to tool events.
(LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
	New, methods binding the event methods with the map methods.


Revision 987 - Directory Listing
Modified Thu May 22 16:46:14 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/Model/session.py (Session.RemoveTable): New method to
remove tables

* test/test_session.py (TestSessionSimple.test_remove_table): New.
Test for RemoveTable


Revision 986 - Directory Listing
Modified Thu May 22 16:41:10 2003 UTC (21 years, 9 months ago) by tkoester
Original Path: trunk/thuban/Thuban
* Thuban/Model/classgen.py: Added short module doc string and CVS id.
(ClassGenerator.GenUniformDistribution): Use new Range __init__, too.


Revision 984 - Directory Listing
Modified Thu May 22 16:37:48 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 982 - Directory Listing
Modified Thu May 22 12:02:15 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 980 - Directory Listing
Modified Thu May 22 11:41:14 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(LegendTree.__SetVisibilityStyle): Only gray out
	the text if not visible. The italic font sometimes exceeds the
	rendering area.


Revision 979 - Directory Listing
Modified Thu May 22 11:40:59 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(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".


Revision 978 - Directory Listing
Modified Thu May 22 11:40:32 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
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.
(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.


Revision 977 - Directory Listing
Modified Thu May 22 11:39:51 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(Classifier.__init__, SelectPropertiesDialog.__init__)
	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.


Revision 976 - Directory Listing
Modified Thu May 22 11:39:31 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(ProjFrame.__init__, ProjFrame.__doLayout):
	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.
(ProjFrame.__DoOnProjAvail): Determine position of current projection
	using the wxListBox.FindString() method. Still a problem (#1886)


Revision 974 - Directory Listing
Modified Wed May 21 17:39:43 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.OnClose): Call DockFrame.OnClose, not DockFrame._OnClose.


Revision 973 - Directory Listing
Modified Wed May 21 17:39:31 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(DockFrame): Rename references to _OnClose
        to OnClose so that Thuban closes correctly.


Revision 967 - Directory Listing
Modified Wed May 21 17:24:54 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
 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.


Revision 966 - Directory Listing
Modified Wed May 21 17:24:40 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 965 - Directory Listing
Modified Wed May 21 17:24:22 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 964 - Directory Listing
Modified Wed May 21 17:24:09 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(GeoPanel.__init__): Put Degrees as
        the first item in choices. Fixes RTBug #1882.


Revision 963 - Directory Listing
Modified Wed May 21 17:23:53 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.AddLayer): Move OpenShapefile
        into try block. AddLayer doesn't throw any exceptions anymore.
(MainWindow.AddRasterLayer): Move constructor of RasterLayer into
        try block.


Revision 962 - Directory Listing
Modified Wed May 21 17:23:39 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Brought over new Range from SciParam that
        is immutable and has an __init__ which can accept floats.


Revision 961 - Directory Listing
Modified Wed May 21 17:23:25 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(RasterLayer.__init__): Test if the filename is a valid image file.
        Throw IOError otherwise.


Revision 960 - Directory Listing
Modified Wed May 21 17:23:11 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGroupRange.SetRange): Use new Range ___init__ to pass floats.


Revision 959 - Directory Listing
Modified Wed May 21 17:22:58 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 951 - Directory Listing
Modified Wed May 21 14:20:32 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(MainWindow): Renamed _OnClose() back to OnClose() to keep in sync
with extensions. Internally Thuban still uses "underscored" names.


Revision 940 - Directory Listing
Modified Tue May 20 15:25:33 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapCanvas.set_view_transform): Try to limit
        how small the scale can get. This still needs more testing.


Revision 939 - Directory Listing
Modified Tue May 20 15:25:22 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 938 - Directory Listing
Modified Tue May 20 15:25:10 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 937 - Directory Listing
Modified Tue May 20 15:24:51 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 936 - Directory Listing
Modified Tue May 20 15:24:32 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 935 - Directory Listing
Modified Tue May 20 15:24:17 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 934 - Directory Listing
Modified Tue May 20 15:24:03 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ThubanApplication.CreateMainWindow):
        Make initial window size 600x400. Fixes RTBug #1872.


Revision 933 - Directory Listing
Modified Tue May 20 15:23:50 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(AutoTransientTable.SimpleQuery):
        The right argument may not be a string, it could also be a Column.


Revision 932 - Directory Listing
Modified Tue May 20 15:23:33 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 931 - Directory Listing
Modified Tue May 20 15:23:18 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Map.BoundingBox): Fix typo in comment.


Revision 930 - Directory Listing
Modified Tue May 20 15:23:03 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionLoader.__init__): Add rasterlayer tag handler.
(SessionLoader.start_layer): Encode the filename.
(SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
        New. Supports reading a rasterlayer tag.


Revision 929 - Directory Listing
Modified Tue May 20 15:22:42 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 926 - Directory Listing
Modified Mon May 19 12:09:01 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
Bugfix


Revision 925 - Directory Listing
Modified Mon May 19 12:07:37 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(get_changelog_date): Catch exceptions if ChangeLog does not exist.


Revision 923 - Directory Listing
Modified Mon May 19 09:12:25 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
Extended version information: Display Thuban, wxPython and Python version.


Revision 922 - Directory Listing
Modified Mon May 19 09:12:07 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
New, version information for Thuban: Last modification date and last
ChangeLog entry date.


Revision 920 - Directory Listing
Modified Fri May 16 17:37:29 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 918 - Directory Listing
Modified Fri May 16 17:29:39 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 914 - Directory Listing
Modified Fri May 16 16:25:41 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(ScalebarBitmap.__SetScale): Update to extended scalebar.DrawScalebar header.


Revision 913 - Directory Listing
Modified Fri May 16 16:25:10 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(roundInterval): round long instead of int


Revision 912 - Directory Listing
Modified Fri May 16 16:24:44 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(ScaleBar.DrawScaleBar): Position and Size of scalebar drawing area as new
	parameters.


Revision 911 - Directory Listing
Modified Fri May 16 16:24:17 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(MainWindow.ExportMap()): New. Added also new method_command to call
	ExportMap, with platform dependency (only __WXMSW__)


Revision 910 - Directory Listing
Modified Fri May 16 16:23:43 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(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.


Revision 909 - Directory Listing
Modified Fri May 16 16:23:12 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
ExportRenderer): New, derived from ScreenRenderer. Renders
	Map, Legend and Scalebar for export.
(PrinterRenderer): New, derived from ExportRenderer. Replaces the old
	PrintRender.


Revision 907 - Directory Listing
Modified Fri May 16 15:01:04 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 903 - Directory Listing
Modified Wed May 14 11:16:28 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ProjFrame.__do_layout): Fix Windows layout bug with the 'Projection' label.


Revision 902 - Directory Listing
Modified Wed May 14 11:16:13 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGenDialog.OnOK): Fix name of method
        call to ClassGenerator.GenUniformDistribution.


Revision 901 - Directory Listing
Modified Wed May 14 11:15:55 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Range.number_re): Now accepts floats that
        do not have a leading 0 (.5 is now accepted as well as 0.5).


Revision 900 - Directory Listing
Modified Wed May 14 11:15:41 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 898 - Directory Listing
Modified Mon May 12 12:19:58 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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).


Revision 895 - Directory Listing
Modified Mon May 12 11:21:02 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 894 - Directory Listing
Modified Mon May 12 10:46:29 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
Old comment deleted.


Revision 892 - Directory Listing
Modified Mon May 12 10:45:47 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban
(XMLWriter.encode()): Explicite call to unicode and latin1. Fixes #1851 finally.


Revision 891 - Directory Listing
Modified Fri May 9 18:08:46 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGenerator.CalculateQuantiles):
        Clean up debugging statement, add comments, fix a small bug in the
        returned adjusted percentiles.


Revision 888 - Directory Listing
Modified Fri May 9 16:40:50 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Initial Join dialog. No real functionality yet.


Revision 887 - Directory Listing
Modified Fri May 9 16:38:59 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Taken from SciParam. Used as the underlying
        object in ClassGroupRange, and also uesd for inputting ranges in
        the classifer table and elsewhere.


Revision 886 - Directory Listing
Modified Fri May 9 16:36:56 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Contains the classes ClassGenerator, CustomRamp, MonochromaticRamp,
GreyRamp, RedRamp, GreenRamp, BlueRamp, HotToColdRamp from Thuban/UI/classgen.py


Revision 883 - Directory Listing
Modified Fri May 9 16:34:39 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapCanvas): Delegate "SelectedShapes" so the table view can call it.


Revision 882 - Directory Listing
Modified Fri May 9 16:34:28 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Explicit imports.


Revision 881 - Directory Listing
Modified Fri May 9 16:34:15 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 880 - Directory Listing
Modified Fri May 9 16:33:30 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ProjFrame.__VerifyButtons): Save button should be disabled if no projection
        is selected in the available list.


Revision 879 - Directory Listing
Modified Fri May 9 16:33:10 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add support for the Join Dialog. Added a Table menu and associated method calls.
(MainWindow.choose_color): Removed. No longer needed.


Revision 878 - Directory Listing
Modified Fri May 9 16:32:31 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Explicit imports.
(ClassTable.GetValueAsCust, ClassTable.__ParseInput,
ClassTable.SetValueAsCustom): Reworked to use new Range class.


Revision 877 - Directory Listing
Modified Fri May 9 16:32:17 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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


Revision 876 - Directory Listing
Modified Fri May 9 16:31:55 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Explicit imports.
(XMLWriter.encode): New. Encode the given string from a format
        used by Thuban into UTF-8. Fixes RTbug #1851.


Revision 875 - Directory Listing
Modified Fri May 9 16:31:39 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Import _.  (ProjFileSaver.write): write header using projfile.dtd.


Revision 874 - Directory Listing
Modified Fri May 9 16:31:12 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 873 - Directory Listing
Modified Fri May 9 16:30:54 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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__.


Revision 871 - Directory Listing
Modified Fri May 9 08:33:29 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
(DrawScaleBar): Draw only if interval > 0.0.


Revision 869 - Directory Listing
Modified Thu May 8 14:06:15 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
Explicit imports


Revision 866 - Directory Listing
Modified Thu May 8 13:40:32 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
Format string bug fixed


Revision 864 - Directory Listing
Modified Thu May 8 12:29:23 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
Import Thuban.UI.scalebar


Revision 862 - Directory Listing
Modified Thu May 8 12:27:15 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
(ScaleBar): Scalebar rendering


Revision 861 - Directory Listing
Modified Thu May 8 12:26:44 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
Rendering moved to Thuban/UI/scalebar.py
(deriveInterval):
	Calculate scalebar interval and unit which fits in width for scale.
(roundInterval): Round float.


Revision 859 - Directory Listing
Modified Thu May 8 10:41:09 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
(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.


Revision 858 - Directory Listing
Modified Thu May 8 10:30:17 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
Initialize ScaleBar with canvas.map


Revision 856 - Directory Listing
Modified Wed May 7 18:24:44 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
SCALE_CHANGED added.


Revision 855 - Directory Listing
Modified Wed May 7 18:24:27 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
(MapCanvas.set_view_transform): Issue SCALE_CHANGED.


Revision 854 - Directory Listing
Modified Wed May 7 18:24:13 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
(LegendPanel): Added scalebar bitmap
(ScaleBarBitmap): New, links the scalebar bitmap with view messages
and the renderer.


Revision 853 - Directory Listing
Modified Wed May 7 18:23:58 2003 UTC (21 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
New, scalebar rendering.


Revision 851 - Directory Listing
Modified Wed May 7 15:11:12 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 849 - Directory Listing
Modified Wed May 7 11:55:31 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 844 - Directory Listing
Modified Tue May 6 18:05:04 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(AutoTransientTable.SimpleQuery):
New. Simply delegate to the transient table's version.


Revision 841 - Directory Listing
Modified Tue May 6 17:12:53 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 839 - Directory Listing
Modified Tue May 6 15:54:18 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
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/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


Revision 838 - Directory Listing
Modified Tue May 6 15:53:32 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(DataTable.SetTable, DataTable.GetValue):
Adapt to new table interface


Revision 837 - Directory Listing
Modified Tue May 6 15:53:20 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_shape_layer): Adapt to
new table interface


Revision 836 - Directory Listing
Modified Tue May 6 15:53:13 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(RecordListCtrl.fill_list)
(RecordTable.SetTable): Adapt to new table interface


Revision 835 - Directory Listing
Modified Tue May 6 15:52:41 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(Classifier.__init__)
(Classifier.__init__): Adapt to new table interface


Revision 834 - Directory Listing
Modified Tue May 6 15:52:36 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(ClassGenDialog.__init__)
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
to new table interface


Revision 831 - Directory Listing
Modified Tue May 6 12:07:21 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapCanvas): Added delegated method HasSelectedShapes.
(MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
        shapes on the canvas using the map projection (if any).


Revision 830 - Directory Listing
Modified Tue May 6 12:07:03 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Selection.HasSelectedShapes): New. Returns true if there are any
        selected shapes.


Revision 829 - Directory Listing
Modified Tue May 6 12:06:38 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 828 - Directory Listing
Modified Tue May 6 12:06:12 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 824 - Directory Listing
Modified Tue May 6 08:09:27 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapCanvas.FitLayerToWindow): The bbox rectangle should be fit into the
        window whether or not the map has a projection.


Revision 822 - Directory Listing
Modified Mon May 5 18:20:28 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapCanvas.FitLayerToWindow): New. Centers and
        scales the given layer on the canvas using the map projection.


Revision 821 - Directory Listing
Modified Mon May 5 18:20:15 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Added new "Full layer extent" menu option.
(MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
        when the user selects the menu option.


Revision 818 - Directory Listing
Modified Mon May 5 17:18:31 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 816 - Directory Listing
Modified Mon May 5 15:05:16 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 815 - Directory Listing
Modified Mon May 5 15:04:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add "..." to menu items that will open new dialogs.


Revision 814 - Directory Listing
Modified Mon May 5 15:04:42 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 813 - Directory Listing
Modified Mon May 5 15:04:21 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 812 - Directory Listing
Modified Mon May 5 15:04:06 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 808 - Directory Listing
Modified Mon May 5 10:33:47 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 806 - Directory Listing
Modified Fri May 2 16:43:59 2003 UTC (21 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
(MemoryTable): New. Quite simple table implementation that operates on a
list of tuples. All of the data are kept in the memory.


Revision 799 - Directory Listing
Modified Wed Apr 30 17:02:21 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 798 - Directory Listing
Modified Wed Apr 30 17:02:04 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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).


Revision 797 - Directory Listing
Modified Wed Apr 30 17:01:48 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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).


Revision 796 - Directory Listing
Modified Wed Apr 30 17:01:18 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Move menu item map_rename up.


Revision 795 - Directory Listing
Modified Wed Apr 30 17:01:06 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(LegendTree.MoveCurrentItemUp,
        LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
        groups are selected, move the layer up/down. Fixes RTbug #1833.


Revision 794 - Directory Listing
Modified Wed Apr 30 17:00:52 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 791 - Directory Listing
Modified Wed Apr 30 12:26:33 2003 UTC (21 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
(Layer.SetShapeStore): Fixed a bug: don't set the Classification to
None if the classfication field is None (ie only a DEFAULT).


Revision 789 - Directory Listing
Modified Wed Apr 30 11:06:00 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
Fix some typos.


Revision 787 - Directory Listing
Modified Wed Apr 30 10:57:24 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(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)


Revision 785 - Directory Listing
Modified Wed Apr 30 10:54:03 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 784 - Directory Listing
Modified Tue Apr 29 17:30:18 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Remove Thuban.common import and commented code that used Str2Num.


Revision 783 - Directory Listing
Modified Tue Apr 29 17:29:32 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Remove Thuban.common import.


Revision 782 - Directory Listing
Modified Tue Apr 29 16:53:55 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Remove all uses of Str2Num.
(ClassTable.SetValueAsCustom): Rename keyword argument in
        ClassGroup* constructors to match argument name.


Revision 781 - Directory Listing
Modified Tue Apr 29 16:53:38 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Remove all uses of Str2Num.


Revision 780 - Directory Listing
Modified Tue Apr 29 16:40:49 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
No longer needed Str2Num. RTbug #1832.


Revision 778 - Directory Listing
Modified Tue Apr 29 14:54:17 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(Session.Destroy): Explicitly close the
transient DB if it exists to make sure it doesn't leave a journal
file in the temp directory.


Revision 777 - Directory Listing
Modified Tue Apr 29 14:54:12 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(TransientDatabase.close): Set
self.conn to None after closing the connection to make sure it's
not closed twice


Revision 773 - Directory Listing
Modified Tue Apr 29 14:34:23 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_layer): Save visible parameter.


Revision 772 - Directory Listing
Modified Tue Apr 29 14:34:11 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionLoader.start_layer): Read visible parameter.


Revision 771 - Directory Listing
Modified Tue Apr 29 14:34:02 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(BaseLayer.__init__): Change default value of visible from 1 to True.
(Layer.__init__): Change default value of visible from 1 to True.


Revision 768 - Directory Listing
Modified Tue Apr 29 13:03:59 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.SetMap): Look up the
        legend dialog box and tell it to change its map to the one
        supplied to SetMap(). Fixes RTbug #1770.


Revision 765 - Directory Listing
Modified Tue Apr 29 12:42:14 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 763 - Directory Listing
Modified Tue Apr 29 10:55:26 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 760 - Directory Listing
Modified Tue Apr 29 09:01:52 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 759 - Directory Listing
Modified Tue Apr 29 09:01:35 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.SaveSessionAs): Dialog should be of type wxSAVE and
        should verify overwriting a file.


Revision 758 - Directory Listing
Modified Tue Apr 29 09:01:12 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 757 - Directory Listing
Modified Fri Apr 25 17:37:44 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
quick fix for a windows bug. wxWindows under MSW complains if you set a
selection to an invalid index.


Revision 754 - Directory Listing
Modified Fri Apr 25 14:48:15 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_projection): Make sure to save the name of the projection.


Revision 751 - Directory Listing
Modified Fri Apr 25 14:23:19 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 750 - Directory Listing
Modified Fri Apr 25 14:22:52 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.MapProjection): Set the dialog title to include the map's title.
(MainWindow.LayerProjection): Set the dialog title to include the layer's title.


Revision 749 - Directory Listing
Modified Fri Apr 25 14:22:35 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 747 - Directory Listing
Modified Fri Apr 25 11:02:08 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 745 - Directory Listing
Modified Fri Apr 25 10:26:50 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 744 - Directory Listing
Modified Fri Apr 25 10:26:35 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionLoader.start_projection): Remember the projection name and use it
        when constructing the Projection object.


Revision 741 - Directory Listing
Modified Fri Apr 25 09:14:27 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 740 - Directory Listing
Modified Fri Apr 25 09:14:04 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(SessionSaver.write_layer): Save projection information.


Revision 739 - Directory Listing
Modified Fri Apr 25 09:13:48 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Rename calls to ProjFile.GetFileName to ProjFile.GetFilename.


Revision 738 - Directory Listing
Modified Fri Apr 25 09:13:36 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 737 - Directory Listing
Modified Fri Apr 25 09:12:17 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(XMLReader.GetFilename): Renamed from XMLReader.GetFileName.
(SessionLoader): Added support for loading projection tags that
        appear inside a layer.


Revision 736 - Directory Listing
Modified Fri Apr 25 09:11:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Layer.TreeInfo): Add an item to the tree for projection information.


Revision 734 - Directory Listing
Modified Thu Apr 24 19:14:16 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(ProjFrame._OnSaveAs): Don't translate
empty strings.


Revision 730 - Directory Listing
Modified Thu Apr 24 16:07:41 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 729 - Directory Listing
Modified Thu Apr 24 16:06:51 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add a Projection option under the layer menu.
(MainWindow.LayerProjection): New. Open up a projection window for a layer.


Revision 728 - Directory Listing
Modified Thu Apr 24 16:06:28 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Change all references to genCombo to genChoice.


Revision 727 - Directory Listing
Modified Thu Apr 24 16:06:16 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 726 - Directory Listing
Modified Thu Apr 24 16:05:56 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 725 - Directory Listing
Modified Thu Apr 24 16:05:36 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Layer.GetProjection): New. Needed to implement the interface that the
        ProjFrame dialog expects.


Revision 723 - Directory Listing
Modified Thu Apr 24 15:31:53 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 722 - Directory Listing
Modified Thu Apr 24 10:12:29 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(XMLReader.read): Should have been checking if the file_or_filename object
        had the 'read' attribute.


Revision 718 - Directory Listing
Modified Wed Apr 23 10:39:46 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 717 - Directory Listing
Modified Wed Apr 23 08:59:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Projection dialog. Allows the user to select from a list
of projection templates and optionally edit them and save new ones.

(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.


Revision 713 - Directory Listing
Modified Wed Apr 23 08:46:54 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.Projection): Use new projection dialog.


Revision 712 - Directory Listing
Modified Wed Apr 23 08:46:40 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Classifier.__init__): Use a wxChoice control instead of a wxComboBox.


Revision 711 - Directory Listing
Modified Wed Apr 23 08:46:23 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 710 - Directory Listing
Modified Wed Apr 23 08:45:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(XMLWriter): Renamed from XMLSaver to promote symmetry.


Revision 709 - Directory Listing
Modified Wed Apr 23 08:45:44 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 708 - Directory Listing
Modified Wed Apr 23 08:44:52 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Projection.GetParameters): Renamed to GetAllParameters.
(Projection.GetParameter): Returns the value for the given parameter.


Revision 707 - Directory Listing
Modified Wed Apr 23 08:44:34 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Map.GetProjection): New. Returns the map's projection.


Revision 706 - Directory Listing
Modified Wed Apr 23 08:44:21 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 704 - Directory Listing
Modified Tue Apr 22 16:55:50 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
Remove some unused imports and global
constants


Revision 702 - Directory Listing
Modified Tue Apr 22 16:43:30 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(IdentifyListCtrl.selected_shape)
(IdentifyGridCtrl.selected_shape): Use table, not shapetable.


Revision 701 - Directory Listing
Modified Thu Apr 17 16:18:48 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
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__


Revision 699 - Directory Listing
Modified Thu Apr 17 15:20:14 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
(ThubanApplication.MainLoop): Removed.
In wxPython 2.4 there's no need to extend MainLoop anymore since
wxPython itself makes sure OnExit is called.


Revision 697 - Directory Listing
Modified Wed Apr 16 16:40:07 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(XMLSaver): New. Contains all the general XML writing methods that were
        part of SessionSaver.
(SessionSaver): Renamed from Saver.


Revision 696 - Directory Listing
Modified Wed Apr 16 16:39:49 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Contains general utilities for read and writing projection files.


Revision 695 - Directory Listing
Modified Wed Apr 16 16:39:36 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Projection.__init__): Accepts an optional name.
(ProjFile): New. Represents a file that contains projection information.


Revision 694 - Directory Listing
Modified Wed Apr 16 16:39:18 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(XMLProcessor): New. Contains all the general XML reading methods that
        were part of ProcessSession.


Revision 689 - Directory Listing
Modified Wed Apr 16 13:47:07 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 686 - Directory Listing
Modified Wed Apr 16 13:22:25 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 683 - Directory Listing
Modified Tue Apr 15 21:54:56 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Saver.write_classification): Need to save the group label.


Revision 682 - Directory Listing
Modified Tue Apr 15 21:54:43 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Implemented __repr__ to make debugging a bit easier.


Revision 681 - Directory Listing
Modified Tue Apr 15 21:54:32 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 679 - Directory Listing
Modified Tue Apr 15 19:46:37 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
fix missed renaming


Revision 678 - Directory Listing
Modified Tue Apr 15 19:21:26 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 677 - Directory Listing
Modified Tue Apr 15 19:21:01 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(GenUniformPanel): Fix spin control weirdness by setting the range to
        (1, maxint).


Revision 676 - Directory Listing
Modified Tue Apr 15 19:20:40 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_shape_layer): Make drawing initialization call to
        draw_polygon_init()
(MapRenderer.draw_polygon_shape): Use new signature of draw_polygon_shape.


Revision 671 - Directory Listing
Modified Tue Apr 15 18:09:47 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 668 - Directory Listing
Modified Mon Apr 14 17:12:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(LegendPanel.__init__): The toolbar should be allowed to grow within the sizer.
        Fixes a bug under Windows where the toolbar wasn't being drawn.


Revision 667 - Directory Listing
Modified Mon Apr 14 17:12:38 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 666 - Directory Listing
Modified Mon Apr 14 16:36:33 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Always assume the button bitmaps will be there. Code clean up.


Revision 665 - Directory Listing
Modified Mon Apr 14 16:35:19 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
remove print statement


Revision 661 - Directory Listing
Modified Mon Apr 14 14:16:00 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Classifier.__init__): Add a top level panel to the dialog so that the
background colors are consistent under Windows.


Revision 660 - Directory Listing
Modified Mon Apr 14 14:15:44 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGenDialog.__init__): Actively set the current selections in the combo
boxes. This is needed under Windows.


Revision 659 - Directory Listing
Modified Mon Apr 14 14:07:05 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixes some window resizing problems most noticable under windows.


Revision 658 - Directory Listing
Modified Mon Apr 14 14:06:30 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Call Create() at the end of __init__.


Revision 657 - Directory Listing
Modified Fri Apr 11 18:29:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
check in to test dock changes under windows.


Revision 655 - Directory Listing
Modified Fri Apr 11 15:50:13 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Enable/disable the legend buttons when the legend changes. Fixes RTbug #1793.


Revision 654 - Directory Listing
Modified Fri Apr 11 15:49:58 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Change color ramps to start at white not black.


Revision 653 - Directory Listing
Modified Fri Apr 11 14:28:29 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Added new menu item and associated code to open a dialog to rename the map.
(MainWindow): Use new resource class to import bitmaps.


Revision 652 - Directory Listing
Modified Fri Apr 11 14:28:08 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use new bitmaps for the control buttons.
(LegendTree._OnMsgLayerTitleChanged): Change the displayed title
        if the layer's title changes.


Revision 651 - Directory Listing
Modified Fri Apr 11 14:27:53 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use new bitmaps for the control buttons.


Revision 650 - Directory Listing
Modified Fri Apr 11 14:27:41 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 649 - Directory Listing
Modified Fri Apr 11 14:27:12 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 648 - Directory Listing
Modified Fri Apr 11 14:26:54 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Centralize the loading of resources such as bitmaps.


Revision 643 - Directory Listing
Modified Thu Apr 10 17:55:57 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGroupRange.__init__): Should pass group to ClassGroup constructor.


Revision 642 - Directory Listing
Modified Thu Apr 10 14:41:50 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
fixed bug where if there was no classification and the default was hidden,
the default was still being drawn.


Revision 641 - Directory Listing
Modified Thu Apr 10 14:36:19 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_shape_layer): Only draw visible groups.


Revision 640 - Directory Listing
Modified Thu Apr 10 14:36:08 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 639 - Directory Listing
Modified Thu Apr 10 14:35:39 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Classify button is now called "Properties".
Refactored the code to change variable names.
(LegendTree.__FillTreeLayer): Only list a group if it is visible.


Revision 638 - Directory Listing
Modified Thu Apr 10 14:35:20 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassTable): Add a new column for the "Visible" check boxes.
(Classifier): Rename the buttons and refactor the code to match the new labels.


Revision 637 - Directory Listing
Modified Thu Apr 10 14:35:03 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 635 - Directory Listing
Modified Wed Apr 9 15:42:25 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 633 - Directory Listing
Modified Wed Apr 9 10:11:07 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Import just the Classifier class.


Revision 632 - Directory Listing
Modified Wed Apr 9 10:10:53 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(LegendTree): Use a private method to
        consistently set the font and style of the text. Fixes RTbug #1786.


Revision 631 - Directory Listing
Modified Wed Apr 9 10:10:38 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 630 - Directory Listing
Modified Wed Apr 9 10:10:06 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 629 - Directory Listing
Modified Wed Apr 9 10:09:44 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 628 - Directory Listing
Modified Wed Apr 9 10:09:15 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 627 - Directory Listing
Modified Wed Apr 9 10:08:47 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Classification.__deepcopy__): Need to copy over field and fieldType attributes.


Revision 624 - Directory Listing
Modified Mon Apr 7 13:34:54 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
(main_menu): Move the toggle_legend item
to the map module


Revision 622 - Directory Listing
Modified Mon Apr 7 10:54:32 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 621 - Directory Listing
Modified Mon Apr 7 10:14:50 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use False instead of false.
(MainWindow.ShowLegend): Remove unnecessary switch parameter.


Revision 620 - Directory Listing
Modified Mon Apr 7 10:14:25 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fix Windows problem.


Revision 616 - Directory Listing
Modified Mon Apr 7 08:57:38 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Put "Show Legend" and "Show Session Tree" into the same group.


Revision 615 - Directory Listing
Modified Mon Apr 7 08:57:20 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 614 - Directory Listing
Modified Mon Apr 7 08:56:38 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use Classification.AppendGroup(), not AddGroup()


Revision 613 - Directory Listing
Modified Mon Apr 7 08:55:55 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 611 - Directory Listing
Modified Fri Apr 4 16:34:46 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 610 - Directory Listing
Modified Fri Apr 4 13:56:59 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Rename Color.None to Color.Transparent.


Revision 609 - Directory Listing
Modified Fri Apr 4 13:55:59 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Rename Color.None to
        Color.Transparent.
(ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
        Don't bother copying the color, since Colors are immutable.


Revision 607 - Directory Listing
Modified Fri Apr 4 12:16:57 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 606 - Directory Listing
Modified Fri Apr 4 12:16:39 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 605 - Directory Listing
Modified Fri Apr 4 12:16:13 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fix assert calls.


Revision 604 - Directory Listing
Modified Fri Apr 4 12:15:31 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 602 - Directory Listing
Modified Fri Apr 4 12:12:18 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fix assert calls.
    (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
    Copy the color parameter rather than hold onto a reference.


Revision 592 - Directory Listing
Modified Wed Apr 2 18:26:12 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
(ThubanApplication.OpenSession): Make
sure the filename is absolute to avoid problems when saving the
session again


Revision 590 - Directory Listing
Modified Wed Apr 2 15:03:19 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
Remove unnecessary import. Fix a typo.


Revision 588 - Directory Listing
Modified Tue Apr 1 15:58:02 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 583 - Directory Listing
Modified Tue Apr 1 10:22:16 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(DockableWindow._OnButtonClose): Call
        self.Destroy() to close the window after yesterday's changes.


Revision 582 - Directory Listing
Modified Tue Apr 1 10:22:01 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use LAYER_CHANGED instead of LAYER_LEGEND_CHANGED.


Revision 580 - Directory Listing
Modified Mon Mar 31 18:32:22 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Renamed OnClose to _OnClose for
        symmetry with other such methods.
(MainWindow.ShowLegend): Show the legend docked by default.


Revision 579 - Directory Listing
Modified Mon Mar 31 18:32:07 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Show the legend by default when Thuban starts.


Revision 578 - Directory Listing
Modified Mon Mar 31 18:31:46 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 577 - Directory Listing
Modified Mon Mar 31 18:31:33 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 576 - Directory Listing
Modified Mon Mar 31 18:31:17 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Commented out some debugging statements.
(ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
        RTbug #1769.


Revision 574 - Directory Listing
Modified Fri Mar 28 17:07:26 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapRenderer.__init__): Added assert
        to check if scale > 0. Trying to track down a divide by zero.


Revision 573 - Directory Listing
Modified Fri Mar 28 17:07:06 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Removed legend specific code and replaced it with calls to the new dock code.


Revision 572 - Directory Listing
Modified Fri Mar 28 17:06:50 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Modifications to support selecting a
        specific group in the classification dialog. Changed how layers
        are drawn when the layer is visible/invisible.


Revision 571 - Directory Listing
Modified Fri Mar 28 17:06:38 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 570 - Directory Listing
Modified Fri Mar 28 17:06:26 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 568 - Directory Listing
Modified Wed Mar 26 11:51:28 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 566 - Directory Listing
Modified Wed Mar 26 11:10:41 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Added missing import line.


Revision 565 - Directory Listing
Modified Wed Mar 26 11:07:40 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapCanves.SetMap): Listen for LAYER_CHANGED, not LAYER_LEGEND_CHANGED,messages.


Revision 564 - Directory Listing
Modified Wed Mar 26 11:07:19 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Added DOCKABLE_* messages.


Revision 563 - Directory Listing
Modified Wed Mar 26 11:07:02 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 562 - Directory Listing
Modified Wed Mar 26 11:06:22 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Added some more buttons and made the LegendPanel a DockPanel.


Revision 561 - Directory Listing
Modified Wed Mar 26 11:06:01 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Classes for the DockPanel and DockableWindow.


Revision 560 - Directory Listing
Modified Wed Mar 26 11:05:47 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 559 - Directory Listing
Modified Wed Mar 26 11:05:33 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Map): Forward LAYER_CHANGED messages.


Revision 558 - Directory Listing
Modified Wed Mar 26 11:05:20 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Layer.ClassChanged): Send a LAYER_CHANGED message, not a
LAYER_LEGEND_CHANGED message.


Revision 551 - Directory Listing
Modified Thu Mar 20 09:45:33 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use new message names.


Revision 550 - Directory Listing
Modified Thu Mar 20 09:45:19 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
New code to open the legend.


Revision 549 - Directory Listing
Modified Thu Mar 20 09:45:07 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
 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.


Revision 548 - Directory Listing
Modified Thu Mar 20 09:44:49 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Rename and use new messages.


Revision 547 - Directory Listing
Modified Thu Mar 20 09:44:35 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 546 - Directory Listing
Modified Thu Mar 20 09:44:20 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Map): Rename messages and use new, more specific, messages.


Revision 545 - Directory Listing
Modified Thu Mar 20 09:44:04 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Layer.SetClassification): Generate a LAYER_CHANGED event instead of a
LAYER_LEGEND_CHANGED event.


Revision 544 - Directory Listing
Modified Thu Mar 20 09:43:48 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGroup.GetDisplayText): New.  Returns a string which is appropriately
describes the group.


Revision 542 - Directory Listing
Modified Thu Mar 20 09:43:16 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 540 - Directory Listing
Modified Wed Mar 19 15:37:24 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(verify_versions): New. Checks the versions of Python, wxPython,
and some other libraries.


Revision 535 - Directory Listing
Modified Fri Mar 14 20:42:18 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
Implement multiple selected shapes

* 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/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.


Revision 529 - Directory Listing
Modified Wed Mar 12 19:55:24 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 528 - Directory Listing
Modified Wed Mar 12 19:55:13 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
This comment is really for layer.py, but the motive was the same for
classification.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.


Revision 526 - Directory Listing
Modified Wed Mar 12 19:17:49 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Comments, and an extra import.


Revision 525 - Directory Listing
Modified Wed Mar 12 19:12:30 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Testing fix for xml reader exceptions.


Revision 524 - Directory Listing
Modified Wed Mar 12 18:26:55 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixed external entity problem.


Revision 521 - Directory Listing
Modified Wed Mar 12 13:18:50 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Create an empty image to use when there is no special image for an item.


Revision 520 - Directory Listing
Modified Wed Mar 12 10:35:49 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Try using a 0x0 image for items that don't need an image so that the
tree looks OK under Windows.


Revision 519 - Directory Listing
Modified Tue Mar 11 22:27:35 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Undo last changes so that we now need wxWindows2.4


Revision 518 - Directory Listing
Modified Tue Mar 11 17:34:21 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use True instead of true.


Revision 517 - Directory Listing
Modified Tue Mar 11 17:28:39 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
About window shows version number.


Revision 513 - Directory Listing
Modified Tue Mar 11 16:42:38 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Quick fix so that the ClassGrid works on wxWindows 2.3.


Revision 512 - Directory Listing
Modified Tue Mar 11 16:32:39 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Use True instead of true.


Revision 511 - Directory Listing
Modified Tue Mar 11 16:27:52 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
More work with the classifier panel.


Revision 510 - Directory Listing
Modified Tue Mar 11 16:05:18 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixed problem with unwanted tree item images under Windows.


Revision 509 - Directory Listing
Modified Tue Mar 11 09:45:59 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Working to get wxPanel to behave correctly.


Revision 508 - Directory Listing
Modified Tue Mar 11 09:45:31 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
 Add normal border.


Revision 507 - Directory Listing
Modified Mon Mar 10 17:36:42 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Add normal border to SelectPropertiesDialog.


Revision 506 - Directory Listing
Modified Mon Mar 10 15:49:22 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 504 - Directory Listing
Modified Mon Mar 10 15:12:24 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Changed SESSION_CHANGED to SESSION_REPLACED.  Go back to using OnClose()
instead of Shutdown().


Revision 503 - Directory Listing
Modified Mon Mar 10 15:12:09 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Changed SESSION_CHANGED to SESSION_REPLACED.


Revision 502 - Directory Listing
Modified Mon Mar 10 15:11:53 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.prepare_new_session): Call Close() instead of Shutdown().


Revision 501 - Directory Listing
Modified Mon Mar 10 15:11:39 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Don't need Shutdown(); just use Close()!


Revision 500 - Directory Listing
Modified Mon Mar 10 15:11:24 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Wrap text with _().
(ClassGrid.CreateTable): Set dimensions and size hints here,
        instead of in Reset, so we only set the size once.


Revision 498 - Directory Listing
Modified Mon Mar 10 11:03:22 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(Classifier): SelectField() needed
        to know the old field index as well as the new one.


Revision 496 - Directory Listing
Modified Mon Mar 10 10:54:50 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 493 - Directory Listing
Modified Mon Mar 10 10:45:10 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
Comment out print statement


Revision 492 - Directory Listing
Modified Mon Mar 10 10:44:57 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
 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.


Revision 491 - Directory Listing
Modified Mon Mar 10 10:44:42 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 489 - Directory Listing
Modified Fri Mar 7 18:22:47 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
removed print statement


Revision 488 - Directory Listing
Modified Fri Mar 7 18:21:25 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 487 - Directory Listing
Modified Fri Mar 7 18:21:03 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 486 - Directory Listing
Modified Fri Mar 7 18:20:46 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 485 - Directory Listing
Modified Fri Mar 7 18:20:31 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 484 - Directory Listing
Modified Fri Mar 7 18:20:10 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 481 - Directory Listing
Modified Thu Mar 6 16:46:36 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(SetClassification): prevent recursion between this method and
Classification.SetLayer().


Revision 480 - Directory Listing
Modified Thu Mar 6 16:46:19 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Addition of __eq__ and __ne__ methods.


Revision 479 - Directory Listing
Modified Thu Mar 6 16:46:07 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Minor documentation changes, Addition of __eq__ and __ne__ methods.
(Classification.SetLayer): prevent recursion between this method
        and Layer.SetClassification().


Revision 476 - Directory Listing
Modified Thu Mar 6 15:03:37 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban
(ClassGrid.__init__)
(ClassGrid.CreateTable): Move the SetSelectionMode call to
CreateTable because otherwise it triggers an assertion in
wxPython/wxGTK 2.4.


Revision 474 - Directory Listing
Modified Wed Mar 5 18:40:03 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Put FIELDTYPE constants back


Revision 473 - Directory Listing
Modified Wed Mar 5 18:39:45 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
import FIELDTYPE constants from table


Revision 472 - Directory Listing
Modified Wed Mar 5 18:39:12 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Move FIELDTYPE constants back to table.py


Revision 469 - Directory Listing
Modified Wed Mar 5 18:19:25 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Function name changes.


Revision 468 - Directory Listing
Modified Wed Mar 5 18:19:13 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 467 - Directory Listing
Modified Wed Mar 5 18:18:38 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Put FIELDTYPE constants in common.py.  (Table): Add field_info_by_name() to
retrieve field information by specifying the field name, not the number.


Revision 466 - Directory Listing
Modified Wed Mar 5 18:18:20 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(Saver): Store field type information.


Revision 465 - Directory Listing
Modified Wed Mar 5 18:18:06 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(ProcessSession): Use proper string conversion function; fixes RTbug #1713.


Revision 464 - Directory Listing
Modified Wed Mar 5 18:17:47 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(Layer): Add GetFieldType to retreive the kind of data represented by a field.


Revision 463 - Directory Listing
Modified Wed Mar 5 18:17:30 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Documentation.


Revision 462 - Directory Listing
Modified Wed Mar 5 18:17:17 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 461 - Directory Listing
Modified Wed Mar 5 18:16:45 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Moved FIELDTYPE constants from table.py (Str2Num):
Only catch ValueError exceptions.


Revision 460 - Directory Listing
Modified Wed Mar 5 18:16:28 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 455 - Directory Listing
Modified Tue Mar 4 11:32:20 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban
(ClassGrid.__init__): Set the table
before the selection mode. Doing it the other way round triggers
an assertion in wxWindows.


Revision 454 - Directory Listing
Modified Tue Mar 4 11:31:47 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban
(escape): Fix typo in doc-string


Revision 453 - Directory Listing
Modified Tue Mar 4 11:31:39 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban
Remove unnecessary wxPython import


Revision 451 - Directory Listing
Modified Tue Mar 4 10:33:56 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 450 - Directory Listing
Modified Tue Mar 4 10:33:28 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Use Layer.GetClassification() since the class attribute __classification is
now private.


Revision 449 - Directory Listing
Modified Tue Mar 4 10:33:08 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(ClassGroupRange.GetProperties): Parameter 'value' should default to None.


Revision 444 - Directory Listing
Modified Thu Feb 27 16:02:59 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Fix to create a tuple with a single value instead of simply returning the value.


Revision 443 - Directory Listing
Modified Thu Feb 27 15:55:42 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Use common.py functions.


Revision 442 - Directory Listing
Modified Thu Feb 27 15:55:25 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Use new Classification and Group functions.  Use common.py functions.


Revision 441 - Directory Listing
Modified Thu Feb 27 15:55:00 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Changes to use new Classification and Group functions.


Revision 440 - Directory Listing
Modified Thu Feb 27 15:54:27 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixes a test case failure.
(Saver.write_classification): Use new Classification and Group functions.


Revision 439 - Directory Listing
Modified Thu Feb 27 15:54:05 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Use new Classification and Group functions.


Revision 438 - Directory Listing
Modified Thu Feb 27 15:53:48 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Common functions used in several UI modules


Revision 437 - Directory Listing
Modified Thu Feb 27 15:53:21 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Fixed name resolution problem.


Revision 436 - Directory Listing
Modified Thu Feb 27 15:53:03 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
 Changed the class hierarchy
        so that a Classification consists of Groups which return
        Properties when a value matches a Group.


Revision 435 - Directory Listing
Modified Thu Feb 27 15:52:48 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 433 - Directory Listing
Modified Mon Feb 24 18:47:49 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapCanvas.find_shape_at): Use method calls
        instead of accessing now non-existent class variables.


Revision 432 - Directory Listing
Modified Mon Feb 24 18:47:36 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_shape_layer): Change
        Classification method name from GetProperties to GetClassData.


Revision 431 - Directory Listing
Modified Mon Feb 24 18:47:21 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(MainWindow.OpenSession,
        MainWindow.SaveSessionAs): Text string changes so the dialogs
        have more meaningful titles.


Revision 430 - Directory Listing
Modified Mon Feb 24 18:47:06 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(SelectPropertiesDialog): Support
        for changing the stroke and fill colors and previewing the
        changes.


Revision 429 - Directory Listing
Modified Mon Feb 24 18:46:51 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(Saver.write_classificaton): Uses
        the new iterator to save the classification information.


Revision 428 - Directory Listing
Modified Mon Feb 24 18:46:35 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(Classification): Renamed
        GetProperties() to GetClassData(). Used the new iterator
        in TreeInfo().
(ClassIterator): Iterator implementation to iterate over the
        ClassData objects in a classification object.


Revision 427 - Directory Listing
Modified Mon Feb 24 18:46:13 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(Color2wxColour, wxColour2Color): Conversion functions from Thuban color
objects to wxWindow colour objects.


Revision 424 - Directory Listing
Modified Mon Feb 24 14:17:07 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban
(MapRenderer.draw_shape_layer): Remove
unneeded Shape() call. Rendering is substantially faster without
it and it avoids some problems with broken shape files.


Revision 422 - Directory Listing
Modified Thu Feb 20 16:23:31 2003 UTC (22 years ago) by frank
Original Path: trunk/thuban/Thuban
(IdentifyView.__init__): Set size of dialog.


Revision 421 - Directory Listing
Modified Thu Feb 20 16:23:12 2003 UTC (22 years ago) by frank
Original Path: trunk/thuban/Thuban
(LabelDialog.dialog_layout): Set size of listctrl.


Revision 420 - Directory Listing
Modified Thu Feb 20 16:22:46 2003 UTC (22 years ago) by frank
Original Path: trunk/thuban/Thuban
(RecordListCtrl): Set minimal width for columns.


Revision 419 - Directory Listing
Modified Wed Feb 19 16:53:55 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
New. Contains common routines used throughout
        the code.
(Str2Num): Takes a string and converts it to the "best" type of
        number.


Revision 417 - Directory Listing
Modified Wed Feb 19 16:53:22 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Formatting changes.


Revision 416 - Directory Listing
Modified Wed Feb 19 16:53:08 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
Use new Color and Classification methods.


Revision 415 - Directory Listing
Modified Wed Feb 19 16:52:51 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 414 - Directory Listing
Modified Wed Feb 19 16:52:23 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(Saver): Use new Color and Classification methods


Revision 413 - Directory Listing
Modified Wed Feb 19 16:52:04 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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.


Revision 412 - Directory Listing
Modified Wed Feb 19 16:51:50 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(Layer): Removed references to fill, stroke,
        stroke_width attributes. Made the 'classification' attribute private.
        New methods for setting/getting the classification.


Revision 411 - Directory Listing
Modified Wed Feb 19 16:51:30 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 410 - Directory Listing
Modified Wed Feb 19 16:51:12 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
(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).


Revision 404 - Directory Listing
Modified Fri Feb 14 17:40:26 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban
(MapCanvas.OnLeftUp): Make sure that the
dragging flag is always set to 0 even when the tool implementation
raises an exception


Revision 401 - Directory Listing
Modified Tue Feb 11 15:19:21 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban
(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.
(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


Revision 400 - Directory Listing
Modified Tue Feb 11 14:29:09 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
typo fix


Revision 398 - Directory Listing
Modified Tue Feb 11 14:23:45 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* Thuban/UI/classifier.py (ClassTable): Didn't need to hang
        onto the clinfo parameter, so removed the deepcopy().


Revision 397 - Directory Listing
Modified Tue Feb 11 14:23:32 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* Thuban/Model/classification.py: Added import line to fix
        feature conflicts between running on python2.2 and python2.1.


Revision 394 - Directory Listing
Modified Mon Feb 10 15:27:13 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
        of the ClassData class.


Revision 393 - Directory Listing
Modified Mon Feb 10 15:26:54 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
        methods of the Classification class.


Revision 392 - Directory Listing
Modified Mon Feb 10 15:26:30 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* Thuban/UI/classifier.py (ClassRenderer): New class to
        draw the classifications in the dialog box's table.
        (Classifier): Modified to use the ClassRenderer class.


Revision 391 - Directory Listing
Modified Mon Feb 10 15:26:11 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* 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.


Revision 390 - Directory Listing
Modified Mon Feb 10 15:25:49 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* Thuban/Model/load.py (ProcessSession): Use the new ClassData
        object instead of a dictionary.


Revision 389 - Directory Listing
Modified Mon Feb 10 15:25:30 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* 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.


Revision 388 - Directory Listing
Modified Mon Feb 10 15:25:05 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban
* 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


Revision 386 - Directory Listing
Modified Mon Feb 3 11:44:27 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
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.


Revision 385 - Directory Listing
Modified Mon Feb 3 11:43:56 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Added getNull() to return the NullData reference


Revision 383 - Directory Listing
Modified Tue Jan 28 18:38:03 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Handle drawing Colors in the tree view.


Revision 382 - Directory Listing
Modified Tue Jan 28 18:37:35 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Added a call to build the tree info for classifications. Commented out
unnecessary lines.


Revision 381 - Directory Listing
Modified Tue Jan 28 18:37:05 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
New function TreeInfo to add information about the classification
into the tree view.


Revision 379 - Directory Listing
Modified Tue Jan 28 12:54:01 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
added i18n wrapper _() to text


Revision 378 - Directory Listing
Modified Tue Jan 28 12:13:28 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
fixed merging conflict


Revision 377 - Directory Listing
Modified Tue Jan 28 12:09:56 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
fixed a missed conflict


Revision 376 - Directory Listing
Modified Tue Jan 28 12:01:38 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
fix i18n merge conflict


Revision 374 - Directory Listing
Modified Mon Jan 27 14:20:02 2003 UTC (22 years, 1 month ago) by jan
Original Path: trunk/thuban/Thuban
Replace user string by _() for i18n.


Revision 373 - Directory Listing
Modified Mon Jan 27 14:11:43 2003 UTC (22 years, 1 month ago) by jan
Original Path: trunk/thuban/Thuban
(_): New.


Revision 372 - Directory Listing
Modified Mon Jan 27 13:50:58 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Dialog box for modifying classification information


Revision 371 - Directory Listing
Modified Mon Jan 27 13:49:39 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
Encapsulates classification information for a layer


Revision 366 - Directory Listing
Modified Mon Jan 27 11:48:17 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
added support to save classification information


Revision 365 - Directory Listing
Modified Mon Jan 27 11:47:53 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
added support to load classification information


Revision 364 - Directory Listing
Modified Mon Jan 27 11:47:12 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
added classification initializations


Revision 363 - Directory Listing
Modified Mon Jan 27 11:40:13 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
added 'Classify' option in 'Layer' menu


Revision 362 - Directory Listing
Modified Mon Jan 27 11:39:03 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban
added support for drawing classifications


Revision 357 - Directory Listing
Modified Mon Dec 9 10:32:27 2002 UTC (22 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.update_command_ui): If an
active tool's command turns insensitive, disable the tool.
(_tool_command): Use the new ToolCommand class


Revision 356 - Directory Listing
Modified Mon Dec 9 10:32:15 2002 UTC (22 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 355 - Directory Listing
Modified Mon Dec 9 10:31:58 2002 UTC (22 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban
(ToolCommand): New class for tool commands.
(Command.IsTool): New method to distinguish between command
switching tools and other commands.


Revision 353 - Directory Listing
Modified Tue Dec 3 17:35:30 2002 UTC (22 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 351 - Directory Listing
Modified Wed Nov 6 14:46:33 2002 UTC (22 years, 4 months ago) by frank
Original Path: trunk/thuban/Thuban
Altered the order of tools in the toolbar:
First now are all navigation tools (Zoom In/Out, Pan, Full Extent).


Revision 346 - Directory Listing
Modified Wed Oct 23 14:45:28 2002 UTC (22 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.About): Add 2002 to copyright notice.


Revision 339 - Directory Listing
Modified Fri Sep 20 17:27:36 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
Fixup some whitespace and typos


Revision 321 - Directory Listing
Modified Fri Sep 13 14:21:48 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 320 - Directory Listing
Modified Fri Sep 13 14:21:30 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(Modifiable.UnsetModified): Issue a CHANGED
event if the modified flag changes.
(Modifiable.changed): Tweak the doc-string.


Revision 319 - Directory Listing
Modified Fri Sep 13 14:21:24 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(Map.forwarded_channels): Forward the
CHANGED channel too.
(Map.__init__): Call the Modifiable constructor as well.


Revision 318 - Directory Listing
Modified Fri Sep 13 14:21:12 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(Session.forwarded_channels): Forward
the CHANGED channel too.


Revision 316 - Directory Listing
Modified Thu Sep 12 18:46:01 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.RunMessageBox): Center the
message box on the main window.


Revision 314 - Directory Listing
Modified Wed Sep 11 15:18:09 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.build_menu): remove an incorrect comment.


Revision 312 - Directory Listing
Modified Wed Sep 11 13:59:37 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
Underline the 'x' in "Exit" instead of
the 'E' because it's less likely to interfere with other menu
entries.


Revision 310 - Directory Listing
Modified Tue Sep 10 16:45:22 2002 UTC (22 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 307 - Directory Listing
Modified Fri Sep 6 10:01:16 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.OnClose): Unsubscribe VIEW_POSITION


Revision 303 - Directory Listing
Modified Mon Sep 2 16:47:53 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 301 - Directory Listing
Modified Mon Sep 2 15:59:11 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 299 - Directory Listing
Modified Fri Aug 30 17:41:04 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 298 - Directory Listing
Modified Fri Aug 30 17:40:52 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(Map.CanRemoveLayer): New method to
determine whether a given layer can be deleted.


Revision 296 - Directory Listing
Modified Fri Aug 30 16:10:45 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
(MapCanvas.do_redraw): Get rid of the unused update_region
instance variable


Revision 295 - Directory Listing
Modified Fri Aug 30 10:39:17 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
Add some more doc-strings.


Revision 293 - Directory Listing
Modified Fri Aug 30 10:18:50 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
Add/update some doc-strings.


Revision 290 - Directory Listing
Modified Thu Aug 29 14:11:28 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(ScreenRenderer.draw_shape_layer): Handle
arcs with multiple parts.


Revision 288 - Directory Listing
Modified Thu Aug 29 13:31:43 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
Handle degenrate rectangles.


Revision 286 - Directory Listing
Modified Thu Aug 29 11:21:52 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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


Revision 284 - Directory Listing
Modified Tue Aug 27 14:08:32 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(Table.write_record, Table.__init__): Open
dbf files only for reading by default. Use a new writable dbf
object for writing.


Revision 281 - Directory Listing
Modified Mon Aug 26 18:16:36 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 279 - Directory Listing
Modified Mon Aug 26 15:06:01 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(LayerTableGrid.select_shape): Remove a debug print


Revision 278 - Directory Listing
Modified Mon Aug 26 12:50:23 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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

* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
LayerTableFrame


Revision 276 - Directory Listing
Modified Fri Aug 23 15:25:07 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(Layer.__init__): Make sure we have an
absolute filename.


Revision 274 - Directory Listing
Modified Thu Aug 22 16:25:46 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 270 - Directory Listing
Modified Thu Aug 22 13:46:46 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 268 - Directory Listing
Modified Thu Aug 22 10:25:43 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 267 - Directory Listing
Modified Thu Aug 22 10:25:30 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 264 - Directory Listing
Modified Fri Aug 16 17:06:38 2002 UTC (22 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban
menu item 'show session tree' now disable if tree window already open


Revision 261 - Directory Listing
Modified Thu Aug 15 17:44:33 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(MapCanvas.OnLeftUp): Only release the mouse
when we have actually captured it.


Revision 260 - Directory Listing
Modified Thu Aug 15 17:43:59 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
with self.


Revision 258 - Directory Listing
Modified Thu Aug 15 12:48:03 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(Layer.Destroy): New. Explicitly close the
shapefile and destroy the table.


Revision 257 - Directory Listing
Modified Thu Aug 15 12:47:59 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(Table.Destroy): New. Close the DBF file.


Revision 255 - Directory Listing
Modified Wed Aug 14 15:08:01 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(RecordTable.__init__): Remove the unused
instance variable columns
(RecordTable.GetTypeName): row and col may be negative in some
cases.


Revision 251 - Directory Listing
Modified Tue Jul 30 14:18:40 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(ThubanApplication.OnExit): Do some cleanup.
(ThubanApplication.MainLoop): Extend to automatically call OnExit.


Revision 250 - Directory Listing
Modified Tue Jul 30 14:17:58 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(Session.Destroy): Don't bypass the
direct base class' Destroy method.


Revision 249 - Directory Listing
Modified Tue Jul 30 14:17:33 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 248 - Directory Listing
Modified Tue Jul 30 14:15:39 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(LabelLayer.ClearLabels): New to delete
all labels.


Revision 246 - Directory Listing
Modified Mon Jul 29 13:38:04 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 245 - Directory Listing
Modified Mon Jul 29 13:37:55 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 242 - Directory Listing
Modified Wed Jul 24 17:16:31 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(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.


Revision 241 - Directory Listing
Modified Wed Jul 24 17:16:17 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(Session.RemoveMap): New


Revision 240 - Directory Listing
Modified Wed Jul 24 17:16:09 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(Modifiable.changed): Apply the args tuple,
don't pass it as a parameter


Revision 239 - Directory Listing
Modified Wed Jul 24 17:15:54 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(ZoomOutTool.MouseUp): Use the correct
x-coordinate in case of simple clicks


Revision 238 - Directory Listing
Modified Wed Jul 24 10:19:46 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.__init__): Turn the initial
window size into a parameter.


Revision 236 - Directory Listing
Modified Tue Jul 23 16:53:14 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
(Menu.item_index): Also search for menus not
just commands.


Revision 235 - Directory Listing
Modified Tue Jul 23 10:56:29 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 233 - Directory Listing
Modified Fri Jul 19 15:15:16 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 232 - Directory Listing
Modified Fri Jul 19 15:14:57 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 231 - Directory Listing
Modified Fri Jul 19 15:13:05 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.


Revision 230 - Directory Listing
Modified Fri Jul 19 13:21:14 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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.


Revision 229 - Directory Listing
Modified Thu Jul 18 16:27:44 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
	the main window with self.


Revision 227 - Directory Listing
Modified Thu Jul 18 16:27:11 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 226 - Directory Listing
Modified Thu Jul 18 16:26:11 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/main.py (main): app no longer needs to be global


Revision 222 - Directory Listing
Modified Thu Jul 18 13:03:08 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 221 - Directory Listing
Modified Thu Jul 18 13:01:55 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/command.py (Command): Update doc string.


Revision 220 - Directory Listing
Modified Thu Jul 18 13:00:37 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
New module with the context class


Revision 219 - Directory Listing
Modified Thu Jul 18 12:55:07 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/application.py (ThubanApplication.SetSession): Add
	doc-string
	(ThubanApplication.Session): New method to return the session
	object


Revision 218 - Directory Listing
Modified Thu Jul 18 12:54:48 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 217 - Directory Listing
Modified Wed Jul 17 10:50:40 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 215 - Directory Listing
Modified Tue Jul 16 15:26:06 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 214 - Directory Listing
Modified Tue Jul 16 15:25:24 2002 UTC (22 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
	completely


Revision 201 - Directory Listing
Modified Mon Jul 8 10:50:53 2002 UTC (22 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 198 - Directory Listing
Modified Thu Jun 20 15:24:26 2002 UTC (22 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban
(SessionTreeCrtl:update_tree): Added visualization
of Extension titles and title and names of its objects.


Revision 197 - Directory Listing
Modified Thu Jun 20 15:20:58 2002 UTC (22 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban
Session.Extensions, Session.HasExtensions, Session.AddExtension:
new for handling extensions.
Also some other minor changes to round up extension handling.


Revision 196 - Directory Listing
Modified Thu Jun 20 15:15:18 2002 UTC (22 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban
new messages for extensions.


Revision 195 - Directory Listing
Modified Thu Jun 20 15:12:01 2002 UTC (22 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban
new module to handle extension objects.


Revision 193 - Directory Listing
Modified Wed May 29 10:33:41 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
	the events for a comnmand.
	(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.


Revision 191 - Directory Listing
Modified Tue May 28 16:04:49 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 189 - Directory Listing
Modified Tue May 28 12:39:17 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/application.py (ThubanApplication.OnInit): Read the
	startup file
	(ThubanApplication.read_startup_files): New method to run
	~/.thuban/thubanstart.py


Revision 188 - Directory Listing
Modified Tue May 28 12:38:45 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 187 - Directory Listing
Modified Tue May 28 12:38:17 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/menu.py: New module to build and manage menus.


Revision 185 - Directory Listing
Modified Thu May 23 15:37:39 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
	layer_outline_color. Fix it in the definition of the command too.


Revision 183 - Directory Listing
Modified Thu May 23 14:59:11 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/command.py (Command): Fix typo in doc string


Revision 181 - Directory Listing
Modified Wed May 22 13:42:04 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
	in the docstring


Revision 179 - Directory Listing
Modified Wed May 15 14:02:49 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 178 - Directory Listing
Modified Wed May 15 14:02:20 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
	the layer's bbox being None.


Revision 177 - Directory Listing
Modified Wed May 15 14:02:09 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
	layer's bbox being None.


Revision 176 - Directory Listing
Modified Wed May 15 13:38:49 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
remove some debug prints


Revision 174 - Directory Listing
Modified Wed May 15 13:30:00 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 173 - Directory Listing
Modified Wed May 15 13:29:34 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 171 - Directory Listing
Modified Tue May 14 14:16:24 2002 UTC (22 years, 9 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
	maximum depth for the tree than shapelib does by default.


Revision 161 - Directory Listing
Modified Wed May 8 13:47:10 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
	debug print and set session to None after unsubscribing


Revision 159 - Directory Listing
Modified Wed May 8 13:46:15 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 151 - Directory Listing
Modified Tue May 7 17:01:35 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 150 - Directory Listing
Modified Tue May 7 16:55:38 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
	Session Tree" command to the file menu.


Revision 149 - Directory Listing
Modified Tue May 7 16:41:07 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
	as update_region to the renderer.


Revision 148 - Directory Listing
Modified Tue May 7 16:40:29 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/renderer.py
	(ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
	update box is now directly a tuple, not a wxRect anymore.


Revision 147 - Directory Listing
Modified Tue May 7 16:39:52 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
	prints.


Revision 145 - Directory Listing
Modified Tue May 7 14:58:05 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 144 - Directory Listing
Modified Tue May 7 14:54:02 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.
	(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.


Revision 143 - Directory Listing
Modified Tue May 7 14:17:20 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 130 - Directory Listing
Modified Fri May 3 14:50:18 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
	MainWindow.OpenSession): Change the file extension of the session
	files to .thuban


Revision 128 - Directory Listing
Modified Fri May 3 14:38:16 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/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.


Revision 127 - Directory Listing
Modified Fri May 3 14:37:46 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
	typo and some rewording).


Revision 125 - Directory Listing
Modified Thu May 2 18:55:33 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 123 - Directory Listing
Modified Mon Apr 29 18:05:04 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 122 - Directory Listing
Modified Mon Apr 29 18:04:54 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 121 - Directory Listing
Modified Mon Apr 29 18:04:32 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/messages.py (VIEW_POSITION): New message for the
	position in the statusbar


Revision 119 - Directory Listing
Modified Fri Apr 26 09:30:41 2002 UTC (22 years, 10 months ago) by frank
Original Path: trunk/thuban/Thuban
AddLayer: Dialog title changed: s/session/data


Revision 115 - Directory Listing
Modified Mon Apr 22 11:30:20 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
added test for None on map bounding box


Revision 113 - Directory Listing
Modified Sun Apr 21 17:38:50 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
removed old comments


Revision 112 - Directory Listing
Modified Sun Apr 21 17:30:37 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
added propose dialog for UMT Zone


Revision 111 - Directory Listing
Modified Sun Apr 21 17:29:50 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
added map extent to tree view


Revision 110 - Directory Listing
Modified Sun Apr 21 17:28:16 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
added full-extent to toolbar; adapted proj4 call


Revision 105 - Directory Listing
Modified Fri Apr 19 15:36:57 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
convert projection parameters from unicode to regular string


Revision 104 - Directory Listing
Modified Fri Apr 19 14:46:08 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
add filename and modified status to tree view


Revision 103 - Directory Listing
Modified Fri Apr 19 14:23:24 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
new session don't have a filename


Revision 102 - Directory Listing
Modified Fri Apr 19 14:22:25 2002 UTC (22 years, 10 months ago) by jan
Original Path: trunk/thuban/Thuban
launch save as dialog for saving new sessions


Revision 84 - Directory Listing
Modified Wed Apr 3 15:21:46 2002 UTC (22 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
	Layer" and "Remove Layer" commands from the layer menu to the map
	menu


Revision 82 - Directory Listing
Modified Fri Feb 15 17:11:04 2002 UTC (23 years ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/layer.py (Layer.Shape): list append only takes one
	argument (python <= 1.5.2 erroneously accepted multiuple
	arguments)


Revision 80 - Directory Listing
Modified Mon Feb 4 19:53:01 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 79 - Directory Listing
Modified Mon Feb 4 19:50:28 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
	implementing a grid for a single row of a thuban table.


Revision 78 - Directory Listing
Modified Mon Feb 4 19:37:16 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 77 - Directory Listing
Modified Mon Feb 4 19:27:13 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/tableview.py (TableGrid.__init__): Fix typo


Revision 76 - Directory Listing
Modified Mon Feb 4 19:23:30 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
	stroke_width attribute


Revision 75 - Directory Listing
Modified Mon Feb 4 19:22:22 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/load.py (ProcessSession.startElement): Read the
	stroke_width attribute


Revision 74 - Directory Listing
Modified Mon Feb 4 19:22:08 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/save.py (save_session): Write the new stroke_width
	attribute


Revision 73 - Directory Listing
Modified Mon Feb 4 19:19:25 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/layer.py (Layer.__init__): New parameter and
	instance variable stroke_width
	(Layer.SetStrokeWidth): Set the stroke_width.


Revision 66 - Directory Listing
Modified Fri Sep 14 14:56:45 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
	Handle the case of no layer (i.e. layer is None) properly.


Revision 65 - Directory Listing
Modified Fri Sep 14 14:55:34 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 63 - Directory Listing
Modified Fri Sep 14 12:20:02 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
	messages


Revision 62 - Directory Listing
Modified Fri Sep 14 12:19:39 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 61 - Directory Listing
Modified Thu Sep 13 17:58:49 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
	deselect the layer if no layer is selected


Revision 60 - Directory Listing
Modified Thu Sep 13 14:47:39 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	(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


Revision 58 - Directory Listing
Modified Thu Sep 13 13:56:23 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 57 - Directory Listing
Modified Thu Sep 13 13:55:33 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 56 - Directory Listing
Modified Thu Sep 13 13:54:37 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/Model/session.py (create_empty_session): Unset the
	modified bit before returning it


Revision 52 - Directory Listing
Modified Mon Sep 10 16:05:13 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 51 - Directory Listing
Modified Mon Sep 10 16:04:43 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(IdentifyListCtrl): Derive from the new class RecordListCtrl


Revision 50 - Directory Listing
Modified Mon Sep 10 16:04:21 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
New file with two classes RecordListCtrl and SelectableRecordListCtrl
that implement the code shared by the identify view and the label dialog


Revision 49 - Directory Listing
Modified Mon Sep 10 16:03:59 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
(MainWindow.IdentifyTool): Popup the identify view immediately


Revision 47 - Directory Listing
Modified Mon Sep 10 12:52:44 2001 UTC (23 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 45 - Directory Listing
Modified Fri Sep 7 15:00:21 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	(MapCanvas.FitRectToWindow): If the rect has zero with or zero
	height do nothing (avoids zero division errors)


Revision 43 - Directory Listing
Modified Fri Sep 7 11:55:51 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 41 - Directory Listing
Modified Thu Sep 6 18:58:46 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 39 - Directory Listing
Modified Thu Sep 6 17:18:22 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
Create the session tree view in main with the new mainwindow method
ShowSessionTree and not directly the application's OnInit method


Revision 38 - Directory Listing
Modified Thu Sep 6 17:17:28 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(Interactor.SelectedLayer):
(Interactor.HasSelectedLayer): New methods to query the current
selection


Revision 37 - Directory Listing
Modified Thu Sep 6 17:16:54 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 36 - Directory Listing
Modified Thu Sep 6 17:16:06 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 34 - Directory Listing
Modified Thu Sep 6 15:32:56 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 33 - Directory Listing
Modified Thu Sep 6 15:31:31 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
	layer to the tableview dialog.


Revision 31 - Directory Listing
Modified Thu Sep 6 13:32:39 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 30 - Directory Listing
Modified Thu Sep 6 13:31:57 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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


Revision 29 - Directory Listing
Modified Thu Sep 6 13:30:59 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(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

(IdentifyView): Derive from the new NonModalDialog class
(IdentifyView.OnClose): Extend the inherited version to unsubscribe
SELECT_SHAPE


Revision 28 - Directory Listing
Modified Thu Sep 6 13:29:57 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
New file implementing common classes for dialogs


Revision 27 - Directory Listing
Modified Thu Sep 6 13:27:52 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
(Session.UnsetModified): Remove debug prints


Revision 25 - Directory Listing
Modified Wed Sep 5 13:36:13 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
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.


Revision 24 - Directory Listing
Modified Wed Sep 5 13:35:46 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
New argument interactor to pass through to the MapCanvas


Revision 23 - Directory Listing
Modified Wed Sep 5 13:35:22 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
New argument, interactor.


Revision 21 - Directory Listing
Modified Tue Sep 4 16:45:28 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
Open the shapefile immediately. This will cause an exception in case the
file can't be opened and we can display an appropriate message.


Revision 20 - Directory Listing
Modified Tue Sep 4 16:44:31 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 19 - Directory Listing
Modified Tue Sep 4 15:11:27 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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

* 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


Revision 18 - Directory Listing
Modified Mon Sep 3 16:25:09 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
* 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


Revision 14 - Directory Listing
Modified Fri Aug 31 15:34:33 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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.


Revision 13 - Directory Listing
Modified Fri Aug 31 15:33:42 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
	* 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


Revision 6 - Directory Listing
Added Tue Aug 28 15:41:52 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban
import all the source files


[email protected]
ViewVC Help
Powered by ViewVC 1.1.26