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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1380 - (hide annotations)
Tue Jul 8 13:23:31 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 217218 byte(s)
update ChangeLog

1 bh 1376 2003-07-08 Bernhard Herzog <[email protected]>
2    
3 bh 1380 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
4     interpolated colors correctly.
5    
6     * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
7     New. Test case for the fix in classgen.py
8    
9     2003-07-08 Bernhard Herzog <[email protected]>
10    
11 bh 1378 * test/runtests.py (main): Make the default output less verbose
12     and add a verbosity option (-v) to get the old output
13    
14     2003-07-08 Bernhard Herzog <[email protected]>
15    
16 bh 1376 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
17     0.9.
18    
19     * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
20     New. Return the join type
21    
22     * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
23     DTD
24     (SessionSaver.write_data_containers): Save the join type for
25     joined tables
26    
27     * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
28     namespace
29     (SessionLoader.start_jointable): Handle the jointype attribute
30    
31     * test/test_load_0_8.py: New. Effectively a copy of test_load.py
32     as of Thuban 0.8. These are now tests to determine whether Thuban
33     can still read files generated by Thuban 0.8
34    
35     * test/test_load.py (LoadSessionTest.dtd)
36     (TestSingleLayer.file_contents)
37     (TestLayerVisibility.file_contents, TestLabels.file_contents)
38     (TestLayerProjection.file_contents)
39     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
40     (TestJoinedTable.file_contents)
41     (TestLoadError.file_contents): Update for new DTD
42     (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
43     for new join type attribute
44    
45     * test/test_save.py (SaveSessionTest.dtd)
46     (SaveSessionTest.testEmptySession)
47     (SaveSessionTest.testSingleLayer)
48     (SaveSessionTest.testLayerProjection)
49     (SaveSessionTest.testRasterLayer)
50     (SaveSessionTest.testClassifiedLayer)
51     (SaveSessionTest.test_dbf_table)
52     (SaveSessionTest.test_joined_table): Update for new DTD
53     (SaveSessionTest.test_joined_table): Add test for new join type
54     attribute
55    
56 bh 1372 2003-07-04 Bernhard Herzog <[email protected]>
57    
58     * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
59     function for table_to_dbf
60     (table_to_dbf): Deal with names longer than the 10 character limit
61    
62     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
63     doc-string
64     (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
65     long column names
66    
67 bh 1365 2003-07-03 Bernhard Herzog <[email protected]>
68    
69 bh 1370 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
70    
71     2003-07-03 Bernhard Herzog <[email protected]>
72    
73 bh 1368 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
74     for the Thuban manual and README with some basic information about
75     the manual
76    
77     2003-07-03 Bernhard Herzog <[email protected]>
78    
79 bh 1365 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
80     Update doc-string
81     (TransientJoinedTable.create): Do not modify the column objects of
82     the input tables in place and copy all columns of the input tables
83     into the joined table after all.
84    
85     * test/test_transientdb.py
86     (TestTransientTable.test_transient_joined_table_same_column_name):
87     Update to reflect the new behavior
88     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
89     Update to reflect the new behavior
90     (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
91     New test case for a bug which modified the column objects in place
92    
93 jonathan 1360 2003-07-02 Jonathan Coles <[email protected]>
94 jonathan 1349
95 jonathan 1360 * Thuban/Model/classgen.py (generate_singletons,
96     generate_uniform_distribution, generate_quantiles,
97 jonathan 1363 GenQuantiles0): Make sure maxValue isn't less than
98     one, otherwise we could divide by zero.
99    
100     * test/test_classgen.py (ClassGenTest.doClassRangeTest,
101     ClassGenTest.doClassSingleTest): Call doBoundsTest to
102     check the end classification groups against the
103     proper property values.
104     (ClassGenTest.doBoundsTest): New. Checks the first and
105     last classification groups to make sure their properties
106     are the correct upper and lower bounds for a color ramp.
107    
108     2003-07-02 Jonathan Coles <[email protected]>
109    
110     * Thuban/Model/classgen.py (generate_singletons,
111     generate_uniform_distribution, generate_quantiles,
112 jonathan 1360 GenQuantiles0): The denominator was one to high when
113     calculating the index for the ramp causing the index
114     to never to reach one.
115    
116     2003-07-02 Jonathan Coles <[email protected]>
117    
118 jonathan 1358 Changed the singature of ClassGroupRange.__init__ and
119     ClassGroupRange.SetRange() so that the min/max values are
120     passed as a tuple. This makes a better calling scheme for
121     when a Range object is passed instead.
122    
123     * Thuban/Model/classgen.py: Fixed parameters to
124     ClassGroupRange constructor.
125    
126     * Thuban/Model/classification.py (ClassGroupRange.__init__):
127     Consolidate the min/max parameters into a single _range which
128     can either be a tuple or a Range object.
129     (ClassGroupRange.SetRange): Consolidate the min/max parameters
130     into a single _range which can either be a tuple or a Range object.
131    
132     * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
133     call to ClassGroupRange constructor to use a tuple.
134    
135     * Thuban/Model/layer.py (Layer.SetClassification): Switch
136     the classification instance variable to the new class
137     before calling _set_layer otherwise subscribers to a
138     LAYER_CHANGED event will not see any difference.
139    
140     * test/test_classification.py: Fix tests of ClassGroupRange
141     so that they use the new signature.
142    
143     * test/test_load.py: Fix use of ClassGroupRange so that it
144     uses the new signature.
145    
146     * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
147     uses the new signature.
148    
149     * test/test_save.py: Fix use of ClassGroupRange so that it
150     uses the new signature.
151    
152    
153     2003-07-01 Jonathan Coles <[email protected]>
154    
155 jonathan 1349 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
156     Import used objects/class from color.
157     (generate_singletons): We don't
158     need the numGroups parameter anymore because we are using
159     the new ramps with GetProperties().
160     (generate_uniform_distribution): Use new ramp method
161     GetProperties().
162     (generate_quantiles, GenQuantiles0): Use new ramp method
163     GetProperties().
164     (CustomRamp.SetNumGroups): Removed. The ramps now map
165     a value from 0 to 1 to class properties so the number
166     of groups is not needed ahead of time.
167     (CustomRamp.next): Removed. CustomRamp does not support
168     interation anymore.
169     (CustomRamp.GetProperties): Returns a ClassGroupProperties
170     object based on the index value from 0 to 1 that is
171     passed to it.
172     (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
173     Made into instances of Monochromatic class instread of
174     deriving from it.
175     (HotToCold.SetNumGroups): Removed. See CustomRamp.
176     (HotToCold.next): Removed. See CustomRamp.
177    
178     * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
179     (Classification.SetField, Classification.SetFieldType):
180     Replaced with SetFieldInfo.
181     (Classification.SetFieldInfo): New. Does a better job of
182     what SetField and SetFieldType used to do by combining
183     their function since they should really always be done
184     at the same time.
185     (Classification.SetLayer): Renamed to _set_layer.
186     (Classification._set_layer): Should only be called from
187     Layer's SetClassification. This does not cause a recursive
188     call as SetLayer did because we know that Layer knows about
189     the classification.
190    
191     * Thuban/Model/color.py: Fixes RTbug #1971.
192     (_Transparent): Renamed from Transparent so it doesn't
193     conflict with the module variable.
194     (Transparent, Black): Renamed from Color.Transparent,
195     Color.Black so they are not class variables.
196    
197     * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
198     (Layer.Destroy): We don't need to call SetClassification
199     anymore to clear out the back reference in the classifcation
200     to the layer. It's better to set it to None using _set_layer,
201     and we won't be creating another clas object too.
202     (Layer.SetClassification): Classification._set_layer is not
203     recursive so remove all the locking variables. Also clean
204     up the code so that it remains unchanged if something fails.
205    
206     * Thuban/Model/load.py: Fixes RTbug #1971.
207     (SessionLoader.start_classification): Call
208     Classification.SetFieldInfo().
209    
210     * Thuban/Model/save.py: Removed import of Color which wasn't
211     being used.
212    
213     * Thuban/UI/classgen.py: Fixes RTbug #1972.
214     (ClassGenDialog.__init__): Color ramps are now instances
215     already so we don't need to create any new objects.
216     (ClassGenDialog.OnOK): Check for numGroups is no longer
217     necessary because we never use it.
218    
219     * Thuban/UI/classifier.py: Fixes RTbug #1971.
220     (Classifier.__BuildClassification, Classifier.__SetGridTable):
221     Call Classification.SetFieldInfo() instead of SetFieldType.
222    
223     * Thuban/UI/renderer.py: Fixes RTbug #1971.
224    
225     * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
226     (MapCanvas.__init__): Subscribe to the idle time event. Set
227     background color to white.
228     (MapCanvas.OnPaint): Set a flag indicating that we should
229     render the map during idle time. If we already have a bitmap
230     just draw it now.
231     (MapCanvas.OnIdle): New. Render the map only during idle time.
232     This also fixes a problem with the busy cursor under gtk.
233    
234     * test/test_classgen.py (ClassGenTest.test_generate_singletons):
235     Fix calls to generate_singletons because the signature changed.
236    
237     * test/test_classification.py: Fix color references and
238     change calls to Classification.[SetField|SetFieldType] to
239     SetFieldInfo.
240    
241     * test/test_load.py: Fix color references.
242    
243     * test/test_load_0_2.py: Fix color references.
244    
245     * test/test_save.py (SaveSessionTest.testClassifiedLayer):
246     Change calls to Classification.[SetField|SetFieldType] to
247     SetFieldInfo.
248    
249 frank 1334 2003-07-01 Frank Koormann <[email protected]>
250    
251     MERGE from the greater-ms3 branch.
252    
253     * test/test_transientdb.py
254     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
255     New. Test join of two tables with partly equal column names.
256    
257     * Thuban/Model/transientdb.py (TransientJoinedTable.create):
258     If duplicates in left and right tables column names are found,
259     append '_' (underscores) to the name until it is unique.
260     Create always new internal names for the resulting table and reference
261     columns in the join statement with <table>.<column>
262    
263 bh 1329 2003-07-01 Bernhard Herzog <[email protected]>
264    
265     * test/test_transientdb.py
266     (TestTransientTable.test_transient_joined_table_same_column_name):
267     New. Test whether joining on columns with the same names in both
268     tables works.
269 frank 1334
270 bh 1329 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
271     sure to use the right internal names even when joining on field
272     with the same names in both tables. Also, detect duplicate names
273     in the joined table correctly.
274    
275 frank 1325 2003-07-01 Frank Koormann <[email protected]>
276    
277     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
278     Reverse List of layers to render in same order as in desktop legend.
279    
280 jonathan 1318 2003-06-30 Jonathan Coles <[email protected]>
281    
282 jonathan 1349 * Thuban/version.py (make_tuple): Takes a version string
283     and splits it into a tuple of at most three integers.
284     Used make_tuple() to make tuple versions of the version
285     numbers.
286    
287     * Thuban/UI/about.py: Add Thuban email addresses.
288    
289     2003-06-30 Jonathan Coles <[email protected]>
290    
291 jonathan 1320 * Thuban/version.py: SQLite/PySQLite version dependencies
292     were too high.
293    
294     2003-06-30 Jonathan Coles <[email protected]>
295    
296 jonathan 1318 * Thuban/version.py: Update version to 0.8.1
297    
298     * MANIFEST.in: Added Projections so that default.proj is
299     included.
300    
301 jonathan 1312 2003-06-26 Jonathan Coles <[email protected]>
302    
303     New About box with lots more information including library
304     versions and credits. More/better version checking before
305     Thuban starts.
306    
307     * Thuban/UI/about.py: New. New About box that displays
308     library version information and credits.
309    
310     * Thuban/version.py: Added new 'versions' dictionary which
311     contains the verions of various libraries which are checked
312     when the module loads.
313     (verify_versions): Check all version numbers and returns
314     a list of errors.
315    
316     * Thuban/UI/classifier.py (Classifier.__EnableButtons):
317     Reset the status of the buttons as the situation warrants,
318     but in a better more reliable way by not relying on the
319     current status to determine what needs to change.
320    
321     * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
322     (verify_versions): Remove most of the code since it is
323     now in Thuban.version.verify_versions.o
324    
325     * Thuban/UI/mainwindow.py (MainWindow.About): Call new
326     About box in Thuban.UI.about.
327    
328     * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
329     Returns the version of gdal library being used as a string.
330    
331     * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
332     Removed.
333     (get_proj_version): Return the version of PROJ that the file
334     was compiled with.
335     (get_gtk_version): Return th version of GTK that the file
336     was compiled with.
337    
338 jonathan 1304 2003-06-25 Jonathan Coles <[email protected]>
339    
340     * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
341     of the SelectPropertiesDialog should be self so the window
342     appears on top.
343     (ClassGroupPropertiesCtrl.DoEdit): The parent
344     of the SelectPropertiesDialog should be self so the window
345     appears on top.
346    
347     * Thuban/UI/resource.py: Cleaned up how we determine file
348     extensions.
349     (GetImageResource): Return an wxImage from our Resources.
350    
351 jonathan 1299 2003-06-24 Jonathan Coles <[email protected]>
352    
353     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
354     Check that a layer has a classification before trying
355     to get it. Raster layers don't have classifications.
356    
357 jonathan 1286 2003-06-23 Jonathan Coles <[email protected]>
358 jonathan 1297
359     * setup.py: Add Resources/XML to resource list.
360    
361     2003-06-23 Jonathan Coles <[email protected]>
362 jonathan 1286
363 jonathan 1297 * setup.cfg: Fix copyright dates
364    
365     2003-06-23 Jonathan Coles <[email protected]>
366    
367 jonathan 1294 * MANIFEST.in: Update with Resources/XML
368    
369     * setup.py: Don't include Locale resources yet as we don't
370     have any and it causes problems building the distribution
371     for Windows. Update version to 0.8.0.
372    
373     * Doc/thuban.dtd: Removed since it is now in Resources/XML.
374    
375     * Thuban/UI/mainwindow.py: Add blank line at the end because
376     file was not being read correctly building the Windows
377     distribution.
378    
379     2003-06-23 Jonathan Coles <[email protected]>
380    
381 jonathan 1289 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
382    
383     * Thuban/version.py: Temporarily update longversion for
384     the 0.8 release so that it doesn't have the cvs revision.
385    
386     2003-06-23 Jonathan Coles <[email protected]>
387    
388 jonathan 1286 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
389     to make sure that we don't create reentrant possibilities with
390     wxYield.
391    
392     * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
393     directly to avoid the wxSafeYield() call which generates an
394     OnPaint event causing infinite recursion. Don't try to catch
395     exception anymore. This was for before there were limits on map
396     scaling.
397    
398 bh 1283 2003-06-23 Bernhard Herzog <[email protected]>
399    
400     Bug fix for RT #1961:
401    
402     * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
403     Register DerivedShapestores with the session
404    
405     * Thuban/Model/session.py (Session.Tables): Make sure each table
406     is only listed once.
407    
408     * test/test_load.py (TestJoinedTable.test): Add check_format call.
409     Update file contents to match the one written out.
410    
411 bh 1281 2003-06-20 Bernhard Herzog <[email protected]>
412    
413     * test/xmlsupport.py (SaxEventLister.startElementNS)
414     (SaxEventLister.endElementNS): Do not include the qname. Python
415     2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
416     is (presumably incorrectly) None, whereas it's a string with the
417     element name in the later versions.
418    
419     * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
420     (TestEventList.test_even_list_namespace): Update tests to reflect
421     the new behaviour
422     (TestEventList.test_even_list_id_normalization): Fix doc-string
423    
424 jonathan 1272 2003-06-20 Jonathan Coles <[email protected]>
425    
426 jonathan 1279 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
427     by deriving classes to determine if that layer supports shapes.
428     (Layer): Override HasShapes and return true.
429    
430     * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
431     instead of a direct call to wx[Begin|End]CusyCursor().
432     (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
433     table data.
434    
435     * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
436     New. Wrappers around the wxWindows functions that allow us to
437     make additional calls such as wxYield which gives the native
438     system a chance to update the cursor correctly.
439    
440     * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
441     instead of a direct call to wx[Begin|End]CusyCursor().
442    
443     * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
444     instead of a direct call to wx[Begin|End]CusyCursor().
445     (MapCanvas.find_shape_at): Check if the current search layer
446     support shapes, otherwise go on to the next layer.
447    
448     * test/test_layer.py: Add tests in each type of layer for
449     HasClassification() and HasShapes()
450    
451     2003-06-20 Jonathan Coles <[email protected]>
452    
453 jonathan 1272 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
454     turning on the busy cursor to allow the system to change the
455     cursor before we begin painting. This fixes a problem that
456     was occuring only under GTK. Fixes RTbug #1840.
457    
458 bh 1270 2003-06-20 Bernhard Herzog <[email protected]>
459    
460     * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
461     version.
462    
463     * Thuban/Model/save.py (sort_data_stores): New. Make topological
464     sort of the data sources so they can be written with sources that
465     data sources that depend on other data sources come after the
466     sources they depend on.
467     (SessionSaver.__init__): Add idmap instance variable to map from
468     objects to the ids used in the file.
469     (SessionSaver.get_id, SessionSaver.define_id)
470     (SessionSaver.has_id): New. Methods to manage the idmap
471     (SessionSaver.write): Use thuban-0.8.dtd
472     (SessionSaver.write_session): Add a namespace on the session and
473     write out the data sources before the maps.
474     (SessionSaver.write_data_containers): New. Write the data
475     containers.
476     (SessionSaver.write_layer): Layer elements now refer to a
477     shapestore and don't contain filenames anymore.
478    
479     * Thuban/Model/load.py (LoadError): Exception class to raise when
480     errors in the files are discovered
481     (SessionLoader.__init__): Define dispatchers for elements with a
482     thuban-0.8 namespace too.
483     (SessionLoader.check_attrs): New helper method to check and
484     convert attributes
485     (AttrDesc): New. Helper class for SessionLoader.check_attrs
486     (SessionLoader.start_fileshapesource)
487     (SessionLoader.start_derivedshapesource)
488     (SessionLoader.start_filetable, SessionLoader.start_jointable):
489     Handlers for the new elements in the new fileformat
490     (SessionLoader.start_layer): Handle the shapestore attribute in
491     addition to filename.
492     (SessionLoader.start_table, SessionLoader.end_table): Removed.
493     They were never used in the old formats and aren't needed for the
494     new.
495    
496     * Thuban/Model/session.py (Session.DataContainers): New method to
497     return all "data containers", i.e. shapestores and tables
498    
499     * test/xmlsupport.py (SaxEventLister.__init__)
500     (SaxEventLister.startElementNS, sax_eventlist): Add support to
501     normalize IDs.
502    
503     * test/test_xmlsupport.py
504     (TestEventList.test_even_list_id_normalization): New test case for
505     id normalization
506    
507     * test/test_load.py (LoadSessionTest.check_format): Use ID
508     normalization
509     (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
510     class atrributes used for ID normalization
511     (TestSingleLayer, TestLayerVisibility, TestLabels.test)
512     (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
513     file format
514     (TestJoinedTable): New test for loading sessions with joined
515     tables.
516     (TestLoadError): New. Test whether missing required attributes
517     cause a LoadError.
518    
519     * test/test_save.py (SaveSessionTest.thubanids)
520     (SaveSessionTest.thubanidrefs): New class attributes for ID
521     normalization in .thuban files.
522     (SaveSessionTest.compare_xml): Use id-normalization.
523     (SaveSessionTest.testEmptySession)
524     (SaveSessionTest.testLayerProjection)
525     (SaveSessionTest.testRasterLayer)
526     (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
527     (SaveSessionTest.testLayerProjection): The filename used was the
528     same as for testSingleLayer. Use a different one.
529     (SaveSessionTest.test_dbf_table)
530     (SaveSessionTest.test_joined_table): New test cases for saving the
531     new data sources structures.
532     (TestStoreSort, MockDataStore): Classes to test the sorting of the
533     data stores for writing.
534    
535     * test/runtests.py: Add CVS keywords
536    
537 jonathan 1265 2003-06-20 Jonathan Coles <[email protected]>
538    
539 jonathan 1267 * test/test_session.py
540     (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
541     Use the cultural_landmark-point.dbf file for the store so that
542     the table rows and shape count match.
543    
544     2003-06-20 Jonathan Coles <[email protected]>
545    
546 jonathan 1265 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
547     an exception if the number of shapes is different from the
548     number of rows in the table. Address RTbug #1933.
549    
550     * test/test_layer.py (TestLayer.test_derived_store): Add
551     a test for the new exception in DerivedShapeStore.__init__.
552    
553     * test/support.py (FloatTestCase): Removed since there is
554     already FloatComparisonMixin. Fixes RTbug #1954.
555     (FloatComparisonMixin.assertFloatEqual): Include test for
556     infinity that was part of FloatTestCase.
557    
558     * test/test_range.py (RangeTest): Inherit from
559     support.FloatComparisonMixin now that we don't have
560     support.FloatTestCase.
561    
562 bh 1256 2003-06-20 Bernhard Herzog <[email protected]>
563    
564 bh 1260 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
565     the implementation in xmlsupport instead.
566     (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
567    
568     * test/test_proj.py: Import sax_eventlist from xmlsupport instead
569     of test_save
570    
571     2003-06-20 Bernhard Herzog <[email protected]>
572    
573 bh 1258 * test/test_load.py (LoadSessionTest.check_format): New helper
574     method to make sure the test files we load might have been written
575     by the current thuban version.
576     (ClassificationTest.TestLayers, TestSingleLayer.test)
577     (TestLayerVisibility.test, TestClassification.test)
578     (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
579     Add check_format() calls and fix the thuban data to match the data
580     that would be written by saving the session loaded from it.
581    
582     * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
583     the same class and function in test_save.
584    
585     * test/test_xmlsupport.py (TestEventList): New. test cases for
586     sax_eventlist
587    
588     2003-06-20 Bernhard Herzog <[email protected]>
589    
590 bh 1256 * Resources/XML/thuban.dtd: Add comment about which versions of
591     Thuban are covered by this DTD
592     (map): Fix content model for layers and raster layers. There can
593     be any number or layers and raster layers in any order.
594    
595 jonathan 1254 2003-06-20 Jonathan Coles <[email protected]>
596    
597 jonathan 1265 This is mainly about fixing RTbug #1949.
598    
599 jonathan 1254 * Thuban/Model/classification.py: Remove "from __future__"
600     import statement since python 2.2 is the earliest supported
601     version.
602    
603     * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
604     Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
605     depending on the units this projection *forwards* into.
606    
607     * Thuban/Model/save.py (SessionSaver.write_classification):
608     Remove unnecessary use of lambdas and nested functions.
609    
610     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
611     adjustment here if the map projection uses degrees.
612    
613     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
614     scale adjust code since it is now done before calling
615     this method. Don't do anything if the map projection
616     is None.
617    
618 bh 1244 2003-06-19 Bernhard Herzog <[email protected]>
619    
620 bh 1248 Move version specific load tests to their own file.
621    
622     * test/test_load.py: Expand the doc-string to explain a bit how to
623     handle file format changes.
624     (TestClassification.test): Update the docstring as this test is
625     not about Thuban 0.2 anymore.
626    
627     * test/test_load_0_2.py: New file with the load tests for thuban
628     files created with Thuban 0.2 and earlier.
629    
630     2003-06-19 Bernhard Herzog <[email protected]>
631    
632 bh 1246 Add XML validation to some of the tests. Validation will only be
633     done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
634     To make the DTD available to the test cases it's moved into
635     Resources/XML
636    
637     * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
638     for versions up to and including 0.2. Two slight changes: added an
639     encoding specification and fixed the comment which refered to
640     GRASS, not Thuban
641    
642     * test/xmlsupport.py: New support module for tests involving XML.
643     Currently there's a mix-in class for XML validation.
644    
645     * test/test_xmlsupport.py: New. Tests for the xmlsupport module
646    
647     * test/test_save.py (SaveSessionTest): Derive from ValidationTest
648     so that we can validate the
649     (SaveSessionTest.testEmptySession)
650     (SaveSessionTest.testSingleLayer)
651     (SaveSessionTest.testSingleLayer)
652     (SaveSessionTest.testLayerProjection)
653     (SaveSessionTest.testRasterLayer)
654     (SaveSessionTest.testClassifiedLayer): Validate the generated XML
655    
656     * test/runtests.py (main): Call print_additional_summary instead
657     of print_garbage_information
658    
659     * test/support.py (resource_dir): New function to return the
660     "Resource" subdirectory
661     (print_additional_summary): New function to combine several
662     summary functions
663     (run_tests): Use print_additional_summary instead of calling
664     print_garbage_information directly
665    
666     2003-06-19 Bernhard Herzog <[email protected]>
667    
668 bh 1244 * Doc/thuban.dtd (classification): Correct the content model of
669     the classification element.
670     (projection): Add the "name" attribute
671    
672 frank 1242 2003-06-19 Frank Koormann <[email protected]>
673    
674     MERGE from the greater-ms3 branch.
675    
676     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
677     scale if projection is latlong to get better estimate.
678    
679     Fix problem of hidden properties dialog under windows after double
680     click on layer tree:
681     The tree control always gets an Expanded / Collapsed event after
682     the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply
683     raises the already displayed window.
684    
685     * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
686     raiseProperties initialized to prevent endless loops
687     (LegendTree._OnItemActivated): Depending on self.raiseProperties
688     simply raise the properties or open the dialog and issue a second
689     event.
690    
691 jonathan 1235 2003-06-18 Jonathan Coles <[email protected]>
692    
693 jonathan 1239 * setup.py: Fix a few problems that occured under Windows.
694    
695     2003-06-18 Jonathan Coles <[email protected]>
696    
697 jonathan 1235 When Thuban loaded the map was redrawn twice because the
698     legend was being opened after the mainwindow was created
699     and not during its creation. This meant the map was drawn
700     initially and then had to be redrawn when the legend
701     caused the display to change. Now the legend is opened
702     in the mainwindow constructor which resolves this issue.
703    
704     Also, although we were checking for the existence of
705     gdal and gdalwarp modules, the gdalwarp extension was
706     still being compiled (which may fail if the system doesn't
707     have gdal installed). the build_ext command to setup.py
708     now accepts the flags --with-gdal and --without-gdal.
709     If --without-gdal is specified setup.py will try to
710     use the gdal parameters specified by gdal-config. Under
711     windows, those parameters have to be set in setup.py
712     as with proj4 an wxWindows.
713    
714     * setup.py: Use a list instead of seperate variables for
715     extension parameters so we can create a generic function
716     that runs an appropriate *-config script.
717     (run_cs_script): Renamed from run_wx_script and modified
718     to accept a second argument which is a list of lists to
719     be filled in by the values returned from running the command.
720     (thuban_build_ext): New. Extends the build_ext command and
721     provides the options --with-gdal/--without-gdal which then
722     optionally includes the gdalwarp extension.
723    
724     * Thuban/Model/resource.py: First check if we can import
725     the gdalwarp Thuban extension before checking for gdal.
726     Also added some comments.
727    
728     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
729     the map is None which may be the case if none has been loaded
730     yet.
731    
732     * Thuban/UI/main.py (main): Remove call to ShowLegend.
733    
734     * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
735    
736     * Thuban/UI/renderer.py: Check for gdal support before importing
737     gdalwarp.
738     (MapRenderer.render_map): Only try to optimize if we have gdal
739     support otherwise nothing will get drawn.
740    
741 jonathan 1237 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
742     during startup before a map has been created. Check if map is None
743     before using it and do nothing if it is.
744    
745 jonathan 1224 2003-06-17 Jonathan Coles <[email protected]>
746    
747     Fix the problem with raster layers under Windows that caused
748     Thuban to crash. The view should respond to layer projection
749     changed events to update the display. Changes to a projection
750     should not cause the map to be set to full extent.
751    
752     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
753     current_map_proj to remember the current map projection so that
754     when the projection changes we know what the previous projection
755     was.
756     (MapCanvas.SetMap): Unsubscribe and subscribe to
757     LAYER_PROJECTION_CHANGED events.
758     (MapCanvas.projection_changed): Split into two methods that respond
759     to map and layer projection changes.
760     (MapCanvas.map_projection_changed): New. Takes the current view and
761     projects it using the new projection. This does not cause the
762     map to be redrawn at full extent.
763     (MapCanvas.layer_projection_changed): New. Cause a redraw which
764     will draw each layer in its new projection.
765    
766     * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
767     VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
768     under Windows.
769    
770     * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
771     to twice sizeof(void*) because there are two digits for each
772     hex byte.
773    
774 bh 1220 2003-06-16 Bernhard Herzog <[email protected]>
775    
776     Update to the layer interface: Direct access to the table,
777     shapetable, shapefile and filename attributes is now actively
778     deprecated by issuing deprecation warnings for all places where
779     this happens.
780    
781     * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
782     to the instance variables table, shapetable, shapefile and
783     filename via __getattr__ so that we can issue a deprecation
784     warning.
785     (Layer.SetShapeStore): Don't set the deprecated instance variables
786     any more
787     (Layer.SetShapeStore): Don't use deprecated layer instance
788     variables
789     (Layer.Destroy): No need to explicitly remove the instance
790     variables any more
791     (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
792     instance variables
793    
794     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
795     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
796     (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
797     use deprecated layer instance variables
798    
799     * Thuban/UI/classifier.py (Classifier.__init__): Don't use
800     deprecated layer instance variables
801    
802     * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
803     (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
804     instance variables
805    
806     * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
807     deprecated layer instance variables
808    
809     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
810     deprecated layer instance variables
811    
812     * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
813     deprecated layer instance variables
814    
815     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
816     (MapRenderer.polygon_render_param): Don't use deprecated layer instance
817     variables
818    
819     * test/runtests.py (main): Turn Thuban's deprecation warnings into
820     errors so that they're cought by the tests
821    
822     * test/test_load.py (TestSingleLayer.test): Don't use deprecated
823     layer instance variables
824    
825 jonathan 1212 2003-06-16 Jonathan Coles <[email protected]>
826    
827     Fix a problem under Windows whereby if the user double-clicks on a
828     layer in the legend that tree item will expand or collapse as well
829     as open the layer properties dialog. The state of the tree item
830     should not be affected.
831    
832     * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
833     preventExpandCollapse and subscribe to expanding and collapsing
834     events.
835     (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
836     collapsing events and will veto the event if it has been triggered
837     by the user double clicking on a layer.
838     (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
839     that an expanding/collapsing event should be vetoed.
840    
841 bh 1208 2003-06-13 Bernhard Herzog <[email protected]>
842    
843     * Thuban/UI/classifier.py (Classifier.OnClose)
844     (Classifier.map_layers_removed)
845     (Classifier.layer_shapestore_replaced): Unsubscribe the messages
846     in OnClose and not in map_layers_removed or
847     layer_shapestore_replaced to make sure it always happens when the
848     dialog is closed
849    
850 jonathan 1201 2003-06-13 Jonathan Coles <[email protected]>
851    
852 jonathan 1203 This puts back a fix for Windows where a panel is needed so that
853     the background of the table view appears correctly.
854    
855     * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
856     object that can be used by derived classes to place any
857     controls (including the grid) onto.
858     (QueryTableFrame.__init__): Use the panel as the parent window
859     for all the controls. Reparent the grid so that the panel is
860     the parent. Call UpdateStatusText() to correctly initialize
861     the status bar.
862    
863     2003-06-13 Jonathan Coles <[email protected]>
864    
865 jonathan 1201 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
866     from wxFrame (as opposed to wxDialog like the other classes)
867     but otherwise behaves like the other classes. This is needed
868     for the TableView which isn't really a dialog and needs to
869     have a status bar and control buttons.
870    
871     * Thuban/UI/tableview.py (TableGrid.__init__): Create an
872     instance variable to keep track of how many rows are selected.
873     Subscribe once to the the events we are interested in.
874     (ThubanGrid.OnRangeSelect): Only handle event if event handling
875     hasn't been turned off.
876     (ThubanGrid.OnSelectCell): Only handle event if event handling
877     hasn't been turned off.
878     (ThubanGrid.ToggleEventListeners): Rather than subscribe None
879     as an event listener (which changes the event handler stack)
880     simply set an instance variable to False. This is checked in
881     the event handlers.
882     (ThubanGrid.GetNumberSelected): Return the number of currently
883     selected rows.
884     (TableFrame): Inherit from ThubanFrame so we can have a
885     status bar and control buttons.
886     (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
887     Explicitly set which items are selected in the operator choice and
888     action choice so there is always a valid selection. Fixes RTbug #1941.
889     Subscribe to grid cell selection events so we can update the
890     status bar.
891     (QueryTableFrame.UpdateStatusText): Update the status bar with
892     how many rows are in the grid, how many columns, and how many
893     rows are selected.
894     (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
895     Call UpdateStatusText when cells are (de)selected.
896     (QueryTableFrame.OnQuery): Use the string value in the value
897     combo if either the selected item index is 0 or if the string
898     cannot be found in the predefined list (this happens if the
899     user changes the text). Fixes RTbug #1940.
900     Only turn off the grid event listeners if there a query comes
901     back with a none empty list of ids. in the case that the list
902     is empty this causes a grid.ClearSelection() call to actually
903     clear the grid selection which causes the selected items in
904     the map to be deselected. Fixes RTbug #1939.
905    
906     * test/test_save.py (XMLWriterTest.Encode): Check return values.
907     Fixes RTbug #1851.
908    
909 bh 1195 2003-06-13 Bernhard Herzog <[email protected]>
910    
911     * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
912     self.selected_shape with the current selection to make sure the
913     contents of the dialog are up to date when it's shown for the
914     first time.
915     The dialog used to work without this by luck. The recent fix to
916     the connector module 'broke' a 'feature' the identify view was
917     relying on, i.e that subscribing to a message in response to
918     receiving a message of that type would mean that the new
919     subscriber would also be called for the same message.
920    
921 jonathan 1169 2003-06-12 Jonathan Coles <[email protected]>
922 jonathan 1175
923 jonathan 1193 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
924     the image is rendered. Fixes RTbug #1937.
925    
926     2003-06-12 Jonathan Coles <[email protected]>
927    
928 jonathan 1191 * Thuban/Lib/fileutil.py: As is done under Windows, create the
929 jonathan 1193 user directory if it doesn't exist on a posix system.
930     Fixes RTbug #1815.
931 jonathan 1191
932     * Thuban/Model/resource.py (get_user_proj_files): Moved the
933     called to get_application_dir here, so that the directory
934     will only be called if this method is invoked.
935    
936     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
937     the projfilepath if no projection is selected.
938    
939     2003-06-12 Jonathan Coles <[email protected]>
940    
941 jonathan 1182 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
942     the scalebar if the current map has no projection set.
943    
944     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
945     projfilepath label to just the basename of the projection file
946     rather than include the entire path.
947    
948     * Thuban/Model/resource.py: Fix missed proj functions that
949     needed to be renamed.
950    
951     2003-06-12 Jonathan Coles <[email protected]>
952    
953 jonathan 1178 * Thuban/Model/classification.py: Removed assert statements that
954     tested if the variable was an instance of Color.
955    
956     * Thuban/Model/color.py (Color): Remove commented code that isn't
957     used.
958     (Transparent): Renamed from NoColor. Doesn't inherit from Color.
959     Fixes RTbug #1835.
960     (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
961     Needed now that the class doesn't inherit from Color.
962    
963     2003-06-12 Jonathan Coles <[email protected]>
964    
965 jonathan 1175 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
966     check unicode strings.
967    
968     * test/test_layer.py: Check for existence of gdal.
969    
970     2003-06-12 Jonathan Coles <[email protected]>
971 jonathan 1172
972     * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
973     that was in load.py
974 jonathan 1169
975 jonathan 1172 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
976     that was in save.py
977    
978     2003-06-12 Jonathan Coles <[email protected]>
979    
980 jonathan 1169 This is largely a collection of bug fixes. We also handle the
981     case where gdal is not on the system. The XMLReader and XMLWriter
982     classes were moved into there own files to resolve some circular
983     import references and because they shouldn't really be in the
984     file that is dediciated to reading/writing session files since
985     they are also used elsewhere.
986    
987     * Thuban/Model/classgen.py: Renamed functions to follow the
988     function_names_with_underscores style. Fixes RTbug #1903.
989     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
990    
991     * Thuban/Model/layer.py: Import gdal only if it available.
992     (RasterLayer): Handle the case where the gdal library is unavailable.
993     Addresses RTbug #1877.
994    
995     * Thuban/Model/load.py (XMLReader): Moved into seperate file
996     xmlreader.py.
997    
998 jonathan 1172 2003-06-12 Jonathan Coles <[email protected]>
999    
1000     This is largely a collection of bug fixes. We also handle the
1001     case where gdal is not on the system. The XMLReader and XMLWriter
1002     classes were moved into there own files to resolve some circular
1003     import references and because they shouldn't really be in the
1004     file that is dediciated to reading/writing session files since
1005     they are also used elsewhere.
1006    
1007     * Thuban/Model/classgen.py: Renamed functions to follow the
1008     function_names_with_underscores style. Fixes RTbug #1903.
1009     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
1010    
1011     * Thuban/Model/layer.py: Import gdal only if it available.
1012     (RasterLayer): Handle the case where the gdal library is unavailable.
1013     Addresses RTbug #1877.
1014    
1015     * Thuban/Model/load.py (XMLReader): Moved into seperate file
1016     xmlreader.py.
1017    
1018 jonathan 1169 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
1019     file xmlwriter.py.
1020    
1021     * Thuban/Model/resource.py: Renamed functions to following the
1022     function_names_with_underscores style.
1023     (has_gdal_support): New function that returns true if the gdal
1024     library is available. Addresses RTbug #1877.
1025    
1026     * Thuban/UI/application.py (ThubanApplication.OpenSession):
1027     Display a message box if the gdal library is not available, but
1028     only if there are any layers that would use it. Addresses RTbug #1877.
1029    
1030     * Thuban/UI/classgen.py: Use renamed projection resource functions.
1031     (GenUniformPanel.__CalcStepping): Fix a slight discrepency
1032     when using integers versus floats.
1033    
1034     * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
1035     determine if the "Add Image Layer" menu option should be
1036     greyed out or not. Addresses RTbug #1877.
1037    
1038     * Thuban/UI/projdialog.py: Use renamed projection resource functions.
1039    
1040     * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
1041     optimize if a raster layer is visible. Fixes RTbug #1931.
1042     Only draw the raster layer if the gdal library is available.
1043     Addresses RTbug #1877.
1044    
1045     * test/test_classgen.py: Add tests for generate_singletons,
1046     generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
1047     (test_calculate_quantiles): Fix some tests to catch the new
1048     ValueError that is raised.
1049    
1050     * test/test_proj.py: Use renamed projection resource functions.
1051    
1052     * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
1053     test for saving classified layers. Fixes RTbug #1902.
1054     (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
1055    
1056 jan 1156 2003-06-12 Jan-Oliver Wagner <[email protected]>
1057    
1058     Fix for http://intevation.de/rt/webrt?serial_num=1900.
1059    
1060     * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
1061    
1062     * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
1063     multiplechoicedialog.py rather than from the wxPython library.
1064    
1065 frank 1151 2003-06-11 Frank Koormann <[email protected]>
1066    
1067 frank 1152 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
1068     update.
1069    
1070     2003-06-11 Frank Koormann <[email protected]>
1071    
1072 frank 1151 * Thuban/Lib/fileutil.py (get_application_dir): New function to
1073     determine the absolute .thuban/thuban directory under
1074     "posix" (os.expanduser) and "nt" (read AppData registry key).
1075    
1076     * Thuban/Model/resource.py: Use get_application_dir
1077    
1078     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1079     Use get_application_dir.
1080    
1081 bh 1143 2003-06-10 Bernhard Herzog <[email protected]>
1082    
1083 bh 1147 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
1084     the messages MAP_LAYERS_REMOVED messages
1085     (LayerTableFrame.OnClose): Unsubscribe from it.
1086     (LayerTableFrame.map_layers_removed): New. Receiver for
1087     MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
1088     dialog is showing is removed.
1089    
1090     2003-06-10 Bernhard Herzog <[email protected]>
1091    
1092 bh 1145 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
1093     of the receivers list so that unsubscribing in a receiver doesn't
1094     modify it while iterating over it.
1095    
1096     * test/test_connector.py
1097     (ConnectorTest.test_disconnect_in_receiver): New. Test whether
1098     unsubscribing in a receiver works correctly. See docstring for
1099     details
1100    
1101     2003-06-10 Bernhard Herzog <[email protected]>
1102    
1103 bh 1143 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
1104     message.
1105    
1106     * Thuban/Model/layer.py (Layer.SetShapeStore): Send
1107     LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
1108     LAYER_CHANGED will still be sent if the classification changes.
1109    
1110     * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
1111     parameter so we can subscribe to some of its messages
1112     (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
1113     and the layer's LAYER_SHAPESTORE_REPLACED
1114     (Classifier.unsubscribe_messages): New. Unsubscribe from message
1115     subscribed to in __init__
1116     (Classifier.map_layers_removed)
1117     (Classifier.layer_shapestore_replaced): receivers for the messages
1118     subscribed to in __init__. Unsubscribe and close the dialog
1119    
1120     * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
1121     the map to the Classifier dialog
1122    
1123     * test/test_layer.py (SetShapeStoreTests): Derive from
1124     SubscriberMixin as well so we can test messages
1125     (SetShapeStoreTests.setUp): Subscribe to some of the layer's
1126     messages
1127     (SetShapeStoreTests.tearDown): Clear the messages again
1128     (SetShapeStoreTests.test_sanity): Expand the doc-string and check
1129     for the modified flag too
1130     (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
1131     to check whether SetShapeStore sets the modified flag
1132     (SetShapeStoreTests.test_set_shape_store_different_field_name)
1133     (SetShapeStoreTests.test_set_shape_store_same_field)
1134     (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
1135     Add tests for the messages. This checks both the new
1136     LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
1137    
1138 jan 1141 2003-06-06 Jan-Oliver Wagner <[email protected]>
1139    
1140     * Thuban/UI/mainwindow.py: Improved and partly added help texts for
1141     the menu items.
1142    
1143 frank 1134 2003-06-05 Frank Koormann <[email protected]>
1144    
1145 frank 1139 * Thuban/UI/identifyview.py (IdentifyView.__init__):
1146     Layout reimplemented without panel. Make life easier to fit the list
1147     in the dialog.
1148    
1149     2003-06-05 Frank Koormann <[email protected]>
1150    
1151 frank 1137 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
1152     once on initialisation (Former implementation resulted in multiple
1153     entries for each projection).
1154     (ProjFrame.__FillAvailList): selectProj as second optional parameter,
1155     if set, select the projection found under the specified name. This
1156     overwrites any other selection estimate.
1157     Removed projchoice filling from this method.
1158     (ProjFrame._OnSave, ProjFrame._OnAddToList):
1159     Updated call of ProjFrame.__FillAvailList
1160     (LCCPanel._DoLayout): Moved parameter controls in more common order.
1161    
1162     * Resources/Projections/defaults.proj: Extended defaults representing
1163     various common European projections.
1164    
1165     2003-06-05 Frank Koormann <[email protected]>
1166    
1167 frank 1134 * Thuban/UI/identifyview.py (IdentifyView.__init__):
1168     Use ListCtrl instead of GridCtrl
1169    
1170     * Thuban/Model/resource.py:
1171     Guess location of .thuban directory from tempdir parent directory.
1172    
1173     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1174     Guess location of .thuban directory from tempdir parent directory.
1175    
1176 bh 1130 2003-06-04 Bernhard Herzog <[email protected]>
1177    
1178     Do not cache the values returned by the tree widget's
1179     GetFirstChild and GetNextChild methods because it led to lots of
1180     segfaults. The new way requires more brute force but is more
1181     reliable.
1182    
1183     * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
1184     variable layer2id
1185     (LegendTree.find_layer): New method to do with brute force what
1186     layer2id tried to accomplish
1187     (LegendTree._OnMsgLayerChanged)
1188     (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
1189     Use find_layer instead of layer2id
1190     (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
1191     update layer2id anymore
1192     (LegendTree._OnMsgMapLayersRemoved)
1193     (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
1194    
1195 tkoester 1128 2003-06-03 Thomas Koester <[email protected]>
1196    
1197     * Thuban/Model/classgen.py (GenQuantiles0): New function.
1198    
1199 bh 1120 2003-06-02 Bernhard Herzog <[email protected]>
1200    
1201 bh 1127 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
1202     New commands.
1203     (main_menu): Add the new commands.
1204     (MainWindow.TableRename): New. Implementation of the table_rename
1205     command.
1206     (MainWindow.RenameLayer): New. Implementation of the layer_rename
1207     command.
1208    
1209     * Thuban/Model/session.py (Session.AddTable): call self.changed to
1210     set the modified flag
1211    
1212     * test/test_session.py (TestSessionSimple.test_add_table): Test
1213     whether the modified flag is set properly
1214    
1215     * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
1216     instead of issue so that the modified flags get updated.
1217    
1218     * test/test_base.py (SomeTitledObject): Derive from Modifiable
1219     instead of Publisher to reflect reality better and to accomodate
1220     the fact that SetTitle now calls changed instead of issue
1221    
1222     2003-06-02 Bernhard Herzog <[email protected]>
1223    
1224     * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
1225     acquisition has to happen before the try in a try-finally.
1226    
1227     2003-06-02 Bernhard Herzog <[email protected]>
1228    
1229 bh 1120 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
1230     possible that a layer is removed that is not currently selected in
1231     the legend so don't check for this.
1232    
1233 bh 1112 2003-05-30 Bernhard Herzog <[email protected]>
1234    
1235 bh 1118 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
1236     variables to None that have direct or indirect references to
1237     shapefiles or dbf files to make sure that they do go away and the
1238     files are closed.
1239    
1240     2003-05-30 Bernhard Herzog <[email protected]>
1241    
1242 bh 1116 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
1243     availImgListIndices when a new image list is created
1244    
1245     2003-05-30 Bernhard Herzog <[email protected]>
1246    
1247 bh 1114 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
1248     changing_selection to indicate whether the LegendTree code itself
1249     is currently changing the selection
1250     (LegendTree.normalize_selection): New method to normalize the
1251     selection by selecting the layer item even if the user clicked on
1252     the classification.
1253     (LegendTree._OnSelChanged): normalize the selection. This works
1254     around a bug in wx which doesn't keep track of the selection
1255     properly when subtrees are deleted.
1256    
1257     2003-05-30 Bernhard Herzog <[email protected]>
1258    
1259 bh 1112 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
1260     maximum and minimum scale factors.
1261    
1262     * test/test_classgen.py (ClassGenTest.test): Update to reflect the
1263     changes in classgen.py
1264    
1265 jonathan 1109 2003-05-30 Jonathan Coles <[email protected]>
1266    
1267     * Thuban/Model/classgen.py: Remove ClassGenerator class but make
1268     all the methods functions. Fixes RTBug #1903.
1269    
1270     * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
1271     to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
1272     RTBug #1907.
1273    
1274     * Thuban/UI/classgen.py: Use classgen functions that were part
1275     of the ClassGenerator class. Put try/finally blocks around
1276     code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
1277     RTBug #1904.
1278    
1279     * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
1280    
1281     * Thuban/UI/legend.py: The legend was cleared and repopulated any
1282     time something changed which caused some state to be lost such
1283     as which children were expanded or collapsed. Fixes RTBug #1901.
1284     (LegendTree._OnMsgMapLayersAdded): Add only new layers.
1285     (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
1286     the legend but not in the map.
1287     (LegendTree.__FillTree): Move main functionality out into smaller
1288     methods that can be used by other methods.
1289     (LegendTree.__FillTreeLayer): Reuse old slots in the image list
1290     if they are available.
1291     (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
1292     that we override the wxTreeCtrl method. Iterate over children
1293     and call __RemoveLayer.
1294     (LegendTree.__AddLayer): New. Add a new layer to the legend.
1295     (LegendTree.__RemoveLayer): Remove a layer from the legend.
1296     (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
1297     Should only be called with the id of a layer branch.
1298     (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
1299     Returns the root item or creates one if necessary.
1300    
1301     * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
1302     ProjectRasterFile with tuple arguments instead of strings.
1303    
1304     * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
1305     with try/finally. Fixes RTBug #1904.
1306    
1307     * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
1308     with try/finally. Fixes RTBug #1904.
1309     (MapCanvas.FitSelectedToWindow): If a single point is selected
1310     simply center it on the display. Fixes RTBug #1849.
1311    
1312     * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
1313     to be compiled as a standalone app. Now the code can only be
1314     called from Python which simplifies the parameter passing.
1315     (ProjectRasterFile): Handle Python arguments. Remove code that
1316     checks for a destination dataset. Add more clean up code.
1317    
1318     * test/test_map.py (TestMapWithContents.test_raise_layer_top,
1319     TestMapWithContents.test_lower_layer_bottom):
1320     Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
1321     Fixes RTBug #1907.
1322    
1323     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
1324     extent to the map when the legend is toggled. Fixes RTBug #1881.
1325    
1326 jan 1097 2003-05-29 Jan-Oliver Wagner <[email protected]>
1327    
1328     * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
1329     unsubscribes all that is subcribed in __init__.
1330    
1331 bh 1089 2003-05-28 Bernhard Herzog <[email protected]>
1332    
1333 bh 1095 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
1334     (MainWindow.CanDuplicateLayer): New methods to implement the
1335     Layer/Duplicate command.
1336     (layer_duplicate command): New.
1337     (main_menu): Add layer_duplicate to the Layer menu.
1338    
1339     2003-05-28 Bernhard Herzog <[email protected]>
1340    
1341 bh 1093 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
1342     renderer so that NULL/None values get displayed differently (by a
1343     gray rectangle).
1344     (TableGrid.__init__): Override the default renderers
1345    
1346     2003-05-28 Bernhard Herzog <[email protected]>
1347    
1348 bh 1089 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
1349     classification to "None" if the type of the field has changed.
1350    
1351     * test/test_layer.py (SetShapeStoreTests): New. Class with a few
1352     test for the Layer.SetShapeStore method
1353    
1354 jan 1087 2003-05-28 Jan-Oliver Wagner <[email protected]>
1355 jan 1085
1356 jan 1087 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
1357     does not necessarily have a filename).
1358    
1359     2003-05-28 Jan-Oliver Wagner <[email protected]>
1360    
1361 jan 1085 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
1362     sort the selection list for the dialog.
1363    
1364 frank 1083 2003-05-28 Frank Koormann <[email protected]>
1365    
1366     * extensions/thuban/wxproj.cpp
1367     (project_point): Removed cast to int for projected point coordinates.
1368     (shape_centroid): Return last point if all polygon vertices fall
1369     to one point.
1370    
1371 bh 1079 2003-05-28 Bernhard Herzog <[email protected]>
1372    
1373 bh 1081 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
1374     with layers that don't have shapestores, i.e. raster layers.
1375    
1376     2003-05-28 Bernhard Herzog <[email protected]>
1377    
1378 bh 1079 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
1379     when determining the title from the filename.
1380    
1381     * test/test_dbf_table.py (TestDBFTable.test_title): Update to
1382     reflect changes in the way the title is derived from the filename
1383    
1384 frank 1077 2003-05-28 Frank Koormann <[email protected]>
1385    
1386     * Thuban/UI/mainwindow.py (MainWindow.TableShow):
1387     Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
1388    
1389 bh 1069 2003-05-27 Bernhard Herzog <[email protected]>
1390    
1391 bh 1075 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
1392     delegate SelectedLayer.
1393     (MainWindow.LayerUnjoinTable): Implement.
1394     (_can_unjoin): New. Helper function for the sensitivity of the
1395     layer/unjoin command.
1396    
1397     * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
1398     (DerivedShapeStore.OrigShapeStore): New. Return the original
1399     shapestore. Used to figure out how to unjoin.
1400     (DerivedShapeStore.Shapefile): Fix a typo.
1401    
1402     2003-05-27 Bernhard Herzog <[email protected]>
1403    
1404 bh 1073 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
1405     well
1406     (JoinDialog.__init__): Use the layer parameter and only build the
1407     left choice when a layer is given
1408     (JoinDialog.OnJoin): Handle layer joins as well
1409     (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
1410     that the user selects the "Select..." item. The sensitivitly
1411     updating is now in update_sensitivity
1412     (JoinDialog.y): New method to refactor the sensitivity update of
1413     the join button into its own method.
1414    
1415     * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
1416    
1417     2003-05-27 Bernhard Herzog <[email protected]>
1418    
1419 bh 1071 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
1420     iff there are unreferenced tables in the session
1421    
1422     2003-05-27 Bernhard Herzog <[email protected]>
1423    
1424 bh 1069 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
1425    
1426     * Thuban/Model/session.py (Session.UnreferencedTables): New method
1427     to return tables that are not referenced by other tables or shape
1428     stores and can be removed.
1429     (Session.RemoveTable): Issue a TABLE_REMOVED message after
1430     removing the table
1431    
1432     * Thuban/UI/mainwindow.py: Remove unused imports
1433     (MainWindow.TableClose): Implement.
1434    
1435     * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
1436     messages so that the frame will be automatically closed when a new
1437     session is opened or the table is removed.
1438     (TableFrame.OnClose): Unsubscribe the Subscriptions made in
1439     __init__
1440     (TableFrame.close_on_session_replaced)
1441     (TableFrame.close_on_table_removed): New. Subscribers that close
1442     the window
1443    
1444     * test/test_session.py (TestSessionMessages.test_remove_table)
1445     (TestSessionSimple.test_remove_table): Move the test to
1446     TestSessionSimple and add test for the TABLE_REMOVED message
1447     (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
1448     (TestSessionSimple.test_unreferenced_tables) New. Test for the
1449     UnreferencedTables method.
1450     (UnreferencedTablesTests): New. Class with some more sophisticated
1451     tests for UnreferencedTables.
1452    
1453 frank 1065 2003-05-27 Frank Koormann <[email protected]>
1454    
1455 frank 1067 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
1456     display has some unwanted side effects. Removed again.
1457    
1458     2003-05-27 Frank Koormann <[email protected]>
1459    
1460 frank 1065 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
1461    
1462     * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
1463    
1464 jan 1062 2003-05-27 Jan-Oliver Wagner <[email protected]>
1465    
1466 bh 1069 * test/test_menu.py (MenuTest.test): Added test for
1467     Menu.RemoveItem().
1468 jan 1062
1469 bh 1069 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
1470     the menu.
1471 jan 1062
1472 frank 1059 2003-05-27 Frank Koormann <[email protected]>
1473    
1474     Nonmodal dialogs without parent (i.e. they can fall behind the main
1475     window)
1476    
1477     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
1478     all dialogs in the dialogs dictionary and the canvas.
1479    
1480     * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
1481     parent, i.e. can fall behind other windows.
1482     (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
1483     dictionary before removing it.
1484    
1485     * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
1486    
1487     * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
1488     * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
1489     * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
1490    
1491 bh 1053 2003-05-27 Bernhard Herzog <[email protected]>
1492    
1493 bh 1055 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
1494     tableview dialog
1495     (MainWindow.TableShow): Use ShowTableView to open the dialogs.
1496     Also, don't use the table's titles as the dialog names. The titles
1497     aren't guaranteed to be unique.
1498     (MainWindow.TableOpen): Open a table view dialog after opening the
1499     table
1500    
1501     2003-05-27 Bernhard Herzog <[email protected]>
1502    
1503 bh 1053 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
1504     effect can be achieved by simply closing the window showing the
1505     table.
1506     (MainWindow.TableHide): Removed.
1507     (main_menu): Removed "table_hide"
1508    
1509 frank 1051 2003-05-27 Frank Koormann <[email protected]>
1510    
1511     Fix legend tree display problems under Win32
1512    
1513     * Thuban/UI/legend.py: BMP_SIZE_W = 15
1514     (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
1515     (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
1516    
1517     * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
1518    
1519 jan 1048 2003-05-27 Jan-Oliver Wagner <[email protected]>
1520    
1521     * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
1522     'after' now allows to insert separators almost anywhere in the menu.
1523    
1524 frank 1046 2003-05-27 Frank Koormann <[email protected]>
1525    
1526     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
1527     "S" of selection box label to hint on hot key (Alt-S). Works under
1528     Win32 but is ignored under GTK.
1529    
1530     2003-05-26 Frank Koormann <[email protected]>
1531    
1532     * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
1533     Center Choices.
1534    
1535 bh 1038 2003-05-26 Bernhard Herzog <[email protected]>
1536    
1537 bh 1044 Remove the Precision methods again. They're too DBF specific to be
1538     part of the table interface and they're only used in table_to_dbf
1539     anyway.
1540    
1541     * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
1542     fixed precision of 12 for doubles.
1543     (TransientTableBase.Precision): Removed
1544     (AutoTransientTable.Width): Delegate to self.table.
1545    
1546     * Thuban/Model/table.py (DBFTable.Precision)
1547     (MemoryTable.Precision): Removed.
1548     (MemoryTable.Width): Use a fixed precision of 12 for doubles.
1549     (table_to_dbf): Use a fixed precision of 12 for floats unless the
1550     column object specifies something else.
1551    
1552     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
1553     test for table_to_dbf
1554    
1555     2003-05-26 Bernhard Herzog <[email protected]>
1556    
1557     * test/test_transientdb.py
1558     (TestTransientTable.run_iceland_political_tests): Fix a comment.
1559    
1560     2003-05-26 Bernhard Herzog <[email protected]>
1561    
1562 bh 1038 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
1563     implementation. Mark parts of the file format strings for
1564     localization.
1565    
1566     * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
1567     file and add the table to the tables managed by the session
1568    
1569 bh 1040 * test/test_session.py (TestSessionSimple.test_open_table_file):
1570     New. test case for OpenTableFile
1571    
1572 jan 1033 2003-05-26 Jan-Oliver Wagner <[email protected]>
1573    
1574 jan 1035 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
1575     Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
1576     Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
1577     Replace the true/false of wxWindows by True/False of Python 2.2.1.
1578    
1579     2003-05-26 Jan-Oliver Wagner <[email protected]>
1580    
1581 bh 1038 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
1582     already a selection present, update the grid accordingly.
1583 jan 1033
1584     * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
1585     resizeable and increase its initial size.
1586    
1587 frank 1030 2003-05-26 Frank Koormann <[email protected]>
1588    
1589     Table export functionality
1590    
1591     * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
1592     Return width (in characters) for a column.
1593     (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
1594     (table_to_dbf): Write table to dbf file.
1595     (table_to_csv): Write table to csv file.
1596    
1597     * Thuban/Model/transientdb.py (TransientTableBase.Width,
1598     TransientTableBase.Precision): Return column width and precision.
1599    
1600     * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
1601     or table_to_csv depending on file selection.
1602    
1603     * test/test_dbf_table.py:
1604     Test table_to_dbf (extension of former part of test).
1605    
1606     * test/test_csv_table.py:
1607     Test table_to_csv.
1608    
1609 jan 1021 2003-05-23 Jan-Oliver Wagner <[email protected]>
1610    
1611 jan 1024 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
1612     Use QueryTableFrame instead of TableFrame.
1613 jan 1021
1614 jan 1024 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
1615     table window with 'Layer Table:' instead of 'Table:'.
1616    
1617     2003-05-23 Jan-Oliver Wagner <[email protected]>
1618    
1619     Give all tables a title via mix-in TitledObject.LayerShowTable
1620    
1621 jan 1021 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
1622     only if it exists.
1623    
1624     * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
1625     and call its init-method with a default title. Remove Title() method.
1626    
1627     * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
1628     AutoTransientTable): mix-in TitledObject and call its init-method with
1629     a default title. Remove Title() method.
1630    
1631 bh 1017 2003-05-23 Bernhard Herzog <[email protected]>
1632    
1633     * Thuban/Model/session.py (Session.AddShapeStore): Define
1634     AddShapeStore analogously to AddTable.
1635    
1636     * test/test_session.py (TestSessionSimple.test_add_shapestore):
1637     New. Test for AddShapeStore
1638    
1639 jan 1015 2003-05-23 Jan-Oliver Wagner <[email protected]>
1640    
1641     Introducing QueryTableFrame and a very coarse ShowTable implementation.
1642    
1643     * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
1644     class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
1645     The latter implements the selection GUI without dependency on a layer.
1646     LayerTableFrame now is derived from QueryTableFrame and connects
1647     to a layer.
1648    
1649     * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
1650     implementation that still needs work.
1651    
1652     * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
1653    
1654 frank 1011 2003-05-22 Frank Koormann <[email protected]>
1655    
1656     * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
1657     Added "outer_join = False" as optional parameter.
1658     (TransientJoinedTable.create): If outer join is true, perform a
1659     "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
1660     the left table. Records not matching are filled with 0 / None.
1661    
1662     * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
1663     (JoinDialog.OnJoin): Consider outer join check box.
1664    
1665 bh 1006 2003-05-22 Bernhard Herzog <[email protected]>
1666    
1667 bh 1008 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
1668     somewhat safer way. Storing the traceback in a local variable can
1669     lead to memory leaks
1670    
1671     2003-05-22 Bernhard Herzog <[email protected]>
1672    
1673 bh 1006 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
1674     the wxMessageDialog's Destroy() method.
1675    
1676 frank 1004 2003-05-22 Frank Koormann <[email protected]>
1677    
1678     * Thuban/UI/join.py (JoinDialog.__init__): Make use of
1679     TransientTable.Title()
1680    
1681     2003-05-22 Frank Koormann <[email protected]>
1682    
1683     Join Dialog, initial version.
1684    
1685     * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
1686    
1687     * Thuban/UI/join.py (JoinDialog): Functional implementation of
1688     former framework. Renamed Table1/Table2 to LeftTable/RightTable
1689     in all occurences.
1690    
1691     * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
1692     Typo fixed.
1693    
1694 bh 995 2003-05-22 Bernhard Herzog <[email protected]>
1695    
1696 bh 999 Give the tables titles so that the GUI can display more meaningful
1697     names. For now the titles are fixed but depend on e.g. filenames
1698     or the titles of the joined tables.
1699    
1700     * Thuban/Model/transientdb.py (TransientTable.Title)
1701     (TransientJoinedTable.Title, AutoTransientTable.Title): New.
1702    
1703     * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
1704    
1705     * test/test_transientdb.py
1706     (TestTransientTable.test_auto_transient_table_title): New. Test
1707     for the Title method
1708     (TestTransientTable.test_transient_joined_table)
1709     (TestTransientTable.test_transient_table): Add test for the Title
1710     methods
1711    
1712     * test/test_memory_table.py (TestMemoryTable.test_title): New.
1713     Test for the Title method
1714    
1715     * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
1716     the Title method
1717    
1718     2003-05-22 Bernhard Herzog <[email protected]>
1719    
1720 bh 997 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1721     Provide a better way to destroy the layers
1722     (TestLayer.test_base_layer, TestLayer.test_arc_layer)
1723     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1724     (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
1725     the new way to destroy the layers.
1726     (TestLayer.test_derived_store): New. Test for using a layer with a
1727     DerivedShapeStore
1728    
1729     * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
1730     filename if the shape store actually has one.
1731    
1732     2003-05-22 Bernhard Herzog <[email protected]>
1733    
1734 bh 995 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
1735     for the filename
1736    
1737     * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
1738     for the FileName method
1739     (TestDBFTableWriting.test_write): Fix spelling of filename
1740    
1741 tkoester 993 2003-05-22 Thomas Koester <[email protected]>
1742    
1743     * Thuban/Model/range.py, test/test_range.py: Brought over new Range
1744     from SciParam that now really is immutable.
1745    
1746 frank 992 2003-05-22 Frank Koormann <[email protected]>
1747    
1748     Layer Top/Bottom placement added to legend.
1749    
1750     * Thuban/UI/legend.py
1751     (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
1752     bound to tool events.
1753     (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
1754     New, methods binding the event methods with the map methods.
1755    
1756     * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
1757     layer at top/bottom of layer stack.
1758    
1759     * Resources/Bitmaps/top_layer.xpm: New button icon.
1760    
1761     * Resources/Bitmaps/bottom_layer.xpm: New button icon.
1762    
1763 bh 988 2003-05-22 Bernhard Herzog <[email protected]>
1764    
1765     * Thuban/Model/session.py (Session.RemoveTable): New method to
1766     remove tables
1767    
1768     * test/test_session.py (TestSessionSimple.test_remove_table): New.
1769     Test for RemoveTable
1770    
1771 tkoester 986 2003-05-22 Thomas Koester <[email protected]>
1772    
1773     * Thuban/Model/classgen.py: Added short module doc string and CVS id.
1774     (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
1775    
1776 bh 983 2003-05-22 Bernhard Herzog <[email protected]>
1777    
1778 bh 985 Implement a way to discover dependencies between tables and
1779     shapestores.
1780    
1781     * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
1782     (TransientJoinedTable.Dependencies)
1783     (AutoTransientTable.SimpleQuery): New. Implement the dependencies
1784     interface
1785     (TransientJoinedTable.__init__): Keep tack of the original table
1786     objects in addition to the corresponding transient tables.
1787    
1788     * Thuban/Model/table.py (DBFTable.Dependencies)
1789     (MemoryTable.Dependencies): New. Implement the dependencies
1790     interface
1791    
1792     * Thuban/Model/data.py (ShapeTable): New. Helper class for
1793     ShapefileStore
1794     (ShapefileStore.__init__): Use ShapeTable instead of
1795     AutoTransientTable
1796     (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
1797     (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
1798     methods for filename and type
1799     (ShapefileStore.Dependencies): New. Implement the dependencies
1800     interface
1801     (DerivedShapeStore): New class to replace SimpleStore. The main
1802     difference to SimpleStore is that it depends not on a shapefile
1803     but another shapestore which expresses the dependencies a bit
1804     better
1805     (SimpleStore.__init__): Add deprecation warning.
1806    
1807     * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
1808     Test for the Dependencies method.
1809    
1810     * test/test_memory_table.py (TestMemoryTable.test_dependencies):
1811     New. Test for the Dependencies method.
1812    
1813     * test/test_transientdb.py
1814     (TestTransientTable.test_auto_transient_table_dependencies): New.
1815     Test for the Dependencies method.
1816     (TestTransientTable.test_transient_joined_table): Add test for the
1817     Dependencies method.
1818    
1819     * test/test_session.py (TestSessionSimple.setUp)
1820     (TestSessionSimple.tearDown): New. Implement a better way to
1821     destroy the sessions.
1822     (TestSessionSimple.test_initial_state)
1823     (TestSessionSimple.test_add_table): Bind session to self.session
1824     so that it's destroyed by tearDown
1825     (TestSessionSimple.test_open_shapefile): New. Test for
1826     OpenShapefile and the object it returns
1827    
1828     2003-05-22 Bernhard Herzog <[email protected]>
1829    
1830 bh 983 * Thuban/Model/session.py (Session.AddTable): New method to
1831     register tables with the session.
1832     (Session.Tables): Return the tables registered with AddTable too.
1833    
1834     * test/test_session.py (TestSessionSimple.test_add_table): New.
1835     Test case for the AddTable method
1836    
1837 frank 981 2003-05-22 Frank Koormann <[email protected]>
1838    
1839     UI polishing updates: Place main buttons (OK, Cancel, etc) in the
1840     lower right corner, center labels for selections, initialize controls
1841     in reasonable order for keyboard navigation.
1842    
1843     * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
1844     (ProjFrame.__DoOnProjAvail): Determine position of current projection
1845     using the wxListBox.FindString() method. Still a problem (#1886)
1846    
1847     * Thuban/UI/classifier.py
1848     (Classifier.__init__, SelectPropertiesDialog.__init__)
1849    
1850     * Thuban/UI/classgen.py (ClassGenDialog.__init__,
1851     (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
1852     different classification types from here to __init__.
1853     (GenUniquePanel.__init__): Set the column width of the first field
1854     in the Field ListCtrl to the full width.
1855    
1856     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
1857     Button to 'Export'. Center Buttons in Selection Box, set Focus to
1858     Grid.
1859     (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
1860     changes focus to the Selection when pressing "Alt-S".
1861    
1862     * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
1863     the text if not visible. The italic font sometimes exceeds the
1864     rendering area.
1865    
1866 jonathan 972 2003-05-21 Jonathan Coles <[email protected]>
1867 jonathan 971
1868 jonathan 975 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
1869     to OnClose so that Thuban closes correctly.
1870    
1871     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
1872     DockFrame.OnClose, not DockFrame._OnClose.
1873    
1874     2003-05-21 Jonathan Coles <[email protected]>
1875    
1876 jonathan 971 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
1877     references to 'inf' and use new Range __init__ to pass floats
1878     directly rather than converting them to strings first.
1879     Fixes RTBug #1876.
1880    
1881     * Thuban/Model/classification.py (ClassGroupRange.SetRange):
1882     Use new Range ___init__ to pass floats.
1883    
1884     * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
1885     filename is a valid image file. Throw IOError otherwise.
1886    
1887     * Thuban/Model/range.py: Brought over new Range from SciParam that
1888     is immutable and has an __init__ which can accept floats.
1889    
1890     * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
1891     into try block. AddLayer doesn't throw any exceptions anymore.
1892     (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
1893     try block.
1894    
1895     * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
1896     the first item in choices. Fixes RTBug #1882.
1897    
1898     * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
1899     has gone to 0 which is a serious problem. abort.
1900     (MapRenderer.draw_raster_layer): Catch IOError seperately and
1901     print the error from GDAL.
1902    
1903     * Thuban/UI/tableview.py (TableGrid.__init__): Call
1904     ToggleEventListeners to turn on listening.
1905     (TableGrid.ToggleEventListeners): New. Turns event listening on
1906     and off so as to prevent excessive messages.
1907     (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
1908     to suppress excessive messages when selecting many rows.
1909     Fixes RTBug #1880.
1910    
1911     * Thuban/UI/view.py: Added checks against if scale == 0. This
1912     is a serious problem that can occur when an image without
1913     geo data is loading and causes the map projection bounds to
1914     go to infinity. Right now, the solution is to simply try
1915     to recover.
1916    
1917     * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
1918     to set the MFILEReceiver attributes even if the data is NULL.
1919    
1920     * extensions/thuban/gdalwarp.cpp: Improved the error handling
1921     and passed GDAL messages back up to the Python layer. Also
1922     tried to fix some memory leaks that were present in the original
1923     utility but didn't matter because the program aborted.
1924    
1925     * test/test_range.py: Copied over tests from SciParam. Removed
1926     tests against importing. Fixes RTBug #1867.
1927    
1928 bh 958 2003-05-21 Bernhard Herzog <[email protected]>
1929    
1930     * test/test_load.py: Remove unused imports and restructure the
1931     test code
1932     (LoadSessionTest): Split into one class for each test and turn
1933     LoadSessionTest itself into the base class for all such session
1934     tests.
1935     (ClassificationTest): New base class for load tests that test
1936     classifications
1937     (TestSingleLayer, TestLayerVisibility, TestClassification)
1938     (TestLabels, TestLayerProjection, TestRasterLayer): New classes
1939     for the individual tests
1940    
1941     * test/support.py (FileLoadTestCase.filename): New base class for
1942     file loading tests
1943    
1944 jan 955 2003-05-21 Jan-Oliver Wagner <[email protected]>
1945    
1946     * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
1947     Mercator' to 'UTM Zone 32' as a more convenient example.
1948     Added 'Gauss Krueger Zone 6'.
1949    
1950     * Data/iceland_sample_raster.thuban: political polygon now
1951     filled transparent to have the raster image visible at once.
1952    
1953 frank 952 2003-05-21 Frank Koormann <[email protected]>
1954    
1955     * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
1956     OnClose() to keep in sync with extensions. Internally Thuban
1957     still uses "underscored" names.
1958    
1959 jonathan 949 2003-05-20 Jonathan Coles <[email protected]>
1960    
1961     This puts back Raster layer support. These layers support projections
1962     through the GDAL library. Currently, the CVS version is being used.
1963     There are no Debian packages available although this may change soon.
1964     A GDAL driver was extended to support writing to memory rather to
1965     files.
1966    
1967     There is still some work that needs to be done, such as some error
1968     handling when loading invalid images or when there is a problem
1969     projecting the image. This putback simply checks in the majority
1970     of the work.
1971    
1972     * setup.py: Add gdalwarp library extension.
1973    
1974     * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
1975     Defaults to False, but can be overridden by subclasses if they
1976     support classification.
1977     (RasterLayer): New. Defines a new layer that represents an
1978     image.
1979    
1980     * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
1981     tag handler.
1982     (SessionLoader.start_layer): Encode the filename.
1983     (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
1984     New. Supports reading a rasterlayer tag.
1985    
1986     * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
1987    
1988     * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
1989     get a string in Latin1. If we get such as string convert it to
1990     unicode first, otherwise leave if alone before encoding.
1991     (SessionSaver.write_layer): Add support for writing both Layers
1992     and RasterLayers.
1993    
1994     * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
1995     The right argument may not be a string, it could also be a Column.
1996    
1997     * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
1998     Make initial window size 600x400. Fixes RTBug #1872.
1999    
2000     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
2001     the dialog is constructed so that we can support layers that
2002     do not have classifications.
2003     (Classifier._OnTry): Only build a classification if the layer
2004     supports one.
2005    
2006     * Thuban/UI/legend.py: Change all checks that a layer is an
2007     instance of Layer into checks against BaseLayer.
2008     (LegendTree.__FillTreeLayer): Only add children to a branch if
2009     the layer supports classification.
2010    
2011     * Thuban/UI/mainwindow.py (MainWindow.NewSession,
2012     MainWindow.OpenSession): Don't proceed with an action if the
2013     user chooses Cancel when they are asked to save changes.
2014     (MainWindow.AddRasterLayer): New. Open a dialog to allow the
2015     user to select an image file. Create a new RasterLayer and add
2016     it to the map.
2017    
2018     * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
2019     for rendering RasterLayer layers.
2020     (MapRenderer.draw_raster_layer): Actually method that calls
2021     the GDALWarp python wrapper and constructs an image from the
2022     data returned.
2023    
2024     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
2025     Choices symbols to match those used in the table query method.
2026     Replace deprecated method calls on table with new method names.
2027    
2028     * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
2029     how small the scale can get. This still needs more testing.
2030    
2031     * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
2032     Provides a driver to output in .bmp format.
2033    
2034     * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
2035     New. Provides IO routines which write to memory, rather than a file.
2036    
2037     * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
2038     of the gdalwarp utility provided in GDAL. Added function calls
2039     that can be accessed from python.
2040    
2041     * Data/iceland_sample_raster.thuban: New. Sample file that uses
2042     a raster layer.
2043    
2044     * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
2045     layer image data.
2046    
2047     * Doc/thuban.dtd: Added rasterlayer attribute definition.
2048    
2049     * test/test_layer.py, test/test_load.py, test/test_save.py: Added
2050     tests associated with the raster layer code.
2051    
2052     * test/test_transientdb.py
2053     (TestTransientTable.test_auto_transient_table_query): Added a test
2054     for using a Column object as the "right" parameter to a query.
2055    
2056 frank 924 2003-05-19 Frank Koormann <[email protected]>
2057    
2058 frank 927 * Thuban/version.py (get_changelog_date):
2059     Catch exceptions if ChangeLog does not exist.
2060    
2061     * Thuban/UI/view.py (MapCanvas.Export): Bugfix
2062    
2063     2003-05-19 Frank Koormann <[email protected]>
2064    
2065 frank 924 Extended version information for Thuban
2066    
2067     * Thuban/version.py: New, version information for Thuban: Last
2068     modification date and last ChangeLog entry date.
2069    
2070     * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
2071     information: Display Thuban, wxPython and Python version.
2072    
2073 bh 919 2003-05-16 Bernhard Herzog <[email protected]>
2074    
2075 bh 921 * Thuban/Model/save.py: Remove some unused imports including the
2076     __future__ import for nested_scopes as Thuban relies on Python 2.2
2077     now.
2078     (XMLWriter.encode): Remove the special case for a None argument.
2079     In the saver encode is always called with a string argument.
2080    
2081     2003-05-16 Bernhard Herzog <[email protected]>
2082    
2083 bh 919 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
2084     in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
2085     of the bug was that e.g. float("1.2") would fail. Thuban now
2086     requires 2.4.x.
2087    
2088 frank 917 2003-05-16 Frank Koormann <[email protected]>
2089    
2090     Printing enhancement and WMF export (under Win32)
2091    
2092     * Thuban/UI/renderer.py (ExportRenderer): New, derived from
2093     ScreenRenderer. Renders Map, Legend and Scalebar for export.
2094     (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
2095     PrintRender.
2096    
2097     * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
2098     to fullfil information needed for PrinterRenderer.
2099     (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
2100     (MapCanvas.Print): Adapted to new MapPrintout.
2101     (OutputTransform): General calculations to transform from canvas
2102     coordinates to export/printing devices.
2103    
2104     * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
2105     new method_command to call ExportMap, with platform dependency (only
2106     __WXMSW__)
2107    
2108     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
2109     of scalebar drawing area as new parameters.
2110    
2111     * Thuban/Model/scalebar.py (roundInterval): round long instead of int
2112    
2113     * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
2114     Update to extended scalebar.DrawScalebar header.
2115    
2116     * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
2117    
2118     * test/test_scalebar.py: Made test executable as standalone.
2119    
2120 bh 908 2003-05-16 Bernhard Herzog <[email protected]>
2121    
2122     * Thuban/Model/table.py (Table): Remove this compatibility alias
2123     for DBFTable.
2124    
2125     * test/test_table.py: Import DBFTable as Table because that alias
2126     doesn't exist anymore.
2127    
2128     * Thuban/UI/classgen.py: Remove some unused imports
2129    
2130 jonathan 906 2003-05-14 Jonathan Coles <[email protected]>
2131    
2132     * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
2133     Fix docstring.
2134     (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
2135     (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
2136     values of the supplied range to determine the beginning and end
2137     bounds of the generated classes.
2138    
2139     * Thuban/Model/range.py (Range.number_re): Now accepts floats that
2140     do not have a leading 0 (.5 is now accepted as well as 0.5).
2141    
2142     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
2143     call to ClassGenerator.GenUniformDistribution.
2144    
2145     * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
2146     layout bug with the 'Projection' label.
2147    
2148     * test/support.py (FloatTestCase): New. Needed for the Range tests.
2149    
2150     * test/test_range.py: New. Imported from SciParam.
2151    
2152 jonathan 897 2003-05-12 Jonathan Coles <[email protected]>
2153    
2154 jonathan 899 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
2155     to table.UniqueValues() with calls that retrieve all the values
2156     from the table. This will need to be replaced by a method on table
2157     which can simply return the list (perhaps more efficiently).
2158    
2159     2003-05-12 Jonathan Coles <[email protected]>
2160    
2161 jonathan 897 The return value of ClassGenerator.CalculateQuantiles has changed.
2162     Refer to the documentation for details.
2163    
2164     * test/test_classgen.py: Modified Quantile tests to use the
2165     new return values.
2166    
2167     * Thuban/Model/classgen.py
2168     (ClassGenerator.GenQuantiles): Add comments describing the parameters,
2169     use new return values from CalculateQuantiles to produce the correct
2170     range bounds in the Classification.
2171     (ClassGenerator.CalculateQuantiles): Add more comments describing
2172     the return values and parameters. Make minor adjustments to improve
2173     the legibility of the code. Fix problem with adjusted not being set
2174     in most cases.
2175    
2176 frank 893 2003-05-12 Frank Koormann <[email protected]>
2177    
2178     * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
2179     and latin1. Fixes #1851 finally.
2180    
2181 jonathan 889 2003-05-09 Jonathan Coles <[email protected]>
2182    
2183 jonathan 897 * test/test_classgen.py: New. Tests the Quantile algorithm.
2184    
2185     * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
2186     Clean up debugging statement, add comments, fix a small bug in the
2187     returned adjusted percentiles.
2188    
2189     2003-05-09 Jonathan Coles <[email protected]>
2190    
2191 jonathan 889 Introduces Range class from SciParam into the ClassGroupRange class,
2192     and such ranges can now be saved and loaded from disk.
2193    
2194     Quantiles are now available in the Classification Generator.
2195    
2196     Initial support for building Queries on a table. Doesn't do anything
2197     but run some tests.
2198    
2199     * Thuban/Model/classification.py: Explicit imports.
2200     (ClassGroupRange): Use the Range class to store the underlying
2201     range information. The interface remains the same, except for
2202     GetRange(), and you can also supply a Range object as the min
2203     parameter to SetRange or __init__.
2204    
2205     * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
2206     string appropriately for use in Thuban. Fixes RTbug #1851.
2207     (SessionLoader.end_projection): Handle the context of the
2208     projection tag a bit better by looking at what objects are not
2209     None. There was an assumption that a projection tag for a map
2210     could occur before any layers.
2211     (SessionLoader.start_clrange): Provide backward compatibility for
2212     reading min/max values as well as the new range parameter.
2213    
2214     * Thuban/Model/map.py: Explicit imports.
2215    
2216     * Thuban/Model/resource.py: Import _.
2217     (ProjFileSaver.write): write header using projfile.dtd.
2218    
2219     * Thuban/Model/save.py: Explicit imports.
2220     (XMLWriter.encode): New. Encode the given string from a format
2221     used by Thuban into UTF-8. Fixes RTbug #1851.
2222    
2223     * Thuban/UI/classgen.py: Explicit imports.
2224     (ClassGenDialog.__init__): Clean up the code and add support
2225     for Quantiles.
2226     (ClassGenDialog.OnOK): Add support for Quantiles.
2227     (GenQuantilesPanel): New. Input panel for Quantiles.
2228     (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
2229     GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
2230    
2231     * Thuban/Model/classgen.py: New. Contains all the classes named above.
2232    
2233     * Thuban/UI/classifier.py: Explicit imports.
2234     (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
2235     ClassTable.SetValueAsCustom): Reworked to use new Range class.
2236    
2237     * Thuban/UI/legend.py: Explicit imports.
2238    
2239     * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
2240     a Table menu and associated method calls.
2241     (MainWindow.choose_color): Removed. No longer needed.
2242    
2243     * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
2244     should be disabled if no projection is selected in the available
2245     list.
2246    
2247     * Thuban/UI/renderer.py: Explicit imports.
2248    
2249     * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
2250     with correctly selecting the rows and issuing the right events.
2251     Be sure to call Skip() to allow the grid to do some of its own
2252     handling which allows the rows to actually be selected.
2253     (LayerTableGrid.select_shapes): Rename from select_shape. Supports
2254     selecting multiple shapes.
2255     (LayerTableFrame): Support for building Queries.
2256     (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
2257    
2258     * Thuban/UI/tree.py: Explicit imports.
2259    
2260     * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
2261     table view can call it.
2262    
2263     * test/test_classification.py: Explicit imports.
2264     (TestClassification.test_ClassGroupRange): Fix test for new
2265     Range class.
2266    
2267     * Doc/thuban.dtd: Add range parameter for clrange.
2268    
2269     * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
2270     object in ClassGroupRange, and also uesd for inputting ranges in
2271     the classifer table and elsewhere.
2272    
2273     * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
2274     yet.
2275    
2276 frank 872 2003-05-09 Frank Koormann <[email protected]>
2277    
2278     * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
2279    
2280 frank 860 2003-05-08 Frank Koormann <[email protected]>
2281    
2282 frank 870 Coding style updates
2283    
2284     * test/test_scalebar.py: Replaced tab indentation by spaces.
2285    
2286     * Thuban/UI/scalebar.py: Explicit imports.
2287    
2288     2003-05-08 Frank Koormann <[email protected]>
2289    
2290 frank 867 * Thuban/UI/scalebar.py
2291     (ScaleBar.DrawScalebar): Format string bug fixed.
2292    
2293     2003-05-08 Frank Koormann <[email protected]>
2294    
2295 frank 865 Reorganization of scalebar component (no wx in Thuban/Model)
2296    
2297     * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
2298     (deriveInterval):
2299     Calculate scalebar interval and unit which fits in width for scale.
2300     (roundInterval): Round float.
2301    
2302     * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
2303    
2304     * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
2305    
2306     * Thuban/UI/legend.py: Import Thuban.UI.scalebar
2307    
2308     2003-05-08 Frank Koormann <[email protected]>
2309    
2310 frank 860 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
2311     Initialize ScaleBar with canvas.map
2312    
2313     * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
2314     round intervals to display smarter lengths
2315     (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
2316     layer. If the maps has no projection applied grey the scalebar.
2317    
2318 frank 857 2003-05-07 Frank Koormann <[email protected]>
2319    
2320     Basic Scalebar features added.
2321    
2322     * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
2323    
2324     * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
2325     (ScaleBarBitmap): New, links the scalebar bitmap with view messages
2326     and the renderer.
2327    
2328     * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
2329    
2330     * Thuban/UI/messages.py: SCALE_CHANGED added.
2331    
2332 bh 850 2003-05-07 Bernhard Herzog <[email protected]>
2333    
2334 bh 852 * Thuban/Model/session.py (Session.__init__): New instance
2335     variable shapestores to hold a list of all open shapestore objects
2336     (Session.ShapeStores): New. Accessor method for the shapestores
2337     list.
2338     (Session._add_shapestore, Session._clean_weak_store_refs): New.
2339     Internal methods to maintain the shapestores list.
2340     (Session.Tables): New. Return all tables open in the session.
2341     (Session.OpenShapefile): Insert the new ShapeStore into the
2342     shapestores list.
2343    
2344     * test/test_session.py (TestSessionSimple.test_initial_state): Add
2345     tests for ShapeStores and Tables
2346     (TestSessionWithContent.test_shape_stores)
2347     (TestSessionWithContent.test_tables): New. Test cases for
2348     ShapeStores and Tables
2349    
2350     2003-05-07 Bernhard Herzog <[email protected]>
2351    
2352 bh 850 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
2353     Add comments about the optimizations used.
2354     (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
2355     Implement the ReadValue table interface method.
2356    
2357     * test/test_transientdb.py
2358     (TestTransientTable.run_iceland_political_tests)
2359     (TestTransientTable.test_transient_joined_table): Add tests for
2360     ReadValue
2361    
2362 frank 848 2003-05-07 Frank Koormann <[email protected]>
2363    
2364     * Resources/Bitmaps/fulllayerextent.xpm,
2365     Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
2366     new icons.
2367    
2368 bh 840 2003-05-06 Bernhard Herzog <[email protected]>
2369    
2370 bh 846 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
2371     New. Simply delegate to the transient table's version.
2372    
2373     * test/test_transientdb.py
2374     (TestTransientTable.test_auto_transient_table_query): New. Test
2375     case for AutoTransientTable's SimpleQuery
2376    
2377     2003-05-06 Bernhard Herzog <[email protected]>
2378    
2379 bh 843 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
2380     Implement a simple query method for the query dialog
2381     (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
2382     the row index or shapeid.
2383     (TransientTable.create): Insert the right value of the row index
2384     (TransientJoinedTable.create): Copy the row index of the left
2385     table to the joined result table
2386    
2387     * test/test_transientdb.py
2388     (TestTransientTable.test_transient_table_read_twice): Fix
2389     doc-string
2390     (TestTransientTable.test_transient_table_query): New. Test for the
2391     SimpleQuery method
2392    
2393     2003-05-06 Bernhard Herzog <[email protected]>
2394    
2395 bh 840 Convert all table users to use the new table interface. This only
2396     covers Thuban itself, not GREAT-ER or other applications built on
2397     Thuban yet, so the compatibility interface stays in place for the
2398     time being but it now issues DeprecationWarnings.
2399    
2400     Finally, the new Table interface has a new method, HasColumn.
2401    
2402     * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
2403     issue deprecation warnings when they're. The warnings refer to the
2404     caller of the method.
2405     (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
2406     for the deprecation warnings
2407    
2408     * test/test_table.py: Ignore the deprecation warnings for the old
2409     table in the tests in this module. The purpose of the tests is to
2410     test the old interface, after all.
2411    
2412     * test/test_transientdb.py
2413     (TestTransientTable.run_iceland_political_tests): Use the
2414     constants for the types. Add a test for HasColumn
2415     (TestTransientTable.test_transient_joined_table): Adapt to new
2416     table interface. Add a test for HasColumn
2417     (TestTransientTable.test_transient_table_read_twice): Adapt to new
2418     table interface
2419    
2420     * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
2421     Adapt to new table interface
2422    
2423     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
2424     new table interface
2425    
2426     * Thuban/UI/controls.py (RecordListCtrl.fill_list)
2427     (RecordTable.SetTable): Adapt to new table interface
2428    
2429     * Thuban/UI/classifier.py (Classifier.__init__)
2430     (Classifier.__init__): Adapt to new table interface
2431    
2432     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2433     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
2434     to new table interface
2435    
2436     * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
2437     (AutoTransientTable.HasColumn): Implement the new table interface
2438     method
2439     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
2440     (AutoTransientTable.UniqueValues): Adapt to new table interface
2441    
2442     * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
2443     Adapt to new table interface
2444    
2445     * test/test_layer.py (TestLayer.open_shapefile): Helper method to
2446     simplify opening shapefiles a bit easier.
2447     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2448     (TestLayer.test_point_layer): Use the new helper method
2449     (TestLayer.test_get_field_type): New. Test for the GetFieldType
2450     method
2451    
2452     * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
2453     the new table method
2454    
2455     * test/test_memory_table.py (TestMemoryTable.test_has_column):
2456     Test for the new table method HasColumn
2457    
2458 jonathan 833 2003-05-06 Jonathan Coles <[email protected]>
2459    
2460     Addresses the "Selection Extent" wish of RTbug #1787.
2461    
2462     * Resources/Bitmaps/fulllayerextent.xpm,
2463     Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
2464     extent. These are just place holders for the real bitmaps.
2465    
2466     * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
2467     calculate the bounding box once (the first time compute_bbox() is
2468     called).
2469     (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
2470     the bounding box for the shapes in lat/long coordinates.
2471    
2472     * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
2473     option.
2474     (MainWindow.has_selected_shapes): New. Returns true if there are
2475     any selected shapes.
2476     (MainWindow.FullSelectionExtent): New. Calls
2477     MapCanvas.FitSelectedToWindow() when the user selects the menu option.
2478     (_has_selected_shapes): New. Returns true if there are any
2479     selected shapes.
2480    
2481     * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
2482     true if there are any selected shapes.
2483    
2484     * Thuban/UI/view.py (MapCanvas): Added delegated method
2485     HasSelectedShapes.
2486     (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
2487     shapes on the canvas using the map projection (if any).
2488    
2489     * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
2490     for Layer.ShapesBoundingBox().
2491    
2492 bh 826 2003-05-06 Bernhard Herzog <[email protected]>
2493    
2494     * Resources/Projections/defaults.proj: Fix spelling of Mercator
2495    
2496 jonathan 823 2003-05-05 Jonathan Coles <[email protected]>
2497    
2498     Addresses the "Full Layer Extent" wish of RTbug #1787.
2499    
2500     * Resources/Projections/defaults.proj: Added UK National Grid.
2501    
2502     * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
2503     (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
2504     when the user selects the menu option.
2505    
2506     * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
2507     scales the given layer on the canvas using the map projection.
2508    
2509 bh 819 2003-05-05 Bernhard Herzog <[email protected]>
2510    
2511     Convert the table implementations to a new table interface. All
2512     tables use a common mixin class to provide backwards compatibility
2513     until all table users have been updated.
2514    
2515     * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
2516     provide backwards compatibility for table classes implementing the
2517     new interface
2518     (DBFTable, MemoryTable): Implement the new table interface. Use
2519     OldTableInterfaceMixin as base for compatibility
2520     (DBFColumn, MemoryColumn): New. Column description for DBFTable
2521     and MemoryTable resp.
2522    
2523     * test/test_dbf_table.py: New. Test cases for the DBFTable with
2524     the new table interface.
2525    
2526     * test/test_memory_table.py: New. Test cases for the MemoryTable
2527     with the new table interface.
2528    
2529     * test/test_table.py: Document the all tests in this file as only
2530     for backwards compatibility. The equivalent tests for the new
2531     interface are in test_memory_table.py and test_dbf_table.py
2532     (MemoryTableTest.test_read): field_info should be returning tuples
2533     with four items
2534     (MemoryTableTest.test_write): Make doc-string a more precise.
2535    
2536     * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
2537     table interface. Derive from from OldTableInterfaceMixin for
2538     compatibility.
2539     (TransientTableBase.create): New intance variable column_map to
2540     map from names and indices to column objects
2541     (TransientTable.create): Use the new table interface of the input
2542     table
2543     (AutoTransientTable): Convert to new table interface. Derive from
2544     from OldTableInterfaceMixin for compatibility.
2545     (AutoTransientTable.write_record): Removed. It's not implemented
2546     yet and we still have to decide how to handle writing with the new
2547     table and data framework.
2548    
2549     * test/test_transientdb.py
2550     (TestTransientTable.run_iceland_political_tests)
2551     (TestTransientTable.test_transient_joined_table): Use the new
2552     table interface
2553    
2554 jonathan 817 2003-05-05 Jonathan Coles <[email protected]>
2555    
2556     This is namely a collection of UI updates to improve user interactivity.
2557     Tabbing between controls now exists and you can use ESC to close dialog
2558     boxes; ENTER will active the default button.
2559    
2560     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
2561     order that the controls are created so that tabbing works correctly.
2562     (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
2563     wxDialog can handle the default button correctly.
2564     (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
2565     same reasons as for OnOK.
2566     (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
2567     when we ask the table for the maximum/minimum values of a field
2568     which could take a very long time.
2569    
2570     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
2571     order that the controls are created so that tabbing works correctly.
2572     (SelectPropertiesDialog.__init__): Rearrange the order that the
2573     controls are created so that tabbing works correctly.
2574    
2575     * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
2576     to derive from a wxDialog but behave like the original implementation
2577     which was derived from a wxFrame. wxDialog provides useful key
2578     handling functionality like ESC calling OnCancel and ENTER calling
2579     OnOK which is lost with wxFrame.
2580    
2581     * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
2582     new dialogs.
2583    
2584     * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
2585     order that the controls are created so that tabbing works correctly.
2586     (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
2587     (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
2588     (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
2589     (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
2590     can provide the "UK National Grid" as a default projection.
2591     (UTMPanel.__init__): Rearrange the order that the controls are
2592     created so that tabbing works correctly.
2593    
2594 bh 809 2003-05-05 Bernhard Herzog <[email protected]>
2595    
2596 bh 811 * extensions/thuban/wxproj.cpp: Fix some of the comments.
2597     (project_point): If a map projection but no layer projection is
2598     given, convert degrees to radians before applying the map
2599     projection.
2600    
2601 bh 809 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
2602     (TableGrid.allow_messages): New methods to make it possible to
2603     inhibit message sending.
2604     (TableGrid.issue): Only send the message if not inhibited.
2605     (LayerTableGrid.select_shape): Use the new methods to make sure
2606     that no ROW_SELECTED message is sent while we're updating the
2607     selected rows to match the selected shapes.
2608    
2609 jan 807 2003-05-02 Jan-Oliver Wagner <[email protected]>
2610    
2611     Implementation of MemoryTable.
2612    
2613     * Thuban/Model/table.py (MemoryTable): New. Quite simple table
2614     implementation that operates on a list of tuples. All of the data
2615     are kept in the memory.
2616    
2617     * test/test_table.py (MemoryTableTest): New.
2618    
2619     * test/test_transientdb.py (SimpleTable): Removed.
2620     (TestTransientTable.test_transient_joined_table,
2621     (TestTransientTable.test_transient_table_read_twice): Replaced
2622     SimpleTable by MemoryTable.
2623    
2624 jonathan 793 2003-04-30 Jonathan Coles <[email protected]>
2625    
2626 jonathan 803 * Data/iceland_sample.thuban: Now contains correct projections
2627     for each of the layers.
2628    
2629     * Resources/Projections/defaults.proj: Geographic projection
2630     contains unit conversion parameter.
2631    
2632     2003-04-30 Jonathan Coles <[email protected]>
2633    
2634 jonathan 793 The most important part of this putback is the projection changes.
2635     It should now be possible to specify the projection that a layer
2636     is in and then specify a different projection for the map. The
2637     projection dialog has an extra parameter for a geographic projection
2638     which lets the user select if the input is in degrees or radians.
2639    
2640     * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
2641     to say that the parameter is a tuple of unprojected
2642     points (which is what the callers to this method were assuming).
2643     Also, since the points are unprojected we need to projected them.
2644    
2645     * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
2646     LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
2647     groups are selected, move the layer up/down. Fixes RTbug #1833.
2648    
2649     * Thuban/UI/mainwindow.py: Move menu item map_rename up.
2650    
2651     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
2652     parameter in call to SetClientData.
2653     (GeoPanel): Add support for selecting the units that the
2654     source data is in (Radians or Degrees).
2655    
2656     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
2657     the rendering loop by reducing the number of if's, removing the
2658     unnecessary try/except block, and checking if the old group
2659     is the same as the new one (which happens a lot if there is
2660     no classification, or lots of shapes are in the same group).
2661    
2662     * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
2663     around the redraw routine to try to catch problems that the user
2664     may create by selecting invalid projections for the data set and
2665     map. Clears the display if there are any problems and prints the
2666     error.
2667     (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
2668     rectangle.
2669    
2670     * extensions/thuban/wxproj.cpp (project_point): First invert the
2671     supplied point (which should be in projected coordinates) using
2672     the layer's projection and then project the point using the
2673     map's projection.
2674     (project_points): Use project_point() to project each point.
2675    
2676 jan 792 2003-04-30 Jan-Oliver Wagner <[email protected]>
2677    
2678     * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
2679     don't set the Classification to None if the classfication field
2680     is None (ie only a DEFAULT).
2681    
2682 bh 786 2003-04-30 Bernhard Herzog <[email protected]>
2683    
2684 bh 790 * Thuban/UI/view.py: Fix some typos.
2685    
2686 bh 788 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
2687     not pop up the dialog if the selection becomes empty (this could
2688     happen if e.g. a new selection is opened while the identify tool
2689     is active and dialog had been closed)
2690    
2691     2003-04-30 Bernhard Herzog <[email protected]>
2692    
2693 bh 786 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
2694     instance variable read_record_last_result
2695     (TransientTableBase.read_record): Make sure reading the same
2696     record twice works. The implementation uses the new instance
2697     variable read_record_last_result
2698    
2699     * test/test_transientdb.py
2700     (TestTransientTable.test_transient_table_read_twice): New test
2701     case for the above bug-fix.
2702    
2703 jonathan 793 2003-04-29 Jonathan Coles <[email protected]>
2704    
2705     * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
2706    
2707     * Thuban/UI/classgen.py: Remove all uses of Str2Num.
2708    
2709     * Thuban/UI/classifier.py: Remove all uses of Str2Num.
2710     (ClassTable.SetValueAsCustom): Rename keyword argument in
2711     ClassGroup* constructors to match argument name.
2712    
2713 bh 779 2003-04-29 Bernhard Herzog <[email protected]>
2714    
2715     * Thuban/Model/session.py (Session.Destroy): Explicitly close the
2716     transient DB if it exists to make sure it doesn't leave a journal
2717     file in the temp directory.
2718    
2719     * Thuban/Model/transientdb.py (TransientDatabase.close): Set
2720     self.conn to None after closing the connection to make sure it's
2721     not closed twice
2722    
2723 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
2724    
2725 jonathan 769 Add a visible parameter in the layer XML tag. The default value is
2726     "true". If anything other than "false" is specified we also assume
2727 jonathan 776 "true". Addresses RTbug #1025.
2728 jonathan 769
2729     * Doc/thuban.dtd: Add visible parameter to a layer.
2730    
2731     * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
2732     of visible from 1 to True.
2733     (Layer.__init__): Change default value of visible from 1 to True.
2734    
2735     * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
2736     parameter.
2737    
2738     * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
2739     parameter.
2740    
2741     * test/test_load.py: Add new test data contents_test_visible.
2742     (LoadSessionTest.setUp): save test data.
2743     (LoadSessionTest.testLayerVisibility): Test if the visible flag
2744     is loaded correctly.
2745    
2746     * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
2747     for saving an invisible layer.
2748    
2749     2003-04-29 Jonathan Coles <[email protected]>
2750    
2751 jonathan 767 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
2752     legend dialog box and tell it to change its map to the one
2753     supplied to SetMap(). Fixes RTbug #1770.
2754    
2755 bh 764 2003-04-29 Bernhard Herzog <[email protected]>
2756    
2757 bh 766 Next step of table implementation. Introduce a transient database
2758     using SQLite that some of the data is copied to on demand. This
2759     allows us to do joins and other operations that require an index
2760     for good performance with reasonable efficiency. Thuban now needs
2761     SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
2762     haven't tested that.
2763    
2764     * Thuban/Model/transientdb.py: New. Transient database
2765     implementation.
2766    
2767     * test/test_transientdb.py: New. Tests for the transient DB
2768     classes.
2769    
2770     * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
2771     classes to help automatically remove temporary files and
2772     directories.
2773     (Session.__init__): New instance variables temp_dir for the
2774     temporary directory and transient_db for the SQLite database
2775     (Session.temp_directory): New. Create a temporary directory if not
2776     yet done and return its name. Use AutoRemoveDir to have it
2777     automatically deleted
2778     (Session.TransientDB): Instantiate the transient database if not
2779     done yet and return it.
2780    
2781     * Thuban/Model/data.py (ShapefileStore.__init__): Use an
2782     AutoTransientTable so that data is copied to the transient DB on
2783     demand.
2784     (SimpleStore): New class that simply combines a table and a
2785     shapefile
2786    
2787     * Thuban/Model/table.py (Table, DBFTable): Rename Table into
2788     DBFTable and update its doc-string to reflect the fact that this
2789     is only the table interface to a DBF file. Table is now an alias
2790     for DBFTable for temporary backwards compatibility.
2791    
2792     * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
2793     the last reference to the session goes away so that the temporary
2794     files are removed properly.
2795    
2796     * test/test_load.py (LoadSessionTest.tearDown): Remove the
2797     reference to the session to make sure the temporary files are
2798     removed.
2799    
2800     2003-04-29 Bernhard Herzog <[email protected]>
2801    
2802 bh 764 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
2803     the __parser instance variable into a normal local variable in
2804     read. It's only used there and read will never be called more than
2805     once. Plus it introduces a reference cycle that keeps can keep the
2806     session object alive for a long time.
2807    
2808 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
2809 jonathan 735
2810 jonathan 762 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
2811     Projection an immutable item. Fixes RTbug #1825.
2812     (Projection.__init__): Initialize instance variables here.
2813     (ProjFile.Replace): New. Replace the given projection object with
2814     the new projection object. This solves the problem of needing the
2815     mutator Projection.SetProjection() in the ProjFrame class and
2816     allows a projection to change parameters without changing its
2817     location in the file.
2818    
2819     * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
2820     be of type wxSAVE and should verify overwriting a file.
2821    
2822     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
2823     ProjFile.Replace() method instead of the mutator
2824     Projection.SetProjection(). Also requires that we reassign the
2825     client data to the new projection.
2826    
2827     * test/test_proj.py (TestProjection.test): Test GetName() and
2828     GetAllParameters()
2829     (TestProjFile.test): Remove tests for Set*() methods. Add tests
2830     for Replace().
2831    
2832     2003-04-25 Jonathan Coles <[email protected]>
2833    
2834 jonathan 756 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
2835     to save the name of the projection.
2836    
2837     * test/test_save.py (SaveSessionTest.testLayerProjection): New
2838     test to verify layer projections are saved correctly.
2839    
2840     2003-04-25 Jonathan Coles <[email protected]>
2841    
2842 jonathan 753 * Thuban/Model/proj.py (Projection.SetName): Set the name
2843     to "Unknown" if name is None.
2844     (Projection.SetAllParameters): New. Set the projection's
2845     parameter list to the one supplied.
2846     (Projection.SetProjection): New. Set the projection's
2847     properties to those of the supplied Projection.
2848    
2849     * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
2850     the dialog title to include the map's title.
2851     (MainWindow.LayerProjection): Set the dialog title to include
2852     the layer's title.
2853    
2854     * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
2855     error dialogs into a single method call.
2856     (ProjFrame.__VerifyButtons): Add more states to check.
2857     (ProjFrame.__GetProjection): Return the current state of an
2858     edited projection or None.
2859     (ProjFrame.__FillAvailList): Remove checks for states that
2860     shouldn't exist.
2861     (ProjFrame._OnNew): Clear all selected items and supply
2862     a projection panel if necessary.
2863    
2864     * test/test_proj.py (TestProjFile.test): Add tests for
2865     ProjFile.SetAllParameters, ProjFile.SetProjection,
2866     ProjFile.SetName.
2867    
2868     2003-04-25 Jonathan Coles <[email protected]>
2869    
2870 jonathan 748 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
2871     takes an optional argument to select the current projection.
2872     This does not guarantee that the item is visible due to
2873     limited wxWindows functionality. Fixes RTBug #1821.
2874    
2875     2003-04-25 Jonathan Coles <[email protected]>
2876    
2877 jonathan 743 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
2878     the projection name and use it when constructing the Projection
2879     object.
2880    
2881     * Thuban/Model/proj.py (Projection.__init__): Change the default
2882     value for 'name' to None and then test if name is equal to None
2883     in the body of the constructor. This way the caller doesn't have to
2884     know what the default value should be. Namely, useful in load.py
2885     where we have to pick a default value if the 'name' parameter
2886     doesn't exist in the XML file.
2887    
2888     * test/test_load.py (LoadSessionTest.testLayerProjection): New.
2889     Tests a file where a layer has a projection.
2890    
2891     2003-04-25 Jonathan Coles <[email protected]>
2892    
2893 jonathan 735 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
2894     tree for projection information.
2895    
2896     * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
2897     XMLReader.GetFileName.
2898     (SessionLoader): Added support for loading projection tags that
2899     appear inside a layer.
2900    
2901     * Thuban/Model/proj.py (ProjFile): Document the class. Move
2902     back to using a list because the order of the projections in
2903     the file is important to maintain. Fixes RTbug #1817.
2904    
2905     * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
2906     to ProjFile.GetFilename.
2907    
2908     * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
2909     information.
2910    
2911     * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
2912     ProjFrame._OnSaveAs. Removed old dead code from previous
2913     implementation.
2914     (ProjFrame._OnExport): Add support for exporting more than one
2915     projection to a single file.
2916     (ProjFrame.__FillAvailList): use string formatting (% operator)
2917     to build strings that are (partly) translated. Fixes RTbug #1818.
2918    
2919     * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
2920     class.
2921    
2922 bh 734 2003-04-24 Bernhard Herzog <[email protected]>
2923    
2924     * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
2925    
2926     * po/fr.po: New. French translation by Daniel Calvelo Aros
2927    
2928     * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
2929     empty strings.
2930    
2931 jonathan 735 2003-04-24 Jonathan Coles <[email protected]>
2932 jonathan 724
2933     * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
2934     implement the interface that the ProjFrame dialog expects.
2935    
2936     * Thuban/Model/proj.py (Projection.SetName): New. Allows the
2937     name of the projection to be changed.
2938     (ProjFile): Use a dictionary instead of a list so that removing
2939     projections is easier and we are sure about uniqueness.
2940     (ProjFile.Remove): Remove the given projection object.
2941    
2942     * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
2943     Return a list with only one projection file instead of searching for
2944     any projection file. This simplifies many things if the user can
2945     only have one system file and one user file.
2946    
2947     * Thuban/UI/classgen.py: Change all references to
2948     genCombo to genChoice.
2949    
2950     * Thuban/UI/mainwindow.py: Add a Projection option under the
2951     layer menu.
2952     (MainWindow.LayerProjection): New. Open up a projection window
2953     for a layer.
2954    
2955     * Thuban/UI/projdialog.py: Large changes to how the dialog is
2956     laid out. Use three panels instead of one. One for the list of
2957     projections, one for the edit controls, and one for the buttons.
2958     Fixed resizing problems so that the dialog resizes correctly
2959     when the projection panel changes. Added import/export, save, and
2960     new buttons/functionality.
2961    
2962 bh 723 2003-04-24 Bernhard Herzog <[email protected]>
2963    
2964     First step towards table management. Introduce a simple data
2965     abstraction so that we replace the data a layer uses more easily
2966     in the next step.
2967    
2968     * Thuban/Model/data.py: New file with a simple data abstraction
2969     that bundles shapefile and dbffile into one object.
2970    
2971     * Thuban/Model/session.py (Session.OpenShapefile): New method to
2972     open shapefiles and return a shape store object
2973    
2974     * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
2975     object instead of a shapefile filename. This introduces a new
2976     instance variable store holding the datastore. For intermediate
2977     backwards compatibility keep the old instance variables.
2978     (open_shapefile): Removed. No longer needed with the shape store.
2979     (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
2980     get the shape store used by a layer.
2981     (Layer.Destroy): No need to explicitly destroy the shapefile or
2982     table anymore.
2983    
2984     * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
2985     (MainWindow.AddLayer): Use the session's OpenShapefile method to
2986     open shapefiles
2987    
2988     * Thuban/Model/load.py (ProcessSession.start_layer): Use the
2989     session's OpenShapefile method to open shapefiles
2990    
2991     * test/test_classification.py
2992     (TestClassification.test_classification): Use the session's
2993     OpenShapefile method to open shapefiles and build the filename in
2994     a more platform independed way
2995    
2996     * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
2997     Implement to have a session to use in the tests
2998     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
2999     (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
3000     session's OpenShapefile method to open shapefiles
3001     (TestLayerLegend.setUp): Instantiate a session so that we can use
3002     it to open shapefiles.
3003     (TestLayerLegend.tearDown): Make sure that all references to
3004     layers and session are removed otherwise we may get a resource
3005     leak
3006    
3007     * test/test_map.py (TestMapAddLayer.test_add_layer)
3008     (TestMapWithContents.setUp): Instantiate a session so that we can
3009     use it to open shapefiles.
3010     (TestMapWithContents.tearDown): Make sure that all references to
3011     layers, maps and sessions are removed otherwise we may get a
3012     resource leak
3013     ("__main__"): use support.run_tests() so that more info about
3014     uncollected garbage is printed
3015    
3016     * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
3017     session's OpenShapefile method to open shapefiles
3018     ("__main__"): use support.run_tests() so that more info about
3019     uncollected garbage is printed
3020    
3021     * test/test_selection.py (TestSelection.tearDown): Make sure that
3022     all references to the session and the selection are removed
3023     otherwise we may get a resource leak
3024     (TestSelection.get_layer): Instantiate a session so that we can
3025     use it to open shapefiles.
3026     ("__main__"): use support.run_tests() so that more info about
3027     uncollected garbage is printed
3028    
3029     * test/test_session.py (TestSessionBase.tearDown)
3030     (TestSessionWithContent.tearDown): Make sure that all references
3031     to the session and layers are removed otherwise we may get a
3032     resource leak
3033     (TestSessionWithContent.setUp): Use the session's OpenShapefile
3034     method to open shapefiles
3035    
3036 jonathan 721 2003-04-24 Jonathan Coles <[email protected]>
3037    
3038     * Thuban/Model/load.py (XMLReader.read): Should have been checking
3039     if the file_or_filename object had the 'read' attribute.
3040    
3041 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
3042    
3043 jonathan 720 * Thuban/Model/resource.py: Fixes RTbug #1813.
3044     (ReadProjFile): Add documentation about which exceptions are raised.
3045     Always pass the exceptions up to the caller.
3046     (GetProjFiles): If the directory can't be read return an empty list.
3047     If any of the proj files can't be read skip that file and go
3048     on to the next one.
3049    
3050     * test/test_proj.py: Added test cases to handle nonexistent files,
3051     unreadable files, and files that don't parse correctly.
3052    
3053     2003-04-23 Jonathan Coles <[email protected]>
3054    
3055 jonathan 716 Projection dialog. Allows the user to select from a list
3056     of projection templates and optionally edit them and save new ones.
3057    
3058     * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
3059     (ProjPanel): Base class for projection specific panels.
3060     (TMPanel): Projection panel for Transverse Mercartor.
3061     (UTMPanel): Projection panel for Universal Transverse Mercartor.
3062     (LCCPanel): Projection panel for Lambert Conic Conformal.
3063     (GeoPanel): Projetion panel for Geographic Projection.
3064    
3065     2003-04-23 Jonathan Coles <[email protected]>
3066    
3067 jonathan 715 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
3068     promote symmetry. There now exists XMLReader and XMLWriter.
3069     (XMLReader.read): New. Call to read the given file descriptor or
3070     filename.
3071     (XMLReader.close): New. Make sure the file is closed.
3072     (XMLReader.GetFileName): New. Return just the file name that is being
3073     read from.
3074     (XMLReader.GetDirectory): New. Return just the directory of the file
3075     that is being read.
3076     (XMLReader.AddDispatchers): New. Take a dictionary which contains
3077     the names of functions to call as the XML tree is parsed.
3078     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
3079     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
3080     (SessionLoader): Removed class variables start_dispatcher and
3081     end_dispatcher since this functionality is now part of a class
3082     instance. Fixes RTbug #1808.
3083     (SessionLoader.__init__): Add dispatcher functions.
3084     (load_xmlfile): Code was moved into the XMLReader.read().
3085     (load_session): Use modified SessionLoader.
3086    
3087     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
3088     map's projection.
3089    
3090     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
3091     GetAllParameters.
3092     (Projection.GetParameter): Returns the value for the given parameter.
3093    
3094     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
3095     (GetProjFiles): Renamed from GetProjections. Now returns a list
3096     of ProjFile objects.
3097     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
3098     a list of ProjFile objects whose files are not user defined.
3099     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
3100     list of ProjFile objects whose files are user defined.
3101     (ProjFileReader): Extend new XMLReader.
3102    
3103     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
3104     promote symmetry.
3105    
3106     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
3107     control instead of a wxComboBox. wxChoice controls do not generate
3108     events as the uses highlights possible choices which fixes problems
3109     with resizing the dialog when the use selects an option.
3110    
3111     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
3112     control instead of a wxComboBox.
3113    
3114     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
3115     dialog.
3116    
3117     * test/test_proj.py (TestProjection.test): New tests for GetParameter
3118     method.
3119    
3120 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
3121    
3122 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
3123     constants
3124    
3125 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
3126     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
3127    
3128 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
3129    
3130 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
3131     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
3132     anymore.
3133     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
3134     (Layer.ShapeType, Layer.Shape): No need to call
3135     self.open_shapefile since it's always called in __init__
3136    
3137 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
3138     In wxPython 2.4 there's no need to extend MainLoop anymore since
3139     wxPython itself makes sure OnExit is called.
3140    
3141 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
3142    
3143 jonathan 693 Initial putback of projection management code. Includes new
3144     classes to read and write projection files. The current load
3145     and save classes were abstracted a bit so they could be reused.
3146     The Projection class was extended to provide new methods and
3147     have a name.
3148    
3149     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
3150     general XML reading methods that were part of ProcessSession.
3151    
3152     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
3153     name.
3154     (ProjFile): New. Represents a file that contains projection
3155     information.
3156    
3157     * Thuban/Model/resource.py: New. Contains general utilities
3158     for read and writing projection files.
3159    
3160     * Thuban/Model/save.py (XMLSaver): New. Contains all the
3161     general XML writing methods that were part of SessionSaver.
3162     (SessionSaver): Renamed from Saver.
3163    
3164     * test/test_proj.py: New test cases for the projection
3165     file read and write functions.
3166    
3167     2003-04-16 Jonathan Coles <[email protected]>
3168    
3169 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
3170     in the ClassGroup*.__repr__() methods so it is clearer when
3171     a value is a string and when it is a number.
3172    
3173     * test/test_load.py: Rework the classification test to test
3174     that we can load old files.
3175     (testLabels): Test a file where the groups have labels.
3176    
3177 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
3178    
3179     Safer implementation of the performance enhancements of the
3180     low-level renderer:
3181    
3182     * extensions/thuban/wxproj.cpp (extract_projection)
3183     (extract_pointer): Rename extract_projection to extract_pointer
3184     and redefine its purpose to return the pointer stored in a CObject
3185     returned by the object's cobject method. Update all callers.
3186     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
3187     handling of these low-level parameters so that each s_draw_info
3188     instance is handled as a CObject at python level that also
3189     contains real references to the actual python objects which
3190     contain the values in the struct. Add free_draw_info as the
3191     destructor.
3192     (draw_polygon_shape): Add the py_draw_info parameter which must a
3193     cobject containing an s_draw_info pointer.
3194    
3195     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
3196     method to instantiat the low-level render parameter
3197     (MapRenderer.draw_shape_layer): Use the new method. Remove some
3198     commented out code.
3199     (MapRenderer.draw_polygon_shape): Make the first parameter not the
3200     layer but the low-level render parameter
3201     (ScreenRenderer.draw_shape_layer): Use the low-level render
3202     parameter.
3203    
3204 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
3205    
3206 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
3207     the ClassGroup* classes to make debugging a bit easier.
3208     (ClassGroup.SetLabel): Check that the string is an instance
3209     of StringTypes not StringType. Accounts for Unicode strings.
3210    
3211     * Thuban/Model/color.py: Implemented __repr__ to make
3212     debugging a bit easier.
3213    
3214     * Thuban/Model/save.py (Saver.write_classification): Need to
3215     save the group label.
3216    
3217     * test/test_load.py (testClassification): New. Loads the
3218     iceland_sample_test.thuban file and checks if it was loaded
3219     correctly.
3220    
3221     2003-04-15 Jonathan Coles <[email protected]>
3222    
3223 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
3224     to improve rendering performance by initializing the variables
3225     that are not change each time draw_polygon_shape() is called.
3226     The values are stored in a global struct draw_info.
3227     (draw_polygon_shape): Removed initialization code that is
3228     now in draw_polygon_init().
3229    
3230     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
3231 jonathan 674 drawing initialization call to draw_polygon_init()
3232     (MapRenderer.draw_polygon_shape): Use new signature of
3233     draw_polygon_shape.
3234 jonathan 673
3235 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
3236     weirdness by setting the range to (1, maxint).
3237 jonathan 673
3238 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
3239     instance variables private and optimize comparison operator
3240     by first checking if the color references are the same.
3241     (ClassGroupSingleton): Make instance variables private.
3242     (ClassGroupRange): Make instance variables private.
3243 jonathan 673
3244 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
3245    
3246 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
3247    
3248     First stab at internationalized messages:
3249    
3250     * Thuban/__init__.py (_): Implement the translation function for
3251     real using the python gettext module.
3252    
3253     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
3254     translate empty strings.
3255    
3256     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3257     Add a missing space to a warning message
3258    
3259     * po/README: New. Notes about the management of the translation
3260     files.
3261    
3262     * po/Makefile: New. Makefile to help manage the translation files.
3263    
3264     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
3265    
3266     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
3267     translations and support files in po/
3268    
3269     * setup.py (data_files): Add the *.mo files to the data_files too
3270    
3271     * README: Add note about the translations when building from CVS
3272    
3273 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
3274    
3275     * Thuban/UI/dock.py: Fixes some window resizing problems most
3276     noticable under windows. Always assume the button bitmaps will
3277     be there. Code clean up.
3278     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
3279     images for the dock/undock button to the same images.
3280     Work around for RTbug #1801.
3281    
3282     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
3283     be allowed to grow within the sizer. Fixes a bug under Windows
3284     where the toolbar wasn't being drawn.
3285    
3286 frank 664 2003-04-14 Frank Koormann <[email protected]>
3287    
3288     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
3289     Updated design to try to make the button functionality more
3290     transparent.
3291    
3292 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
3293    
3294     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
3295     finalize the intialization of the panel.
3296    
3297     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
3298     creation of the panel. Should be the last thing called in the
3299     initializer of a subclass.
3300    
3301     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
3302     set the current selections in the combo boxes. This is needed
3303     under Windows.
3304    
3305     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
3306     level panel to the dialog so that the background colors are
3307     consistent under Windows.
3308    
3309 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
3310    
3311 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
3312     not black.
3313    
3314     * Thuban/UI/legend.py: Enable/disable the legend buttons when
3315     the legend changes. Fixes RTbug #1793.
3316    
3317     * test/test_classification.py: Added test for copying of
3318     classifications.
3319    
3320     2003-04-11 Jonathan Coles <[email protected]>
3321    
3322 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
3323     such as bitmaps.
3324    
3325     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
3326     added images to the move buttons, added 'reverse' button.
3327     (CustomRampPanel.__init__): Added images to the move buttons.
3328     (GreyRamp): New. Generates a ramp from white to black.
3329     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
3330    
3331     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
3332     ID_PROPERTY_*.
3333     (Classifier.__init__): Minor changes to the layout.
3334     (Classifier._OnTitleChanged): Listen for when the user edits the
3335     title and update the dialog's title and the layer's title.
3336    
3337     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
3338    
3339     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
3340     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
3341     if the layer's title changes.
3342    
3343     * Thuban/UI/mainwindow.py: Added new menu item and associated code
3344     to open a dialog to rename the map.
3345     (MainWindow): Use new resource class to import bitmaps.
3346    
3347     2003-04-11 Jonathan Coles <[email protected]>
3348    
3349 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
3350 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
3351     Resources/Bitmaps/group_use_none.xpm,
3352     Resources/Bitmaps/group_use_not.xpm,
3353     Resources/Bitmaps/hide_layer.xpm,
3354     Resources/Bitmaps/layer_properties.xpm,
3355     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
3356     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
3357     New.
3358 jonathan 646
3359 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
3360    
3361 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
3362     Should pass group to ClassGroup constructor.
3363    
3364     2003-04-10 Jonathan Coles <[email protected]>
3365    
3366 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
3367     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
3368     here. Implement SetVisible(), IsVisible().
3369     (ClassGroup.__init__): Add group parameter which acts as a copy
3370     constructor.
3371    
3372     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
3373     "Visible" check boxes.
3374     (Classifier): Rename the buttons and refactor the code to match
3375     the new labels.
3376    
3377     * Thuban/UI/legend.py: Classify button is now called "Properties".
3378     Refactored the code to change variable names.
3379     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
3380    
3381     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
3382     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
3383     renamed to MainWindow.LayerEditProperties.
3384     (MainWindow.ToggleLegend): Don't include map name in legend title.
3385     (MainWindow.SetMap): Added the map name to the window title.
3386     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
3387     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
3388     Functionality is found in the layer properties dialog.
3389    
3390     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
3391     draw visible groups.
3392    
3393 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
3394    
3395 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
3396     addition and selection of new color schemes.
3397     (MonochromaticRamp): New. Generates a ramp between two colors.
3398     (RedRamp): New. Generates a ramp of all red.
3399     (GreenRamp): New. Generates a ramp of all green.
3400     (BlueRamp): New. Generates a ramp of all blue.
3401    
3402     2003-04-09 Jonathan Coles <[email protected]>
3403    
3404 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
3405     Need to copy over field and fieldType attributes.
3406    
3407     * Thuban/Model/table.py (Table.field_range): New. Retrive the
3408     maximum and minimum values over the entire table for a given
3409     field.
3410     (Table.GetUniqueValues): New. Retrieve all the unique values
3411     in the table for a given field.
3412    
3413     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
3414     (GenUniquePanel): New. Controls to allow the user to select
3415     which unique field values they would like in the classification.
3416     (CustomRampPanel): Code that was in ClassGenDialog that allows
3417     the user to select the properties for a custom ramp.
3418     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
3419    
3420     * Thuban/UI/classifier.py: Removed a lot of debugging code.
3421     (Classifier._SetClassification): Callback method so that the
3422     class generator can set the classification in the grid.
3423     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
3424     editing of a group properties class into a wxWindows control.
3425    
3426     * Thuban/UI/dock.py: It was decided that if the user closes
3427     a dockable window the window should simply hide itself. That
3428     way if the user wants to show the dock again it appears in the
3429     same place as it was when it was closed.
3430     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
3431     (DockableWindow._OnButtonClose): Hide the window instead of
3432     destroying it.
3433     (DockableWindow._OnClose): Hide the window instead of
3434     destroying it.
3435    
3436     * Thuban/UI/legend.py (LegendTree): Use a private method to
3437     consistently set the font and style of the text. Fixes RTbug #1786.
3438    
3439     * Thuban/UI/mainwindow.py: Import just the Classifier class.
3440    
3441 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
3442    
3443 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
3444     to the map module
3445    
3446     2003-04-07 Bernhard Herzog <[email protected]>
3447    
3448 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
3449     favor of ToggleSessionTree
3450     (MainWindow.ToggleSessionTree): New method to toggle visibility of
3451     the session tree.
3452     (MainWindow.SessionTreeShown): New method to return whether the
3453     session tree is currently shown.
3454     (MainWindow.ToggleLegend): New method to toggle visibility of the
3455     legend
3456     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
3457     LegendShown
3458     (MainWindow.LegendShown): New method to return whether the legend
3459     is currently shown.
3460     (_method_command): Add checked parameter so we can define check
3461     menu items
3462     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
3463     mainwindow methods.
3464     (show_session_tree, show_legend commands): Removed.
3465     (toggle_session_tree, toggle_legend commands): New commands to
3466     toggle the visibility of the dialogs
3467    
3468 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
3469    
3470 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
3471    
3472     * Thuban/UI/dock.py: Fix Windows problem.
3473    
3474     * Thuban/UI/mainwindow.py: Use False instead of false.
3475     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
3476    
3477     2003-04-07 Jonathan Coles <[email protected]>
3478    
3479 jonathan 612 Since we now say that the order of the groups in a classification
3480     matters, it makes sense to be able to manipulate that order. Most
3481     of the changes to Thuban/Model/classification.py are to that end.
3482    
3483     * Thuban/Model/classification.py (Classification.AppendGroup,
3484     Classification.InsertGroup, Classification.ReplaceGroup,
3485     Classification.RemoveGroup, Classification.GetGroup): Do as the
3486     names imply.
3487     (Classification.FindGroup): This was called GetGroup, but GetGroup
3488     takes an index, while FindGroup takes a value.
3489     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
3490     REFERENCE. Currently there is a cyclic reference between the layer
3491     and its classification. If the classification doesn't need to know
3492     its owning layer we can change this, since it may make sense to be
3493     able to use the same classification with different layers.
3494    
3495     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
3496    
3497     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
3498     not AddGroup()
3499    
3500     * Thuban/UI/classifier.py: Now that we can depend on the order in
3501     a Classification and have methods to manipulate that order we don't
3502     need to use our own data structures in the grid. We can simply make
3503     the grid/table access the information they need from a copy of
3504     the classification object.
3505     (Classifier._OnCloseBtn): Event handler for when the user clicks
3506     'Close'. This is needed so if the user applies changes and then
3507     continues to change the table the user has the option of discarding
3508     the most recent changes and keeping what they applied.
3509    
3510     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
3511     into the same group.
3512    
3513     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
3514     with a really old version of proj, PJ_VERSION won't even be defined.
3515     If it isn't defined then just compile so that the function always
3516     returns Py_False.
3517    
3518     * test/test_classification.py: Fix tests to use the renamed methods.
3519     Still need to write tests for the new methods.
3520    
3521 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
3522 jonathan 608
3523 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
3524     call to SetSelection out of the method and before the call
3525     to __SelectField in __init__. This prevents a recursion of events
3526     when _OnFieldSelect is triggered by the user.
3527    
3528     2003-04-04 Jonathan Coles <[email protected]>
3529    
3530 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
3531     Color.Transparent.
3532     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
3533     Don't bother copying the color, since Colors are immutable.
3534    
3535     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
3536     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
3537     Thuban/UI/renderer.py, Thuban/UI/view.py:
3538     Rename Color.None to Color.Transparent.
3539    
3540     * test/test_classification.py, test/test_load.py: Rename Color.None
3541     to Color.Transparent.
3542    
3543     2003-04-04 Jonathan Coles <[email protected]>
3544 jonathan 603
3545     * Thuban/Model/classification.py: Fix assert calls.
3546     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
3547     Copy the color parameter rather than hold onto a reference.
3548 jonathan 601
3549 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
3550     the color object.
3551     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
3552     are sure there exists only one refernce to Color.None in the system.
3553     This allows us to use 'is' rather than the comparision functions.
3554    
3555     * Thuban/Model/save.py: Fix assert calls.
3556    
3557     * Thuban/UI/classifier.py: Fix assert calls.
3558     (ClassGrid._OnCellDClick): Call up to the classifier to open the
3559     dialog to edit the groups properties.
3560     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
3561     correctly if a cell is resized.
3562     (ClassTable.SetClassification): New. Changes the classification
3563     that is in the table.
3564     (ClassTable.__SetRow): Allow groups to be prepended.
3565     (Classifier): New code for opening the EditProperties and
3566     GenerateRanges dialogs.
3567     (SelectPropertiesDialog.__GetColor): Only set the color in the
3568     color dialog if the current color is not None.
3569    
3570     * Thuban/UI/dock.py: Fix assert calls.
3571    
3572     * Thuban/UI/legend.py: Fix assert calls.
3573    
3574     * Thuban/UI/renderer.py: Fix assert calls.
3575    
3576     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
3577     classifications.
3578     (GenRangePanel): Panel specific to range generation.
3579     (GenSingletonPanel): Panel specific to singleton generation.
3580     (ClassGenerator): Class responsible for actually generating
3581     the classification from the data gathered in the dialog box.
3582     (PropertyRamp): Generates properties whose values range from
3583     a starting property to an ending property.
3584 jonathan 601
3585 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
3586    
3587     * test/support.py (print_garbage_information): New function that
3588     prints information about still connected messages and memory
3589     leaks.
3590     (run_suite): Removed.
3591     (run_tests): New function for use as a replacement of
3592     unittest.main in the test_* files. This one calls
3593     print_garbage_information at the end.
3594    
3595     * test/runtests.py (main): Use support.print_garbage_information
3596    
3597     * test/test_layer.py: Use support.run_tests instead of
3598     unittest.main so we get memory leak information
3599     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
3600     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3601     (TestLayerLegend.test_visibility): Call the layer's Destroy method
3602     to fix a memory leak.
3603    
3604     * test/test_classification.py: Use support.run_tests instead of
3605     unittest.main so we get memory leak information
3606     (TestClassification.test_classification): Call the layer's Destroy
3607     method to fix a memory leak.
3608    
3609 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
3610    
3611 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
3612     Handle the reference counts of the return value and errors in
3613     PyArg_ParseTuple correctly.
3614    
3615 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
3616     sure the filename is absolute to avoid problems when saving the
3617     session again
3618    
3619 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
3620    
3621 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
3622    
3623 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
3624 jonathan 587 that there actually are points in the returned list of points
3625     before trying to index into the list. The list may be empty if
3626     the shape is a Null Shape.
3627    
3628 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
3629    
3630     * test/test_map.py: Don't use from <module> import *
3631    
3632 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
3633    
3634     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
3635     LAYER_LEGEND_CHANGED
3636    
3637     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
3638     self.Destroy() to close the window after yesterday's changes.
3639    
3640     * test/test_map.py, test/test_session.py: Fix messages that
3641     are sent from maps and layers.
3642    
3643 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
3644    
3645     * Thuban/UI/classifier.py: Commented out some debugging statements.
3646     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
3647     RTbug #1769.
3648    
3649     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
3650     position (although position doesn't work yet under GTK).
3651     (DockableWindow.Destroy): New. Called when the window must be
3652     closed. Namely needed when the DockFrame closes and must close
3653     its children.
3654     (DockFrame): Listen for EVT_CLOSE and destroy all children.
3655    
3656     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
3657     when then window is told to close.
3658     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
3659     comment in source for more info.
3660    
3661     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
3662    
3663     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
3664     symmetry with other such methods.
3665     (MainWindow.ShowLegend): Show the legend docked by default.
3666    
3667 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
3668    
3669     * Thuban/UI/classifier.py: Support for highlighting a specific
3670     group within the grid when the classification dialog is opened.
3671     Also contains a lot of debugging printouts which will later
3672     be removed.
3673    
3674     * Thuban/UI/dock.py: Complete rework on the dock code so that
3675     that it is fairly removed from the rest of the Thuban application.
3676     It is easy to add new docks which the rest of the program having
3677     to be aware of them.
3678    
3679     * Thuban/UI/legend.py: Modifications to support selecting a
3680     specific group in the classification dialog. Changed how layers
3681     are drawn when the layer is visible/invisible.
3682    
3683     * Thuban/UI/mainwindow.py: Removed legend specific code and
3684     replaced it with calls to the new dock code.
3685    
3686     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
3687     to check if scale > 0. Trying to track down a divide by zero.
3688    
3689 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
3690    
3691 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
3692     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
3693     now part of DockableWindow.
3694     (LegendPanel.DoOnSelChanged): Select the current layer in the
3695     map.
3696     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
3697     with the selected layer and/or group.
3698    
3699     2003-03-26 Jonathan Coles <[email protected]>
3700    
3701 jonathan 557 This putback contains the code for dockable windows. There is
3702     no support in wxWindows as of this date for windows that can
3703     attach themselves to other windows.
3704    
3705     The current model contains a DockableWindow which has a parent
3706     window for when it is detached and a dock window that it puts
3707     its contents in when it is docked. The contents of a DockableWindow
3708     must be a DockPanel. DockPanel itself derives from wxPanel.
3709    
3710     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
3711     message, not a LAYER_LEGEND_CHANGED message.
3712    
3713     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
3714    
3715     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
3716     as one of the style properties for the fieldTypeText item to
3717     be sure that its size is correct when the text changes.
3718    
3719     * Thuban/UI/dock.py: New. Classes for the DockPanel and
3720     DockableWindow.
3721    
3722     * Thuban/UI/legend.py: Added some more buttons and made the
3723     LegendPanel a DockPanel.
3724    
3725     * Thuban/UI/mainwindow.py: Added sash windows to the main window
3726     and supporting functions for manipulating the sashes.
3727     (MainWindow.ShowLegend): Create a DockableWindow with the
3728     LegendPanel as the contents.
3729    
3730     * Thuban/UI/messages.py: Added DOCKABLE_* messages
3731    
3732     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
3733     not LAYER_LEGEND_CHANGED, messages.
3734    
3735 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
3736    
3737     * setup.py: Added custom script bdist_rpm_build_script so that
3738     when the rpm is built the path to wx-config is correct.
3739    
3740     * setup.cfg: Added line saying to use the custom build script
3741    
3742 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
3743    
3744     Initial implementation of the Legend.
3745    
3746     * Thuban/UI/legend.py: New. Creates a window that shows the map's
3747     Legend information and allows the user to add/modify classifications
3748     and how the layers are drawn on the map.
3749    
3750     * setup.py: New command 'build_docs' which currently uses
3751     happydoc to generate html documentation for Thuban.
3752    
3753     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
3754     Returns a string which is appropriately describes the group.
3755    
3756     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
3757     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
3758    
3759     * Thuban/Model/map.py (Map): Rename messages and use new, more
3760     specific, messages.
3761    
3762     * Thuban/Model/messages.py: New message to indicate that a layer's
3763     data has changed (LAYER_CHANGED). New map messages to indicate
3764     when layers have been added/removed/changed or if the stacking order
3765     of the layers has changed.
3766    
3767     * Thuban/Model/session.py: Rename and use new messages.
3768    
3769     * Thuban/UI/classifier.py: Remember if any changes have actually
3770     been applied so that if the dialog is cancelled without an application
3771     of changes we don't have to set a new classification.
3772     (ClassDataPreviewer): Pulled out the window specific code and put it
3773     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
3774     symbols on any DC.
3775    
3776     * Thuban/UI/mainwindow.py: New code to open the legend.
3777    
3778     * Thuban/UI/view.py: Use new message names.
3779    
3780 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
3781    
3782     * Thuban/UI/main.py (verify_versions): New. Checks the versions
3783     of Python, wxPython, and some other libraries.
3784    
3785     * extensions/thuban/wxproj.cpp (check_version): Checks the given
3786     version against what wxproj was compiled with.
3787     (check_version_gtk): If wxproj was compiled with gtk then check
3788     the given version against the version of the gtk library
3789     currently being used.
3790    
3791 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
3792    
3793     * test/test_command.py: Run the tests when the module is run as a
3794     script
3795    
3796     2003-03-14 Bernhard Herzog <[email protected]>
3797    
3798     Implement selection of multiple selected shapes in the same layer:
3799    
3800     - Introduce a new class to hold the selection. This basically
3801     replaces the interactor which was nothing more than the
3802     selection anyway. A major difference is of course that the new
3803     selection class supports multiple selected shapes in one layer
3804    
3805     - Move the object that represents the selection from the
3806     application to the canvas. The canvas is a better place than the
3807     application because the selection represents which shapes and
3808     layer of the map displayed by the canvas are selected and
3809     affects how the map is drawn.
3810    
3811     - Make the selection and its messages publicly available through
3812     the mainwindow.
3813    
3814     - The non-modal dialogs do not get a reference to the interactor
3815     anymore as they can simply refer to their parent, the
3816     mainwindow, for the what the interactor had to offer.
3817    
3818     * Thuban/UI/selection.py: New module with a class to represent the
3819     selection.
3820    
3821     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
3822     these unused messages
3823    
3824     * Thuban/UI/application.py (ThubanApplication.OnInit)
3825     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
3826     interactor is gone now.
3827     (ThubanApplication.CreateMainWindow): There is no interactor
3828     anymore so we pass None as the interactor argument for now for
3829     compatibility.
3830    
3831     * Thuban/UI/view.py (MapCanvas.delegated_messages)
3832     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
3833     Unsubscribe, delegate messages according to the delegated_messages
3834     class variable.
3835     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
3836     attributes from instance variables as described with the
3837     delegated_methods class variable.
3838     (MapCanvas.__init__): New instance variable selection holding the
3839     current selection
3840     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
3841     pass them on to the renderer
3842     (MapCanvas.SetMap): Clear the selection when a different map is
3843     selected.
3844     (MapCanvas.shape_selected): Simple force a complete redraw. The
3845     selection class now takes care of only issueing SHAPES_SELECTED
3846     messages when the set of selected shapes actually does change.
3847     (MapCanvas.SelectShapeAt): The selection is now managed in
3848     self.selection
3849    
3850     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
3851     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
3852     Unsubscribe, delegate messages according to the delegated_messages
3853     class variable.
3854     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
3855     attributes from instance variables as described with the
3856     delegated_methods class variable.
3857     (MainWindow.__init__): The interactor as ivar is gone. The
3858     parameter is still there for compatibility. The selection messages
3859     now come from the canvas.
3860     (MainWindow.current_layer, MainWindow.has_selected_layer):
3861     Delegate to the the canvas.
3862     (MainWindow.LayerShowTable, MainWindow.Classify)
3863     (MainWindow.identify_view_on_demand): The dialogs don't need the
3864     interactor parameter anymore.
3865    
3866     * Thuban/UI/tableview.py (TableFrame.__init__)
3867     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
3868     (LayerTableFrame.row_selected): The interactor is gone. It's job
3869     from the dialog's point of view is now done by the mainwindow,
3870     i.e. the parent. Subscribe to SHAPES_SELECTED instead
3871     of SELECTED_SHAPE
3872    
3873     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
3874     is gone. It's job from the dialog's point of view is now done by
3875     the mainwindow, i.e. the parent.
3876    
3877     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
3878     gone. It's job from the dialog's point of view is now done by the
3879     mainwindow, i.e. the parent.
3880    
3881     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
3882     gone. It's job from the dialog's point of view is now done by the
3883     mainwindow, i.e. the parent.
3884     (SessionTreeCtrl.__init__): New parameter mainwindow which is
3885     stored as self.mainwindow. The mainwindow is need so that the tree
3886     can still subscribe to the selection messages.
3887     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
3888     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
3889     selection is now accessible through the mainwindow. Subscribe to
3890     SHAPES_SELECTED instead of SELECTED_SHAPE
3891    
3892     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
3893     SHAPES_SELECTED message now.
3894     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
3895     so deal with multiple shapes
3896     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
3897     gone. It's job from the dialog's point of view is now done by the
3898     mainwindow, i.e. the parent.
3899    
3900     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
3901     parameter is now a list of shape ids.
3902     (RecordTable.SetTable): The second parameter is now a list of
3903     indices.
3904    
3905     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
3906     selected_shape parameter and ivar to selected_shapes. It's now a
3907     list of shape ids.
3908     (MapRenderer.draw_label_layer): Deal with multiple selected
3909     shapes. Rearrange the code a bit so that the setup and shape type
3910     distinctions are only executed once.
3911    
3912     * test/test_selection.py: Test cases for the selection class
3913    
3914 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
3915    
3916     * Thuban/Model/load.py: Temporary fix so that the xml reader
3917     doesn't cause Thuban to crash.
3918    
3919     * Thuban/Model/layer.py: Handle the cyclic references between
3920     a layer and its classification better, and be sure to disconnect
3921     the classification from the layer when the layer is destroyed
3922     so that we don't maintain a cyclic reference that may not be
3923     garbage collected.
3924    
3925     * Thuban/Model/classification.py: See comment for layer.py.
3926    
3927 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
3928    
3929     * HOWTO-Release: New. Information on the steps for releasing
3930     a new version of Thuban.
3931    
3932 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
3933    
3934     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
3935     Use True instead of true.
3936     (Classifier): Should have a single panel in which all the controls lie.
3937    
3938     * Thuban/UI/proj4dialog.py: Add normal border.
3939    
3940     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
3941    
3942     * Thuban/UI/mainwindow.py: Use True instead of true.
3943    
3944     * setup.py: Update some definitions to use wxWindows2.4 files
3945    
3946     * Data/iceland_sample_class.thuban: Fixed file so that the
3947     field_type information is present.
3948    
3949 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
3950    
3951 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
3952     field type label grow so that when the text changes the
3953     size is updated correctly. This may be a wxWindows bug.
3954    
3955     2003-03-10 Jonathan Coles <[email protected]>
3956    
3957 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
3958     SESSION_REPLACED.
3959    
3960     * Thuban/UI/classifier.py: Wrap text with _().
3961     (ClassGrid.CreateTable): Set dimensions and size hints here,
3962     instead of in Reset, so we only set the size once.
3963    
3964     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
3965    
3966     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
3967     Call Close() instead of Shutdown().
3968    
3969     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
3970    
3971     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
3972     Go back to using OnClose() instead of Shutdown().
3973    
3974     2003-03-10 Jonathan Coles <[email protected]>
3975    
3976 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
3977     to know the old field index as well as the new one.
3978    
3979     2003-03-10 Jonathan Coles <[email protected]>
3980    
3981 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
3982     to correctly set the table information and call this from
3983     __init__ and from _OnFieldSelect so that all the information
3984     is up to date when the dialog opens and when a field is changed.
3985    
3986     2003-03-10 Jonathan Coles <[email protected]>
3987    
3988 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
3989     layer's message function directly, use the ClassChanged() method
3990     when then classification changes. SetField/SetFieldType/SetLayer
3991     must keep the information about field name and field type in
3992     sync when an owning layer is set or removed.
3993    
3994     * Thuban/Model/layer.py: Added ClassChanged() so that the
3995     classification can tell the layer when its data has changed.
3996     (Layer.SetClassification): Accepts None as an arguement to
3997     remove the current classification and correctly handles
3998     adding a new classification.
3999    
4000     * Thuban/Model/load.py: Comment out print statement
4001    
4002     * test/test_classification.py, test/test_save.py: New and
4003     improved tests.
4004    
4005 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
4006    
4007     * Thuban/Model/classification.py: Implemented __copy__ and
4008     __deepcopy__ for ClassGroup* and ClassGroupProperites so
4009     they can easily be copied by the classifier dialog.
4010     (ClassGroupProperites.__init__): The default line color should
4011     have been Color.Black.
4012    
4013     * Thuban/UI/classifier.py: Setting and Getting table values now
4014     uses a consistent set of functions.
4015     (Classifier): Now non-modal. Has field type label which changes
4016     as the field changes. Keep track of buttons in a list so that
4017     we can enable/disable the buttons when the None field is selected.
4018     (SelectPropertiesDialog): Add buttons to make the colors transparent.
4019    
4020     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
4021     does what OnClose did, but can be called by the application to
4022     close a window. Needed when a session changes, and we have to
4023     close the classifier windows.
4024    
4025     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
4026     Shuts down open dialogs. Used when a new session is created
4027     or a session is opened.
4028     (MainWindow.SaveSession): Should only call application.SaveSession()
4029     if we don't call SaveSessionAs first.
4030     (MainWindow.Classify): Allow different classifier dialogs for
4031     different layers.
4032    
4033     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
4034     the parent class handle it. Add Shutdown() to unsubscibe from
4035     event notification and call the parent Shutdown(). This was
4036     necessary so the application can close the tree window.
4037    
4038 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
4039    
4040     * Thuban/Model/classification.py: Minor documentation changes,
4041     Addition of __eq__ and __ne__ methods.
4042     (Classification.SetLayer): prevent recursion between this method
4043     and Layer.SetClassification().
4044    
4045     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
4046    
4047     * Thuban/Model/layer.py (SetClassification): prevent recursion
4048     between this method and Classification.SetLayer().
4049    
4050     * test/test_classification.py, test/test_load.py,
4051     test/test_session.py: Fixed and added tests for the classification
4052     classes.
4053    
4054 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
4055    
4056     * Thuban/UI/classifier.py (ClassGrid.__init__)
4057     (ClassGrid.CreateTable): Move the SetSelectionMode call to
4058     CreateTable because otherwise it triggers an assertion in
4059     wxPython/wxGTK 2.4.
4060    
4061 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
4062    
4063 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
4064 jonathan 471
4065 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
4066 jonathan 471
4067 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
4068 jonathan 471
4069 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
4070 jonathan 471
4071     2003-03-05 Jonathan Coles <[email protected]>
4072    
4073 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
4074     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
4075     Store just the groups in the table and generate the other
4076     column information when it is requested. Add "None" field
4077     to pull-down to select no classification.
4078    
4079     * Thuban/common.py: Moved FIELDTYPE constants from table.py
4080     (Str2Num): Only catch ValueError exceptions.
4081    
4082     * Thuban/Model/classification.py: Class documentation. Renaming
4083     of methods with Stroke to Line. Groups are stored in a single
4084     list with the default as the first element. Groups are searched
4085     in the order they appear in the list.
4086    
4087     * Thuban/Model/color.py: Documentation.
4088    
4089     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
4090     the kind of data represented by a field.
4091    
4092     * Thuban/Model/load.py (ProcessSession): Use proper string
4093     conversion function; fixes RTbug #1713.
4094    
4095     * Thuban/Model/save.py (Saver): Store field type information.
4096    
4097     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
4098     (Table): Add field_info_by_name() to retrieve field information
4099     by specifying the field name, not the number.
4100    
4101     * Thuban/UI/mainwindow.py: Function name changes.
4102    
4103     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
4104     get the layer classification once. Don't try to classify
4105     values when the field is None: just use the default properties.
4106    
4107     * Thuban/UI/view.py: Function name changes.
4108    
4109     * Doc/thuban.dtd: Add field_type attribute to a classification.
4110    
4111 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
4112    
4113 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
4114     the fill and stroke layer attributes optional with suitable
4115     default values. Add the stroke_width layer attribute. Use correct
4116     syntax for empty elements. Make the attribute list for labels
4117     refer to the label element.
4118    
4119     2003-03-04 Bernhard Herzog <[email protected]>
4120    
4121 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
4122     Python 2.3 containing some of the functionality we implement in
4123     setup.py ourselves.
4124    
4125     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
4126     before the selection mode. Doing it the other way round triggers
4127     an assertion in wxWindows.
4128    
4129     * Thuban/Model/save.py (escape): Fix typo in doc-string
4130    
4131     * Thuban/Model/classification.py: Remove unnecessary wxPython
4132     import
4133    
4134 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
4135    
4136     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
4137     Parameter 'value' should default to None.
4138    
4139     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
4140     the class attribute __classification is now private.
4141    
4142     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
4143     Classifier to ClassGrid. Added support for removing selected rows,
4144     which including code for keeping track of when cells are selected,
4145     and deselected.
4146     (ClassTable): Support for added/removing rows. Fixed a problem
4147     with __ParseInput whereby it would not allow strings (only numbers)
4148     to be entered.
4149     (Classifier): Added button and supporting code for removing
4150     selected rows.
4151    
4152 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
4153 jonathan 434
4154     * Thuban/common.py: Moved color conversion functions into
4155     Thuban/UI/common.py.
4156     (Str2Num): Now converts the float (not the string) to a long/int
4157     so that an exception isn't thrown.
4158    
4159     * Thuban/UI/common.py: Common functions used in several UI modules
4160    
4161     * Thuban/Model/classification.py: Changed the class hierarchy
4162     so that a Classification consists of Groups which return
4163     Properties when a value matches a Group.
4164    
4165     * Thuban/Model/layer.py: Fixed name resolution problem.
4166    
4167     * Thuban/Model/load.py: Use new Classification and Group functions.
4168    
4169     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
4170     failure.
4171     (Saver.write_classification): Use new Classification and Group
4172     functions.
4173    
4174     * Thuban/UI/classifier.py: Changes to use new Classification and Group
4175 jonathan 445 functions. Fix to create a tuple with a single value instead of
4176     simply returning the value.
4177 jonathan 434
4178     * Thuban/UI/renderer.py: Use new Classification and Group functions.
4179     Use common.py functions.
4180    
4181 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
4182 jonathan 447
4183     * test/test_classification.py: Use new Classification and Group
4184     classes.
4185 jonathan 434
4186 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
4187    
4188     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
4189     functions from Thuban color objects to wxWindow colour objects.
4190    
4191     * Thuban/Model/classification.py (Classification): Renamed
4192     GetProperties() to GetClassData(). Used the new iterator
4193     in TreeInfo().
4194     (ClassIterator): Iterator implementation to iterate over the
4195     ClassData objects in a classification object.
4196    
4197     * Thuban/Model/save.py (Saver.write_classificaton): Uses
4198     the new iterator to save the classification information.
4199    
4200     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
4201     for changing the stroke and fill colors and previewing the
4202     changes.
4203    
4204     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
4205     MainWindow.SaveSessionAs): Text string changes so the dialogs
4206     have more meaningful titles.
4207    
4208     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
4209     Classification method name from GetProperties to GetClassData.
4210    
4211     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
4212     instead of accessing now non-existent class variables.
4213    
4214 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
4215    
4216     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
4217     unneeded Shape() call. Rendering is substantially faster without
4218     it and it avoids some problems with broken shape files.
4219    
4220 frank 423 2003-02-20 Frank Koormann <[email protected]>
4221    
4222     Force minimal size of identify and label dialogs. The autosizing
4223     looked too ugly.
4224    
4225     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
4226     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
4227     Set size of listctrl.
4228     * Thuban/UI/identifyview.py (IdentifyView.__init__):
4229     Set size of dialog.
4230    
4231 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
4232    
4233     * test/test_classification.py, test/test_layer.py,
4234     test/test_load.py, test/test_map.py, test/test_session.py:
4235     Updated the tests to use the new functions that are in the
4236     respective classes.
4237    
4238     * Thuban/Model/classification.py (Classification):
4239     Uses the new ClassData* classes. Modification messages are
4240     passed up to the parent layer (if it exists).
4241     (ClassData): New class to encapsulate the common data in each
4242     classification property.
4243     (ClassDataDefault): Represents the Default class. data.
4244     (ClassDataPoint): Represents a single class. data point
4245     (ClassDataRange): Represents a class. range
4246     (ClassDataMap): Represents a class. map (unused).
4247    
4248     * Thuban/Model/color.py: Added Color.None to represent something
4249     with no color. Color.Black represents the color black.
4250     (NoColor): Helper class derived from Color to represent something
4251     with no color.
4252    
4253     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
4254     stroke_width attributes. Made the 'classification' attribute private.
4255     New methods for setting/getting the classification.
4256    
4257     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
4258     to get the classifcation and use the new ClassData* classes to
4259     hold the classification data. Use Str2Num to convert numbers
4260     properly.
4261    
4262     * Thuban/Model/save.py (Saver): Use new Color and Classification
4263     methods
4264    
4265     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
4266     custom grid.
4267     (ClassTable): Support for editing Values and Labels and for
4268     changing what type (point or range) of data is stored in each
4269     property based on how the user enters the data.
4270     (Classifier): Support for saving the new classifications and
4271     launching the dialog to edit a property.
4272     (SelectPropertiesDialog): New class for editing the visual
4273     properties of a classification (stroke color, width, and fill color)
4274     (ClassPreviewer): Took the Draw method from ClassRenderer and
4275     made most of it into this new class. Intend to use this class in
4276     the SelectPropertiesDialog for previewing changes.
4277    
4278     * Thuban/UI/renderer.py: Use new Color and Classification methods.
4279    
4280     * Thuban/UI/tree.py: Formatting changes.
4281    
4282     * Doc/thuban.dtd: Add 'label' element
4283    
4284     * Thuban/common.py: New. Contains common routines used throughout
4285     the code.
4286     (Str2Num): Takes a string and converts it to the "best" type of
4287     number.
4288    
4289 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
4290    
4291     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
4292     dragging flag is always set to 0 even when the tool implementation
4293     raises an exception
4294    
4295 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
4296    
4297     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
4298     method to create a splash screen.
4299     (ThubanApplication.ShowMainWindow): New. Show the main window.
4300     Needed so the splash screen can display the mainwindow
4301     (ThubanApplication.OnInit): Call the
4302     new splash_screen method to determine whether the application
4303     should display a splash screen. If it displays a splash screen do
4304     not immediately show the main window.
4305    
4306 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
4307    
4308     * Thuban/Model/classification.py: Added import line to fix
4309     feature conflicts between running on python2.2 and python2.1.
4310    
4311     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
4312     onto the clinfo parameter, so removed the deepcopy().
4313    
4314 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
4315    
4316 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
4317 jonathan 396 Added element_open variable to track opening and closing of tags
4318     so that tags that don't span more than one line are closed with
4319     /> instead of </tag_name>. Use the GetDefault*() methods of
4320     the Classification class.
4321    
4322     * Thuban/Model/classification.py (Classificaton): Added set and
4323     get methods for the default data. The class also takes a layer
4324     reference so that modification messages can be sent. Fixed the
4325     methods to use the new ClassData class.
4326     (ClassData): New class to encapsulate the classification data
4327    
4328     * Thuban/Model/layer.py (Layer): Remove the
4329 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
4330 jonathan 396 SetDefault*() methods on the layer's classification object.
4331 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
4332 jonathan 396 Classification class.
4333    
4334     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
4335     object instead of a dictionary.
4336    
4337 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
4338 jonathan 396 draw the classifications in the dialog box's table.
4339     (Classifier): Modified to use the ClassRenderer class.
4340    
4341 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
4342     methods of the Classification class.
4343 jonathan 396
4344     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
4345     of the ClassData class.
4346    
4347     * test/test_classification.py, test/test_layer.py,
4348     test/test_map.py, test/test_session.py: Fix the tests to work
4349     with the above code changes.
4350    
4351 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
4352    
4353     * Thuban/Model/classification.py (Classification): Added getNull()
4354     to return the NullData reference
4355    
4356     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
4357     Layer.SetStrokeWidth): Modified these functions to change the
4358     null data in the classification rather than keep these values
4359     directly in the Layer class. Menu options to change these values
4360     work again.
4361    
4362 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
4363    
4364 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
4365 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
4366 jonathan 380 classification data.
4367    
4368 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
4369     Colors in the tree view.
4370    
4371     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
4372     the tree info for classifications. Commented out unnecessary lines.
4373    
4374     * Thuban/Model/classification.py (Classification.TreeInfo): New
4375     function to add information about the classification into the
4376     tree view.
4377    
4378 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
4379 jan 375
4380 tkoester 403 * Thuban/__init__.py (_): New.
4381 jan 375
4382     * Thuban/Model/classification.py, Thuban/Model/extension.py,
4383     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
4384 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
4385     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
4386     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
4387     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
4388     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
4389     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
4390 jan 375
4391 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
4392    
4393 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
4394 jonathan 370
4395 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
4396     a layer classification. Supports specific data points and
4397     ranges.
4398 jonathan 370
4399 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
4400     information.
4401 jonathan 370
4402 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
4403     information.
4404 jonathan 370
4405 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
4406     specifying classification information.
4407 jonathan 370
4408 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
4409     dialog.
4410 jonathan 370
4411 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
4412     classification information.
4413 jonathan 370
4414 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
4415     classification data.
4416 jonathan 370
4417 tkoester 403 * test/test_classification: Tests for the Classification class.
4418 jonathan 370
4419 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
4420    
4421 bh 361 * test/test_command.py: New. Tests for the command classes.
4422    
4423 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
4424     (Command.IsTool): New method to distinguish between command
4425     switching tools and other commands.
4426    
4427     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
4428     the tool to avoid direct assignments to instance variables
4429     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
4430     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
4431     change the tool
4432    
4433     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
4434     active tool's command turns insensitive, disable the tool.
4435     (_tool_command): Use the new ToolCommand class
4436    
4437     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
4438     SelectTool method to change the tool
4439     (iconfile): Use the ToolCommand class
4440    
4441 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
4442    
4443     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
4444     the case of selected items that are not children of Layers or Maps
4445     properly. Previously this bug would trigger an assertion in
4446     wxWindows.
4447    
4448 frank 352 2002-11-06 Frank Koormann <[email protected]>
4449    
4450 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
4451     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
4452     Full Extent).
4453 tkoester 403
4454 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
4455    
4456     * setup.py (setup call): version now 0.1.3
4457    
4458     * MANIFEST.in: Add the files in test/
4459    
4460     * test/README: Add note about tests requiring the iceland data
4461    
4462     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
4463     copyright notice.
4464    
4465 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
4466    
4467     * test/test_map.py
4468     (TestMapWithContents.test_projected_bounding_box): Use an explicit
4469     epsilon.
4470    
4471     * test/support.py (FloatComparisonMixin.assertFloatEqual)
4472     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
4473     message if the assertion fails and don't return the return value
4474     of self.assert_. In assertFloatSeqEqual the return meant that not
4475     all items of the sequence were compared.
4476    
4477 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
4478    
4479 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
4480    
4481     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
4482    
4483 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
4484     the string with the bounding box on the fly because of platform
4485     differences in the way %g is handled.
4486    
4487     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
4488     DBFfile too because Thuban layers can't yet cope missing DBF
4489     files.
4490    
4491     2002-09-20 Bernhard Herzog <[email protected]>
4492    
4493 bh 326 * test/test_menu.py: Use initthuban instead of
4494     add_thuban_dir_to_path to initialize Thuban.
4495    
4496     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
4497     Mixin class for float comparisons
4498     (SubscriberMixin): New. Mixin class to test messages sent through
4499     the Connector class
4500    
4501     * test/README: Fix a typo and add the -v flag to the command for
4502     individual tests
4503    
4504 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
4505    
4506     * test/test_proj.py: New. Test cases for Thuban.Model.proj
4507    
4508     * test/test_map.py: New. Test cases for Thuban.Model.map
4509    
4510     * test/test_layer.py: New. Test cases for Thuban.Model.layer
4511    
4512     * test/test_label.py: New. Test cases for Thuban.Model.label
4513    
4514     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
4515    
4516     * test/test_color.py: New. Test cases for Thuban.Model.color
4517    
4518     * test/test_base.py: New. Test cases for Thuban.Model.base
4519    
4520 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
4521    
4522     * Thuban/Model/session.py (Session.forwarded_channels): Forward
4523     the CHANGED channel too.
4524    
4525     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
4526     CHANGED channel too.
4527     (Map.__init__): Call the Modifiable constructor as well.
4528    
4529     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
4530     event if the modified flag changes.
4531     (Modifiable.changed): Tweak the doc-string.
4532    
4533     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
4534     (MainWindow.set_position_text): Put the code that puts the text
4535     with the mouse position into the status bar into the new method
4536     set_position_text so that it can overwritten in derived classes.
4537    
4538 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
4539    
4540     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
4541     message box on the main window.
4542    
4543 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
4544    
4545     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
4546     the 'E' because it's less likely to interfere with other menu
4547     entries.
4548 bh 315 (MainWindow.build_menu): remove an incorrect comment.
4549 bh 313
4550 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
4551    
4552     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
4553     (_tool_command): Add sensitive parameter
4554     (_has_visible_map): Sensitivity callback to tools and other
4555     commands that require a visible map. Use it in map_zoom_in_tool,
4556     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
4557     and map_full_extent
4558    
4559 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
4560    
4561     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
4562     VIEW_POSITION
4563    
4564 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
4565 frank 306
4566     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
4567    
4568 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
4569    
4570 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
4571     wxWindows already and our implementation doesn't work correctly
4572     with wxGTK 2.3:
4573     (MapCanvas.__init__): Remove the instance variable
4574     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
4575     be drawin
4576     (MapCanvas.OnIdle): Removed.
4577    
4578 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
4579     a parameter to determine the size of the rectangle.
4580     (MapCanvas.find_shape_at): Create the box around the point on a
4581     layer by layer basis and make the size depend on the shape type.
4582     This solves a problem with the selection of point shapes at the
4583     border of the layer's bounding box
4584    
4585 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
4586    
4587 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
4588     for the sensitivity of remove layer.
4589     (_can_remove_layer): New. Sensitivity callback for remove layer
4590     (Command layer_remove): Use _can_remove_layer
4591    
4592     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
4593     determine whether a given layer can be deleted.
4594    
4595 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
4596     (MapCanvas.do_redraw): Get rid of the unused update_region
4597     instance variable
4598    
4599 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
4600    
4601 bh 292 * test/: new subdirectory with a bunch of unit tests.
4602    
4603     * test/README, test/test_table.py, test/test_save.py,
4604     test/test_menu.py, test/test_load.py: Initial set of tests and
4605     brief instructions on how to run them
4606    
4607 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
4608    
4609 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
4610     arcs with multiple parts.
4611    
4612 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
4613     Handle degenrate rectangles.
4614    
4615 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
4616     (Table.__init__): Keep track of whether the DBF is open for
4617     writing
4618     (Table.write_record): Open the DBF file for writing when necessary
4619    
4620 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
4621    
4622     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
4623     dbf files only for reading by default. Use a new writable dbf
4624     object for writing.
4625    
4626 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
4627    
4628 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
4629     (MainWindow.Context): New method to return a context
4630     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
4631     new method
4632    
4633 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
4634     layer table specific code from TableGrid into LayerTableGrid
4635     (TableFrame, LayerTableFrame): Split the layer table specific code
4636     from TableFrame into LayerTableFrame
4637 bh 280 (LayerTableGrid.select_shape): Remove a debug print
4638 bh 278
4639     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
4640     LayerTableFrame
4641    
4642 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
4643    
4644     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
4645     absolute filename.
4646    
4647 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
4648    
4649 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
4650     records.
4651 tkoester 403 (Table.__init__): Open the DBF file for writing too.
4652 bh 275
4653     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
4654     into the underlying table.
4655    
4656     * extensions/shapelib/shapefil.h (DBFCommit),
4657     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
4658     commit any changes made to the DBF file.
4659    
4660 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
4661     (_tool_command): Put the code that generates the "checked"
4662     callback into a separate function so that we can reuse it
4663     elsewhere
4664    
4665 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
4666     session into an XML file. The main reason to introduce a class is
4667     that applications built on Thuban can derive from it so that they
4668     can save additional information in a session file.
4669     (save_session): Delegate almost all the work to the Saver class.
4670     Rename the filename argument to file because it may be a file like
4671     object now.
4672    
4673     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
4674     code. Remove the little test code which would be executed when the
4675     module is run as a script which didn't work anymore since it can't
4676     import the other Thuban modules.
4677     (ProcessSession, load_session): Refactor the ProcessSession to
4678     have one method for each element start and end tag so that derived
4679     classes can easily override the processing of individual tags.
4680     Also, always parse with namespaces enabled because applications
4681     built on top of Thuban will likely use namespaces if they extend
4682     the session file format.
4683    
4684 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
4685    
4686     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
4687     because thubaninit_contents will do it for us.
4688    
4689 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
4690 jan 265
4691     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
4692     tree window already open
4693    
4694 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
4695    
4696 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
4697     with self.
4698    
4699     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
4700     when we have actually captured it.
4701    
4702 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
4703     shapefile and destroy the table.
4704    
4705     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
4706    
4707 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
4708    
4709 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
4710     instance variable columns
4711     (RecordTable.GetTypeName): row and col may be negative in some
4712     cases.
4713    
4714 bh 254 * setup.py (InstallLocal.initialize_options)
4715     (InstallLocal.finalize_options, InstallLocal.user_options): New
4716     option create-init-file to build a thubaninit.py when running
4717     install_local
4718     (InstallLocal.run): Create the thubaninit.py module when requested
4719     (thubaninit_contents): Split the template into several parts and
4720     create a new function thubaninit_contents that creates the
4721     contents of a thubaninit module.
4722     (ThubanInstall.run): Use the new function to create the thubaninit
4723     module.
4724    
4725 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
4726    
4727     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
4728     cleanup.
4729     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
4730    
4731     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
4732     direct base class' Destroy method.
4733    
4734     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
4735     layers.
4736     (Map.Destroy): Destroy the label_layer as well and call the
4737     inherited Desatroymethod first so that no more messages are
4738     issued.
4739     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
4740     message if the stacking order actually has changed. Add
4741     doc-strings.
4742     (Map.BoundingBox): Correct the doc-string.
4743     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
4744     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
4745    
4746     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
4747     all labels.
4748    
4749 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
4750    
4751     * Thuban/Model/map.py (Map.subscribe_layer_channels)
4752     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
4753     to a layer's channels into separate methods.
4754     (Map.RemoveLayer, Map.AddLayer): Call the new methods
4755     (Map.Destroy): Unsubscribe from a layer's channels before
4756     destroying it.
4757    
4758     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
4759     selected_layer parameter to searched_layer which is the layer to
4760     search in.
4761     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
4762     search to that layer. Return the selected layer and shape.
4763    
4764     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
4765     typo
4766    
4767 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
4768    
4769 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
4770     Extend the doc string.
4771     (ThubanApplication.subscribe_session)
4772     (ThubanApplication.unsubscribe_session): New methods to
4773     subscribe/unsubscribe to/from session channels.
4774     (ThubanApplication.SetSession): Call the new methods here.
4775     (ThubanApplication.maps_changed, ThubanApplication.set_map):
4776     Renamed set_map to maps_changed. Its now a subscriber for
4777     MAPS_CHANGED.
4778    
4779     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
4780     x-coordinate in case of simple clicks
4781    
4782     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
4783     don't pass it as a parameter
4784    
4785     * Thuban/Model/session.py (Session.RemoveMap): New
4786    
4787 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
4788     window size into a parameter.
4789    
4790 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
4791    
4792 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
4793     just commands.
4794    
4795 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
4796     parameter list a bit to allow setting the window title and the
4797     initial message in the status bar. Update the callers.
4798    
4799     * Thuban/UI/application.py (ThubanApplication.OnInit)
4800     (ThubanApplication.CreateMainWindow): Put the mainwindow
4801     instantiation into a separate method so that it can be overridden
4802     by a subclass.
4803    
4804 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
4805    
4806 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
4807     another changed message is issued to make it easier to get
4808     notified of changes.
4809     (Session): Update the doc string
4810     (Session.forward): Issue changed-events as CHANGED as well.
4811     (Session.changed): Overwrite the inherited version to issue
4812     CHANGED events as well.
4813    
4814     * Thuban/UI/tree.py: We can now simply subscribe to the session's
4815     CHANGED channel to be informed of changes.
4816     (SessionTreeCtrl.session_channels): Not needed any longer.
4817 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
4818 bh 234 Only have to (un)subscribe CHANGED
4819    
4820     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
4821    
4822 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
4823     for the wxPython locale bug to __init__.py so that it's
4824     automatically executed by anybody using UI code from Thuban.
4825    
4826 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
4827    
4828 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
4829    
4830     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
4831     as parameter and store it in an instance variable
4832     (MainWindow.invoke_command, MainWindow.update_command_ui)
4833     (MainWindow.save_modified_session, MainWindow.NewSession)
4834     (MainWindow.OpenSession, MainWindow.SaveSession)
4835     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
4836     application object.
4837    
4838     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
4839     the main window with self.
4840    
4841 bh 225 * Thuban/UI/context.py: New module with the context class
4842    
4843     * Thuban/UI/command.py (Command): Update doc string.
4844    
4845     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
4846     MainWindow.update_command_ui): Pass an instance of the context
4847     class to the command's methods
4848     (check_current_tool, call_method): Handle the new context
4849     implementation
4850    
4851     * Examples/simple_extensions/simple_tool.py (simple_tool,
4852     check_simple_tool): Handle the new context implementation
4853    
4854     * Examples/simple_extensions/simple_command.py (simple_command):
4855     Handle the new context implementation. Update the comments about
4856     the context.
4857    
4858     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
4859     doc-string
4860     (ThubanApplication.Session): New method to return the session
4861     object
4862    
4863     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
4864     interactor's selected_layer may not be a layer of the current
4865     session when the tree is updated while a new session is being set.
4866    
4867 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
4868    
4869     * Thuban/UI/tree.py (color_string): Removed. No longer used.
4870     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
4871     update_tree into update_tree and add_items. The tree now uses a
4872     more generic way to display the contents of the tree.
4873     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
4874    
4875     * Thuban/Model/layer.py (Layer.TreeInfo),
4876     Thuban/Model/extension.py (Extension.TreeInfo),
4877     Thuban/Model/map.py (Map.TreeInfo),
4878 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
4879 bh 217 Add TreeInfo methods to implement the new tree view update scheme
4880    
4881 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
4882    
4883     * Thuban/UI/application.py: Don't use "import from" for the
4884     MainWindow. It can't always be resolved.
4885     (ThubanApplication.OnInit): change reference to MainWindow
4886     accordingly.
4887    
4888     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
4889     completely
4890    
4891 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
4892    
4893     * setup.py (create_init_module): New configurable variable whose
4894     default depends on the platform we're running on.
4895     (ThubanInstall.initialize_options): Initialize
4896     self.create_init_module from the global create_init_module
4897     (ThubanInstall.user_options): indictate that the options
4898     create-init-module and init-module-dir have arguments.
4899    
4900     * setup.py: In the setup call change the version number to include
4901     cvs.
4902    
4903     * MANIFEST.in: Add the files in Examples
4904    
4905 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
4906    
4907 bh 210 * setup.py: In the setup call, use the thuban homepage as the
4908     value of the url parameter.
4909    
4910 bh 208 * Examples: New subdirectory for examples.
4911    
4912     * Examples/simple_extensions/simple_tool.xpm,
4913     Examples/simple_extensions/simple_tool.py,
4914     Examples/simple_extensions/simple_command.py,
4915     Examples/simple_extensions/README: Simple examples showing how to
4916     add new commands and tools.
4917    
4918 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
4919     bdist_rpm that we also have an install script.
4920     (bdist_inno): Add 2002 to the copyright notice.
4921    
4922 bh 205 * setup.py: Create a file in python's site-packages directory to
4923     make installation of Thuban as a library easier.
4924     (ThubanInstall.user_options): Add two new options,
4925     create-init-module and init-module-dir
4926     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
4927     filenames for installation in the default directories.
4928     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
4929     the inherited methods to capture some filenames before they're
4930     transformed too much by distutils.
4931     (ThubanInstall.run): Create the init module if requested.
4932     (ThubanInstall.thuban_init_filename): New method to return the
4933     full name of the init module.
4934     (ThubanInstall.get_outputs): Append the filename of the init
4935     module.
4936    
4937 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
4938    
4939 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
4940     handle the prefix properly which means that the default for the
4941     installation prefix should be /usr for RPMs and /usr/local when
4942     doing a normal source install.
4943     (bdist_rpm_install_script): Script to override the default install
4944     commands in the specfile generated by the bdist_rpm command.
4945     (thuban_bdist_rpm.user_options): Add a prefix option
4946     (thuban_bdist_rpm.initialize_options): Init the prefix option.
4947     Create the script files for the spec files as empty files here
4948     (thuban_bdist_rpm._make_spec_file): Override the inherited method
4949     to fill the script files with content.
4950    
4951 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
4952     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
4953     argument. save_session now automatically uses this version,
4954     solving a problem when saving to a relative filename.
4955    
4956     * setup.py: In the setup call, make sure that the library
4957     directories are under $prefix/lib not directly under $prefix.
4958    
4959 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
4960 jan 199
4961     * Thuban/Model/extension.py: new module to handle extension objects.
4962     * Thuban/Model/messages.py: new messages for extensions.
4963     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
4964     Session.AddExtension): new for handling extensions.
4965     Also some other minor changes to round up extension handling.
4966     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
4967     of Extension titles and title and names of its objects.
4968    
4969 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
4970    
4971     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
4972 bh 202 the events for a command.
4973 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
4974     Call bind_command_events to bind the events. add_toolbar_command
4975     can now bind events too so that it's possible to have commands
4976     that are only available through the toolbar.
4977     (MainWindow.init_ids): New instance variable events_bound to keep
4978     track of for which commands events have been bound.
4979    
4980 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
4981    
4982     * Thuban/UI/menu.py: New module to build and manage menus.
4983    
4984     * Thuban/UI/mainwindow.py: Remove some unused imports.
4985     (MainWindow.__init__, main_menu): move the definition of the main
4986     menu from __init__ to the Menu instance main_menu.
4987     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
4988     build the menu bar and sub-menus from a menu description.
4989    
4990     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
4991     startup file
4992     (ThubanApplication.read_startup_files): New method to run
4993     ~/.thuban/thubanstart.py
4994    
4995 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
4996     Move the toolbar definition to the Menu instance main_toolbar.
4997     (MainWindow.build_toolbar): New method to build the toolbar
4998     similar to the build_menu methods
4999    
5000 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
5001    
5002 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
5003     layer_outline_color. Fix it in the definition of the command too.
5004    
5005 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
5006    
5007 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
5008    
5009     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
5010     in the docstring
5011    
5012 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
5013    
5014 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
5015     when the shapefile is empty.
5016     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
5017     now return None for empty shapefiles. Update doc-strings.
5018    
5019     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
5020     the layer's bbox being None.
5021    
5022     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
5023     layer's bbox being None.
5024    
5025 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
5026     necessary.
5027     (MapCanvas.__init__): New instance variables, last_selected_layer
5028     and last_selected_shape to determine how the selection has
5029     changed.
5030    
5031     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
5032     AutoSizeColumns because it will cause a traversal of the entire
5033     table which for large .dbf files will take a very long time.
5034    
5035 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
5036    
5037     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
5038     maximum depth for the tree than shapelib does by default.
5039    
5040 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
5041    
5042     * setup.py (py_modules): The shptree modules doesn't have a
5043     wrapper, so don't include it in the py_modules
5044    
5045 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
5046    
5047     * extensions/shapelib/shptree.c (compare_ints): Make arguments
5048     const void * as in the qsort prototype
5049     (SHPTreeFindLikelyShapes): Remove some unused variables.
5050    
5051     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
5052     maintains to redraw the window during a drag.
5053     (MapCanvas.unprojected_rect_around_point): New method to determine
5054     a small region around a point for hit-testing.
5055     (MapCanvas.find_shape_at): Only test the shapes in a small region
5056     around the point.
5057    
5058     * setup.py: Increment the version to 0.1.2
5059    
5060     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
5061     debug print and set session to None after unsubscribing
5062    
5063 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
5064    
5065 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
5066     the file to have a .thuban extension.
5067    
5068 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
5069     all the session channels to subscribe to to update the tree
5070     (SessionTreeCtrl.session_changed): Remember the session so that we
5071     can unsubscribe properly. Use the new class constant to
5072     unsubscribe from the old session and subscribe to the new one.
5073     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
5074     subscriptions of the SessionTreeCtrl.
5075     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
5076    
5077     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
5078     Session Tree" command to the file menu.
5079    
5080     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
5081     as update_region to the renderer.
5082    
5083     * Thuban/UI/renderer.py
5084     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
5085     update box is now directly a tuple, not a wxRect anymore.
5086    
5087     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
5088     prints.
5089    
5090     2002-05-07 Bernhard Herzog <[email protected]>
5091    
5092 bh 146 * setup.py: Add the shptree extension module. See
5093     extensions/pyshapelib/ChangeLog for more details.
5094    
5095     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
5096     extensions/shapelib/dbfopen.c: Really update to the versions of
5097     shapelib 1.2.9. For some reason it wasn't really done on
5098     2002-04-11.
5099    
5100     * extensions/shapelib/shptree.c: Modified version of shptree.c of
5101     shapelib 1.2.9. The only real difference is the use of qsort
5102     instead of a bubble sort implementation
5103    
5104     * Thuban/Model/layer.py (Layer.__init__): New instance variable
5105     shapetree to hold the shapelib quadtree for the shapefile
5106     (Layer.open_shapefile): Create the quad tree.
5107     (Layer.ShapesInRegion): New method to return the ids of shapes in
5108     a given region using the quad tree.
5109    
5110     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
5111     comment
5112     (draw_polygon_shape): Accept both arcs and polygons.
5113     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
5114     the api.
5115    
5116     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
5117     return the shape ids to be rendered in a given layer.
5118     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
5119     ids. Use draw_polygon_shape to draw arc shapes as well.
5120     (ScreenRenderer.RenderMap): New parameter for the rectangle that
5121     has to be updated
5122     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
5123     calling it's ShapesInRegion method.
5124    
5125     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
5126     update_region for the update region.
5127     (MapCanvas.OnPaint): Maintain the update region
5128     (MapCanvas.do_redraw): Pass the bounding box of the update_region
5129     to the renderer when drawing the bitmap. Reset the update_region.
5130    
5131 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
5132    
5133 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
5134     MainWindow.OpenSession): Change the file extension of the session
5135     files to .thuban
5136    
5137 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
5138     Move the map channels to be forwarded by the session into the
5139 bh 146 class constant with forwarded_channels. Also add
5140     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
5141     forwarded_channels
5142 bh 129
5143     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
5144     typo and some rewording).
5145    
5146 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
5147    
5148     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
5149     around to speed up most redraws:
5150     (MapCanvas.__init__): New instance variable bitmap which holds the
5151     bitmap
5152     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
5153     self.bitmap to draw.
5154     (MapCanvas.full_redraw): New method to force a full redraw
5155     including the bitmap
5156     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
5157     make sure the bitmap is redrawn.
5158     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
5159     MapCanvas.shape_selected): Call full_redraw instead of readraw to
5160     make sure the bitmap is redrawn.
5161     (MapCanvas.OnSize): New method to handle size events so that the
5162     bitmap can be redrawn.
5163    
5164 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
5165    
5166     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
5167     canvas' VIEW_POSITION event
5168     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
5169     Update the text in the status-bar accordingly.
5170    
5171     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
5172     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
5173     called.
5174     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
5175     current_position
5176     (MapCanvas.set_current_position): New method to set
5177     current_position. Issue a VIEW_POSITION event
5178     (MapCanvas.CurrentPosition): New public method to return the value
5179     of current_position. Should be called when the VIEW_POSITION event
5180     is processed.
5181     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
5182     Update the position.
5183     (MapCanvas.OnLeaveWindow): Set the position to None.
5184    
5185     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
5186     position in the statusbar
5187    
5188 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
5189 frank 120
5190     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
5191    
5192 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
5193    
5194 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
5195    
5196     * Resources/Bitmaps/fullextent.xpm: new
5197 jan 116
5198 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
5199 jan 116
5200 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
5201     box
5202 jan 114
5203 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
5204    
5205 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
5206    
5207     * Thuban/UI/tree.py (update_tree): added added map extent
5208    
5209     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
5210 tkoester 403 icon; added map_full_extend as tool
5211 jan 114
5212 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
5213 jan 107
5214     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
5215     saving _new_ sessions
5216    
5217     * Thuban/Model/session.py (create_empty_session): new session
5218     don't have a filename (set to None)
5219    
5220     * Thuban/UI/tree.py (update_tree): added filename and modified flag
5221    
5222     * Thuban/Model/load.py (ProcessSession): convert projection
5223     parameters from unicode to regular string
5224    
5225     * Data/iceland_sample.session: Added UTM Zone 26 projection.
5226    
5227 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
5228    
5229     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
5230     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
5231     1.2.9
5232    
5233     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
5234     the pyshapelib directoy into the list of include dirs, so that
5235     pyshapelib_api.h can be found.
5236    
5237     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
5238     holds the pyshapelib C-API
5239     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
5240     pyshapelib_api to access the shapelib functions.
5241     (initwxproj): Import the c_api from the shapelib module and
5242     initialize pyshapelib_api.
5243    
5244 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
5245    
5246 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
5247     initialize_options to create the scripts for the rpm.
5248    
5249 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
5250    
5251 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
5252    
5253 bh 87 * setup.py: Increment version to 0.1.1
5254    
5255 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
5256     Layer" and "Remove Layer" commands from the layer menu to the map
5257     menu
5258    
5259 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
5260    
5261     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
5262     argument (python <= 1.5.2 erroneously accepted multiuple
5263     arguments)
5264    
5265 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
5266    
5267     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
5268     RecordGrid in the identifyview.
5269     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
5270     IdentifyListCtrl. The grid allows editing of the values.
5271    
5272     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
5273     implementing a grid for a single row of a thuban table.
5274    
5275     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
5276     layers by default. Easier to use than the previous default of only
5277     searching through the select layer which meant that if no layer
5278     was selected, you couldn't select a shape.
5279    
5280     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
5281    
5282     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
5283     stroke_width attribute
5284    
5285     * Thuban/Model/save.py (save_session): Write the new stroke_width
5286     attribute
5287    
5288     * Thuban/Model/load.py (ProcessSession.startElement): Read the
5289     stroke_width attribute
5290    
5291     * Thuban/Model/layer.py (Layer.__init__): New parameter and
5292     instance variable stroke_width
5293     (Layer.SetStrokeWidth): Set the stroke_width.
5294    
5295 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
5296    
5297     * extensions/thuban/wxproj.cpp (project_points): Fix two
5298     off-by-one errors in the last loop that joins the various parts
5299     together.
5300    
5301 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
5302    
5303     * setup.py (data_dist.make_distribution): Fix some typos
5304    
5305 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
5306    
5307     * README: Slight tweaking in preparation for the 0.1 release
5308    
5309     * setup.cfg: Add section for sdist to create both tgz and zip
5310     archives
5311    
5312     * setup.py: increase version number to 0.1
5313     (data_dist): New command class for data distribution
5314    
5315 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
5316    
5317 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
5318     Handle the case of no layer (i.e. layer is None) properly.
5319    
5320 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
5321 bh 70 Set the initial selection of the combo boxes to reflect the
5322     projection we're starting with in a way that works on windows,
5323     too.
5324    
5325 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
5326     puiblisher's ids in hex to make it easier to compare them to the
5327     standard repr of python methods
5328    
5329     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
5330     messages
5331    
5332 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
5333    
5334 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
5335     deselect the layer if no layer is selected
5336    
5337 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
5338     idle time when there actually is something to draw. If there's
5339     nothing to draw simply clear the window
5340     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
5341     (MapCanvas.SetMap): force a redraw in all cases because
5342     FitMapToWindow doesn't always do it.
5343     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
5344     specify the point to move into the center of the window
5345     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
5346     dragged, zoon in/out by a factor of 2
5347 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
5348     index, i.e. reversed drawing order) so that objects appearing to
5349     be in from of others are selected first. This is probably mostly
5350     relevant for point shapes where the symbols used may overlap
5351 bh 59
5352     * Thuban/Model/session.py (create_empty_session): Unset the
5353     modified bit before returning it
5354    
5355     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
5356     create_empty_session session to create the new, empty session.
5357    
5358     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
5359     the tool bitmaps.
5360     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
5361     the code that asks whether the session should be saved into the
5362     new method save_modified_session.
5363     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
5364     method to save modified session here too.
5365    
5366 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
5367    
5368     * setup.py (InnoIconItem): fix typo
5369    
5370     (thuban_bdist_inno.run):
5371     (bdist_inno.run): Move the decision not to create symlinks on
5372     non-nt platforms to thuban_bdist_inno and do it unconditinally
5373     since we never want to create the symlinks here
5374    
5375 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
5376    
5377 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
5378     identify view immediately
5379    
5380     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
5381     and SelectableRecordListCtrl that implement the code shared by the
5382     identify view and the label dialog
5383    
5384     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
5385     new class RecordListCtrl
5386    
5387     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
5388     return value of GetValue is None instead of using it as a boolean
5389     directly so that Zero numbers are handled properly.
5390     (LabelListCtrl): Derive from the new class
5391     SelectableRecordListCtrl
5392    
5393 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
5394     (Proj4Dialog.dialogLayout): Make the window resizable and set the
5395     size of the text control explicitly to make the sizers work on
5396     both Windows and X.
5397    
5398 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
5399    
5400     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
5401     that can limit the search to the currently selected layer.
5402     (MapCanvas.SelectShapeAt): Make sure that the currently selected
5403     layer stays selected even when no shape is found
5404 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
5405     height do nothing (avoids zero division errors)
5406 bh 44
5407 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
5408    
5409 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
5410     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
5411     convenient :-)
5412     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
5413     a new instvar layer_to_item to map layers to tree items
5414     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
5415     to match the current selection in the interactor
5416    
5417 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
5418     (Interactor.HasSelectedLayer): New methods to query the current
5419     selection
5420    
5421     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
5422     (MainWindow.has_selected_layer): Simply call the appropriate
5423     interactor method
5424    
5425     * Thuban/UI/mainwindow.py (MainWindow.__init__):
5426     (MainWindow.LayerShowTable):
5427     (MainWindow.identify_view_on_demand): Store the interactor in an
5428     instvar and use that reference instead of going through main.app
5429    
5430 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
5431     * Thuban/UI/application.py (ThubanApplication.OnInit):
5432 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
5433     with the new mainwindow method ShowSessionTree and not directly
5434     the application's OnInit method
5435    
5436     * Thuban/UI/tree.py (myTreeCtrlPanel):
5437     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
5438     TreeCtrl isntead of a panel. This affects most method since we now
5439     refer to self instead of self.tree
5440     (SessionTreeView): New class implementing a non-modal dialog
5441     showing the session tree.
5442    
5443 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
5444     layer to the tableview dialog.
5445    
5446     * Thuban/UI/tableview.py: Add some doc-strings
5447 tkoester 403 (TableGrid):
5448 bh 35 (TableGrid.OnRangeSelect):
5449     (TableGrid.OnSelectCell):
5450     (TableFrame.__init__):
5451     (TableFrame.row_selected):
5452     Selecting rows in the grid view now updates the selected shapes
5453     through the TableFrame. To achieve this we derive TableGrid from
5454     Publisher and introduce the message type ROW_SELECTED which the
5455     TableFrame subscribes to and which is issued by OnRangeSelect and
5456     OnSelectCell
5457    
5458     (DataTable.SelectRow): Removed because it's no longer needed in
5459     the row/shape selection scheme
5460    
5461 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
5462     dialogs
5463    
5464     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
5465     the SELECTED_SHAPE message anymore. This is now handled by the
5466     parent.
5467     (TableGrid.select_shape): Only update the selection if the shape
5468     is not None.
5469     (TableFrame): Inherit from the new NonModalDialog class.
5470     (TableFrame.__init__, TableFrame.select_shape): Handle the
5471     SELECT_SHAPE message.
5472     (TableFrame.OnClose): Extend the inherited method to unsubscribe
5473     SELECT_SHAPE
5474    
5475     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
5476     (MainWindow.add_dialog):
5477     (MainWindow.dialog_open):
5478     (MainWindow.remove_dialog):
5479     (MainWindow.get_open_dialog): New methods to maintain a dictionary
5480     of opened non-modal dialogs.
5481    
5482     (MainWindow.__init__): Initialize the new non-modal dictionary
5483     management code
5484     (MainWindow.LayerShowTable): maintain separate dialogs for each
5485     table using the non-modal dialog management code to only open a
5486     view once for each table.
5487    
5488     (MainWindow.IdentifyTool):
5489     (MainWindow.__init__):
5490     (MainWindow.identify_view_on_demand): Don't open the identify view
5491     in IdentifyTool anymore. This will be done automatically by the
5492     new method identify_view_on_demand which handles the
5493     SELECTED_SHAPE message so that the identify view will be opened on
5494     demand
5495    
5496     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
5497     the interactor argument. The SELECTED_SHAPE message is now handled
5498     by the parent.
5499     (IdentifyView.__init__): Add the interactor argument so that we
5500     can handle the SELECTED_SHAPE message here
5501     (IdentifyView.selected_shape): New method to handle the
5502     SELECTED_SHAPE messages
5503    
5504     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
5505     NonModalDialog class
5506     (IdentifyView.OnClose): Extend the inherited version to
5507     unsubscribe SELECT_SHAPE
5508    
5509     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
5510    
5511 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
5512    
5513     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
5514 tkoester 403
5515 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
5516     interactor to pass through to the MapCanvas
5517 tkoester 403
5518 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
5519     argument to the MainWindow constructor to get rid of the ugly hack
5520     that made main.app available early just so that the mapcanvas
5521     could access the interactor object.
5522    
5523 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
5524    
5525 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
5526     that runs a modal message box
5527     (MainWindow.OnClose): Use the new method
5528     (MainWindow.RemoveLayer): Just do nothing in case no layer is
5529     selected. The command should be grayed out anyway, so there's no
5530     need to pop up a message box.
5531     (MainWindow.AddLayer): Pop up a message box with an error message
5532     if the shape file can't be opened
5533    
5534     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
5535     immediately. This will cause an exception in case the file can't
5536     be opened and we can display an appropriate message.
5537    
5538 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
5539    
5540     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
5541     specific bdist_rpm command.
5542    
5543     * Thuban/UI/main.py: Catch ImportError exceptions when importing
5544     the locale module because it may not be available on some
5545     installations.
5546    
5547     * extensions/pyprojection/LICENSE: Copy of the license text in
5548     Projection.i. Having it in a separate file makes it easier to
5549     refer to license text in e.g. RPMs
5550    
5551 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
5552    
5553 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
5554     more generic
5555    
5556     * setup.py (ThubanInstall.get_outputs): Add the symlink in
5557     <prefix>/bin to the outputs
5558     (ThubanInstall.link_file): New method to link files. We need this
5559     because the standard copy_files refuses to link non-existing
5560     files.
5561     (ThubanInstall.run): Remove the leading install root from the
5562     script filename if an install root was specified and use the new
5563     link_file method
5564 tkoester 403
5565 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
5566     the window when the first layer is added to the map.
5567    
5568     * setup.py (ThubanInstall.run): Honor the build root (self.root)
5569     when linking thuban.py to <prefix>/bin
5570    
5571 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
5572    
5573     * setup.py: In the setup call, the install parameters shouldn't
5574     have trailing slashes because distutils on non-posix platforms
5575     doesn't like that. The same applies to other directories like
5576     "Resources/Bitmaps"
5577    
5578     In the configuration section for nt, move the wxWindows directory
5579     optins into the part clearly marked as editable.
5580    
5581     (InstallLocal.initialize_options):
5582     (InstallLocal.user_options): remove the currently unused debug
5583     flag
5584     (thuban_build_py.find_all_modules): Add this method so that it
5585     works for our case of having packages and modules in one
5586     distribution as well.
5587     (ThubanInstall.initialize_options):
5588     (ThubanInstall.finalize_options):
5589     (ThubanInstall.user_options):
5590     (ThubanInstall.boolean_options): Add new options, do-symlink and
5591     extra files. Since these are the first ThubanInstall specific
5592     options, override user_options and boolean_options
5593     (ThubanInstall.run): Honor the new do-symlink and extra-files
5594     options.
5595     (ThubanInstall.get_outputs): Add to override the base-class's
5596     version and add the extra-files to the outputs
5597     (bdist_inno): New class for windows distributions with Inno Setup
5598     (InnoIconItem): Helper class for bdist_inno
5599     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
5600     this together with the appropriate parameters, to the setup call.
5601 tkoester 403
5602 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
5603     installer
5604    
5605     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
5606     changing_selection to avoid recursive selection events when
5607     modifying the selection in response to a selection event.
5608     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
5609     changing the tree's selection.
5610     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
5611     we're not being called indirectly from normalize_selection.
5612    
5613     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
5614     event.Check only if the command is actuall checkable.
5615     (MainWindow.__init__): Call the toolbar's Realize method to make
5616     sure that the items are actually shown
5617    
5618 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
5619    
5620 bh 9 * setup.py: Fix some doc strings
5621    
5622 bh 7 * ChangeLog: started
5623    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26