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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1420 - (show annotations)
Tue Jul 15 09:29:39 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 222686 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26