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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1411 - (show annotations)
Mon Jul 14 10:09:35 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/ChangeLog
File size: 221517 byte(s)
Added test for #2013

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26