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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1416 - (show annotations)
Mon Jul 14 15:16:57 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 221620 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26