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

Annotation of /branches/WIP-pyshapelib-bramz/ChangeLog

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2730 - (hide annotations)
Wed Feb 21 09:56:53 2007 UTC (18 years ago) by dpinte
Original Path: trunk/thuban/ChangeLog
File size: 479262 byte(s)
2007-02-21 Didrik Pinte <dpinte@itae.be>

    * Extensions/umn_mapserver/__init__.py : UTF8 locales bugfix


1 dpinte 2730 2007-02-21 Didrik Pinte <[email protected]>
2    
3     * Extensions/umn_mapserver/__init__.py : UTF8 locales bugfix
4    
5 bernhard 2723 2007-02-20 Bernhard Reiter <[email protected]>
6    
7 bernhard 2729 * Thuban/version.py, setup.py: Getting ready for release 1.2.0.
8     Using this version number.
9    
10 bernhard 2728 * Doc/README: fixed a typo.
11    
12     * Doc/technotes/release_process.txt: Updated. Reference platform
13     is Debian Etch now. If windows, it should be window XP.
14     Marked a few entries in the instructions as "Old:".
15    
16     * README: Bumped requirements to wxWidgets 2.6.3.2 and gdal 1.3.2..
17     Added urls for homepage and infrastructure on wald. Fixed a typo.
18    
19     * MANIFEST.in: Added subdir packaging which should be in the tarball.
20    
21     * NEWS: Completed changes from 1.1.0 until today as gathered from
22     the Changelog entries. Added small section about OGR known problems
23     because we do not have a release-notes file so far.
24    
25 bernhard 2727 * Doc/manual/thuban-manual.xml: Removed the installation instructions
26     as they are outdated and they should be only in one place.
27     Bumped version number of the document to 1.2.0. Marked it as Draft
28     in the title.
29    
30 bernhard 2726 * Extensions/svgexport/: Get ready for release. Bump version
31     number to 1.0.1. Adjusted numbers in TODO.
32    
33 bernhard 2725 * Thuban/UI/about.py: Reworked the about text. It shows now
34     when somebody was active on Thuban. Added a list of maintainers.
35     Bernhard Reiter is the current maintainer, following up on Bernhard
36     Herzog.
37    
38 bernhard 2724 * Extensions/export_shapefile/export_shapefile.py: untabify.
39 bernhard 2723
40 bernhard 2724 * test/README: Added example how to set the PATH for postgis on
41     Debian Etch.
42    
43 dpinte 2721 2007-01-13 Didrik Pinte <[email protected]>
44    
45     bboxdump, gns2shp, importAPR, mouseposition, ogr, profiling, svgexport
46     extensions migrated to wxPython 2.6
47    
48     * Extensions/bboxdump/bboxdump.py:
49     updated wx statements
50    
51     * Extensions/gns2shp/gns2shp.py:
52     updated wx statements
53    
54     * Extensions/importAPR/importAPR.py:
55     updated wx statements
56    
57     * Extensions/mouseposition/mouseposition.py:
58     updated wx statements
59    
60     * Extensions/ogr/
61     ogrdialog.py, ogrstart.py:
62     updated wx statements
63    
64     * Extensions/profiling/profiling.py:
65     updated wx statements
66    
67     * Extensions/svgexport/
68     maplegend.py, svgsaver.py:
69     updated wx statements
70    
71    
72 dpinte 2719 2007-01-08 Didrik Pinte <[email protected]>
73    
74 dpinte 2720 export_shapefile extension migrated to wxPython 2.6
75    
76     * Extensions/export_shapefile/export_shapefile.py:
77     updated wx statements, changed the FileDialog to wx.SAVE (was wx.OPEN)
78    
79     2007-01-08 Didrik Pinte <[email protected]>
80    
81 dpinte 2719 umn_mapserver extension migrated to wxPython 2.6
82    
83     * Extensions/umn_maserver/
84     mf_handle.py, mf_import.py, mf_export.py:
85     update wx imports to 2.6 policy
86    
87 dpinte 2718 2007-01-06 Didrik Pinte <[email protected]>
88    
89 bernhard 2722 UTF-8 locales support reading non utf-8 files.
90     This is a workaround and not a real bugfix. See
91     http://wald.intevation.org/tracker/index.php?func=detail&aid=118
92     for more details
93 dpinte 2718
94 bernhard 2722 * Thuban/UI/tableview.py, controls.py, baserenderer.py, view.py:
95     decode text from iso-8859-1 encoding.
96 dpinte 2718
97 bernhard 2717 2007-01-01 Bernhard Reiter <[email protected]>
98 bernhard 2722
99 bernhard 2717 * test/postgissupport.py, test/test_postgis_db.py: adding an
100     explicit WITH OIDS to the create table commands. This fixes tests
101     that rely on an oid column to be present for postgresql >=8.0.
102     Thanks for Frank Koormann for the hint.
103    
104 dpinte 2716 2006-11-06 Didrik Pinte <[email protected]>
105    
106     * libraries/thuban/wxproj.cpp: bugfix - allow compilation with
107     msvc++ toolkit 2003
108    
109 bernhard 2714 2006-11-06 Bernhard Reiter <[email protected]>
110    
111 bernhard 2715 Made it easier to run PostGIS test on Debian Etch. Improving
112     https://wald.intevation.org/tracker/index.php?func=detail&aid=173 .
113 bernhard 2714
114     * test/postgissupport.py: Taking pg_ctl and initdb commands
115     from internal variables now. Adding deactivated example values
116     for Debian Etch.
117     find_postgis_sql(): Added special line for Debian Etch postgresql-8.1.
118     Added copyright year 2006.
119    
120 bernhard 2713 2006-10-25 Bernhard Reiter <[email protected]>
121    
122     Moved ogr Extension to Extension menu.
123    
124     * Extensions/ogr/
125     __init__.py, ogrstart.py, ogrshapes.py, ogrdialog.py
126     test/test_OGRShapestore.py, test/__init__.py:
127     adding encoding information and made sure Autor's names
128     with an umlaut are actually written with an umlaut.
129    
130     * Extensions/ogr/ogrstrat.py: now registering in menu "Extensions",
131     having a "(testing)" string before the submenu to prepare for 1.2.0
132     release. Bumped copyright year to 2006.
133    
134 bernhard 2712 2006-10-15 Bernhard Reiter <[email protected]>
135    
136     * Thuban/UI/renderer.py: Added module variable verbose and
137     added verbose output before doing a raster projection.
138     Minor: Added (c) year 2006.
139    
140     * test/test_baserenderer.py: Added new function
141     test_projected_raster_decimalcommalocale()
142     Added new author Bernhard Reiter and new copyright year 2006.
143    
144     * libraries/thuban/gdalwarp.cpp(ProjectRasterFile): Adding
145     switching to LC_NUMERIC "C" and back before calling GDAL functions -
146     only #if python >=2.4 .
147    
148 dpinte 2710 2006-10-10 Didrik Pinte <[email protected]>
149 dpinte 2711
150     Win32 build updates
151    
152     * setup.py :
153     - update to the latest libs for win32 setup tasks
154     - added gdal and Lib content to the inno setup build task
155     - added stable and experimental extensions to setup packages
156    
157     * thuban.py :
158     - gdal support for win32 inno installation
159    
160     2006-10-10 Didrik Pinte <[email protected]>
161    
162 dpinte 2710 * Thuban/Model/layer.py (Layer.GetLabelPosFromShape): new method
163     extracted from Thuban/UI/viewport.py
164     * Thuban/UI/viewport.py (Viewport.LabelShapeAt): uses new method
165    
166 dpinte 2709 2006-09-28 Didrik Pinte <[email protected]>
167    
168     * Thuban/UI/classgen.py: bugfix due to wx2.6 update
169    
170     * Thuban/UI/view.py: removed non needed declaration
171    
172     * Thuban/UI/selection.py : typo correction
173    
174 bernhard 2705 2006-09-24 Bernhard Reiter <[email protected]>
175    
176 bernhard 2708 * Thuban/Model/proj.py(_do_we_have_to_work_around_broken_proj):
177     Making the test more robust for observed python 2.3 problems
178     with setlocale().
179    
180 bernhard 2705 * test/runtests.py: Added new option ---setdecimalcommalocale
181 bernhard 2712 to run all tests with an LC_NUMERIC that uses comma as decimal_point.
182 bernhard 2705 Minor: Added (c) year 2006. Fixed typo in a docstring.
183    
184     * test/test_transientdb.py: Minor: Added (c) year 2006. Fixed typo in
185     a docstring.
186    
187 bernhard 2702 2006-09-23 Bernhard Reiter <[email protected]>
188    
189     * Extensions/ogr/test/test_OGRShapestore.py: fixed skip_if_no_ogr()
190     and added it to TestOGRTable.setUp() so that all tests get skipped
191     if ogr cannot be imported. Added (c) year 2006.
192    
193 dpinte 2701 2006-09-18 Didrik Pinte <[email protected]>
194    
195     * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6
196    
197 bernhard 2696 2006-09-18 Bernhard Reiter <[email protected]>
198    
199 bernhard 2698 Fixed proj behaviour with python >=2.4 when decimal_point != '.'.
200    
201 bernhard 2697 * Thuban/UI/application.py: Fixed warning dialog when gdal is missing.
202    
203     * test/test_proj.py: new test_lc_numeric_robustness(). Added author
204     Bernhard Reiter and new copyright year 2006.
205    
206 bernhard 2698 * Thuban/Model/proj.py: New _do_we_have_to_work_around_broken_proj()
207     and Projection.assuregoodlocale(), Projection.assureinitlocale().
208     Added author Bernhard Reiter and (c) 2006.
209    
210 bernhard 2694 2006-09-15 Bernhard Reiter <[email protected]>
211 bernhard 2692
212     * README: added RXP and pyRXP as optional for tests.
213 bernhard 2697
214 bernhard 2694 * test/localessupport.py: New. Contains a helper function
215     to find a locale with comma used as decimal_point.
216 bernhard 2692
217 bernhard 2690 2006-08-31 Bernhard Reiter <[email protected]>
218 bernhard 2691
219 bernhard 2690 * README: fixed URLs to sqlite and pysqlite.
220 bernhard 2697
221 bernhard 2691 * Thuban/UI/about.py: Added Didrik Pinte as contributor. Extended
222     copyright range to include 2006.
223 bernhard 2690
224 dpinte 2689 2006-06-29 Didrik Pinte <[email protected]>
225    
226     * Thuban/UI/main.py: circular import fix.
227    
228 frank 2688 2006-06-27 Frank Koormann <[email protected]>
229    
230     New Classification "Pattern": Classify text attributes by regexp.
231    
232     * Thuban/Model/classification.py (class ClassGroupPattern):
233     New, group is associated with a regular expression.
234     (Classification._compile_classification): Store compiled regexp and
235     original group for pattern.
236     (Classification.FindGroup): Added pattern.
237    
238     * Thuban/UI/classifier.py
239     (ClassGrid._OnLabelRightClicked, ClassGrid.labelPopup):
240     New, add popup to select singleton/pattern.
241     (ClassTable.GetRowLabelValue, ClassTable.GetValueAsCustom,
242     ClassTable.SetValueAsCustom): Added pattern.
243     (ClassTable.__ParseInput): Autodetect singleton/pattern.
244    
245     * Thuban/Model/save.py (SessionSaver.write_classification):
246     Added pattern.
247    
248     * Thuban/Model/load.py (SessionLoader.start_clpattern,
249     SessionLoader.end_clpattern): New, process pattern elements.
250    
251     * test/test_classification.py (class TestClassGroupPattern): New.
252     (TestClassification.test_add_pattern,
253     TestClassification.test_multiple_groups_textual,
254     TestClassification.test_deepcopy_textual): New.
255     (TestClassification.test_multiple_groups_numerical):
256     Renamed test_multiple_groups.
257     (TestClassification.test_deepcopy_numerical): Renamed test_deepcopy.
258    
259     * test/test_save.py (SaveSessionTest.testClassifiedLayer):
260     Added pattern.
261    
262     * test/test_load.py (ClassificationTest.TestLayers, TestClassification):
263     Added pattern.
264    
265     * test/test_layer.py
266     (TestLayerModification.test_set_classification_textual): New
267     (TestLayerModification.test_set_classification_numerical):
268     Renamed test_set_classification.
269    
270     * Doc/manual/thuban-manual.xml: Added pattern to layer classification
271     description.
272    
273     * Resources/XML/thuban-1.1.dtd: Added clpattern element and attribs.
274    
275 dpinte 2687 2006-06-29 Didrik Pinte <[email protected]>
276    
277     * Thuban/version.py: Bugfix determination of SQLite, the wright one !
278    
279 dpinte 2685 2006-06-28 Didrik Pinte <[email protected]>
280    
281 dpinte 2686 * packaging/windows/thubanstart.py: sample file loading all the stable
282     extensions
283    
284     2006-06-28 Didrik Pinte <[email protected]>
285    
286 dpinte 2685 * Thuban/version.py: Bugfix determination of SQLite on old and recent
287     systems (support pysqlite1 and pysqlite2)
288    
289 frank 2684 2006-06-27 Frank Koormann <[email protected]>
290    
291     * Thuban/version.py: Bugfix determination of SQLite on old systems.
292    
293 dpinte 2683 2006-05-17 Didrik Pinte <[email protected]>
294     * Extensions/ogr/__init__.py : updated test for win32 and correct
295     imports
296    
297 dpinte 2680 2006-05-15 Didrik Pinte <[email protected]>
298 dpinte 2682 Ashamed ... still some tabs in the files
299    
300 bernhard 2722 * Thuban/version.py : tabs removed
301     * Thuban/Model/transientdb.py : tabs removed
302 dpinte 2682
303     2006-05-15 Didrik Pinte <[email protected]>
304    
305 bernhard 2722 * Thuban/version.py : coding style correction
306     * Thuban/Model/transientdb.py : coding style correction
307 dpinte 2681
308     2006-05-15 Didrik Pinte <[email protected]>
309 dpinte 2682
310 bernhard 2722 * Thuban/version.py : Updated imports to support pysqlite2
311 dpinte 2682
312 bernhard 2722 * Thuban/Model/transientdb.py : Updated imports to support pysqlite2
313 dpinte 2680 Patched the querying system to support the param style of pysqlite2
314    
315 dpinte 2679 2006-04-24 Didrik Pinte <[email protected]>
316 bernhard 2722
317     * Extensions/svgexport/__init__.py: The extension now works on win32
318 dpinte 2679 architecture. Bug #87 corrected.
319    
320 bernhard 2678 2006-04-20 Bernhard Reiter <[email protected]>
321 bernhard 2722
322 bernhard 2678 * Doc/technotes/coding_guidelines.txt: Changed text from CVS to SVN.
323     Removed emacs specific hint and replaced it with a general hint
324     that editors might support writing changelogs.
325    
326 bernhard 2677 2006-04-12 Bernhard Reiter <[email protected]>
327 bernhard 2678
328 bernhard 2677 * Thuban/version.py: Changed thuban_release mechanism to use "svn"
329     instead of "cvs".
330    
331 bernhard 2676 2006-03-31 Bernhard Reiter <[email protected]>
332    
333     * libraries/thuban/wxproj.cpp: including proj_api.h instead of
334     projects.h now. According the Frank Warmerdam and man pj_init
335     this is the public interface to proj. Thus I have changed PJ to projPJ.
336     And I could remove the hack to avoid clashes with typedef PVALUE
337     and #define LP in projects.h clashing with symbols when trying to
338     build on windows. The file is cleaner and nicer now.
339    
340 bernhard 2675 2006-03-29 Bernhard Reiter <[email protected]>
341 bernhard 2678
342 bernhard 2675 * libraries/thuban/wxproj.cpp: undef LP to avoid clash when
343     trying to build with mingw.
344    
345 bernhard 2673 2005-10-18 Bernhard Reiter <[email protected]>
346    
347 bernhard 2674 * Thuban/UI/about.py: remove unused import of getdefaultlocale.
348     Added display of internal encoding to the about dialog text.
349    
350     * Extensions/svgexport/__init__.py: changed version to "1.0.0+cvs".
351    
352     2005-10-18 Bernhard Reiter <[email protected]>
353    
354 bernhard 2673 Startup improved: We fail right away if the internal encoding could
355     not be determined.
356    
357     * Thuban/__init__.py (get_internal_encoding): new.
358    
359     * test/test_stringrepresentation.py (class TestInternalEncoding):
360     Preserve the internal encoding for the tests in this class.
361    
362 bernhard 2671 2005-10-17 Bernhard Reiter <[email protected]>
363    
364 bernhard 2672 * test/test_stringrepresentation.py: New file, for now testing
365     that set_internal_coding() is throwing an exception for bad exceptions.
366    
367     * Thuban/__init__.py (set_internal_encoding): added a forwards
368     and backward translation, so that we fail early if the
369     internal_encoding is bad.
370    
371     2005-10-17 Bernhard Reiter <[email protected]>
372    
373 bernhard 2671 svgexport 1.0.0cvs: Fixed ARC layer writing: No filling is done.
374     You could actually get polylines with filling in between,
375     when the classification for the lines had a fill color.
376     E.g. this happens when you generate a classification from a ramp.
377    
378     * Extensions/svgexport/test/test_svgmapwriter.py:
379     New test_export_arc_no_fill(). Extend copyright notice to 2005.
380    
381     * Extensions/svgexport/svgmapwriter.py
382     (SVGRenderer.draw_shape_layer_incrementally()):
383     Setting TRANSPARENT_BRUSH for shaptype ARC.
384     Extend copyright notice to 2005.
385    
386     * Extensions/svgexport/__init__.py: Extend copyright notice to 2005.
387    
388 frank 2670 2005-09-08 Frank Koormann <[email protected]>
389    
390     * Doc/manual/thuban-manual.xml (Map Management): Fixed typo reported
391     by Erik (sigra.at.home.se)
392    
393 jan 2669 2005-08-18 Jan-Oliver Wagner <[email protected]>
394    
395     * Thuban/UI/renderer.py (ScreenRenderer.draw_selection_incrementally):
396     Call the right method for the default size.
397    
398 jan 2667 2005-08-11 Jan-Oliver Wagner <[email protected]>
399    
400     * Extensions/export_shapefile: New.
401    
402     * Extensions/export_shapefile/__init__.py: New. Initialize
403     the export_shapefile extension.
404    
405     * Extensions/export_shapefile/export_shapefile.py: New.
406     Exports a layer as a Shapefile.
407    
408 jan 2664 2005-08-08 Jan-Oliver Wagner <[email protected]>
409    
410     * po/de.po: String fixes. This fixes Debian bug #313843.
411    
412 jan 2660 2005-07-27 Jan-Oliver Wagner <[email protected]>
413    
414     Remove the attributes from the layer element in
415     .thuban files for the save routine.
416     This also solves RT bug #3149,
417     https://intevation.de/rt/webrt?serial_num=3149
418    
419     * test/test_load.py: (TestSingleLayer, TestNonAsciiColumnName,
420     TestLayerVisibility, TestSymbolSize, TestClassification, TestLabels,
421     TestLayerProjection, TestJoinedTable, TestLabelLayer): Removed
422     attributes from layer element to classification clnull element.
423    
424     * test/test_save.py (SaveSessionTest.testSingleLayer,
425     SaveSessionTest.testLayerProjection,
426     SaveSessionTest.testClassifiedLayer,
427     SaveSessionTest.test_joined_table, SaveSessionTest.test_save_postgis):
428     Removed attributes from layer element to classification clnull element.
429     (test_save_postgis.NonConnectionStore._fetch_table_information):
430     added pretending to have a shape_type.
431    
432     * Resources/XML/thuban-1.1.dtd: Make the attributes field
433     and field_type of classification optional.
434    
435     * Thuban/Model/classification.py (Classification.TreeItem.build_info):
436     Added output of size.
437    
438     * Thuban/Model/load.py (SessionLoader.start_classification):
439     Change attribute 'field' and 'field_type' from obligatory to
440     optional to allow empty classes (ie. only with a default=clnull).
441    
442     * Thuban/Model/save.py (SessionSaver.write_layer): Don't write
443     any attributes anymore for the layer element.
444     (SessionSaver.write_classification): Even if there is no
445     classification field, still write the classification because
446     the clnull (default) symbol will not be defined anymore as
447     part of the layer element.
448    
449 bh 2643 2005-07-05 Bernhard Herzog <[email protected]>
450    
451 bh 2652 * setup.py (setup call): Version 1.1.0
452    
453     * NEWS: Update for 1.1.0
454    
455     * MANIFEST.in: Add *.txt to files taken from Doc. Otherwise the
456     technores won't be included
457    
458     * Thuban/UI/about.py (About.__init__): Extend copyright notice to
459     2005
460    
461     * po/de.po: Updated.
462    
463     2005-07-05 Bernhard Herzog <[email protected]>
464    
465 bh 2645 * README: gdal 1.1.8 is too old. 1.2.5 works.
466    
467     2005-07-05 Bernhard Herzog <[email protected]>
468    
469 bh 2650 * Resources/XML/thuban-1.1.dtd (rasterlayer): Add the opacity and
470     masktype attributes.
471    
472     2005-07-05 Bernhard Herzog <[email protected]>
473    
474 bh 2644 * Thuban/Model/layer.py (Layer.__mangle_bounding_box)
475     (Layer.ClipBoundingBox): Rename ClipBoundingBox to
476     __mangle_bounding_box. See the comments in the code and RT #2845
477    
478     * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
479     Remove the explicit test of ClipBoundingBox. The method isn't
480     public anymore and the direct call in the test wasn't necessary in
481     the first place. If ClipBoundingBox (now __mangle_bounding_box)
482     isn't called, the return value of ShapesInRegion will be
483     different.
484    
485     2005-07-05 Bernhard Herzog <[email protected]>
486    
487 bh 2643 * Thuban/UI/viewport.py (ViewPort.set_view_transform): Handle
488     ZeroDivisionError exceptions. I don't know when they happen
489     exactly. It probably happens when the projections aren't set
490     properly.
491    
492 bh 2642 2005-07-01 Bernhard Herzog <[email protected]>
493    
494     First step towards unicode. With this roughly we're at step 1
495     string_representation.txt
496    
497     * Doc/technotes/string_representation.txt: New. Document how
498     strings are represented in Thuban and how to get to a Unicode
499     Thuban.
500    
501     * Thuban/__init__.py (set_internal_encoding)
502     (unicode_from_internal, internal_from_unicode): New. The first few
503     functions for the internal string representation
504    
505     * Thuban/UI/about.py (unicodeToLocale): Removed. Use
506     internal_from_unicode instead.
507    
508     * Thuban/UI/__init__.py (install_wx_translation): Determine the
509     encoding to use for the internal string representation. Also,
510     change the translation function to return strings in internal
511     representation even on unicode builds of wxPython
512    
513     * Thuban/Model/load.py (SessionLoader.check_attrs): Decode
514     filenames too.
515     (SessionLoader.start_clrange): Use check_attrs to decode and check
516     the attributes.
517    
518     * Thuban/Model/xmlreader.py (XMLReader.encode): Use
519     internal_from_unicode to convert unicode strings.
520    
521     * Thuban/Model/xmlwriter.py (XMLWriter.encode): Use
522     unicode_from_internal when applicable
523    
524     * test/runtests.py (main): New command line option:
525     internal-encoding to specify the internal string encoding to use
526     in the tests.
527    
528     * test/support.py (initthuban): Set the internal encoding to
529     latin-1
530    
531     * test/test_load.py (TestSingleLayer.test, TestClassification.test)
532     (TestLabelLayer.test): Use the internal string representation when
533     dealing with non-ascii characters
534    
535     * test/test_load_1_0.py (TestSingleLayer.test)
536     (TestClassification.test, TestLabelLayer.test): Use the internal
537     string representation when dealing with non-ascii characters
538    
539     * test/test_load_0_9.py (TestSingleLayer.test)
540     (TestClassification.test): Use the internal string representation
541     when dealing with non-ascii characters
542    
543     * test/test_load_0_8.py (TestUnicodeStrings.test): Use the
544     internal string representation when dealing with non-ascii
545     characters
546    
547     * test/test_save.py (XMLWriterTest.testEncode)
548     (SaveSessionTest.testClassifiedLayer): Use the internal string
549     representation when dealing with non-ascii characters where
550     applicable
551    
552 bh 2638 2005-06-30 Bernhard Herzog <[email protected]>
553    
554 bh 2641 * test/runtests.py: Untabify.
555    
556     2005-06-30 Bernhard Herzog <[email protected]>
557    
558 bh 2639 * Thuban/UI/renderer.py (ScreenRenderer.draw_selection_incrementally):
559     untabify.
560    
561     2005-06-30 Bernhard Herzog <[email protected]>
562    
563 bh 2638 * Extensions/ogr/test/__init__.py: Add missing coding directive
564    
565 jan 2631 2005-06-28 Jan-Oliver Wagner <[email protected]>
566    
567 jan 2636 * Thuban/UI/renderer.py (ScreenRenderer.draw_selection_incrementally):
568     Use the default size for rendering selected items of default type.
569     Fixes part 2 of https://intevation.de/rt/webrt?serial_num=3149
570    
571     2005-06-28 Jan-Oliver Wagner <[email protected]>
572    
573 jan 2631 * Extensions/importAPR/apr.py (APR_BShSym): Extend by 'Stripple'.
574     (APR_TClr.GetThubanColor): Fix bug in color interpretation.
575     Thanks to Frank Koormann who identified this problem.
576    
577     * Extensions/importAPR/importAPR.py (APR_VShSym): New. Just
578     another symbol identified.
579    
580 jan 2628 2005-06-27 Jan-Oliver Wagner <[email protected]>
581    
582     * Doc/manual/thuban-manual-de.xml: More translations.
583    
584 jonathan 2626 2005-05-12 Jonathan Coles <[email protected]>
585    
586     * Thuban/UI/projdialog.py: Add missing import, which led to an
587     exception when opening a layer's projection.
588    
589 bh 2623 2005-05-09 Bernhard Herzog <[email protected]>
590    
591 bh 2624 * test/support.py (FileLoadTestCase.filename): Fix doc-string.
592    
593     2005-05-09 Bernhard Herzog <[email protected]>
594    
595 bh 2623 * Thuban/Model/postgisdb.py (PostGISConnection.connect): Set the
596     connection to autoconnect. Fixes RT#3148.
597    
598     * test/test_postgis_db.py
599     (TestPostGISSpecialCases.test_simple_error_handling): New test
600     that attempts to reproduce RT#3148.
601    
602 jonathan 2622 2005-05-06 Jonathan Coles <[email protected]>
603    
604     Add support for saving and loading the opacity and mask type
605     properties of RasterLayers. Also add support for proper use
606     of alpha information while drawing images not in 'RAW' format.
607     If transparency in an image format (e.g, PNG) is supported by
608     wxWidgets then the image would previously have been draw with
609     transparent regions, but the opaque regions would have been
610     unaffected by a change in the layer's opacity. This patch
611     corrects the problem.
612    
613     * Thuban/Model/layer.py (RasterLayer): Added opacity and
614     masktype parameters to the constructor, and set the
615     appropriate variables to those values.
616    
617     * Thuban/Model/load.py (SessionLoader.start_rasterlayer): Added
618     code to read the opacity and mask type of the layer and construct
619     a new layer with the additional parameters.
620    
621     * Thuban/Model/save.py (SessionSaver.write_layer): Added code
622     to save the opacity and mask type of a layer.
623    
624     * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): Pass
625     the opacity of the layer to draw_raster_data rather than the layer.
626     (BaseRenderer.draw_raster_data): Remove the layer parameter because
627     the function doesn't need to know about the layer. Add the optional
628     opacity parameter whose default is 1.0. Add 'PNG' as a supported
629     graphics format.
630    
631     * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Fixed
632     signature to match that in BaseRenderer. Use the new opacity argument
633     in place of calling layer.Opacity(). In the case where the
634     format is not 'RAW', alpha_data is None and the loaded image has
635     alpha information, use the file's alpha information. This is
636     still subject to the layer's opacity setting.
637    
638     * test/test_baserenderer.py (SimpleRenderer.draw_raster_data):
639     Fixed signature to match that in BaseRenderer.
640    
641     * test/test_load.py (TestRasterLayer): Change file_contents to
642     include opacity and masktype variables.
643     (TestRasterLayer.test): Include tests for opacity and masktype
644     changes.
645    
646     * test/test_save.py (SaveSessionTest.testRasterLayer): Restructure
647     test to cover a variety of combinations of masktype and opacity
648     settings.
649    
650 jan 2612 2005-05-02 Jan-Oliver Wagner <[email protected]>
651    
652     * debian/rules: add --use-wx-python-swig-hack
653     to the build command.
654     Thanks to Moritz Lennert for pointing this out.
655    
656 jan 2610 2005-04-28 Jan-Oliver Wagner <[email protected]>
657    
658     Introduce OGRFileShapeStore in ogr extension.
659     This allows at least that loaded shapefile shape stores
660     can be saved correctly in the thuban session file
661     and reloaded again (reload is via core shapefile
662     routine, not OGR). For other types, .thuban files
663     can not be reloaded for the time being.
664    
665     * Extensions/ogr/ogrshapes.py (OGRFileShapeStore): New. This
666     class ist to be used for any file-based shape stores
667     accessed through OGR.
668    
669     * Extensions/ogr/ogrstart.py (open_with_ogr): Added
670     forgotten _ for i18n. Adapted call OpenFileShapestore
671     regarding new parameter.
672     (OpenFileShapestore): Use OGRFileShapeStore instead of
673     OGRShapeStore. Fix return value (None instead of null).
674     Add new parameter "mainwindow" to avoid accessing global
675     context.
676    
677 jan 2607 2005-04-27 Jan-Oliver Wagner <[email protected]>
678    
679     Introduce FileShapeStore as generalization for
680     file-based shape stores. In a first instance
681     this allows additional modules to handle shapefile
682     format as well, namely the OGR extension.
683    
684     * Thuban/Model/data.py: Various small fixes in doc-strings.
685     (FileShapeStore): New class.
686     (ShapefileStore): Derive from FileShapeStore.
687     (ShapefileStore.__init__): Call __init__ of FileShapeStore,
688     rename self.table to self._table, initialize self._bbox
689     (ShapefileStore._open_shapefile): Use self._bbox instead of self.bbox
690     and self.FileName() instead of self.filename.
691     (ShapefileStore.Table): Use self._table instead of self.table.
692     (ShapefileStore.FileName): Removed (moved to FileShapeStore).
693     (ShapefileStore.BoundingBox): Use self._bbox instead of self.bbox.
694    
695     * Thuban/Model/save.py: Replace ShapefileStore by FileShapeStore.
696     (SessionSaver.write_data_containers): Only use methods of the
697     base class FileShapeStore.
698    
699 joey 2604 2005-04-26 Martin Schulze <[email protected]>
700    
701     * Extensions/wms/wms.py (render_wms_layer): Adjusted the render
702     function to the modified render engine
703    
704     2005-04-25 Martin Schulze <[email protected]>
705    
706     * Thuban/UI/renderer.py (MapRenderer.projected_raster_layer):
707     Added a description according to the CVS log message
708    
709     2005-04-23 Martin Schulze <[email protected]>
710    
711     * Thuban/UI/renderer.py: Added a missing import
712    
713 russell 2600 2005-04-23 Russell Nelson <[email protected]>
714    
715 russell 2613 * Thuban/UI/view.py (MapCanvas.OnMiddle{Up,Down}): Changed the
716     way the previous tool is remembered, so that middle-button
717     panning works even if you haven't selected a tool.
718 russell 2600
719 bh 2598 2005-04-11 Bernhard Herzog <[email protected]>
720    
721     * libraries/thuban/wxproj.cpp: Move the compatibility code that
722     deals with the wxPython 2.4 version of wxPython.h into the #ifdef
723     branch that includes wxPython.h because it's only needed when
724     wxPython.h is used. Also, it won't compile when
725     USE_WX_PYTHON_SWIG_HACK is set otherwise.
726    
727 bh 2597 2005-04-07 Bernhard Herzog <[email protected]>
728    
729     * Thuban/UI/classifier.py (ClassGrid.__init__): Use -1 as the ID.
730     (ID_CLASS_TABLE): Removed. It wasn't used anywhere except in
731     ClassGrid.__init__ and it's value is outside of the valid
732     range (must be < 32768). wxPython 2.5 complains about it with an
733     exception.
734    
735 jan 2596 2005-04-05 Jan-Oliver Wagner <[email protected]>
736    
737     * Doc/manual/thuban-manual-de.xml: More translations.
738    
739 bh 2590 2005-04-05 Bernhard Herzog <[email protected]>
740    
741 bh 2591 * libraries/thuban/wxproj.cpp: Make it work with a wxPython.h from
742     wxPython 2.4 as well. Also, remove a now obsolete comment.
743    
744     2005-04-05 Bernhard Herzog <[email protected]>
745    
746 bh 2590 Use wxPython.h by default but provide a workaround when it isn't
747     available.
748    
749     * setup.py (wxproj_extension): New variable. Assign the Extension
750     instance for Lib.wxproj to this variable instead of putting it
751     directly into the listso that it can be accessed by other code
752     later.
753     (thuban_build_ext.user_options): Added boolean option
754     --use-wx-python-swig-hack.
755     (thuban_build_ext.initialize_options): Initialize the new option
756     to False.
757     (thuban_build_ext.finalize_options): If the new option was given,
758     define the preprocesser macro USE_WX_PYTHON_SWIG_HACK.
759     (thuban_build_ext): Update the doc-string
760    
761     * libraries/thuban/wxproj.cpp: Normally we use
762     wx/wxPython/wxPython.h now. Only if USE_WX_PYTHON_SWIG_HACK is
763     defined, use swigPtrConvertHack.h instead.
764    
765     * libraries/thuban/swigPtrConvertHack.h: Remove the code that was
766     copied over from wxPython.h.
767     (decode_pointer_new): New. Equivalent of decode_pointer for
768     wxPython 2.5.
769     (wxPyConvertSwigPtr): Modified to cope with wxPython 2.5 as well.
770    
771     * README: Add section on potential build problems which explains
772     how the work-around for a missing wxPython.h is activated.
773    
774 bh 2588 2005-03-29 Bernhard Herzog <[email protected]>
775    
776 bh 2589 * test/postgissupport.py (find_postgis_sql): Added yet another
777     potential location for (lw)postgis.sql because the file has moved
778     again in postgis 1.0.0 rc4.
779    
780     2005-03-29 Bernhard Herzog <[email protected]>
781    
782 bh 2588 * Thuban/UI/legend.py (BMP_SIZE_W, BMP_SIZE_H): Set both to 16 to
783     match the site of the legend_icon_layer icon. Otherwise wxpython
784     2.5 complains when the legend is created with the error:
785    
786     PyAssertionError: C++ assertion "(bitmap.GetWidth() == m_width &&
787     bitmap.GetHeight() == m_height) || (m_width == 0 && m_height ==
788     0)" failed in ./src/generic/imaglist.cpp(81): invalid bitmap size
789     in wxImageList: this might work on this platform but definitely
790     won't under Windows.
791    
792 jonathan 2587 2005-03-23 Jonathan Coles <[email protected]>
793    
794     These changes add support for adjusting the opacity of a raster layer.
795    
796     * Thuban/Model/layer.py (RasterLayer.Opacity): Replaces AlphaOpacity.
797     (RasterLayer.SetOpacity): Replaces SetAlphaOpacity. Also triggers
798     a LAYER_CHANGED event if the opacity actually changes.
799    
800     * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_data): Added
801     layer parameter needed in the implementation of this method in
802     renderer.py.
803    
804     * Thuban/UI/layerproperties.py (LayerProperties.dialog_layout): Fixed
805     typo 00 -> 0.
806    
807     * Thuban/UI/rasterlayerproperties.py (RasterLayerProperties): Added
808     control to adjust opacity.
809    
810     * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Scale the
811     alpha data based on the opacity level of the layer.
812    
813     * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Now
814     accepts a layer parameter.
815    
816     * test/test_layer.py (TestLayerModification.test_raster_layer):
817     Rename opacity method calls and add test for LAYER_CHANGED.
818    
819 bh 2586 2005-03-16 Bernhard Herzog <[email protected]>
820    
821     * test/test_connector.py (DeletionTestMixin.check_deletions)
822     (DeletionTestMixin.check_deletetions): renamed to check_deletions.
823     update the callers.
824    
825 jan 2585 2005-03-14 Jan-Oliver Wagner <[email protected]>
826    
827     * Doc/manual/thuban-manual-de.xml: More translations.
828    
829 jan 2584 2005-03-10 Jan-Oliver Wagner <[email protected]>
830    
831     Introducing initialization callbacks for extensions.
832    
833     * Thuban/UI/extensionregistry.py (ExtensionDesc.__init__): Added
834     optional parameter init_callback.
835     (ExtensionDesc.init_ext): New. Executes the callback and sets
836     a status.
837    
838     * Thuban/UI/application.py (ThubanApplication.OnInit): Add the
839     initialization of the extensions.
840     (ThubanApplication.init_extensions): Init all extensions.
841    
842     * Thuban/UI/about.py (About.__init__): Added status of the extensions
843     to the about text.
844    
845     * Extensions/gns2shp/__init__.py: Added init method for Extension
846     description.
847     (init): New. Contains the initialization of the module.
848    
849 nhueffme 2577 2005-03-04 Nina Hüffmeyer <[email protected]>
850    
851     * Extensions/ogr/ogrdialog.py: Added a dialog, which asks for
852     OGRConnection to open a datasource. Removed dialog to display all
853     available drivers. Added some doc strings.
854    
855     * Extensions/ogr/ogrstart.py: Added menu entry for opening an
856     OGRDatasource with a string. Added two opening methods which return an
857     OGRDatasource (either data from file or from DB).
858    
859     * Extensions/ogr/ogrshapes.py: Added class OGRGeometry, which
860     represents a geometry reference of an OGRFeature. OGRShape now has a
861     list of referenced geometry objects (important for geometry
862     collections).
863     For OGRShapeStores loaded from a DB an ID column can be specified now.
864    
865 jan 2576 2005-02-22 Jan-Oliver Wagner <[email protected]>
866    
867     * test/test_map.py (TestMapWithContents.test_tree_info):
868     Added label layer for comparison.
869    
870 jonathan 2574 2005-02-18 Jonathan Coles <[email protected]>
871    
872     * libraries/thuban/gdalwarp.cpp (GetImageData): Optimize the loop
873     which builds a mask. Handle the majority of an image in a loop,
874     creating 8 bits at a time. Later, handle the edge case where less
875     than 8 bits are packed.
876    
877 bh 2573 2005-02-18 Bernhard Herzog <[email protected]>
878    
879     * test/test_baserenderer.py (TestBaseRenderer.setUp): Fix
880     doc-string
881    
882 jonathan 2571 2005-02-18 Jonathan Coles <[email protected]>
883    
884 jonathan 2572 * setup.py: Remove wx_cs_params from gdal compile options.
885    
886     2005-02-18 Jonathan Coles <[email protected]>
887    
888 jonathan 2571 Refactored baserenderer.py and renderer.py to remove baserenderer.py's
889     dependencies on wxPython. Added a new method projected_raster_layer()
890     that returns a raster layer image in projected space. This must be
891     implemented in classes derived from BaseRenderer. This also eliminates
892     the dependency on gdal in baserenderer.py.
893    
894     * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): Call
895     new projected_raster_layer() to get projected raster image instead
896     of directly calling ProjectRasterFile().
897     (BaseRenderer.projected_raster_layer): New. This must be implemented
898     by derived classes. It takes almost the same arguments as ProjectRasterFile
899     did and returns a projected image with mask and alpha data (if requested).
900     (BaseRenderer.render_map_incrementally): Remove the check for gdal since
901     that check will be done in MapRenderer.projected_raster_layer(). This
902     also allows other implementations to use different projection code.
903    
904     * Thuban/UI/renderer.py (MapRenderer.projected_raster_layer):
905     Implementation of BaseRenderer.projected_raster_layer. Checks for
906     gdal support and wxPython version. Also handles exceptions from
907     ProjectRasterFile.
908    
909     * libraries/thuban/gdalwarp.cpp: Removed checks for wxPython versions
910     and added a variable which can be set through the options argument
911     of ProjectRasterFile.
912    
913     * test/test_baserenderer.py (SimpleRenderer.projected_raster_layer): New.
914     Calls ProjectRasterFile and returns the result.
915     (TestBaseRenderer.test_projected_raster_layer): New. Tests the results
916     of calling projected_raster_layer() with different options.
917     (TestBaseRenderer.test_raster_no_projection): Removed tests based on
918     wxPython version and all tests of masks and alpha channels. These are
919     now in test_projected_raster_layer().
920    
921 jan 2565 2005-02-17 Jan-Oliver Wagner <[email protected]>
922    
923 jan 2570 * Thuban/Model/map.py, Thuban/Model/label.py: Fixed
924     doc-strings to comply with coding_guidelines.
925    
926     2005-02-17 Jan-Oliver Wagner <[email protected]>
927    
928 jan 2565 Docstring improvements and minor fixes for labellayer.
929    
930     * Thuban/Model/map.py:
931     (Map, Map.Destroy, Map.RemoveLayer, Map.ClearLayers,
932     Map.Layers, Map.HasLayers, Map.MoveLayerToTop,
933     Map.RaiseLayer, Map.LowerLayer, Map.MoveLayerToBottom,
934     Map.ProjectedBoundingBox, Map.GetProjection): Improved/added
935     doc string.
936     (Map.BoundingBox): Removed superfluous test for label_layer
937     and improved doc string.
938     (Map.TreeInfo): Added label_layer and improved sdo string.
939    
940     * Thuban/Model/label.py: Added import of _.
941     (Label, Label.__init__): Improved/added doc string.
942     (LabelLayer, LabelLayer.__init__, LabelLayer.Labels,
943     LabelLayer.RemoveLabel, LabelLayer.ClearLabels):
944     Improved/added doc string.
945     (LabelLayer.AddLabel): Use already defined names for
946     align strings and improved doc string.
947     (LabelLayer.TreeInfo): New. Return the object data for
948     the tree view.
949    
950 jonathan 2562 2005-02-16 Jonathan Coles <[email protected]>
951    
952     Further wxPython 2.5 changes using patches from Daniel Calvelo Aros
953     so that that wxproj doesn't crash. Added GUI support for selecting
954     alpha channel (opacity can't be selected yet).
955    
956     NOTE: If wxPython.h is including in future distribution packages
957     then it will not be necessary to have the files swigPtrConvertHack.h
958     and wxPython_int.h included with Thuban. This is hopefully
959     a temporary workaround.
960    
961     * setup.py (thuban_build_ext.finalize_options): gdalwarp needs
962     access to the macro wxCHECK_VERSION so that it will properly
963     generate a bit mask. There was a problem between wx2.4 and wx2.5
964     that this works around.
965    
966     * Thuban/Model/layer.py (RasterLayer.UseMask): Removed in favor
967     of RasterLayer.MaskType.
968     (RasterLayer.SetUseMask): Removed in favor of RasterLayer.SetMaskType
969     (RasterLayer.MaskType): New. Returns the type of mask to use. Can
970     specify none, a bitmap, or an alpha channel.
971     (RasterLayer.SetMaskType): New. Set what kind of mask to use.
972    
973     * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer):
974     Set the raster warping options for the mask based on the value
975     of RasterLayer.MaskType.
976    
977     * Thuban/UI/legend.py (LegendTree.__FillTreeLayer): Remove
978     deprecated calls to SetItemSelectedImage in favor of SetItemImage
979     with wxTreeItemIcon_Selected.
980    
981     * Thuban/UI/rasterlayerproperties.py: Support selecting to use
982     an alpha channel for the mask.
983    
984     * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Use alpha
985     data if it is available and an alpha channel is supported under
986     the current version of wxPython.
987    
988     * libraries/thuban/gdalwarp.cpp (GetImageData): Added compiler define
989     to select whether 1's or 0's select the desired portion of an image
990     in the bit mask. wx2.4 has a bug where the documentation is the opposite
991     from behavior.
992     (ProjectRasterFile): Only generate an alpha channel if the version
993     of wxPython is >= 2.5.3.
994    
995     * libraries/thuban/wxproj.cpp: Applied patches from Daniel Calvelo Aros.
996     When wxPython >= 2.5.3 use the special swig functions to decode an
997     object's address.
998    
999     * libraries/thuban/swigPtrConvertHack.h: Includes conditional code
1000     based on the version of wxPython. If >= 2.5.3 use the special swig
1001     functions from wxPython to decode wxPython objects, otherwise use
1002     the old method of retrieving the address from the object __repr__ string.
1003    
1004     * libraries/thuban/wxPython_int.h: Copied from wxPython source.
1005     Unnecessary code was removed to make it smaller.
1006    
1007     * test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection):
1008     Add tests for returning an alpha channel.
1009    
1010     * test/test_layer.py (TestLayerModification.test_raster_layer): Fix
1011     tests that used removed functions UseMask and SetUseMask
1012    
1013    
1014 bh 2560 2005-02-08 Bernhard Herzog <[email protected]>
1015    
1016 bh 2561 More wxPython 2.5 changes. This time taken from a patch from
1017     Daniel Calvelo Aros.
1018    
1019     * Thuban/UI/tableview.py (QueryTableFrame.__init__)
1020     (QueryTableFrame.__init__): Pass the size of a spacer as a single
1021     item.
1022    
1023     * Thuban/UI/projdialog.py (ProjFrame.build_dialog)
1024     (ProjFrame.build_dialog): Pass the size of a spacer as a single
1025     item.
1026    
1027     * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Pass the
1028     size of a spacer as a single item.
1029    
1030     * Thuban/UI/classifier.py (Classifier.dialog_layout): Pass the
1031     size of a spacer as a single item.
1032    
1033     2005-02-08 Bernhard Herzog <[email protected]>
1034    
1035 bh 2560 Compatibility with wxPython 2.5. The changes should make it work
1036     better with 2.5 while still keeping compatibility with 2.4. There
1037     are still problems with 2.5, though.
1038    
1039     * Thuban/UI/dock.py (DockableWindow.__CreateBorder): Pass the size
1040     of a spacer as a single item.
1041    
1042     * Thuban/UI/classifier.py (ClassGroupPropertiesCtrl): Derive only
1043     from wxControl
1044    
1045     * Thuban/UI/legend.py (LegendTree): When running with wxPython <
1046     2.5, add an implementation of the GetFirstChild method that does
1047     not require the second parameter.
1048     (LegendTree.find_layer, LegendTree._OnMsgMapLayersAdded)
1049     (LegendTree._OnMsgMapLayersRemoved, LegendTree.DeleteAllItems)
1050     (LegendTree.DeleteChildren, LegendTree.__ShowHideLayer): Do not
1051     pass the second parameter to GetFirstChild
1052    
1053 nhueffme 2559 2005-02-08 Nina Hüffmeyer <[email protected]>
1054    
1055     * Extensions/ogr/ogrshapes.py: Removed some print commands.
1056    
1057     * Extensions/ogr/ogrstart.py: Changed the GUI. OGR is no longer an
1058     additional menu but appears as a possibility in the menu Map.
1059    
1060 jonathan 2558 2005-02-07 Jonathan Coles <[email protected]>
1061     * libraries/thuban/gdalwarp.cpp: Removed the macros PYTHON_ERR
1062     and PYTHON_ERRF since they were no longer necessary.
1063    
1064 bernhard 2556 2005-02-07 Bernhard Reiter <[email protected]>
1065     * Thuban/UI/classifier.py (ClassGrid.DeleteSelectedRows):
1066     Enable translation for message string.
1067    
1068 joey 2555 2005-02-06 Martin Schulze <[email protected]>
1069    
1070     * Extensions/wms/infodialog.py (wmsInfoDialog.__init__): Adjusted
1071     the arguments of the contstructor to fit the global scheme
1072    
1073 nhueffme 2554 2005-01-31 Nina Hüffmeyer <[email protected]>
1074    
1075     * Extensions/ogr/ogrdialog.py: Added class ogrdialog.py, which provides
1076     some dialogs needed to start ogr.
1077    
1078     * Extensions/ogr/__init__.py: Changed comments to avoid encoding
1079     warnings.
1080    
1081     * Extensions/ogr/test/test_OGRShapestore.py: Changed comments to avoid
1082     encoding warnings.
1083    
1084 jonathan 2552 2005-01-28 Jonathan Coles <[email protected]>
1085    
1086 jonathan 2553 * libraries/thuban/gdalwarp.cpp (GetImageData): Recode how the
1087     mask is packed into a bit array. It's now slightly faster.
1088    
1089     2005-01-28 Jonathan Coles <[email protected]>
1090    
1091 jonathan 2552 * Thuban/Model/layer.py (RasterLayer.__init__): Make use_mask
1092     default to true.
1093    
1094     * Thuban/Model/load.py (SessionLoader.start_rasterlayer): Remove
1095     code that loads the state of the layer's use_mask flag. Its
1096     usefulness is still being debated.
1097    
1098     * Thuban/Model/save.py (SessionSaver.write_layer): Remove
1099     code that saves the state of the layer's use_mask flag. Its
1100     usefulness is still being debated.
1101    
1102     * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer): Pass
1103     options to ProjectRasterFile based on the state of layer.UseMask().
1104     Catch more exceptions from ProjectRasterFile so that Thuban doesn't
1105     quit is there is a problem projecting.
1106     (BaseRenderer.draw_raster_data): Change the documentation to
1107     describe the new format (XBM) that the mask data will be in.
1108    
1109     * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): The mask
1110     data is in XBM format when format='RAW' which means it doesn't
1111     need to be converted to a wxImage before being used as a mask
1112     for a wxBitmap. Assume that if format != 'RAW' that the image
1113     data and mask data are in the same format.
1114    
1115     * libraries/thuban/gdalwarp.cpp (GetImageData): If alpha is enabled
1116     and a mask is requested, convert the alpha band to a bit array in
1117     XBM format. if an alpha channel is requested, simply return the
1118     data in the alpha band. Provide better error handling by returning
1119     python error messages (also fixes RT #2947).
1120     (ProjectRasterFile): Support multiple mask options, rather than simply
1121     a flag indicating that a mask should or should not be used. Provide
1122     better error handling by returning python error messages.
1123    
1124     * test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection):
1125     Add mask data to test.
1126    
1127     * test/test_layer.py (TestLayer.test_raster_layer): Test that a layer
1128     should use the mask by default.
1129     (TestLayerModificaton.test_raster_layer): Test that a layer should use
1130     the mask by default.
1131    
1132     * test/test_load.py (TestRasterLayer.test): Remove testing for
1133     use_mask flag in file.
1134    
1135     * test/test_save.py (SaveSessionTest.testRasterLayer): Remove testing
1136     for use_mask in file.
1137    
1138     * test/test_load_1_0_1.py: Removed. Shouldn't have been checked in.
1139    
1140 jonathan 2551 2005-01-26 Jonathan Coles <[email protected]>
1141    
1142     Add a new dialog box for raster layers. The dialog box allows
1143     the user to toggle a mask that is generated by ProjectRasterFile
1144     and is used to only draw the real parts of the projected image.
1145    
1146     * Thuban/UI/baserenderer.py (BaseRenderer.draw_raster_layer):
1147     Instruct the warping code to generate a mask if the raster layer
1148     requests one.
1149     (BaseRenderer.draw_raster_data): Removed obsolete optional mask argument.
1150    
1151     * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Removed
1152     obsolete optional mask argument.
1153    
1154     * Thuban/UI/classifier.py (Classifier): Change the parent class
1155     to LayerProperties and rework the code to support layout calls
1156     from the parent.
1157     (Classifier.dialog_layout): New. Layout the dialog box.
1158     (Classifier.map_layers_removed): Removed. Moved to parent class.
1159     (Classifier.map_replaced): Removed. Moved to parent class.
1160     (Classifier._OnTry): Renamed to OnTry to support parent class.
1161     (Classifier.OnClose): Removed. Supplied in parent class.
1162     (Classifier._OnCloseBtn): Removed. Supplied in parent class as OnCloseBtn.
1163     (Classifier._OnOK): Renamed to OnOK to support parent class.
1164     (Classifier._OnRevert): Renamed to OnRevert to support parent class.
1165    
1166     * Thuban/UI/layerproperties.py: New. Base class for layer properties
1167     dialog boxes.
1168    
1169     * Thuban/UI/rasterlayerproperties.py: New. Class for displaying
1170     raster layer properties.
1171    
1172     * libraries/thuban/gdalwarp.cpp: Replace the old gdalwarp.cpp code
1173     with the non-simple version supplied with gdal. This allows added
1174     features such as creating an alpha band.
1175     (GetImageData): Generate a mask array from the alpha band that is
1176     generated by gdal if the user has selected it. Try to support images
1177     that have more than three bands, such as images with RGB plus an
1178     alpha band.
1179     (ProjectRasterFile): Convert python argument for mask and tell
1180     gdal to enable or disable an alpha band.
1181    
1182     * Thuban/Model/layer.py (BaseLayer.Type): New. Returns a string
1183     describing what kind of layer the class is. Defaults to "Unknown",
1184     but should be overridden by subclasses.
1185     (Layer.Type): New. Override base class method.
1186     (RasterLayer.__init__): Create a flag for using a mask. Record extra
1187     data from gdal for display in the properties dialog.
1188     (RasterLayer.Type): New. Override base class method.
1189     (RasterLayer.UseMask): New. Returns True if the mask should be used.
1190     (RasterLayer.SetUseMask): New. Set if the mask should be used.
1191     (RasterLayer.ImageInfo): New. Return extra information about the image.
1192    
1193     * Thuban/Model/load.py (SessionLoader.start_rasterlayer): Load
1194     the mask information.
1195    
1196     * Thuban/Model/save.py (SessionSaver.write_layer): Save mask information.
1197    
1198     * Thuban/UI/mainwindow.py: Register the RasterLayerProperties and
1199     Classifier classes as dialogs to use with the proper layer types.
1200    
1201     * test/test_baserenderer.py (TestBaseRenderer.test_raster_no_projection):
1202     Fix test.
1203    
1204     * test/test_layer.py (TestLayer.test_raster_layer): Test new methods.
1205     (TestLayerModification.build_path): New. Support function.
1206     (TestLayerModification.test_raster_layer): New. Test new methods.
1207    
1208     * test/test_save.py (SaveSessionTest.testRasterLayer): Add tests for mask.
1209    
1210     * test/test_load.py (TestRasterLayer): Add tests for mask.
1211    
1212     * test/test_load_1_0_1.py: New. Copied from test_load.py.
1213    
1214     * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Removed
1215     obsolete optional mask argument.
1216    
1217 nhueffme 2549 2005-01-26 Nina Hüffmeyer <[email protected]>
1218    
1219     * Extensions/ogr/ogrshapes.py: Added two dictionaries to ShapeStore
1220     which maps the ids and the ordinals. Fixed RowIdToOrdinal(),
1221     RowOrdinalToId() and ReadRowAsDict().
1222    
1223     * Extensions/ogr/ogrstart.py: Added menu item which opens database
1224     layers for existing database connections.
1225    
1226     * Extensions/ogr/test/test_OGRShapestore.py: Fixed a message string.
1227    
1228    
1229 jan 2548 2005-01-26 Jan-Oliver Wagner <[email protected]>
1230    
1231     * Doc/manual/thuban-manual-de.xml: More translations.
1232    
1233 bh 2544 2005-01-24 Bernhard Herzog <[email protected]>
1234    
1235     Rework the status bar updates a bit to make sure the message about
1236     the projections is produced at the right times.
1237    
1238     * Thuban/UI/mainwindow.py (MainWindow.update_status_bar_messages):
1239     New class variable with messages that may require a status bar
1240     update.
1241     (MainWindow.view_position_changed)
1242     (MainWindow.update_status_bar): Rename from view_position_changed
1243     to update_status_bar. It's meaning has changed now that it may
1244     also generate messages about problems with projection settings.
1245     (MainWindow.__init__): Use the new update_status_bar_messages
1246     class variable to subscribe update_status_bar
1247     (MainWindow.set_position_text): Update doc-string. This method
1248     has to be renamed at some point. See doc-string and comments.
1249     (MainWindow.OnClose): Unsubscribe update_status_bar from all
1250     messages in update_status_bar_messages
1251    
1252     * Thuban/UI/viewport.py (ViewPort.forwarded_map_messages): New
1253     class attribute. map messages to be forwarded by the viewport.
1254     (ViewPort._subscribe_map, ViewPort._unsubscribe_map): (un)subscribe
1255     the messages in forwarded_map_messages
1256    
1257 bh 2543 2005-01-21 Bernhard Herzog <[email protected]>
1258    
1259     * test/postgissupport.py (PostGISDatabase.__init__): Tweak
1260     doc-string
1261     (find_postgis_sql): Update for postgis-1.0.0-rc1, which uses a
1262     different name for the initialization SQL file.
1263    
1264 jonathan 2537 2005-01-21 Jonathan Coles <[email protected]>
1265 jan 2542
1266     * Thuban/UI/baserenderer.py (proj_params_to_str): New. Takes
1267     a projection and returns a formatted string representing the
1268     parameters to feed to gdalwarp. This function eliminates
1269     redundancy in draw_raster_layer().
1270     (BaseRenderer.render_map_incrementally): Removed the optimization which
1271     drew the top most raster layer first and then only those vector-
1272     based layers that are above it. With the support for transparency
1273     this optimization breaks correct behaviour.
1274     (BaseRenderer.draw_raster_layer): Reorganize code to support possible
1275     future enhancements to raster layer bounding box. The old behaviour has
1276     not changed. Also, change calling parameters to draw_raster_data()
1277     to specify new RAW data format and mask.
1278     (BaseRenderer.draw_raster_data): Change signature to include an optional
1279     parameter for mask information. Change documentation to mention
1280     support for new parameter and added option for RAW data format.
1281     The data argument is now a list of [width, height, data].
1282    
1283     * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Add new optional
1284     mask parameter. Add new condition for RAW format, which
1285     significantly reduces rendering time. Add condition for
1286     mask parameter.
1287    
1288     * libraries/thuban/gdalwarp.cpp (GetImageData): New. Creates a
1289 jonathan 2537 data array of RGB values from the projected image returned from
1290     the gdal warping functions. In the case of palette based images, it
1291 jan 2542 converts the NO_DATA index to the mask color.
1292     (ProjectRasterFile): Removed all custom memory driver references
1293     and replaced it with the standard in-memory dataset provided
1294     by gdal. The return data is no longer a BMP file, but an array
1295     of RGB values, one set triple per pixel.
1296 jonathan 2537
1297     * libraries/thuban/bmpdataset.cpp: Removed. Unnecessary.
1298     * libraries/thuban/cpl_mfile.h: Removed. Unnecessary.
1299     * libraries/thuban/cpl_mfile.cpp: Removed. Unnecessary.
1300    
1301 jan 2542 * setup.py (thuban_build_ext.finalize_options): Removed mention
1302     of cpl_mfile.cpp and bmpdataset.cpp files in the list of source
1303     files. These are obsolete with the new version of gdalwarp.cpp
1304    
1305     * test/test_baserenderer.py (SimpleRenderer.draw_raster_data):
1306     Updated signature.
1307     (TestBaseRenderer.test_raster_no_projection): Changed the test
1308     data to be data in the uncompressed RAW format returned from
1309     ProjectRasterFile.
1310    
1311 jan 2535 2005-01-21 Jan-Oliver Wagner <[email protected]>
1312    
1313 jan 2542 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Made
1314     string available for i18n.
1315 jan 2535
1316 russell 2532 2005-01-20 Russell Nelson <[email protected]>
1317    
1318     * Resources/Projections/defaults.proj: Ruin the speling of the
1319 russell 2533 Lambert-93 projection so it doesn't run into the wx UTF-8 bug.
1320     It's the wrong thing to do in the long run, but it's necessary for
1321     those users until that bug is fixed. Otherwise the projection
1322     dialog segfaults. Better to annoy some Lambert-93 users with a
1323     spelling mistake than every Fedora Core 3 user of Thuban-CVS.
1324 russell 2532
1325 bernhard 2531 2005-01-20 Bernhard Reiter <[email protected]>
1326    
1327 jan 2542 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Added
1328     docstring and comment that the warning code here is a hack.
1329 bernhard 2531
1330 russell 2529 2005-01-20 Russell Nelson <[email protected]>
1331    
1332 jan 2542 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Warn
1333     user about misprojected layers when their lat/lon bounding
1334 russell 2529 box exceeds rational lat/lon values.
1335    
1336 bernhard 2525 2005-01-20 Bernhard Reiter <[email protected]>
1337    
1338 jan 2542 * Thuban/UI/about.py (unicodeToLocale): Improved:
1339 bernhard 2528 Use 'ascii' and then 'replace' for other characters
1340     when getdefaultlocale returns None. Thanks to Bernhard H. .
1341 jan 2542
1342 bernhard 2528 2005-01-20 Bernhard Reiter <[email protected]>
1343    
1344 jan 2542 * Thuban/UI/classgen.py (GenQuantilesPanel.OnRetrieve): Added a comment
1345 bernhard 2527 that OnRangeText might be called twice and using None as argument.
1346 jan 2542
1347 bernhard 2527 2005-01-20 Bernhard Reiter <[email protected]>
1348    
1349 jan 2542 * Thuban/UI/classgen.py (GenQuantilesPanel.OnRetrieve): Add a
1350     OnRangeText(0) to work around a different in wx Behaviour noticed
1351     on MacOSX, thanks to Lorenzo Moretti and Daniel Calvelo for the fix.
1352    
1353 bernhard 2526 2005-01-20 Bernhard Reiter <[email protected]>
1354    
1355     * Thuban/UI/about.py: take iso-8859-15 when getdefaultlocale returns
1356 bernhard 2525 None. (Fixes rt#2910.)
1357    
1358 frank 2524 2005-01-18 Frank Koormann <[email protected]>
1359    
1360     New Extension: mouseposition
1361     Tool to collect mouse click positions (map coordinates) in a dialog.
1362    
1363     * Extensions/mouseposition/__init__.py: New, extension registration
1364    
1365     * Extensions/mouseposition/mouseposition.py: New, implements the
1366     dialog and adds a tool to Thuban mainwindow.
1367    
1368     * Extensions/mouseposition/position.xpm: New, icon for tool.
1369    
1370 jan 2522 2005-01-14 Jan-Oliver Wagner <[email protected]>
1371    
1372     * Doc/manual/thuban-manual-de.xml: More translations.
1373    
1374 frank 2520 2005-01-11 Frank Koormann <[email protected]>
1375    
1376     * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer):
1377     Fix indention bug.
1378    
1379 frank 2517 2005-01-09 Frank Koormann <[email protected]>
1380    
1381     * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer):
1382 frank 2520 BugFix 2901: Explicitly copy layers ClassificationColumn since it
1383 frank 2517 is not part of the layers Classification.
1384    
1385 frank 2515 2005-01-03 Frank Koormann <[email protected]>
1386    
1387 frank 2517 * Thuban/UI/renderer.py (ScreenRendererdraw_selection_incrementally):
1388     BugFix 2883: Former implementation only worked on classified point
1389     layers: KeyError was raised, now use the default size if field is None.
1390 frank 2515
1391 bernhard 2513 2004-12-27 Bernhard Reiter <[email protected]>
1392    
1393     svgexport 1.0.0cvs: Fixed label export.
1394    
1395     * Extensions/svgexport/test/test_svgmapwriter.py:
1396     class TestSVGRenderer(): New class; new test test_label_font().
1397    
1398     * Extensions/svgexport/svgmapwriter.py
1399     (SVGRenderer.label_font()): initialised Font size with self.factor now,
1400     makes test_label_font happy.
1401    
1402     * Extensions/svgexport/TODO: crossed out fixed label export item.
1403     Added item for options.
1404    
1405     * Extensions/svgexport/__init__.py: Bumped version to 1.0.0cvs.
1406    
1407 russell 2511 2004-12-27 Russell Nelson <[email protected]>
1408    
1409 jan 2512 Middle mouse button pans.
1410 russell 2511
1411 jan 2512 * Thuban/UI/view.py (MapCanvas.__init__): Subscribe also
1412     OnMiddleDown and OnMiddleUp events.
1413     (MapCanvas.OnMiddleDown): New. Activate the pan tool and remember the
1414     previously used tool.
1415     (MapCanvas.OnMiddleUp): New. Reactivate the remebered tool used before
1416     pressing the middle mouse button.
1417    
1418 jan 2509 2004-12-27 Jan-Oliver Wagner <[email protected]>
1419    
1420     * Doc/manual/thuban-manual-de.xml: More translations.
1421    
1422 jan 2506 2004-12-23 Jan-Oliver Wagner <[email protected]>
1423    
1424     * Thuban/UI/projdialog.py (ProjFrame.load_user_proj): Added a
1425     \n to stderr after the warnings. Thanks to Russell Nelson.
1426    
1427 nhueffme 2493 2004-12-20 Nina Hueffmeyer <[email protected]>
1428    
1429     * Extensions/ogr/ogrshapes.py: Fixed some issues from
1430     Bernhard (coding guidelines etc.). Additionally it is now possible to
1431     display shapefiles containing feature collections (e.g.polygons
1432     with holes). Works with gdal 1.2.1 now.
1433    
1434     * Extensions/ogr/test/test_OGRShapestore.py: Fixed some issues
1435     from Bernhard (coding guidelines etc.). If ogr can't be imported,
1436     tests are skipped now.
1437    
1438     * Extensions/ogr/ogrstart.py: Fixed some typings.
1439    
1440 bernhard 2490 2004-12-20 Bernhard Reiter <[email protected]>
1441    
1442     * Extensions/svgexport/TODO: updated to add support for
1443     raster layers and labels for 1.0.1.
1444    
1445     * Extensions/svgexport/svgmapwriter.py (draw_raster_layer):
1446     Issue a warning now.
1447    
1448 bernhard 2488 2004-12-19 Bernhard Reiter <[email protected]>
1449    
1450 bernhard 2489 * Extensions/svgexport/TODO: Added idea to support triggering
1451     the application down the pipe.
1452    
1453     2004-12-19 Bernhard Reiter <[email protected]>
1454    
1455 bernhard 2488 svgexport: Improved code quality, mainly by better naming.
1456    
1457     * Extensions/svgexport/svgmapwriter.py:
1458     DrawPath() renamed to DrawPolygonPath(),
1459     added documentation, improved comments and variable names.
1460    
1461     * Extensions/svgexport/svgmapwriter.py,
1462     Extensions/svgexport/test/test_svgmapwriter.py:
1463     All using DrawPolygonPath() now, the default parameter closed=True
1464     omitted.
1465    
1466     * Extensions/svgexport/test/test_svgmapwriter.py:
1467     renamed test_polygon_opened() to test_polyline()
1468     renamed test_transparent_polygon() to test_transparent_polyline()
1469    
1470 jan 2487 2004-12-18 Jan-Oliver Wagner <[email protected]>
1471    
1472     Some fixes of gns2shp extension.
1473    
1474     * Extensions/gns2shp/test/__init__.py: New. Make this directory a
1475     package.
1476    
1477     * Extensions/gns2shp/test/test_gns2shp.py: Add some import paths
1478     dynamically.
1479    
1480     * Extensions/gns2shp/test/README: Simplified description how to test.
1481    
1482     * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed doc-string,
1483     fixed some dimensions of fields according to the GNS documentation
1484     which seems to change undocumented.
1485     Now killing trailing \n and/or \r from MODIFY_DATE.
1486     This fixes RT#2453.
1487    
1488 bernhard 2479 2004-12-18 Bernhard Reiter <[email protected]>
1489 bernhard 2480
1490 bernhard 2482 svgexport 1.0.0: Treats holes and islands nicely. Documentation added.
1491    
1492     * Extensions/svgexport/test/test_svgmapwriter.py:
1493     Added new tests: test_export_polygon_with_hole()
1494     and test_polygon_with_hole().
1495    
1496     * Extensions/svgexport/svgmapwriter.py
1497     (draw_polygon_shape()): Uses DrawPath correctly now.
1498    
1499     * Doc/manual/thuban-manual.xml: Added documentation for stable
1500     extention svgexport.
1501     * Doc/manual/thuban-manual-de.xml: Copied English section about
1502     svexport over.
1503    
1504 jan 2509 * Extensions/svgexport/__init__.py: Bumped version number to 1.0.0.
1505 bernhard 2482
1506     * Extensions/svgexport/svgsaver.py,maplegend.py:
1507     Moved from experimental to stable extension menu.
1508    
1509     * Extensions/svgexport/TODO: updated.
1510    
1511    
1512     2004-12-18 Bernhard Reiter <[email protected]>
1513    
1514 bernhard 2481 Added Extensions/svgexport/TODO
1515    
1516     2004-12-18 Bernhard Reiter <[email protected]>
1517    
1518 bernhard 2480 Refactored in svgexport:
1519     DrawPath replaces DrawPolygon; added newline in front of "M" in paths.
1520    
1521     * Extensions/svgexport/svgmapwriter.py
1522     Added verbosity level 3 to print out polygon points.
1523     (class Point): added __repr__
1524     (class Brush, __str__()): Added space after ,.
1525     (DrawPolygon): Renamed to DrawPath()
1526     (DrawPath): Takes list of polygons as input now, adds \n before "M"s.
1527     (DrawLines): Using DrawPath now.
1528    
1529     * Extensions/svgexport/test/test_svgmapwriter.py:
1530     Replaced DrawPolygon() calls with DrawPath() and put the first argument
1531     inside another list. Adapted test data with a newline before "M".
1532    
1533     2004-12-18 Bernhard Reiter <[email protected]>
1534 bernhard 2479
1535     Refactored svgexport tests: 9 double tests runs eliminated;
1536     code size reduced by 8 lines.
1537    
1538     * Extensions/svgexport/test/test_svgmapwriter.py:
1539     (class TestWithDC): Renamed to BaseTestWithDC, moved to top.
1540     (class BaseWithDCtools): New, subclass from BaseTestWithDC.
1541     (class TestDrawSplines): now subclass from BaseTestWithDCtools,
1542     this fixed the double running of the nine tests of TestVirtualDC.
1543     (class TestVirtualDC): Using self.dc and self.file from setUp().
1544    
1545 bh 2478 2004-12-17 Bernhard Herzog <[email protected]>
1546    
1547     Two windows specific fixes ported from thuban-1­0-branch:
1548    
1549     * Thuban/UI/about.py (unicodeToLocale): Use getdefaultlocale
1550     instead of getlocale because getlocale doesn't return a usable
1551     encoding name on a german windows 2000
1552    
1553     * setup.py: windows build: Removed the absolute path names and
1554     made all prfixes relative to the directory containing setup.py.
1555     Makes it a little easier to adapt to a different system.
1556    
1557 bh 2470 2004-12-16 Bernhard Herzog <[email protected]>
1558    
1559 bernhard 2479 Add support for PostGIS tables with LINESTRING geometries.
1560 bh 2472 Fixes RT#2299
1561    
1562     * Thuban/Model/postgisdb.py (shapetype_map): Add LINESTRING
1563    
1564     * test/postgissupport.py
1565     (PostgreSQLServer.get_default_static_data_db): Rename the "roads"
1566     table to "roads-multi" because it now uses MULTILINESTRING
1567     geometries and introduce a new "roads" table that uses LINESTRING
1568     (coords_to_multilinestring): Make the doc string more precise
1569     (coords_to_linestring): New. Create a LINESTRING WKT
1570     representatin
1571     (wkt_converter): Add coords_to_linestring
1572     (upload_shapefile): Rephrase the doc-string a bit.
1573    
1574     * test/test_postgis_db.py (TestPostGISShapestoreArc)
1575     (LineStringTests)
1576     (TestPostGISShapestoreLineString)
1577     (TestPostGISShapestoreMultiLineString): Split
1578     TestPostGISShapestoreArc into a base class LineStringTests and two
1579     derived classes TestPostGISShapestoreLineString for LINESTRING
1580     geometries and TestPostGISShapestoreMultiLineString for
1581     MULTILINESTRING geometries. Most test methods are in the base
1582     class with the exception of tests that explicitly check the raw
1583     format.
1584    
1585     2004-12-16 Bernhard Herzog <[email protected]>
1586    
1587 bh 2471 Make the test suite work with PostGIS 0.8.2 and PostgreSQL 7.4
1588    
1589     * test/postgissupport.py (find_postgis_sql): Different postgis
1590     versions put the postgis.sql file into slightly different places
1591     so we have to look in both. The updated doc string describes this
1592     is more detail.
1593    
1594     * test/test_postgis_db.py
1595     (TestPostGISSpecialCases.test_column_name_quoting): The return
1596     value of UniqueValues is unsorted, so it has to be sorted for
1597     comparison.
1598    
1599     2004-12-16 Bernhard Herzog <[email protected]>
1600    
1601 bh 2470 Fix for RT#2237
1602    
1603     * Thuban/UI/projdialog.py (ProjFrame._show_proj_panel): If the
1604     panel to be shown is the UnknownProjPanel disable the OK and Try
1605     buttons. Otherwise enable them.
1606     (ProjFrame.__GetProjection): The UnknownProjPanel returns None for
1607     the parameters. In that case __GetProjection also returns None
1608     now.
1609    
1610 bh 2459 2004-12-15 Bernhard Herzog <[email protected]>
1611    
1612 bh 2462 * Thuban/UI/classgen.py (GenQuantilesPanel.__init__): Set the
1613     minimum number of classes to 2. The calculate_quantiles needs at
1614     least two and raises an exception otherwise.
1615     Fixes RT#2549
1616    
1617     2004-12-15 Bernhard Herzog <[email protected]>
1618    
1619 bh 2460 * test/postgissupport.py (PostgreSQLServer.execute_sql): Extend to
1620     so that it returns a result for select statements.
1621     (PostgreSQLServer.server_version): New. Return the version of the
1622     server software.
1623     (PostgreSQLServer.require_authentication): The format of
1624     pg_hba.conf has changed between PostgrSQL 7.2 and 7.3. Check the
1625     server version and generate the file in the correct format
1626    
1627     2004-12-15 Bernhard Herzog <[email protected]>
1628    
1629 bh 2459 * test/postgissupport.py (PostgreSQLServer.is_running): Fix typo
1630     in the doc string and rephrase it a little.
1631    
1632 frank 2457 2004-12-15 Frank Koormann <[email protected]>
1633    
1634     * test/test_load.py (TestAltPath.checkSession): New, extended checks if
1635     session has been loaded successfully. The check is called by the relevant
1636     tests after executing load_session().
1637    
1638 bh 2450 2004-12-13 Bernhard Herzog <[email protected]>
1639    
1640 bh 2454 Make sure the region used to determine which shapes are visible
1641     actually matches the region on the printed page. If this isn't
1642     done properly some shapes might not be printed.
1643     Fixes RT #2692
1644    
1645     * Thuban/UI/view.py (MapPrintout.draw_on_dc): The region for the
1646     renderer has to be at the same position as the mapregion
1647    
1648     * Thuban/UI/renderer.py (ExportRenderer.RenderMap): self.region
1649     has to be moved by (self.shiftx, self.shifty) too.
1650    
1651     2004-12-13 Bernhard Herzog <[email protected]>
1652    
1653 bh 2452 * libraries/pyprojection/Projection.i: Work around a bug in the
1654     generated python code which leads to exception in the __del__
1655     method when the constructor fails. See the comments in the code
1656     for more details.
1657    
1658     * libraries/pyprojection/Projection.py: Updated from Projection.i
1659     with SWIG.
1660    
1661     2004-12-13 Bernhard Herzog <[email protected]>
1662    
1663 bh 2451 * test/test_load.py (TestAltPath.test_01_single_path_error_fix)
1664     (TestAltPath.test_02_path_error_fix_from_list)
1665     (TestAltPath.test_05_path_error_fix_from_list_changed)
1666     (TestAltPath.test_06_path_error_fix_from_list_fails): self.session
1667     is destroyed in tearDown, so there's no need to do it in a test
1668     case.
1669    
1670     * Thuban/Model/load.py (SessionLoader.open_shapefile): Remove a
1671     debug print
1672    
1673     2004-12-13 Bernhard Herzog <[email protected]>
1674    
1675 bh 2450 * Extensions/svgexport/test/test_svgmapwriter.py
1676     (TestDrawSplines.setUp): Do not use super with the unittest
1677     classes because in Python 2.2 they're still old-style classes.
1678    
1679 frank 2448 2004-12-13 Frank Koormann <[email protected]>
1680    
1681     Alternative Path feature: When loading a (moved) session where
1682     shapefiles cannot be found, ask the user. Use the specified path
1683     if further shapefiles are missing. However, ask the usr for confirmation
1684     in such cases.
1685    
1686     * test/test_load.py (TestAltPath): New, tests for alternative path feature
1687     in load_session()
1688     (Shapefile_CallBack): Helper, implements controllable callback.
1689    
1690     * Thuban/UI/application.py (ThubanApplication.OnInit):
1691     Added "alt_path" to self.path
1692     (ThubanApplication.OpenSession): Added shapefile_callback as second
1693     callback similar to db_connection_callback.
1694     (ThubanApplication.run_alt_path_dialog): New, implementaion of
1695     shapefile_callback. In addition to raising the dialog the control of
1696     self.path('alt_path') is implemented here.
1697    
1698     * Thuban/Model/load.py (SessionLoader.__init__): Added shapefile_callback.
1699     (SessionLoader.open_shapefile): Open shapefile, eventually with
1700     alternative path. This wrapps the "theSession.OpenShapefile(filename)"
1701     formerly used in start_fileshapesource()/start_layer().
1702     (SessionLoader.start_fileshapesource): Call open_shapefile().
1703     (SessionLoader.start_layer): Call open_shapefile().
1704     (load_session): Added shapefile_callback.
1705    
1706     * Thuban/UI/altpathdialog.py: New, implements dialogs for alternative path
1707     feature (search / check).
1708    
1709     * Doc/manual/thuban-manual.xml: Added documentation of new feature.
1710    
1711 bernhard 2443 2004-12-11 Bernhard Reiter <[email protected]>
1712    
1713 bernhard 2445 svgexport 0.9.2: Point size supports for maps.
1714    
1715     * Extensions/svgexport/svgmapwriter.py: Added import of SHAPETYPE_POINT
1716     (def draw_point_shape): new parameter size defaults to 2 as before.
1717     (draw_shape_layer_incrementally): Moved draw_func log line higher.
1718     Added draw_func call with size when dealing with a point layer.
1719    
1720     * Extensions/svgexport/__init__.py: bumped version to 0.9.2.
1721    
1722     2004-12-11 Bernhard Reiter <[email protected]>
1723    
1724 bernhard 2444 Made sure that newlines are inserted in the svg path d attributes
1725     to raise the chance that the line length will be below 255 characters,
1726     as recommended by REC SVG 1.1 in section 8.3.1.
1727    
1728     * Extensions/svgexport/svgmapwriter.py(DrawPolygon):
1729     Adding \n before L's and changed whitespace handling.
1730    
1731     * Extensions/svgexport/test/test_svgmapwriter.py:
1732     Adapted tests to new whitespace handling of DrawPolygon.
1733    
1734     2004-12-11 Bernhard Reiter <[email protected]>
1735    
1736 bernhard 2443 * Doc/technotes/coding_guidelines.txt: easy typo fixed.
1737    
1738     * Extensions/svgexport/test/test_svgmapwriter.py:
1739     Removed test_drawbezier in favour of new test_drawspline3 and
1740     test_drawspline4 within new class TestDrawSplines(TestVirtualDC).
1741     All only to test DrawSpline.
1742    
1743     * Extensions/svgexport/svgmapwriter.py(DrawSpline):
1744     New implementation now really using the strange algorithm of
1745     xfig 3.1's approximated splines and its conversion to postscript
1746     with one twist: SVG can do quadratic beziers, so skipped translation
1747     to cubic beziers.
1748     (TestWithDC): Typo in comment fixed.
1749    
1750 joey 2442 2004-12-09 Martin Schulze <[email protected]>
1751    
1752     * Thuban/Model/classgen.py: Added missing character encoding
1753    
1754     * Extensions/wms/properties.py (OpenWMSProperties): removed
1755    
1756     * Extensions/wms/parser.py (WMSCapabilitiesParser.error): Dropped
1757     support for get_srs_discrepancies() since there are no
1758     discrepancies anymore (was a thinko)
1759    
1760     * Extensions/wms/layer.py (WMSLayer.GetMapImg): Improved graphic
1761     format priority now that more formats are supported globally by
1762     the render engine.
1763    
1764 silke 2437 2004-12-08 Silke Reimer <[email protected]>
1765     * Extensions/ogr/ogrshapes.py: Substituted ogr-method CloseRings
1766     because it is not available in all versions of ogr
1767    
1768 bernhard 2436 2004-12-08 Bernhard Reiter <[email protected]>
1769     * Extensions/ogr/__init__.py: Added empty __init__.py to heal
1770     global tests until a real one is commited.
1771    
1772 nhueffme 2435 2004-12-07 Nina Hüffmeyer <[email protected]>
1773    
1774     * /Extensions/ogr/: Adding a new extension to read shapefiles with
1775     ogr. It is planned to add other vector formats.
1776    
1777     * /test/runtests.py: Adding tests from /Extensions/ogr/test/.
1778    
1779 jan 2434 2004-12-07 Jan-Oliver Wagner <[email protected]>
1780    
1781     * /Extensions/svgexport/test/test_svgmapwriter.py: Reverting
1782     part of a (non-)fix to renable that the tests are always
1783     executed.
1784    
1785 bernhard 2432 2004-12-07 Bernhard Reiter <[email protected]>
1786    
1787     * Extensions/svgexport/test/test_svgmapwriter.py:
1788     Added test_drawbezier() to test DrawSpline().
1789    
1790     * Extensions/svgexport/svgmapwriter.py(DrawSpline):
1791     Really implemented bezier drawing.
1792    
1793     * Extensions/svgexport/__init__.py: Bumped version of svgexport
1794     to 0.9.1 because now the legend examples lines styles
1795     will be drawing with beziers.
1796    
1797 joey 2431 2004-12-05 Martin Schulze <[email protected]>
1798    
1799     * Thuban/UI/renderer.py (raster_format_map): Added PNG, TIFF and
1800     GIF as supported bitmap image formats (helpful for the WMS extension)
1801    
1802 joey 2430 2004-11-30 Martin Schulze <[email protected]>
1803    
1804     * Extensions/wms/test/test_ogclib.py (TestOGCLib.test_compareURLs):
1805     Improved the test for the internal compare method
1806    
1807 jan 2429 2004-11-27 Jan-Oliver Wagner <[email protected]>
1808    
1809     * Thuban/UI/about.py (About.__init__): Added
1810     Norbert Solymosi for hungarian translation and Ole Rahn
1811 bernhard 2722 as contributor. Moved Bernhard Reiter from Contributor
1812 jan 2429 to Developer.
1813    
1814 bernhard 2425 2004-11-27 Bernhard Reiter <[email protected]>
1815    
1816     * Extensions/svgexport/test/test_svgmapwriter.py:
1817     Removed Jan from author list as he did not change enough significant
1818     lines yet.
1819    
1820     * Extensions/svgexport/__init__.py: Added Bernhard as author
1821     of the Extension.
1822    
1823 jan 2422 2004-11-27 Jan-Oliver Wagner <[email protected]>
1824    
1825     * po/hu.po: New. Hungarian translation. Contributed
1826     by Norbert Solymosi.
1827    
1828 bh 2419 2004-11-26 Bernhard Herzog <[email protected]>
1829    
1830     * Extensions/svgexport/test/test_svgmapwriter.py
1831     (Testobjectexport.test_transparent_polygon): Commented out some
1832     debug prints
1833    
1834 jan 2418 2004-11-24 Jan-Oliver Wagner <[email protected]>
1835    
1836     Fix broken tests for svg extension and added svg legend
1837     to Experimental menu.
1838    
1839     * Extensions/svgexport/test/test_svgmapwriter.py: Fix to have
1840     the test run correctly even if the extension is a package.
1841     Also removed the "import Thuban" which makes no sense.
1842    
1843     * Extensions/svgexport/__init__.py: Fix to have the extensions'
1844     test module also be executed from the global test routine.
1845     This is done by looking for the absense of the DISPLAY variable.
1846    
1847     * Extensions/svgexport/maplegend.py: Moved the menu entry from Extensions
1848     to Experimental menu since this module has yet not reached a stable
1849     status (ie. 1.0).
1850    
1851 bernhard 2414 2004-11-22 Bernhard Reiter <[email protected]>
1852    
1853     * Extensions/svgexport/svgmapwriter.py:
1854     Added verbose variable and some logging depending on it.
1855     (class VirtualDC(XMLWriter)): Minor improvement in the polygon loop,
1856     because counting i is not necessary.
1857     (class Pen, class Brush): Added simple __str__ methods.
1858     (SVGRenderer.draw_polygone_shape): Fix #2698 (transparent polygons are
1859     not exported to svg file) Note: holes still unhandled.
1860    
1861     * Extensions/svgexport/test/test_svgmapwriter.py:
1862     Made a baseclass TestWithDC for test needed a DC.
1863     Added tests for bug #2698 (transparent polygons are not
1864     exported to svg file):
1865     Testobjectexport.test_transparent_polygon()
1866    
1867     * Thuban/Model/base.py (UnsetModified):
1868     Fixed some typos in docstring.
1869    
1870     * Thuban/UI/baserenderer.py (BaseRenderer.draw_polygon_shape()):
1871     Added hints on the used algorithm for handling holes.
1872    
1873 jan 2403 2004-11-20 Jan-Oliver Wagner <[email protected]>
1874    
1875 jan 2412 Some face lifting for the examples.
1876    
1877     * Examples/__init__.py: Make this directory a package.
1878    
1879     * Examples/simple_extensions/__init__.py: Make this directory a package.
1880    
1881     * Examples/simple_extensions/hello_world.py: Moved entry from Extensions
1882     menu to Examples menu.
1883    
1884     * Examples/simple_extensions/simple_command.py: Some more comments,
1885     minor changes.
1886    
1887     * Examples/simple_extensions/simple_tool.py: Minor changes.
1888    
1889     2004-11-20 Jan-Oliver Wagner <[email protected]>
1890    
1891 jan 2407 Changed way of extension registry for wms and added extension
1892     registry for umn_mapserver extension.
1893    
1894     * Extensions/wms/__init__.py: Added registry entry and the importing
1895     of the actual wms module. Included a test for the required PyOGCLib.
1896    
1897     * Extensions/wms/wms.py: Removed registry entry (moved to __init__.py).
1898    
1899     * Extensions/umn_mapserver/__init__.py: Added registry entry and the
1900     importing of the actual umn mapserver management modules.
1901     Included a test for the required Python MapScript.
1902    
1903     2004-11-20 Jan-Oliver Wagner <[email protected]>
1904    
1905 jan 2403 Changed way of extension registry for importAPR, bboxdump
1906     and added extension registry for svgexport.extension registry for
1907     svgexport.
1908    
1909     * Extensions/importAPR/__init__.py: Added registry entry and the importing
1910     of the actual importAPR module.
1911    
1912     * Extensions/importAPR/importAPR.py: Removed registry entry (moved to
1913     __init__.py).
1914    
1915     * Extensions/bboxdump/__init__.py: Added registry entry and the importing
1916     »···of the actual bboxdump module.
1917    
1918     * Extensions/bboxdump/bboxdump.py: Removed registry entry (moved to
1919     »···__init__.py).
1920    
1921     * Extensions/svgexport/__init__.py: Added registry entry and the importing
1922     of the svgsaver module.
1923    
1924     * Extensions/svgexport/svgsaver.py: Moved the menu entry from Extensions
1925     to Experimental menu since this module has yet not reached a stable
1926     status (ie. 1.0).
1927    
1928 jan 2397 2004-11-18 Jan-Oliver Wagner <[email protected]>
1929    
1930     Now the hit test considers the size of point symbols.
1931    
1932     * Thuban/UI/viewport.py (ViewPort._hit_point): Added optional parameter
1933     'size' defaulting to the previously fixed value 5.
1934     Extended doc-string.
1935     (Viewport._find_shape_in_layer): Resolved FIXME regarding flexibility
1936     for symbols.
1937     Now the size of the largest point symbol is determined to find out
1938     about whether the point has been hit.
1939     This fixes the problem that only clicks inside a fixed distance of
1940     5 where found.
1941    
1942 jan 2395 2004-11-17 Jan-Oliver Wagner <[email protected]>
1943    
1944 jan 2397 Another open issue fixed regarding sizeable symbols: correct rendering of
1945 jan 2395 selected symbols.
1946    
1947     * Thuban/UI/renderer.py (ScreenRenderer.draw_selection_incrementally):
1948     Added consideration of the specific size of point symbols.
1949     The property for each point symbol is retrieved and the size applied
1950     for the rendering method.
1951     Added doc-string.
1952    
1953 jan 2393 2004-11-16 Jan-Oliver Wagner <[email protected]>
1954    
1955     Changed way of Extension Registry for gns2shp and profiling.
1956    
1957     * Extensions/gns2shp/gns2shp.py: Removed registry entry (moved to
1958     __init__.py).
1959    
1960     * Extensions/gns2shp/__init__.py: Added registry entry and the importing
1961     of the actual gns2shp module.
1962    
1963     * Extensions/profiling/profiling.py: Removed registry entry (moved to
1964     __init__.py).
1965    
1966     * Extensions/profiling/__init__.py: Added registry entry and the importing
1967     of the actual profiling module.
1968    
1969 bernhard 2388 2004-10-28 Bernhard Reiter <[email protected]>
1970    
1971     * Extensions/svgexport/: Minor improvements to doc strings.
1972    
1973 jan 2387 2004-10-07 Jan-Oliver Wagner <[email protected]>
1974    
1975     Further elements for sizable point objects now
1976     making this feature usable though not yet complete.
1977    
1978     * Thuban/Model/save.py (SessionSaver.write_classification): Write
1979     attribute 'size' for cldata when the shape layer is of point type.
1980     This also now make the test_load.py tests happy.
1981    
1982     * Thuban/Model/classgen.py (CustomRamp.GetProperties): Added size
1983     gradient.
1984    
1985     * Thuban/UI/classifier.py (ID_SELPROP_SPINCTRL): Renamed to
1986     ID_SELPROP_SPINCTRL_LINEWIDTH.
1987     (ID_SELPROP_SPINCTRL_LINEWIDTH): New Id replaces ID_SELPROP_SPINCTRL.
1988     (ID_SELPROP_SPINCTRL_SIZE): New Id.
1989     (SelectPropertiesDialog.__init__): Added a second spin control
1990     for the size in case the corresponding layer is of point type.
1991     (SelectPropertiesDialog._OnSpin): Renamed to _OnSpinLineWidth.
1992     (SelectPropertiesDialog._OnSpinLineWidth): New. Former _OnSpin.
1993     (SelectPropertiesDialog._OnSpinSize): New. Set size of property
1994     and refresh preview.
1995    
1996    
1997    
1998 joey 2381 2004-10-04 Martin Schulze <[email protected]>
1999    
2000     * Extensions/wms/test/test_parser.py
2001     (TestWMSCapabilitiesParser.test_compareLists): Added missing
2002     self-test for compareLists()
2003     (TestWMSCapabilitiesParser.test_compareDicts): Added missing
2004     self-test for compareDicts()
2005 joey 2382 (TestWMSCapabilitiesParser.test_compareLists): Adding more tests
2006     to verify the test routine fails with non-equal arguments
2007     (TestWMSCapabilitiesParser.test_compareDicts): Adding more tests
2008     to verify the test routine fails with non-equal arguments
2009 joey 2381
2010 jan 2370 2004-10-03 Jan-Oliver Wagner <[email protected]>
2011    
2012 jan 2380 First elements for sizeable point objects.
2013    
2014     * Resources/XML/thuban-1.1.dtd: Added size attribute to cldata.
2015    
2016     * Data/iceland_sample_size.thuban: New. Sample for sized point objects.
2017    
2018     * test/test_load.py (ClassificationTest.TestLayers): Added SetSize in case
2019     of a corresponding argument is given.
2020     (TestSymbolSize): New. Test the size attribute of cldata.
2021    
2022     * Thuban/Model/classification.py: Removed some trailing whitespaces.
2023     (ClassGroupProperties.__init__): Set default size.
2024     (ClassGroupProperties.SetProperties): Set the size.
2025     (ClassGroupProperties.GetSize): New. Return the size.
2026     (ClassGroupProperties.SetSize): New. Set the size.
2027     (ClassGroupProperties__eq__): Compare also size.
2028     (ClassGroupProperties__repr__): Print also size.
2029    
2030     * Thuban/Model/load.py (SessionLoader.start_cldata): Also parse
2031     the size attribute.
2032    
2033     * Thuban/UI/classifier.py (ClassDataPreviewer.Draw): Added doc-string.
2034     Also, now there is a return value that indicates whether the drawing
2035     size exceeded the given rect extent and if so the new extent.
2036     Finally, point objects are drawn depending on the size. If either
2037     the width or height is exceeded, the new extent is returned.
2038     (ClassRenderer.Draw): Now when calling the previewer drawing function,
2039     evaluate the return value and, if not None, adapt the grid widget size
2040     accordingly and redraw again.
2041    
2042     * Thuban/UI/baserenderer.py (BaseRenderer.draw_shape_layer_incrementally):
2043     If the draw function is for points, call it with the size as additional
2044     parameter.
2045     (BaseRenderer.draw_point_shape): Added additional, optional parameter for
2046     the size. Compute the radius using the size.
2047    
2048     * Extensions/importAPR/apr.py (APR_BMkSym.GetThubanProp): Now
2049     that Thuban supports size, apply this correctly.
2050    
2051     * Extensions/importAPR/importAPR.py: Bumped version to 0.1.1.
2052    
2053     2004-10-03 Jan-Oliver Wagner <[email protected]>
2054    
2055 jan 2370 * Doc/manual/thuban-manual-de.xml: Started translation of
2056     Map chapter.
2057    
2058 joey 2368 2004-10-01 Martin Schulze <[email protected]>
2059    
2060     * Extensions/wms/properties.py (wmsProperties.__init__): Extended
2061     argument for general use through properties-dialog selector
2062    
2063     * Thuban/UI/classifier.py: Register properties dialog classes for
2064     both provided layer classes/types.
2065    
2066     * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): The
2067     map can be retrieved through the parent which is passed to the
2068     constructor anyway and doesn't require an argument of its own,
2069     required for the unification of arguments for general use through
2070     properties-dialog selector.
2071     (MainWindow.OpenOrRaiseDialog): Move the logic for checking
2072     whether a dialog is already opened (and raising it to the users
2073     attention) and creating a new dialog into a function of its own
2074     (MainWindow.OpenLayerProperties): Use the new OpenOrRaiseDialog()
2075     method
2076     (MainWindow.OpenLayerProperties): Utilise the new ClassMapper for
2077     global registration of properties dialog classes (which are indeed
2078     layer-specific).
2079    
2080     * Thuban/UI/classifier.py (Classifier.__init__): Unify arguments
2081     for general use through properties-dialog selector, the map can be
2082     retrieved through the parent and doesn't require an argument of
2083     its own.
2084    
2085     * Extensions/wms/wms.py: Register the properties dialog class for
2086     the provided WMS layer
2087    
2088 jan 2358 2004-09-28 Jan-Oliver Wagner <[email protected]>
2089    
2090     New feature: Registry for Extensions.
2091    
2092     * Thuban/UI/extensionregistry.py: This module defines a registry for
2093     Extensions.
2094    
2095     * Thuban/UI/about.py (About.__init__): Added description
2096     of the registered extensions with all of the information.
2097    
2098     * Thuban/Model/extension.py (Extension): Improved doc-string.
2099    
2100     * Extensions/gns2shp/gns2shp.py, Extensions/importAPR/importAPR.py,
2101     Extensions/bboxdump/bboxdump.py, Extensions/profiling/profiling.py,
2102     Extensions/wms/wms.py: Added registration of the extension.
2103    
2104 bernhard 2352 2004-09-27 Bernhard Reiter <[email protected]>
2105    
2106     More fixes to svgexport to make used ids unique and
2107     conforming to XML's Name production.
2108    
2109     * Extensions/svgexport/test/test_svgmapwriter.py: Added new tests
2110     test_xml_id_constraints(), test_make_ide_nosetbaseid() and
2111     test_make_id_nonintegersetid(). Switched SetID and SetBaseID.
2112     Added Bernhard R. as author.
2113     * Extensions/svgexport/svgmapwriter.py (make_id): Using "_" as
2114     concatenation char now (makes test_make_ide_nosetbaseid() valid).
2115     Also transform second id part with "%d" and catch the TypeError
2116     to raise SVGMapWriterError (making test_make_id_nonintegersetid() ok).
2117     Corrected typo inBernhard's author line.
2118     (SetBaseID): Return the transformed base id. Transform characters
2119     which are not alnum() or in ".-_" to binascii.b2a_hex(). Added
2120     import binascii. If to be set string starts with "xml" or so, add "t".
2121     (draw_shape_layer_incrementally): use the returned value of SetBaseID
2122     for used_baseids checks.
2123    
2124 bh 2351 2004-09-25 Bernhard Herzog <[email protected]>
2125    
2126     * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
2127     Remove a debug print and some tab characters.
2128    
2129 bernhard 2350 2004-09-25 Bernhard Reiter <[email protected]>
2130    
2131     * Extensions/svgexport/svgmapwriter.py: Added Bernhard R. as Author.
2132     (SetBaseID, SetID, make_id): Improved docstring comments to explain
2133     the interaction of the three functions and the XML id contrains.
2134    
2135 bernhard 2352
2136 jan 2346 2004-09-23 Jan-Oliver Wagner <[email protected]>
2137    
2138 jan 2349 * Doc/ThubanModel.xmi: New. UML file for Thuban Model
2139     Module.
2140    
2141     * Doc/README: Added info on ThubanModel.xmi.
2142    
2143     2004-09-23 Jan-Oliver Wagner <[email protected]>
2144    
2145 jan 2346 * Doc/README: New. Some info about how to generate technical
2146     documentation from the source code.
2147     This text was send to the Thuban developer mailing list on
2148     September 21st 2004 by Bernhard Reiter.
2149    
2150 bernhard 2344 2004-09-21 Bernhard Reiter <[email protected]>
2151    
2152     Improved the svgexport to only use unique ids. Will issues
2153     an error message dialoge when two layer names are the same.
2154     ShapeIDs are now added with a dash within the svg ids.
2155    
2156     * Extensions/svgexport/svgmapwriter.py (SVGMapWriterError): New.
2157     * Extensions/svgexport/test/test_svgmapwriter.py: Added imports
2158     (TestSVGRenderer): New test class with test_make_in() and
2159     test_check_for_layer_name_clash()
2160     * Extensions/svgexport/svgmapwriter.py (SVGRenderer): Fixed __init__()
2161     and draw_shape_layer_incrementally() to not use a baseid twice,
2162     satisfying test_check_for_layer_name_clash()
2163     (VirtualDC.make_id): Use a dash between baseit and id, satisfies
2164     test_make_in().
2165     * Extensions/svexport/svgsaver.py: Import SVGMapWriterError, wxOK
2166     and wxICON_HAND.
2167     (write_to_svg): Put dc and rendering in a try statement and on
2168     catching SVGmapWriterError notify the user and delete the target file.
2169    
2170 bernhard 2343 2004-09-20 Bernhard Reiter <[email protected]>
2171    
2172     * Model/base.by, Model/layer.py: Fixed typos in docstrings.
2173    
2174 jschuengel 2342 2004-09-03 Jan Schüngel <[email protected]>
2175    
2176     * Extensions/umn_mapserver/mapfile(MF_Class.add_thubanstyle): Fix a
2177     small bug with the line color. Now the line color will now only set
2178     if it is set in Thuban an not Transparent.
2179    
2180     * Extensions/umn_mapserver/mf_export(tblayer_to_map): Fixed a bug with
2181     deleting the layers from mapfile. Now all layers will delete backwards
2182     from the last.
2183    
2184 silke 2339 2004-08-20 Silke Reimer <[email protected]>
2185 silke 2338
2186 silke 2339 * Thuban/Model/layer.py:
2187     Fixes bug in projection handling: Otherwise very large region might not
2188     have valid values in the layer's projection.
2189    
2190     2004-08-20 Silke Reimer <[email protected]>
2191    
2192 silke 2338 * Thuban/UI/about.py:
2193     small changes to be consistent with coding style.
2194    
2195 joey 2337 2004-08-13 Martin Schulze <[email protected]>
2196    
2197     * Extensions/wms/test/test_ogclib.py (TestOGCLib.compare_URLs):
2198     Adjusted a comment
2199    
2200 silke 2335 2004-08-11 Silke Reimer <[email protected]>
2201 silke 2334
2202 silke 2335 * Thuban/UI/about.py: Small changes to encoding related stuff to avoid
2203     too many and too enhanced imports of locale
2204    
2205 silke 2334 2004-08-10 Silke Reimer <[email protected]>
2206    
2207     * Thuban/UI/about.py: Fixed encoding problem of about dialog: Added
2208 silke 2339 function unicodeToLocale() to convert special characters to users
2209     locale encoding
2210 silke 2334
2211 jan 2333 2004-08-10 Jan-Oliver Wagner <[email protected]>
2212    
2213     * Doc/technotes/coding_guidelines.txt: Added rule 'Method names start with
2214     lower case letter'
2215    
2216 jschuengel 2331 2004-08-09 Jan Schüngel <[email protected]>
2217    
2218     * ChangeLog: Rewrite the last ChangeLog entry to follow
2219     the standard way.
2220    
2221     * Extensions/umn_mapserver/mapfile: Moved the import AnnotationLayer to
2222     the function where it is needed, because it don't works if it stands
2223     at the beginning.
2224     (MF_Layer.__init__): Removed the extra numclassed variable. Now
2225     numclasses from the mapscript will be used.
2226     (MF_Layer.get_index): New. Return the index of the layer in mapfile.
2227     (MF_Layer.set_classes): New. A Classlist will be set to the layer.
2228     (MF_Layer.set_metadata): New. A Metadata mapscript object will set.
2229     (MF_Layer.remove_allclasses): New. All class of the layer will remove.
2230     (MF_Map.create_new_layer): New. A new Layer is created and associated
2231     with the mapscript object.
2232     (MF_Map.set_layerorder): New. The Layer order like in thuban is set in
2233     the mapscript.
2234     (MF_Map.add_thubanlayer): Now a new layerobj is created if no one is
2235     linked to the layer in thuban, else the layerobject linked to the
2236     thubanlayer will be used.
2237     AnnotationLayer will now store the filename of the shapefile.
2238     (MF_Map.remove_layer): If a layer is removed the associated object
2239     must be set new.
2240    
2241     * Extensions/umn_mapserver/mf_export.py(tb_layer_to_map): Add all
2242     layers which are exists in thuban to the mapobj. All removed Layers
2243     will be removed from the mapobj.
2244     Added comments to all functions.
2245     (thuban_to_map): No layer will be removed here.
2246    
2247     * Extensions/umn_mapserver/mf_handle.py
2248     (_has_umn_mapobj_and_selectedlayer): Activating the layer menu. Now
2249     Layersettings for the mapserver kann be edited.
2250    
2251     * Extensions/umn_mapserver/mf_import.py: Now all layers which are
2252     imported, will be linked with the associated MF_Layer.
2253     (import_mapfile): All layers, which are not selected, will be removed.
2254     Disable the "import layer from mapfile" menu option.
2255    
2256     * Extensions/umn_mapserver/sample/iceland.map: Set the status of the
2257     Annotation Layer from DEFAULT to OFF. The DEFAULT setting turns the
2258     layer on permanently.
2259    
2260 jschuengel 2323 2004-08-03 Jan Schüngel <[email protected]>
2261    
2262 jschuengel 2331 * Extensions/umn_mapserver/mapfile.py(MF_Metadata.remove_allmetadata):
2263     New. This function removes all metadata
2264     (MF_Layer.set_group): New. Set the group setting.
2265     (MF_Layer.get_group): New. Get the group setting.
2266     (MF_Map): Removed the extra numlayers variable, used the mapscript
2267     parameter instead.
2268     (MF_Map.get_numlayers): New. This get numlayers.
2269     (MF_Map.remove_all_layers): New. Removes all layers from the mapobj.
2270 jschuengel 2323 (MF_Map.add_thubanlayer): Replaced the exception handling by a check
2271     if the object is an instance. Also added the annotation layer here to
2272     export, but only the layer is created in the mapfile.
2273    
2274 jschuengel 2331 * Extensions/umn_mapserver/mf_export.py(export_mapfile): Removed
2275     the check if a mapobj exist, because its not needed anymore. The
2276     export function is only available if a mapobj exist.
2277     Use the new function to remove all layers.
2278 jschuengel 2323
2279 jschuengel 2331 * Extensions/umn_mapserver/mf_handle.py(Layer_Dialog): Added a group
2280     option and the metadata button. The layer dialog is temporary disabled.
2281     (Metadata_CustomDataTable): Added some functions to show the grid
2282 jschuengel 2323 correct.
2283    
2284 jschuengel 2331 * Extensions/umn_mapserver/mf_import.py: Moved the code for showing
2285     the number of layer from import_mapfile to this function.
2286     (AnnotationLayer): New. This Class shows the Annotation layer in
2287     thuban. The layer don't do anything. It's only to show the layer
2288     and to save the layer order.
2289     (add_annotationlayer): New. Import an annotation layer to thuban.
2290     (select_layer2import): New. Import only layers to thuban and not
2291     the other settings like projection or scalebar.
2292     (create_new_mapfile): Moved the _has_umn_mapobj function and the
2293     create_new_mapfile functions from mf_handle.py to mf_import.py.
2294 jschuengel 2323
2295     * Extensions/umn_mapserver/sample/iceland.map: Added the group
2296     parameter to the roads and cultural layers. Also added a new
2297     Annotation Layer for the cultural points.
2298    
2299     * Extensions/umn_mapserver/sample/iceland.html: Added the select
2300     option for the annotation layer.
2301    
2302     * Extensions/umn_mapserver/sample/index.html: Added the start
2303     parameter for the annotation layer.
2304    
2305 jan 2315 2004-08-01 Jan-Oliver Wagner <[email protected]>
2306    
2307     * Doc/manual/thuban-manual-de.xml (Chapter Session Management):
2308     translation completed.
2309    
2310     * Doc/manual/thuban-manual.xml (Chapter Session Management):
2311     Fixed unprecise description for Save Session.
2312    
2313 jan 2312 2004-07-31 Jan-Oliver Wagner <[email protected]>
2314    
2315     Started translation of Users Manual into german.
2316    
2317     * Doc/manual/thuban-manual-de.xml: New. German Users Manual.
2318    
2319     * Doc/manual/Makefile: Added build instructions for german
2320     users manual.
2321    
2322     * Doc/manual/thuban-manual.xml: Minor corrections in Introduction.
2323    
2324 jschuengel 2308 2004-07-28 Jan Schüngel <[email protected]>
2325    
2326     * Extensions/umn_mapserver/mapfile.py(MF_Metadata): Changed all class
2327     functions. Now all metadata will handle by the function and its not
2328     needed to initialize it from outside. Therefor the associated mapobj
2329     will be stored in the Metadata Object. So we can use the special
2330     functions from the associated mapobj to get the Metadata.
2331     Therefor all initialization code for the metadata is removed from the
2332     other classes.
2333     (MF_Layer): Added a function to get the metadata object.
2334     (MF_Map): Added a function to set the mappath, the path where
2335     the mapfile ist stored.
2336    
2337     * Extensions/umn_mapserver/mf_export.py(thuban_to_map): Changed the code
2338     to set the extent in the mapfile. Now the code is set by the displayed
2339     data in the Thuban-view.
2340     (export_mapfile): The shapepath is now set empty, until relative
2341     pathnames are supported.
2342    
2343     * Extension/umn_mapserver/mf_handle.py: Added a dialog to handle
2344     metadata. Yet only mapfile metadata are supported. Layer and class
2345     supported are not implemented.
2346     Added a dialog to handle layer informations. The dialog only shows the
2347     selected layer at the moment.
2348    
2349     * Extensions/umn_mapserver/mf_import.py(import_mapfile): Changed the
2350     code for setting the extent in thuban. Now the extent is set to the
2351     given extent from the mapfile.
2352     Fixed a logical mistake. Now the extent is set when realy a layer is
2353     loaded, and not if one is selected to load.
2354    
2355     * Extensions/umn_mapserver/sample/iceland.html: Added code to zoom and
2356     move the shown map in the browser.
2357    
2358     * Extensions/umn_mapserver/sample/iceland.map: Added a new metadata
2359     line to the mapobj and added metadata to the political layer.
2360    
2361     * Extensions/umn_mapserver/test/test_mapserver.py: Changed the test
2362     for Metadata.
2363    
2364 joey 2300 2004-07-26 Martin Schulze <[email protected]>
2365    
2366     * Thuban/Lib/classmapper.py (ClassMapper.has): Added the new
2367     ClassMapper
2368    
2369     * test/test_classmapper.py (TestMapping.test_mapper): Added a Test
2370     case for the new ClassMapper
2371    
2372    
2373 bh 2296 2004-07-22 Bernhard Herzog <[email protected]>
2374    
2375 bh 2297 * Thuban/UI/viewport.py (ViewPort.VisibleExtent): New. Return the
2376     visible extent of the map in projected coordinates
2377    
2378     * test/test_viewport.py (SimpleViewPortTest.test_default_size)
2379     (SimpleViewPortTest.test_init_with_size): Add some VisibleExtent()
2380     tests.
2381     (SimpleViewPortTest.test_visible_extent): New. The real test for
2382     VisibleExtent()
2383    
2384     2004-07-22 Bernhard Herzog <[email protected]>
2385    
2386 bh 2296 * test/test_viewport.py: Use support.run_tests as the main
2387     function when running asa script.
2388    
2389 jschuengel 2295 2004-07-22 Jan Schüngel <[email protected]>
2390    
2391     * Extensions/umn_mapserver/mf_export.py: Added "import os"
2392     Removed the old "import Thuban.UI.mainwindow" code.
2393     (tbextent_to_map): Removed the extra function and at the code direct
2394     to "thuban_to_map" function.
2395     (write_creatorcomment): Added. Now a short comment is added to the
2396     beginning of an generated mapfile.
2397     (export_mapfile): Now the Path and filename are saved in to variables,
2398     and not together in one variable. This is needed for the new
2399     write_creatorcomment function.
2400    
2401     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Added the
2402     import module "re". Also added Range and the ClassGroupRange import
2403     from Thuban. Both are needed for the new range expression import.
2404     (create_rangeexpression): Added. Creates a Range Expression in Thuban
2405     style from a given mapfile expression.
2406     (added_rasterlayer): Make some small code changes. The shapepath is
2407     now stored in an extra variable and the clazz_name is set empty if no
2408     class name set in the mapfile.
2409     Changed the Error message for Range Expressions, becaus the new
2410     function create a error string which will be shown in the dialog.
2411    
2412     * Extensions/umn_mapserver/test/test_mapserver.py: Added a test for the
2413     range expression import.
2414 jan 2312
2415 jan 2291 2004-07-21 Jan-Oliver Wagner <[email protected]>
2416    
2417     * Extensions/umn_mapserver/README: Added hint that
2418     installation as root can be avoided. Removed all tabs.
2419    
2420 bh 2289 2004-07-16 Bernhard Herzog <[email protected]>
2421    
2422     * test/test_viewport.py
2423     (ViewPortTest.test_changing_map_projection): Check that changing
2424     the projection of an empty map shown in a viewport doesn't lead to
2425     exceptions in the viewport's handler for the
2426     MAP_PROJECTION_CHANGED messages
2427    
2428     * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
2429     try to keep the same region visible when the map actually contains
2430     something
2431    
2432 jschuengel 2288 2004-07-15 Jan Schüngel <[email protected]>
2433    
2434     * Extensions/umn_mapserver/mapfile.py: Added a function to get the
2435     mappath directly from the mapobj. Is needed because of the changes
2436     in mf_import.py.
2437     (MF_Layer.add_thubanclass): Added a new comment.
2438     (MF_Map.set_extent): Fixed a bug with exporting empty mapobj. If the
2439     mapobj is empty there is no extent get from thuban an so no one can
2440     set to th mapobj.
2441    
2442     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Updated
2443     the discription.
2444     Split the funktion in to three smaller ones. The new functions are
2445     add_rasterlayer, add_polygonlayer and select_layer2import.
2446     Removed the mapfilepath and filepath initialisation, because its know
2447     include in the new functions.
2448     Now nothing will be imported if cancel is pressed in the
2449     layer choice dialog.
2450    
2451 jschuengel 2285 2004-07-14 Jan Schüngel <[email protected]>
2452    
2453     * Extensions/umn_mapserver/mapfile.py: Added ClassGroupDefault to
2454     import.
2455     (MF_Symbolset): Removed the extra variable for numsymbols.
2456     (MF_Class.__init__): Added a comment to the exception clause.
2457     Removed the extent init, because it was not needed anymore.
2458     (MF_Layer.add_thubanclass): Added the code to set the class name to
2459     the expression value from thuban if no label is defined.
2460     Added the code to export Range expressions from thuban to the mapfile.
2461     (MF_Map.set_extent): Removed the exception and replace it by some if
2462     code. If the size of a map is not defined the size will be set to 1,1.
2463     This is necessary because if the extent is set, mapscript checks if
2464     the size is greater than zero.
2465     (MF_Web): Added the get and set function for the template.
2466    
2467     * Extensions/umn_mapserver/mf_export.py: Added the function to check
2468     if a mapobject exists and used it to set the status of the menu items.
2469     If no mapfile exists the settings could not be edditied.
2470     Define after which menuitem the exportitem will include.
2471    
2472     * Extensions/umn_mapserver/mf_handle.py: Removed the import
2473     Thuban.UI.mainwindow clause, because it is not needed.
2474     Added the command Refresh() to all "OnChangeColor()" functions,
2475     because the color preview window was not updated on a color change.
2476     Added the function to check if a mapobject exists and used it to set the
2477     status of the menu items. If no mapobject exists the settings could not
2478     be edditied.
2479     (Map_Dialog): Moved the imagetype selector from the
2480     Outputformat_Dialog to Map_Dialog and removed Outputformat_Dialog.
2481     (Web_Dialog): Removed the name label and added the template textbox.
2482    
2483     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Replace
2484     the exception handling on loading the layers by an if statement. It
2485     is not necessary to us the exception there.
2486     The Filepath creation now use os.path.join to build the path.
2487    
2488     * Extensions/umn_mapserver/test/test_mapserver.py: Moved the testMap
2489     definition from global to the setUp function. Now the testMap will
2490     initialize new on each test.
2491    
2492     * Extensions/umn_mapserver/sample/iceland.map: Include three new
2493     classes in the Line Layer, to test logical Expressions.
2494     Set the status of the class "Point9" in the Point Layer to off
2495    
2496 bh 2278 2004-07-13 Bernhard Herzog <[email protected]>
2497    
2498     * Thuban/UI/baserenderer.py
2499     (BaseRenderer.render_map_incrementally): Fix a logic bug in the
2500     optimization that tries not to draw layers under a raster layer.
2501     The bug was harmless. All it effectively did was to produce The a
2502     strange messages about not being able to draw Layer instances for
2503     all vector layers below a raster layer which would be invisible
2504     anyway because the raster layer currently always covers the entire
2505     window
2506    
2507 jschuengel 2277 2004-07-08 Jan Schüngel <[email protected]>
2508    
2509     * Extensions/umn_mapserver/mapfile.py: Added code to generade and get
2510     a list of supported outputformats. This formats are not alle supported
2511     because there is no possibility to get the outputformat without the
2512     name known. Make some formal changes to the code.
2513     (MF_Map.set_name()): Fixed a bug if the name is None.
2514    
2515     * Extensions/umn_mapserver/mf_handle.py: Removed the image_type import
2516     statement, because its not needed anymore. The Outputformat is now
2517     given as string from the object. Make some formal changes to the code.
2518    
2519     * Extensions/umn_mapserver/test/test_mapserver.py: Added new test for
2520     most of the new setting which were added during the last changes.
2521     Removed the MF_Size Test.
2522    
2523     * Extensions/umn_mapserver/test/test.map: Added a new class to the
2524     cultural Layer to test expressions and the the status of that layer
2525     from on to default.
2526     Changed the data path the the correct Thuban Data
2527     Added the Outputformat Object and Symbol Object
2528    
2529 jschuengel 2272 2004-07-07 Jan Schüngel <[email protected]>
2530    
2531     * Extensions/umn_mapserver/mapfile.py: Added some new
2532     settings to edit (outputformat, label, imagetype)
2533    
2534     * Extensions/umn_mapserver/mf_handle.py: Added some setting to
2535     the Label Dialog and add the OutputDialog.
2536     Make some changes to the code order.
2537    
2538 jschuengel 2269 2004-07-06 Jan Schüngel <[email protected]>
2539    
2540     * Extensions/umn_mapserver/mapfile.py: Added the symbolObj, pointObj
2541     and line Obj and add the scalebar_status_type, scalebar_style_type and
2542     scalebar_position_type.
2543     Added the symbol- and symbolsetObject (MF_Symbol,MF_Symbolset). The
2544     are only used to create a Symbol like the circle in Thuban.
2545     Added the scalebarObject (MF_Scalebar)
2546     (MF_Class): Added set_status and get_status.
2547     (MF_Layer.add_thubanclass): Added code to set the class status
2548     (MF_Map): Added code to handle the symbols and scalebar
2549     (MF_Label): Added the set_partials and get_partials functions
2550    
2551     * Extensions/umn_mapserver/mf_export.py: Added MF_Symbol to import
2552     from mapfile. Added a function to create a circle object like the one
2553     from thuban if no one exists.
2554    
2555     * Extensions/umn_mapserver/mf_handle.py: All colors are now set when
2556     press ok in the assosiated dialog and not at the end of the
2557     colordialog.
2558     Added the Dialog for the Scalebar.
2559     (Label_Dialog): Added the offset option
2560    
2561     * Extensions/umn_mapserver/mf_import.py: Added code to import the
2562     status of the Classes.
2563     Fixed a bug with the projection. Now the to_meter parameter will be
2564     added to the Projection only if it doesn't exists.
2565    
2566 jschuengel 2264 2004-07-01 Jan Schüngel <[email protected]>
2567    
2568     Added the functionality to handle the content thuban is not
2569     able to handle directly.
2570    
2571     * Extensions/umn_mapserver/mf_handle.py: New. This module extents
2572     Thuban with the possibility to edit the mapfile content.
2573    
2574     * Extensions/umn_mapserver/mf_import.py: Added the possibility
2575     to import mapfiles without any layer selected. So it is possible
2576     to edit the other settings in a mapfile.
2577     (import_mapfile): Added code to use the editing functions.
2578     Added the possibility to import the projection to a layer if one
2579     is defined.
2580     Status settings (On,Off) will now set in thuban (visible, invisible).
2581     fixed a bug with with classnames. If no classname is set in mapfile
2582     the value in Thuban will set to the expression.
2583    
2584     * Extensions/umn_mapserver/mf_export.py(export_mapfile): Added the
2585     possibility to save a new mapfile or use the old one which is
2586     imported or new created.
2587     Added code to use the editing functions.
2588     Remove some not needed import statements
2589    
2590     * Extensions/umn_mapserver/mapfile.py: Added new types which are
2591     need for the editing functions.
2592     Added needed set-functions for the editing functions.
2593     Added the possibility to export rasterimages.
2594     Added new classes (MF_Web, MF_Label, MF_Legend, MF_Symbol,
2595     MF_SymbolSet). MF_Symbol and MF_SymbolSet are not needed at the
2596     moment.
2597     (MF_Class.set_thubanstyle): Now point layers will set to a default
2598     symbol to show a circle in mapserver and not only a 1px dot.
2599     (MF_Style.__init__): Fixed a bug with the color. Color was not set
2600     correct before.
2601     (MF_Size): Removed, because it is not needed.
2602    
2603     * Extensions/umn_mapserver/README: Added the hints to use the
2604     export and editing functions, too.
2605    
2606     * Extensions/umn_mapserver/sample/iceland.map: Added the
2607     new parameter "UNITS METERS".
2608     Change the political layer to status OFF.
2609    
2610     * Extensions/umn_mapserver/sample/README: Added some
2611     more details to setup the sample in the MapServer.
2612    
2613 bernhard 2256 2004-06-26 Bernhard Reiter <[email protected]>
2614    
2615     * Extensions/svgexport/test/test_svgmapwriter.py:
2616     Removed class VFile and used standard StringIO instead.
2617    
2618 jschuengel 2255 2004-06-23 Jan Schüngel <[email protected]>
2619    
2620     Add the export function to the umn_mapserver extension.
2621    
2622     * Extension/umn_mapserver/mf_export.py: New. This module extents
2623     Thuban with the possibility to export the Thuban content.
2624    
2625     * Extensions/umn_mapserver/mapfile.py: Expand the classes to use
2626     with the export module. Especially added the possibility to
2627     add thuban objects directly to the map objects.
2628    
2629     * Extensions/umn_mapserver/mf_import.py: Removed the wxCHANGE_DIR,
2630     because of the hint from Bernhard Herzog.
2631     Corrected the handling of absolute pathnames.
2632     Changed the Text of the Menu-Item, now the beginning is upper case.
2633    
2634     * Extensions/umn_mapserver/README: Added the --with-tiff statement.
2635    
2636 jschuengel 2250 2004-06-16 Jan Schüngel <[email protected]>
2637 jschuengel 2242
2638 jschuengel 2250 Add a sample and make some changes.
2639    
2640     * Extension/umn_mapserver/mf_import.py: Changed the wxPython.wx
2641     import from * to explicit used statements. Changed the
2642     Thuban.UI.mainwindow import phrase, too.
2643     (import_mapfile):Corrected a clerical mistake.
2644     Added wxCHANGE_DIR in OpenFile Dialog.
2645     Added a MultipleChoiceDialog, to select the layers to load from
2646     mapfile into thuban. Thereby the projection is only set if one layer
2647     is selected.
2648     Added the possibility to handle relative pathnames which uses
2649     up-level references.
2650     Removed some doubled code.
2651     Corrected an error with integer values used as label in thuban
2652     ClassGroup.
2653    
2654     * Extensions/umn_mapserver/sample: New.
2655    
2656     * Extensions/umn_mapserver/sample/README: New. Describes the
2657     usage of the sample files.
2658    
2659     * Extensions/umn_mapserver/sample/iceland.map: New. This is
2660     a suitable .map-file for the iceland data.
2661    
2662     * Extensions/umn_mapserver/sample/index.html: New. The template
2663     for the mapfile.
2664    
2665     * Extensions/umn_mapserver/sample/iceland.html: New. Initialisation
2666     file for the Iceland Application on web.
2667    
2668     * Extensions/umn_mapserver/README: Corrected a inaccuracy and added
2669     some details.
2670    
2671     * Extensions/umn_mapserver/test/test_mapserver
2672     (mapserver_import_Test_generalClasses.test_MF_Color):
2673     Corrected the thubancolor test.
2674    
2675     2004-06-15 Jan Schüngel <[email protected]>
2676    
2677 jschuengel 2242 * Extensions/umn_mapserver/README: New. Install instruction.
2678    
2679 bernhard 2240 2004-06-14 Bernhard Reiter <[email protected]>
2680    
2681     * libraries/thuban/cpl_mfile.h: Added copyright header.
2682    
2683     * libraries/thuban/ cpl_mfile.cpp, cpl_mfile.h: Added non-protecting
2684     Free Software License so that it is most useful with gdalwarp
2685     and bmpdataset.
2686    
2687 bh 2239 2004-06-14 Bernhard Herzog <[email protected]>
2688    
2689     * Thuban/UI/multiplechoicedialog.py (__version__): Add missing
2690     import of wxPython.wx itself (as opposed to the contents of
2691     wxPython.wx). For some reason wxPython.wx is available as
2692     wxPython.wx.wx in at least some 2.4 releases. Fixes RT#2482
2693     wrt. wxPython 2.4.
2694    
2695 jschuengel 2238 2004-06-10 Jan Schüngel <[email protected]>
2696    
2697     Initial version of new extension "umn_mapserver". This extension aims
2698     to manage configuration for the UMN MapServer application. This
2699     inital version just imports the .map-files and displays all, Thuban is
2700     capable of.
2701    
2702     * Extensions/umn_mapserver, Extensions/umn_mapserver/test: New.
2703    
2704     * Extensions/umn_mapserver/test/README: New. Describes how to run the
2705     tests.
2706    
2707     * Extensions/umn_mapserver/test/test.map: New. This is a test
2708     .map-file for automated tests of the umn_mapserver extension of
2709     Thuban.
2710    
2711     * Extensions/umn_mapserver/test/test_mapserver.py: New. Tests for
2712     UMN Mapserver classes.
2713    
2714     * Extensions/umn_mapserver/__init__.py: New. Init to make this
2715     directory a package.
2716    
2717     * Extensions/umn_mapserver/mapfile.py: New. Classes to represent
2718     '.map'-file objects.
2719    
2720     * Extensions/umn_mapserver/mf_import.py: New. This module extends
2721     Thuban with the possibility to handle UMN MapServer mapfiles.
2722    
2723 bh 2230 2004-06-03 Bernhard Herzog <[email protected]>
2724    
2725     * Thuban/Model/layer.py (Layer.TreeInfo): Convert the bounding box
2726     to a tuple before using it as arguments to the % operator. This
2727     fixes the formatting issue filed in RT#2239 on 2004-01-13 and
2728     reported today on thuban-list by Jan Schüngel
2729    
2730     * test/test_layer.py (TestLayerModification.setUp): Save the
2731     filename as an instance variable so we can refer to it in tests
2732     (TestLayerModification.test_tree_info): Uncomment this method
2733     again and make it work. This tests for the formatting issue
2734     filed in RT#2239 on 2004-01-13
2735    
2736 bh 2224 2004-05-28 Bernhard Herzog <[email protected]>
2737    
2738     * Thuban/UI/baserenderer.py: Fix some typos.
2739    
2740 jan 2217 2004-05-18 Jan-Oliver Wagner <[email protected]>
2741    
2742     * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed a bug
2743     by increasing a field size.
2744    
2745 bh 2213 2004-05-17 Bernhard Herzog <[email protected]>
2746    
2747     Update to newest shapelib and get rid of Thuban specific
2748     extensions, i.e. use the new DBFUpdateHeader instead of our
2749     DBFCommit kludge
2750    
2751     * libraries/shapelib/shpopen.c: Update to version from current
2752     shapelib CVS.
2753    
2754     * libraries/shapelib/shapefil.h: Update to version from current
2755     shapelib CVS.
2756    
2757     * libraries/shapelib/dbfopen.c: Update to version from current
2758     shapelib CVS.
2759     (DBFCommit): Effectively removed since shapelib itself has
2760     DBFUpdateHeader now which is better for what DBFCommit wanted to
2761     achieve.
2762     We're now using an unmodified version of dbfopen.
2763    
2764     * setup.py (extensions): Add the HAVE_UPDATE_HEADER macro with
2765     value '1' to the Lib.dbflibc extension. This simply reflects the
2766     shapelib and pyshapelib updates
2767    
2768 jan 2211 2004-05-16 Jan-Oliver Wagner <[email protected]>
2769    
2770     Finished introduction of Menu.FindOrInsertMenu.
2771    
2772     * Extensions/drawshape/drawshape.py: Add the command
2773     to the experimental menu additionally to the toolbar.
2774    
2775     * Extensions/svgexport/svgsaver.py: Use FindOrInsertMenu() instead of
2776     finding menu on its own.
2777    
2778     * Doc/manual/thuban-manual.xml: updated sample file
2779     to use FindOrInsertMenu().
2780    
2781     * Examples/simple_extensions/hello_world.py: Use FindOrInsertMenu()
2782     instead of finding menu on its own.
2783    
2784 jan 2206 2004-05-11 Jan-Oliver Wagner <[email protected]>
2785    
2786     * test/test_menu.py (MenuTest.test): Added testing
2787     of method Menu.FindOrInsertMenu.
2788    
2789 jan 2204 2004-05-10 Jan-Oliver Wagner <[email protected]>
2790    
2791     Introduce and use Menu.FindOrInsertMenu.
2792    
2793     * Thuban/UI/menu.py (Menu.FindOrInsertMenu): New. Find a
2794     given menu or, if not found, insert it.
2795    
2796     * Extensions/bboxdump/bboxdump.py, /Extensions/gns2shp/gns2shp.py,
2797     /Extensions/importAPR/importAPR.py, Extensions/profiling/profiling.py,
2798     /Extensions/wms/wms.py: Use FindOrInsertMenu() instead of finding
2799     menu on its own.
2800    
2801 jan 2201 2004-05-06 Jan-Oliver Wagner <[email protected]>
2802    
2803     Introduce a abstract ColorDialog class and remove
2804     and outdated file.
2805    
2806     * Thuban/UI/proj4dialog.py: Removed. It is has been
2807     replaced by projdialog for quite a while and is not used
2808     anymore.
2809    
2810     * Thuban/UI/colordialog.py: New. Abstraction for color selection
2811     dialog(s).
2812    
2813     * Thuban/UI/classifier.py (SelectPropertiesDialog.__GetColor):
2814     Now calls the abstract ColorDialog instead of wxColourDialog.
2815     This also removed the dependency to Color class conversion
2816     from this function.
2817    
2818 frank 2197 2004-05-04 Frank Koormann <[email protected]>
2819    
2820     * Extensions/bboxdump/__init__.py: Fixed string left over from
2821     copying.
2822    
2823     * Extensions/bboxdump/bboxdump.py (bboxdump):
2824     Use layer.ShapeStore().AllShapes() to loop over shapes instead of
2825     xrange(layer.NumShapes()). Compile the bboxmessage from a list
2826     of formatted outputs (string.join) instead of appending to the
2827     message. Two progress bar dialogs to report progress on the sometimes
2828     lenghty processing.
2829    
2830 frank 2196 2004-04-22 Frank Koormann <[email protected]>
2831    
2832     New Extension to dump bounding boxes of all shapes of the selected
2833     layer. An optional column can be specified to group the objects,
2834     in this case the bounding box is a union of the separate boxes.
2835     Dump can be displayed in a ScrolledMessageDialog or written to file.
2836     The Extension is simply a combination of available and well tested
2837     Thuban functionality.
2838    
2839     * Extensions/bboxdump/__init__.py: New: Init to make this
2840     directory a package.
2841    
2842     * Extensions/bboxdump/bboxdump.py: New: Dump bounding boxes of
2843     all shapes of the selected layer.
2844    
2845 jan 2192 2004-04-22 Jan-Oliver Wagner <[email protected]>
2846    
2847     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Fixed two
2848     strings to be i18n now.
2849    
2850 jan 2188 2004-04-18 Jan-Oliver Wagner <[email protected]>
2851    
2852     Changing popup menu of legend from direct building
2853     to using the Menu construction as used for the mainwindow.
2854    
2855     * Thuban/UI/mainwindow.py: New method commands: layer_to_top,
2856     layer_to_bottom, layer_visibility
2857     (MainWindow.LayerToTop): New. Put current layer to the top.
2858     (MainWindow.LayerToBottom): New. Put current layer to bottom.
2859     (MainWindow.HideLayer, MainWindow.ShowLayer, _has_visible_map):
2860     Replace 1,0 by True, False.
2861     (MainWindow.ToggleLayerVisibility): New. Toggle visibility of
2862     current layer.
2863     (MainWindow.LayerShowTable): Removed raising of dialog.
2864     (_has_selected_layer_visible): New. Support function.
2865    
2866     * Thuban/UI/legend.py: ID_POP_xxx: removed.
2867     (LegendPanel.__init__): Removed EVT_MENU bindings.
2868     (LegendTree._OnRightClick): Replace direct creation of
2869     menu via wx Classes by applying the menu definition
2870     as of Menu class of menu.py.
2871    
2872 jan 2185 2004-04-16 Jan-Oliver Wagner <[email protected]>
2873    
2874     * Thuban/UI/exceptiondialog.py (ExceptionDialog.dialog_layout): Improved
2875     button string to stronger clearify that Thuban will be closed when hitting
2876     the button.
2877    
2878     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Added docstring.
2879     Now for layers without a ShapeStore a corresponding message is given
2880     to the user, that this layer has no table to show.
2881    
2882 joey 2182 2004-04-15 Martin Schulze <[email protected]>
2883    
2884     * Extensions/wms/layer.py (WMSLayer.setWMSFormat): Need to
2885     recalculate the format for the internal render engine as well.
2886    
2887     * Extensions/wms/properties.py (wmsProperties): First start for a
2888     properties dialog. It's functional for a first selection of
2889     layers, but still has some weired wxWidgets/GTK problems but
2890     beautification can be done later.
2891    
2892     * Extensions/wms/layer.py: Added more documentation
2893     (WMSLayer.getFormats): New: Return list of supported image formats
2894     by the WMS server
2895     (WMSLayer.getLayers): New: Return the list of layer names
2896     supported by the WMS server
2897     (WMSLayer.getLayerTitle): New: Return the title of the named layer
2898     (WMSLayer.getWMSFormat): New: Return the image format that is used
2899     for WMS GetMap requests
2900     (WMSLayer.setWMSFormat): New: Set the image format that is used
2901     for WMS GetMap requests
2902     (WMSLayer.__init__): Move away from using only one layer to using
2903     a list of layers (unsorted at the moment, though).
2904     (WMSLayer.getVisibleLayers): New: Return the list of names for all
2905     visible layers
2906     (WMSLayer.setVisibleLayers): New: Set the list of names for all
2907     visible layers
2908    
2909     * Extensions/wms/wms.py: Moved the WMS layer into layer.py in
2910     order to establish a clean structure.
2911    
2912     * Extensions/wms/layer.py: Moved the WMS layer into a file on its
2913     own in order to establish a clean structure.
2914    
2915 joey 2174 2004-04-13 Martin Schulze <[email protected]>
2916    
2917     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Added
2918     support for oldstyle (WMS 1.0 apparently) image format
2919     specification.
2920    
2921     * Extensions/wms/wms.py (WMSLayer.calcFormat): Reduce the list of
2922     supported graphic formats back to JPEG and BMP, PNG and others are
2923     too *cough* experimental... Sorry, I meant to filter this out
2924     before I committed this part. This should make the WMS extension
2925     run from CVS again.
2926     (wms_dialog): Reset an empty URL to None so that the subsequent
2927     program can depend on this, since the dialog will indeed return an
2928     empty URL, causing another declaration of love by Python.
2929    
2930     * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerBBox):
2931     Whenever a native BoundingBox request cannot be fulfilled, check
2932     whether the requested SRS is EPSG:3426, in which case return the
2933     LatLonBoundingBox values.
2934    
2935     * Extensions/wms/test/test_parser.py
2936     (TestWMSCapabilitiesParser.test_LayerSRS): Added a test for
2937     ignoring AUTO:* SRS.
2938     (TestWMSCapabilitiesParser.test_LatLonBoundingBoxes_as_bboxes):
2939     Added another test method to test whether the LatLonBoundingBox
2940     values will be returned if BoundingBox values are requested with
2941     SRS set to EPSG:3426.
2942    
2943     * Extensions/wms/parser.py (WMSCapabilitiesParser.peekLayers):
2944     Added rudimentary support for non-EPSG SRS, i.e. ignore them for
2945     the moment by placing them into a variable which is currently
2946     unused. Also test whether the EPSG SRS is numerical as it should
2947     be and add an error message if it is not.
2948    
2949     * Extensions/wms/test/sample.xml: Added AUTO:* SRS since they
2950     appear in the real world as well. Since we cannot handle them yet
2951     (OGCLib can't either), we will ignore them for the moment.
2952    
2953     * Extensions/wms/parser.py: Use a variable for denoting the sample
2954     filename
2955     (WMSCapabilitiesParser.peekLayers): Added support for error
2956     messages during grok(). They will be aggregated in an array and
2957     may be displayed later. We may have to add a classification
2958     "Warning" and "Error" to this. That requires more experience,
2959     though, since not every error may be lethal.
2960    
2961     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Raise the
2962     ShowTable() dialog/frame when the user attempts to display it
2963     while it has been opened before already and not closed again.
2964    
2965 joey 2161 2004-04-11 Martin Schulze <[email protected]>
2966    
2967     * Extensions/wms/infodialog.py: Adjusted the class documentation
2968    
2969     * Extensions/wms/wms.py (WMSLayer.__init__, WMSLayer.GetMapImg):
2970     Switch to using Thuban{Begin,End}BusyCursor instead of the pure
2971     wxWidgets variants.
2972     (WMSLayer.__init__): The epsg_id variable is named top_srs now.
2973    
2974     * Extensions/wms/infodialog.py: Added an information dialog that
2975     will display various information about the WMS current resource,
2976     so that additional information such as the title, the abstract,
2977     fees and access constraints can be displayed for the user if they
2978     are documented in the WMS XML.
2979    
2980 joey 2156 2004-04-10 Martin Schulze <[email protected]>
2981    
2982     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Adjusted
2983     string handling. It's "foo".lower() and not lower(foo) without
2984     lower imported from strings or something.
2985    
2986     * Extensions/wms/wms.py (WMSLayer): Incorporated WMSCapabilities
2987     from capabilities.py and parser.py. Implement priority list for
2988     supported graphics formats, take care of wbmp != bmp. PNG, TIFF
2989     and GIF are supported here, but not yet by main Thuban. Hence,
2990     support for them may be removed later. Special contribution to
2991     usability: get wxWidgets to change the cursor when we're waiting
2992     for data from the network so the user won't start to worry. This
2993     causes a redrawing error/warning, though.
2994    
2995     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Unlink
2996     the DOM object.
2997    
2998     2004-04-01 Martin Schulze <[email protected]>
2999    
3000     * Extensions/wms/capabilities.py: Adjusted documentation
3001     (WMSCapabilities.__init__): Improved documentation, fixed syntax
3002     (WMSCapabilities.saveCapabilities): Only catch IOError when
3003     handling files
3004     (WMSCapabilities.loadCapabilities): Only catch IOError when
3005     handling files
3006     __main__: corrected variable naming
3007     (WMSCapabilities.fetchCapabilities,loadCapabilities): Make this
3008     class a specialisation of WMSCapabilitiesParser as well. Also
3009     execute grok() after loading or fetching capabilities, if that
3010     went well, so that subsequent calls can already access the data.
3011     (WMSCapabilities.getVersion): Export the used version of the
3012     GetCapabilities request, so we can use it for subsequent calls,
3013     i.e. for GetMap requests.
3014     (WMSCapabilities.fetchCapabilities): Added proper error handling
3015     when the GetCapabilities request failed, so that the surrounding
3016     program can act accordingly.
3017    
3018 joey 2146 2004-03-30 Martin Schulze <[email protected]>
3019    
3020     * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerSRS):
3021     Adjusted the getLayerSRS method to return the list of SRSes
3022     extracted from <SRS> elements instead of <BoundingBox> elements.
3023     Added a bit of documentation as well.
3024     (WMSCapabilitiesParser.checkLayerSRS): Removed integrity test
3025     since it was only implemented due to a misunderstanding.
3026    
3027     * Extensions/wms/test/test_parser.py
3028     (TestWMSCapabilitiesParser.test_LayerSRS): Adjust the tests to
3029     reflect the corrected interpretation of the standard: i.e. a layer
3030     does not have to define a BoundingBox for all SRSes it supports.
3031     Hence the <SRS></SRS> specification is authoritative, not the list
3032     of BoundingBoxes.
3033     (TestWMSCapabilitiesParser.test_BoundingBoxes): Added a new test
3034     to ensure None is returned for a non-existing SRS.
3035     (TestWMSCapabilitiesParser.test_grok): Removed test_grok method
3036     since it is not applicable anymore. Listing more SRSes in <SRS>
3037     elements is valid according to the specs.
3038    
3039 bernhard 2140 2004-03-26 Bernhard Reiter <[email protected]>
3040 joey 2146
3041 bernhard 2140 * README: Nicer formatting of text. Improved descriptions.
3042     Reflected wxWidgets name change.
3043    
3044     * Thuban/UI/about.py: Extended copyright to 2004 and added
3045     information about the thuban-devel mailinglist.
3046    
3047 joey 2138 2004-03-24 Martin Schulze <[email protected]>
3048 joey 2120
3049 joey 2138 * Extensions/wms/capabilities.py: Renamed the class to contain
3050     'WMS', also added a linebreak where required
3051    
3052     * Extensions/wms/parser.py: Finally added the XML parser for the
3053     GetCapabilities response.
3054    
3055     * Extensions/wms/test/sample.xml: Adjusted the sample file so that
3056     <SRS> elements match the <BoundingBox> elements, except for the
3057     layer 'beschriftung'.
3058    
3059     * Extensions/wms/test/test_parser.py: Encode non-ascii strings
3060     since Python uses unicode strings internally, otherwise
3061     comparisons will fail. Removed tests for getLayerBBoxSRS() since
3062     the SRS will be calculated anyway and this method is obsoleted by
3063     getLayerSRS(). Denote SRS as strings and not as cardinal numbers.
3064     Move loading the sample file into the setUp method. Added a test
3065     for finding the integrity problem in the sample response.
3066     Improved formatting.
3067    
3068     * Extensions/wms/domutils.py: Added convenience routines for
3069     handling of Document Object Model (DOM) nodes.
3070    
3071     * Extensions/wms/test/test_domutils.py: Added a test for the
3072     domutils module
3073    
3074     2004-03-19 Martin Schulze <[email protected]>
3075    
3076 joey 2120 * Extensions/wms/test/test_parser.py (TestWMSCapabilitiesParser):
3077     Moved path detection and adding into a module of its own,
3078     adjustpath, which exports thubandir as main Thuban directory.
3079    
3080     * Extensions/wms/test/test_ogclib.py (TestWMSLib): Moved path
3081     detection and adding into a module of its own, adjustpath, which
3082     exports thubandir as main Thuban directory. Reorganised the
3083     module in order to support the SkipTest feature for Thuban test
3084     cases.
3085    
3086     * Extensions/wms/test/adjustpath.py: Moved path detection and
3087     adding into a module of its own.
3088    
3089 joey 2115 2004-03-18 Martin Schulze <[email protected]>
3090    
3091     * Extensions/wms/test/test_parser.py: Added another test for
3092     checking whether the WMS XML parser (to be implemented) returns
3093     the information we expect. This requires a sample WMS WML file
3094     (sample.xml) which has been extracted from the frida server and
3095     "improved" manually.
3096    
3097     * Extensions/wms/test/test_ogclib.py: Added legacy code to add the
3098     main Thuban directory to the path in order to be able to import
3099     random modules. Adjusted the PyOGCLib detection to reuse the
3100     information gathered. Also added a note about the PYTHONPATH
3101     environment variable.
3102    
3103     * Extensions/wms/test/test_ogclib.py: The format specification is
3104     a mime-type, not a graphic format, hence image/jpeg wou ld be the
3105     proper format and not JPEG. We'll also have to take care of the
3106     encoding of / as %2F.
3107    
3108 joey 2111 2004-03-16 Martin Schulze <[email protected]>
3109    
3110     * Extensions/wms/test/test_ogclib.py: Added a (hopefully)
3111     comprehensive test for the getMapURL method, built compare URLs
3112     according to the documentation in OGC 01-068r3
3113    
3114     * Extensions/wms/capabilities.py (WMSCapabilities): Added the
3115     class WMSCapabilities to manage capabilites, will incorporate
3116     parsing the capabilities response and provide details for other
3117     classes.
3118    
3119 bh 2105 2004-03-12 Bernhard Herzog <[email protected]>
3120    
3121 bh 2107 Support views in addition to normal tables in the postgis
3122     shapestore
3123    
3124     * Thuban/Model/postgisdb.py
3125     (PostGISShapeStore._fetch_table_information): Add a fallback for
3126     the case where the table name is not in the geometry_columns
3127     table. This is usually the case for views. Also, set
3128     self.shapestore here.
3129     (PostGISShapeStore.ShapeType): No need to query the database all
3130     the time. The shape type is now determined in
3131     _fetch_table_information
3132    
3133     * test/postgissupport.py (PostgreSQLServer.new_postgis_db)
3134     (PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
3135     New parameter to specify views.
3136     (PostGISDatabase.has_data): Also compare the views. New views
3137     parameter
3138     (PostGISDatabase.initdb): Create the views.
3139     (PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
3140     view
3141    
3142     * test/test_postgis_db.py
3143     (TestPostGISShapestorePointFromViews): New. Test a
3144     PostGISShapeStore with a view
3145     (TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
3146     the geometry_column explicitly to test whether that works
3147    
3148     2004-03-12 Bernhard Herzog <[email protected]>
3149    
3150 bh 2105 Final step for explicit id/geometry columns: Loading and saving
3151    
3152     * Resources/XML/thuban-1.1.dtd: New. Derived from thuban-1.0.dtd
3153     with the following changes:
3154     (dbshapesource): Two new attributes id_column and geometry_column
3155    
3156     * Thuban/Model/save.py (SessionSaver.write): Use the new dtd
3157     (SessionSaver.write_session): Use the new namespace
3158     (SessionSaver.write_data_containers): Write the new dbshapesource
3159     parameters
3160    
3161     * Thuban/Model/load.py (SessionLoader.__init__): New namespace for
3162     the new file format version
3163     (SessionLoader.start_dbshapesource): Handle the new db parameters
3164    
3165     * test/test_save.py: Update to the new dtd and namespace
3166     (SaveSessionTest.test_save_postgis): Update the NonConnectionStore
3167     mock object to provide a working IDColumn method.
3168    
3169     * test/test_load_1_0.py: New. Copy of the test_load.py before
3170     today's changes but with the round-trip tests removed.
3171    
3172     * test/test_load_0_9.py: Update doc-string.
3173    
3174     * test/test_load.py: Update all .thuban files to the new dtd and
3175     namespace.
3176     (TestPostGISLayer.file_contents): Add the new dbshapesource
3177     paramters
3178    
3179 bh 2100 2004-03-11 Bernhard Herzog <[email protected]>
3180    
3181 bh 2103 Next step for explicit id/geometry columns: User interaction
3182    
3183     * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
3184     the dialog is constructed. Add combo boxes to select id and
3185     geometry column. Rename some instance variables.
3186     (ChooseDBTableDialog.GetTable): Return id and geometry column
3187     names
3188     (ChooseDBTableDialog.OnTableSelect): New. Event handler for
3189     selections in the table list
3190    
3191     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
3192     and geometry_column
3193    
3194     * Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
3195     parameters for id_column and geometry column of PostGISShapeStore
3196     here as well.
3197    
3198     * Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
3199     (_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
3200     (PostGISConnection.GeometryTables): Use a better query to
3201     determine which relations in the database might be usable for
3202     shapestores. Now supports views as well but is more PostgreSQL
3203     specific
3204     (PostGISConnection.table_columns): New. Somewhat experimental
3205     method to let the db dialogs provide lists of columns to users so
3206     that they can select id and geometry columns.
3207     (PostGISTable.__init__): The default value of the id_column
3208     parameter is now None it still means "gid" effectively, though.
3209     (PostGISTable.IDColumn): New introspection method to return a
3210     column object for the id column
3211     (PostGISShapeStore.GeometryColumn): New introspection method to
3212     return a column object for the geometry column
3213    
3214     * test/test_postgis_db.py
3215     (TestPostGISConnection.test_gis_tables_non_empty):
3216     Removed. Subsumed by the new:
3217     (TestPostGISConnection.test_gis_tables_with_views_and_tables):
3218     New. Tes the GeometryTables and table_columns methods with actual
3219     tables and views.
3220     (PointTests.test_id_column, PointTests.test_geometry_column):
3221     New. tests for the new methods.
3222     (TestPostGISShapestorePoint.setUp)
3223     (TestPostGISShapestorePointSRID.setUp)
3224     (TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
3225     instance variables needed by the new tests
3226    
3227     2004-03-11 Bernhard Herzog <[email protected]>
3228    
3229 bh 2100 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): The row
3230     numbers given to ReadValue are ordinals.
3231    
3232     2004-03-11 Bernhard Herzog <[email protected]>
3233    
3234     Elimiate the requirement for PostGIS tables to have a column
3235     called "gid".
3236    
3237     * Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
3238     id_column to specify which column to use to identify rows. Also
3239     new instance variables id_column and quoted_id_column
3240     (PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
3241     (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
3242     (PostGISTable.SimpleQuery): Use the id column name provided to the
3243     constructor instead of "gid"
3244     (PostGISShapeStore.__init__): New parameter id_column analogously
3245     to PostGISTable.__init__. This parameter is simply passed through
3246     to the base class constructor
3247     (PostGISShapeStore._create_col_from_description): Fix typo in
3248     doc-string
3249     (PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
3250     (PostGISShapeStore.ShapesInRegion): Use the id column name
3251     provided to the constructor instead of "gid"
3252    
3253     * test/postgissupport.py
3254     (PostgreSQLServer.get_default_static_data_db): New static table
3255     landmarks_point_id with an id column != "gid. Update the comments
3256     a bit.
3257     (skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
3258     doc-
3259     (upload_shapefile): New parameter gid_column to use a name other
3260     than "gid" for the column to store the shape ids
3261    
3262     * test/test_postgis_db.py (TableTests): New. Mixin-class
3263     containing all tests previously in TestPostGISTable. The actual
3264     tests are the same but the code is a bit more configurable to
3265     allow for different id columns etc.
3266     (TestPostGISTable): Derive from TableTests now for the actual
3267     tests.
3268     (TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
3269     except that it the landmarks_point_id table to test the id_column
3270     parameter
3271     (PointTests): Extend the doc-string
3272     (TestPostGISShapestorePointExplicitGIDColumn)
3273     (TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
3274     from PointTests to test the explicit id_column parameter. One
3275     tests with the name of the column holding the shape ids, the other
3276     uses PostgreSQL's OID column. For the latter a number of methods
3277     have to be overwritten to make them independent of the actual id
3278     values.
3279    
3280 silke 2095 2004-03-08 Silke Reimer <[email protected]>
3281    
3282     Update debian directory:
3283    
3284     * debian/changelog: Added new version.
3285     * deiban/rules: Updated management of patches (with cbds)
3286     * debian/control: Added cbds to dependencies
3287     * debian/patches/*: New. Adds better support for patches of thuban in
3288     debian
3289     * debian/menu: Syntax of menu changed slightly
3290     * debian/setup.py.patch: removed because it has been moved to
3291     debian/patechs/setup.py.patch
3292    
3293    
3294 bh 2094 2004-02-26 Bernhard Herzog <[email protected]>
3295    
3296     Create the Doc/technotes directory for text files with information
3297     for developers
3298    
3299     * Doc/technotes/README: New. README for the technotes
3300    
3301     * Doc/technotes/coding_guidelines.txt: New. Coding guidelines for
3302     Thuban
3303    
3304     * Doc/technotes/release_process.txt: New. Used to be
3305     HOWTO-Release. Now slightly adapted to technote formatting style.
3306    
3307     * HOWTO-Release: Removed. It's contents are now in
3308     Doc/technotes/release_process.txt
3309    
3310 bh 2089 2004-02-25 Bernhard Herzog <[email protected]>
3311    
3312     * libraries/thuban/wxproj.cpp (get_wx_version): New. Return the
3313     version of wxWindows the module was compiled with so we can check
3314     that against the wxPython version.
3315    
3316     * Thuban/version.py (thuban_branch, thuban_release): New variables
3317     controlling which and how Thuban versions are shown. See the
3318     comments for details.
3319     (verify_versions): Also check that the wx version that wxproj is
3320     compiled against matches that of the wxPython we use at runtime
3321    
3322 bh 2080 2004-02-20 Bernhard Herzog <[email protected]>
3323    
3324 bh 2087 * Extensions/wms/wms.py (epsg_code_to_projection): Use
3325     get_system_proj_file to read the epsg projections. The old way
3326     depended on the current directory being the top Thuban directory.
3327    
3328     2004-02-20 Bernhard Herzog <[email protected]>
3329    
3330 bh 2085 * Extensions/svgexport/test/test_svgmapwriter.py
3331     (TestVirtualDC.test_clippath): Remove a debug print
3332    
3333     2004-02-20 Bernhard Herzog <[email protected]>
3334    
3335 bh 2083 * Extensions/svgexport/__init__.py: New. Turn
3336     Extensions/svgexport into a package.
3337    
3338     * Extensions/svgexport/svgmapwriter.py: Reorder the imports and
3339     doc-string a bit. The doc-string must come first, otherwise it's
3340     not a doc-string. The __future__ import must be the first thing
3341     after the doc-string. Use only double quotes in doc-strings.
3342     Single quotes trip up emacs syntax highlighting if the text
3343     contains apostrophes.
3344    
3345     2004-02-20 Bernhard Herzog <[email protected]>
3346    
3347 bh 2080 * Extensions/svgexport/test/__init__.py,
3348     Extensions/svgexport/test/test_svgmapwriter.py: New. Initial test
3349     suite for svgexport
3350    
3351     * test/runtests.py (find_test_modules): New. Function with the
3352     module finding code from main.
3353     (main): Use find_test_modules to figure out the default test
3354     modules and take modules from Extensions.svgexport.test too.
3355    
3356 bh 2075 2004-02-19 Bernhard Herzog <[email protected]>
3357    
3358 bh 2077 * Thuban/UI/application.py (ThubanApplication.OnInit): Make sure
3359     the mainwindow has a reference to the map of the initial session.
3360     This fixes a bug introduced with the fix for RT#2245
3361    
3362     2004-02-19 Bernhard Herzog <[email protected]>
3363    
3364 bh 2075 * Extensions/svgexport/svgsaver.py,
3365     Extensions/svgexport/svgmapwriter.py,
3366     Extensions/svgexport/maplegend.py: Added again. This time in the
3367     correct place.
3368    
3369 bh 2070 2004-02-17 Bernhard Herzog <[email protected]>
3370    
3371 bh 2073 Fix for RT#2245
3372    
3373     * Thuban/UI/application.py (ThubanApplication.OnInit): Initialize
3374     instance variables before trying to create any windows. Creating
3375     windows can start an event loop if e.g. message boxes are popped
3376     up for some reason, and event handlers, especially EVT_UPDATE_UI
3377     may want to access things from the application.
3378     (ThubanApplication.maps_changed): The mainwindow may not have been
3379     created yet, so check whether it has been created before calling
3380     its methods
3381    
3382     * Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
3383     have a map
3384    
3385     2004-02-17 Bernhard Herzog <[email protected]>
3386    
3387 bh 2070 * test/test_svgmapwriter.py, Extensions/svgsaver.py,
3388     Extensions/svgmapwriter.py, Extensions/maplegend.py,
3389     extensions/svgexport/svgsaver.py,
3390     extensions/svgexport/svgmapwriter.py,
3391     extensions/svgexport/maplegend.py: Removed. These files were in
3392     the wrong places or didn't work at all.
3393    
3394 bh 2067 2004-02-16 Bernhard Herzog <[email protected]>
3395    
3396 bh 2069 * Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
3397     line
3398    
3399     2004-02-16 Bernhard Herzog <[email protected]>
3400    
3401 bh 2067 * Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.
3402    
3403 mrechtie 2064 2004-02-15 Markus Rechtien <[email protected]>
3404    
3405     * Extensions/svgexport/svgmapwriter.py: New. Adds the capability
3406     to write a session to a file in SVG format.
3407     * Extensions/svgexport/svgsaver.py: New. Uses svgmapwriter.py
3408     to write a SVG map of a session.
3409     * Extensions/svgexport/maplegend: New. Writes a basic maplegend
3410     in SVG format for the current session.
3411    
3412 bh 2062 2004-02-13 Bernhard Herzog <[email protected]>
3413    
3414     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): When the layer
3415     can't be created, return immediately after displaying the error
3416     message.
3417    
3418 bh 2060 2004-02-11 Bernhard Herzog <[email protected]>
3419    
3420     Handle postgis tables with more than one geometry column.
3421    
3422     * Thuban/Model/postgisdb.py
3423     (PostGISTable._fetch_table_information): Delegate the creation of
3424     column objects to a different method so that we can extend that in
3425     derived classes
3426     (PostGISTable._create_col_from_description): New. Column object
3427     creation part of _fetch_table_information
3428     (PostGISShapeStore._create_col_from_description): New. Extend
3429     inherited method to handle geometry columns
3430     (PostGISShapeStore.__init__): New parameter geometry_column to
3431     specify which geometry column to use. Optional but mandatory for
3432     tables with more than one geometry column
3433     (PostGISShapeStore._fetch_table_information): Also use the name of
3434     the geometry column when looking for the srid
3435     (PostGISShapeStore.ShapeType): Also use the name of the geometry
3436     column when looking for the shape type
3437    
3438     * test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
3439     NonConnectionStore to changes in the PostGISShapeStore
3440    
3441     * test/test_postgis_db.py
3442     (TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
3443     PostGISShapeStore with tables having two geometry columns.
3444    
3445 bh 2058 2004-02-10 Bernhard Herzog <[email protected]>
3446    
3447     Fix some postgis problems. What remains to be done is real
3448     handling of SRIDs as they affect how reprojection is done
3449    
3450     * Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
3451     doc-string
3452     (PostGISShapeStore._fetch_table_information): New. Extend
3453     inherited method to retrieve srid
3454     (PostGISShapeStore.BoundingBox): Handle tables without data.
3455     extent yields NULL for those
3456     (PostGISShapeStore.ShapesInRegion): Use the srid of the table.
3457    
3458     * test/test_postgis_db.py
3459     (TestPostGISSpecialCases.test_shapestore_empty_table): New test
3460     for the special case of a table without any data
3461     (TestPostGISShapestorePointSRID): New class with tests for a table
3462     that uses srids
3463     (PolygonTests): Fix a doc-string typo
3464    
3465     * test/postgissupport.py (PostGISDatabase.__init__): New parameter
3466     reference_systems with a specification of spacial reference
3467     systems to create in the new db.
3468     (PostgreSQLServer.new_postgis_db)
3469     (PostgreSQLServer.get_static_data_db): New parameter
3470     reference_systems to be passed through ultimately to
3471     PostGISDatabase. In new_postgis_db also check whether an existing
3472     db already has the right srids
3473     (PostgreSQLServer.get_default_static_data_db): Add srids and a
3474     table that uses srids
3475     (PostGISDatabase.initdb): Create the entries for the reference
3476     systems
3477     (PostGISDatabase.has_data): Add reference_systems parameter to
3478     check for those too
3479     (upload_shapefile): New parameter srid to create tables with a
3480     specific srid
3481    
3482 frank 2055 2004-02-06 Frank Koormann <[email protected]>
3483    
3484     * po/pt_BR.po: Fixed charset
3485    
3486 frank 2054 2004-02-05 Frank Koormann <[email protected]>
3487    
3488     * po/pt_BR.po: Fixed format string for error message, missing %s
3489     added (Thuban/UI/application.py:273)
3490    
3491 frank 2053 2004-02-03 Frank Koormann <[email protected]>
3492    
3493     First version of Portuguese (Brazilian) translation
3494    
3495     * po/pt_BR.po: New, translation of pot (2004-01-15 16:07+0300) for
3496     Brazilian Portuguese by Eduardo Patto Kanegae.
3497    
3498     * Thuban/UI/about.py (About.__init.py__): Added Eduardo to the list of
3499     translators.
3500    
3501    
3502 frank 2052 2004-01-22 Frank Koormann <[email protected]>
3503    
3504     * Doc/manual/thuban-manual.xml: Added section on installation of
3505     Thuban under Win32 systems. Fixed image path references in the postgis
3506     section. Some minor source formattings.
3507    
3508 frank 2051 2004-01-21 Frank Koormann <[email protected]>
3509    
3510     Make Thuban remember path selections (at least for one application run).
3511    
3512     * Thuban/UI/application.py (Application.OnInit): Initialize path as a
3513     attribute of application object. Path is a dictionary of
3514     strings, currently with the items "data" and "projection".
3515     (Application.SetPath): New, stores path for the specified item.
3516     (Application.Path): New, return path for the specified item.
3517    
3518     * Thuban/UI/mainwindow.py
3519     (MainWindow.OpenSession, MainWindow.SaveSessionAs,
3520     MainWindow.AddLayer, MainWindow.AddRasterLayer,
3521     MainWindow.TableOpen): Access "data" path information of the
3522     application.
3523    
3524     * Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport):
3525     Access "projection" path information of the application.
3526    
3527 bh 2048 2004-01-05 Bernhard Herzog <[email protected]>
3528    
3529 bh 2050 * po/ru.po: Updated translations from Alex Shevlakov
3530    
3531     2004-01-05 Bernhard Herzog <[email protected]>
3532    
3533 bh 2048 * po/Makefile, po/README: Move the description of how to generate
3534     the translation statistics to the README.
3535    
3536 bh 2042 2003-12-23 Bernhard Herzog <[email protected]>
3537    
3538 bh 2045 * NEWS: Update for 1.0.0
3539    
3540     * po/it.po: Another update from Maurizio Napolitano
3541    
3542     2003-12-23 Bernhard Herzog <[email protected]>
3543    
3544 bh 2042 * po/it.po: Updated translation from Maurizio Napolitano
3545    
3546     2003-12-23 Bernhard Herzog <[email protected]>
3547    
3548     * Thuban/UI/join.py (JoinDialog.__init__): Mark one more string
3549     for translation
3550    
3551     * Thuban/UI/mainwindow.py (MainWindow.TableRename)
3552     (MainWindow.RenameMap, MainWindow.RenameLayer): Mark some more
3553     strings for translation
3554    
3555     * po/de.po: Update with the newly marked strings.
3556    
3557 bh 2033 2003-12-22 Bernhard Herzog <[email protected]>
3558    
3559 bh 2039 * HOWTO-Release: Fix the places where version numbers have to be
3560     updated
3561    
3562     2003-12-22 Bernhard Herzog <[email protected]>
3563    
3564 bh 2037 * setup.py (setup call): 1.0.0, yeah!
3565    
3566     * Thuban/version.py (longversion): 1.0.0, yeah!
3567    
3568     * Thuban/Model/load.py (SessionLoader.__init__): Accept the
3569     1.0.0 namespace too
3570    
3571     * Thuban/Model/save.py (SessionSaver.write_session): Save with
3572     1.0.0 namespace
3573    
3574     * test/test_load.py (LoadSessionTest.dtd)
3575     (TestSingleLayer.file_contents)
3576     (TestNonAsciiColumnName.file_contents)
3577     (TestLayerVisibility.file_contents)
3578     (TestClassification.file_contents, TestLabels.file_contents)
3579     (TestLayerProjection.file_contents)
3580     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3581     (TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
3582     (TestPostGISLayerPassword.file_contents)
3583     (TestLoadError.file_contents, TestLoadError.test): Update for
3584     1.0.0 namespace
3585    
3586     * test/test_save.py (SaveSessionTest.dtd)
3587     (SaveSessionTest.testEmptySession)
3588     (SaveSessionTest.testSingleLayer)
3589     (SaveSessionTest.testLayerProjection)
3590     (SaveSessionTest.testRasterLayer)
3591     (SaveSessionTest.testClassifiedLayer)
3592     (SaveSessionTest.test_dbf_table)
3593     (SaveSessionTest.test_joined_table)
3594     (SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace
3595    
3596     2003-12-22 Bernhard Herzog <[email protected]>
3597    
3598 bh 2035 * Thuban/Model/load.py (SessionLoader.start_label): Make sure the
3599     alignment flags are byte strings not unicode and that they have
3600     valid values
3601    
3602     * test/test_load.py (TestLabelLayer): New. Test loading (and
3603     indirectly saving) of maps with labels.
3604    
3605     2003-12-22 Bernhard Herzog <[email protected]>
3606    
3607 bh 2033 * Thuban/UI/tableview.py (TableGrid.OnDestroy)
3608     (TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
3609     unsubscribe all subscribers.
3610     (LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
3611     self.grid since it may already have been destroyed.
3612     Fixes RT #2256
3613    
3614 bh 2031 2003-12-19 Bernhard Herzog <[email protected]>
3615    
3616     * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
3617    
3618 bh 2028 2003-12-16 Bernhard Herzog <[email protected]>
3619 silke 2029
3620     * debian/bitmappath.patch, debian/setup.py.patch:
3621     added to ensure compliance with FHS for debian
3622     * debian/rules, debian/changelog:
3623     added patches in rules to ensure compliance with FHS for debian
3624 bh 2028
3625 silke 2029 2003-12-16 Bernhard Herzog <[email protected]>
3626    
3627 bh 2028 * po/Makefile (mo): Make the output a bit nicer so that it prints
3628     statistics about the translations. Add a comment how produce even
3629     nicer statistics with sed.
3630    
3631 frank 2026 2003-12-09 Frank Koormann <[email protected]>
3632    
3633     * Resources/Projections/defaults.proj:
3634     French projection sample with correct accents (UNICODE).
3635    
3636 bh 2025 2003-12-05 Bernhard Herzog <[email protected]>
3637    
3638     * MANIFEST.in: Add the devtools directory
3639    
3640     * setup.py (setup call): Use license instead of licence. This
3641     silences a deprecation warning on Python 2.3
3642    
3643 frank 2022 2003-12-05 Frank Koormann <[email protected]>
3644    
3645 frank 2023 Documentation synced with 1.0rc1
3646    
3647     * Doc/manual/thuban-manual.xml:
3648     Minor formatting changes and references to database layers .
3649     Introduction.Internationalization: New section on i18n.
3650     MapManagement.AddingandRemovingLayers: Added item on database layers.
3651     MapManagement.TheLegend: Added section and screenshot on popup menu.
3652     ProjectionManagement: Updated screenshot and sentence on EPSG.
3653     Appendix.SupportedDataSources: Added PostGIS.
3654     Appendix.WorkingwithPostGIS: New section.
3655    
3656     * Doc/manual/images/6_projection.png: Updated screenshot including
3657     EPSG checkboxes.
3658    
3659     * Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.
3660    
3661     * Doc/manual/images/app_postgis_add_layer.png,
3662     Doc/manual/images/app_postgis_db_add.png,
3663     Doc/manual/images/app_postgis_db_management.png:
3664     New screenshots focussing on database layers
3665    
3666     2003-12-05 Frank Koormann <[email protected]>
3667    
3668 frank 2022 * Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
3669     write warning to stderr instead of rising a warning dialog
3670    
3671 bh 2016 2003-12-03 Bernhard Herzog <[email protected]>
3672    
3673 bh 2021 Fix for RT #2243
3674    
3675 bh 2020 * Thuban/UI/mainwindow.py (MainWindow.has_selected_shape_layer):
3676     New. Like has_selected_layer but for shape layers only
3677     (_has_selected_shape_layer): New. Like _has_selected_layer but for
3678     shape layers only
3679     (layer_show_table command, layer_jointable command): Use these
3680     commands should only be available for shape layers
3681    
3682     2003-12-03 Bernhard Herzog <[email protected]>
3683    
3684 bh 2018 * Thuban/UI/mainwindow.py (MainWindow.Unsubscribe): Deal with
3685     publishers that are wx objects and may have been destroyed by wx
3686     already. Fixes RT #2242.
3687    
3688     2003-12-03 Bernhard Herzog <[email protected]>
3689    
3690 bh 2016 * po/ru.po: Updates from Alex Shevlakov
3691    
3692 silke 2013 2003-12-03 Silke Reimer <silkeintevation.de>
3693    
3694     * debian/control, debian/changelog: Added gdal-support to
3695     debian package, updated to new thuban version
3696    
3697    
3698 bh 2012 2003-12-03 Bernhard Herzog <[email protected]>
3699    
3700     * Thuban/Lib/version.py: New. Module for version number
3701     manipulations. The version of make_tuple here also deals better
3702     with more unusual version number strings, such as e.g.
3703     "1.2+cvs20031111"
3704    
3705     * Thuban/version.py (make_tuple): Removed. It's now in
3706     Thuban.Lib.version. Use that implementation instead.
3707    
3708     * test/test_lib_version.py: New. Tests for Thuban/Lib/version.py
3709    
3710 bh 2005 2003-12-02 Bernhard Herzog <[email protected]>
3711    
3712 bh 2010 * MANIFEST.in: Add debian files
3713    
3714 bh 2008 * setup.py (setup call): Add packages for the Extensions so that
3715     they're installed too
3716     (data_files): Add READMEs and sample data from some Extensions
3717    
3718     * NEWS: Add note about the extensions in binary packages
3719    
3720     2003-12-02 Bernhard Herzog <[email protected]>
3721    
3722 bh 2005 * Thuban/Model/save.py (SessionSaver.write_session): Save files
3723     with the thuban-1.0rc1
3724    
3725     * Thuban/Model/load.py (SessionLoader.__init__): Recognize the
3726     thuban-1.0rc1 namespace too
3727    
3728     * test/test_save.py (SaveSessionTest.dtd)
3729     (SaveSessionTest.testEmptySession)
3730     (SaveSessionTest.testSingleLayer)
3731     (SaveSessionTest.testLayerProjection)
3732     (SaveSessionTest.testRasterLayer)
3733     (SaveSessionTest.testClassifiedLayer)
3734     (SaveSessionTest.test_dbf_table)
3735     (SaveSessionTest.test_joined_table)
3736     (SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
3737     namespace
3738    
3739     * test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
3740     namespace
3741     (TestSingleLayer.file_contents)
3742     (TestNonAsciiColumnName.file_contents)
3743     (TestLayerVisibility.file_contents)
3744     (TestClassification.file_contents, TestLabels.file_contents)
3745     (TestLayerProjection.file_contents)
3746     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3747     (TestPostGISLayer.file_contents)
3748     (TestPostGISLayerPassword.file_contents)
3749     (TestLoadError.file_contents, TestLoadError.test): Update to
3750     thuban-1.0rc1 namespace
3751    
3752 bh 1996 2003-12-01 Bernhard Herzog <[email protected]>
3753    
3754 bh 2003 * setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
3755     nt to better match Intevation's current w32 setup
3756    
3757 bh 2001 * HOWTO-Release: Add note about updating MANIFEST.in
3758    
3759     * MANIFEST.in: Add the Extensions
3760    
3761 bh 1998 * NEWS: Update for 1.0rc1
3762    
3763     2003-12-01 Bernhard Herzog <[email protected]>
3764    
3765 bh 1996 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Change the wild
3766     cards for the dialog so that shapefiles ending in all uppercase
3767     SHP are listed too
3768    
3769 bh 1988 2003-11-28 Bernhard Herzog <[email protected]>
3770    
3771 bh 1996 * Thuban/version.py (longversion): Update to 1.0rc1
3772    
3773     * setup.py (setup call): Update version to 1.0rc1. Use the
3774     [email protected] email address as author email instead of my
3775     personal one.
3776    
3777     2003-11-28 Bernhard Herzog <[email protected]>
3778    
3779 bh 1992 * po/de.po: Update german translation.
3780    
3781     2003-11-28 Bernhard Herzog <[email protected]>
3782    
3783 bh 1990 Unify the filenames stored in .thuban files so that the .thuban
3784     files are more platform independend
3785    
3786     * Thuban/Model/save.py (unify_filename): New. Unify filenames so
3787     that they can be used on both windows and unix
3788     (SessionSaver.prepare_filename): New. Handle all filename
3789     transformations for filenames stored in the thuban file
3790     (SessionSaver.write_data_containers, SessionSaver.write_layer):
3791     Use prepare_filename
3792    
3793     * test/test_save.py (SaveSessionTest.testSingleLayer)
3794     (SaveSessionTest.testLayerProjection)
3795     (SaveSessionTest.testRasterLayer)
3796     (SaveSessionTest.testClassifiedLayer)
3797     (SaveSessionTest.test_dbf_table)
3798     (SaveSessionTest.test_joined_table): Filenames are always stored
3799     with slashes on all currently supported platforms so adapt all
3800     tests to this
3801    
3802     * test/test_load.py (LoadSessionTest.filenames): With the new
3803     filename scheme the filenames in the tests should be
3804     understandable on all currently supported platforms so we turn
3805     this into an empty list because we don't have to normalize them
3806     anymore
3807    
3808     2003-11-28 Bernhard Herzog <[email protected]>
3809    
3810 bh 1988 * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
3811     Add the ellipsoid to the projection since some Proj versions
3812     complain if it's missing.
3813    
3814 bh 1984 2003-11-27 Bernhard Herzog <[email protected]>
3815    
3816     Corect some bounding box projection problems
3817    
3818     * Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
3819     version of ForwardBBox
3820     (Projection._transform_bbox): New. common implementation of
3821     ForwardBBox and InverseBBox
3822     (Projection.ForwardBBox): Use _transform_bbox.
3823    
3824     * test/test_proj.py (TestProjection.test): Add test for
3825     InverseBBox
3826    
3827     * Thuban/Model/layer.py (Layer.LatLongBoundingBox)
3828     (Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
3829     new InverseBBox method to determine the unprojected bounding box
3830     (Layer.ShapesInRegion): Use the ForwardBBox method to project the
3831     bbox.
3832    
3833     * test/test_layer.py (TestLayer.test_point_layer_with_projection):
3834     Removed.
3835     (TestLayer.test_arc_layer_with_projection): New. This test is
3836     better able to test whether bounding boxes are projected correctly
3837     than test_point_layer_with_projection
3838    
3839 bh 1986 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
3840     InverseBBox to unproject bboxes
3841    
3842 bh 1975 2003-11-25 Bernhard Herzog <[email protected]>
3843    
3844 bh 1981 * Thuban/UI/about.py (About.__init__): Make sure we have ASCII
3845     source code.
3846    
3847     2003-11-25 Bernhard Herzog <[email protected]>
3848    
3849 bh 1979 * Thuban/Model/layer.py (Layer.__getattr__): Removed. It was only
3850     there for backwards compatibility and all code relying on that
3851     should have been updated by now.
3852    
3853     2003-11-25 Bernhard Herzog <[email protected]>
3854    
3855 bh 1977 * test/test_load.py (TestClassification.test): Add the missing
3856     round trip test.
3857     (TestClassification.file_contents): Update to the newest file
3858     format
3859    
3860     2003-11-25 Bernhard Herzog <[email protected]>
3861    
3862 bh 1975 Add very experimental (and possibly dangerous) extension to draw
3863     polygons:
3864    
3865     * Extensions/drawshape/README: New. Brief installation
3866     instructions
3867    
3868     * Extensions/drawshape/drawshape.py: New. Implementation of the
3869     drawshape extensions
3870    
3871     * Extensions/drawshape/patch.diff: Patch to apply before the
3872     extension can be used.
3873    
3874 bh 1971 2003-11-24 Bernhard Herzog <[email protected]>
3875    
3876 bh 1973 * Thuban/Model/data.py (ShapefileStore._open_shapefile)
3877     (ShapefileStore.__init__): Factor opening the shapefile into a
3878     separate method (the new _open_shapefile). This makes the code a
3879     bit more readable but the real reason is that it makes some evil
3880     hacks easier. :-)
3881    
3882     2003-11-24 Bernhard Herzog <[email protected]>
3883    
3884 bh 1971 * Thuban/Model/load.py (SessionLoader.check_attrs): If no
3885     converter is specified for an attribute assume it's a string
3886     containing only Latin1 characters. Update doc-string accordingly.
3887     This change should fix many places where unicode objects might
3888     accidentally enter Thuban.
3889    
3890     * test/test_load.py (TestNonAsciiColumnName): New test to check
3891     what happens with column names in DBF files that contain non-ascii
3892     characters
3893    
3894 bh 1969 2003-11-21 Bernhard Herzog <[email protected]>
3895    
3896     Enable the experimental attribute editing again and introduce a
3897     command line switch to actually activate it
3898    
3899     * Thuban/UI/main.py (options): New. Container for options set on
3900     the commmand line
3901     (main): Add the --enable-attribute-editing flag.
3902    
3903     * Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute
3904     editing is enabled use the grid ctrl which allows editing of the
3905     values
3906    
3907     * Thuban/Model/transientdb.py (AutoTransientTable.write_record):
3908     New. Just delegate this to the underlying table.
3909    
3910 bh 1967 2003-11-20 Bernhard Herzog <[email protected]>
3911    
3912     * test/test_proj.py (ProjFileReadTests.test_read_unreadable_file):
3913     Skip this test if run under non-posix systems since it only works
3914     there
3915    
3916 bh 1960 2003-11-19 Bernhard Herzog <[email protected]>
3917    
3918 bh 1965 * Thuban/Model/resource.py: Rework the way gdal support is
3919     determined so that we can give a reason in the about why gdal is
3920     not supported.
3921     (gdal_support_status): New. Variable holding a string with the
3922     reason for no gdal support
3923    
3924     * Thuban/UI/about.py (About.__init__): Add the reason why gdal is
3925     not supported to the message
3926    
3927     2003-11-19 Bernhard Herzog <[email protected]>
3928    
3929 bh 1963 Remove the old table interface and its test cases
3930    
3931     * Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
3932     (DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
3933     anymore
3934    
3935     * Thuban/Model/transientdb.py (TransientTableBase)
3936     (AutoTransientTable): Do not derive from OldTableInterfaceMixin
3937     anymore
3938    
3939     * test/test_table.py: Removed since the old interface it tests is
3940     gone.
3941    
3942     * test/runtests.py (main): The old table interface is gone and
3943     with it the deprecation warnings so remove the code that turns
3944     these warnings into errors
3945    
3946     2003-11-19 Bernhard Herzog <[email protected]>
3947    
3948 bh 1960 * test/test_table.py: Revert to revision 1.5 again. Changing the
3949     tests to use the new table interface is completely wrong since the
3950     whole purpose of the tests in this module is to test the old
3951     interface.
3952    
3953 bh 1954 2003-11-18 Bernhard Herzog <[email protected]>
3954    
3955 bh 1958 * Thuban/Model/postgisdb.py (PostGISConnection.MatchesParameters):
3956     New. Test whether the connection matches a set of connection
3957     parameters
3958    
3959     * Thuban/UI/dbdialog.py (DBFrame.conns_changed): Fix doc-string
3960     (DBFrame.OnAdd): Use the new MatchesParameters method when looking
3961     for existing connections with the same parameters and break out of
3962     the loop correctly.
3963    
3964     * test/test_postgis_db.py (TestBriefDescription)
3965     (TestPostGISSimple.test_brief_description): Rename
3966     TestBriefDescription to TestPostGISSimple and the test method to
3967     test_brief_description so that we can add more test methods.
3968     (TestPostGISSimple.test_matches_parameters): New. Test the new
3969     MatchesParameters method
3970    
3971     2003-11-18 Bernhard Herzog <[email protected]>
3972    
3973 bh 1960 * Thuban/Lib/connector.py (Publisher): Introduce a new flag,
3974 bh 1954 _was_destroyed, to indicate whether an publisher instance has
3975     already been destroyed.
3976     (Publisher.Unsubscribe): Only disconnect if the publisher has not
3977     been destroyed yet.
3978     (Publisher.Destroy): Set the _was_destroyed flag to true.
3979    
3980     * test/test_connector.py
3981     (TestPublisher.test_unsubscribe_after_destroy): New. Test that
3982     calling Unsubscribe after Destroy doesn't raise an exception
3983    
3984 bh 1951 2003-11-14 Bernhard Herzog <[email protected]>
3985    
3986     * Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
3987     typo in doc-string
3988    
3989 bh 1949 2003-11-13 Bernhard Herzog <[email protected]>
3990    
3991     Quote table and column names properly for postgis.
3992    
3993     * Thuban/Model/postgisdb.py (quote_identifier): New. Function to
3994     quote an identifier for use in an sql statement
3995     (PostGISColumn.__init__): Add the quoted_name attribute
3996     (PostGISTable.__init__): New instance variable quoted_tablename
3997     (PostGISTable._fetch_table_information): Use the quoted table
3998     name. New isntance variable quoted_geo_col with a quoted version
3999     of geometry_column
4000     (PostGISTable.NumRows, PostGISTable.RowIdToOrdinal)
4001     (PostGISTable.RowOrdinalToId): Use the quoted table name
4002     (PostGISTable.ReadValue, PostGISTable.ValueRange)
4003     (PostGISTable.UniqueValues, PostGISTable.SimpleQuery)
4004     (PostGISShapeStore.BoundingBox, PostGISShapeStore.Shape)
4005     (PostGISShapeStore.AllShapes, PostGISShapeStore.ShapesInRegion):
4006     Use quoted table and column names
4007    
4008     * test/test_postgis_db.py (TestPostGISSpecialCases)
4009     (TestPostGISIgnoredColumns): Rename the class to
4010     TestPostGISSpecialCases because that better describes the new
4011     cases
4012     (TestPostGISSpecialCases.test_unsupported_types)
4013     (TestPostGISSpecialCases.test): Rename the method to
4014     test_unsupported_types because we need a more descriptive name now
4015     that there are more methods
4016     (TestPostGISSpecialCases.test_table_name_quoting)
4017     (TestPostGISSpecialCases.test_column_name_quoting)
4018     (TestPostGISSpecialCases.test_shapestore_name_quoting): New test
4019     cases to test quoting of table and column names in PostGISTable
4020     and PostGISShapeStore
4021    
4022     * test/postgissupport.py
4023     (skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
4024     AddGeometryColumn desn't support table or column names with sapces
4025     or double quotes
4026    
4027 jan 1945 2003-11-12 Jan-Oliver Wagner <[email protected]>
4028    
4029     * Extensions/wms/__init__.py: New: Init to make this
4030     directory a package.
4031    
4032     * Extensions/wms/wms.py: New: Provide layers via OGC WMS.
4033    
4034 bh 1932 2003-11-11 Bernhard Herzog <[email protected]>
4035    
4036 bh 1942 * Thuban/Model/resource.py (EPSG_DEPRECATED_PROJ_FILE): New.
4037     Constant for the file woth deprecated epsg projections
4038     (get_system_proj_file): Update doc-string
4039    
4040     * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Add a space
4041     above the EPS widgets, introduce a check box for the deprecated
4042     eps projections and a label for the epsg widgets
4043     (ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections
4044     too
4045    
4046     2003-11-11 Bernhard Herzog <[email protected]>
4047    
4048 bh 1939 Avoid warnings when run under Python 2.3
4049    
4050     * Thuban/UI/baserenderer.py (BaseRenderer.draw_point_shape)
4051     (BaseRenderer.draw_label_layer): Coordinates must be ints.
4052    
4053     * Thuban/UI/renderer.py (MapRenderer.make_point): Turn this into a
4054     real method so that we can convert to int.
4055     (MapRenderer.label_font): The font size mist be an int.
4056    
4057     * Thuban/UI/common.py (Color2wxColour): The color values must be
4058     ints. Also, remove the unnecessary asserts.
4059    
4060     * test/test_load_0_8.py (TestUnicodeStrings.file_contents)
4061     (TestUnicodeStrings.test): Python source code should not contain
4062     non-ascii characters unless an encoding is specified in the file.
4063     Therefore use \x escapes in the string literals for non-ascii
4064     characters.
4065    
4066     2003-11-11 Bernhard Herzog <[email protected]>
4067    
4068 bh 1934 * Thuban/Model/resource.py (get_system_proj_file): Add a filename
4069     parameter so that this function can be used for all proj files in
4070     Resource/Projections
4071     (DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
4072     get_system_proj_file
4073    
4074     * Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
4075     ProjFile self.__sysProjFile use a dictionary of system ProjFile
4076     objects self._sys_proj_files
4077     (ProjFrame.build_dialog): Adapt to the new changes in the
4078     ProjectionList constructor. Add a check button to toggle whether
4079     EPSG projections are shown
4080     (ProjFrame._OnShowEPSG): New. Handler for the epsg check button
4081     events.
4082     (ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
4083     the busy cursor if the files have not yet been loaded by the
4084     dialog.
4085     (ProjFrame.load_system_proj): Add a parameter for the name of the
4086     proj file. Maintain the dictionary of system projections
4087     self._sys_proj_files
4088    
4089     * Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
4090     user_projs parameters into one parameter proj_files which is a
4091     list of proj files.
4092     (ProjectionList._subscribe_proj_files)
4093     (ProjectionList._unsubscribe_proj_files): New. Move
4094     subscription/unsubscription of projfile messages to separate
4095     methods
4096     (ProjectionList.Destroy): The unsubscribe is now done in
4097     _unsubscribe_proj_files
4098     (ProjectionList.update_projections): We now have a list of proj
4099     file objects
4100     (ProjectionList.SetProjFiles): New method to set a new list of
4101     proj file objects
4102    
4103     * test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
4104     Specify explicitly which system proj file to load.
4105    
4106     2003-11-11 Bernhard Herzog <[email protected]>
4107    
4108 bh 1932 * Thuban/Model/load.py (SessionLoader.Destroy): New. Clear all
4109     instance variables to cut cyclic references. The GC would have
4110     collected the loader eventually but it can happen that it doesn't
4111     run at all until thuban is closed (2.3 but not 2.2 tries a bit
4112     harder and forces a collection when the interpreter terminates)
4113     (load_session): Call the handler's Destroy method to make sure
4114     that it gets garbage collected early. Otherwise it will be
4115     collected very late if at all and it holds some references to e.g.
4116     shapestores and the session which can lead to leaks (of e.g. the
4117     temporary files)
4118    
4119     * test/test_load.py (TestSingleLayer.test_leak): New. test for the
4120     resource leak in load_session
4121    
4122 bh 1929 2003-11-10 Bernhard Herzog <[email protected]>
4123    
4124     * Thuban/UI/baserenderer.py: Add a way to specify how layers in
4125     extensions are to be rendered.
4126     (_renderer_extensions): New. List with renderer for layers in
4127     extensions
4128     (add_renderer_extension): New. Add a renderer extension
4129     (init_renderer_extensions): New. Init the renderer extensions
4130     (BaseRenderer.render_map_incrementally): Search
4131     _renderer_extensions for how to draw unknown layer types
4132     (BaseRenderer.draw_raster_data): Add format parameter so that
4133     formats other than BMP can be drawn
4134     (BaseRenderer.draw_raster_layer): Pass an explicit format to
4135     draw_raster_data
4136    
4137     * Thuban/UI/renderer.py (raster_format_map): New. Mapping form the
4138     strings of the format parameter of draw_raster_data method to wx
4139     constants
4140     (MapRenderer.draw_raster_data): Add the format parameter and use
4141     raster_format_map to map it to the right wxwindows constant for
4142     wxImageFromStream
4143    
4144     * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add
4145     the format parameter and record it
4146     (TestBaseRenderer.test_raster_no_projection): check the format
4147     paramter of the draw_raster_data method
4148     (TestBaseRenderer.test_renderer_extension): New. Test the renderer
4149     extension facility
4150    
4151 bh 1925 2003-11-07 Bernhard Herzog <[email protected]>
4152    
4153     Tweak the usage of the sqlite database to make common use cases
4154     more responsive. In most cases copying the data to the sqlite
4155     database takes so long that using sqlite doesn't have enough
4156     advantages.
4157    
4158     * Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add
4159     comments about performance and query the min and max in separate
4160     statements because only that way will indexes be used.
4161     (TransientTableBase.UniqueValues): Add some comments about
4162     performance.
4163     (AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues):
4164     Do not copy the data to the transient DB but use the transient
4165     copy if it exists. See the new comments for the performance trade
4166     offs
4167    
4168     * test/test_transientdb.py
4169     (TestTransientTable.test_auto_transient_table): Make sure that the
4170     data is copied to the transient database at some point.
4171    
4172 bh 1913 2003-11-03 Bernhard Herzog <[email protected]>
4173    
4174 bh 1922 * Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some
4175     globals to locals so that it's a bit faster
4176    
4177     2003-11-03 Bernhard Herzog <[email protected]>
4178    
4179 bh 1920 * Thuban/UI/baserenderer.py
4180     (BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
4181     method. ReadValue is faster than ReadRowAsDict since it only reads
4182     one cell especially now that the dbf file objects actually
4183     implement it.
4184    
4185     * Thuban/Model/table.py (DBFTable.ReadValue): Use the new
4186     read_attribute method of the dbf objects
4187    
4188     2003-11-03 Bernhard Herzog <[email protected]>
4189    
4190 bh 1916 * Extensions/profiling/profiling.py (popup_dialog_box): New config
4191     variable to indicate whether the result should be shown in a
4192     dialog box
4193     (profile_screen_renderer, time_screen_renderer): Only show a
4194     dialog box if popup_dialog_box is true.
4195     (profile_screen_renderer): Flush stdout after the printing the
4196     first part of the "profiling..." message
4197    
4198     * Thuban/UI/baserenderer.py
4199     (BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
4200     brushes for the groups so that they're not created over and over
4201     again
4202    
4203 bh 1913 * Thuban/Model/classification.py (Classification.__getattr__)
4204     (Classification._compile_classification)
4205     (Classification._clear_compiled_classification): New. Methods to
4206     manage a 'compiled' representation of the classification groups
4207     which is created on demand
4208     (Classification.InsertGroup, Classification.RemoveGroup)
4209     (Classification.ReplaceGroup): reset the compiled representation
4210     (Classification.FindGroup): Use the compiled representation to
4211     find the matching group
4212     (ClassGroupRange.GetRangeTuple): New. Return the range as a tuple
4213    
4214 bh 1904 2003-10-31 Bernhard Herzog <[email protected]>
4215    
4216 bh 1911 * Thuban/Model/classification.py (Classification.SetDefaultGroup):
4217     Send a CLASS_CHANGED message
4218     (Classification.RemoveGroup): Send a CLASS_CHANGED message and do
4219     not return the removed group since it wasn't used.
4220    
4221     * test/test_classification.py
4222     (TestClassification.test_set_default_group): New. Test the
4223     SetDefaultGroup method
4224     (TestClassification.test_insert_group): New. Test the InsertGroup
4225     method
4226     (TestClassification.test_remove_group): New. Test the RemoveGroup
4227     method
4228     (TestClassification.test_replace_group): New. Test the
4229     ReplaceGroup method
4230    
4231     2003-10-31 Bernhard Herzog <[email protected]>
4232    
4233 bh 1908 * test/test_classification.py (TestClassification.setUp):
4234     Subscribe to the CLASS_CHANGED messages
4235     (TestClassification.tearDown): New. Destroy the classification
4236     properly
4237     (TestClassification.test_defaults): Add tests for the default line
4238     width and whether no messages were sent yet
4239     (TestClassification.test_set_default_properties): Add tests for
4240     messages and setting the default line width
4241     (TestClassification.test_add_singleton)
4242     (TestClassification.test_add_range)
4243     (TestClassification.test_multiple_groups): Add tests for messages
4244    
4245     2003-10-31 Bernhard Herzog <[email protected]>
4246    
4247 bh 1906 Some more refactoring in preparation for new tests:
4248    
4249     * test/test_classification.py (TestClassification.setUp): New.
4250     Instantiate the classification here. Update the test methods
4251     accordingly.
4252     (TestClassification.test_multiple_groups): Make sure that the two
4253     singletons matching 1 are considered different.
4254    
4255     2003-10-31 Bernhard Herzog <[email protected]>
4256    
4257 bh 1904 * test/test_classification.py (red, green, blue): New. These
4258     constants were used in several cases. Update the relevant methods.
4259     (TestClassification.test_defaults)
4260     (TestClassification.test_set_default_properties)
4261     (TestClassification.test_add_singleton)
4262     (TestClassification.test_add_range)
4263     (TestClassification.test_multiple_groups)
4264     (TestClassification.test_deepcopy): New. These were formerly all
4265     part of the single method test.
4266     (TestClassification.test_deepcopy): Removed.
4267     (TestClassIterator): Removed. The test case is now a method of
4268     TestClassification since it tests part of the public interface of
4269     Classification
4270     (TestClassification.test_iterator): New. Used to be
4271     TestClassIterator effectively
4272    
4273 jan 1902 2003-10-31 Jan-Oliver Wagner <[email protected]>
4274    
4275     GUIfied the functions of the profiling extension.
4276    
4277     * /Extensions/profiling/__init__.py: New: Init to make this
4278     directory a package.
4279    
4280     * Extensions/profiling/profiling.py: Moved menu entries to
4281     the Extensions menu. Applied _() for strings.
4282     (profile_screen_renderer): Catch the detailed printout and present
4283     it in a dialog.
4284 bh 1904 (time_screen_renderer): Raise a dialog to present the result instead
4285 jan 1902 of printing it to stdout.
4286    
4287 bh 1897 2003-10-31 Bernhard Herzog <[email protected]>
4288    
4289 bh 1899 * test/test_classification.py (TestClassGroupProperties)
4290     (TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
4291     (TestClassGroupSingleton, TestClassIterator, TestClassification):
4292     Split TestClassification into several classes, one for each class
4293     being tested. TestClassification itself now only tests
4294     Classification. This split makes changes to the tests a bit easier
4295    
4296     2003-10-31 Bernhard Herzog <[email protected]>
4297    
4298 bh 1897 * Extensions/profiling/profiling.py: New. Extension to measure
4299     Thuban performance
4300    
4301 frank 1895 2003-10-31 Frank Koormann <[email protected]>
4302    
4303     Added two items to legend popup menu: Remove Layer and Show Layer Table
4304    
4305     * Thuban/UI/legend.py (LegendPanel._OnRemoveLayer,
4306     LegendPanel._OnShowTable): New event handlers, call the corresponding
4307     mainwindow methods.
4308     (LegendTree._OnRightClick): Added items to popup menu.
4309    
4310 bh 1894 2003-10-30 Bernhard Herzog <[email protected]>
4311    
4312     * Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle
4313     EVT_WINDOW_DESTROY
4314     (ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
4315     nothing but is convenient for the derived classes.
4316    
4317     * Thuban/UI/tableview.py
4318     (TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
4319     Unsubscribe the messages here not in OnClose because that might
4320     get called multiple times. Fixes RT #2196
4321     (TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
4322     anymore.
4323    
4324     * README: Update the minimum requirement for wxPython. Since we
4325     now use the EVT_WINDOW_DESTROY event, we need at least 2.4.0.4,
4326     the version in which that was introduced for all platforms
4327    
4328 frank 1890 2003-10-30 Frank Koormann <[email protected]>
4329    
4330     * Thuban/UI/join.py (JoinDialog.OnJoin): Wrapped the major parts of
4331     the join process in a ThubanBeginBusyCursor, ThubanEndBusyCursor
4332     frame.
4333    
4334 jan 1889 2003-10-30 Jan-Oliver Wagner <[email protected]>
4335    
4336     Improved APR import extension, added further EPSG definitions
4337     and some cleanup regarding string class.
4338    
4339     * test/test_proj.py (TestProjection.test_get_projection_units_geo):
4340     Added test for alias 'longlat'.
4341    
4342     * Resources/Projections/epsg-deprecated.proj: New. Contains
4343     deprecated EPSG definitions.
4344    
4345     * Extensions/importAPR/odb.py (ODBBaseObject.TreeInfo): Added
4346     the variable names for objects.
4347    
4348     * Extensions/importAPR/apr.py (APR_BLnSym, APR_BMkSym, APR_BShSym): New.
4349     Copied from importAPR and provided with documentation.
4350    
4351     * Extensions/importAPR/importAPR.py (APR_BLnSym, APR_BMkSym, APR_BShSym):
4352     Moved to apr.py.
4353     (APR_View): Added object ref 'ITheme'.
4354    
4355     * Thuban/Lib/fileutil.py, Thuban/UI/proj4dialog.py: Replaced string
4356     split function by corresponding use of the string class method.
4357    
4358     * Thuban/Model/xmlwriter.py: Replaced string replace function by
4359     corresponding string method.
4360    
4361 bh 1880 2003-10-29 Bernhard Herzog <[email protected]>
4362    
4363     * Thuban/UI/baserenderer.py
4364     (BaseRenderer.draw_shape_layer_incrementally): Speed up the
4365     special case of a classification that only has the default group
4366    
4367 bh 1868 2003-10-27 Bernhard Herzog <[email protected]>
4368    
4369 bh 1878 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
4370    
4371 bh 1876 * po/de.po: Update.
4372    
4373     * Thuban/UI/application.py
4374     (ThubanApplication.ShowExceptionDialog): Handle translation of the
4375     dialog message properly
4376    
4377     2003-10-27 Bernhard Herzog <[email protected]>
4378    
4379 bh 1873 Rework how localization works so that we use wx's translation
4380     functions when running Thuban as a normal application but not when
4381     we don't need any UI, such as in the test suite. See the comment
4382     in Thuban/__init__.py for details
4383    
4384     * Thuban/__init__.py (_): Add one level of indirection to make the
4385     translation handling more flexible and to make it possible to use
4386     either wx's translation services or not.
4387     (gettext_identity, translation_function_installed)
4388     (install_translation_function): New function to help with this
4389    
4390     * Thuban/UI/__init__.py: Install the wx specific translation
4391     function if it's OK to do that
4392    
4393     * test/support.py (initthuban): Install a dummy translation
4394     function so that importing Thuban.UI doesn't install a wx specific
4395     one for which would need to import wxPython
4396    
4397     2003-10-27 Bernhard Herzog <[email protected]>
4398    
4399 bh 1870 * HOWTO-Release: Source archives should be created first and the
4400     binary packages should be created from the source archives.
4401     There's an official debian package now so there's no need to test
4402     the rpm on debian anymore
4403    
4404     2003-10-27 Bernhard Herzog <[email protected]>
4405    
4406 bh 1868 Several rendering changes:
4407    
4408     - Render the selection into a separate bitmap so that only that
4409     bitmap needs to be redrawn when the selection changes
4410    
4411     - Render incrementally showing previews and allowing interaction
4412     before rendering is complete
4413    
4414     - Update the renderer interface a bit. Most parameters of
4415     RenderMap are now parameters of the constructor
4416    
4417     * Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
4418     and the update region as parameters. Update the doc-string
4419     (BaseRenderer.render_map_incrementally): New. Generator function
4420     to renders the map incrementally
4421     (BaseRenderer.render_map): Remove the map argument (it's now in
4422     the constructor) and simply iterate over the
4423     render_map_incrementally generator to draw the map.
4424     (BaseRenderer.draw_shape_layer_incrementally)
4425     (BaseRenderer.draw_shape_layer): Renamed to
4426     draw_shape_layer_incrementally and changed into a generator that
4427     yields True every 500 shapes. Used by render_map_incrementally to
4428     render shape layers incrementally
4429    
4430     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
4431     map and region parameters which are now in the constructor
4432     (ScreenRenderer.RenderMapIncrementally): New. Public frontend for
4433     the inherited render_map_incrementally.
4434     (BaseRenderer.draw_shape_layer): Removed.
4435     (ScreenRenderer.draw_selection_incrementally): New. The selection
4436     drawing part of the removed draw_shape_layer as a generator
4437     (ScreenRenderer.layer_shapes): Update because of the region
4438     parameter change
4439     (ExportRenderer.__init__): New. Extend the inherited constructor
4440     with the destination region for the drawing
4441     (ExportRenderer.RenderMap): Removed the map and region parameters
4442     which are now in the constructor
4443    
4444     * Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
4445     bitmap suitable for a preview in a tool
4446     (CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
4447     bitmap
4448     (MapPrintout.draw_on_dc): Adapt to new renderer interface
4449     (MapCanvas.OnPaint): Handle drawing the selection bitmap if it
4450     exists
4451     (MapCanvas.OnIdle): Update the logic to deal with incremental
4452     rendering and the selection bitmap
4453     (MapCanvas._do_redraw): Handle the instantiation of the render
4454     iterator and the redraws during rendering
4455     (MapCanvas._render_iterator): New. Generator to incrementally
4456     redraw both bitmaps
4457     (MapCanvas.Export): Adapt to new renderer interface.
4458     (MapCanvas.full_redraw): Reset the selection bitmap and the
4459     renderer iterator too
4460     (MapCanvas.redraw_selection): New. Force a redraw of the selection
4461     bitmap
4462     (MapCanvas.shape_selected): Only redraw the selection bitmap
4463    
4464     * test/test_baserenderer.py
4465     (TestBaseRenderer.test_polygon_no_projection)
4466     (TestBaseRenderer.test_raster_no_projection)
4467     (TestBaseRenderer.test_point_map_projection)
4468     (TestBaseRenderer.test_point_layer_and_map_projection)
4469     (TestBaseRenderer.test_point_layer_projection)
4470     (TestBaseRenderer.test_point_with_classification): Adapt to new
4471     renderer interface
4472    
4473 bh 1865 2003-10-24 Bernhard Herzog <[email protected]>
4474    
4475     * libraries/thuban/wxproj.cpp (draw_polygon_shape)
4476     (point_in_polygon_shape, shape_centroid): Raise an exception if
4477     the shape can't be read. Previously invalid shape ids would lead
4478     to a segfault.
4479    
4480     * test/test_wxproj.py (TestShapeCentroid.test_invalid_shape_id):
4481     New. test whether an exception is raised for invalid shape ids
4482    
4483 jan 1857 2003-10-24 Jan-Oliver Wagner <[email protected]>
4484    
4485 jan 1862 * Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
4486     as alias for 'latlong'.
4487    
4488     * Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
4489     as alias for 'latlong'.
4490    
4491     2003-10-24 Jan-Oliver Wagner <[email protected]>
4492    
4493 jan 1859 * Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
4494     the projection even for the UnknownPanel.
4495     (UnknownProjPanel.__init__): Define the text and create the textctrl
4496     widget.
4497     (UnknownProjPanel._DoLayout): Replaced static text widget by the
4498     textctrl created in __init__.
4499     (UnknownProjPanel.SetProjection): Set the text for the text ctrl
4500     including the parameters of the projection.
4501    
4502     2003-10-24 Jan-Oliver Wagner <[email protected]>
4503    
4504 jan 1857 * Resources/Projections/epsg.proj: New. This is a list of
4505     EPSG codes with parameters for proj. The list has been
4506     generated using devtools/create_epsg.py based on the
4507     file nad/epsg of the proj 4.4.7 package. Four projection
4508     definitions have been deleted as they are not accepted by proj:
4509     "CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
4510     and "HD72 / EOV".
4511    
4512 bh 1855 2003-10-22 Bernhard Herzog <[email protected]>
4513    
4514     Some more tweaks to the projection dialog which should fix RT
4515     #1886.
4516    
4517     * Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
4518     the ProjFile's messages and call the base class methods correctly
4519     (ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
4520     flag on the newly selected item too. Otherwise some other item is
4521     focused and the first time the focus is moved with the keyboard
4522     the selection moves in unexpected ways.
4523    
4524     * Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
4525     focus on the OK button, only on the projection list. That way the
4526     list really has the focus initially
4527     (ProjFrame.OnClose): Call the projection list's Destroy method to
4528     make it unsubscribe all messages
4529    
4530 bh 1840 2003-10-21 Bernhard Herzog <[email protected]>
4531    
4532 bh 1852 Rework the projection dialog to fix a few bugs, including RT 2166
4533     and most of 2168
4534    
4535     * Thuban/UI/projlist.py: New. The class ProjectionList is a
4536     special wxListCtrl to show a list of projections in a more MVC
4537     fashion
4538    
4539     * Thuban/UI/projdialog.py (ProjFrame): Substantial changes
4540     throughout the class. The main change is to use the ProjectionList
4541     class instead of a normal wxListBox. Also, add an explicit
4542     "Unknown" projection to the projection choice control.
4543     (ProjPanel.__init__): Add an "unknown" ellipsoid
4544     (TMPanel.__init__, LCCPanel.__init__): Tweak the order of
4545     instantiation of the panel's controls to make the tab-order more
4546     natural
4547    
4548     2003-10-21 Bernhard Herzog <[email protected]>
4549    
4550 bh 1849 * test/test_load.py (TestSingleLayer.file_contents)
4551     (TestSingleLayer.test): Add non-ascii characters to the titles of
4552     session, map and layer. This is effectively a port of the
4553     TestUnicodeStrings test in test_load_0_8.py which for some reason
4554     was only added there.
4555    
4556     * test/test_load_0_9.py (TestSingleLayer.file_contents)
4557     (TestSingleLayer.test): Same as in test_load.py: add non-ascii
4558     characters to the titles of session, map and layer,.
4559    
4560     2003-10-21 Bernhard Herzog <[email protected]>
4561    
4562 bh 1847 Add EPSG projection handling to .thuban files
4563    
4564     * test/test_save.py (SaveSessionTest.dtd)
4565     (SaveSessionTest.testEmptySession)
4566     (SaveSessionTest.testLayerProjection)
4567     (SaveSessionTest.testRasterLayer)
4568     (SaveSessionTest.testClassifiedLayer)
4569     (SaveSessionTest.test_dbf_table)
4570     (SaveSessionTest.test_joined_table)
4571     (SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
4572     (SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
4573     use a and epsg projection to test saving them
4574    
4575     * test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
4576     namespace
4577     (TestLayerVisibility.file_contents, TestLabels.file_contents)
4578     (TestLayerProjection.file_contents)
4579     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
4580     (TestPostGISLayer.file_contents)
4581     (TestPostGISLayerPassword.file_contents)
4582     (TestLoadError.file_contents, TestLoadError.test): Update to use
4583     1.0-dev namespace
4584     (TestSingleLayer.file_contents, TestSingleLayer.test): Update to
4585     use 1.0-dev namespace and use an EPSG projection to test whether
4586     loading it works
4587    
4588     * test/test_load_0_9.py: New. Effectively a copy of test_load.py
4589     as of Thuban 0.9. These are now tests to determine whether Thuban
4590     can still read files generated by Thuban 0.9
4591    
4592     * Thuban/Model/save.py (SessionSaver.write)
4593     (SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
4594     namespace
4595     (SessionSaver.write_projection): Write the projection's epsg
4596     attribute
4597    
4598     * Thuban/Model/load.py (SessionLoader.__init__): Also accept the
4599     thuban-1.0-dev.dtd namespace
4600     (SessionLoader.check_attrs): Allow a callable object as conversion
4601     too
4602     (SessionLoader.start_projection, SessionLoader.end_projection)
4603     (SessionLoader.start_parameter): Handle the epsg attribute and
4604     rename a few instance variables to lower case
4605    
4606     * Resources/XML/thuban-1.0.dtd: New. Only difference to
4607     thuban-0.9.dtd is the epsg attribute for projections.
4608    
4609     2003-10-21 Bernhard Herzog <[email protected]>
4610    
4611 bh 1840 * test/runtests.py (main): Let the user specify which tests to run
4612     on the command line
4613    
4614     * test/support.py (ThubanTestResult.getDescription): Override to
4615     give a better short description. The description can be used as a
4616     parameter to run_tests to run that particular test in isolation.
4617    
4618 frank 1837 2003-10-21 Frank Koormann <[email protected]>
4619    
4620     Popup menu for legend. Scheduled for the 1.2 release this was too
4621     simple to implement: The popup menu is bound to the legend tree, while
4622     the events are hanlded by its anchestor, the legend panel. This
4623     allows reuse of all the event handlers already implemented for the
4624     legend toolbar buttons.
4625    
4626     * Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
4627     to add handlers for the events issued by the popup menu.
4628     (LegendPanel._OnToggleVisibility): Handler for toggling layer
4629     visibility event
4630     (LegendPanel._OnProjection): Handler for layer projection event.
4631     (LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
4632     (LegendTree._OnRightClick): Event handler for right click, select item
4633     and pop up menu.
4634     (LegendTree.ToggleVisibility): Toggle layer visibility
4635     (LegendTree.LayerProjection): Raise layer projection dialog for
4636     current layer.
4637    
4638 bh 1836 2003-10-21 Bernhard Herzog <[email protected]>
4639    
4640     * Resources/Projections/defaults.proj: Use correct DOCTYPE
4641     declaration. The top-level element is projectionlist not projfile
4642    
4643 bh 1834 2003-10-20 Bernhard Herzog <[email protected]>
4644    
4645     * Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
4646     method to write a projfile and display a busy cursor and error
4647     dialogs.
4648     (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
4649     (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
4650     (ProjFrame.__FillAvailList): Translate "<None>" too and display a
4651     busy cursor while loading the user and system prj files.
4652    
4653 bh 1832 2003-10-16 Bernhard Herzog <[email protected]>
4654    
4655     * Thuban/Model/resource.py (projfile_cache): Introduce a cache for
4656     ProjFile objects
4657     (clear_proj_file_cache): New function to clear the cache. Mainly
4658     useful for use by the test suite
4659     (read_proj_file): Use the cache.
4660    
4661     * test/test_proj.py (TestProjFile): Clarify the doc-string
4662     (ProjFileReadTests): Update doc-string
4663     (ProjFileReadTests.test_get_system_proj_file): Check whether the
4664     system proj files is cached.
4665     (ProjFileLoadTestCase): New base class for the proj file tests
4666     derived from support.FileLoadTestCase to provide some common
4667     behavior.
4668     (TestLoadingProjFile)
4669     (TestLoadingProjFileWithEmptyProjectionlist.file_contents)
4670     (TestProjFileWithInvalidParameters.file_contents): Derive from
4671     ProjFileLoadTestCase
4672     (TestLoadingProjFile.test_caching): New. Test whether the cache
4673     works
4674    
4675 silke 1829 2003-10-16 Silke Reimer <[email protected]>
4676    
4677     * debian/*: New directory with configuration files for building a thuban
4678     deb-package.
4679    
4680 bh 1822 2003-10-14 Bernhard Herzog <[email protected]>
4681    
4682 bh 1828 * test/test_proj.py: Execute support.run_tests when run as
4683     __main__ so that missing unsubscribes are detected
4684     (TestProjFile.tearDown): Destroy the proj_file properly
4685    
4686     2003-10-14 Bernhard Herzog <[email protected]>
4687    
4688 bh 1826 * Thuban/Model/messages.py (PROJECTION_ADDED)
4689     (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
4690     the ProjFile objects
4691    
4692     * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
4693     easily send messages when the projections change
4694     (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
4695     when the change was successful
4696    
4697     * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
4698     proj file messages
4699     (TestProjFile.test_add_remove)
4700     (TestProjFile.test_remove_non_existing)
4701     (TestProjFile.test_replace)
4702     (TestProjFile.test_replace_non_existing): Test whether the right
4703     messages are sent
4704    
4705     2003-10-14 Bernhard Herzog <[email protected]>
4706    
4707 bh 1822 * test/test_proj.py (TestProjFile.test): Refactor into several
4708     tests
4709     (TestProjFile.test_add_remove)
4710     (TestProjFile.test_remove_non_existing)
4711     (TestProjFile.test_replace)
4712     (TestProjFile.test_replace_non_existing): Some of the new
4713     individual test cases
4714     (TestProjFileSimple): New class for the rest of the test cases
4715     that came out of the refactoring
4716     (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
4717     derived classes don't have to
4718    
4719 bh 1812 2003-10-13 Bernhard Herzog <[email protected]>
4720    
4721 bh 1820 Add an optional EPSG code to the projection objects and extend the
4722     .proj file format accordingly.
4723    
4724     * Resources/XML/projfile.dtd (element projection): Add epsg
4725     attribute
4726    
4727     * Thuban/Model/proj.py (Projection.__init__): New parameter and
4728     instance variable epsg. Update doc-string
4729     (Projection.EPSGCode, Projection.Label): New methods to provide
4730     access to EPSG code and a label for use in dialogs
4731    
4732     * Thuban/Model/resource.py (ProjFileReader.start_projection)
4733     (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
4734     Handle the epsg code attribute when reading or writing proj files
4735    
4736     * Thuban/UI/projdialog.py (ProjFrame._OnSave)
4737     (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
4738     (ProjFrame.__FillAvailList): Use the projection's Label method to
4739     get the string for the list box
4740    
4741     * test/test_proj.py (TestProjection.test_label)
4742     (TestProjection.test_label_epsg)
4743     (TestProjection.test_epsgcode_for_non_epsg_projection)
4744     (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
4745     for the label and EPSGCode methods
4746     (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
4747     (WriteProjFileTests.test_write_empty_file): Create the ProjFile
4748     objects in the test cases and put the expected contents into the
4749     test case methods too. Update doTestWrite accordingly
4750     (TestLoadingProjFile)
4751     (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
4752     read tests from TestProjFile.
4753     (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
4754     tests are now in the new classes.
4755     (sample_projfile, sample_projfile_data)
4756     (sample_projfile2, sample_projfile_data2): Removed. Not used
4757     anymore.
4758     (TestProjFile.test_read_unreadable_file): No need to reset the
4759     permissions at the end anymore since we use a unique filename
4760    
4761     2003-10-13 Bernhard Herzog <[email protected]>
4762    
4763 bh 1814 * test/test_proj.py: Some more refactoring of the test cases
4764     (ProjFileTest): New base class for the proj file tests.
4765     (TestProjFile): Derive from ProjFileTest
4766     (TestProjFile.test_read_unreadable_file)
4767     (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
4768     the new filename method to get a unique filename
4769     (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
4770     (WriteProjFileTests): New class for proj file write tests.
4771     Contains the write test that were in TestProjFile originally.
4772    
4773     2003-10-13 Bernhard Herzog <[email protected]>
4774    
4775 bh 1812 * test/test_proj.py (TestProjFile.testRead)
4776     (TestProjFile.test_read_non_existing_file)
4777     (TestProjFile.test_read_unreadable_file)
4778     (TestProjFile.test_read_empty_file): Split into several methods.
4779    
4780 bh 1805 2003-10-10 Bernhard Herzog <[email protected]>
4781    
4782 bh 1810 * Thuban/UI/sizers.py: New file with custom sizers.
4783    
4784     * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
4785     all projection type specific panels and put them into a
4786     NotebookLikeSizer. This way the dialog doesn't change its size
4787     when a different projection is selected
4788     (ProjFrame.__init__): Rename projection_panels
4789     projection_panel_defs and reuse projection_panels for a list of
4790     the instantiated panels.
4791     (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
4792     (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
4793     the panels
4794     (UnknownProjPanel._DoLayout): Place the newlines in the message
4795     differently to make the panel narrower.
4796     (TMPanel._DoLayout): Layout the parameters in one column.
4797    
4798     2003-10-10 Bernhard Herzog <[email protected]>
4799    
4800 bh 1807 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
4801     that contains all the setup for the dialog's widgets, layout and
4802     event handling.
4803     (__): Call build_dialog to build the dialog.
4804     (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
4805     Their functionality is now in build_dialog
4806     (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
4807     (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
4808     (ProjFrame.__DoOnProjChoice): Small updates due to slightly
4809     different widget names and hierarchy introduced with build_dialog.
4810    
4811     2003-10-10 Bernhard Herzog <[email protected]>
4812    
4813 bh 1805 * README: Fix typo.
4814    
4815 bh 1803 2003-10-09 Bernhard Herzog <[email protected]>
4816    
4817     * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
4818     projection is already in the list. This is *a lot* faster when
4819     loading files with hundreds of projections since it saves a linear
4820     search. OTOH this will allow adding the same projection to the
4821     user.proj file multiple times in the projection dialog but we'll
4822     deal with that later
4823    
4824 jan 1801 2003-10-09 Jan-Oliver Wagner <[email protected]>
4825    
4826     * devtools: New. Directory for developer tools that are not intended
4827     for the regular user.
4828    
4829     * devtools/create_epsg.py: New. Convert the epsg file of proj into
4830     a python .proj file.
4831    
4832 bh 1799 2003-10-09 Bernhard Herzog <[email protected]>
4833    
4834     * test/test_proj.py
4835     (TestProjection.test_get_parameter_without_equals_sign): New. Test
4836     whether GetParameter handles parameters without "=" sign correctly
4837    
4838     * Thuban/Model/proj.py (Projection.GetParameter): Handle
4839     parameters that do not contain a "=". Update the doc-string
4840    
4841 bh 1794 2003-10-08 Bernhard Herzog <[email protected]>
4842    
4843 bh 1796 * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
4844     length limit on the projname text control
4845    
4846     2003-10-08 Bernhard Herzog <[email protected]>
4847    
4848 bh 1794 * test/test_proj.py (TestProjection.test_get_projection_units_geo)
4849     (TestProjection.test_get_projection_units_normal): New. Tests for
4850     the Projection.GetProjectedUnits method
4851    
4852 jan 1792 2003-10-08 Jan-Oliver Wagner <[email protected]>
4853    
4854     * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
4855     Added missing 'val' parameter.
4856    
4857 bh 1788 2003-10-08 Bernhard Herzog <[email protected]>
4858    
4859 bh 1790 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
4860     projection type of the currently selected projection is not known,
4861     i.e. there's no panel for it, use the UnknownProjPanel
4862     (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
4863     the actual replacing of the proj panel into the new method
4864     _show_proj_panel.
4865     (UnknownProjPanel): Add doc-string.
4866     (UnknownProjPanel._DoLayout): Insert a newline into the text so
4867     that the panel is not so wide.
4868    
4869     2003-10-08 Bernhard Herzog <[email protected]>
4870    
4871 bh 1788 * Thuban/Model/resource.py (read_proj_file): Return the warnings
4872     too. Update the doc-string
4873     (get_proj_files): Removed. It wasn't used anywhere
4874     (get_system_proj_files, get_system_proj_file): Rename to
4875     get_system_proj_file and return the ProjFile object and not a list
4876     of ProjFile objects. Update the callers.
4877     (get_user_proj_files, get_user_proj_file): Rename to
4878     get_user_proj_file return the ProjFile object and not a list of
4879     ProjFile objects. Update the callers.
4880     (ProjFileReader.__init__): New instance variable for the warnings.
4881     Rename the __pf ivar to projfile. Update the methods referring to
4882     __pf
4883     (ProjFileReader.end_projection): Catch any errors raised when
4884     instantiating the projection and record that as an error. The
4885     projection will not be in the final ProjFile object.
4886     (ProjFileReader.GetWarnings): New method to return the warnings.
4887    
4888     * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
4889     show the warnings from the projfile reader
4890     (ProjFrame._OnImport): Deal with any warnings returned by
4891     read_proj_file
4892     (ProjFrame.__FillAvailList): Deal with any warnings returned by
4893     get_system_proj_file or get_user_proj_file.
4894    
4895     * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
4896     (TestProjFileWithInvalidParameters.file_contents): New test cases
4897     to test whether read_proj_file handles invalid projection
4898     parameters correctly
4899     (TestProjFile.test_get_system_proj_file): New. Simple test for
4900     resource.get_system_proj_file
4901    
4902 bh 1785 2003-10-07 Bernhard Herzog <[email protected]>
4903    
4904     * test/test_derivedshapestore.py
4905     (TestDerivedShapeStoreExceptions.tearDown): Clear the session
4906     properly so that the temporary directories get deleted correctly
4907    
4908 bh 1773 2003-10-06 Bernhard Herzog <[email protected]>
4909    
4910 bh 1783 Handle the title changes in a proper MVC way.
4911    
4912     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
4913     canvas' TITLE_CHANGED messages
4914     (MainWindow.update_title): New. Update the main window's title
4915     (MainWindow.__SetTitle): Removed. Use update_title instead.
4916     (MainWindow.SetMap): Use update_title instead of __SetTitle
4917     (MainWindow.RenameMap): Do change the window title explicitly
4918     here. That's handled in a proper MVC way now.
4919     (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
4920     messages
4921    
4922     * Thuban/Lib/connector.py (Conduit): New class to help classes
4923     that forward messages
4924    
4925     * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
4926     (ViewPort): Derive from Conduit instead of Publisher
4927     (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
4928     when calling the inherited versions
4929     (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
4930     methods to subscribe and unsubscribe map messages
4931     (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
4932     handle the map subscriptions
4933     (ViewPort.Map, ViewPort.map_projection_changed)
4934     (ViewPort.layer_projection_changed): Add or update doc-strings
4935    
4936     * test/test_connector.py (TestPublisher.test_issue_simple): Fix
4937     typo
4938     (MyConduit): Helper class for the Conduit test.
4939     (TestConduit): Test cases for Conduit
4940    
4941     * test/test_connector.py: Use support.run_tests as main.
4942    
4943     * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
4944     the TITLE_CHANGED messages
4945     (ViewPortTest.test_forwarding_title_changed): New test to check
4946     whether the viewport forwards the map's TITLE_CHANGED messages
4947     (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
4948     after the port's because the latter may require a still functional
4949     map.
4950    
4951     2003-10-06 Bernhard Herzog <[email protected]>
4952    
4953 bh 1777 * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
4954     doc-string
4955    
4956     2003-10-06 Bernhard Herzog <[email protected]>
4957    
4958 bh 1775 * test/test_viewport.py (ViewPortTest.setUp)
4959     (SimpleViewPortTest.test_init_with_size): Move the test for the
4960     initial size as a constructor parameter from ViewPortTest.setUp
4961     method to a new separate test in SimpleViewPortTest.
4962    
4963     2003-10-06 Bernhard Herzog <[email protected]>
4964    
4965 bh 1773 * test/test_viewport.py (MockView): New class derived from
4966     ViewPort with a mock implementation of GetTextExtent to be used in
4967     the test cases
4968     (ViewPortTest.setUp): Use MockView instead of ViewPort
4969    
4970     * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
4971     into what would be a "pure virtual function" in C++: always raise
4972     NotImplementedError. Mock implementations for test cases don't
4973     belong into the real code
4974    
4975 bh 1770 2003-10-02 Bernhard Herzog <[email protected]>
4976    
4977     * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
4978     close the dbf file we create so that it's contents have been
4979     written properly.
4980    
4981     * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
4982     libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
4983     Update to shapelib 1.2.10
4984    
4985 jan 1767 2003-10-01 Jan-Oliver Wagner <[email protected]>
4986    
4987     * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
4988     it annoys lintian which warns about these files not being
4989     executable. The #! isn't necessary here since if you absolutely
4990     must execute them you can always say "python <filename>".
4991    
4992 bh 1757 2003-09-26 Bernhard Herzog <[email protected]>
4993    
4994 bh 1760 * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
4995     only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
4996     is ported to a newer the import will fail, so it should be noticed
4997     immediately that this function is gone.
4998     Fixes RT#1919
4999    
5000     2003-09-26 Bernhard Herzog <[email protected]>
5001    
5002 bh 1757 Add a DTD for the projection files and make thuban write valid
5003     projection files
5004    
5005     * Resources/XML/projfile.dtd: New. DTD for thuban's projection
5006     files
5007    
5008     * Thuban/Model/resource.py (ProjFileSaver.write): Use
5009     'projectionlist' as the name in the document type declaration so
5010     that it matches the element type of the root element.
5011    
5012     * test/test_proj.py (sample_projfile, sample_projfile2): Use
5013     'projectionlist' as the name in the document type declaration just
5014     as it is done now in the files thuban would write
5015     (sample_projfile, sample_projfile_data): Fix spelling of
5016     "Mercator"
5017     (TestProjFile.doTestWrite): Validate the written and the expected
5018     XML data
5019     (TestProjFile): Derive from ValidationTest so that we can run xml
5020     validation tests
5021    
5022 bh 1751 2003-09-24 Bernhard Herzog <[email protected]>
5023    
5024     * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
5025     modify the list returned by map.Layers() in place since it is the
5026     actual list of layers used by the map.
5027    
5028 jan 1745 2003-09-23 Jan-Oliver Wagner <[email protected]>
5029    
5030     * Doc/manual/thuban-manual.xml: Added subsection to chapter
5031     Extensions to describe the extensions coming with the Thuban
5032     standard package (gns2shp and importAPR).
5033    
5034 bh 1743 2003-09-23 Bernhard Herzog <[email protected]>
5035    
5036     * libraries/thuban/wxproj.cpp (project_point): if there's an
5037     inverse but no forward projection, convert to degrees after
5038     applying the inverse projection. Fixes RT#2096
5039    
5040     * test/test_wxproj.py: New. Test cases for wxproj.so. One test
5041     implicitly tests for the fix to RT#2096
5042    
5043     * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
5044     Check that the sequences have the same lengths
5045    
5046     * Resources/Projections/defaults.proj (Geographic projection): Use
5047     a much more precise value for the to_meter attribute.
5048    
5049 bh 1737 2003-09-22 Bernhard Herzog <[email protected]>
5050    
5051     * test/support.py (initthuban): Make sure to unset the LANG env.
5052     var. so that tests that compare translated strings work. Solves RT
5053     #2094
5054    
5055 jan 1730 2003-09-22 Jan-Oliver Wagner <[email protected]>
5056    
5057 jan 1735 Small improvement of APR import.
5058    
5059     * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
5060     Added tests for text-ranges.
5061    
5062     * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
5063     returns a string object if the range is based on text.
5064    
5065     * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
5066     range retrieval.
5067    
5068     2003-09-22 Jan-Oliver Wagner <[email protected]>
5069    
5070 jan 1730 Initial version of the importAPR extension which is in
5071     experimental state.
5072    
5073     * /Extensions/importAPR/, /Extensions/importAPR/samples/,
5074     /Extensions/importAPR/test/: New directories.
5075    
5076     * /Extensions/importAPR/samples/README: New: Howto load the samples.
5077    
5078     * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
5079     file which refers to the Thuban Iceland demo data.
5080    
5081     * /Extensions/importAPR/test/README: New: Howto execute the tests.
5082    
5083     * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
5084    
5085     * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
5086     as in '.apr'-files.
5087    
5088     * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
5089     ODB Objects as in '.apr', '.avl' and other files.
5090    
5091     * /Extensions/importAPR/__init__.py: New: Init to make this
5092     directory a package.
5093    
5094     * /Extensions/importAPR/importAPR.py: New: Import a ArcView
5095     project file (.apr) and convert it to Thuban.
5096    
5097     2003-09-22 Jan-Oliver Wagner <[email protected]>
5098    
5099     * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
5100    
5101 jan 1720 2003-09-19 Jan-Oliver Wagner <[email protected]>
5102    
5103     * Doc/manual/thuban-manual.xml: Extended section 'Installation'
5104     with description on RPM installation and RPM binary package
5105     creation.
5106    
5107 bh 1718 2003-09-18 Bernhard Herzog <[email protected]>
5108    
5109     * setup.py (data_files): Only add the mo files if the Locales
5110     directory actually exists, so that setup.py works with a fresh CVS
5111     checkout
5112    
5113 jan 1716 2003-09-12 Jan-Oliver Wagner <[email protected]>
5114    
5115     * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
5116     in viewport, not anymore in view
5117    
5118 jan 1714 2003-09-04 Jan-Oliver Wagner <[email protected]>
5119    
5120     Introducing first Extension (gns2shp).
5121    
5122     * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
5123    
5124     * Extensions/__init__.py: New. init to make this dir a package.
5125    
5126     * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
5127    
5128     * Extensions/gns2shp/test/README: New. some info on this test directory.
5129    
5130     * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
5131    
5132     * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
5133     of Shapefile from GNS text file format
5134    
5135 jan 1705 2003-09-03 Jan-Oliver Wagner <[email protected]>
5136    
5137 jan 1707 Fix/workaround for bug #2019:
5138     https://intevation.de/rt/webrt?serial_num=2019
5139    
5140     * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
5141     (IdentifyView.__init__): Added another button that allows to
5142     stop the identify mode.
5143     (IdentifyView.OnStop): New. Stops the identify mode.
5144    
5145     2003-09-03 Jan-Oliver Wagner <[email protected]>
5146    
5147 jan 1705 Introducing a new exception dialog that allows to exit the
5148     application immediately.
5149     This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
5150    
5151     * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
5152    
5153     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
5154     Made strings available to translations. Exchanged the simple
5155     ScrolledMessageDialog by the new ExceptionDialog.
5156    
5157 bh 1694 2003-09-01 Bernhard Herzog <[email protected]>
5158    
5159 bh 1701 * NEWS: New. Summary of changes and release notes.
5160    
5161     * MANIFEST.in: Add NEWS
5162    
5163     2003-09-01 Bernhard Herzog <[email protected]>
5164    
5165 bh 1699 * MANIFEST.in: Correct the include statement for the mo-files and
5166     include the documentation too.
5167    
5168     * setup.py (data_files): Add the .mo files
5169     (setup call): Up to version 0.9.0
5170    
5171     2003-09-01 Bernhard Herzog <[email protected]>
5172    
5173 bh 1696 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
5174     parameter list to just parent and session
5175     (ChooseDBTableDialog.__set_properties): Removed. Setting the
5176     selection of empty list boxes is not allowed (and produces C++
5177     assertion errors) and the rest of the setup is better done in
5178     __init__ anyway.
5179     (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
5180     (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
5181     builtins True/False for booleans to avoid warnings from wxPython
5182    
5183     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
5184     ChooseDBTableDialog constructor parameters.
5185    
5186     2003-09-01 Bernhard Herzog <[email protected]>
5187    
5188 bh 1694 * Thuban/Model/postgisdb.py
5189     (PostGISTable): Extend doc-string
5190     (PostGISTable._fetch_table_information): Set the column index
5191     correctly, pretending ignored columns don't exist.
5192    
5193     * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
5194     for postgis tables with data types not yet supported by thuban.
5195    
5196 bh 1692 2003-08-29 Bernhard Herzog <[email protected]>
5197    
5198     * HOWTO-Release: Tweak item about running the tests.
5199    
5200 jan 1690 2003-08-29 Jan-Oliver Wagner <[email protected]>
5201    
5202     * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
5203    
5204 bh 1688 2003-08-29 Bernhard Herzog <[email protected]>
5205    
5206     Add some missing parameters to projections. Proj complains about
5207     them on windows but for some reason not on Linux.
5208    
5209     * test/test_save.py (SaveSessionTest.testLayerProjection): Add
5210     missing required projection parameters
5211    
5212     * test/test_proj.py (TestProjFile.test): Add missing required
5213     projection parameters
5214    
5215     * test/test_load_0_8.py (TestLayerProjection.file_contents)
5216     (TestLayerProjection.test): Add missing required projection
5217     parameters and tests for them
5218    
5219     * test/test_load.py (TestLayerProjection.file_contents)
5220     (TestLayerProjection.test): Add missing required projection
5221     parameters and tests for them
5222    
5223     * test/test_layer.py (TestLayer.test_base_layer): Add missing
5224     required projection parameters
5225    
5226     2003-08-29 Bernhard Herzog <[email protected]>
5227    
5228     * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
5229     access the pj_errno because directly accessing pj_errno doesn't
5230     work on windows if the proj library is in a DLL
5231    
5232     * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
5233    
5234 bh 1672 2003-08-28 Bernhard Herzog <[email protected]>
5235    
5236 bh 1685 * test/test_proj.py: Import things from Thuban after calling
5237     initthuban
5238    
5239     * test/test_load.py (LoadSessionTest.filenames): New class
5240     variable with the filename attributes to normalize
5241     (LoadSessionTest.check_format): Pass self.filenames to
5242     sax_eventlist to normalize the filename attributes
5243    
5244     * test/xmlsupport.py: Add cvs keywords
5245     (SaxEventLister.__init__): New parameter filenames which indicates
5246     attributes that contain filenames
5247     (SaxEventLister.startElementNS): Normalize the filename attributes
5248     with os.path.normpath
5249     (sax_eventlist): New parameter filenames to pass through to
5250     SaxEventLister
5251    
5252     * test/test_derivedshapestore.py: Make this file callable as a
5253     program to execute the tests
5254     (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
5255     the session to self.session so that it gets destroyed properly
5256    
5257     * test/test_layer.py (TestLayer.tearDown): Call the session's
5258     Destroy method
5259    
5260     * test/test_map.py (TestMapBase.tearDown): Destroy self.session
5261     too if it exists
5262     (TestMapAddLayer.test_add_layer): Bind the session to self.session
5263     so that it gets destroyed properly
5264    
5265     * test/postgissupport.py (reason_for_not_running_tests): Add a
5266     test for the existence of popen2.Popen4.
5267    
5268     * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
5269     reliable way to destroy the sessions created in the test cases
5270     (SaveSessionTest.test_dbf_table): Bind the session to self.session
5271     so that it gets destroyed properly
5272     (SaveSessionTest.testLayerProjection): Bind the session to
5273     self.session so that it gets destroyed properly
5274    
5275     * test/test_session.py (UnreferencedTablesTests.tearDown): Make
5276     sure that the session is destroyed properly
5277    
5278     * test/test_shapefilestore.py: Make this callable as a program to
5279     execute the tests
5280    
5281     * test/test_scalebar.py: Remove unnecessary import of _ from
5282     Thuban
5283    
5284     * test/support.py (print_garbage_information): Call initthuban
5285     here because it may be called indirectly from test cases that test
5286     test support modules which do not use anything from thuban itself
5287     (ThubanTestProgram.runTests): Remove unnecessary debug print
5288    
5289     2003-08-28 Bernhard Herzog <[email protected]>
5290    
5291 bh 1672 * Thuban/version.py (longversion): Update to 0.9
5292    
5293     * Thuban/UI/mainwindow.py: Remove some unused imports
5294    
5295     * README: Add section about required additional software. Add date
5296     and revision CVS keywords
5297    
5298     * HOWTO-Release: Add item about the translations. Add date and
5299     revision CVs keywords and change formatting to match README a bit
5300     better
5301    
5302     * po/de.po: Update for 0.9
5303    
5304     * test/README: Tweak the wording a little because many tests are
5305     not really unittest.
5306    
5307 bh 1663 2003-08-27 Bernhard Herzog <[email protected]>
5308    
5309 bh 1665 As preparation for the 0.9 release, switch thuban files to a
5310     non-dev namespace
5311    
5312     * Thuban/Model/save.py (SessionSaver.write_session): Write files
5313     with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
5314     namespace
5315    
5316     * Thuban/Model/load.py (SessionLoader.__init__): Accept the
5317     http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
5318    
5319     * test/test_save.py (SaveSessionTest.dtd)
5320     (SaveSessionTest.testEmptySession)
5321     (SaveSessionTest.testSingleLayer)
5322     (SaveSessionTest.testLayerProjection)
5323     (SaveSessionTest.testRasterLayer)
5324     (SaveSessionTest.testClassifiedLayer)
5325     (SaveSessionTest.test_dbf_table)
5326     (SaveSessionTest.test_joined_table)
5327     (SaveSessionTest.test_save_postgis): Update for new namespace
5328    
5329     * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
5330     (TestLayerVisibility.file_contents, TestLabels.file_contents)
5331     (TestLayerProjection.file_contents)
5332     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
5333     (TestPostGISLayer.file_contents)
5334     (TestPostGISLayerPassword.file_contents)
5335     (TestLoadError.file_contents, TestLoadError.test): Update for new
5336     namespace
5337    
5338     2003-08-27 Bernhard Herzog <[email protected]>
5339    
5340 bh 1663 Make the table interface distinguish between row ids (an integer
5341     that uniquely identifies a row) and row ordinals (a simple row
5342     count from 0 to NumRows() - 1)
5343    
5344     * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
5345     (PostGISTable.RowOrdinalToId): New methods to conver between row
5346     ids and row ordinals
5347     (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
5348     parameter row_is_ordinal to indicate whether the row parameter is
5349     the row id or the ordinal
5350    
5351     * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
5352     (TransientTableBase.RowOrdinalToId)
5353     (AutoTransientTable.RowIdToOrdinal)
5354     (AutoTransientTable.RowOrdinalToId): Same new methods as in
5355     PostGISTable.
5356     (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
5357     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
5358     Same new parameter as in PostGISTable.
5359    
5360     * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
5361     (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
5362     (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
5363     (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
5364     (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
5365     parameter as in PostGISTable.
5366    
5367     * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
5368     (DataTable.RowOrdinalToId): New methods to convert between row ids
5369     and row ordinals.
5370     (TableGrid.SelectRowById): New method to select a row based on its
5371     ID as opposed to its ordinal
5372     (DataTable.GetValue, TableGrid.OnRangeSelect)
5373     (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
5374     (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
5375     (LayerTableFrame.__init__): Convert between row ids and row
5376     ordinals as appropriate
5377    
5378     * test/postgissupport.py (PostGISDatabase.__init__): Add
5379     doc-string.
5380     (PostGISDatabase.initdb): The optional third item in a tuple in
5381     tables is now a (key, value) list with additional arguments to
5382     pass to upload_shapefile
5383     (upload_shapefile): New parameter gid_offset to allow gids that
5384     are not the same as the shapeids in the shapefile
5385     (PostgreSQLServer.get_default_static_data_db): Use the new
5386     gid_offset to make the gids in landmarks 1000 higher than the
5387     shapeids in the shapefile
5388    
5389     * test/test_viewport.py
5390     (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
5391     new shapeids in the landmarks table
5392    
5393     * test/test_transientdb.py
5394     (TestTransientTable.run_iceland_political_tests)
5395     (TestTransientTable.test_transient_joined_table): Add tests for
5396     the new table methods and new keywords arguments.
5397    
5398     * test/test_postgis_db.py
5399     (TestPostGISTable.test_read_row_as_dict_row_count_mode)
5400     (TestPostGISTable.test_read_value_row_count_mode)
5401     (TestPostGISTable.test_row_id_to_ordinal)
5402     (TestPostGISTable.test_row_oridnal_to_id): New test for the new
5403     table methods and the new arguments
5404     (TestPostGISShapestorePoint.test_shapes_in_region)
5405     (TestPostGISShapestorePoint.test_shape_raw_data)
5406     (TestPostGISShapestorePoint.test_shape_points)
5407     (TestPostGISShapestorePoint.test_shape_shapeid)
5408     (TestPostGISShapestorePoint.test_all_shapes)
5409     (TestPostGISTable.test_simple_query)
5410     (TestPostGISTable.test_simple_query)
5411     (TestPostGISTable.test_simple_query)
5412     (TestPostGISTable.test_read_value)
5413     (TestPostGISTable.test_read_row_as_dict): Adapt to the new
5414     shapeids in the landmarks table
5415    
5416     * test/test_memory_table.py
5417     (TestMemoryTable.test_read_row_as_dict_row_count_mode)
5418     (TestMemoryTable.test_read_value_row_count_mode)
5419     (TestMemoryTable.test_row_id_to_ordinal)
5420     (TestMemoryTable.test_row_oridnal_to_id): New test for the new
5421     table methods and the new arguments
5422    
5423     * test/test_dbf_table.py
5424     (TestDBFTable.test_read_row_as_dict_row_count_mode)
5425     (TestDBFTable.test_read_value_row_count_mode)
5426     (TestDBFTable.test_row_id_to_ordinal)
5427     (TestDBFTable.test_row_oridnal_to_id): New test for the new table
5428     methods and the new arguments
5429    
5430 bh 1659 2003-08-26 Bernhard Herzog <[email protected]>
5431    
5432 bh 1661 * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
5433     more postgis specific but much faster method to get the bounding
5434     box
5435    
5436     2003-08-26 Bernhard Herzog <[email protected]>
5437    
5438 bh 1659 * Thuban/Model/postgisdb.py (PostGISTable.Title)
5439     (PostGISShapeStore.AllShapes): Add these missing methods.
5440     (PostGISShapeStore.ShapesInRegion): No need to raise
5441     StopIteration. We can simply return
5442    
5443     * test/test_postgis_db.py (TestPostGISTable.test_title)
5444     (TestPostGISShapestorePoint.test_all_shapes): New tests for the
5445     new methods
5446    
5447 bh 1643 2003-08-25 Bernhard Herzog <[email protected]>
5448    
5449 bh 1657 * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
5450    
5451     * test/test_postgis_db.py (PolygonTests): New class containing
5452     those tests from TestPostGISShapestorePolygon that can also be
5453     used to test MUTLIPOLYGON tables
5454     (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
5455     so derive from that
5456     (TestPostGISShapestoreMultiPolygon): New class with tests for
5457     MUTLIPOLYGON tables
5458    
5459     * test/postgissupport.py (PostGISDatabase.initdb): Allow the
5460     tables argument to have tuples with three items to override the
5461     WKT type used.
5462     (PostgreSQLServer.get_default_static_data_db): Use the above to
5463     create a polygon table with MUTLIPOLYGONs
5464     (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
5465     (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
5466     coords_to*
5467     (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
5468     (wkt_converter): New. Map WKT types to converters
5469     (upload_shapefile): New parameter force_wkt_type to use a
5470     different WKT type than the default
5471    
5472     2003-08-25 Bernhard Herzog <[email protected]>
5473    
5474 bh 1655 * Thuban/UI/application.py
5475     (ThubanApplication.run_db_param_dialog): New. Suitable as a
5476     db_connection_callback. Main difference is that the dialog run
5477     from this method doesn't have a parent so it can be used even when
5478     there is no main window
5479     (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
5480     no db_connection_callback was given. This way the dialog pops up
5481     even when the .thuban file was given as a command line parameter.
5482    
5483     2003-08-25 Bernhard Herzog <[email protected]>
5484    
5485 bh 1653 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
5486     before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
5487     which leads to an effectively frozen X session because the user
5488     can only interact with the dialog but the mouse is still grabbed
5489     by the canvas.
5490     Also, call the tool's Hide method before MouseLeftUp because
5491     MouseLeftUp may change the tool's coordinates.
5492    
5493     2003-08-25 Bernhard Herzog <[email protected]>
5494    
5495 bh 1651 * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
5496     LoadCancelled exceptions and handle them by returning immediately.
5497    
5498     2003-08-25 Bernhard Herzog <[email protected]>
5499    
5500 bh 1649 GUI part of loading sessions with postgis connections which may
5501     require user interaction to get passwords or updated parameters
5502    
5503     * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
5504     bit nucer and be more generic.
5505     (DBFrame.OnAdd): Adapt to new DBDialog interface
5506    
5507     * Thuban/UI/application.py (ThubanApplication.OpenSession): New
5508     optional parameter db_connection_callback which is passed to
5509     load_session.
5510    
5511     * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
5512     Suitable as a db_connection_callback
5513     (MainWindow.OpenSession): Use self.run_db_param_dialog as the
5514     db_connection_callback of the application's OpenSession method
5515    
5516    
5517     2003-08-25 Bernhard Herzog <[email protected]>
5518    
5519 bh 1647 Basic loading of sessions containing postgis connections:
5520    
5521     * Thuban/Model/load.py (LoadError): Add doc-string
5522     (LoadCancelled): New exception class to indicate a cancelled load
5523     (SessionLoader.__init__): Add the db_connection_callback parameter
5524     which will be used by the loader to get updated parameters and a
5525     password for a database connection
5526     (SessionLoader.__init__): Add the new XML elements to the
5527     dispatchers dictionary
5528     (SessionLoader.check_attrs): Two new conversions, ascii to convert
5529     to a byte-string object and idref as a generic id reference
5530     (SessionLoader.start_dbconnection)
5531     (SessionLoader.start_dbshapesource): New. Handlers for the new XML
5532     elements
5533     (load_session): Add the db_connection_callback to pass through the
5534     SessionLoader
5535    
5536     * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
5537     New classes to test loading of sessions with postgis database
5538     connections.
5539    
5540     2003-08-25 Bernhard Herzog <[email protected]>
5541    
5542 bh 1645 * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
5543     replace it and the comment with __BuildDate__ by the Source: and
5544     Id: cvs keywords as used in the other files.
5545    
5546     2003-08-25 Bernhard Herzog <[email protected]>
5547    
5548 bh 1643 * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
5549     LoadError when a required attribute is missing. The code used to
5550     be commented out for some reason, but probably should have been
5551     active.
5552    
5553     * test/test_load.py (TestLoadError.test): Test the message in the
5554     LoadError too to make sure it really is about the missing
5555     attribute
5556    
5557 bh 1632 2003-08-22 Bernhard Herzog <[email protected]>
5558 bh 1641
5559     * test/test_save.py (SaveSessionTest.test_dbf_table)
5560     (SaveSessionTest.test_joined_table): Add XML validation tests.
5561    
5562     2003-08-22 Bernhard Herzog <[email protected]>
5563    
5564 bh 1639 Implement saving a session with a postgis connection
5565 bh 1632
5566 bh 1639 * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
5567     elements for database connections and shapestores using db
5568     connections
5569     (session): Add the dbconnections to the content model
5570    
5571     * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
5572     Write the db connections
5573     (SessionSaver.write_session): Call write_db_connections to write
5574     the connection before the data sources
5575     (SessionSaver.write_data_containers): Handle postgis shapestores
5576    
5577     * test/test_save.py (SaveSessionTest.thubanids)
5578     (SaveSessionTest.thubanidrefs): Update for new DTD
5579     (SaveSessionTest.test_save_postgis): New. Test saving a session
5580     with postgis connections
5581    
5582     * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
5583     (PostGISTable.TableName): New accessor methods for the connection
5584     and table name
5585    
5586     * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
5587     (TestPostGISTable.test_dbname): New methods to test the new
5588     PostGISConnection methods
5589    
5590     2003-08-22 Bernhard Herzog <[email protected]>
5591    
5592 bh 1637 * Thuban/Model/postgisdb.py (ConnectionError): New exception class
5593     for exceptions occurring when establishing a Database connection
5594     (PostGISConnection.connect): Catch psycopg.OperationalError during
5595     connects and raise ConnectionError.
5596    
5597     * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
5598     tests for database exceptions
5599    
5600     2003-08-22 Bernhard Herzog <[email protected]>
5601    
5602 bh 1635 Prepare the test suite for tests with required authentication
5603    
5604     * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
5605     variables with two predefined users/passwords, one for the admin
5606     and one for a non-privileged user.
5607     (PostgreSQLServer.createdb): Pass the admin name to initdb and add
5608     the non-privileged user to the database and set the admin password
5609     (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
5610     Better error reporting
5611     (PostgreSQLServer.connection_params)
5612     (PostgreSQLServer.connection_string): New methods to return
5613     information about how to connect to the server
5614     (PostgreSQLServer.execute_sql): New. Convenience method to execute
5615     SQL statements
5616     (PostgreSQLServer.require_authentication): Toggle whether the
5617     server requires authentication
5618     (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
5619     Add or alter users
5620     (PostGISDatabase.initdb): Pass the admin name one the
5621     subprocesses' command lines. Grant select rights on
5622     geometry_columns to everybody.
5623     (upload_shapefile): Use the admin name and password when
5624     connecting. Grant select rights on the new table to everybody.
5625    
5626     * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
5627     server's new methods to get the connection parameters.
5628    
5629     * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
5630     (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
5631     server's new methods to get the connection parameters.
5632    
5633     * test/test_postgis_db.py
5634     (TestPostGISConnection.test_gis_tables_empty)
5635     (TestPostGISConnection.test_gis_tables_non_empty)
5636     (PostGISStaticTests.setUp): Use the server's new methods to get
5637     the connection parameters.
5638    
5639     2003-08-22 Bernhard Herzog <[email protected]>
5640    
5641 bh 1632 * Thuban/UI/about.py (About.__init__): Add the psycopg version.
5642    
5643     * Thuban/version.py: Add psycopg version
5644    
5645     * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
5646     version of the psycopg module
5647    
5648     2003-08-22 Bernhard Herzog <[email protected]>
5649    
5650     * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
5651     (DBFrame.OnEdit): Removed because it's not used and wouldn't work
5652     at the moment. The functionality should probably be implemented
5653     some time, though.
5654 bh 1633 (DBFrame.OnRemove): Display a message if the connection can't be
5655     removed because it's still in use.
5656 bh 1632
5657 jan 1629 2003-08-22 Jan-Oliver Wagner <[email protected]>
5658    
5659     * Thuban/UI/about.py (About.__init__): split up the huge about
5660     text into elements/lists for easier translation. This fixes bug
5661     https://intevation.de/rt/webrt?serial_num=2058
5662     Also, made some forgotten string available for the i18n.
5663    
5664 bh 1627 2003-08-21 Bernhard Herzog <[email protected]>
5665    
5666     Make postgis support really optional including insensitive menu
5667     items.
5668    
5669     * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
5670     whether the postgis is supported.
5671    
5672     * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
5673     to make postgis support optional
5674    
5675     * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
5676     version of Thuban.Model.postgisdb.has_postgis_support
5677     (database_management command): Make it only sensitive if postgis
5678     is supported.
5679    
5680 jan 1623 2003-08-21 Jan-Oliver Wagner <[email protected]>
5681    
5682 jan 1626 * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
5683     (section Adding and Removing Layers): Added text and described
5684     multi-selection.
5685     (chapter Extensions): New.
5686    
5687     2003-08-21 Jan-Oliver Wagner <[email protected]>
5688    
5689 jan 1623 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
5690     settings to allow multiple files to load into the map.
5691     Also reduced selection to *.shp as a default.
5692    
5693 bh 1621 2003-08-20 Bernhard Herzog <[email protected]>
5694    
5695     Add dialogs and commands to open database connections and add
5696     database layers.
5697    
5698     * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
5699     method to open the database connection management dialog
5700     (MainWindow.AddDBLayer): New method to add a layer from a database
5701     (_has_dbconnections): New helper function to use for sensitivity
5702     (database_management command, layer_add_db command): New commands
5703     that call the above new methods.
5704     (main_menu): Add the new commands to the menu.
5705    
5706     * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
5707     (PostGISConnection.connect): Establish the actual connection in a
5708     separate method and call it in __init__. This makes it easier to
5709     override the behavior in test cases
5710     (PostGISConnection.BriefDescription): New method to return a brief
5711     description for use in dialogs.
5712    
5713     * test/test_postgis_db.py (NonConnection): DB connection that
5714     doesn't actually connect
5715     (TestBriefDescription): New class with tests for the new
5716     BriefDescription method
5717    
5718 jan 1619 2003-08-19 Jan-Oliver Wagner <[email protected]>
5719    
5720     Moved anything from extensions to libraries.
5721    
5722     * libraries: New.
5723    
5724     * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
5725    
5726     * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
5727     Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
5728     been moved here from thuban/extensions/pyprojection/
5729     See there in the Attic for the older history.
5730    
5731     * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
5732     dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
5733     shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
5734     have been moved here from thuban/extensions/pyshapelib/
5735     See there in the Attic for the older history.
5736    
5737     * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
5738     files have been moved here from thuban/extensions/shapelib/
5739     See there in the Attic for the older history.
5740    
5741     * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
5742     gdalwarp.cpp, wxproj.cpp: These files have been moved here from
5743     thuban/extensions/thuban/
5744     See there in the Attic for the older history.
5745    
5746     * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
5747    
5748     * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
5749     gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
5750    
5751     * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
5752     Moved to libraries/shapelib.
5753    
5754     * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
5755     shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
5756     ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
5757     Moved to libraries/pyshapelib.
5758    
5759     * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
5760     LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
5761     Moved to libraries/pyprojection.
5762    
5763     * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
5764    
5765     * extensions: Removed.
5766    
5767 bh 1606 2003-08-19 Bernhard Herzog <[email protected]>
5768    
5769 bh 1609 * test/test_viewport.py (ViewPortTest): We don't use the
5770     facilities of FileTestMixin so don't derive from it.
5771     (TestViewportWithPostGIS): New class with tests for using a
5772     viewport on a map with postgis layers.
5773    
5774     2003-08-19 Bernhard Herzog <[email protected]>
5775    
5776     Add the db connection management to the session.
5777    
5778     * Thuban/Model/session.py (Session.__init__): New instance
5779     variable db_connections
5780     (Session.AddDBConnection, Session.DBConnections)
5781     (Session.HasDBConnections, Session.CanRemoveDBConnection)
5782     (Session.RemoveDBConnection): New methods to manage and query the
5783     db connections managed by the session
5784     (Session.OpenDBShapeStore): New method to open a shapestore from a
5785     db connection
5786    
5787     * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
5788     messages for the db connection handling in the session
5789    
5790     * test/test_postgis_session.py: New. test cases for the session's
5791     db connection handling with postgis connections
5792    
5793     2003-08-19 Bernhard Herzog <[email protected]>
5794    
5795 bh 1606 Add very basic postgis database support and the corresponding test
5796     cases. The test cases require a PostgreSQL + postgis installation
5797     but no existing database. The database will be created
5798     automatically by the test cases
5799    
5800     * test/README: Add note about skipped tests and the requirements
5801     of the postgis tests.
5802    
5803     * Thuban/Model/postgisdb.py: New. Basic postgis database support.
5804    
5805     * test/test_postgis_db.py: New. Test cases for the postgis
5806     support.
5807    
5808     * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
5809     format
5810    
5811     * test/test_wellknowntext.py: New. Test cases for the
5812     wellknowntext parser
5813    
5814     * test/postgissupport.py: New. Support module for tests involving
5815     a postgis database.
5816    
5817     * test/support.py (execute_as_testsuite): Shut down the postmaster
5818     if it's still running after the tests
5819    
5820     * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
5821     well known text format
5822    
5823 jan 1604 2003-08-19 Jan-Oliver Wagner <[email protected]>
5824    
5825     * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
5826     message dialog.
5827    
5828 bh 1600 2003-08-18 Bernhard Herzog <[email protected]>
5829    
5830 bh 1602 * test/support.py (ThubanTestResult.printErrors): Indent the
5831     reason for the skips in the output to make it a bit more readable.
5832     (execute_as_testsuite): New helper function to run a test suite
5833     and print some more information.
5834     (run_tests): Use execute_as_testsuite to run the tests
5835    
5836     * test/runtests.py (main): Use execute_as_testsuite to run the
5837     tests
5838    
5839     2003-08-18 Bernhard Herzog <[email protected]>
5840    
5841 bh 1600 Fix some bugs in Thuban and the test suite that were uncovered by
5842     changes introduced in Python 2.3:
5843    
5844     * Thuban/Model/table.py (DBFTable.__init__): Make sure the
5845     filename is an absolute name
5846    
5847     * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
5848     filename is an absolute name
5849    
5850     * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
5851     unique filename to save to and use the correct relative filename
5852     in the expected output.
5853     (SaveSessionTest.test_dbf_table): Use the correct relative
5854     filename in the expected output.
5855    
5856     * test/test_layer.py (TestLayer.test_raster_layer): Update the
5857     test to check whether the filename is absolute.
5858    
5859 jan 1596 2003-08-18 Jan-Oliver Wagner <[email protected]>
5860    
5861     * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
5862    
5863 bh 1586 2003-08-15 Bernhard Herzog <[email protected]>
5864    
5865 bh 1594 Change the way shapes are returned by a shape store. The
5866     ShapesInRegion method returns an iterator over actual shape
5867     objects instead of a list of shape ids.
5868    
5869     * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
5870     id.
5871     (ShapefileStore.ShapesInRegion): Return an iterator over the
5872     shapes which yields shape objects instead of returning a list of
5873     shape ids
5874     (ShapefileStore.AllShapes): New. Return an iterator over all
5875     shapes in the shape store
5876     (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
5877    
5878     * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
5879     doc-string.
5880    
5881     * Thuban/UI/baserenderer.py
5882     (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
5883     layer_shapes and make it return an iterator containg shapes
5884     instead of a list of ids.
5885     (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
5886     layer_shapes() change
5887    
5888     * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
5889     (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
5890    
5891     * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
5892     changes in the ShapesInRegion return value.
5893     (ViewPort._get_hit_tester): Remove commented out code
5894    
5895     * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
5896     new return value.
5897     (SimpleShapeStore.AllShapes): New. Implement this method too.
5898    
5899     * test/test_layer.py (TestLayer.test_arc_layer)
5900     (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
5901     (TestLayer.test_point_layer_with_projection)
5902     (TestLayer.test_derived_store): Adapt to changes in the
5903     ShapesInRegion return value.
5904    
5905     * test/test_shapefilestore.py
5906     (TestShapefileStoreArc.test_shapes_in_region)
5907     (TestShapefileStorePolygon.test_shapes_in_region)
5908     (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
5909     in the ShapesInRegion return value.
5910     (TestShapefileStorePoint.test_all_shapes)
5911     (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
5912     methods
5913    
5914     * test/test_derivedshapestore.py
5915     (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
5916     the ShapesInRegion return value.
5917     (TestDerivedShapeStore.test_all_shapes)
5918     (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
5919     methods
5920    
5921     2003-08-15 Bernhard Herzog <[email protected]>
5922    
5923 bh 1592 Make the renderers deal correctly with raw vs. python level
5924     representation of shape geometries
5925    
5926     * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
5927     Return a flag useraw in addition to the callable and the parameter
5928     to indicate whether the callable can deal with the raw shape data
5929     or uses the higher level python lists of coordinates. The callable
5930     now should accept either the raw data or the return value of the
5931     shape's Points() method.
5932     (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
5933     change
5934     (BaseRenderer.projected_points): Instead of the shape id use the
5935     points list as parameter.
5936     (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
5937     (BaseRenderer.draw_point_shape): Adapt to projected_points()
5938     change and accept the points list as parameter instead of the
5939     shape id.
5940    
5941     * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
5942     the useraw flag as required by the BaseRenderer
5943     (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
5944     changes.
5945    
5946     * test/test_baserenderer.py
5947     (TestBaseRenderer.test_point_with_classification): New test for
5948     rendering a map with classifications.
5949    
5950     2003-08-15 Bernhard Herzog <[email protected]>
5951    
5952 bh 1590 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
5953     (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
5954     (ViewPort._get_hit_tester, ViewPort.projected_points)
5955     (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
5956     (ViewPort._find_label_at): Split the find_shape_at method into
5957     several new methods and use the functions in the hit-test module.
5958    
5959     * Thuban/UI/hittest.py: New module with Python-level hit-testing
5960     functions
5961    
5962     * test/test_hittest.py: New. Test for the new hittest module
5963    
5964     2003-08-15 Bernhard Herzog <[email protected]>
5965    
5966 bh 1588 * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
5967     projection to all corners of the bounding box to get a better
5968     approximation of the projected bounding box
5969    
5970     * test/test_layer.py (TestLayer.test_point_layer_with_projection):
5971     New. Test coordinate handling of a layer with a projection.
5972     Catches the bug fixed in Layer.ShapesInRegion
5973    
5974     2003-08-15 Bernhard Herzog <[email protected]>
5975    
5976 bh 1586 Move some of the mock objects in test_baserenderer into their own
5977     module so they can easily be used from other tests
5978    
5979     * test/mockgeo.py: New test helper module with some mock objects
5980     for geometry related things like shapes, shapestores and
5981     projections.
5982    
5983     * test/test_mockgeo.py: New. Tests for the new helper module
5984    
5985     * test/test_baserenderer.py: Some of the mock-objects are in
5986     mockgeo now.
5987    
5988 jan 1584 2003-08-12 Jan-Oliver Wagner <[email protected]>
5989    
5990     * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
5991    
5992 bh 1580 2003-08-12 Bernhard Herzog <[email protected]>
5993    
5994 bh 1582 * po/de.po: New. German translations by Bjoern Broscheit
5995    
5996     2003-08-12 Bernhard Herzog <[email protected]>
5997    
5998 bh 1580 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
5999     strings have to be one string literal.
6000    
6001 bh 1573 2003-08-11 Bernhard Herzog <[email protected]>
6002    
6003 bh 1578 * test/support.py (FloatComparisonMixin.assertPointListEquals):
6004     New. This method was used in various derived classes, but it's
6005     better to have it here.
6006    
6007     * test/test_shapefilestore.py
6008     (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
6009     FloatComparisonMixin
6010    
6011     * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
6012     It's now in FloatComparisonMixin
6013    
6014     * test/test_derivedshapestore.py
6015     (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
6016     in FloatComparisonMixin
6017    
6018     2003-08-11 Bernhard Herzog <[email protected]>
6019    
6020 bh 1573 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
6021     error message
6022    
6023 jan 1569 2003-08-08 Jan-Oliver Wagner <[email protected]>
6024    
6025 jan 1571 * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
6026     with version number.
6027     Changed title to reflect version number of Thuban.
6028    
6029     2003-08-08 Jan-Oliver Wagner <[email protected]>
6030    
6031 jan 1569 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
6032     the list corresponds to the "About" web page.
6033    
6034 bh 1567 2003-08-08 Bernhard Herzog <[email protected]>
6035    
6036     * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
6037     Make sure translated strings are recognized as one string literal.
6038    
6039     * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
6040     Make sure translated strings are recognized as one string literal.
6041    
6042     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
6043     translated strings are recognized as one string literal.
6044    
6045     * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
6046     sure translated strings are recognized as one string literal.
6047    
6048 bh 1556 2003-08-07 Bernhard Herzog <[email protected]>
6049    
6050 bh 1565 * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
6051     Simply delegates to the original shapestore.
6052    
6053     * test/test_derivedshapestore.py
6054     (TestDerivedShapeStore.test_raw_format): New. Test case for
6055     DerivedShapeStore.RawShapeFormat
6056    
6057     2003-08-07 Bernhard Herzog <[email protected]>
6058    
6059 bh 1561 Add raw data interface to shape objects.
6060    
6061     * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
6062     class to ShapefileShape which now holds shapefile specific
6063     information.
6064     (ShapefileShape.compute_bbox): Simplified to not cache any
6065     information. The way this method is used that shouldn't matter
6066     performance wise.
6067     (ShapefileShape.RawData): New. Return the shapeid which is the raw
6068     data format for shapes from shapefiles.
6069     (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
6070     in the shape objects returned by a shapestore. For a
6071     ShapefileStore this is always RAW_SHAPEFILE.
6072     (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
6073     method.
6074    
6075     * test/test_shapefilestore.py
6076     (TestShapefileStore.test_raw_format): New test to test the raw
6077     format feature of shapes.
6078    
6079 bh 1560 * Thuban/Model/layer.py: Remove the unused import of Shape from
6080     data. It was only there for interface compatibility but it's not
6081 bh 1561 used inside of Thuban and the generic Shape class has gone away.
6082 bh 1560
6083 bh 1563 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
6084     the raw data format and only use an optimized version of its a
6085     shapefile.
6086    
6087 bh 1561 2003-08-07 Bernhard Herzog <[email protected]>
6088    
6089 bh 1559 * test/test_baserenderer.py (SimpleShape): Shape class for the
6090     tests.
6091     (SimpleShapeStore.Shape): Use SimpleShape instead of
6092     Thuban.Model.data.Shape to make the tests independed of the coming
6093     changes.
6094    
6095     2003-08-07 Bernhard Herzog <[email protected]>
6096    
6097 bh 1556 * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
6098     (ThubanTestProgram): New classes that extend the respective
6099     classes from unittest. These new version support skipping tests
6100     under certain expected conditions. In the Thuban test suite we
6101     uses this for tests that require the optional gdal support.
6102     (run_tests): Use ThubanTestProgram instead of the unittest.main()
6103    
6104     * test/runtests.py (main): Use the new ThubanTestRunner instead of
6105     the normal one from unittest
6106    
6107     * test/test_layer.py (TestLayer.test_raster_layer): If this test
6108     is not run because gdal support isn't available report this to the
6109     runner.
6110    
6111     * test/test_baserenderer.py
6112     (TestBaseRenderer.test_raster_no_projection): Do not run this test
6113     if gdal support isn't available and report this to the runner.
6114    
6115 bh 1553 2003-08-06 Bernhard Herzog <[email protected]>
6116    
6117     Rearrange the renderers a bit, partly in preparation for changes
6118     required for the postgis merge, partly to make it more testable.
6119     Also make the representation of coordinates in Shapes more
6120     consistent.
6121    
6122     * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
6123     this class is now in BaseRenderer. This class is now practically
6124     only a specialization of BaseRenderer for rendering to an actual
6125     wx DC.
6126     (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
6127     to get the shapetype specific rendering functions.
6128    
6129     * Thuban/UI/baserenderer.py: New file with the basic rendering
6130     logic. The code in this file is completely independend of wx.
6131     (BaseRenderer): Class with the basic rendering logic
6132    
6133     * test/test_baserenderer.py: New. Test cases for BaseRenderer
6134    
6135     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
6136     error_on_redraw to guard agains endless loops and stack overflows
6137     when there's a bug in the rendering code that raises exceptions.
6138     (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
6139     rendering into a separate method _do_redraw so that error handling
6140     is a bit easier. When an exception occurs, set error_on_redraw to
6141     true. When it's true on entry to OnIdle do nothing and return
6142     immediately.
6143    
6144     * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
6145     Shape object will always have the coordinates as a list of list of
6146     coordinate pairs (tuples).
6147     (Shape.compute_bbox): Adapt to new representation.
6148    
6149     * Thuban/UI/viewport.py (ViewPort.find_shape_at)
6150     (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
6151     Shape objects.
6152    
6153     * test/test_shapefilestore.py
6154     (ShapefileStoreTests.assertFloatTuplesEqual)
6155     (ShapefileStoreTests.assertPointListEquals): Rename to
6156     assertPointListEquals and change purpose to checking equality of
6157     the lists returned by Shape.Points().
6158     (TestShapefileStoreArc.test_shape)
6159     (TestShapefileStorePolygon.test_shape)
6160     (TestShapefileStorePoint.test_shape): Use the new
6161     assertPointListEquals instead of assertFloatTuplesEqual
6162    
6163     * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
6164     (TestLayer.assertPointListEquals): Rename to assertPointListEquals
6165     and change purpose to checking equality of the lists returned by
6166     Shape.Points().
6167     (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
6168     (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
6169     (TestLayer.test_derived_store): Use the new assertPointListEquals
6170     instead of assertFloatTuplesEqual
6171    
6172     * test/test_derivedshapestore.py
6173     (TestDerivedShapeStore.assertFloatTuplesEqual)
6174     (TestDerivedShapeStore.assertPointListEquals): Rename to
6175     assertPointListEquals and change purpose to checking equality of
6176     the lists returned by Shape.Points().
6177     (TestDerivedShapeStore.test_shape): Use the new
6178     assertPointListEquals instead of assertFloatTuplesEqual
6179    
6180 jan 1550 2003-08-06 Jan-Oliver Wagner <[email protected]>
6181    
6182     * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
6183     a bounding box. A dialog is raised in case, no bounding box
6184     is found. This fixes bug #2043:
6185     https://intevation.de/rt/webrt?serial_num=2043
6186    
6187 bh 1548 2003-08-05 Bernhard Herzog <[email protected]>
6188    
6189     * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
6190     object look like a Color instantiation. Formerly it looked like a
6191     tuple.
6192    
6193     * test/test_color.py (TestColor.test_repr)
6194     (TestColor.test_equality, TestColor.test_inequality): New. test
6195     some more apects of the Color class
6196     (TestTransparent.test_repr, TestTransparent.test_hex)
6197     (TestTransparent.test_equality): New. Test cases for the
6198     Transparent object.
6199    
6200 jan 1545 2003-08-04 Jan-Oliver Wagner <[email protected]>
6201    
6202     * Doc/manual/thuban-manual.xml: a number of small improvements.
6203     The resulting file is the version submitted for GREAT-ER II.
6204    
6205 bh 1540 2003-08-01 Bernhard Herzog <[email protected]>
6206    
6207 bh 1543 * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
6208     Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
6209     Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
6210    
6211     * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
6212     (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
6213     (ThubanEndBusyCursor): Add doc-strings
6214    
6215     2003-08-01 Bernhard Herzog <[email protected]>
6216    
6217 bh 1540 First step towards PostGIS integration. More abstraction by movin
6218     more code from the layer to the shapestore. More methods of the
6219     layer are now simply delegated to the equivalent method of the
6220     shapestore. The SHAPETYPE_* constants are now in data not in
6221     layer.
6222    
6223     * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
6224     (SHAPETYPE_POINT, Shape): Move these constants and classes from
6225     layer.py to data.py
6226     (ShapefileStore.__init__): More Initialization for the new methods
6227     and functionality.
6228     (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
6229     (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
6230     (ShapefileStore.Shape): New methods that were formerly implemented
6231     in the layer.
6232     (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
6233     (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
6234     (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
6235     equivalents of the new shape methods. These versions are simply
6236     delegated to the original shapstore.
6237    
6238     * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
6239     (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
6240     (Layer.SetShapeStore): Removed the initializatin of instance
6241     variables that were needed for the stuff that's now in
6242     ShapefileStore
6243     (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
6244     (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
6245     shapestore.
6246    
6247     * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
6248     Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
6249     instead of layer.
6250    
6251     * test/test_shapefilestore.py: New. Tests for ShapefileStore.
6252    
6253     * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
6254    
6255     * test/test_layer.py: Import the SHAPETYPE_* constants from data
6256     instead of layer.
6257     (TestLayer.test_derived_store): Remove the test for the exception
6258     when instantiating the DerivedShapeStore with an incompatible
6259     table which is now in test_derivedshapestore.py. Add some more
6260     tests of the layer methods to determine whether they work for a
6261     DerivedShapeStore as well.
6262    
6263 jonathan 1534 2003-07-31 Jonathan Coles <[email protected]>
6264    
6265     * Doc/manual/thuban-manual.xml: Fix the list of required packages
6266     by just listing the name and where they can be found.
6267    
6268 frank 1532 2003-07-31 Frank Koormann <[email protected]>
6269    
6270     * Doc/manual/thuban-manual.xml:
6271     Changed the screenshot elements to figure.
6272     Changed some variablelist elements to itemizedlist.
6273     Added section on GDAL formats.
6274    
6275 jonathan 1531 2003-07-31 Jonathan Coles <[email protected]>
6276    
6277     * Doc/manual/thuban-manual.xml: Added a few sentences about
6278     the Fix Border Color option when generating classes.
6279    
6280 jonathan 1529 2003-07-30 Jonathan Coles <[email protected]>
6281    
6282     * Thuban/Model/classgen.py: Add docstrings. Rename specific
6283     Ramp instances to use lower_case_style.
6284    
6285     * Thuban/UI/classgen.py: Use renamed Ramp instances.
6286    
6287     * Thuban/UI/classifier.py: Add docstrings.
6288    
6289     * Thuban/UI/dock.py: Add docstrings.
6290    
6291     * test/test_classgen.py: Use renamed Ramp instances.
6292    
6293 bh 1522 2003-07-30 Bernhard Herzog <[email protected]>
6294    
6295 bh 1524 * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
6296     was never used in Thuban.
6297    
6298     2003-07-30 Bernhard Herzog <[email protected]>
6299    
6300 bh 1522 * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
6301     method directly instead of going through the transient_table
6302     method. This faster because transient_table may force the copy of
6303     a DBF file into the transient database and setting a table's title
6304     doesnm't affect the title of the associated transient table, so
6305     this fixes RT #2042
6306    
6307     * Thuban/UI/main.py (__version__): Don't import the already
6308     removed show_exception_dialog.
6309    
6310 jonathan 1517 2003-07-29 Jonathan Coles <[email protected]>
6311    
6312 jonathan 1519 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
6313     Put back this method and remove the equivalent function since we
6314     are setting the exception hook from within this class (OnInit).
6315    
6316     2003-07-29 Jonathan Coles <[email protected]>
6317    
6318 jonathan 1517 * Doc/manual/images/5_2_custom_ramp.png,
6319     Doc/manual/images/5_2_quantiles.png,
6320     Doc/manual/images/5_2_uniform_dist.png,
6321     Doc/manual/images/5_2_unique_values.png,
6322     Doc/manual/images/8_int_error.png: New screen shots.
6323    
6324     * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
6325     some points, and added more screen shots.
6326    
6327 bh 1512 2003-07-29 Bernhard Herzog <[email protected]>
6328    
6329 bh 1516 * Thuban/Model/data.py: Remove the now unused import of warnings
6330    
6331     2003-07-29 Bernhard Herzog <[email protected]>
6332    
6333 bh 1514 * Thuban/Model/data.py (SimpleStore): Removed. This class has been
6334     deprecated since before the 0.8 release and isn't used in Thuban
6335     itself anymore.
6336    
6337 bh 1512 * Thuban/Model/transientdb.py: Remove some unnecessary imports
6338    
6339 jonathan 1503 2003-07-29 Jonathan Coles <[email protected]>
6340 jonathan 1506
6341     * Thuban/UI/application.py (ThubanApplication.OnInit): set the
6342     python exception hook here so that we are sure to catch any
6343     Thuban exception that happen during initialization.
6344    
6345     * Thuban/UI/main.py (main): Don't set the exception hook here,
6346     it will get set in ThubanApplication.OnInit.
6347    
6348     2003-07-29 Jonathan Coles <[email protected]>
6349 jonathan 1503
6350     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
6351     Removed and called it show_exception_dialog() so that the exception
6352     handler can be set before the class is created.
6353    
6354     * Thuban/UI/main.py (main): Install the exception handler before
6355     a ThubanApplication is created.
6356    
6357 bh 1500 2003-07-29 Bernhard Herzog <[email protected]>
6358    
6359     * po/it.po: New. Italian translation by Maurizio Napolitano
6360    
6361     * po/ru.po: New. Russian translation by Alex Shevlakov
6362    
6363 frank 1497 2003-07-29 Frank Koormann <[email protected]>
6364    
6365 frank 1508 * Doc/manual/thuban-manual.xml: Extended section on supported
6366     projections.
6367    
6368     2003-07-29 Frank Koormann <[email protected]>
6369    
6370 frank 1497 * Doc/manual/thuban-manual.xml: gaspell-checked.
6371    
6372 jonathan 1493 2003-07-29 Jonathan Coles <[email protected]>
6373    
6374 jonathan 1495 * Doc/manual/images/3_5_legend.png: Added border to improve look
6375     on white background.
6376    
6377     2003-07-29 Jonathan Coles <[email protected]>
6378    
6379 jonathan 1493 * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
6380     descriptions for the legend toolbar.
6381    
6382     * Doc/manual/images/4_2_raster_layer_properties.png: Removed
6383     cursor from dialog box.
6384    
6385     2003-07-28 Jonathan Coles <[email protected]>
6386    
6387     * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
6388    
6389     * Doc/manual/images/2_4_session_tree.png,
6390     Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
6391     Doc/manual/images/4_2_layer_properties.png,
6392     Doc/manual/images/4_2_raster_layer_properties.png,
6393     Doc/manual/images/5_3_genclass.png,
6394     Doc/manual/images/5_classification.png,
6395     Doc/manual/images/6_projection.png,
6396     Doc/manual/images/7_1_table_view.png,
6397     Doc/manual/images/7_2_5_join.png: New screenshots.
6398    
6399     2003-07-24 Jonathan Coles <[email protected]>
6400    
6401     * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
6402    
6403     2003-07-24 Jonathan Coles <[email protected]>
6404    
6405     * Doc/manual/thuban-manual.xml: Added EPS images and wrote
6406     chapter on Layer Management.
6407    
6408     * Doc/manual/Makefile: New. Makefile to generate all formats for the
6409     manual and images.
6410    
6411 bh 1483 2003-07-24 Bernhard Herzog <[email protected]>
6412    
6413     * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
6414     it annoys lintian which warns about these files not being
6415 jan 1767 executable. The #! isn't necessary here since if you absolutely
6416 bh 1483 must execute them you can always say "python <filename>".
6417    
6418     * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
6419     superfluous code to set brush and pen for point shapes
6420    
6421     * Thuban/UI/viewport.py: Remove commented out code that wouldn't
6422     belong in viewport anyway
6423    
6424 frank 1479 2003-07-24 Frank Koormann <[email protected]>
6425    
6426     * Doc/manual/thuban-manual.xml: Added section on table management.
6427    
6428 bh 1477 2003-07-24 Bernhard Herzog <[email protected]>
6429    
6430     * test/runtests.py (main): Recognize the long "verbose" option
6431     correctly.
6432    
6433 jonathan 1470 2003-07-22 Jonathan Coles <[email protected]>
6434    
6435     * Doc/manual/thuban-manual.xml: Continue to write first revision
6436     of the manual.
6437    
6438     * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
6439     with Begin/EndDrawing() calls to ensure we aren't doing to
6440     many updates to the dc during rendering.
6441     (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
6442     a pen and brush argument so they need to be passed to the function.
6443    
6444     * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
6445     Calculates the minimum and maximum scale values. Factored out
6446     of set_view_transform so that it could be used to zoom all the
6447     way into a single point.
6448     (ViewPort.set_view_transform): Call calc_min_max_scales().
6449     (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
6450     if only a single point is selected.
6451    
6452     * Doc/manual/images/1_2_legend_close.png,
6453     Doc/manual/images/1_2_legend_dock.png,
6454     Doc/manual/images/1_2_mainwindow.png,
6455     Doc/manual/images/1_2_mainwindow.ps,
6456     Doc/manual/images/1_2_mainwindow.sk,
6457     Doc/manual/images/3_2_fullextent.png,
6458     Doc/manual/images/3_2_fulllayerextent.png,
6459     Doc/manual/images/3_2_fullshapeextent.png,
6460     Doc/manual/images/3_2_pan.png,
6461     Doc/manual/images/3_2_zoomin.png,
6462     Doc/manual/images/3_2_zoomout.png,
6463     Doc/manual/images/3_3_identify.png,
6464     Doc/manual/images/3_3_label.png,
6465     Doc/manual/images/3_5_invisible.png,
6466     Doc/manual/images/3_5_movedown.png,
6467     Doc/manual/images/3_5_moveup.png,
6468     Doc/manual/images/3_5_props.png,
6469     Doc/manual/images/3_5_tobottom.png,
6470     Doc/manual/images/3_5_totop.png,
6471     Doc/manual/images/3_5_visible.png: New. Images for the documentation.
6472    
6473 bh 1451 2003-07-18 Bernhard Herzog <[email protected]>
6474    
6475 bh 1465 * Thuban/UI/messages.py (MAP_REPLACED): New message.
6476    
6477     * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
6478     after the new map has been assigned
6479    
6480     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
6481     Delegate MAP_REPLACED to the canvas too
6482     (MainWindow.prepare_new_session): Removed. Thanks to the new
6483     MAP_REPLACED message it's no longer needed
6484     (MainWindow.OpenSession, MainWindow.NewSession):
6485     prepare_new_session has been removed.
6486    
6487     * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
6488     MAP_REPLACED so that we can close the dialog if a new map is set.
6489     (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
6490     (Classifier.map_replaced): Handle MAP_REPLACED by closing the
6491     dialog
6492    
6493     * test/test_viewport.py (SimpleViewPortTest)
6494     (SimpleViewPortTest.test_default_size): Add doc-strings
6495     (ViewPortTest.setUp): Bind map to self.map so we can use it in
6496     tests. Subscribe to MAP_REPLACED messages too.
6497     (ViewPortTest.tearDown): No need to explicitly unsubscribe
6498     (ViewPortTest.test_set_map): New test for the SetMap method.
6499    
6500     2003-07-18 Bernhard Herzog <[email protected]>
6501    
6502 bh 1463 * test/test_viewport.py (SimpleViewPortTest.test_default_size):
6503     Move this test from ViewPortTest.setUp to this new separate test
6504     case. setUp is not the place for the actual tests.
6505     (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
6506     more of the test from setUp to the new test test_inital_settings.
6507     (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
6508     (ViewPortTest.test_proj_conv): Split test_proj_conv into
6509     test_win_to_proj and test_proj_to_win and make the tests easier to
6510     understand
6511     (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
6512     (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
6513     (ViewPortTest.test_unprojected_rect_around_point)
6514     (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
6515     Reformat to increase readability.
6516    
6517     2003-07-18 Bernhard Herzog <[email protected]>
6518    
6519 bh 1461 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
6520    
6521     2003-07-18 Bernhard Herzog <[email protected]>
6522    
6523 bh 1459 * test/runtests.py: The test suite can now be run without an X
6524     connection. To make sure this remains true, remove the DISPLAY
6525     environment variable so that an error occurs if the wxGTK is
6526     imported accidentally
6527    
6528     2003-07-18 Bernhard Herzog <[email protected]>
6529    
6530 bh 1457 * Thuban/UI/viewport.py: Remove unused imports
6531    
6532     * Thuban/UI/view.py: Remove unused imports
6533    
6534     2003-07-18 Bernhard Herzog <[email protected]>
6535    
6536 bh 1455 * test/test_export.py Remove unused imports. The OutputTransform
6537     function is now in viewport.py and is called output_transform
6538     (TestScalebar.test_output_transform)
6539     (TestScalebar.test_OutputTransform): Renamed to
6540     test_output_transform and updated to use output_transform instead
6541     of OutputTransform
6542    
6543     * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
6544     renamed.
6545     (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
6546     renamed to output_transform
6547    
6548     * Thuban/UI/viewport.py (OutputTransform, output_transform):
6549     Rename to output_transform
6550    
6551     2003-07-18 Bernhard Herzog <[email protected]>
6552    
6553 bh 1453 * Thuban/Model/layer.py (Layer.__init__): Rename
6554     classificationField to classificatin_column and init it here so
6555     that it can be used in SetClassificationColumn
6556     (Layer.GetClassificationColumn, Layer.GetClassificationField):
6557     Rename to GetClassificationColumn.
6558     (Layer.SetClassificationColumn, Layer.SetClassificationField):
6559     Rename to SetClassificationColumn and issue a LAYER_CHANGED
6560     message if the column changes.
6561     (Layer._classification_changed, Layer.ClassChanged): Rename to
6562     _classification_changed. Update the callers.
6563     (Layer.SetShapeStore): Further field->column renames.
6564    
6565     * Thuban/Model/load.py (SessionLoader.start_classification)
6566     (SessionLoader.start_clpoint): Updates because of
6567     field->column method name changes in the Layer class
6568    
6569     * Thuban/Model/save.py (SessionSaver.write_classification): Updates
6570     because of field->column method name changes in the Layer class
6571    
6572     * Thuban/UI/classifier.py (Classifier.__init__)
6573     (Classifier._OnTry, Classifier._OnRevert): Updates because of
6574     field->column method name changes in the Layer class
6575    
6576     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
6577     because of field->column method name changes in the Layer class
6578    
6579     * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
6580     of field->column method name changes in the Layer class
6581    
6582     * test/test_save.py (SaveSessionTest.testClassifiedLayer)
6583     (SaveSessionTest.testClassifiedLayer): Update because of
6584     field->column method name changes in the Layer class
6585    
6586     * test/test_layer.py (SetShapeStoreTests.setUp)
6587     (SetShapeStoreTests.test_sanity): Update because of field->column
6588     method name changes in the Layer class
6589     (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
6590     (TestLayerModification.test_sanity)
6591     (TestLayerModification.test_initial_settings): remove unsued code
6592     and rename to test_sanity.
6593     (TestLayerModification.test_set_classification): New test for
6594     SetClassification and SetClassificationField.
6595    
6596     2003-07-18 Bernhard Herzog <[email protected]>
6597    
6598 bh 1451 * test/test_classgen.py (TestFixedRamp.test): Extend test to check
6599     the non-fixed values as well. The old test would have accepted a
6600     fixed ramp that only returnes the fixed properties
6601    
6602 jonathan 1449 2003-07-17 Jonathan Coles <[email protected]>
6603    
6604     * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
6605     shots for the manual. The XCF file is the source image and
6606     has additional layers to support changes.
6607    
6608     * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
6609    
6610     * Thuban/UI/classifier.py (Classifier.__BuildClassification):
6611     Return both the new class and the field name.
6612    
6613     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
6614     fit the map to the window as this changes any zoom level that
6615     the user may have set.
6616    
6617 jonathan 1442 2003-07-16 Jonathan Coles <[email protected]>
6618    
6619     * Thuban/Model/classgen.py (generate_singletons,
6620     generate_uniform_distribution, generate_quantiles): Remove
6621     fixes parameter, but maintain the same functionality by having
6622     the calling function pass a FixedRamp object for the ramp.
6623     (FixedRamp): New. Adapts a ramp to have fixed property values.
6624    
6625     * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
6626     (Classification): Inherit from Publisher.
6627     (Classification.__init__): Remove the layer parameter.
6628     Classifications no longer need to have a parent layer.
6629     (Classification.GetField, Classification.GetFieldType,
6630     Classification.SetFieldInfo): Removed. The field name is stored
6631     in the layer, and the type can be retreived by calling
6632     Layer.GetFieldType().
6633     (Classification._set_layer, Classification.GetLayer): Removed.
6634     Classifications no longer have a parent layer.
6635    
6636     * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
6637     classification.
6638     (Layer.SetShapeStore): Reset the classification first while
6639     we still have the old shape store to work with.
6640     (Layer.GetClassificationField, Layer.SetClassificationField):
6641     New. Method for getting/setting the field to classify on.
6642     (Layer.SetClassification): Simplified now that the layer
6643     simply has to hold a reference to the classification and not
6644     tell the classification who owns it.
6645     Fixes RTbug #2023.
6646    
6647     * Thuban/Model/load.py (SessionLoader.start_classification):
6648     Set the field name on the layer, not the classification.
6649    
6650     * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
6651     classification is modified.
6652    
6653     * Thuban/Model/save.py (SessionSaver.write_classification):
6654     Get the field name and type from the layer.
6655    
6656     * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
6657     parameter records to rows and add docstring. Fixes RTbug #1997.
6658    
6659     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
6660     ramp when we need to fix certain values of a ramp rather than
6661     using the old fixes parameter. Fixes RTbug #2024.
6662    
6663     * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
6664     parameter.
6665     (ClassTable.Reset): Add fieldType parameter and use it, rather
6666     than asking the classification.
6667     (Classifier.__init__): Remember the original class's field
6668     and ask the layer for the field type, rather than the classification.
6669     (Classifier.__SetGridTable): Retrieve the field and field type
6670     for the table because they are not in the classification.
6671     (Classifier._OnTry, Classifier._OnRevert): Set the classification
6672     field on the layer in addition to the classification itself.
6673    
6674     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
6675     classification field from layer.
6676    
6677     * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
6678     classification field from layer. Split up tests and remove
6679     *-imports. Fixes RTbug #1992.
6680    
6681     * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
6682    
6683     * test/test_classification.py
6684     (TestClassification.test_classification): Remove tests for methods
6685     that no longer exist.
6686    
6687     * test/test_layer.py (SetShapeStoreTests.setUp): Classification
6688     __init__ no longer has a field parameter, use SetClassificationField.
6689     (SetShapeStoreTests.test_sanity): Use layer object to get class
6690     field info.
6691    
6692     * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
6693     SetClassificationField on layer to set class field info.
6694    
6695     * test/test_viewport.py: Renamed from test/test_view.py.
6696    
6697 jan 1424 2003-07-16 Jan-Oliver Wagner <[email protected]>
6698    
6699     * Doc/manual/thuban-manual.xml: Added authors and an initial
6700     coarse structure.
6701    
6702 bh 1418 2003-07-15 Bernhard Herzog <[email protected]>
6703    
6704 bh 1422 * test/support.py (FloatComparisonMixin): This is a mix-in class
6705     and therefore should not be derived from any other class.
6706    
6707     * test/test_range.py (RangeTest): FloatComparisonMixin is a
6708     mix-in, so derive from TestCase as well.
6709    
6710     2003-07-15 Bernhard Herzog <[email protected]>
6711    
6712 bh 1420 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
6713     draw_func handling a bit to remove one layer of indirection. This
6714     makes the renderer about 10% faster in the non-classifying case
6715     and the code a bit cleaner
6716     (MapRenderer.draw_point_shape): Add the pen and brush parameters
6717     and set them in the dc. Now the draw_point_shape method and
6718     wxproj's draw_polygon_shape function have basically the same
6719     signature so that both can be directly used as draw_func
6720    
6721     2003-07-15 Bernhard Herzog <[email protected]>
6722    
6723 bh 1418 * Thuban/Model/save.py (SessionSaver.write_classification): Encode
6724     string values (in addition to the labels) as UTF 8
6725    
6726     * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
6727     values if the field type is string
6728    
6729     * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
6730     saving a session with non-ascii string classification values.
6731    
6732     * test/test_load.py (TestClassification.file_contents)
6733     (TestClassification.test): Check for non-ascii values in string
6734     classifications
6735    
6736 jonathan 1416 2003-07-14 Jonathan Coles <[email protected]>
6737    
6738     * test/test_view.py: New. Tests for ViewPort.
6739    
6740 frank 1409 2003-07-14 Frank Koormann <[email protected]>
6741    
6742     * Thuban/Model/load.py (SessionLoader.start_map): Encode map
6743     title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
6744    
6745 frank 1411 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
6746     unicode strings from session file: session title, map title and
6747     projection name.
6748    
6749 jonathan 1403 2003-07-10 Jonathan Coles <[email protected]>
6750    
6751 jonathan 1406 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
6752     drag_stop, not drag_move when the mouse is released.
6753    
6754     2003-07-10 Jonathan Coles <[email protected]>
6755    
6756 jonathan 1403 The most important part of this is the seperation of view.py into
6757     two pieces. viewport.py now has a class called ViewPort which
6758     contains all the non-wx parts of view.py and can therefore be
6759     tested. view.py contains only the wx-specific parts and is fairly
6760     simple.
6761    
6762     * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
6763     RTTbug #1992.
6764     * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
6765     RTTbug #1992.
6766    
6767     * Thuban/Model/classgen.py (generate_singletons,
6768     generate_uniform_distribution, generate_quantiles):
6769     Added 'fixes' parameter so that property attributes can
6770     be held constant over the generated classification groups.
6771     (CustomRamp.GetProperties): Remove unused variables.
6772    
6773     * Thuban/Model/map.py (Map.SetProjection): Send the old
6774     projection as an argument to listeners of the MAP_PROJECTION_CHANGED
6775     event.
6776    
6777     * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
6778     parameter which is a list of records that restricts which
6779     records are saved. Fixes RTbug #1997.
6780    
6781     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
6782     Port exception dialog from GREAT-ER. Fixes RTbug #1993.
6783    
6784     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
6785     to allow the user to fix line color/width on generated groups.
6786     (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
6787     functions to optionally fix group properties.
6788    
6789     * Thuban/UI/main.py (main): Set exception hook to the
6790     ShowExceptionDialog. Fixes RTbug #1993.
6791    
6792     * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
6793     the table window when it is selectd to be shown.
6794    
6795     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
6796     Export Selection button and move the export buttons underneath
6797     the table.
6798     (QueryTableFrame.UpdateStatusText): Added event argument so
6799     that it can respond to grid selection events. The status text
6800     is now updated even when the table is not associated with a
6801     layer as was previously assumed.
6802     (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
6803     UpdateStatusText responds to these events.
6804     (QueryTableFrame.OnSaveAs): Renamed to doExport.
6805     (QueryTableFrame.doExport): Helper function that saves the
6806     entire table, or selected rows, to a file.
6807     (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
6808     Respond to export button events and call doExport.
6809    
6810     * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
6811     the function doesn't return NULL without first setting a Python
6812     Error.
6813    
6814     * test/runtests.py (main): Only print "Unknown option" for
6815     unsupported options.
6816    
6817     * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
6818     optional epsilon argument to specify floating point accuracy.
6819     (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
6820     for each item test.
6821    
6822     * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
6823     tests for saving selected records.
6824    
6825     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
6826     tests for saving selected records.
6827    
6828     * test/test_map.py (TestMapWithContents.test_set_projection):
6829     MAP_PROJECTION_CHANGED events send the old projection.
6830    
6831     * test/test_session.py
6832     (TestSessionWithContent.test_forward_map_projection):
6833     MAP_PROJECTION_CHANGED events send the old projection.
6834    
6835     * test/test_table.py (TableTest): Update tests to use non-deprecated
6836     functions.
6837    
6838 bh 1376 2003-07-08 Bernhard Herzog <[email protected]>
6839    
6840 bh 1382 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
6841     constants in the column objects are the standard ones defined in
6842     the table module.
6843    
6844     * test/test_transientdb.py
6845     (TestTransientTable.test_transienttable_to_dbf): New. Test whether
6846     exporting transient tables as DBF works. This should catch the bug
6847     just fixed in TransientTableBase.Width.
6848    
6849     2003-07-08 Bernhard Herzog <[email protected]>
6850    
6851 bh 1380 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
6852     interpolated colors correctly.
6853    
6854     * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
6855     New. Test case for the fix in classgen.py
6856    
6857     2003-07-08 Bernhard Herzog <[email protected]>
6858    
6859 bh 1378 * test/runtests.py (main): Make the default output less verbose
6860     and add a verbosity option (-v) to get the old output
6861    
6862     2003-07-08 Bernhard Herzog <[email protected]>
6863    
6864 bh 1376 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
6865     0.9.
6866    
6867     * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
6868     New. Return the join type
6869    
6870     * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
6871     DTD
6872     (SessionSaver.write_data_containers): Save the join type for
6873     joined tables
6874    
6875     * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
6876     namespace
6877     (SessionLoader.start_jointable): Handle the jointype attribute
6878    
6879     * test/test_load_0_8.py: New. Effectively a copy of test_load.py
6880     as of Thuban 0.8. These are now tests to determine whether Thuban
6881     can still read files generated by Thuban 0.8
6882    
6883     * test/test_load.py (LoadSessionTest.dtd)
6884     (TestSingleLayer.file_contents)
6885     (TestLayerVisibility.file_contents, TestLabels.file_contents)
6886     (TestLayerProjection.file_contents)
6887     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
6888     (TestJoinedTable.file_contents)
6889     (TestLoadError.file_contents): Update for new DTD
6890     (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
6891     for new join type attribute
6892    
6893     * test/test_save.py (SaveSessionTest.dtd)
6894     (SaveSessionTest.testEmptySession)
6895     (SaveSessionTest.testSingleLayer)
6896     (SaveSessionTest.testLayerProjection)
6897     (SaveSessionTest.testRasterLayer)
6898     (SaveSessionTest.testClassifiedLayer)
6899     (SaveSessionTest.test_dbf_table)
6900     (SaveSessionTest.test_joined_table): Update for new DTD
6901     (SaveSessionTest.test_joined_table): Add test for new join type
6902     attribute
6903    
6904 bh 1372 2003-07-04 Bernhard Herzog <[email protected]>
6905    
6906     * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
6907     function for table_to_dbf
6908     (table_to_dbf): Deal with names longer than the 10 character limit
6909    
6910     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
6911     doc-string
6912     (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
6913     long column names
6914    
6915 bh 1365 2003-07-03 Bernhard Herzog <[email protected]>
6916    
6917 bh 1370 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
6918    
6919     2003-07-03 Bernhard Herzog <[email protected]>
6920    
6921 bh 1368 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
6922     for the Thuban manual and README with some basic information about
6923     the manual
6924    
6925     2003-07-03 Bernhard Herzog <[email protected]>
6926    
6927 bh 1365 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
6928     Update doc-string
6929     (TransientJoinedTable.create): Do not modify the column objects of
6930     the input tables in place and copy all columns of the input tables
6931     into the joined table after all.
6932    
6933     * test/test_transientdb.py
6934     (TestTransientTable.test_transient_joined_table_same_column_name):
6935     Update to reflect the new behavior
6936     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
6937     Update to reflect the new behavior
6938     (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
6939     New test case for a bug which modified the column objects in place
6940    
6941 jonathan 1360 2003-07-02 Jonathan Coles <[email protected]>
6942 jonathan 1349
6943 jonathan 1360 * Thuban/Model/classgen.py (generate_singletons,
6944     generate_uniform_distribution, generate_quantiles,
6945 jonathan 1363 GenQuantiles0): Make sure maxValue isn't less than
6946     one, otherwise we could divide by zero.
6947    
6948     * test/test_classgen.py (ClassGenTest.doClassRangeTest,
6949     ClassGenTest.doClassSingleTest): Call doBoundsTest to
6950     check the end classification groups against the
6951     proper property values.
6952     (ClassGenTest.doBoundsTest): New. Checks the first and
6953     last classification groups to make sure their properties
6954     are the correct upper and lower bounds for a color ramp.
6955    
6956     2003-07-02 Jonathan Coles <[email protected]>
6957    
6958     * Thuban/Model/classgen.py (generate_singletons,
6959     generate_uniform_distribution, generate_quantiles,
6960 jonathan 1360 GenQuantiles0): The denominator was one to high when
6961     calculating the index for the ramp causing the index
6962     to never to reach one.
6963    
6964     2003-07-02 Jonathan Coles <[email protected]>
6965    
6966 jonathan 1358 Changed the singature of ClassGroupRange.__init__ and
6967     ClassGroupRange.SetRange() so that the min/max values are
6968     passed as a tuple. This makes a better calling scheme for
6969     when a Range object is passed instead.
6970    
6971     * Thuban/Model/classgen.py: Fixed parameters to
6972     ClassGroupRange constructor.
6973    
6974     * Thuban/Model/classification.py (ClassGroupRange.__init__):
6975     Consolidate the min/max parameters into a single _range which
6976     can either be a tuple or a Range object.
6977     (ClassGroupRange.SetRange): Consolidate the min/max parameters
6978     into a single _range which can either be a tuple or a Range object.
6979    
6980     * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
6981     call to ClassGroupRange constructor to use a tuple.
6982    
6983     * Thuban/Model/layer.py (Layer.SetClassification): Switch
6984     the classification instance variable to the new class
6985     before calling _set_layer otherwise subscribers to a
6986     LAYER_CHANGED event will not see any difference.
6987    
6988     * test/test_classification.py: Fix tests of ClassGroupRange
6989     so that they use the new signature.
6990    
6991     * test/test_load.py: Fix use of ClassGroupRange so that it
6992     uses the new signature.
6993    
6994     * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
6995     uses the new signature.
6996    
6997     * test/test_save.py: Fix use of ClassGroupRange so that it
6998     uses the new signature.
6999    
7000    
7001     2003-07-01 Jonathan Coles <[email protected]>
7002    
7003 jonathan 1349 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
7004     Import used objects/class from color.
7005     (generate_singletons): We don't
7006     need the numGroups parameter anymore because we are using
7007     the new ramps with GetProperties().
7008     (generate_uniform_distribution): Use new ramp method
7009     GetProperties().
7010     (generate_quantiles, GenQuantiles0): Use new ramp method
7011     GetProperties().
7012     (CustomRamp.SetNumGroups): Removed. The ramps now map
7013     a value from 0 to 1 to class properties so the number
7014     of groups is not needed ahead of time.
7015     (CustomRamp.next): Removed. CustomRamp does not support
7016     interation anymore.
7017     (CustomRamp.GetProperties): Returns a ClassGroupProperties
7018     object based on the index value from 0 to 1 that is
7019     passed to it.
7020     (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
7021     Made into instances of Monochromatic class instread of
7022     deriving from it.
7023     (HotToCold.SetNumGroups): Removed. See CustomRamp.
7024     (HotToCold.next): Removed. See CustomRamp.
7025    
7026     * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
7027     (Classification.SetField, Classification.SetFieldType):
7028     Replaced with SetFieldInfo.
7029     (Classification.SetFieldInfo): New. Does a better job of
7030     what SetField and SetFieldType used to do by combining
7031     their function since they should really always be done
7032     at the same time.
7033     (Classification.SetLayer): Renamed to _set_layer.
7034     (Classification._set_layer): Should only be called from
7035     Layer's SetClassification. This does not cause a recursive
7036     call as SetLayer did because we know that Layer knows about
7037     the classification.
7038    
7039     * Thuban/Model/color.py: Fixes RTbug #1971.
7040     (_Transparent): Renamed from Transparent so it doesn't
7041     conflict with the module variable.
7042     (Transparent, Black): Renamed from Color.Transparent,
7043     Color.Black so they are not class variables.
7044    
7045     * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
7046     (Layer.Destroy): We don't need to call SetClassification
7047     anymore to clear out the back reference in the classifcation
7048     to the layer. It's better to set it to None using _set_layer,
7049     and we won't be creating another clas object too.
7050     (Layer.SetClassification): Classification._set_layer is not
7051     recursive so remove all the locking variables. Also clean
7052     up the code so that it remains unchanged if something fails.
7053    
7054     * Thuban/Model/load.py: Fixes RTbug #1971.
7055     (SessionLoader.start_classification): Call
7056     Classification.SetFieldInfo().
7057    
7058     * Thuban/Model/save.py: Removed import of Color which wasn't
7059     being used.
7060    
7061     * Thuban/UI/classgen.py: Fixes RTbug #1972.
7062     (ClassGenDialog.__init__): Color ramps are now instances
7063     already so we don't need to create any new objects.
7064     (ClassGenDialog.OnOK): Check for numGroups is no longer
7065     necessary because we never use it.
7066    
7067     * Thuban/UI/classifier.py: Fixes RTbug #1971.
7068     (Classifier.__BuildClassification, Classifier.__SetGridTable):
7069     Call Classification.SetFieldInfo() instead of SetFieldType.
7070    
7071     * Thuban/UI/renderer.py: Fixes RTbug #1971.
7072    
7073     * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
7074     (MapCanvas.__init__): Subscribe to the idle time event. Set
7075     background color to white.
7076     (MapCanvas.OnPaint): Set a flag indicating that we should
7077     render the map during idle time. If we already have a bitmap
7078     just draw it now.
7079     (MapCanvas.OnIdle): New. Render the map only during idle time.
7080     This also fixes a problem with the busy cursor under gtk.
7081    
7082     * test/test_classgen.py (ClassGenTest.test_generate_singletons):
7083     Fix calls to generate_singletons because the signature changed.
7084    
7085     * test/test_classification.py: Fix color references and
7086     change calls to Classification.[SetField|SetFieldType] to
7087     SetFieldInfo.
7088    
7089     * test/test_load.py: Fix color references.
7090    
7091     * test/test_load_0_2.py: Fix color references.
7092    
7093     * test/test_save.py (SaveSessionTest.testClassifiedLayer):
7094     Change calls to Classification.[SetField|SetFieldType] to
7095     SetFieldInfo.
7096    
7097 frank 1334 2003-07-01 Frank Koormann <[email protected]>
7098    
7099     MERGE from the greater-ms3 branch.
7100    
7101     * test/test_transientdb.py
7102     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
7103     New. Test join of two tables with partly equal column names.
7104    
7105     * Thuban/Model/transientdb.py (TransientJoinedTable.create):
7106     If duplicates in left and right tables column names are found,
7107     append '_' (underscores) to the name until it is unique.
7108     Create always new internal names for the resulting table and reference
7109     columns in the join statement with <table>.<column>
7110    
7111 bh 1329 2003-07-01 Bernhard Herzog <[email protected]>
7112    
7113     * test/test_transientdb.py
7114     (TestTransientTable.test_transient_joined_table_same_column_name):
7115     New. Test whether joining on columns with the same names in both
7116     tables works.
7117 frank 1334
7118 bh 1329 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
7119     sure to use the right internal names even when joining on field
7120     with the same names in both tables. Also, detect duplicate names
7121     in the joined table correctly.
7122    
7123 frank 1325 2003-07-01 Frank Koormann <[email protected]>
7124    
7125     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
7126     Reverse List of layers to render in same order as in desktop legend.
7127    
7128 jonathan 1318 2003-06-30 Jonathan Coles <[email protected]>
7129    
7130 jonathan 1349 * Thuban/version.py (make_tuple): Takes a version string
7131     and splits it into a tuple of at most three integers.
7132     Used make_tuple() to make tuple versions of the version
7133     numbers.
7134    
7135     * Thuban/UI/about.py: Add Thuban email addresses.
7136    
7137     2003-06-30 Jonathan Coles <[email protected]>
7138    
7139 jonathan 1320 * Thuban/version.py: SQLite/PySQLite version dependencies
7140     were too high.
7141    
7142     2003-06-30 Jonathan Coles <[email protected]>
7143    
7144 jonathan 1318 * Thuban/version.py: Update version to 0.8.1
7145    
7146     * MANIFEST.in: Added Projections so that default.proj is
7147     included.
7148    
7149 jonathan 1312 2003-06-26 Jonathan Coles <[email protected]>
7150    
7151     New About box with lots more information including library
7152     versions and credits. More/better version checking before
7153     Thuban starts.
7154    
7155     * Thuban/UI/about.py: New. New About box that displays
7156     library version information and credits.
7157    
7158     * Thuban/version.py: Added new 'versions' dictionary which
7159     contains the verions of various libraries which are checked
7160     when the module loads.
7161     (verify_versions): Check all version numbers and returns
7162     a list of errors.
7163    
7164     * Thuban/UI/classifier.py (Classifier.__EnableButtons):
7165     Reset the status of the buttons as the situation warrants,
7166     but in a better more reliable way by not relying on the
7167     current status to determine what needs to change.
7168    
7169     * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
7170     (verify_versions): Remove most of the code since it is
7171     now in Thuban.version.verify_versions.o
7172    
7173     * Thuban/UI/mainwindow.py (MainWindow.About): Call new
7174     About box in Thuban.UI.about.
7175    
7176     * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
7177     Returns the version of gdal library being used as a string.
7178    
7179     * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
7180     Removed.
7181     (get_proj_version): Return the version of PROJ that the file
7182     was compiled with.
7183     (get_gtk_version): Return th version of GTK that the file
7184     was compiled with.
7185    
7186 jonathan 1304 2003-06-25 Jonathan Coles <[email protected]>
7187    
7188     * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
7189     of the SelectPropertiesDialog should be self so the window
7190     appears on top.
7191     (ClassGroupPropertiesCtrl.DoEdit): The parent
7192     of the SelectPropertiesDialog should be self so the window
7193     appears on top.
7194    
7195     * Thuban/UI/resource.py: Cleaned up how we determine file
7196     extensions.
7197     (GetImageResource): Return an wxImage from our Resources.
7198    
7199 jonathan 1299 2003-06-24 Jonathan Coles <[email protected]>
7200    
7201     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
7202     Check that a layer has a classification before trying
7203     to get it. Raster layers don't have classifications.
7204    
7205 jonathan 1286 2003-06-23 Jonathan Coles <[email protected]>
7206 jonathan 1297
7207     * setup.py: Add Resources/XML to resource list.
7208    
7209     2003-06-23 Jonathan Coles <[email protected]>
7210 jonathan 1286
7211 jonathan 1297 * setup.cfg: Fix copyright dates
7212    
7213     2003-06-23 Jonathan Coles <[email protected]>
7214    
7215 jonathan 1294 * MANIFEST.in: Update with Resources/XML
7216    
7217     * setup.py: Don't include Locale resources yet as we don't
7218     have any and it causes problems building the distribution
7219     for Windows. Update version to 0.8.0.
7220    
7221     * Doc/thuban.dtd: Removed since it is now in Resources/XML.
7222    
7223     * Thuban/UI/mainwindow.py: Add blank line at the end because
7224     file was not being read correctly building the Windows
7225     distribution.
7226    
7227     2003-06-23 Jonathan Coles <[email protected]>
7228    
7229 jonathan 1289 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
7230    
7231     * Thuban/version.py: Temporarily update longversion for
7232     the 0.8 release so that it doesn't have the cvs revision.
7233    
7234     2003-06-23 Jonathan Coles <[email protected]>
7235    
7236 jonathan 1286 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
7237     to make sure that we don't create reentrant possibilities with
7238     wxYield.
7239    
7240     * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
7241     directly to avoid the wxSafeYield() call which generates an
7242     OnPaint event causing infinite recursion. Don't try to catch
7243     exception anymore. This was for before there were limits on map
7244     scaling.
7245    
7246 bh 1283 2003-06-23 Bernhard Herzog <[email protected]>
7247    
7248     Bug fix for RT #1961:
7249    
7250     * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
7251     Register DerivedShapestores with the session
7252    
7253     * Thuban/Model/session.py (Session.Tables): Make sure each table
7254     is only listed once.
7255    
7256     * test/test_load.py (TestJoinedTable.test): Add check_format call.
7257     Update file contents to match the one written out.
7258    
7259 bh 1281 2003-06-20 Bernhard Herzog <[email protected]>
7260    
7261     * test/xmlsupport.py (SaxEventLister.startElementNS)
7262     (SaxEventLister.endElementNS): Do not include the qname. Python
7263     2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
7264     is (presumably incorrectly) None, whereas it's a string with the
7265     element name in the later versions.
7266    
7267     * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
7268     (TestEventList.test_even_list_namespace): Update tests to reflect
7269     the new behaviour
7270     (TestEventList.test_even_list_id_normalization): Fix doc-string
7271    
7272 jonathan 1272 2003-06-20 Jonathan Coles <[email protected]>
7273    
7274 jonathan 1279 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
7275     by deriving classes to determine if that layer supports shapes.
7276     (Layer): Override HasShapes and return true.
7277    
7278     * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
7279     instead of a direct call to wx[Begin|End]CusyCursor().
7280     (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
7281     table data.
7282    
7283     * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
7284     New. Wrappers around the wxWindows functions that allow us to
7285     make additional calls such as wxYield which gives the native
7286     system a chance to update the cursor correctly.
7287    
7288     * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
7289     instead of a direct call to wx[Begin|End]CusyCursor().
7290    
7291     * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
7292     instead of a direct call to wx[Begin|End]CusyCursor().
7293     (MapCanvas.find_shape_at): Check if the current search layer
7294     support shapes, otherwise go on to the next layer.
7295    
7296     * test/test_layer.py: Add tests in each type of layer for
7297     HasClassification() and HasShapes()
7298    
7299     2003-06-20 Jonathan Coles <[email protected]>
7300    
7301 jonathan 1272 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
7302     turning on the busy cursor to allow the system to change the
7303     cursor before we begin painting. This fixes a problem that
7304     was occuring only under GTK. Fixes RTbug #1840.
7305    
7306 bh 1270 2003-06-20 Bernhard Herzog <[email protected]>
7307    
7308     * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
7309     version.
7310    
7311     * Thuban/Model/save.py (sort_data_stores): New. Make topological
7312     sort of the data sources so they can be written with sources that
7313     data sources that depend on other data sources come after the
7314     sources they depend on.
7315     (SessionSaver.__init__): Add idmap instance variable to map from
7316     objects to the ids used in the file.
7317     (SessionSaver.get_id, SessionSaver.define_id)
7318     (SessionSaver.has_id): New. Methods to manage the idmap
7319     (SessionSaver.write): Use thuban-0.8.dtd
7320     (SessionSaver.write_session): Add a namespace on the session and
7321     write out the data sources before the maps.
7322     (SessionSaver.write_data_containers): New. Write the data
7323     containers.
7324     (SessionSaver.write_layer): Layer elements now refer to a
7325     shapestore and don't contain filenames anymore.
7326    
7327     * Thuban/Model/load.py (LoadError): Exception class to raise when
7328     errors in the files are discovered
7329     (SessionLoader.__init__): Define dispatchers for elements with a
7330     thuban-0.8 namespace too.
7331     (SessionLoader.check_attrs): New helper method to check and
7332     convert attributes
7333     (AttrDesc): New. Helper class for SessionLoader.check_attrs
7334     (SessionLoader.start_fileshapesource)
7335     (SessionLoader.start_derivedshapesource)
7336     (SessionLoader.start_filetable, SessionLoader.start_jointable):
7337     Handlers for the new elements in the new fileformat
7338     (SessionLoader.start_layer): Handle the shapestore attribute in
7339     addition to filename.
7340     (SessionLoader.start_table, SessionLoader.end_table): Removed.
7341     They were never used in the old formats and aren't needed for the
7342     new.
7343    
7344     * Thuban/Model/session.py (Session.DataContainers): New method to
7345     return all "data containers", i.e. shapestores and tables
7346    
7347     * test/xmlsupport.py (SaxEventLister.__init__)
7348     (SaxEventLister.startElementNS, sax_eventlist): Add support to
7349     normalize IDs.
7350    
7351     * test/test_xmlsupport.py
7352     (TestEventList.test_even_list_id_normalization): New test case for
7353     id normalization
7354    
7355     * test/test_load.py (LoadSessionTest.check_format): Use ID
7356     normalization
7357     (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
7358     class atrributes used for ID normalization
7359     (TestSingleLayer, TestLayerVisibility, TestLabels.test)
7360     (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
7361     file format
7362     (TestJoinedTable): New test for loading sessions with joined
7363     tables.
7364     (TestLoadError): New. Test whether missing required attributes
7365     cause a LoadError.
7366    
7367     * test/test_save.py (SaveSessionTest.thubanids)
7368     (SaveSessionTest.thubanidrefs): New class attributes for ID
7369     normalization in .thuban files.
7370     (SaveSessionTest.compare_xml): Use id-normalization.
7371     (SaveSessionTest.testEmptySession)
7372     (SaveSessionTest.testLayerProjection)
7373     (SaveSessionTest.testRasterLayer)
7374     (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
7375     (SaveSessionTest.testLayerProjection): The filename used was the
7376     same as for testSingleLayer. Use a different one.
7377     (SaveSessionTest.test_dbf_table)
7378     (SaveSessionTest.test_joined_table): New test cases for saving the
7379     new data sources structures.
7380     (TestStoreSort, MockDataStore): Classes to test the sorting of the
7381     data stores for writing.
7382    
7383     * test/runtests.py: Add CVS keywords
7384    
7385 jonathan 1265 2003-06-20 Jonathan Coles <[email protected]>
7386    
7387 jonathan 1267 * test/test_session.py
7388     (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
7389     Use the cultural_landmark-point.dbf file for the store so that
7390     the table rows and shape count match.
7391    
7392     2003-06-20 Jonathan Coles <[email protected]>
7393    
7394 jonathan 1265 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
7395     an exception if the number of shapes is different from the
7396     number of rows in the table. Address RTbug #1933.
7397    
7398     * test/test_layer.py (TestLayer.test_derived_store): Add
7399     a test for the new exception in DerivedShapeStore.__init__.
7400    
7401     * test/support.py (FloatTestCase): Removed since there is
7402     already FloatComparisonMixin. Fixes RTbug #1954.
7403     (FloatComparisonMixin.assertFloatEqual): Include test for
7404     infinity that was part of FloatTestCase.
7405    
7406     * test/test_range.py (RangeTest): Inherit from
7407     support.FloatComparisonMixin now that we don't have
7408     support.FloatTestCase.
7409    
7410 bh 1256 2003-06-20 Bernhard Herzog <[email protected]>
7411    
7412 bh 1260 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
7413     the implementation in xmlsupport instead.
7414     (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
7415    
7416     * test/test_proj.py: Import sax_eventlist from xmlsupport instead
7417     of test_save
7418    
7419     2003-06-20 Bernhard Herzog <[email protected]>
7420    
7421 bh 1258 * test/test_load.py (LoadSessionTest.check_format): New helper
7422     method to make sure the test files we load might have been written
7423     by the current thuban version.
7424     (ClassificationTest.TestLayers, TestSingleLayer.test)
7425     (TestLayerVisibility.test, TestClassification.test)
7426     (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
7427     Add check_format() calls and fix the thuban data to match the data
7428     that would be written by saving the session loaded from it.
7429    
7430     * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
7431     the same class and function in test_save.
7432    
7433     * test/test_xmlsupport.py (TestEventList): New. test cases for
7434     sax_eventlist
7435    
7436     2003-06-20 Bernhard Herzog <[email protected]>
7437    
7438 bh 1256 * Resources/XML/thuban.dtd: Add comment about which versions of
7439     Thuban are covered by this DTD
7440     (map): Fix content model for layers and raster layers. There can
7441     be any number or layers and raster layers in any order.
7442    
7443 jonathan 1254 2003-06-20 Jonathan Coles <[email protected]>
7444    
7445 jonathan 1265 This is mainly about fixing RTbug #1949.
7446    
7447 jonathan 1254 * Thuban/Model/classification.py: Remove "from __future__"
7448     import statement since python 2.2 is the earliest supported
7449     version.
7450    
7451     * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
7452     Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
7453     depending on the units this projection *forwards* into.
7454    
7455     * Thuban/Model/save.py (SessionSaver.write_classification):
7456     Remove unnecessary use of lambdas and nested functions.
7457    
7458     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
7459     adjustment here if the map projection uses degrees.
7460    
7461     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
7462     scale adjust code since it is now done before calling
7463     this method. Don't do anything if the map projection
7464     is None.
7465    
7466 bh 1244 2003-06-19 Bernhard Herzog <[email protected]>
7467    
7468 bh 1248 Move version specific load tests to their own file.
7469    
7470     * test/test_load.py: Expand the doc-string to explain a bit how to
7471     handle file format changes.
7472     (TestClassification.test): Update the docstring as this test is
7473     not about Thuban 0.2 anymore.
7474    
7475     * test/test_load_0_2.py: New file with the load tests for thuban
7476     files created with Thuban 0.2 and earlier.
7477    
7478     2003-06-19 Bernhard Herzog <[email protected]>
7479    
7480 bh 1246 Add XML validation to some of the tests. Validation will only be
7481     done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
7482     To make the DTD available to the test cases it's moved into
7483     Resources/XML
7484    
7485     * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
7486     for versions up to and including 0.2. Two slight changes: added an
7487     encoding specification and fixed the comment which refered to
7488     GRASS, not Thuban
7489    
7490     * test/xmlsupport.py: New support module for tests involving XML.
7491     Currently there's a mix-in class for XML validation.
7492    
7493     * test/test_xmlsupport.py: New. Tests for the xmlsupport module
7494    
7495     * test/test_save.py (SaveSessionTest): Derive from ValidationTest
7496     so that we can validate the
7497     (SaveSessionTest.testEmptySession)
7498     (SaveSessionTest.testSingleLayer)
7499     (SaveSessionTest.testSingleLayer)
7500     (SaveSessionTest.testLayerProjection)
7501     (SaveSessionTest.testRasterLayer)
7502     (SaveSessionTest.testClassifiedLayer): Validate the generated XML
7503    
7504     * test/runtests.py (main): Call print_additional_summary instead
7505     of print_garbage_information
7506    
7507     * test/support.py (resource_dir): New function to return the
7508     "Resource" subdirectory
7509     (print_additional_summary): New function to combine several
7510     summary functions
7511     (run_tests): Use print_additional_summary instead of calling
7512     print_garbage_information directly
7513    
7514     2003-06-19 Bernhard Herzog <[email protected]>
7515    
7516 bh 1244 * Doc/thuban.dtd (classification): Correct the content model of
7517     the classification element.
7518     (projection): Add the "name" attribute
7519    
7520 frank 1242 2003-06-19 Frank Koormann <[email protected]>
7521    
7522     MERGE from the greater-ms3 branch.
7523    
7524     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
7525     scale if projection is latlong to get better estimate.
7526    
7527     Fix problem of hidden properties dialog under windows after double
7528     click on layer tree:
7529     The tree control always gets an Expanded / Collapsed event after
7530 joey 2162 the ItemActivated on double click, which raises the main window again.
7531     We add a second ItemActivated event to the queue, which simply
7532 frank 1242 raises the already displayed window.
7533    
7534     * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
7535     raiseProperties initialized to prevent endless loops
7536     (LegendTree._OnItemActivated): Depending on self.raiseProperties
7537     simply raise the properties or open the dialog and issue a second
7538     event.
7539    
7540 jonathan 1235 2003-06-18 Jonathan Coles <[email protected]>
7541    
7542 jonathan 1239 * setup.py: Fix a few problems that occured under Windows.
7543    
7544     2003-06-18 Jonathan Coles <[email protected]>
7545    
7546 jonathan 1235 When Thuban loaded the map was redrawn twice because the
7547     legend was being opened after the mainwindow was created
7548     and not during its creation. This meant the map was drawn
7549     initially and then had to be redrawn when the legend
7550     caused the display to change. Now the legend is opened
7551     in the mainwindow constructor which resolves this issue.
7552    
7553     Also, although we were checking for the existence of
7554     gdal and gdalwarp modules, the gdalwarp extension was
7555     still being compiled (which may fail if the system doesn't
7556     have gdal installed). the build_ext command to setup.py
7557     now accepts the flags --with-gdal and --without-gdal.
7558     If --without-gdal is specified setup.py will try to
7559     use the gdal parameters specified by gdal-config. Under
7560     windows, those parameters have to be set in setup.py
7561     as with proj4 an wxWindows.
7562    
7563     * setup.py: Use a list instead of seperate variables for
7564     extension parameters so we can create a generic function
7565     that runs an appropriate *-config script.
7566     (run_cs_script): Renamed from run_wx_script and modified
7567     to accept a second argument which is a list of lists to
7568     be filled in by the values returned from running the command.
7569     (thuban_build_ext): New. Extends the build_ext command and
7570     provides the options --with-gdal/--without-gdal which then
7571     optionally includes the gdalwarp extension.
7572    
7573     * Thuban/Model/resource.py: First check if we can import
7574     the gdalwarp Thuban extension before checking for gdal.
7575     Also added some comments.
7576    
7577     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
7578     the map is None which may be the case if none has been loaded
7579     yet.
7580    
7581     * Thuban/UI/main.py (main): Remove call to ShowLegend.
7582    
7583     * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
7584    
7585     * Thuban/UI/renderer.py: Check for gdal support before importing
7586     gdalwarp.
7587     (MapRenderer.render_map): Only try to optimize if we have gdal
7588     support otherwise nothing will get drawn.
7589    
7590 jonathan 1237 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
7591     during startup before a map has been created. Check if map is None
7592     before using it and do nothing if it is.
7593    
7594 jonathan 1224 2003-06-17 Jonathan Coles <[email protected]>
7595    
7596     Fix the problem with raster layers under Windows that caused
7597     Thuban to crash. The view should respond to layer projection
7598     changed events to update the display. Changes to a projection
7599     should not cause the map to be set to full extent.
7600    
7601     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
7602     current_map_proj to remember the current map projection so that
7603     when the projection changes we know what the previous projection
7604     was.
7605     (MapCanvas.SetMap): Unsubscribe and subscribe to
7606     LAYER_PROJECTION_CHANGED events.
7607     (MapCanvas.projection_changed): Split into two methods that respond
7608     to map and layer projection changes.
7609     (MapCanvas.map_projection_changed): New. Takes the current view and
7610     projects it using the new projection. This does not cause the
7611     map to be redrawn at full extent.
7612     (MapCanvas.layer_projection_changed): New. Cause a redraw which
7613     will draw each layer in its new projection.
7614    
7615     * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
7616     VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
7617     under Windows.
7618    
7619     * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
7620     to twice sizeof(void*) because there are two digits for each
7621     hex byte.
7622    
7623 bh 1220 2003-06-16 Bernhard Herzog <[email protected]>
7624    
7625     Update to the layer interface: Direct access to the table,
7626     shapetable, shapefile and filename attributes is now actively
7627     deprecated by issuing deprecation warnings for all places where
7628     this happens.
7629    
7630     * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
7631     to the instance variables table, shapetable, shapefile and
7632     filename via __getattr__ so that we can issue a deprecation
7633     warning.
7634     (Layer.SetShapeStore): Don't set the deprecated instance variables
7635     any more
7636     (Layer.SetShapeStore): Don't use deprecated layer instance
7637     variables
7638     (Layer.Destroy): No need to explicitly remove the instance
7639     variables any more
7640     (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
7641     instance variables
7642    
7643     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
7644     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
7645     (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
7646     use deprecated layer instance variables
7647    
7648     * Thuban/UI/classifier.py (Classifier.__init__): Don't use
7649     deprecated layer instance variables
7650    
7651     * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
7652     (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
7653     instance variables
7654    
7655     * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
7656     deprecated layer instance variables
7657    
7658     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
7659     deprecated layer instance variables
7660    
7661     * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
7662     deprecated layer instance variables
7663    
7664     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
7665     (MapRenderer.polygon_render_param): Don't use deprecated layer instance
7666     variables
7667    
7668     * test/runtests.py (main): Turn Thuban's deprecation warnings into
7669     errors so that they're cought by the tests
7670    
7671     * test/test_load.py (TestSingleLayer.test): Don't use deprecated
7672     layer instance variables
7673    
7674 jonathan 1212 2003-06-16 Jonathan Coles <[email protected]>
7675    
7676     Fix a problem under Windows whereby if the user double-clicks on a
7677     layer in the legend that tree item will expand or collapse as well
7678     as open the layer properties dialog. The state of the tree item
7679     should not be affected.
7680    
7681     * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
7682     preventExpandCollapse and subscribe to expanding and collapsing
7683     events.
7684     (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
7685     collapsing events and will veto the event if it has been triggered
7686     by the user double clicking on a layer.
7687     (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
7688     that an expanding/collapsing event should be vetoed.
7689    
7690 bh 1208 2003-06-13 Bernhard Herzog <[email protected]>
7691    
7692     * Thuban/UI/classifier.py (Classifier.OnClose)
7693     (Classifier.map_layers_removed)
7694     (Classifier.layer_shapestore_replaced): Unsubscribe the messages
7695     in OnClose and not in map_layers_removed or
7696     layer_shapestore_replaced to make sure it always happens when the
7697     dialog is closed
7698    
7699 jonathan 1201 2003-06-13 Jonathan Coles <[email protected]>
7700    
7701 jonathan 1203 This puts back a fix for Windows where a panel is needed so that
7702     the background of the table view appears correctly.
7703    
7704     * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
7705     object that can be used by derived classes to place any
7706     controls (including the grid) onto.
7707     (QueryTableFrame.__init__): Use the panel as the parent window
7708     for all the controls. Reparent the grid so that the panel is
7709     the parent. Call UpdateStatusText() to correctly initialize
7710     the status bar.
7711    
7712     2003-06-13 Jonathan Coles <[email protected]>
7713    
7714 jonathan 1201 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
7715     from wxFrame (as opposed to wxDialog like the other classes)
7716     but otherwise behaves like the other classes. This is needed
7717     for the TableView which isn't really a dialog and needs to
7718     have a status bar and control buttons.
7719    
7720     * Thuban/UI/tableview.py (TableGrid.__init__): Create an
7721     instance variable to keep track of how many rows are selected.
7722     Subscribe once to the the events we are interested in.
7723     (ThubanGrid.OnRangeSelect): Only handle event if event handling
7724     hasn't been turned off.
7725     (ThubanGrid.OnSelectCell): Only handle event if event handling
7726     hasn't been turned off.
7727     (ThubanGrid.ToggleEventListeners): Rather than subscribe None
7728     as an event listener (which changes the event handler stack)
7729     simply set an instance variable to False. This is checked in
7730     the event handlers.
7731     (ThubanGrid.GetNumberSelected): Return the number of currently
7732     selected rows.
7733     (TableFrame): Inherit from ThubanFrame so we can have a
7734     status bar and control buttons.
7735     (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
7736     Explicitly set which items are selected in the operator choice and
7737     action choice so there is always a valid selection. Fixes RTbug #1941.
7738     Subscribe to grid cell selection events so we can update the
7739     status bar.
7740     (QueryTableFrame.UpdateStatusText): Update the status bar with
7741     how many rows are in the grid, how many columns, and how many
7742     rows are selected.
7743     (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
7744     Call UpdateStatusText when cells are (de)selected.
7745     (QueryTableFrame.OnQuery): Use the string value in the value
7746     combo if either the selected item index is 0 or if the string
7747     cannot be found in the predefined list (this happens if the
7748     user changes the text). Fixes RTbug #1940.
7749     Only turn off the grid event listeners if there a query comes
7750     back with a none empty list of ids. in the case that the list
7751     is empty this causes a grid.ClearSelection() call to actually
7752     clear the grid selection which causes the selected items in
7753     the map to be deselected. Fixes RTbug #1939.
7754    
7755     * test/test_save.py (XMLWriterTest.Encode): Check return values.
7756     Fixes RTbug #1851.
7757    
7758 bh 1195 2003-06-13 Bernhard Herzog <[email protected]>
7759    
7760     * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
7761     self.selected_shape with the current selection to make sure the
7762     contents of the dialog are up to date when it's shown for the
7763     first time.
7764     The dialog used to work without this by luck. The recent fix to
7765     the connector module 'broke' a 'feature' the identify view was
7766     relying on, i.e that subscribing to a message in response to
7767     receiving a message of that type would mean that the new
7768     subscriber would also be called for the same message.
7769    
7770 jonathan 1169 2003-06-12 Jonathan Coles <[email protected]>
7771 jonathan 1175
7772 jonathan 1193 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
7773     the image is rendered. Fixes RTbug #1937.
7774    
7775     2003-06-12 Jonathan Coles <[email protected]>
7776    
7777 jonathan 1191 * Thuban/Lib/fileutil.py: As is done under Windows, create the
7778 jonathan 1193 user directory if it doesn't exist on a posix system.
7779     Fixes RTbug #1815.
7780 jonathan 1191
7781     * Thuban/Model/resource.py (get_user_proj_files): Moved the
7782     called to get_application_dir here, so that the directory
7783     will only be called if this method is invoked.
7784    
7785     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
7786     the projfilepath if no projection is selected.
7787    
7788     2003-06-12 Jonathan Coles <[email protected]>
7789    
7790 jonathan 1182 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
7791     the scalebar if the current map has no projection set.
7792    
7793     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
7794     projfilepath label to just the basename of the projection file
7795     rather than include the entire path.
7796    
7797     * Thuban/Model/resource.py: Fix missed proj functions that
7798     needed to be renamed.
7799    
7800     2003-06-12 Jonathan Coles <[email protected]>
7801    
7802 jonathan 1178 * Thuban/Model/classification.py: Removed assert statements that
7803     tested if the variable was an instance of Color.
7804    
7805     * Thuban/Model/color.py (Color): Remove commented code that isn't
7806     used.
7807     (Transparent): Renamed from NoColor. Doesn't inherit from Color.
7808     Fixes RTbug #1835.
7809     (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
7810     Needed now that the class doesn't inherit from Color.
7811    
7812     2003-06-12 Jonathan Coles <[email protected]>
7813    
7814 jonathan 1175 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
7815     check unicode strings.
7816    
7817     * test/test_layer.py: Check for existence of gdal.
7818    
7819     2003-06-12 Jonathan Coles <[email protected]>
7820 jonathan 1172
7821     * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
7822     that was in load.py
7823 jonathan 1169
7824 jonathan 1172 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
7825     that was in save.py
7826    
7827     2003-06-12 Jonathan Coles <[email protected]>
7828    
7829 jonathan 1169 This is largely a collection of bug fixes. We also handle the
7830     case where gdal is not on the system. The XMLReader and XMLWriter
7831     classes were moved into there own files to resolve some circular
7832     import references and because they shouldn't really be in the
7833     file that is dediciated to reading/writing session files since
7834     they are also used elsewhere.
7835    
7836     * Thuban/Model/classgen.py: Renamed functions to follow the
7837     function_names_with_underscores style. Fixes RTbug #1903.
7838     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
7839    
7840     * Thuban/Model/layer.py: Import gdal only if it available.
7841     (RasterLayer): Handle the case where the gdal library is unavailable.
7842     Addresses RTbug #1877.
7843    
7844     * Thuban/Model/load.py (XMLReader): Moved into seperate file
7845     xmlreader.py.
7846    
7847 jonathan 1172 2003-06-12 Jonathan Coles <[email protected]>
7848    
7849     This is largely a collection of bug fixes. We also handle the
7850     case where gdal is not on the system. The XMLReader and XMLWriter
7851     classes were moved into there own files to resolve some circular
7852     import references and because they shouldn't really be in the
7853     file that is dediciated to reading/writing session files since
7854     they are also used elsewhere.
7855    
7856     * Thuban/Model/classgen.py: Renamed functions to follow the
7857     function_names_with_underscores style. Fixes RTbug #1903.
7858     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
7859    
7860     * Thuban/Model/layer.py: Import gdal only if it available.
7861     (RasterLayer): Handle the case where the gdal library is unavailable.
7862     Addresses RTbug #1877.
7863    
7864     * Thuban/Model/load.py (XMLReader): Moved into seperate file
7865     xmlreader.py.
7866    
7867 jonathan 1169 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
7868     file xmlwriter.py.
7869    
7870     * Thuban/Model/resource.py: Renamed functions to following the
7871     function_names_with_underscores style.
7872     (has_gdal_support): New function that returns true if the gdal
7873     library is available. Addresses RTbug #1877.
7874    
7875     * Thuban/UI/application.py (ThubanApplication.OpenSession):
7876     Display a message box if the gdal library is not available, but
7877     only if there are any layers that would use it. Addresses RTbug #1877.
7878    
7879     * Thuban/UI/classgen.py: Use renamed projection resource functions.
7880     (GenUniformPanel.__CalcStepping): Fix a slight discrepency
7881     when using integers versus floats.
7882    
7883     * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
7884     determine if the "Add Image Layer" menu option should be
7885     greyed out or not. Addresses RTbug #1877.
7886    
7887     * Thuban/UI/projdialog.py: Use renamed projection resource functions.
7888    
7889     * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
7890     optimize if a raster layer is visible. Fixes RTbug #1931.
7891     Only draw the raster layer if the gdal library is available.
7892     Addresses RTbug #1877.
7893    
7894     * test/test_classgen.py: Add tests for generate_singletons,
7895     generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
7896     (test_calculate_quantiles): Fix some tests to catch the new
7897     ValueError that is raised.
7898    
7899     * test/test_proj.py: Use renamed projection resource functions.
7900    
7901     * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
7902     test for saving classified layers. Fixes RTbug #1902.
7903     (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
7904    
7905 jan 1156 2003-06-12 Jan-Oliver Wagner <[email protected]>
7906    
7907     Fix for http://intevation.de/rt/webrt?serial_num=1900.
7908    
7909     * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
7910    
7911     * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
7912     multiplechoicedialog.py rather than from the wxPython library.
7913    
7914 frank 1151 2003-06-11 Frank Koormann <[email protected]>
7915    
7916 frank 1152 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
7917     update.
7918    
7919     2003-06-11 Frank Koormann <[email protected]>
7920    
7921 frank 1151 * Thuban/Lib/fileutil.py (get_application_dir): New function to
7922     determine the absolute .thuban/thuban directory under
7923     "posix" (os.expanduser) and "nt" (read AppData registry key).
7924    
7925     * Thuban/Model/resource.py: Use get_application_dir
7926    
7927     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
7928     Use get_application_dir.
7929    
7930 bh 1143 2003-06-10 Bernhard Herzog <[email protected]>
7931    
7932 bh 1147 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
7933     the messages MAP_LAYERS_REMOVED messages
7934     (LayerTableFrame.OnClose): Unsubscribe from it.
7935     (LayerTableFrame.map_layers_removed): New. Receiver for
7936     MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
7937     dialog is showing is removed.
7938    
7939     2003-06-10 Bernhard Herzog <[email protected]>
7940    
7941 bh 1145 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
7942     of the receivers list so that unsubscribing in a receiver doesn't
7943     modify it while iterating over it.
7944    
7945     * test/test_connector.py
7946     (ConnectorTest.test_disconnect_in_receiver): New. Test whether
7947     unsubscribing in a receiver works correctly. See docstring for
7948     details
7949    
7950     2003-06-10 Bernhard Herzog <[email protected]>
7951    
7952 bh 1143 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
7953     message.
7954    
7955     * Thuban/Model/layer.py (Layer.SetShapeStore): Send
7956     LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
7957     LAYER_CHANGED will still be sent if the classification changes.
7958    
7959     * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
7960     parameter so we can subscribe to some of its messages
7961     (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
7962     and the layer's LAYER_SHAPESTORE_REPLACED
7963     (Classifier.unsubscribe_messages): New. Unsubscribe from message
7964     subscribed to in __init__
7965     (Classifier.map_layers_removed)
7966     (Classifier.layer_shapestore_replaced): receivers for the messages
7967     subscribed to in __init__. Unsubscribe and close the dialog
7968    
7969     * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
7970     the map to the Classifier dialog
7971    
7972     * test/test_layer.py (SetShapeStoreTests): Derive from
7973     SubscriberMixin as well so we can test messages
7974     (SetShapeStoreTests.setUp): Subscribe to some of the layer's
7975     messages
7976     (SetShapeStoreTests.tearDown): Clear the messages again
7977     (SetShapeStoreTests.test_sanity): Expand the doc-string and check
7978     for the modified flag too
7979     (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
7980     to check whether SetShapeStore sets the modified flag
7981     (SetShapeStoreTests.test_set_shape_store_different_field_name)
7982     (SetShapeStoreTests.test_set_shape_store_same_field)
7983     (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
7984     Add tests for the messages. This checks both the new
7985     LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
7986    
7987 jan 1141 2003-06-06 Jan-Oliver Wagner <[email protected]>
7988    
7989     * Thuban/UI/mainwindow.py: Improved and partly added help texts for
7990     the menu items.
7991    
7992 frank 1134 2003-06-05 Frank Koormann <[email protected]>
7993    
7994 frank 1139 * Thuban/UI/identifyview.py (IdentifyView.__init__):
7995     Layout reimplemented without panel. Make life easier to fit the list
7996     in the dialog.
7997    
7998     2003-06-05 Frank Koormann <[email protected]>
7999    
8000 frank 1137 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
8001     once on initialisation (Former implementation resulted in multiple
8002     entries for each projection).
8003     (ProjFrame.__FillAvailList): selectProj as second optional parameter,
8004     if set, select the projection found under the specified name. This
8005     overwrites any other selection estimate.
8006     Removed projchoice filling from this method.
8007     (ProjFrame._OnSave, ProjFrame._OnAddToList):
8008     Updated call of ProjFrame.__FillAvailList
8009     (LCCPanel._DoLayout): Moved parameter controls in more common order.
8010    
8011     * Resources/Projections/defaults.proj: Extended defaults representing
8012     various common European projections.
8013    
8014     2003-06-05 Frank Koormann <[email protected]>
8015    
8016 frank 1134 * Thuban/UI/identifyview.py (IdentifyView.__init__):
8017     Use ListCtrl instead of GridCtrl
8018    
8019     * Thuban/Model/resource.py:
8020     Guess location of .thuban directory from tempdir parent directory.
8021    
8022     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
8023     Guess location of .thuban directory from tempdir parent directory.
8024    
8025 bh 1130 2003-06-04 Bernhard Herzog <[email protected]>
8026    
8027     Do not cache the values returned by the tree widget's
8028     GetFirstChild and GetNextChild methods because it led to lots of
8029     segfaults. The new way requires more brute force but is more
8030     reliable.
8031    
8032     * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
8033     variable layer2id
8034     (LegendTree.find_layer): New method to do with brute force what
8035     layer2id tried to accomplish
8036     (LegendTree._OnMsgLayerChanged)
8037     (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
8038     Use find_layer instead of layer2id
8039     (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
8040     update layer2id anymore
8041     (LegendTree._OnMsgMapLayersRemoved)
8042     (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
8043    
8044 tkoester 1128 2003-06-03 Thomas Koester <[email protected]>
8045    
8046     * Thuban/Model/classgen.py (GenQuantiles0): New function.
8047    
8048 bh 1120 2003-06-02 Bernhard Herzog <[email protected]>
8049    
8050 bh 1127 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
8051     New commands.
8052     (main_menu): Add the new commands.
8053     (MainWindow.TableRename): New. Implementation of the table_rename
8054     command.
8055     (MainWindow.RenameLayer): New. Implementation of the layer_rename
8056     command.
8057    
8058     * Thuban/Model/session.py (Session.AddTable): call self.changed to
8059     set the modified flag
8060    
8061     * test/test_session.py (TestSessionSimple.test_add_table): Test
8062     whether the modified flag is set properly
8063    
8064     * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
8065     instead of issue so that the modified flags get updated.
8066    
8067     * test/test_base.py (SomeTitledObject): Derive from Modifiable
8068     instead of Publisher to reflect reality better and to accomodate
8069     the fact that SetTitle now calls changed instead of issue
8070    
8071     2003-06-02 Bernhard Herzog <[email protected]>
8072    
8073     * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
8074     acquisition has to happen before the try in a try-finally.
8075    
8076     2003-06-02 Bernhard Herzog <[email protected]>
8077    
8078 bh 1120 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
8079     possible that a layer is removed that is not currently selected in
8080     the legend so don't check for this.
8081    
8082 bh 1112 2003-05-30 Bernhard Herzog <[email protected]>
8083    
8084 bh 1118 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
8085     variables to None that have direct or indirect references to
8086     shapefiles or dbf files to make sure that they do go away and the
8087     files are closed.
8088    
8089     2003-05-30 Bernhard Herzog <[email protected]>
8090    
8091 bh 1116 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
8092     availImgListIndices when a new image list is created
8093    
8094     2003-05-30 Bernhard Herzog <[email protected]>
8095    
8096 bh 1114 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
8097     changing_selection to indicate whether the LegendTree code itself
8098     is currently changing the selection
8099     (LegendTree.normalize_selection): New method to normalize the
8100     selection by selecting the layer item even if the user clicked on
8101     the classification.
8102     (LegendTree._OnSelChanged): normalize the selection. This works
8103     around a bug in wx which doesn't keep track of the selection
8104     properly when subtrees are deleted.
8105    
8106     2003-05-30 Bernhard Herzog <[email protected]>
8107    
8108 bh 1112 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
8109     maximum and minimum scale factors.
8110    
8111     * test/test_classgen.py (ClassGenTest.test): Update to reflect the
8112     changes in classgen.py
8113    
8114 jonathan 1109 2003-05-30 Jonathan Coles <[email protected]>
8115    
8116     * Thuban/Model/classgen.py: Remove ClassGenerator class but make
8117     all the methods functions. Fixes RTBug #1903.
8118    
8119     * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
8120     to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
8121     RTBug #1907.
8122    
8123     * Thuban/UI/classgen.py: Use classgen functions that were part
8124     of the ClassGenerator class. Put try/finally blocks around
8125     code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
8126     RTBug #1904.
8127    
8128     * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
8129    
8130     * Thuban/UI/legend.py: The legend was cleared and repopulated any
8131     time something changed which caused some state to be lost such
8132     as which children were expanded or collapsed. Fixes RTBug #1901.
8133     (LegendTree._OnMsgMapLayersAdded): Add only new layers.
8134     (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
8135     the legend but not in the map.
8136     (LegendTree.__FillTree): Move main functionality out into smaller
8137     methods that can be used by other methods.
8138     (LegendTree.__FillTreeLayer): Reuse old slots in the image list
8139     if they are available.
8140     (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
8141     that we override the wxTreeCtrl method. Iterate over children
8142     and call __RemoveLayer.
8143     (LegendTree.__AddLayer): New. Add a new layer to the legend.
8144     (LegendTree.__RemoveLayer): Remove a layer from the legend.
8145     (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
8146     Should only be called with the id of a layer branch.
8147     (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
8148     Returns the root item or creates one if necessary.
8149    
8150     * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
8151     ProjectRasterFile with tuple arguments instead of strings.
8152    
8153     * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
8154     with try/finally. Fixes RTBug #1904.
8155    
8156     * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
8157     with try/finally. Fixes RTBug #1904.
8158     (MapCanvas.FitSelectedToWindow): If a single point is selected
8159     simply center it on the display. Fixes RTBug #1849.
8160    
8161     * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
8162     to be compiled as a standalone app. Now the code can only be
8163     called from Python which simplifies the parameter passing.
8164     (ProjectRasterFile): Handle Python arguments. Remove code that
8165     checks for a destination dataset. Add more clean up code.
8166    
8167     * test/test_map.py (TestMapWithContents.test_raise_layer_top,
8168     TestMapWithContents.test_lower_layer_bottom):
8169     Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
8170     Fixes RTBug #1907.
8171    
8172     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
8173     extent to the map when the legend is toggled. Fixes RTBug #1881.
8174    
8175 jan 1097 2003-05-29 Jan-Oliver Wagner <[email protected]>
8176    
8177     * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
8178     unsubscribes all that is subcribed in __init__.
8179    
8180 bh 1089 2003-05-28 Bernhard Herzog <[email protected]>
8181    
8182 bh 1095 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
8183     (MainWindow.CanDuplicateLayer): New methods to implement the
8184     Layer/Duplicate command.
8185     (layer_duplicate command): New.
8186     (main_menu): Add layer_duplicate to the Layer menu.
8187    
8188     2003-05-28 Bernhard Herzog <[email protected]>
8189    
8190 bh 1093 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
8191     renderer so that NULL/None values get displayed differently (by a
8192     gray rectangle).
8193     (TableGrid.__init__): Override the default renderers
8194    
8195     2003-05-28 Bernhard Herzog <[email protected]>
8196    
8197 bh 1089 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
8198     classification to "None" if the type of the field has changed.
8199    
8200     * test/test_layer.py (SetShapeStoreTests): New. Class with a few
8201     test for the Layer.SetShapeStore method
8202    
8203 jan 1087 2003-05-28 Jan-Oliver Wagner <[email protected]>
8204 jan 1085
8205 jan 1087 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
8206     does not necessarily have a filename).
8207    
8208     2003-05-28 Jan-Oliver Wagner <[email protected]>
8209    
8210 jan 1085 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
8211     sort the selection list for the dialog.
8212    
8213 frank 1083 2003-05-28 Frank Koormann <[email protected]>
8214    
8215     * extensions/thuban/wxproj.cpp
8216     (project_point): Removed cast to int for projected point coordinates.
8217     (shape_centroid): Return last point if all polygon vertices fall
8218     to one point.
8219    
8220 bh 1079 2003-05-28 Bernhard Herzog <[email protected]>
8221    
8222 bh 1081 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
8223     with layers that don't have shapestores, i.e. raster layers.
8224    
8225     2003-05-28 Bernhard Herzog <[email protected]>
8226    
8227 bh 1079 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
8228     when determining the title from the filename.
8229    
8230     * test/test_dbf_table.py (TestDBFTable.test_title): Update to
8231     reflect changes in the way the title is derived from the filename
8232    
8233 frank 1077 2003-05-28 Frank Koormann <[email protected]>
8234    
8235     * Thuban/UI/mainwindow.py (MainWindow.TableShow):
8236     Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
8237    
8238 bh 1069 2003-05-27 Bernhard Herzog <[email protected]>
8239    
8240 bh 1075 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
8241     delegate SelectedLayer.
8242     (MainWindow.LayerUnjoinTable): Implement.
8243     (_can_unjoin): New. Helper function for the sensitivity of the
8244     layer/unjoin command.
8245    
8246     * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
8247     (DerivedShapeStore.OrigShapeStore): New. Return the original
8248     shapestore. Used to figure out how to unjoin.
8249     (DerivedShapeStore.Shapefile): Fix a typo.
8250    
8251     2003-05-27 Bernhard Herzog <[email protected]>
8252    
8253 bh 1073 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
8254     well
8255     (JoinDialog.__init__): Use the layer parameter and only build the
8256     left choice when a layer is given
8257     (JoinDialog.OnJoin): Handle layer joins as well
8258     (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
8259     that the user selects the "Select..." item. The sensitivitly
8260     updating is now in update_sensitivity
8261     (JoinDialog.y): New method to refactor the sensitivity update of
8262     the join button into its own method.
8263    
8264     * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
8265    
8266     2003-05-27 Bernhard Herzog <[email protected]>
8267    
8268 bh 1071 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
8269     iff there are unreferenced tables in the session
8270    
8271     2003-05-27 Bernhard Herzog <[email protected]>
8272    
8273 bh 1069 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
8274    
8275     * Thuban/Model/session.py (Session.UnreferencedTables): New method
8276     to return tables that are not referenced by other tables or shape
8277     stores and can be removed.
8278     (Session.RemoveTable): Issue a TABLE_REMOVED message after
8279     removing the table
8280    
8281     * Thuban/UI/mainwindow.py: Remove unused imports
8282     (MainWindow.TableClose): Implement.
8283    
8284     * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
8285     messages so that the frame will be automatically closed when a new
8286     session is opened or the table is removed.
8287     (TableFrame.OnClose): Unsubscribe the Subscriptions made in
8288     __init__
8289     (TableFrame.close_on_session_replaced)
8290     (TableFrame.close_on_table_removed): New. Subscribers that close
8291     the window
8292    
8293     * test/test_session.py (TestSessionMessages.test_remove_table)
8294     (TestSessionSimple.test_remove_table): Move the test to
8295     TestSessionSimple and add test for the TABLE_REMOVED message
8296     (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
8297     (TestSessionSimple.test_unreferenced_tables) New. Test for the
8298     UnreferencedTables method.
8299     (UnreferencedTablesTests): New. Class with some more sophisticated
8300     tests for UnreferencedTables.
8301    
8302 frank 1065 2003-05-27 Frank Koormann <[email protected]>
8303    
8304 frank 1067 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
8305     display has some unwanted side effects. Removed again.
8306    
8307     2003-05-27 Frank Koormann <[email protected]>
8308    
8309 frank 1065 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
8310    
8311     * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
8312    
8313 jan 1062 2003-05-27 Jan-Oliver Wagner <[email protected]>
8314    
8315 bh 1069 * test/test_menu.py (MenuTest.test): Added test for
8316     Menu.RemoveItem().
8317 jan 1062
8318 bh 1069 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
8319     the menu.
8320 jan 1062
8321 frank 1059 2003-05-27 Frank Koormann <[email protected]>
8322    
8323     Nonmodal dialogs without parent (i.e. they can fall behind the main
8324     window)
8325    
8326     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
8327     all dialogs in the dialogs dictionary and the canvas.
8328    
8329     * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
8330     parent, i.e. can fall behind other windows.
8331     (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
8332     dictionary before removing it.
8333    
8334     * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
8335    
8336     * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
8337     * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
8338     * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
8339    
8340 bh 1053 2003-05-27 Bernhard Herzog <[email protected]>
8341    
8342 bh 1055 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
8343     tableview dialog
8344     (MainWindow.TableShow): Use ShowTableView to open the dialogs.
8345     Also, don't use the table's titles as the dialog names. The titles
8346     aren't guaranteed to be unique.
8347     (MainWindow.TableOpen): Open a table view dialog after opening the
8348     table
8349    
8350     2003-05-27 Bernhard Herzog <[email protected]>
8351    
8352 bh 1053 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
8353     effect can be achieved by simply closing the window showing the
8354     table.
8355     (MainWindow.TableHide): Removed.
8356     (main_menu): Removed "table_hide"
8357    
8358 frank 1051 2003-05-27 Frank Koormann <[email protected]>
8359    
8360     Fix legend tree display problems under Win32
8361    
8362     * Thuban/UI/legend.py: BMP_SIZE_W = 15
8363     (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
8364     (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
8365    
8366     * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
8367    
8368 jan 1048 2003-05-27 Jan-Oliver Wagner <[email protected]>
8369    
8370     * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
8371     'after' now allows to insert separators almost anywhere in the menu.
8372    
8373 frank 1046 2003-05-27 Frank Koormann <[email protected]>
8374    
8375     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
8376     "S" of selection box label to hint on hot key (Alt-S). Works under
8377     Win32 but is ignored under GTK.
8378    
8379     2003-05-26 Frank Koormann <[email protected]>
8380    
8381     * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
8382     Center Choices.
8383    
8384 bh 1038 2003-05-26 Bernhard Herzog <[email protected]>
8385    
8386 bh 1044 Remove the Precision methods again. They're too DBF specific to be
8387     part of the table interface and they're only used in table_to_dbf
8388     anyway.
8389    
8390     * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
8391     fixed precision of 12 for doubles.
8392     (TransientTableBase.Precision): Removed
8393     (AutoTransientTable.Width): Delegate to self.table.
8394    
8395     * Thuban/Model/table.py (DBFTable.Precision)
8396     (MemoryTable.Precision): Removed.
8397     (MemoryTable.Width): Use a fixed precision of 12 for doubles.
8398     (table_to_dbf): Use a fixed precision of 12 for floats unless the
8399     column object specifies something else.
8400    
8401     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
8402     test for table_to_dbf
8403    
8404     2003-05-26 Bernhard Herzog <[email protected]>
8405    
8406     * test/test_transientdb.py
8407     (TestTransientTable.run_iceland_political_tests): Fix a comment.
8408    
8409     2003-05-26 Bernhard Herzog <[email protected]>
8410    
8411 bh 1038 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
8412     implementation. Mark parts of the file format strings for
8413     localization.
8414    
8415     * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
8416     file and add the table to the tables managed by the session
8417    
8418 bh 1040 * test/test_session.py (TestSessionSimple.test_open_table_file):
8419     New. test case for OpenTableFile
8420    
8421 jan 1033 2003-05-26 Jan-Oliver Wagner <[email protected]>
8422    
8423 jan 1035 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
8424     Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
8425     Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
8426     Replace the true/false of wxWindows by True/False of Python 2.2.1.
8427    
8428     2003-05-26 Jan-Oliver Wagner <[email protected]>
8429    
8430 bh 1038 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
8431     already a selection present, update the grid accordingly.
8432 jan 1033
8433     * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
8434     resizeable and increase its initial size.
8435    
8436 frank 1030 2003-05-26 Frank Koormann <[email protected]>
8437    
8438     Table export functionality
8439    
8440     * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
8441     Return width (in characters) for a column.
8442     (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
8443     (table_to_dbf): Write table to dbf file.
8444     (table_to_csv): Write table to csv file.
8445    
8446     * Thuban/Model/transientdb.py (TransientTableBase.Width,
8447     TransientTableBase.Precision): Return column width and precision.
8448    
8449     * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
8450     or table_to_csv depending on file selection.
8451    
8452     * test/test_dbf_table.py:
8453     Test table_to_dbf (extension of former part of test).
8454    
8455     * test/test_csv_table.py:
8456     Test table_to_csv.
8457    
8458 jan 1021 2003-05-23 Jan-Oliver Wagner <[email protected]>
8459    
8460 jan 1024 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
8461     Use QueryTableFrame instead of TableFrame.
8462 jan 1021
8463 jan 1024 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
8464     table window with 'Layer Table:' instead of 'Table:'.
8465    
8466     2003-05-23 Jan-Oliver Wagner <[email protected]>
8467    
8468     Give all tables a title via mix-in TitledObject.LayerShowTable
8469    
8470 jan 1021 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
8471     only if it exists.
8472    
8473     * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
8474     and call its init-method with a default title. Remove Title() method.
8475    
8476     * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
8477     AutoTransientTable): mix-in TitledObject and call its init-method with
8478     a default title. Remove Title() method.
8479    
8480 bh 1017 2003-05-23 Bernhard Herzog <[email protected]>
8481    
8482     * Thuban/Model/session.py (Session.AddShapeStore): Define
8483     AddShapeStore analogously to AddTable.
8484    
8485     * test/test_session.py (TestSessionSimple.test_add_shapestore):
8486     New. Test for AddShapeStore
8487    
8488 jan 1015 2003-05-23 Jan-Oliver Wagner <[email protected]>
8489    
8490     Introducing QueryTableFrame and a very coarse ShowTable implementation.
8491    
8492     * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
8493     class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
8494     The latter implements the selection GUI without dependency on a layer.
8495     LayerTableFrame now is derived from QueryTableFrame and connects
8496     to a layer.
8497    
8498     * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
8499     implementation that still needs work.
8500    
8501     * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
8502    
8503 frank 1011 2003-05-22 Frank Koormann <[email protected]>
8504    
8505     * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
8506     Added "outer_join = False" as optional parameter.
8507     (TransientJoinedTable.create): If outer join is true, perform a
8508     "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
8509     the left table. Records not matching are filled with 0 / None.
8510    
8511     * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
8512     (JoinDialog.OnJoin): Consider outer join check box.
8513    
8514 bh 1006 2003-05-22 Bernhard Herzog <[email protected]>
8515    
8516 bh 1008 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
8517     somewhat safer way. Storing the traceback in a local variable can
8518     lead to memory leaks
8519    
8520     2003-05-22 Bernhard Herzog <[email protected]>
8521    
8522 bh 1006 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
8523     the wxMessageDialog's Destroy() method.
8524    
8525 frank 1004 2003-05-22 Frank Koormann <[email protected]>
8526    
8527     * Thuban/UI/join.py (JoinDialog.__init__): Make use of
8528     TransientTable.Title()
8529    
8530     2003-05-22 Frank Koormann <[email protected]>
8531    
8532     Join Dialog, initial version.
8533    
8534     * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
8535    
8536     * Thuban/UI/join.py (JoinDialog): Functional implementation of
8537     former framework. Renamed Table1/Table2 to LeftTable/RightTable
8538     in all occurences.
8539    
8540     * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
8541     Typo fixed.
8542    
8543 bh 995 2003-05-22 Bernhard Herzog <[email protected]>
8544    
8545 bh 999 Give the tables titles so that the GUI can display more meaningful
8546     names. For now the titles are fixed but depend on e.g. filenames
8547     or the titles of the joined tables.
8548    
8549     * Thuban/Model/transientdb.py (TransientTable.Title)
8550     (TransientJoinedTable.Title, AutoTransientTable.Title): New.
8551    
8552     * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
8553    
8554     * test/test_transientdb.py
8555     (TestTransientTable.test_auto_transient_table_title): New. Test
8556     for the Title method
8557     (TestTransientTable.test_transient_joined_table)
8558     (TestTransientTable.test_transient_table): Add test for the Title
8559     methods
8560    
8561     * test/test_memory_table.py (TestMemoryTable.test_title): New.
8562     Test for the Title method
8563    
8564     * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
8565     the Title method
8566    
8567     2003-05-22 Bernhard Herzog <[email protected]>
8568    
8569 bh 997 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
8570     Provide a better way to destroy the layers
8571     (TestLayer.test_base_layer, TestLayer.test_arc_layer)
8572     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
8573     (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
8574     the new way to destroy the layers.
8575     (TestLayer.test_derived_store): New. Test for using a layer with a
8576     DerivedShapeStore
8577    
8578     * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
8579     filename if the shape store actually has one.
8580    
8581     2003-05-22 Bernhard Herzog <[email protected]>
8582    
8583 bh 995 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
8584     for the filename
8585    
8586     * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
8587     for the FileName method
8588     (TestDBFTableWriting.test_write): Fix spelling of filename
8589    
8590 tkoester 993 2003-05-22 Thomas Koester <[email protected]>
8591    
8592     * Thuban/Model/range.py, test/test_range.py: Brought over new Range
8593     from SciParam that now really is immutable.
8594    
8595 frank 992 2003-05-22 Frank Koormann <[email protected]>
8596    
8597     Layer Top/Bottom placement added to legend.
8598    
8599     * Thuban/UI/legend.py
8600     (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
8601     bound to tool events.
8602     (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
8603     New, methods binding the event methods with the map methods.
8604    
8605     * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
8606     layer at top/bottom of layer stack.
8607    
8608     * Resources/Bitmaps/top_layer.xpm: New button icon.
8609    
8610     * Resources/Bitmaps/bottom_layer.xpm: New button icon.
8611    
8612 bh 988 2003-05-22 Bernhard Herzog <[email protected]>
8613    
8614     * Thuban/Model/session.py (Session.RemoveTable): New method to
8615     remove tables
8616    
8617     * test/test_session.py (TestSessionSimple.test_remove_table): New.
8618     Test for RemoveTable
8619    
8620 tkoester 986 2003-05-22 Thomas Koester <[email protected]>
8621    
8622     * Thuban/Model/classgen.py: Added short module doc string and CVS id.
8623     (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
8624    
8625 bh 983 2003-05-22 Bernhard Herzog <[email protected]>
8626    
8627 bh 985 Implement a way to discover dependencies between tables and
8628     shapestores.
8629    
8630     * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
8631     (TransientJoinedTable.Dependencies)
8632     (AutoTransientTable.SimpleQuery): New. Implement the dependencies
8633     interface
8634     (TransientJoinedTable.__init__): Keep tack of the original table
8635     objects in addition to the corresponding transient tables.
8636    
8637     * Thuban/Model/table.py (DBFTable.Dependencies)
8638     (MemoryTable.Dependencies): New. Implement the dependencies
8639     interface
8640    
8641     * Thuban/Model/data.py (ShapeTable): New. Helper class for
8642     ShapefileStore
8643     (ShapefileStore.__init__): Use ShapeTable instead of
8644     AutoTransientTable
8645     (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
8646     (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
8647     methods for filename and type
8648     (ShapefileStore.Dependencies): New. Implement the dependencies
8649     interface
8650     (DerivedShapeStore): New class to replace SimpleStore. The main
8651     difference to SimpleStore is that it depends not on a shapefile
8652     but another shapestore which expresses the dependencies a bit
8653     better
8654     (SimpleStore.__init__): Add deprecation warning.
8655    
8656     * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
8657     Test for the Dependencies method.
8658    
8659     * test/test_memory_table.py (TestMemoryTable.test_dependencies):
8660     New. Test for the Dependencies method.
8661    
8662     * test/test_transientdb.py
8663     (TestTransientTable.test_auto_transient_table_dependencies): New.
8664     Test for the Dependencies method.
8665     (TestTransientTable.test_transient_joined_table): Add test for the
8666     Dependencies method.
8667    
8668     * test/test_session.py (TestSessionSimple.setUp)
8669     (TestSessionSimple.tearDown): New. Implement a better way to
8670     destroy the sessions.
8671     (TestSessionSimple.test_initial_state)
8672     (TestSessionSimple.test_add_table): Bind session to self.session
8673     so that it's destroyed by tearDown
8674     (TestSessionSimple.test_open_shapefile): New. Test for
8675     OpenShapefile and the object it returns
8676    
8677     2003-05-22 Bernhard Herzog <[email protected]>
8678    
8679 bh 983 * Thuban/Model/session.py (Session.AddTable): New method to
8680     register tables with the session.
8681     (Session.Tables): Return the tables registered with AddTable too.
8682    
8683     * test/test_session.py (TestSessionSimple.test_add_table): New.
8684     Test case for the AddTable method
8685    
8686 frank 981 2003-05-22 Frank Koormann <[email protected]>
8687    
8688     UI polishing updates: Place main buttons (OK, Cancel, etc) in the
8689     lower right corner, center labels for selections, initialize controls
8690     in reasonable order for keyboard navigation.
8691    
8692     * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
8693     (ProjFrame.__DoOnProjAvail): Determine position of current projection
8694     using the wxListBox.FindString() method. Still a problem (#1886)
8695    
8696     * Thuban/UI/classifier.py
8697     (Classifier.__init__, SelectPropertiesDialog.__init__)
8698    
8699     * Thuban/UI/classgen.py (ClassGenDialog.__init__,
8700     (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
8701     different classification types from here to __init__.
8702     (GenUniquePanel.__init__): Set the column width of the first field
8703     in the Field ListCtrl to the full width.
8704    
8705     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
8706     Button to 'Export'. Center Buttons in Selection Box, set Focus to
8707     Grid.
8708     (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
8709     changes focus to the Selection when pressing "Alt-S".
8710    
8711     * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
8712     the text if not visible. The italic font sometimes exceeds the
8713     rendering area.
8714    
8715 jonathan 972 2003-05-21 Jonathan Coles <[email protected]>
8716 jonathan 971
8717 jonathan 975 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
8718     to OnClose so that Thuban closes correctly.
8719    
8720     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
8721     DockFrame.OnClose, not DockFrame._OnClose.
8722    
8723     2003-05-21 Jonathan Coles <[email protected]>
8724    
8725 jonathan 971 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
8726     references to 'inf' and use new Range __init__ to pass floats
8727     directly rather than converting them to strings first.
8728     Fixes RTBug #1876.
8729    
8730     * Thuban/Model/classification.py (ClassGroupRange.SetRange):
8731     Use new Range ___init__ to pass floats.
8732    
8733     * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
8734     filename is a valid image file. Throw IOError otherwise.
8735    
8736     * Thuban/Model/range.py: Brought over new Range from SciParam that
8737     is immutable and has an __init__ which can accept floats.
8738    
8739     * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
8740     into try block. AddLayer doesn't throw any exceptions anymore.
8741     (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
8742     try block.
8743    
8744     * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
8745     the first item in choices. Fixes RTBug #1882.
8746    
8747     * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
8748     has gone to 0 which is a serious problem. abort.
8749     (MapRenderer.draw_raster_layer): Catch IOError seperately and
8750     print the error from GDAL.
8751    
8752     * Thuban/UI/tableview.py (TableGrid.__init__): Call
8753     ToggleEventListeners to turn on listening.
8754     (TableGrid.ToggleEventListeners): New. Turns event listening on
8755     and off so as to prevent excessive messages.
8756     (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
8757     to suppress excessive messages when selecting many rows.
8758     Fixes RTBug #1880.
8759    
8760     * Thuban/UI/view.py: Added checks against if scale == 0. This
8761     is a serious problem that can occur when an image without
8762     geo data is loading and causes the map projection bounds to
8763     go to infinity. Right now, the solution is to simply try
8764     to recover.
8765    
8766     * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
8767     to set the MFILEReceiver attributes even if the data is NULL.
8768    
8769     * extensions/thuban/gdalwarp.cpp: Improved the error handling
8770     and passed GDAL messages back up to the Python layer. Also
8771     tried to fix some memory leaks that were present in the original
8772     utility but didn't matter because the program aborted.
8773    
8774     * test/test_range.py: Copied over tests from SciParam. Removed
8775     tests against importing. Fixes RTBug #1867.
8776    
8777 bh 958 2003-05-21 Bernhard Herzog <[email protected]>
8778    
8779     * test/test_load.py: Remove unused imports and restructure the
8780     test code
8781     (LoadSessionTest): Split into one class for each test and turn
8782     LoadSessionTest itself into the base class for all such session
8783     tests.
8784     (ClassificationTest): New base class for load tests that test
8785     classifications
8786     (TestSingleLayer, TestLayerVisibility, TestClassification)
8787     (TestLabels, TestLayerProjection, TestRasterLayer): New classes
8788     for the individual tests
8789    
8790     * test/support.py (FileLoadTestCase.filename): New base class for
8791     file loading tests
8792    
8793 jan 955 2003-05-21 Jan-Oliver Wagner <[email protected]>
8794    
8795     * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
8796     Mercator' to 'UTM Zone 32' as a more convenient example.
8797     Added 'Gauss Krueger Zone 6'.
8798    
8799     * Data/iceland_sample_raster.thuban: political polygon now
8800     filled transparent to have the raster image visible at once.
8801    
8802 frank 952 2003-05-21 Frank Koormann <[email protected]>
8803    
8804     * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
8805     OnClose() to keep in sync with extensions. Internally Thuban
8806     still uses "underscored" names.
8807    
8808 jonathan 949 2003-05-20 Jonathan Coles <[email protected]>
8809    
8810     This puts back Raster layer support. These layers support projections
8811     through the GDAL library. Currently, the CVS version is being used.
8812     There are no Debian packages available although this may change soon.
8813     A GDAL driver was extended to support writing to memory rather to
8814     files.
8815    
8816     There is still some work that needs to be done, such as some error
8817     handling when loading invalid images or when there is a problem
8818     projecting the image. This putback simply checks in the majority
8819     of the work.
8820    
8821     * setup.py: Add gdalwarp library extension.
8822    
8823     * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
8824     Defaults to False, but can be overridden by subclasses if they
8825     support classification.
8826     (RasterLayer): New. Defines a new layer that represents an
8827     image.
8828    
8829     * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
8830     tag handler.
8831     (SessionLoader.start_layer): Encode the filename.
8832     (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
8833     New. Supports reading a rasterlayer tag.
8834    
8835     * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
8836    
8837     * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
8838     get a string in Latin1. If we get such as string convert it to
8839     unicode first, otherwise leave if alone before encoding.
8840     (SessionSaver.write_layer): Add support for writing both Layers
8841     and RasterLayers.
8842    
8843     * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
8844     The right argument may not be a string, it could also be a Column.
8845    
8846     * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
8847     Make initial window size 600x400. Fixes RTBug #1872.
8848    
8849     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
8850     the dialog is constructed so that we can support layers that
8851     do not have classifications.
8852     (Classifier._OnTry): Only build a classification if the layer
8853     supports one.
8854    
8855     * Thuban/UI/legend.py: Change all checks that a layer is an
8856     instance of Layer into checks against BaseLayer.
8857     (LegendTree.__FillTreeLayer): Only add children to a branch if
8858     the layer supports classification.
8859    
8860     * Thuban/UI/mainwindow.py (MainWindow.NewSession,
8861     MainWindow.OpenSession): Don't proceed with an action if the
8862     user chooses Cancel when they are asked to save changes.
8863     (MainWindow.AddRasterLayer): New. Open a dialog to allow the
8864     user to select an image file. Create a new RasterLayer and add
8865     it to the map.
8866    
8867     * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
8868     for rendering RasterLayer layers.
8869     (MapRenderer.draw_raster_layer): Actually method that calls
8870     the GDALWarp python wrapper and constructs an image from the
8871     data returned.
8872    
8873     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
8874     Choices symbols to match those used in the table query method.
8875     Replace deprecated method calls on table with new method names.
8876    
8877     * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
8878     how small the scale can get. This still needs more testing.
8879    
8880     * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
8881     Provides a driver to output in .bmp format.
8882    
8883     * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
8884     New. Provides IO routines which write to memory, rather than a file.
8885    
8886     * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
8887     of the gdalwarp utility provided in GDAL. Added function calls
8888     that can be accessed from python.
8889    
8890     * Data/iceland_sample_raster.thuban: New. Sample file that uses
8891     a raster layer.
8892    
8893     * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
8894     layer image data.
8895    
8896     * Doc/thuban.dtd: Added rasterlayer attribute definition.
8897    
8898     * test/test_layer.py, test/test_load.py, test/test_save.py: Added
8899     tests associated with the raster layer code.
8900    
8901     * test/test_transientdb.py
8902     (TestTransientTable.test_auto_transient_table_query): Added a test
8903     for using a Column object as the "right" parameter to a query.
8904    
8905 frank 924 2003-05-19 Frank Koormann <[email protected]>
8906    
8907 frank 927 * Thuban/version.py (get_changelog_date):
8908     Catch exceptions if ChangeLog does not exist.
8909    
8910     * Thuban/UI/view.py (MapCanvas.Export): Bugfix
8911    
8912     2003-05-19 Frank Koormann <[email protected]>
8913    
8914 frank 924 Extended version information for Thuban
8915    
8916     * Thuban/version.py: New, version information for Thuban: Last
8917     modification date and last ChangeLog entry date.
8918    
8919     * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
8920     information: Display Thuban, wxPython and Python version.
8921    
8922 bh 919 2003-05-16 Bernhard Herzog <[email protected]>
8923    
8924 bh 921 * Thuban/Model/save.py: Remove some unused imports including the
8925     __future__ import for nested_scopes as Thuban relies on Python 2.2
8926     now.
8927     (XMLWriter.encode): Remove the special case for a None argument.
8928     In the saver encode is always called with a string argument.
8929    
8930     2003-05-16 Bernhard Herzog <[email protected]>
8931    
8932 bh 919 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
8933     in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
8934     of the bug was that e.g. float("1.2") would fail. Thuban now
8935     requires 2.4.x.
8936    
8937 frank 917 2003-05-16 Frank Koormann <[email protected]>
8938    
8939     Printing enhancement and WMF export (under Win32)
8940    
8941     * Thuban/UI/renderer.py (ExportRenderer): New, derived from
8942     ScreenRenderer. Renders Map, Legend and Scalebar for export.
8943     (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
8944     PrintRender.
8945    
8946     * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
8947     to fullfil information needed for PrinterRenderer.
8948     (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
8949     (MapCanvas.Print): Adapted to new MapPrintout.
8950     (OutputTransform): General calculations to transform from canvas
8951     coordinates to export/printing devices.
8952    
8953     * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
8954     new method_command to call ExportMap, with platform dependency (only
8955     __WXMSW__)
8956    
8957     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
8958     of scalebar drawing area as new parameters.
8959    
8960     * Thuban/Model/scalebar.py (roundInterval): round long instead of int
8961    
8962     * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
8963     Update to extended scalebar.DrawScalebar header.
8964    
8965     * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
8966    
8967     * test/test_scalebar.py: Made test executable as standalone.
8968    
8969 bh 908 2003-05-16 Bernhard Herzog <[email protected]>
8970    
8971     * Thuban/Model/table.py (Table): Remove this compatibility alias
8972     for DBFTable.
8973    
8974     * test/test_table.py: Import DBFTable as Table because that alias
8975     doesn't exist anymore.
8976    
8977     * Thuban/UI/classgen.py: Remove some unused imports
8978    
8979 jonathan 906 2003-05-14 Jonathan Coles <[email protected]>
8980    
8981     * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
8982     Fix docstring.
8983     (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
8984     (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
8985     values of the supplied range to determine the beginning and end
8986     bounds of the generated classes.
8987    
8988     * Thuban/Model/range.py (Range.number_re): Now accepts floats that
8989     do not have a leading 0 (.5 is now accepted as well as 0.5).
8990    
8991     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
8992     call to ClassGenerator.GenUniformDistribution.
8993    
8994     * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
8995     layout bug with the 'Projection' label.
8996    
8997     * test/support.py (FloatTestCase): New. Needed for the Range tests.
8998    
8999     * test/test_range.py: New. Imported from SciParam.
9000    
9001 jonathan 897 2003-05-12 Jonathan Coles <[email protected]>
9002    
9003 jonathan 899 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
9004     to table.UniqueValues() with calls that retrieve all the values
9005     from the table. This will need to be replaced by a method on table
9006     which can simply return the list (perhaps more efficiently).
9007    
9008     2003-05-12 Jonathan Coles <[email protected]>
9009    
9010 jonathan 897 The return value of ClassGenerator.CalculateQuantiles has changed.
9011     Refer to the documentation for details.
9012    
9013     * test/test_classgen.py: Modified Quantile tests to use the
9014     new return values.
9015    
9016     * Thuban/Model/classgen.py
9017     (ClassGenerator.GenQuantiles): Add comments describing the parameters,
9018     use new return values from CalculateQuantiles to produce the correct
9019     range bounds in the Classification.
9020     (ClassGenerator.CalculateQuantiles): Add more comments describing
9021     the return values and parameters. Make minor adjustments to improve
9022     the legibility of the code. Fix problem with adjusted not being set
9023     in most cases.
9024    
9025 frank 893 2003-05-12 Frank Koormann <[email protected]>
9026    
9027     * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
9028     and latin1. Fixes #1851 finally.
9029    
9030 jonathan 889 2003-05-09 Jonathan Coles <[email protected]>
9031    
9032 jonathan 897 * test/test_classgen.py: New. Tests the Quantile algorithm.
9033    
9034     * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
9035     Clean up debugging statement, add comments, fix a small bug in the
9036     returned adjusted percentiles.
9037    
9038     2003-05-09 Jonathan Coles <[email protected]>
9039    
9040 jonathan 889 Introduces Range class from SciParam into the ClassGroupRange class,
9041     and such ranges can now be saved and loaded from disk.
9042    
9043     Quantiles are now available in the Classification Generator.
9044    
9045     Initial support for building Queries on a table. Doesn't do anything
9046     but run some tests.
9047    
9048     * Thuban/Model/classification.py: Explicit imports.
9049     (ClassGroupRange): Use the Range class to store the underlying
9050     range information. The interface remains the same, except for
9051     GetRange(), and you can also supply a Range object as the min
9052     parameter to SetRange or __init__.
9053    
9054     * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
9055     string appropriately for use in Thuban. Fixes RTbug #1851.
9056     (SessionLoader.end_projection): Handle the context of the
9057     projection tag a bit better by looking at what objects are not
9058     None. There was an assumption that a projection tag for a map
9059     could occur before any layers.
9060     (SessionLoader.start_clrange): Provide backward compatibility for
9061     reading min/max values as well as the new range parameter.
9062    
9063     * Thuban/Model/map.py: Explicit imports.
9064    
9065     * Thuban/Model/resource.py: Import _.
9066     (ProjFileSaver.write): write header using projfile.dtd.
9067    
9068     * Thuban/Model/save.py: Explicit imports.
9069     (XMLWriter.encode): New. Encode the given string from a format
9070     used by Thuban into UTF-8. Fixes RTbug #1851.
9071    
9072     * Thuban/UI/classgen.py: Explicit imports.
9073     (ClassGenDialog.__init__): Clean up the code and add support
9074     for Quantiles.
9075     (ClassGenDialog.OnOK): Add support for Quantiles.
9076     (GenQuantilesPanel): New. Input panel for Quantiles.
9077     (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
9078     GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
9079    
9080     * Thuban/Model/classgen.py: New. Contains all the classes named above.
9081    
9082     * Thuban/UI/classifier.py: Explicit imports.
9083     (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
9084     ClassTable.SetValueAsCustom): Reworked to use new Range class.
9085    
9086     * Thuban/UI/legend.py: Explicit imports.
9087    
9088     * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
9089     a Table menu and associated method calls.
9090     (MainWindow.choose_color): Removed. No longer needed.
9091    
9092     * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
9093     should be disabled if no projection is selected in the available
9094     list.
9095    
9096     * Thuban/UI/renderer.py: Explicit imports.
9097    
9098     * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
9099     with correctly selecting the rows and issuing the right events.
9100     Be sure to call Skip() to allow the grid to do some of its own
9101     handling which allows the rows to actually be selected.
9102     (LayerTableGrid.select_shapes): Rename from select_shape. Supports
9103     selecting multiple shapes.
9104     (LayerTableFrame): Support for building Queries.
9105     (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
9106    
9107     * Thuban/UI/tree.py: Explicit imports.
9108    
9109     * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
9110     table view can call it.
9111    
9112     * test/test_classification.py: Explicit imports.
9113     (TestClassification.test_ClassGroupRange): Fix test for new
9114     Range class.
9115    
9116     * Doc/thuban.dtd: Add range parameter for clrange.
9117    
9118     * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
9119     object in ClassGroupRange, and also uesd for inputting ranges in
9120     the classifer table and elsewhere.
9121    
9122     * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
9123     yet.
9124    
9125 frank 872 2003-05-09 Frank Koormann <[email protected]>
9126    
9127     * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
9128    
9129 frank 860 2003-05-08 Frank Koormann <[email protected]>
9130    
9131 frank 870 Coding style updates
9132    
9133     * test/test_scalebar.py: Replaced tab indentation by spaces.
9134    
9135     * Thuban/UI/scalebar.py: Explicit imports.
9136    
9137     2003-05-08 Frank Koormann <[email protected]>
9138    
9139 frank 867 * Thuban/UI/scalebar.py
9140     (ScaleBar.DrawScalebar): Format string bug fixed.
9141    
9142     2003-05-08 Frank Koormann <[email protected]>
9143    
9144 frank 865 Reorganization of scalebar component (no wx in Thuban/Model)
9145    
9146     * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
9147     (deriveInterval):
9148     Calculate scalebar interval and unit which fits in width for scale.
9149     (roundInterval): Round float.
9150    
9151     * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
9152    
9153     * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
9154    
9155     * Thuban/UI/legend.py: Import Thuban.UI.scalebar
9156    
9157     2003-05-08 Frank Koormann <[email protected]>
9158    
9159 frank 860 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
9160     Initialize ScaleBar with canvas.map
9161    
9162     * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
9163     round intervals to display smarter lengths
9164     (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
9165     layer. If the maps has no projection applied grey the scalebar.
9166    
9167 frank 857 2003-05-07 Frank Koormann <[email protected]>
9168    
9169     Basic Scalebar features added.
9170    
9171     * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
9172    
9173     * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
9174     (ScaleBarBitmap): New, links the scalebar bitmap with view messages
9175     and the renderer.
9176    
9177     * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
9178    
9179     * Thuban/UI/messages.py: SCALE_CHANGED added.
9180    
9181 bh 850 2003-05-07 Bernhard Herzog <[email protected]>
9182    
9183 bh 852 * Thuban/Model/session.py (Session.__init__): New instance
9184     variable shapestores to hold a list of all open shapestore objects
9185     (Session.ShapeStores): New. Accessor method for the shapestores
9186     list.
9187     (Session._add_shapestore, Session._clean_weak_store_refs): New.
9188     Internal methods to maintain the shapestores list.
9189     (Session.Tables): New. Return all tables open in the session.
9190     (Session.OpenShapefile): Insert the new ShapeStore into the
9191     shapestores list.
9192    
9193     * test/test_session.py (TestSessionSimple.test_initial_state): Add
9194     tests for ShapeStores and Tables
9195     (TestSessionWithContent.test_shape_stores)
9196     (TestSessionWithContent.test_tables): New. Test cases for
9197     ShapeStores and Tables
9198    
9199     2003-05-07 Bernhard Herzog <[email protected]>
9200    
9201 bh 850 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
9202     Add comments about the optimizations used.
9203     (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
9204     Implement the ReadValue table interface method.
9205    
9206     * test/test_transientdb.py
9207     (TestTransientTable.run_iceland_political_tests)
9208     (TestTransientTable.test_transient_joined_table): Add tests for
9209     ReadValue
9210    
9211 frank 848 2003-05-07 Frank Koormann <[email protected]>
9212    
9213     * Resources/Bitmaps/fulllayerextent.xpm,
9214     Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
9215     new icons.
9216    
9217 bh 840 2003-05-06 Bernhard Herzog <[email protected]>
9218    
9219 bh 846 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
9220     New. Simply delegate to the transient table's version.
9221    
9222     * test/test_transientdb.py
9223     (TestTransientTable.test_auto_transient_table_query): New. Test
9224     case for AutoTransientTable's SimpleQuery
9225    
9226     2003-05-06 Bernhard Herzog <[email protected]>
9227    
9228 bh 843 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
9229     Implement a simple query method for the query dialog
9230     (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
9231     the row index or shapeid.
9232     (TransientTable.create): Insert the right value of the row index
9233     (TransientJoinedTable.create): Copy the row index of the left
9234     table to the joined result table
9235    
9236     * test/test_transientdb.py
9237     (TestTransientTable.test_transient_table_read_twice): Fix
9238     doc-string
9239     (TestTransientTable.test_transient_table_query): New. Test for the
9240     SimpleQuery method
9241    
9242     2003-05-06 Bernhard Herzog <[email protected]>
9243    
9244 bh 840 Convert all table users to use the new table interface. This only
9245     covers Thuban itself, not GREAT-ER or other applications built on
9246     Thuban yet, so the compatibility interface stays in place for the
9247     time being but it now issues DeprecationWarnings.
9248    
9249     Finally, the new Table interface has a new method, HasColumn.
9250    
9251     * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
9252     issue deprecation warnings when they're. The warnings refer to the
9253     caller of the method.
9254     (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
9255     for the deprecation warnings
9256    
9257     * test/test_table.py: Ignore the deprecation warnings for the old
9258     table in the tests in this module. The purpose of the tests is to
9259     test the old interface, after all.
9260    
9261     * test/test_transientdb.py
9262     (TestTransientTable.run_iceland_political_tests): Use the
9263     constants for the types. Add a test for HasColumn
9264     (TestTransientTable.test_transient_joined_table): Adapt to new
9265     table interface. Add a test for HasColumn
9266     (TestTransientTable.test_transient_table_read_twice): Adapt to new
9267     table interface
9268    
9269     * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
9270     Adapt to new table interface
9271    
9272     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
9273     new table interface
9274    
9275     * Thuban/UI/controls.py (RecordListCtrl.fill_list)
9276     (RecordTable.SetTable): Adapt to new table interface
9277    
9278     * Thuban/UI/classifier.py (Classifier.__init__)
9279     (Classifier.__init__): Adapt to new table interface
9280    
9281     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
9282     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
9283     to new table interface
9284    
9285     * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
9286     (AutoTransientTable.HasColumn): Implement the new table interface
9287     method
9288     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
9289     (AutoTransientTable.UniqueValues): Adapt to new table interface
9290    
9291     * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
9292     Adapt to new table interface
9293    
9294     * test/test_layer.py (TestLayer.open_shapefile): Helper method to
9295     simplify opening shapefiles a bit easier.
9296     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
9297     (TestLayer.test_point_layer): Use the new helper method
9298     (TestLayer.test_get_field_type): New. Test for the GetFieldType
9299     method
9300    
9301     * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
9302     the new table method
9303    
9304     * test/test_memory_table.py (TestMemoryTable.test_has_column):
9305     Test for the new table method HasColumn
9306    
9307 jonathan 833 2003-05-06 Jonathan Coles <[email protected]>
9308    
9309     Addresses the "Selection Extent" wish of RTbug #1787.
9310    
9311     * Resources/Bitmaps/fulllayerextent.xpm,
9312     Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
9313     extent. These are just place holders for the real bitmaps.
9314    
9315     * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
9316     calculate the bounding box once (the first time compute_bbox() is
9317     called).
9318     (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
9319     the bounding box for the shapes in lat/long coordinates.
9320    
9321     * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
9322     option.
9323     (MainWindow.has_selected_shapes): New. Returns true if there are
9324     any selected shapes.
9325     (MainWindow.FullSelectionExtent): New. Calls
9326     MapCanvas.FitSelectedToWindow() when the user selects the menu option.
9327     (_has_selected_shapes): New. Returns true if there are any
9328     selected shapes.
9329    
9330     * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
9331     true if there are any selected shapes.
9332    
9333     * Thuban/UI/view.py (MapCanvas): Added delegated method
9334     HasSelectedShapes.
9335     (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
9336     shapes on the canvas using the map projection (if any).
9337    
9338     * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
9339     for Layer.ShapesBoundingBox().
9340    
9341 bh 826 2003-05-06 Bernhard Herzog <[email protected]>
9342    
9343     * Resources/Projections/defaults.proj: Fix spelling of Mercator
9344    
9345 jonathan 823 2003-05-05 Jonathan Coles <[email protected]>
9346    
9347     Addresses the "Full Layer Extent" wish of RTbug #1787.
9348    
9349     * Resources/Projections/defaults.proj: Added UK National Grid.
9350    
9351     * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
9352     (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
9353     when the user selects the menu option.
9354    
9355     * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
9356     scales the given layer on the canvas using the map projection.
9357    
9358 bh 819 2003-05-05 Bernhard Herzog <[email protected]>
9359    
9360     Convert the table implementations to a new table interface. All
9361     tables use a common mixin class to provide backwards compatibility
9362     until all table users have been updated.
9363    
9364     * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
9365     provide backwards compatibility for table classes implementing the
9366     new interface
9367     (DBFTable, MemoryTable): Implement the new table interface. Use
9368     OldTableInterfaceMixin as base for compatibility
9369     (DBFColumn, MemoryColumn): New. Column description for DBFTable
9370     and MemoryTable resp.
9371    
9372     * test/test_dbf_table.py: New. Test cases for the DBFTable with
9373     the new table interface.
9374    
9375     * test/test_memory_table.py: New. Test cases for the MemoryTable
9376     with the new table interface.
9377    
9378     * test/test_table.py: Document the all tests in this file as only
9379     for backwards compatibility. The equivalent tests for the new
9380     interface are in test_memory_table.py and test_dbf_table.py
9381     (MemoryTableTest.test_read): field_info should be returning tuples
9382     with four items
9383     (MemoryTableTest.test_write): Make doc-string a more precise.
9384    
9385     * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
9386     table interface. Derive from from OldTableInterfaceMixin for
9387     compatibility.
9388     (TransientTableBase.create): New intance variable column_map to
9389     map from names and indices to column objects
9390     (TransientTable.create): Use the new table interface of the input
9391     table
9392     (AutoTransientTable): Convert to new table interface. Derive from
9393     from OldTableInterfaceMixin for compatibility.
9394     (AutoTransientTable.write_record): Removed. It's not implemented
9395     yet and we still have to decide how to handle writing with the new
9396     table and data framework.
9397    
9398     * test/test_transientdb.py
9399     (TestTransientTable.run_iceland_political_tests)
9400     (TestTransientTable.test_transient_joined_table): Use the new
9401     table interface
9402    
9403 jonathan 817 2003-05-05 Jonathan Coles <[email protected]>
9404    
9405     This is namely a collection of UI updates to improve user interactivity.
9406     Tabbing between controls now exists and you can use ESC to close dialog
9407     boxes; ENTER will active the default button.
9408    
9409     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
9410     order that the controls are created so that tabbing works correctly.
9411     (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
9412     wxDialog can handle the default button correctly.
9413     (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
9414     same reasons as for OnOK.
9415     (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
9416     when we ask the table for the maximum/minimum values of a field
9417     which could take a very long time.
9418    
9419     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
9420     order that the controls are created so that tabbing works correctly.
9421     (SelectPropertiesDialog.__init__): Rearrange the order that the
9422     controls are created so that tabbing works correctly.
9423    
9424     * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
9425     to derive from a wxDialog but behave like the original implementation
9426     which was derived from a wxFrame. wxDialog provides useful key
9427     handling functionality like ESC calling OnCancel and ENTER calling
9428     OnOK which is lost with wxFrame.
9429    
9430     * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
9431     new dialogs.
9432    
9433     * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
9434     order that the controls are created so that tabbing works correctly.
9435     (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
9436     (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
9437     (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
9438     (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
9439     can provide the "UK National Grid" as a default projection.
9440     (UTMPanel.__init__): Rearrange the order that the controls are
9441     created so that tabbing works correctly.
9442    
9443 bh 809 2003-05-05 Bernhard Herzog <[email protected]>
9444    
9445 bh 811 * extensions/thuban/wxproj.cpp: Fix some of the comments.
9446     (project_point): If a map projection but no layer projection is
9447     given, convert degrees to radians before applying the map
9448     projection.
9449    
9450 bh 809 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
9451     (TableGrid.allow_messages): New methods to make it possible to
9452     inhibit message sending.
9453     (TableGrid.issue): Only send the message if not inhibited.
9454     (LayerTableGrid.select_shape): Use the new methods to make sure
9455     that no ROW_SELECTED message is sent while we're updating the
9456     selected rows to match the selected shapes.
9457    
9458 jan 807 2003-05-02 Jan-Oliver Wagner <[email protected]>
9459    
9460     Implementation of MemoryTable.
9461    
9462     * Thuban/Model/table.py (MemoryTable): New. Quite simple table
9463     implementation that operates on a list of tuples. All of the data
9464     are kept in the memory.
9465    
9466     * test/test_table.py (MemoryTableTest): New.
9467    
9468     * test/test_transientdb.py (SimpleTable): Removed.
9469     (TestTransientTable.test_transient_joined_table,
9470     (TestTransientTable.test_transient_table_read_twice): Replaced
9471     SimpleTable by MemoryTable.
9472    
9473 jonathan 793 2003-04-30 Jonathan Coles <[email protected]>
9474    
9475 jonathan 803 * Data/iceland_sample.thuban: Now contains correct projections
9476     for each of the layers.
9477    
9478     * Resources/Projections/defaults.proj: Geographic projection
9479     contains unit conversion parameter.
9480    
9481     2003-04-30 Jonathan Coles <[email protected]>
9482    
9483 jonathan 793 The most important part of this putback is the projection changes.
9484     It should now be possible to specify the projection that a layer
9485     is in and then specify a different projection for the map. The
9486     projection dialog has an extra parameter for a geographic projection
9487     which lets the user select if the input is in degrees or radians.
9488    
9489     * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
9490     to say that the parameter is a tuple of unprojected
9491     points (which is what the callers to this method were assuming).
9492     Also, since the points are unprojected we need to projected them.
9493    
9494     * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
9495     LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
9496     groups are selected, move the layer up/down. Fixes RTbug #1833.
9497    
9498     * Thuban/UI/mainwindow.py: Move menu item map_rename up.
9499    
9500     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
9501     parameter in call to SetClientData.
9502     (GeoPanel): Add support for selecting the units that the
9503     source data is in (Radians or Degrees).
9504    
9505     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
9506     the rendering loop by reducing the number of if's, removing the
9507     unnecessary try/except block, and checking if the old group
9508     is the same as the new one (which happens a lot if there is
9509     no classification, or lots of shapes are in the same group).
9510    
9511     * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
9512     around the redraw routine to try to catch problems that the user
9513     may create by selecting invalid projections for the data set and
9514     map. Clears the display if there are any problems and prints the
9515     error.
9516     (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
9517     rectangle.
9518    
9519     * extensions/thuban/wxproj.cpp (project_point): First invert the
9520     supplied point (which should be in projected coordinates) using
9521     the layer's projection and then project the point using the
9522     map's projection.
9523     (project_points): Use project_point() to project each point.
9524    
9525 jan 792 2003-04-30 Jan-Oliver Wagner <[email protected]>
9526    
9527     * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
9528     don't set the Classification to None if the classfication field
9529     is None (ie only a DEFAULT).
9530    
9531 bh 786 2003-04-30 Bernhard Herzog <[email protected]>
9532    
9533 bh 790 * Thuban/UI/view.py: Fix some typos.
9534    
9535 bh 788 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
9536     not pop up the dialog if the selection becomes empty (this could
9537     happen if e.g. a new selection is opened while the identify tool
9538     is active and dialog had been closed)
9539    
9540     2003-04-30 Bernhard Herzog <[email protected]>
9541    
9542 bh 786 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
9543     instance variable read_record_last_result
9544     (TransientTableBase.read_record): Make sure reading the same
9545     record twice works. The implementation uses the new instance
9546     variable read_record_last_result
9547    
9548     * test/test_transientdb.py
9549     (TestTransientTable.test_transient_table_read_twice): New test
9550     case for the above bug-fix.
9551    
9552 jonathan 793 2003-04-29 Jonathan Coles <[email protected]>
9553    
9554     * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
9555    
9556     * Thuban/UI/classgen.py: Remove all uses of Str2Num.
9557    
9558     * Thuban/UI/classifier.py: Remove all uses of Str2Num.
9559     (ClassTable.SetValueAsCustom): Rename keyword argument in
9560     ClassGroup* constructors to match argument name.
9561    
9562 bh 779 2003-04-29 Bernhard Herzog <[email protected]>
9563    
9564     * Thuban/Model/session.py (Session.Destroy): Explicitly close the
9565     transient DB if it exists to make sure it doesn't leave a journal
9566     file in the temp directory.
9567    
9568     * Thuban/Model/transientdb.py (TransientDatabase.close): Set
9569     self.conn to None after closing the connection to make sure it's
9570     not closed twice
9571    
9572 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
9573    
9574 jonathan 769 Add a visible parameter in the layer XML tag. The default value is
9575     "true". If anything other than "false" is specified we also assume
9576 jonathan 776 "true". Addresses RTbug #1025.
9577 jonathan 769
9578     * Doc/thuban.dtd: Add visible parameter to a layer.
9579    
9580     * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
9581     of visible from 1 to True.
9582     (Layer.__init__): Change default value of visible from 1 to True.
9583    
9584     * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
9585     parameter.
9586    
9587     * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
9588     parameter.
9589    
9590     * test/test_load.py: Add new test data contents_test_visible.
9591     (LoadSessionTest.setUp): save test data.
9592     (LoadSessionTest.testLayerVisibility): Test if the visible flag
9593     is loaded correctly.
9594    
9595     * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
9596     for saving an invisible layer.
9597    
9598     2003-04-29 Jonathan Coles <[email protected]>
9599    
9600 jonathan 767 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
9601     legend dialog box and tell it to change its map to the one
9602     supplied to SetMap(). Fixes RTbug #1770.
9603    
9604 bh 764 2003-04-29 Bernhard Herzog <[email protected]>
9605    
9606 bh 766 Next step of table implementation. Introduce a transient database
9607     using SQLite that some of the data is copied to on demand. This
9608     allows us to do joins and other operations that require an index
9609     for good performance with reasonable efficiency. Thuban now needs
9610     SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
9611     haven't tested that.
9612    
9613     * Thuban/Model/transientdb.py: New. Transient database
9614     implementation.
9615    
9616     * test/test_transientdb.py: New. Tests for the transient DB
9617     classes.
9618    
9619     * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
9620     classes to help automatically remove temporary files and
9621     directories.
9622     (Session.__init__): New instance variables temp_dir for the
9623     temporary directory and transient_db for the SQLite database
9624     (Session.temp_directory): New. Create a temporary directory if not
9625     yet done and return its name. Use AutoRemoveDir to have it
9626     automatically deleted
9627     (Session.TransientDB): Instantiate the transient database if not
9628     done yet and return it.
9629    
9630     * Thuban/Model/data.py (ShapefileStore.__init__): Use an
9631     AutoTransientTable so that data is copied to the transient DB on
9632     demand.
9633     (SimpleStore): New class that simply combines a table and a
9634     shapefile
9635    
9636     * Thuban/Model/table.py (Table, DBFTable): Rename Table into
9637     DBFTable and update its doc-string to reflect the fact that this
9638     is only the table interface to a DBF file. Table is now an alias
9639     for DBFTable for temporary backwards compatibility.
9640    
9641     * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
9642     the last reference to the session goes away so that the temporary
9643     files are removed properly.
9644    
9645     * test/test_load.py (LoadSessionTest.tearDown): Remove the
9646     reference to the session to make sure the temporary files are
9647     removed.
9648    
9649     2003-04-29 Bernhard Herzog <[email protected]>
9650    
9651 bh 764 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
9652     the __parser instance variable into a normal local variable in
9653     read. It's only used there and read will never be called more than
9654     once. Plus it introduces a reference cycle that keeps can keep the
9655     session object alive for a long time.
9656    
9657 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
9658 jonathan 735
9659 jonathan 762 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
9660     Projection an immutable item. Fixes RTbug #1825.
9661     (Projection.__init__): Initialize instance variables here.
9662     (ProjFile.Replace): New. Replace the given projection object with
9663     the new projection object. This solves the problem of needing the
9664     mutator Projection.SetProjection() in the ProjFrame class and
9665     allows a projection to change parameters without changing its
9666     location in the file.
9667    
9668     * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
9669     be of type wxSAVE and should verify overwriting a file.
9670    
9671     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
9672     ProjFile.Replace() method instead of the mutator
9673     Projection.SetProjection(). Also requires that we reassign the
9674     client data to the new projection.
9675    
9676     * test/test_proj.py (TestProjection.test): Test GetName() and
9677     GetAllParameters()
9678     (TestProjFile.test): Remove tests for Set*() methods. Add tests
9679     for Replace().
9680    
9681     2003-04-25 Jonathan Coles <[email protected]>
9682    
9683 jonathan 756 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
9684     to save the name of the projection.
9685    
9686     * test/test_save.py (SaveSessionTest.testLayerProjection): New
9687     test to verify layer projections are saved correctly.
9688    
9689     2003-04-25 Jonathan Coles <[email protected]>
9690    
9691 jonathan 753 * Thuban/Model/proj.py (Projection.SetName): Set the name
9692     to "Unknown" if name is None.
9693     (Projection.SetAllParameters): New. Set the projection's
9694     parameter list to the one supplied.
9695     (Projection.SetProjection): New. Set the projection's
9696     properties to those of the supplied Projection.
9697    
9698     * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
9699     the dialog title to include the map's title.
9700     (MainWindow.LayerProjection): Set the dialog title to include
9701     the layer's title.
9702    
9703     * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
9704     error dialogs into a single method call.
9705     (ProjFrame.__VerifyButtons): Add more states to check.
9706     (ProjFrame.__GetProjection): Return the current state of an
9707     edited projection or None.
9708     (ProjFrame.__FillAvailList): Remove checks for states that
9709     shouldn't exist.
9710     (ProjFrame._OnNew): Clear all selected items and supply
9711     a projection panel if necessary.
9712    
9713     * test/test_proj.py (TestProjFile.test): Add tests for
9714     ProjFile.SetAllParameters, ProjFile.SetProjection,
9715     ProjFile.SetName.
9716    
9717     2003-04-25 Jonathan Coles <[email protected]>
9718    
9719 jonathan 748 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
9720     takes an optional argument to select the current projection.
9721     This does not guarantee that the item is visible due to
9722     limited wxWindows functionality. Fixes RTBug #1821.
9723    
9724     2003-04-25 Jonathan Coles <[email protected]>
9725    
9726 jonathan 743 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
9727     the projection name and use it when constructing the Projection
9728     object.
9729    
9730     * Thuban/Model/proj.py (Projection.__init__): Change the default
9731     value for 'name' to None and then test if name is equal to None
9732     in the body of the constructor. This way the caller doesn't have to
9733     know what the default value should be. Namely, useful in load.py
9734     where we have to pick a default value if the 'name' parameter
9735     doesn't exist in the XML file.
9736    
9737     * test/test_load.py (LoadSessionTest.testLayerProjection): New.
9738     Tests a file where a layer has a projection.
9739    
9740     2003-04-25 Jonathan Coles <[email protected]>
9741    
9742 jonathan 735 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
9743     tree for projection information.
9744    
9745     * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
9746     XMLReader.GetFileName.
9747     (SessionLoader): Added support for loading projection tags that
9748     appear inside a layer.
9749    
9750     * Thuban/Model/proj.py (ProjFile): Document the class. Move
9751     back to using a list because the order of the projections in
9752     the file is important to maintain. Fixes RTbug #1817.
9753    
9754     * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
9755     to ProjFile.GetFilename.
9756    
9757     * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
9758     information.
9759    
9760     * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
9761     ProjFrame._OnSaveAs. Removed old dead code from previous
9762     implementation.
9763     (ProjFrame._OnExport): Add support for exporting more than one
9764     projection to a single file.
9765     (ProjFrame.__FillAvailList): use string formatting (% operator)
9766     to build strings that are (partly) translated. Fixes RTbug #1818.
9767    
9768     * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
9769     class.
9770    
9771 bh 734 2003-04-24 Bernhard Herzog <[email protected]>
9772    
9773     * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
9774    
9775     * po/fr.po: New. French translation by Daniel Calvelo Aros
9776    
9777     * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
9778     empty strings.
9779    
9780 jonathan 735 2003-04-24 Jonathan Coles <[email protected]>
9781 jonathan 724
9782     * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
9783     implement the interface that the ProjFrame dialog expects.
9784    
9785     * Thuban/Model/proj.py (Projection.SetName): New. Allows the
9786     name of the projection to be changed.
9787     (ProjFile): Use a dictionary instead of a list so that removing
9788     projections is easier and we are sure about uniqueness.
9789     (ProjFile.Remove): Remove the given projection object.
9790    
9791     * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
9792     Return a list with only one projection file instead of searching for
9793     any projection file. This simplifies many things if the user can
9794     only have one system file and one user file.
9795    
9796     * Thuban/UI/classgen.py: Change all references to
9797     genCombo to genChoice.
9798    
9799     * Thuban/UI/mainwindow.py: Add a Projection option under the
9800     layer menu.
9801     (MainWindow.LayerProjection): New. Open up a projection window
9802     for a layer.
9803    
9804     * Thuban/UI/projdialog.py: Large changes to how the dialog is
9805     laid out. Use three panels instead of one. One for the list of
9806     projections, one for the edit controls, and one for the buttons.
9807     Fixed resizing problems so that the dialog resizes correctly
9808     when the projection panel changes. Added import/export, save, and
9809     new buttons/functionality.
9810    
9811 bh 723 2003-04-24 Bernhard Herzog <[email protected]>
9812    
9813     First step towards table management. Introduce a simple data
9814     abstraction so that we replace the data a layer uses more easily
9815     in the next step.
9816    
9817     * Thuban/Model/data.py: New file with a simple data abstraction
9818     that bundles shapefile and dbffile into one object.
9819    
9820     * Thuban/Model/session.py (Session.OpenShapefile): New method to
9821     open shapefiles and return a shape store object
9822    
9823     * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
9824     object instead of a shapefile filename. This introduces a new
9825     instance variable store holding the datastore. For intermediate
9826     backwards compatibility keep the old instance variables.
9827     (open_shapefile): Removed. No longer needed with the shape store.
9828     (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
9829     get the shape store used by a layer.
9830     (Layer.Destroy): No need to explicitly destroy the shapefile or
9831     table anymore.
9832    
9833     * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
9834     (MainWindow.AddLayer): Use the session's OpenShapefile method to
9835     open shapefiles
9836    
9837     * Thuban/Model/load.py (ProcessSession.start_layer): Use the
9838     session's OpenShapefile method to open shapefiles
9839    
9840     * test/test_classification.py
9841     (TestClassification.test_classification): Use the session's
9842     OpenShapefile method to open shapefiles and build the filename in
9843     a more platform independed way
9844    
9845     * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
9846     Implement to have a session to use in the tests
9847     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
9848     (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
9849     session's OpenShapefile method to open shapefiles
9850     (TestLayerLegend.setUp): Instantiate a session so that we can use
9851     it to open shapefiles.
9852     (TestLayerLegend.tearDown): Make sure that all references to
9853     layers and session are removed otherwise we may get a resource
9854     leak
9855    
9856     * test/test_map.py (TestMapAddLayer.test_add_layer)
9857     (TestMapWithContents.setUp): Instantiate a session so that we can
9858     use it to open shapefiles.
9859     (TestMapWithContents.tearDown): Make sure that all references to
9860     layers, maps and sessions are removed otherwise we may get a
9861     resource leak
9862     ("__main__"): use support.run_tests() so that more info about
9863     uncollected garbage is printed
9864    
9865     * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
9866     session's OpenShapefile method to open shapefiles
9867     ("__main__"): use support.run_tests() so that more info about
9868     uncollected garbage is printed
9869    
9870     * test/test_selection.py (TestSelection.tearDown): Make sure that
9871     all references to the session and the selection are removed
9872     otherwise we may get a resource leak
9873     (TestSelection.get_layer): Instantiate a session so that we can
9874     use it to open shapefiles.
9875     ("__main__"): use support.run_tests() so that more info about
9876     uncollected garbage is printed
9877    
9878     * test/test_session.py (TestSessionBase.tearDown)
9879     (TestSessionWithContent.tearDown): Make sure that all references
9880     to the session and layers are removed otherwise we may get a
9881     resource leak
9882     (TestSessionWithContent.setUp): Use the session's OpenShapefile
9883     method to open shapefiles
9884    
9885 jonathan 721 2003-04-24 Jonathan Coles <[email protected]>
9886    
9887     * Thuban/Model/load.py (XMLReader.read): Should have been checking
9888     if the file_or_filename object had the 'read' attribute.
9889    
9890 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
9891    
9892 jonathan 720 * Thuban/Model/resource.py: Fixes RTbug #1813.
9893     (ReadProjFile): Add documentation about which exceptions are raised.
9894     Always pass the exceptions up to the caller.
9895     (GetProjFiles): If the directory can't be read return an empty list.
9896     If any of the proj files can't be read skip that file and go
9897     on to the next one.
9898    
9899     * test/test_proj.py: Added test cases to handle nonexistent files,
9900     unreadable files, and files that don't parse correctly.
9901    
9902     2003-04-23 Jonathan Coles <[email protected]>
9903    
9904 jonathan 716 Projection dialog. Allows the user to select from a list
9905     of projection templates and optionally edit them and save new ones.
9906    
9907     * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
9908     (ProjPanel): Base class for projection specific panels.
9909     (TMPanel): Projection panel for Transverse Mercartor.
9910     (UTMPanel): Projection panel for Universal Transverse Mercartor.
9911     (LCCPanel): Projection panel for Lambert Conic Conformal.
9912     (GeoPanel): Projetion panel for Geographic Projection.
9913    
9914     2003-04-23 Jonathan Coles <[email protected]>
9915    
9916 jonathan 715 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
9917     promote symmetry. There now exists XMLReader and XMLWriter.
9918     (XMLReader.read): New. Call to read the given file descriptor or
9919     filename.
9920     (XMLReader.close): New. Make sure the file is closed.
9921     (XMLReader.GetFileName): New. Return just the file name that is being
9922     read from.
9923     (XMLReader.GetDirectory): New. Return just the directory of the file
9924     that is being read.
9925     (XMLReader.AddDispatchers): New. Take a dictionary which contains
9926     the names of functions to call as the XML tree is parsed.
9927     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
9928     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
9929     (SessionLoader): Removed class variables start_dispatcher and
9930     end_dispatcher since this functionality is now part of a class
9931     instance. Fixes RTbug #1808.
9932     (SessionLoader.__init__): Add dispatcher functions.
9933     (load_xmlfile): Code was moved into the XMLReader.read().
9934     (load_session): Use modified SessionLoader.
9935    
9936     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
9937     map's projection.
9938    
9939     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
9940     GetAllParameters.
9941     (Projection.GetParameter): Returns the value for the given parameter.
9942    
9943     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
9944     (GetProjFiles): Renamed from GetProjections. Now returns a list
9945     of ProjFile objects.
9946     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
9947     a list of ProjFile objects whose files are not user defined.
9948     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
9949     list of ProjFile objects whose files are user defined.
9950     (ProjFileReader): Extend new XMLReader.
9951    
9952     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
9953     promote symmetry.
9954    
9955     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
9956     control instead of a wxComboBox. wxChoice controls do not generate
9957     events as the uses highlights possible choices which fixes problems
9958     with resizing the dialog when the use selects an option.
9959    
9960     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
9961     control instead of a wxComboBox.
9962    
9963     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
9964     dialog.
9965    
9966     * test/test_proj.py (TestProjection.test): New tests for GetParameter
9967     method.
9968    
9969 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
9970    
9971 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
9972     constants
9973    
9974 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
9975     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
9976    
9977 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
9978    
9979 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
9980     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
9981     anymore.
9982     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
9983     (Layer.ShapeType, Layer.Shape): No need to call
9984     self.open_shapefile since it's always called in __init__
9985    
9986 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
9987     In wxPython 2.4 there's no need to extend MainLoop anymore since
9988     wxPython itself makes sure OnExit is called.
9989    
9990 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
9991    
9992 jonathan 693 Initial putback of projection management code. Includes new
9993     classes to read and write projection files. The current load
9994     and save classes were abstracted a bit so they could be reused.
9995     The Projection class was extended to provide new methods and
9996     have a name.
9997    
9998     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
9999     general XML reading methods that were part of ProcessSession.
10000    
10001     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
10002     name.
10003     (ProjFile): New. Represents a file that contains projection
10004     information.
10005    
10006     * Thuban/Model/resource.py: New. Contains general utilities
10007     for read and writing projection files.
10008    
10009     * Thuban/Model/save.py (XMLSaver): New. Contains all the
10010     general XML writing methods that were part of SessionSaver.
10011     (SessionSaver): Renamed from Saver.
10012    
10013     * test/test_proj.py: New test cases for the projection
10014     file read and write functions.
10015    
10016     2003-04-16 Jonathan Coles <[email protected]>
10017    
10018 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
10019     in the ClassGroup*.__repr__() methods so it is clearer when
10020     a value is a string and when it is a number.
10021    
10022     * test/test_load.py: Rework the classification test to test
10023     that we can load old files.
10024     (testLabels): Test a file where the groups have labels.
10025    
10026 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
10027    
10028     Safer implementation of the performance enhancements of the
10029     low-level renderer:
10030    
10031     * extensions/thuban/wxproj.cpp (extract_projection)
10032     (extract_pointer): Rename extract_projection to extract_pointer
10033     and redefine its purpose to return the pointer stored in a CObject
10034     returned by the object's cobject method. Update all callers.
10035     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
10036     handling of these low-level parameters so that each s_draw_info
10037     instance is handled as a CObject at python level that also
10038     contains real references to the actual python objects which
10039     contain the values in the struct. Add free_draw_info as the
10040     destructor.
10041     (draw_polygon_shape): Add the py_draw_info parameter which must a
10042     cobject containing an s_draw_info pointer.
10043    
10044     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
10045     method to instantiat the low-level render parameter
10046     (MapRenderer.draw_shape_layer): Use the new method. Remove some
10047     commented out code.
10048     (MapRenderer.draw_polygon_shape): Make the first parameter not the
10049     layer but the low-level render parameter
10050     (ScreenRenderer.draw_shape_layer): Use the low-level render
10051     parameter.
10052    
10053 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
10054    
10055 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
10056     the ClassGroup* classes to make debugging a bit easier.
10057     (ClassGroup.SetLabel): Check that the string is an instance
10058     of StringTypes not StringType. Accounts for Unicode strings.
10059    
10060     * Thuban/Model/color.py: Implemented __repr__ to make
10061     debugging a bit easier.
10062    
10063     * Thuban/Model/save.py (Saver.write_classification): Need to
10064     save the group label.
10065    
10066     * test/test_load.py (testClassification): New. Loads the
10067     iceland_sample_test.thuban file and checks if it was loaded
10068     correctly.
10069    
10070     2003-04-15 Jonathan Coles <[email protected]>
10071    
10072 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
10073     to improve rendering performance by initializing the variables
10074     that are not change each time draw_polygon_shape() is called.
10075     The values are stored in a global struct draw_info.
10076     (draw_polygon_shape): Removed initialization code that is
10077     now in draw_polygon_init().
10078    
10079     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
10080 jonathan 674 drawing initialization call to draw_polygon_init()
10081     (MapRenderer.draw_polygon_shape): Use new signature of
10082     draw_polygon_shape.
10083 jonathan 673
10084 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
10085     weirdness by setting the range to (1, maxint).
10086 jonathan 673
10087 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
10088     instance variables private and optimize comparison operator
10089     by first checking if the color references are the same.
10090     (ClassGroupSingleton): Make instance variables private.
10091     (ClassGroupRange): Make instance variables private.
10092 jonathan 673
10093 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
10094    
10095 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
10096    
10097     First stab at internationalized messages:
10098    
10099     * Thuban/__init__.py (_): Implement the translation function for
10100     real using the python gettext module.
10101    
10102     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
10103     translate empty strings.
10104    
10105     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
10106     Add a missing space to a warning message
10107    
10108     * po/README: New. Notes about the management of the translation
10109     files.
10110    
10111     * po/Makefile: New. Makefile to help manage the translation files.
10112    
10113     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
10114    
10115     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
10116     translations and support files in po/
10117    
10118     * setup.py (data_files): Add the *.mo files to the data_files too
10119    
10120     * README: Add note about the translations when building from CVS
10121    
10122 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
10123    
10124     * Thuban/UI/dock.py: Fixes some window resizing problems most
10125     noticable under windows. Always assume the button bitmaps will
10126     be there. Code clean up.
10127     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
10128     images for the dock/undock button to the same images.
10129     Work around for RTbug #1801.
10130    
10131     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
10132     be allowed to grow within the sizer. Fixes a bug under Windows
10133     where the toolbar wasn't being drawn.
10134    
10135 frank 664 2003-04-14 Frank Koormann <[email protected]>
10136    
10137     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
10138     Updated design to try to make the button functionality more
10139     transparent.
10140    
10141 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
10142    
10143     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
10144     finalize the intialization of the panel.
10145    
10146     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
10147     creation of the panel. Should be the last thing called in the
10148     initializer of a subclass.
10149    
10150     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
10151     set the current selections in the combo boxes. This is needed
10152     under Windows.
10153    
10154     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
10155     level panel to the dialog so that the background colors are
10156     consistent under Windows.
10157    
10158 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
10159    
10160 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
10161     not black.
10162    
10163     * Thuban/UI/legend.py: Enable/disable the legend buttons when
10164     the legend changes. Fixes RTbug #1793.
10165    
10166     * test/test_classification.py: Added test for copying of
10167     classifications.
10168    
10169     2003-04-11 Jonathan Coles <[email protected]>
10170    
10171 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
10172     such as bitmaps.
10173    
10174     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
10175     added images to the move buttons, added 'reverse' button.
10176     (CustomRampPanel.__init__): Added images to the move buttons.
10177     (GreyRamp): New. Generates a ramp from white to black.
10178     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
10179    
10180     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
10181     ID_PROPERTY_*.
10182     (Classifier.__init__): Minor changes to the layout.
10183     (Classifier._OnTitleChanged): Listen for when the user edits the
10184     title and update the dialog's title and the layer's title.
10185    
10186     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
10187    
10188     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
10189     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
10190     if the layer's title changes.
10191    
10192     * Thuban/UI/mainwindow.py: Added new menu item and associated code
10193     to open a dialog to rename the map.
10194     (MainWindow): Use new resource class to import bitmaps.
10195    
10196     2003-04-11 Jonathan Coles <[email protected]>
10197    
10198 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
10199 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
10200     Resources/Bitmaps/group_use_none.xpm,
10201     Resources/Bitmaps/group_use_not.xpm,
10202     Resources/Bitmaps/hide_layer.xpm,
10203     Resources/Bitmaps/layer_properties.xpm,
10204     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
10205     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
10206     New.
10207 jonathan 646
10208 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
10209    
10210 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
10211     Should pass group to ClassGroup constructor.
10212    
10213     2003-04-10 Jonathan Coles <[email protected]>
10214    
10215 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
10216     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
10217     here. Implement SetVisible(), IsVisible().
10218     (ClassGroup.__init__): Add group parameter which acts as a copy
10219     constructor.
10220    
10221     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
10222     "Visible" check boxes.
10223     (Classifier): Rename the buttons and refactor the code to match
10224     the new labels.
10225    
10226     * Thuban/UI/legend.py: Classify button is now called "Properties".
10227     Refactored the code to change variable names.
10228     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
10229    
10230     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
10231     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
10232     renamed to MainWindow.LayerEditProperties.
10233     (MainWindow.ToggleLegend): Don't include map name in legend title.
10234     (MainWindow.SetMap): Added the map name to the window title.
10235     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
10236     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
10237     Functionality is found in the layer properties dialog.
10238    
10239     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
10240     draw visible groups.
10241    
10242 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
10243    
10244 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
10245     addition and selection of new color schemes.
10246     (MonochromaticRamp): New. Generates a ramp between two colors.
10247     (RedRamp): New. Generates a ramp of all red.
10248     (GreenRamp): New. Generates a ramp of all green.
10249     (BlueRamp): New. Generates a ramp of all blue.
10250    
10251     2003-04-09 Jonathan Coles <[email protected]>
10252    
10253 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
10254     Need to copy over field and fieldType attributes.
10255    
10256     * Thuban/Model/table.py (Table.field_range): New. Retrive the
10257     maximum and minimum values over the entire table for a given
10258     field.
10259     (Table.GetUniqueValues): New. Retrieve all the unique values
10260     in the table for a given field.
10261    
10262     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
10263     (GenUniquePanel): New. Controls to allow the user to select
10264     which unique field values they would like in the classification.
10265     (CustomRampPanel): Code that was in ClassGenDialog that allows
10266     the user to select the properties for a custom ramp.
10267     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
10268    
10269     * Thuban/UI/classifier.py: Removed a lot of debugging code.
10270     (Classifier._SetClassification): Callback method so that the
10271     class generator can set the classification in the grid.
10272     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
10273     editing of a group properties class into a wxWindows control.
10274    
10275     * Thuban/UI/dock.py: It was decided that if the user closes
10276     a dockable window the window should simply hide itself. That
10277     way if the user wants to show the dock again it appears in the
10278     same place as it was when it was closed.
10279     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
10280     (DockableWindow._OnButtonClose): Hide the window instead of
10281     destroying it.
10282     (DockableWindow._OnClose): Hide the window instead of
10283     destroying it.
10284    
10285     * Thuban/UI/legend.py (LegendTree): Use a private method to
10286     consistently set the font and style of the text. Fixes RTbug #1786.
10287    
10288     * Thuban/UI/mainwindow.py: Import just the Classifier class.
10289    
10290 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
10291    
10292 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
10293     to the map module
10294    
10295     2003-04-07 Bernhard Herzog <[email protected]>
10296    
10297 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
10298     favor of ToggleSessionTree
10299     (MainWindow.ToggleSessionTree): New method to toggle visibility of
10300     the session tree.
10301     (MainWindow.SessionTreeShown): New method to return whether the
10302     session tree is currently shown.
10303     (MainWindow.ToggleLegend): New method to toggle visibility of the
10304     legend
10305     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
10306     LegendShown
10307     (MainWindow.LegendShown): New method to return whether the legend
10308     is currently shown.
10309     (_method_command): Add checked parameter so we can define check
10310     menu items
10311     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
10312     mainwindow methods.
10313     (show_session_tree, show_legend commands): Removed.
10314     (toggle_session_tree, toggle_legend commands): New commands to
10315     toggle the visibility of the dialogs
10316    
10317 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
10318    
10319 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
10320    
10321     * Thuban/UI/dock.py: Fix Windows problem.
10322    
10323     * Thuban/UI/mainwindow.py: Use False instead of false.
10324     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
10325    
10326     2003-04-07 Jonathan Coles <[email protected]>
10327    
10328 jonathan 612 Since we now say that the order of the groups in a classification
10329     matters, it makes sense to be able to manipulate that order. Most
10330     of the changes to Thuban/Model/classification.py are to that end.
10331    
10332     * Thuban/Model/classification.py (Classification.AppendGroup,
10333     Classification.InsertGroup, Classification.ReplaceGroup,
10334     Classification.RemoveGroup, Classification.GetGroup): Do as the
10335     names imply.
10336     (Classification.FindGroup): This was called GetGroup, but GetGroup
10337     takes an index, while FindGroup takes a value.
10338     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
10339     REFERENCE. Currently there is a cyclic reference between the layer
10340     and its classification. If the classification doesn't need to know
10341     its owning layer we can change this, since it may make sense to be
10342     able to use the same classification with different layers.
10343    
10344     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
10345    
10346     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
10347     not AddGroup()
10348    
10349     * Thuban/UI/classifier.py: Now that we can depend on the order in
10350     a Classification and have methods to manipulate that order we don't
10351     need to use our own data structures in the grid. We can simply make
10352     the grid/table access the information they need from a copy of
10353     the classification object.
10354     (Classifier._OnCloseBtn): Event handler for when the user clicks
10355     'Close'. This is needed so if the user applies changes and then
10356     continues to change the table the user has the option of discarding
10357     the most recent changes and keeping what they applied.
10358    
10359     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
10360     into the same group.
10361    
10362     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
10363     with a really old version of proj, PJ_VERSION won't even be defined.
10364     If it isn't defined then just compile so that the function always
10365     returns Py_False.
10366    
10367     * test/test_classification.py: Fix tests to use the renamed methods.
10368     Still need to write tests for the new methods.
10369    
10370 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
10371 jonathan 608
10372 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
10373     call to SetSelection out of the method and before the call
10374     to __SelectField in __init__. This prevents a recursion of events
10375     when _OnFieldSelect is triggered by the user.
10376    
10377     2003-04-04 Jonathan Coles <[email protected]>
10378    
10379 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
10380     Color.Transparent.
10381     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
10382     Don't bother copying the color, since Colors are immutable.
10383    
10384     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
10385     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
10386     Thuban/UI/renderer.py, Thuban/UI/view.py:
10387     Rename Color.None to Color.Transparent.
10388    
10389     * test/test_classification.py, test/test_load.py: Rename Color.None
10390     to Color.Transparent.
10391    
10392     2003-04-04 Jonathan Coles <[email protected]>
10393 jonathan 603
10394     * Thuban/Model/classification.py: Fix assert calls.
10395     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
10396     Copy the color parameter rather than hold onto a reference.
10397 jonathan 601
10398 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
10399     the color object.
10400     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
10401     are sure there exists only one refernce to Color.None in the system.
10402     This allows us to use 'is' rather than the comparision functions.
10403    
10404     * Thuban/Model/save.py: Fix assert calls.
10405    
10406     * Thuban/UI/classifier.py: Fix assert calls.
10407     (ClassGrid._OnCellDClick): Call up to the classifier to open the
10408     dialog to edit the groups properties.
10409     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
10410     correctly if a cell is resized.
10411     (ClassTable.SetClassification): New. Changes the classification
10412     that is in the table.
10413     (ClassTable.__SetRow): Allow groups to be prepended.
10414     (Classifier): New code for opening the EditProperties and
10415     GenerateRanges dialogs.
10416     (SelectPropertiesDialog.__GetColor): Only set the color in the
10417     color dialog if the current color is not None.
10418    
10419     * Thuban/UI/dock.py: Fix assert calls.
10420    
10421     * Thuban/UI/legend.py: Fix assert calls.
10422    
10423     * Thuban/UI/renderer.py: Fix assert calls.
10424    
10425     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
10426     classifications.
10427     (GenRangePanel): Panel specific to range generation.
10428     (GenSingletonPanel): Panel specific to singleton generation.
10429     (ClassGenerator): Class responsible for actually generating
10430     the classification from the data gathered in the dialog box.
10431     (PropertyRamp): Generates properties whose values range from
10432     a starting property to an ending property.
10433 jonathan 601
10434 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
10435    
10436     * test/support.py (print_garbage_information): New function that
10437     prints information about still connected messages and memory
10438     leaks.
10439     (run_suite): Removed.
10440     (run_tests): New function for use as a replacement of
10441     unittest.main in the test_* files. This one calls
10442     print_garbage_information at the end.
10443    
10444     * test/runtests.py (main): Use support.print_garbage_information
10445    
10446     * test/test_layer.py: Use support.run_tests instead of
10447     unittest.main so we get memory leak information
10448     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
10449     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
10450     (TestLayerLegend.test_visibility): Call the layer's Destroy method
10451     to fix a memory leak.
10452    
10453     * test/test_classification.py: Use support.run_tests instead of
10454     unittest.main so we get memory leak information
10455     (TestClassification.test_classification): Call the layer's Destroy
10456     method to fix a memory leak.
10457    
10458 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
10459    
10460 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
10461     Handle the reference counts of the return value and errors in
10462     PyArg_ParseTuple correctly.
10463    
10464 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
10465     sure the filename is absolute to avoid problems when saving the
10466     session again
10467    
10468 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
10469    
10470 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
10471    
10472 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
10473 jonathan 587 that there actually are points in the returned list of points
10474     before trying to index into the list. The list may be empty if
10475     the shape is a Null Shape.
10476    
10477 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
10478    
10479     * test/test_map.py: Don't use from <module> import *
10480    
10481 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
10482    
10483     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
10484     LAYER_LEGEND_CHANGED
10485    
10486     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
10487     self.Destroy() to close the window after yesterday's changes.
10488    
10489     * test/test_map.py, test/test_session.py: Fix messages that
10490     are sent from maps and layers.
10491    
10492 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
10493    
10494     * Thuban/UI/classifier.py: Commented out some debugging statements.
10495     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
10496     RTbug #1769.
10497    
10498     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
10499     position (although position doesn't work yet under GTK).
10500     (DockableWindow.Destroy): New. Called when the window must be
10501     closed. Namely needed when the DockFrame closes and must close
10502     its children.
10503     (DockFrame): Listen for EVT_CLOSE and destroy all children.
10504    
10505     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
10506     when then window is told to close.
10507     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
10508     comment in source for more info.
10509    
10510     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
10511    
10512     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
10513     symmetry with other such methods.
10514     (MainWindow.ShowLegend): Show the legend docked by default.
10515    
10516 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
10517    
10518     * Thuban/UI/classifier.py: Support for highlighting a specific
10519     group within the grid when the classification dialog is opened.
10520     Also contains a lot of debugging printouts which will later
10521     be removed.
10522    
10523     * Thuban/UI/dock.py: Complete rework on the dock code so that
10524     that it is fairly removed from the rest of the Thuban application.
10525     It is easy to add new docks which the rest of the program having
10526     to be aware of them.
10527    
10528     * Thuban/UI/legend.py: Modifications to support selecting a
10529     specific group in the classification dialog. Changed how layers
10530     are drawn when the layer is visible/invisible.
10531    
10532     * Thuban/UI/mainwindow.py: Removed legend specific code and
10533     replaced it with calls to the new dock code.
10534    
10535     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
10536     to check if scale > 0. Trying to track down a divide by zero.
10537    
10538 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
10539    
10540 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
10541     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
10542     now part of DockableWindow.
10543     (LegendPanel.DoOnSelChanged): Select the current layer in the
10544     map.
10545     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
10546     with the selected layer and/or group.
10547    
10548     2003-03-26 Jonathan Coles <[email protected]>
10549    
10550 jonathan 557 This putback contains the code for dockable windows. There is
10551     no support in wxWindows as of this date for windows that can
10552     attach themselves to other windows.
10553    
10554     The current model contains a DockableWindow which has a parent
10555     window for when it is detached and a dock window that it puts
10556     its contents in when it is docked. The contents of a DockableWindow
10557     must be a DockPanel. DockPanel itself derives from wxPanel.
10558    
10559     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
10560     message, not a LAYER_LEGEND_CHANGED message.
10561    
10562     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
10563    
10564     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
10565     as one of the style properties for the fieldTypeText item to
10566     be sure that its size is correct when the text changes.
10567    
10568     * Thuban/UI/dock.py: New. Classes for the DockPanel and
10569     DockableWindow.
10570    
10571     * Thuban/UI/legend.py: Added some more buttons and made the
10572     LegendPanel a DockPanel.
10573    
10574     * Thuban/UI/mainwindow.py: Added sash windows to the main window
10575     and supporting functions for manipulating the sashes.
10576     (MainWindow.ShowLegend): Create a DockableWindow with the
10577     LegendPanel as the contents.
10578    
10579     * Thuban/UI/messages.py: Added DOCKABLE_* messages
10580    
10581     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
10582     not LAYER_LEGEND_CHANGED, messages.
10583    
10584 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
10585    
10586     * setup.py: Added custom script bdist_rpm_build_script so that
10587     when the rpm is built the path to wx-config is correct.
10588    
10589     * setup.cfg: Added line saying to use the custom build script
10590    
10591 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
10592    
10593     Initial implementation of the Legend.
10594    
10595     * Thuban/UI/legend.py: New. Creates a window that shows the map's
10596     Legend information and allows the user to add/modify classifications
10597     and how the layers are drawn on the map.
10598    
10599     * setup.py: New command 'build_docs' which currently uses
10600     happydoc to generate html documentation for Thuban.
10601    
10602     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
10603     Returns a string which is appropriately describes the group.
10604    
10605     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
10606     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
10607    
10608     * Thuban/Model/map.py (Map): Rename messages and use new, more
10609     specific, messages.
10610    
10611     * Thuban/Model/messages.py: New message to indicate that a layer's
10612     data has changed (LAYER_CHANGED). New map messages to indicate
10613     when layers have been added/removed/changed or if the stacking order
10614     of the layers has changed.
10615    
10616     * Thuban/Model/session.py: Rename and use new messages.
10617    
10618     * Thuban/UI/classifier.py: Remember if any changes have actually
10619     been applied so that if the dialog is cancelled without an application
10620     of changes we don't have to set a new classification.
10621     (ClassDataPreviewer): Pulled out the window specific code and put it
10622     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
10623     symbols on any DC.
10624    
10625     * Thuban/UI/mainwindow.py: New code to open the legend.
10626    
10627     * Thuban/UI/view.py: Use new message names.
10628    
10629 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
10630    
10631     * Thuban/UI/main.py (verify_versions): New. Checks the versions
10632     of Python, wxPython, and some other libraries.
10633    
10634     * extensions/thuban/wxproj.cpp (check_version): Checks the given
10635     version against what wxproj was compiled with.
10636     (check_version_gtk): If wxproj was compiled with gtk then check
10637     the given version against the version of the gtk library
10638     currently being used.
10639    
10640 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
10641    
10642     * test/test_command.py: Run the tests when the module is run as a
10643     script
10644    
10645     2003-03-14 Bernhard Herzog <[email protected]>
10646    
10647     Implement selection of multiple selected shapes in the same layer:
10648    
10649     - Introduce a new class to hold the selection. This basically
10650     replaces the interactor which was nothing more than the
10651     selection anyway. A major difference is of course that the new
10652     selection class supports multiple selected shapes in one layer
10653    
10654     - Move the object that represents the selection from the
10655     application to the canvas. The canvas is a better place than the
10656     application because the selection represents which shapes and
10657     layer of the map displayed by the canvas are selected and
10658     affects how the map is drawn.
10659    
10660     - Make the selection and its messages publicly available through
10661     the mainwindow.
10662    
10663     - The non-modal dialogs do not get a reference to the interactor
10664     anymore as they can simply refer to their parent, the
10665     mainwindow, for the what the interactor had to offer.
10666    
10667     * Thuban/UI/selection.py: New module with a class to represent the
10668     selection.
10669    
10670     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
10671     these unused messages
10672    
10673     * Thuban/UI/application.py (ThubanApplication.OnInit)
10674     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
10675     interactor is gone now.
10676     (ThubanApplication.CreateMainWindow): There is no interactor
10677     anymore so we pass None as the interactor argument for now for
10678     compatibility.
10679    
10680     * Thuban/UI/view.py (MapCanvas.delegated_messages)
10681     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
10682     Unsubscribe, delegate messages according to the delegated_messages
10683     class variable.
10684     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
10685     attributes from instance variables as described with the
10686     delegated_methods class variable.
10687     (MapCanvas.__init__): New instance variable selection holding the
10688     current selection
10689     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
10690     pass them on to the renderer
10691     (MapCanvas.SetMap): Clear the selection when a different map is
10692     selected.
10693     (MapCanvas.shape_selected): Simple force a complete redraw. The
10694     selection class now takes care of only issueing SHAPES_SELECTED
10695     messages when the set of selected shapes actually does change.
10696     (MapCanvas.SelectShapeAt): The selection is now managed in
10697     self.selection
10698    
10699     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
10700     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
10701     Unsubscribe, delegate messages according to the delegated_messages
10702     class variable.
10703     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
10704     attributes from instance variables as described with the
10705     delegated_methods class variable.
10706     (MainWindow.__init__): The interactor as ivar is gone. The
10707     parameter is still there for compatibility. The selection messages
10708     now come from the canvas.
10709     (MainWindow.current_layer, MainWindow.has_selected_layer):
10710     Delegate to the the canvas.
10711     (MainWindow.LayerShowTable, MainWindow.Classify)
10712     (MainWindow.identify_view_on_demand): The dialogs don't need the
10713     interactor parameter anymore.
10714    
10715     * Thuban/UI/tableview.py (TableFrame.__init__)
10716     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
10717     (LayerTableFrame.row_selected): The interactor is gone. It's job
10718     from the dialog's point of view is now done by the mainwindow,
10719     i.e. the parent. Subscribe to SHAPES_SELECTED instead
10720     of SELECTED_SHAPE
10721    
10722     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
10723     is gone. It's job from the dialog's point of view is now done by
10724     the mainwindow, i.e. the parent.
10725    
10726     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
10727     gone. It's job from the dialog's point of view is now done by the
10728     mainwindow, i.e. the parent.
10729    
10730     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
10731     gone. It's job from the dialog's point of view is now done by the
10732     mainwindow, i.e. the parent.
10733     (SessionTreeCtrl.__init__): New parameter mainwindow which is
10734     stored as self.mainwindow. The mainwindow is need so that the tree
10735     can still subscribe to the selection messages.
10736     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
10737     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
10738     selection is now accessible through the mainwindow. Subscribe to
10739     SHAPES_SELECTED instead of SELECTED_SHAPE
10740    
10741     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
10742     SHAPES_SELECTED message now.
10743     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
10744     so deal with multiple shapes
10745     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
10746     gone. It's job from the dialog's point of view is now done by the
10747     mainwindow, i.e. the parent.
10748    
10749     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
10750     parameter is now a list of shape ids.
10751     (RecordTable.SetTable): The second parameter is now a list of
10752     indices.
10753    
10754     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
10755     selected_shape parameter and ivar to selected_shapes. It's now a
10756     list of shape ids.
10757     (MapRenderer.draw_label_layer): Deal with multiple selected
10758     shapes. Rearrange the code a bit so that the setup and shape type
10759     distinctions are only executed once.
10760    
10761     * test/test_selection.py: Test cases for the selection class
10762    
10763 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
10764    
10765     * Thuban/Model/load.py: Temporary fix so that the xml reader
10766     doesn't cause Thuban to crash.
10767    
10768     * Thuban/Model/layer.py: Handle the cyclic references between
10769     a layer and its classification better, and be sure to disconnect
10770     the classification from the layer when the layer is destroyed
10771     so that we don't maintain a cyclic reference that may not be
10772     garbage collected.
10773    
10774     * Thuban/Model/classification.py: See comment for layer.py.
10775    
10776 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
10777    
10778     * HOWTO-Release: New. Information on the steps for releasing
10779     a new version of Thuban.
10780    
10781 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
10782    
10783     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
10784     Use True instead of true.
10785     (Classifier): Should have a single panel in which all the controls lie.
10786    
10787     * Thuban/UI/proj4dialog.py: Add normal border.
10788    
10789     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
10790    
10791     * Thuban/UI/mainwindow.py: Use True instead of true.
10792    
10793     * setup.py: Update some definitions to use wxWindows2.4 files
10794    
10795     * Data/iceland_sample_class.thuban: Fixed file so that the
10796     field_type information is present.
10797    
10798 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
10799    
10800 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
10801     field type label grow so that when the text changes the
10802     size is updated correctly. This may be a wxWindows bug.
10803    
10804     2003-03-10 Jonathan Coles <[email protected]>
10805    
10806 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
10807     SESSION_REPLACED.
10808    
10809     * Thuban/UI/classifier.py: Wrap text with _().
10810     (ClassGrid.CreateTable): Set dimensions and size hints here,
10811     instead of in Reset, so we only set the size once.
10812    
10813     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
10814    
10815     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
10816     Call Close() instead of Shutdown().
10817    
10818     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
10819    
10820     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
10821     Go back to using OnClose() instead of Shutdown().
10822    
10823     2003-03-10 Jonathan Coles <[email protected]>
10824    
10825 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
10826     to know the old field index as well as the new one.
10827    
10828     2003-03-10 Jonathan Coles <[email protected]>
10829    
10830 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
10831     to correctly set the table information and call this from
10832     __init__ and from _OnFieldSelect so that all the information
10833     is up to date when the dialog opens and when a field is changed.
10834    
10835     2003-03-10 Jonathan Coles <[email protected]>
10836    
10837 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
10838     layer's message function directly, use the ClassChanged() method
10839     when then classification changes. SetField/SetFieldType/SetLayer
10840     must keep the information about field name and field type in
10841     sync when an owning layer is set or removed.
10842    
10843     * Thuban/Model/layer.py: Added ClassChanged() so that the
10844     classification can tell the layer when its data has changed.
10845     (Layer.SetClassification): Accepts None as an arguement to
10846     remove the current classification and correctly handles
10847     adding a new classification.
10848    
10849     * Thuban/Model/load.py: Comment out print statement
10850    
10851     * test/test_classification.py, test/test_save.py: New and
10852     improved tests.
10853    
10854 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
10855    
10856     * Thuban/Model/classification.py: Implemented __copy__ and
10857     __deepcopy__ for ClassGroup* and ClassGroupProperites so
10858     they can easily be copied by the classifier dialog.
10859     (ClassGroupProperites.__init__): The default line color should
10860     have been Color.Black.
10861    
10862     * Thuban/UI/classifier.py: Setting and Getting table values now
10863     uses a consistent set of functions.
10864     (Classifier): Now non-modal. Has field type label which changes
10865     as the field changes. Keep track of buttons in a list so that
10866     we can enable/disable the buttons when the None field is selected.
10867     (SelectPropertiesDialog): Add buttons to make the colors transparent.
10868    
10869     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
10870     does what OnClose did, but can be called by the application to
10871     close a window. Needed when a session changes, and we have to
10872     close the classifier windows.
10873    
10874     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
10875     Shuts down open dialogs. Used when a new session is created
10876     or a session is opened.
10877     (MainWindow.SaveSession): Should only call application.SaveSession()
10878     if we don't call SaveSessionAs first.
10879     (MainWindow.Classify): Allow different classifier dialogs for
10880     different layers.
10881    
10882     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
10883     the parent class handle it. Add Shutdown() to unsubscibe from
10884     event notification and call the parent Shutdown(). This was
10885     necessary so the application can close the tree window.
10886    
10887 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
10888    
10889     * Thuban/Model/classification.py: Minor documentation changes,
10890     Addition of __eq__ and __ne__ methods.
10891     (Classification.SetLayer): prevent recursion between this method
10892     and Layer.SetClassification().
10893    
10894     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
10895    
10896     * Thuban/Model/layer.py (SetClassification): prevent recursion
10897     between this method and Classification.SetLayer().
10898    
10899     * test/test_classification.py, test/test_load.py,
10900     test/test_session.py: Fixed and added tests for the classification
10901     classes.
10902    
10903 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
10904    
10905     * Thuban/UI/classifier.py (ClassGrid.__init__)
10906     (ClassGrid.CreateTable): Move the SetSelectionMode call to
10907     CreateTable because otherwise it triggers an assertion in
10908     wxPython/wxGTK 2.4.
10909    
10910 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
10911    
10912 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
10913 jonathan 471
10914 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
10915 jonathan 471
10916 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
10917 jonathan 471
10918 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
10919 jonathan 471
10920     2003-03-05 Jonathan Coles <[email protected]>
10921    
10922 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
10923     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
10924     Store just the groups in the table and generate the other
10925     column information when it is requested. Add "None" field
10926     to pull-down to select no classification.
10927    
10928     * Thuban/common.py: Moved FIELDTYPE constants from table.py
10929     (Str2Num): Only catch ValueError exceptions.
10930    
10931     * Thuban/Model/classification.py: Class documentation. Renaming
10932     of methods with Stroke to Line. Groups are stored in a single
10933     list with the default as the first element. Groups are searched
10934     in the order they appear in the list.
10935    
10936     * Thuban/Model/color.py: Documentation.
10937    
10938     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
10939     the kind of data represented by a field.
10940    
10941     * Thuban/Model/load.py (ProcessSession): Use proper string
10942     conversion function; fixes RTbug #1713.
10943    
10944     * Thuban/Model/save.py (Saver): Store field type information.
10945    
10946     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
10947     (Table): Add field_info_by_name() to retrieve field information
10948     by specifying the field name, not the number.
10949    
10950     * Thuban/UI/mainwindow.py: Function name changes.
10951    
10952     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
10953     get the layer classification once. Don't try to classify
10954     values when the field is None: just use the default properties.
10955    
10956     * Thuban/UI/view.py: Function name changes.
10957    
10958     * Doc/thuban.dtd: Add field_type attribute to a classification.
10959    
10960 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
10961    
10962 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
10963     the fill and stroke layer attributes optional with suitable
10964     default values. Add the stroke_width layer attribute. Use correct
10965     syntax for empty elements. Make the attribute list for labels
10966     refer to the label element.
10967    
10968     2003-03-04 Bernhard Herzog <[email protected]>
10969    
10970 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
10971     Python 2.3 containing some of the functionality we implement in
10972     setup.py ourselves.
10973    
10974     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
10975     before the selection mode. Doing it the other way round triggers
10976     an assertion in wxWindows.
10977    
10978     * Thuban/Model/save.py (escape): Fix typo in doc-string
10979    
10980     * Thuban/Model/classification.py: Remove unnecessary wxPython
10981     import
10982    
10983 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
10984    
10985     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
10986     Parameter 'value' should default to None.
10987    
10988     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
10989     the class attribute __classification is now private.
10990    
10991     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
10992     Classifier to ClassGrid. Added support for removing selected rows,
10993     which including code for keeping track of when cells are selected,
10994     and deselected.
10995     (ClassTable): Support for added/removing rows. Fixed a problem
10996     with __ParseInput whereby it would not allow strings (only numbers)
10997     to be entered.
10998     (Classifier): Added button and supporting code for removing
10999     selected rows.
11000    
11001 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
11002 jonathan 434
11003     * Thuban/common.py: Moved color conversion functions into
11004     Thuban/UI/common.py.
11005     (Str2Num): Now converts the float (not the string) to a long/int
11006     so that an exception isn't thrown.
11007    
11008     * Thuban/UI/common.py: Common functions used in several UI modules
11009    
11010     * Thuban/Model/classification.py: Changed the class hierarchy
11011     so that a Classification consists of Groups which return
11012     Properties when a value matches a Group.
11013    
11014     * Thuban/Model/layer.py: Fixed name resolution problem.
11015    
11016     * Thuban/Model/load.py: Use new Classification and Group functions.
11017    
11018     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
11019     failure.
11020     (Saver.write_classification): Use new Classification and Group
11021     functions.
11022    
11023     * Thuban/UI/classifier.py: Changes to use new Classification and Group
11024 jonathan 445 functions. Fix to create a tuple with a single value instead of
11025     simply returning the value.
11026 jonathan 434
11027     * Thuban/UI/renderer.py: Use new Classification and Group functions.
11028     Use common.py functions.
11029    
11030 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
11031 jonathan 447
11032     * test/test_classification.py: Use new Classification and Group
11033     classes.
11034 jonathan 434
11035 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
11036    
11037     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
11038     functions from Thuban color objects to wxWindow colour objects.
11039    
11040     * Thuban/Model/classification.py (Classification): Renamed
11041     GetProperties() to GetClassData(). Used the new iterator
11042     in TreeInfo().
11043     (ClassIterator): Iterator implementation to iterate over the
11044     ClassData objects in a classification object.
11045    
11046     * Thuban/Model/save.py (Saver.write_classificaton): Uses
11047     the new iterator to save the classification information.
11048    
11049     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
11050     for changing the stroke and fill colors and previewing the
11051     changes.
11052    
11053     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
11054     MainWindow.SaveSessionAs): Text string changes so the dialogs
11055     have more meaningful titles.
11056    
11057     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
11058     Classification method name from GetProperties to GetClassData.
11059    
11060     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
11061     instead of accessing now non-existent class variables.
11062    
11063 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
11064    
11065     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
11066     unneeded Shape() call. Rendering is substantially faster without
11067     it and it avoids some problems with broken shape files.
11068    
11069 frank 423 2003-02-20 Frank Koormann <[email protected]>
11070    
11071     Force minimal size of identify and label dialogs. The autosizing
11072     looked too ugly.
11073    
11074     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
11075     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
11076     Set size of listctrl.
11077     * Thuban/UI/identifyview.py (IdentifyView.__init__):
11078     Set size of dialog.
11079    
11080 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
11081    
11082     * test/test_classification.py, test/test_layer.py,
11083     test/test_load.py, test/test_map.py, test/test_session.py:
11084     Updated the tests to use the new functions that are in the
11085     respective classes.
11086    
11087     * Thuban/Model/classification.py (Classification):
11088     Uses the new ClassData* classes. Modification messages are
11089     passed up to the parent layer (if it exists).
11090     (ClassData): New class to encapsulate the common data in each
11091     classification property.
11092     (ClassDataDefault): Represents the Default class. data.
11093     (ClassDataPoint): Represents a single class. data point
11094     (ClassDataRange): Represents a class. range
11095     (ClassDataMap): Represents a class. map (unused).
11096    
11097     * Thuban/Model/color.py: Added Color.None to represent something
11098     with no color. Color.Black represents the color black.
11099     (NoColor): Helper class derived from Color to represent something
11100     with no color.
11101    
11102     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
11103     stroke_width attributes. Made the 'classification' attribute private.
11104     New methods for setting/getting the classification.
11105    
11106     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
11107     to get the classifcation and use the new ClassData* classes to
11108     hold the classification data. Use Str2Num to convert numbers
11109     properly.
11110    
11111     * Thuban/Model/save.py (Saver): Use new Color and Classification
11112     methods
11113    
11114     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
11115     custom grid.
11116     (ClassTable): Support for editing Values and Labels and for
11117     changing what type (point or range) of data is stored in each
11118     property based on how the user enters the data.
11119     (Classifier): Support for saving the new classifications and
11120     launching the dialog to edit a property.
11121     (SelectPropertiesDialog): New class for editing the visual
11122     properties of a classification (stroke color, width, and fill color)
11123     (ClassPreviewer): Took the Draw method from ClassRenderer and
11124     made most of it into this new class. Intend to use this class in
11125     the SelectPropertiesDialog for previewing changes.
11126    
11127     * Thuban/UI/renderer.py: Use new Color and Classification methods.
11128    
11129     * Thuban/UI/tree.py: Formatting changes.
11130    
11131     * Doc/thuban.dtd: Add 'label' element
11132    
11133     * Thuban/common.py: New. Contains common routines used throughout
11134     the code.
11135     (Str2Num): Takes a string and converts it to the "best" type of
11136     number.
11137    
11138 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
11139    
11140     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
11141     dragging flag is always set to 0 even when the tool implementation
11142     raises an exception
11143    
11144 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
11145    
11146     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
11147     method to create a splash screen.
11148     (ThubanApplication.ShowMainWindow): New. Show the main window.
11149     Needed so the splash screen can display the mainwindow
11150     (ThubanApplication.OnInit): Call the
11151     new splash_screen method to determine whether the application
11152     should display a splash screen. If it displays a splash screen do
11153     not immediately show the main window.
11154    
11155 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
11156    
11157     * Thuban/Model/classification.py: Added import line to fix
11158     feature conflicts between running on python2.2 and python2.1.
11159    
11160     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
11161     onto the clinfo parameter, so removed the deepcopy().
11162    
11163 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
11164    
11165 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
11166 jonathan 396 Added element_open variable to track opening and closing of tags
11167     so that tags that don't span more than one line are closed with
11168     /> instead of </tag_name>. Use the GetDefault*() methods of
11169     the Classification class.
11170    
11171     * Thuban/Model/classification.py (Classificaton): Added set and
11172     get methods for the default data. The class also takes a layer
11173     reference so that modification messages can be sent. Fixed the
11174     methods to use the new ClassData class.
11175     (ClassData): New class to encapsulate the classification data
11176    
11177     * Thuban/Model/layer.py (Layer): Remove the
11178 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
11179 jonathan 396 SetDefault*() methods on the layer's classification object.
11180 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
11181 jonathan 396 Classification class.
11182    
11183     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
11184     object instead of a dictionary.
11185    
11186 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
11187 jonathan 396 draw the classifications in the dialog box's table.
11188     (Classifier): Modified to use the ClassRenderer class.
11189    
11190 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
11191     methods of the Classification class.
11192 jonathan 396
11193     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
11194     of the ClassData class.
11195    
11196     * test/test_classification.py, test/test_layer.py,
11197     test/test_map.py, test/test_session.py: Fix the tests to work
11198     with the above code changes.
11199    
11200 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
11201    
11202     * Thuban/Model/classification.py (Classification): Added getNull()
11203     to return the NullData reference
11204    
11205     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
11206     Layer.SetStrokeWidth): Modified these functions to change the
11207     null data in the classification rather than keep these values
11208     directly in the Layer class. Menu options to change these values
11209     work again.
11210    
11211 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
11212    
11213 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
11214 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
11215 jonathan 380 classification data.
11216    
11217 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
11218     Colors in the tree view.
11219    
11220     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
11221     the tree info for classifications. Commented out unnecessary lines.
11222    
11223     * Thuban/Model/classification.py (Classification.TreeInfo): New
11224     function to add information about the classification into the
11225     tree view.
11226    
11227 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
11228 jan 375
11229 tkoester 403 * Thuban/__init__.py (_): New.
11230 jan 375
11231     * Thuban/Model/classification.py, Thuban/Model/extension.py,
11232     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
11233 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
11234     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
11235     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
11236     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
11237     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
11238     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
11239 jan 375
11240 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
11241    
11242 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
11243 jonathan 370
11244 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
11245     a layer classification. Supports specific data points and
11246     ranges.
11247 jonathan 370
11248 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
11249     information.
11250 jonathan 370
11251 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
11252     information.
11253 jonathan 370
11254 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
11255     specifying classification information.
11256 jonathan 370
11257 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
11258     dialog.
11259 jonathan 370
11260 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
11261     classification information.
11262 jonathan 370
11263 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
11264     classification data.
11265 jonathan 370
11266 tkoester 403 * test/test_classification: Tests for the Classification class.
11267 jonathan 370
11268 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
11269    
11270 bh 361 * test/test_command.py: New. Tests for the command classes.
11271    
11272 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
11273     (Command.IsTool): New method to distinguish between command
11274     switching tools and other commands.
11275    
11276     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
11277     the tool to avoid direct assignments to instance variables
11278     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
11279     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
11280     change the tool
11281    
11282     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
11283     active tool's command turns insensitive, disable the tool.
11284     (_tool_command): Use the new ToolCommand class
11285    
11286     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
11287     SelectTool method to change the tool
11288     (iconfile): Use the ToolCommand class
11289    
11290 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
11291    
11292     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
11293     the case of selected items that are not children of Layers or Maps
11294     properly. Previously this bug would trigger an assertion in
11295     wxWindows.
11296    
11297 frank 352 2002-11-06 Frank Koormann <[email protected]>
11298    
11299 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
11300     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
11301     Full Extent).
11302 tkoester 403
11303 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
11304    
11305     * setup.py (setup call): version now 0.1.3
11306    
11307     * MANIFEST.in: Add the files in test/
11308    
11309     * test/README: Add note about tests requiring the iceland data
11310    
11311     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
11312     copyright notice.
11313    
11314 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
11315    
11316     * test/test_map.py
11317     (TestMapWithContents.test_projected_bounding_box): Use an explicit
11318     epsilon.
11319    
11320     * test/support.py (FloatComparisonMixin.assertFloatEqual)
11321     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
11322     message if the assertion fails and don't return the return value
11323     of self.assert_. In assertFloatSeqEqual the return meant that not
11324     all items of the sequence were compared.
11325    
11326 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
11327    
11328 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
11329    
11330     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
11331    
11332 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
11333     the string with the bounding box on the fly because of platform
11334     differences in the way %g is handled.
11335    
11336     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
11337     DBFfile too because Thuban layers can't yet cope missing DBF
11338     files.
11339    
11340     2002-09-20 Bernhard Herzog <[email protected]>
11341    
11342 bh 326 * test/test_menu.py: Use initthuban instead of
11343     add_thuban_dir_to_path to initialize Thuban.
11344    
11345     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
11346     Mixin class for float comparisons
11347     (SubscriberMixin): New. Mixin class to test messages sent through
11348     the Connector class
11349    
11350     * test/README: Fix a typo and add the -v flag to the command for
11351     individual tests
11352    
11353 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
11354    
11355     * test/test_proj.py: New. Test cases for Thuban.Model.proj
11356    
11357     * test/test_map.py: New. Test cases for Thuban.Model.map
11358    
11359     * test/test_layer.py: New. Test cases for Thuban.Model.layer
11360    
11361     * test/test_label.py: New. Test cases for Thuban.Model.label
11362    
11363     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
11364    
11365     * test/test_color.py: New. Test cases for Thuban.Model.color
11366    
11367     * test/test_base.py: New. Test cases for Thuban.Model.base
11368    
11369 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
11370    
11371     * Thuban/Model/session.py (Session.forwarded_channels): Forward
11372     the CHANGED channel too.
11373    
11374     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
11375     CHANGED channel too.
11376     (Map.__init__): Call the Modifiable constructor as well.
11377    
11378     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
11379     event if the modified flag changes.
11380     (Modifiable.changed): Tweak the doc-string.
11381    
11382     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
11383     (MainWindow.set_position_text): Put the code that puts the text
11384     with the mouse position into the status bar into the new method
11385     set_position_text so that it can overwritten in derived classes.
11386    
11387 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
11388    
11389     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
11390     message box on the main window.
11391    
11392 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
11393    
11394     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
11395     the 'E' because it's less likely to interfere with other menu
11396     entries.
11397 bh 315 (MainWindow.build_menu): remove an incorrect comment.
11398 bh 313
11399 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
11400    
11401     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
11402     (_tool_command): Add sensitive parameter
11403     (_has_visible_map): Sensitivity callback to tools and other
11404     commands that require a visible map. Use it in map_zoom_in_tool,
11405     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
11406     and map_full_extent
11407    
11408 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
11409    
11410     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
11411     VIEW_POSITION
11412    
11413 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
11414 frank 306
11415     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
11416    
11417 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
11418    
11419 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
11420     wxWindows already and our implementation doesn't work correctly
11421     with wxGTK 2.3:
11422     (MapCanvas.__init__): Remove the instance variable
11423     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
11424     be drawin
11425     (MapCanvas.OnIdle): Removed.
11426    
11427 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
11428     a parameter to determine the size of the rectangle.
11429     (MapCanvas.find_shape_at): Create the box around the point on a
11430     layer by layer basis and make the size depend on the shape type.
11431     This solves a problem with the selection of point shapes at the
11432     border of the layer's bounding box
11433    
11434 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
11435    
11436 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
11437     for the sensitivity of remove layer.
11438     (_can_remove_layer): New. Sensitivity callback for remove layer
11439     (Command layer_remove): Use _can_remove_layer
11440    
11441     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
11442     determine whether a given layer can be deleted.
11443    
11444 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
11445     (MapCanvas.do_redraw): Get rid of the unused update_region
11446     instance variable
11447    
11448 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
11449    
11450 bh 292 * test/: new subdirectory with a bunch of unit tests.
11451    
11452     * test/README, test/test_table.py, test/test_save.py,
11453     test/test_menu.py, test/test_load.py: Initial set of tests and
11454     brief instructions on how to run them
11455    
11456 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
11457    
11458 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
11459     arcs with multiple parts.
11460    
11461 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
11462     Handle degenrate rectangles.
11463    
11464 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
11465     (Table.__init__): Keep track of whether the DBF is open for
11466     writing
11467     (Table.write_record): Open the DBF file for writing when necessary
11468    
11469 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
11470    
11471     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
11472     dbf files only for reading by default. Use a new writable dbf
11473     object for writing.
11474    
11475 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
11476    
11477 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
11478     (MainWindow.Context): New method to return a context
11479     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
11480     new method
11481    
11482 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
11483     layer table specific code from TableGrid into LayerTableGrid
11484     (TableFrame, LayerTableFrame): Split the layer table specific code
11485     from TableFrame into LayerTableFrame
11486 bh 280 (LayerTableGrid.select_shape): Remove a debug print
11487 bh 278
11488     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
11489     LayerTableFrame
11490    
11491 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
11492    
11493     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
11494     absolute filename.
11495    
11496 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
11497    
11498 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
11499     records.
11500 tkoester 403 (Table.__init__): Open the DBF file for writing too.
11501 bh 275
11502     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
11503     into the underlying table.
11504    
11505     * extensions/shapelib/shapefil.h (DBFCommit),
11506     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
11507     commit any changes made to the DBF file.
11508    
11509 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
11510     (_tool_command): Put the code that generates the "checked"
11511     callback into a separate function so that we can reuse it
11512     elsewhere
11513    
11514 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
11515     session into an XML file. The main reason to introduce a class is
11516     that applications built on Thuban can derive from it so that they
11517     can save additional information in a session file.
11518     (save_session): Delegate almost all the work to the Saver class.
11519     Rename the filename argument to file because it may be a file like
11520     object now.
11521    
11522     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
11523     code. Remove the little test code which would be executed when the
11524     module is run as a script which didn't work anymore since it can't
11525     import the other Thuban modules.
11526     (ProcessSession, load_session): Refactor the ProcessSession to
11527     have one method for each element start and end tag so that derived
11528     classes can easily override the processing of individual tags.
11529     Also, always parse with namespaces enabled because applications
11530     built on top of Thuban will likely use namespaces if they extend
11531     the session file format.
11532    
11533 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
11534    
11535     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
11536     because thubaninit_contents will do it for us.
11537    
11538 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
11539 jan 265
11540     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
11541     tree window already open
11542    
11543 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
11544    
11545 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
11546     with self.
11547    
11548     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
11549     when we have actually captured it.
11550    
11551 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
11552     shapefile and destroy the table.
11553    
11554     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
11555    
11556 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
11557    
11558 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
11559     instance variable columns
11560     (RecordTable.GetTypeName): row and col may be negative in some
11561     cases.
11562    
11563 bh 254 * setup.py (InstallLocal.initialize_options)
11564     (InstallLocal.finalize_options, InstallLocal.user_options): New
11565     option create-init-file to build a thubaninit.py when running
11566     install_local
11567     (InstallLocal.run): Create the thubaninit.py module when requested
11568     (thubaninit_contents): Split the template into several parts and
11569     create a new function thubaninit_contents that creates the
11570     contents of a thubaninit module.
11571     (ThubanInstall.run): Use the new function to create the thubaninit
11572     module.
11573    
11574 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
11575    
11576     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
11577     cleanup.
11578     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
11579    
11580     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
11581     direct base class' Destroy method.
11582    
11583     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
11584     layers.
11585     (Map.Destroy): Destroy the label_layer as well and call the
11586     inherited Desatroymethod first so that no more messages are
11587     issued.
11588     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
11589     message if the stacking order actually has changed. Add
11590     doc-strings.
11591     (Map.BoundingBox): Correct the doc-string.
11592     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
11593     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
11594    
11595     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
11596     all labels.
11597    
11598 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
11599    
11600     * Thuban/Model/map.py (Map.subscribe_layer_channels)
11601     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
11602     to a layer's channels into separate methods.
11603     (Map.RemoveLayer, Map.AddLayer): Call the new methods
11604     (Map.Destroy): Unsubscribe from a layer's channels before
11605     destroying it.
11606    
11607     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
11608     selected_layer parameter to searched_layer which is the layer to
11609     search in.
11610     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
11611     search to that layer. Return the selected layer and shape.
11612    
11613     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
11614     typo
11615    
11616 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
11617    
11618 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
11619     Extend the doc string.
11620     (ThubanApplication.subscribe_session)
11621     (ThubanApplication.unsubscribe_session): New methods to
11622     subscribe/unsubscribe to/from session channels.
11623     (ThubanApplication.SetSession): Call the new methods here.
11624     (ThubanApplication.maps_changed, ThubanApplication.set_map):
11625     Renamed set_map to maps_changed. Its now a subscriber for
11626     MAPS_CHANGED.
11627    
11628     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
11629     x-coordinate in case of simple clicks
11630    
11631     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
11632     don't pass it as a parameter
11633    
11634     * Thuban/Model/session.py (Session.RemoveMap): New
11635    
11636 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
11637     window size into a parameter.
11638    
11639 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
11640    
11641 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
11642     just commands.
11643    
11644 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
11645     parameter list a bit to allow setting the window title and the
11646     initial message in the status bar. Update the callers.
11647    
11648     * Thuban/UI/application.py (ThubanApplication.OnInit)
11649     (ThubanApplication.CreateMainWindow): Put the mainwindow
11650     instantiation into a separate method so that it can be overridden
11651     by a subclass.
11652    
11653 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
11654    
11655 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
11656     another changed message is issued to make it easier to get
11657     notified of changes.
11658     (Session): Update the doc string
11659     (Session.forward): Issue changed-events as CHANGED as well.
11660     (Session.changed): Overwrite the inherited version to issue
11661     CHANGED events as well.
11662    
11663     * Thuban/UI/tree.py: We can now simply subscribe to the session's
11664     CHANGED channel to be informed of changes.
11665     (SessionTreeCtrl.session_channels): Not needed any longer.
11666 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
11667 bh 234 Only have to (un)subscribe CHANGED
11668    
11669     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
11670    
11671 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
11672     for the wxPython locale bug to __init__.py so that it's
11673     automatically executed by anybody using UI code from Thuban.
11674    
11675 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
11676    
11677 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
11678    
11679     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
11680     as parameter and store it in an instance variable
11681     (MainWindow.invoke_command, MainWindow.update_command_ui)
11682     (MainWindow.save_modified_session, MainWindow.NewSession)
11683     (MainWindow.OpenSession, MainWindow.SaveSession)
11684     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
11685     application object.
11686    
11687     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
11688     the main window with self.
11689    
11690 bh 225 * Thuban/UI/context.py: New module with the context class
11691    
11692     * Thuban/UI/command.py (Command): Update doc string.
11693    
11694     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
11695     MainWindow.update_command_ui): Pass an instance of the context
11696     class to the command's methods
11697     (check_current_tool, call_method): Handle the new context
11698     implementation
11699    
11700     * Examples/simple_extensions/simple_tool.py (simple_tool,
11701     check_simple_tool): Handle the new context implementation
11702    
11703     * Examples/simple_extensions/simple_command.py (simple_command):
11704     Handle the new context implementation. Update the comments about
11705     the context.
11706    
11707     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
11708     doc-string
11709     (ThubanApplication.Session): New method to return the session
11710     object
11711    
11712     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
11713     interactor's selected_layer may not be a layer of the current
11714     session when the tree is updated while a new session is being set.
11715    
11716 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
11717    
11718     * Thuban/UI/tree.py (color_string): Removed. No longer used.
11719     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
11720     update_tree into update_tree and add_items. The tree now uses a
11721     more generic way to display the contents of the tree.
11722     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
11723    
11724     * Thuban/Model/layer.py (Layer.TreeInfo),
11725     Thuban/Model/extension.py (Extension.TreeInfo),
11726     Thuban/Model/map.py (Map.TreeInfo),
11727 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
11728 bh 217 Add TreeInfo methods to implement the new tree view update scheme
11729    
11730 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
11731    
11732     * Thuban/UI/application.py: Don't use "import from" for the
11733     MainWindow. It can't always be resolved.
11734     (ThubanApplication.OnInit): change reference to MainWindow
11735     accordingly.
11736    
11737     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
11738     completely
11739    
11740 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
11741    
11742     * setup.py (create_init_module): New configurable variable whose
11743     default depends on the platform we're running on.
11744     (ThubanInstall.initialize_options): Initialize
11745     self.create_init_module from the global create_init_module
11746     (ThubanInstall.user_options): indictate that the options
11747     create-init-module and init-module-dir have arguments.
11748    
11749     * setup.py: In the setup call change the version number to include
11750     cvs.
11751    
11752     * MANIFEST.in: Add the files in Examples
11753    
11754 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
11755    
11756 bh 210 * setup.py: In the setup call, use the thuban homepage as the
11757     value of the url parameter.
11758    
11759 bh 208 * Examples: New subdirectory for examples.
11760    
11761     * Examples/simple_extensions/simple_tool.xpm,
11762     Examples/simple_extensions/simple_tool.py,
11763     Examples/simple_extensions/simple_command.py,
11764     Examples/simple_extensions/README: Simple examples showing how to
11765     add new commands and tools.
11766    
11767 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
11768     bdist_rpm that we also have an install script.
11769     (bdist_inno): Add 2002 to the copyright notice.
11770    
11771 bh 205 * setup.py: Create a file in python's site-packages directory to
11772     make installation of Thuban as a library easier.
11773     (ThubanInstall.user_options): Add two new options,
11774     create-init-module and init-module-dir
11775     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
11776     filenames for installation in the default directories.
11777     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
11778     the inherited methods to capture some filenames before they're
11779     transformed too much by distutils.
11780     (ThubanInstall.run): Create the init module if requested.
11781     (ThubanInstall.thuban_init_filename): New method to return the
11782     full name of the init module.
11783     (ThubanInstall.get_outputs): Append the filename of the init
11784     module.
11785    
11786 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
11787    
11788 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
11789     handle the prefix properly which means that the default for the
11790     installation prefix should be /usr for RPMs and /usr/local when
11791     doing a normal source install.
11792     (bdist_rpm_install_script): Script to override the default install
11793     commands in the specfile generated by the bdist_rpm command.
11794     (thuban_bdist_rpm.user_options): Add a prefix option
11795     (thuban_bdist_rpm.initialize_options): Init the prefix option.
11796     Create the script files for the spec files as empty files here
11797     (thuban_bdist_rpm._make_spec_file): Override the inherited method
11798     to fill the script files with content.
11799    
11800 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
11801     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
11802     argument. save_session now automatically uses this version,
11803     solving a problem when saving to a relative filename.
11804    
11805     * setup.py: In the setup call, make sure that the library
11806     directories are under $prefix/lib not directly under $prefix.
11807    
11808 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
11809 jan 199
11810     * Thuban/Model/extension.py: new module to handle extension objects.
11811     * Thuban/Model/messages.py: new messages for extensions.
11812     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
11813     Session.AddExtension): new for handling extensions.
11814     Also some other minor changes to round up extension handling.
11815     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
11816     of Extension titles and title and names of its objects.
11817    
11818 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
11819    
11820     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
11821 bh 202 the events for a command.
11822 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
11823     Call bind_command_events to bind the events. add_toolbar_command
11824     can now bind events too so that it's possible to have commands
11825     that are only available through the toolbar.
11826     (MainWindow.init_ids): New instance variable events_bound to keep
11827     track of for which commands events have been bound.
11828    
11829 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
11830    
11831     * Thuban/UI/menu.py: New module to build and manage menus.
11832    
11833     * Thuban/UI/mainwindow.py: Remove some unused imports.
11834     (MainWindow.__init__, main_menu): move the definition of the main
11835     menu from __init__ to the Menu instance main_menu.
11836     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
11837     build the menu bar and sub-menus from a menu description.
11838    
11839     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
11840     startup file
11841     (ThubanApplication.read_startup_files): New method to run
11842     ~/.thuban/thubanstart.py
11843    
11844 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
11845     Move the toolbar definition to the Menu instance main_toolbar.
11846     (MainWindow.build_toolbar): New method to build the toolbar
11847     similar to the build_menu methods
11848    
11849 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
11850    
11851 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
11852     layer_outline_color. Fix it in the definition of the command too.
11853    
11854 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
11855    
11856 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
11857    
11858     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
11859     in the docstring
11860    
11861 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
11862    
11863 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
11864     when the shapefile is empty.
11865     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
11866     now return None for empty shapefiles. Update doc-strings.
11867    
11868     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
11869     the layer's bbox being None.
11870    
11871     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
11872     layer's bbox being None.
11873    
11874 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
11875     necessary.
11876     (MapCanvas.__init__): New instance variables, last_selected_layer
11877     and last_selected_shape to determine how the selection has
11878     changed.
11879    
11880     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
11881     AutoSizeColumns because it will cause a traversal of the entire
11882     table which for large .dbf files will take a very long time.
11883    
11884 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
11885    
11886     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
11887     maximum depth for the tree than shapelib does by default.
11888    
11889 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
11890    
11891     * setup.py (py_modules): The shptree modules doesn't have a
11892     wrapper, so don't include it in the py_modules
11893    
11894 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
11895    
11896     * extensions/shapelib/shptree.c (compare_ints): Make arguments
11897     const void * as in the qsort prototype
11898     (SHPTreeFindLikelyShapes): Remove some unused variables.
11899    
11900     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
11901     maintains to redraw the window during a drag.
11902     (MapCanvas.unprojected_rect_around_point): New method to determine
11903     a small region around a point for hit-testing.
11904     (MapCanvas.find_shape_at): Only test the shapes in a small region
11905     around the point.
11906    
11907     * setup.py: Increment the version to 0.1.2
11908    
11909     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
11910     debug print and set session to None after unsubscribing
11911    
11912 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
11913    
11914 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
11915     the file to have a .thuban extension.
11916    
11917 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
11918     all the session channels to subscribe to to update the tree
11919     (SessionTreeCtrl.session_changed): Remember the session so that we
11920     can unsubscribe properly. Use the new class constant to
11921     unsubscribe from the old session and subscribe to the new one.
11922     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
11923     subscriptions of the SessionTreeCtrl.
11924     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
11925    
11926     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
11927     Session Tree" command to the file menu.
11928    
11929     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
11930     as update_region to the renderer.
11931    
11932     * Thuban/UI/renderer.py
11933     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
11934     update box is now directly a tuple, not a wxRect anymore.
11935    
11936     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
11937     prints.
11938    
11939     2002-05-07 Bernhard Herzog <[email protected]>
11940    
11941 bh 146 * setup.py: Add the shptree extension module. See
11942     extensions/pyshapelib/ChangeLog for more details.
11943    
11944     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
11945     extensions/shapelib/dbfopen.c: Really update to the versions of
11946     shapelib 1.2.9. For some reason it wasn't really done on
11947     2002-04-11.
11948    
11949     * extensions/shapelib/shptree.c: Modified version of shptree.c of
11950     shapelib 1.2.9. The only real difference is the use of qsort
11951     instead of a bubble sort implementation
11952    
11953     * Thuban/Model/layer.py (Layer.__init__): New instance variable
11954     shapetree to hold the shapelib quadtree for the shapefile
11955     (Layer.open_shapefile): Create the quad tree.
11956     (Layer.ShapesInRegion): New method to return the ids of shapes in
11957     a given region using the quad tree.
11958    
11959     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
11960     comment
11961     (draw_polygon_shape): Accept both arcs and polygons.
11962     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
11963     the api.
11964    
11965     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
11966     return the shape ids to be rendered in a given layer.
11967     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
11968     ids. Use draw_polygon_shape to draw arc shapes as well.
11969     (ScreenRenderer.RenderMap): New parameter for the rectangle that
11970     has to be updated
11971     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
11972     calling it's ShapesInRegion method.
11973    
11974     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
11975     update_region for the update region.
11976     (MapCanvas.OnPaint): Maintain the update region
11977     (MapCanvas.do_redraw): Pass the bounding box of the update_region
11978     to the renderer when drawing the bitmap. Reset the update_region.
11979    
11980 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
11981    
11982 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
11983     MainWindow.OpenSession): Change the file extension of the session
11984     files to .thuban
11985    
11986 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
11987     Move the map channels to be forwarded by the session into the
11988 bh 146 class constant with forwarded_channels. Also add
11989     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
11990     forwarded_channels
11991 bh 129
11992     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
11993     typo and some rewording).
11994    
11995 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
11996    
11997     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
11998     around to speed up most redraws:
11999     (MapCanvas.__init__): New instance variable bitmap which holds the
12000     bitmap
12001     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
12002     self.bitmap to draw.
12003     (MapCanvas.full_redraw): New method to force a full redraw
12004     including the bitmap
12005     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
12006     make sure the bitmap is redrawn.
12007     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
12008     MapCanvas.shape_selected): Call full_redraw instead of readraw to
12009     make sure the bitmap is redrawn.
12010     (MapCanvas.OnSize): New method to handle size events so that the
12011     bitmap can be redrawn.
12012    
12013 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
12014    
12015     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
12016     canvas' VIEW_POSITION event
12017     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
12018     Update the text in the status-bar accordingly.
12019    
12020     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
12021     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
12022     called.
12023     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
12024     current_position
12025     (MapCanvas.set_current_position): New method to set
12026     current_position. Issue a VIEW_POSITION event
12027     (MapCanvas.CurrentPosition): New public method to return the value
12028     of current_position. Should be called when the VIEW_POSITION event
12029     is processed.
12030     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
12031     Update the position.
12032     (MapCanvas.OnLeaveWindow): Set the position to None.
12033    
12034     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
12035     position in the statusbar
12036    
12037 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
12038 frank 120
12039     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
12040    
12041 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
12042    
12043 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
12044    
12045     * Resources/Bitmaps/fullextent.xpm: new
12046 jan 116
12047 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
12048 jan 116
12049 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
12050     box
12051 jan 114
12052 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
12053    
12054 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
12055    
12056     * Thuban/UI/tree.py (update_tree): added added map extent
12057    
12058     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
12059 tkoester 403 icon; added map_full_extend as tool
12060 jan 114
12061 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
12062 jan 107
12063     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
12064     saving _new_ sessions
12065    
12066     * Thuban/Model/session.py (create_empty_session): new session
12067     don't have a filename (set to None)
12068    
12069     * Thuban/UI/tree.py (update_tree): added filename and modified flag
12070    
12071     * Thuban/Model/load.py (ProcessSession): convert projection
12072     parameters from unicode to regular string
12073    
12074     * Data/iceland_sample.session: Added UTM Zone 26 projection.
12075    
12076 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
12077    
12078     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
12079     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
12080     1.2.9
12081    
12082     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
12083     the pyshapelib directoy into the list of include dirs, so that
12084     pyshapelib_api.h can be found.
12085    
12086     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
12087     holds the pyshapelib C-API
12088     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
12089     pyshapelib_api to access the shapelib functions.
12090     (initwxproj): Import the c_api from the shapelib module and
12091     initialize pyshapelib_api.
12092    
12093 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
12094    
12095 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
12096     initialize_options to create the scripts for the rpm.
12097    
12098 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
12099    
12100 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
12101    
12102 bh 87 * setup.py: Increment version to 0.1.1
12103    
12104 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
12105     Layer" and "Remove Layer" commands from the layer menu to the map
12106     menu
12107    
12108 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
12109    
12110     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
12111     argument (python <= 1.5.2 erroneously accepted multiuple
12112     arguments)
12113    
12114 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
12115    
12116     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
12117     RecordGrid in the identifyview.
12118     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
12119     IdentifyListCtrl. The grid allows editing of the values.
12120    
12121     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
12122     implementing a grid for a single row of a thuban table.
12123    
12124     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
12125     layers by default. Easier to use than the previous default of only
12126     searching through the select layer which meant that if no layer
12127     was selected, you couldn't select a shape.
12128    
12129     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
12130    
12131     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
12132     stroke_width attribute
12133    
12134     * Thuban/Model/save.py (save_session): Write the new stroke_width
12135     attribute
12136    
12137     * Thuban/Model/load.py (ProcessSession.startElement): Read the
12138     stroke_width attribute
12139    
12140     * Thuban/Model/layer.py (Layer.__init__): New parameter and
12141     instance variable stroke_width
12142     (Layer.SetStrokeWidth): Set the stroke_width.
12143    
12144 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
12145    
12146     * extensions/thuban/wxproj.cpp (project_points): Fix two
12147     off-by-one errors in the last loop that joins the various parts
12148     together.
12149    
12150 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
12151    
12152     * setup.py (data_dist.make_distribution): Fix some typos
12153    
12154 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
12155    
12156     * README: Slight tweaking in preparation for the 0.1 release
12157    
12158     * setup.cfg: Add section for sdist to create both tgz and zip
12159     archives
12160    
12161     * setup.py: increase version number to 0.1
12162     (data_dist): New command class for data distribution
12163    
12164 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
12165    
12166 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
12167     Handle the case of no layer (i.e. layer is None) properly.
12168    
12169 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
12170 bh 70 Set the initial selection of the combo boxes to reflect the
12171     projection we're starting with in a way that works on windows,
12172     too.
12173    
12174 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
12175     puiblisher's ids in hex to make it easier to compare them to the
12176     standard repr of python methods
12177    
12178     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
12179     messages
12180    
12181 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
12182    
12183 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
12184     deselect the layer if no layer is selected
12185    
12186 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
12187     idle time when there actually is something to draw. If there's
12188     nothing to draw simply clear the window
12189     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
12190     (MapCanvas.SetMap): force a redraw in all cases because
12191     FitMapToWindow doesn't always do it.
12192     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
12193     specify the point to move into the center of the window
12194     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
12195     dragged, zoon in/out by a factor of 2
12196 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
12197     index, i.e. reversed drawing order) so that objects appearing to
12198     be in from of others are selected first. This is probably mostly
12199     relevant for point shapes where the symbols used may overlap
12200 bh 59
12201     * Thuban/Model/session.py (create_empty_session): Unset the
12202     modified bit before returning it
12203    
12204     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
12205     create_empty_session session to create the new, empty session.
12206    
12207     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
12208     the tool bitmaps.
12209     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
12210     the code that asks whether the session should be saved into the
12211     new method save_modified_session.
12212     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
12213     method to save modified session here too.
12214    
12215 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
12216    
12217     * setup.py (InnoIconItem): fix typo
12218    
12219     (thuban_bdist_inno.run):
12220     (bdist_inno.run): Move the decision not to create symlinks on
12221     non-nt platforms to thuban_bdist_inno and do it unconditinally
12222     since we never want to create the symlinks here
12223    
12224 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
12225    
12226 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
12227     identify view immediately
12228    
12229     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
12230     and SelectableRecordListCtrl that implement the code shared by the
12231     identify view and the label dialog
12232    
12233     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
12234     new class RecordListCtrl
12235    
12236     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
12237     return value of GetValue is None instead of using it as a boolean
12238     directly so that Zero numbers are handled properly.
12239     (LabelListCtrl): Derive from the new class
12240     SelectableRecordListCtrl
12241    
12242 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
12243     (Proj4Dialog.dialogLayout): Make the window resizable and set the
12244     size of the text control explicitly to make the sizers work on
12245     both Windows and X.
12246    
12247 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
12248    
12249     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
12250     that can limit the search to the currently selected layer.
12251     (MapCanvas.SelectShapeAt): Make sure that the currently selected
12252     layer stays selected even when no shape is found
12253 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
12254     height do nothing (avoids zero division errors)
12255 bh 44
12256 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
12257    
12258 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
12259     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
12260     convenient :-)
12261     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
12262     a new instvar layer_to_item to map layers to tree items
12263     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
12264     to match the current selection in the interactor
12265    
12266 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
12267     (Interactor.HasSelectedLayer): New methods to query the current
12268     selection
12269    
12270     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
12271     (MainWindow.has_selected_layer): Simply call the appropriate
12272     interactor method
12273    
12274     * Thuban/UI/mainwindow.py (MainWindow.__init__):
12275     (MainWindow.LayerShowTable):
12276     (MainWindow.identify_view_on_demand): Store the interactor in an
12277     instvar and use that reference instead of going through main.app
12278    
12279 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
12280     * Thuban/UI/application.py (ThubanApplication.OnInit):
12281 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
12282     with the new mainwindow method ShowSessionTree and not directly
12283     the application's OnInit method
12284    
12285     * Thuban/UI/tree.py (myTreeCtrlPanel):
12286     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
12287     TreeCtrl isntead of a panel. This affects most method since we now
12288     refer to self instead of self.tree
12289     (SessionTreeView): New class implementing a non-modal dialog
12290     showing the session tree.
12291    
12292 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
12293     layer to the tableview dialog.
12294    
12295     * Thuban/UI/tableview.py: Add some doc-strings
12296 tkoester 403 (TableGrid):
12297 bh 35 (TableGrid.OnRangeSelect):
12298     (TableGrid.OnSelectCell):
12299     (TableFrame.__init__):
12300     (TableFrame.row_selected):
12301     Selecting rows in the grid view now updates the selected shapes
12302     through the TableFrame. To achieve this we derive TableGrid from
12303     Publisher and introduce the message type ROW_SELECTED which the
12304     TableFrame subscribes to and which is issued by OnRangeSelect and
12305     OnSelectCell
12306    
12307     (DataTable.SelectRow): Removed because it's no longer needed in
12308     the row/shape selection scheme
12309    
12310 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
12311     dialogs
12312    
12313     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
12314     the SELECTED_SHAPE message anymore. This is now handled by the
12315     parent.
12316     (TableGrid.select_shape): Only update the selection if the shape
12317     is not None.
12318     (TableFrame): Inherit from the new NonModalDialog class.
12319     (TableFrame.__init__, TableFrame.select_shape): Handle the
12320     SELECT_SHAPE message.
12321     (TableFrame.OnClose): Extend the inherited method to unsubscribe
12322     SELECT_SHAPE
12323    
12324     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
12325     (MainWindow.add_dialog):
12326     (MainWindow.dialog_open):
12327     (MainWindow.remove_dialog):
12328     (MainWindow.get_open_dialog): New methods to maintain a dictionary
12329     of opened non-modal dialogs.
12330    
12331     (MainWindow.__init__): Initialize the new non-modal dictionary
12332     management code
12333     (MainWindow.LayerShowTable): maintain separate dialogs for each
12334     table using the non-modal dialog management code to only open a
12335     view once for each table.
12336    
12337     (MainWindow.IdentifyTool):
12338     (MainWindow.__init__):
12339     (MainWindow.identify_view_on_demand): Don't open the identify view
12340     in IdentifyTool anymore. This will be done automatically by the
12341     new method identify_view_on_demand which handles the
12342     SELECTED_SHAPE message so that the identify view will be opened on
12343     demand
12344    
12345     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
12346     the interactor argument. The SELECTED_SHAPE message is now handled
12347     by the parent.
12348     (IdentifyView.__init__): Add the interactor argument so that we
12349     can handle the SELECTED_SHAPE message here
12350     (IdentifyView.selected_shape): New method to handle the
12351     SELECTED_SHAPE messages
12352    
12353     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
12354     NonModalDialog class
12355     (IdentifyView.OnClose): Extend the inherited version to
12356     unsubscribe SELECT_SHAPE
12357    
12358     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
12359    
12360 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
12361    
12362     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
12363 tkoester 403
12364 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
12365     interactor to pass through to the MapCanvas
12366 tkoester 403
12367 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
12368     argument to the MainWindow constructor to get rid of the ugly hack
12369     that made main.app available early just so that the mapcanvas
12370     could access the interactor object.
12371    
12372 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
12373    
12374 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
12375     that runs a modal message box
12376     (MainWindow.OnClose): Use the new method
12377     (MainWindow.RemoveLayer): Just do nothing in case no layer is
12378     selected. The command should be grayed out anyway, so there's no
12379     need to pop up a message box.
12380     (MainWindow.AddLayer): Pop up a message box with an error message
12381     if the shape file can't be opened
12382    
12383     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
12384     immediately. This will cause an exception in case the file can't
12385     be opened and we can display an appropriate message.
12386    
12387 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
12388    
12389     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
12390     specific bdist_rpm command.
12391    
12392     * Thuban/UI/main.py: Catch ImportError exceptions when importing
12393     the locale module because it may not be available on some
12394     installations.
12395    
12396     * extensions/pyprojection/LICENSE: Copy of the license text in
12397     Projection.i. Having it in a separate file makes it easier to
12398     refer to license text in e.g. RPMs
12399    
12400 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
12401    
12402 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
12403     more generic
12404    
12405     * setup.py (ThubanInstall.get_outputs): Add the symlink in
12406     <prefix>/bin to the outputs
12407     (ThubanInstall.link_file): New method to link files. We need this
12408     because the standard copy_files refuses to link non-existing
12409     files.
12410     (ThubanInstall.run): Remove the leading install root from the
12411     script filename if an install root was specified and use the new
12412     link_file method
12413 tkoester 403
12414 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
12415     the window when the first layer is added to the map.
12416    
12417     * setup.py (ThubanInstall.run): Honor the build root (self.root)
12418     when linking thuban.py to <prefix>/bin
12419    
12420 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
12421    
12422     * setup.py: In the setup call, the install parameters shouldn't
12423     have trailing slashes because distutils on non-posix platforms
12424     doesn't like that. The same applies to other directories like
12425     "Resources/Bitmaps"
12426    
12427     In the configuration section for nt, move the wxWindows directory
12428     optins into the part clearly marked as editable.
12429    
12430     (InstallLocal.initialize_options):
12431     (InstallLocal.user_options): remove the currently unused debug
12432     flag
12433     (thuban_build_py.find_all_modules): Add this method so that it
12434     works for our case of having packages and modules in one
12435     distribution as well.
12436     (ThubanInstall.initialize_options):
12437     (ThubanInstall.finalize_options):
12438     (ThubanInstall.user_options):
12439     (ThubanInstall.boolean_options): Add new options, do-symlink and
12440     extra files. Since these are the first ThubanInstall specific
12441     options, override user_options and boolean_options
12442     (ThubanInstall.run): Honor the new do-symlink and extra-files
12443     options.
12444     (ThubanInstall.get_outputs): Add to override the base-class's
12445     version and add the extra-files to the outputs
12446     (bdist_inno): New class for windows distributions with Inno Setup
12447     (InnoIconItem): Helper class for bdist_inno
12448     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
12449     this together with the appropriate parameters, to the setup call.
12450 tkoester 403
12451 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
12452     installer
12453    
12454     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
12455     changing_selection to avoid recursive selection events when
12456     modifying the selection in response to a selection event.
12457     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
12458     changing the tree's selection.
12459     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
12460     we're not being called indirectly from normalize_selection.
12461    
12462     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
12463     event.Check only if the command is actuall checkable.
12464     (MainWindow.__init__): Call the toolbar's Realize method to make
12465     sure that the items are actually shown
12466    
12467 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
12468    
12469 bh 9 * setup.py: Fix some doc strings
12470    
12471 bh 7 * ChangeLog: started
12472    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26