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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1406 - (show annotations)
Thu Jul 10 16:50:08 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/ChangeLog
File size: 221177 byte(s)
updated ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26