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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1403 - (hide annotations)
Thu Jul 10 14:56:46 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 221007 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26