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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1828 - (show annotations)
Tue Oct 14 16:04:43 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 300409 byte(s)
update ChangeLog

1 2003-10-14 Bernhard Herzog <[email protected]>
2
3 * test/test_proj.py: Execute support.run_tests when run as
4 __main__ so that missing unsubscribes are detected
5 (TestProjFile.tearDown): Destroy the proj_file properly
6
7 2003-10-14 Bernhard Herzog <[email protected]>
8
9 * Thuban/Model/messages.py (PROJECTION_ADDED)
10 (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
11 the ProjFile objects
12
13 * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
14 easily send messages when the projections change
15 (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
16 when the change was successful
17
18 * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
19 proj file messages
20 (TestProjFile.test_add_remove)
21 (TestProjFile.test_remove_non_existing)
22 (TestProjFile.test_replace)
23 (TestProjFile.test_replace_non_existing): Test whether the right
24 messages are sent
25
26 2003-10-14 Bernhard Herzog <[email protected]>
27
28 * test/test_proj.py (TestProjFile.test): Refactor into several
29 tests
30 (TestProjFile.test_add_remove)
31 (TestProjFile.test_remove_non_existing)
32 (TestProjFile.test_replace)
33 (TestProjFile.test_replace_non_existing): Some of the new
34 individual test cases
35 (TestProjFileSimple): New class for the rest of the test cases
36 that came out of the refactoring
37 (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
38 derived classes don't have to
39
40 2003-10-13 Bernhard Herzog <[email protected]>
41
42 Add an optional EPSG code to the projection objects and extend the
43 .proj file format accordingly.
44
45 * Resources/XML/projfile.dtd (element projection): Add epsg
46 attribute
47
48 * Thuban/Model/proj.py (Projection.__init__): New parameter and
49 instance variable epsg. Update doc-string
50 (Projection.EPSGCode, Projection.Label): New methods to provide
51 access to EPSG code and a label for use in dialogs
52
53 * Thuban/Model/resource.py (ProjFileReader.start_projection)
54 (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
55 Handle the epsg code attribute when reading or writing proj files
56
57 * Thuban/UI/projdialog.py (ProjFrame._OnSave)
58 (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
59 (ProjFrame.__FillAvailList): Use the projection's Label method to
60 get the string for the list box
61
62 * test/test_proj.py (TestProjection.test_label)
63 (TestProjection.test_label_epsg)
64 (TestProjection.test_epsgcode_for_non_epsg_projection)
65 (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
66 for the label and EPSGCode methods
67 (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
68 (WriteProjFileTests.test_write_empty_file): Create the ProjFile
69 objects in the test cases and put the expected contents into the
70 test case methods too. Update doTestWrite accordingly
71 (TestLoadingProjFile)
72 (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
73 read tests from TestProjFile.
74 (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
75 tests are now in the new classes.
76 (sample_projfile, sample_projfile_data)
77 (sample_projfile2, sample_projfile_data2): Removed. Not used
78 anymore.
79 (TestProjFile.test_read_unreadable_file): No need to reset the
80 permissions at the end anymore since we use a unique filename
81
82 2003-10-13 Bernhard Herzog <[email protected]>
83
84 * test/test_proj.py: Some more refactoring of the test cases
85 (ProjFileTest): New base class for the proj file tests.
86 (TestProjFile): Derive from ProjFileTest
87 (TestProjFile.test_read_unreadable_file)
88 (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
89 the new filename method to get a unique filename
90 (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
91 (WriteProjFileTests): New class for proj file write tests.
92 Contains the write test that were in TestProjFile originally.
93
94 2003-10-13 Bernhard Herzog <[email protected]>
95
96 * test/test_proj.py (TestProjFile.testRead)
97 (TestProjFile.test_read_non_existing_file)
98 (TestProjFile.test_read_unreadable_file)
99 (TestProjFile.test_read_empty_file): Split into several methods.
100
101 2003-10-10 Bernhard Herzog <[email protected]>
102
103 * Thuban/UI/sizers.py: New file with custom sizers.
104
105 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
106 all projection type specific panels and put them into a
107 NotebookLikeSizer. This way the dialog doesn't change its size
108 when a different projection is selected
109 (ProjFrame.__init__): Rename projection_panels
110 projection_panel_defs and reuse projection_panels for a list of
111 the instantiated panels.
112 (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
113 (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
114 the panels
115 (UnknownProjPanel._DoLayout): Place the newlines in the message
116 differently to make the panel narrower.
117 (TMPanel._DoLayout): Layout the parameters in one column.
118
119 2003-10-10 Bernhard Herzog <[email protected]>
120
121 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
122 that contains all the setup for the dialog's widgets, layout and
123 event handling.
124 (__): Call build_dialog to build the dialog.
125 (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
126 Their functionality is now in build_dialog
127 (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
128 (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
129 (ProjFrame.__DoOnProjChoice): Small updates due to slightly
130 different widget names and hierarchy introduced with build_dialog.
131
132 2003-10-10 Bernhard Herzog <[email protected]>
133
134 * README: Fix typo.
135
136 2003-10-09 Bernhard Herzog <[email protected]>
137
138 * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
139 projection is already in the list. This is *a lot* faster when
140 loading files with hundreds of projections since it saves a linear
141 search. OTOH this will allow adding the same projection to the
142 user.proj file multiple times in the projection dialog but we'll
143 deal with that later
144
145 2003-10-09 Jan-Oliver Wagner <[email protected]>
146
147 * devtools: New. Directory for developer tools that are not intended
148 for the regular user.
149
150 * devtools/create_epsg.py: New. Convert the epsg file of proj into
151 a python .proj file.
152
153 2003-10-09 Bernhard Herzog <[email protected]>
154
155 * test/test_proj.py
156 (TestProjection.test_get_parameter_without_equals_sign): New. Test
157 whether GetParameter handles parameters without "=" sign correctly
158
159 * Thuban/Model/proj.py (Projection.GetParameter): Handle
160 parameters that do not contain a "=". Update the doc-string
161
162 2003-10-08 Bernhard Herzog <[email protected]>
163
164 * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
165 length limit on the projname text control
166
167 2003-10-08 Bernhard Herzog <[email protected]>
168
169 * test/test_proj.py (TestProjection.test_get_projection_units_geo)
170 (TestProjection.test_get_projection_units_normal): New. Tests for
171 the Projection.GetProjectedUnits method
172
173 2003-10-08 Jan-Oliver Wagner <[email protected]>
174
175 * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
176 Added missing 'val' parameter.
177
178 2003-10-08 Bernhard Herzog <[email protected]>
179
180 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
181 projection type of the currently selected projection is not known,
182 i.e. there's no panel for it, use the UnknownProjPanel
183 (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
184 the actual replacing of the proj panel into the new method
185 _show_proj_panel.
186 (UnknownProjPanel): Add doc-string.
187 (UnknownProjPanel._DoLayout): Insert a newline into the text so
188 that the panel is not so wide.
189
190 2003-10-08 Bernhard Herzog <[email protected]>
191
192 * Thuban/Model/resource.py (read_proj_file): Return the warnings
193 too. Update the doc-string
194 (get_proj_files): Removed. It wasn't used anywhere
195 (get_system_proj_files, get_system_proj_file): Rename to
196 get_system_proj_file and return the ProjFile object and not a list
197 of ProjFile objects. Update the callers.
198 (get_user_proj_files, get_user_proj_file): Rename to
199 get_user_proj_file return the ProjFile object and not a list of
200 ProjFile objects. Update the callers.
201 (ProjFileReader.__init__): New instance variable for the warnings.
202 Rename the __pf ivar to projfile. Update the methods referring to
203 __pf
204 (ProjFileReader.end_projection): Catch any errors raised when
205 instantiating the projection and record that as an error. The
206 projection will not be in the final ProjFile object.
207 (ProjFileReader.GetWarnings): New method to return the warnings.
208
209 * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
210 show the warnings from the projfile reader
211 (ProjFrame._OnImport): Deal with any warnings returned by
212 read_proj_file
213 (ProjFrame.__FillAvailList): Deal with any warnings returned by
214 get_system_proj_file or get_user_proj_file.
215
216 * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
217 (TestProjFileWithInvalidParameters.file_contents): New test cases
218 to test whether read_proj_file handles invalid projection
219 parameters correctly
220 (TestProjFile.test_get_system_proj_file): New. Simple test for
221 resource.get_system_proj_file
222
223 2003-10-07 Bernhard Herzog <[email protected]>
224
225 * test/test_derivedshapestore.py
226 (TestDerivedShapeStoreExceptions.tearDown): Clear the session
227 properly so that the temporary directories get deleted correctly
228
229 2003-10-06 Bernhard Herzog <[email protected]>
230
231 Handle the title changes in a proper MVC way.
232
233 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
234 canvas' TITLE_CHANGED messages
235 (MainWindow.update_title): New. Update the main window's title
236 (MainWindow.__SetTitle): Removed. Use update_title instead.
237 (MainWindow.SetMap): Use update_title instead of __SetTitle
238 (MainWindow.RenameMap): Do change the window title explicitly
239 here. That's handled in a proper MVC way now.
240 (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
241 messages
242
243 * Thuban/Lib/connector.py (Conduit): New class to help classes
244 that forward messages
245
246 * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
247 (ViewPort): Derive from Conduit instead of Publisher
248 (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
249 when calling the inherited versions
250 (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
251 methods to subscribe and unsubscribe map messages
252 (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
253 handle the map subscriptions
254 (ViewPort.Map, ViewPort.map_projection_changed)
255 (ViewPort.layer_projection_changed): Add or update doc-strings
256
257 * test/test_connector.py (TestPublisher.test_issue_simple): Fix
258 typo
259 (MyConduit): Helper class for the Conduit test.
260 (TestConduit): Test cases for Conduit
261
262 * test/test_connector.py: Use support.run_tests as main.
263
264 * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
265 the TITLE_CHANGED messages
266 (ViewPortTest.test_forwarding_title_changed): New test to check
267 whether the viewport forwards the map's TITLE_CHANGED messages
268 (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
269 after the port's because the latter may require a still functional
270 map.
271
272 2003-10-06 Bernhard Herzog <[email protected]>
273
274 * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
275 doc-string
276
277 2003-10-06 Bernhard Herzog <[email protected]>
278
279 * test/test_viewport.py (ViewPortTest.setUp)
280 (SimpleViewPortTest.test_init_with_size): Move the test for the
281 initial size as a constructor parameter from ViewPortTest.setUp
282 method to a new separate test in SimpleViewPortTest.
283
284 2003-10-06 Bernhard Herzog <[email protected]>
285
286 * test/test_viewport.py (MockView): New class derived from
287 ViewPort with a mock implementation of GetTextExtent to be used in
288 the test cases
289 (ViewPortTest.setUp): Use MockView instead of ViewPort
290
291 * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
292 into what would be a "pure virtual function" in C++: always raise
293 NotImplementedError. Mock implementations for test cases don't
294 belong into the real code
295
296 2003-10-02 Bernhard Herzog <[email protected]>
297
298 * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
299 close the dbf file we create so that it's contents have been
300 written properly.
301
302 * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
303 libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
304 Update to shapelib 1.2.10
305
306 2003-10-01 Jan-Oliver Wagner <[email protected]>
307
308 * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
309 it annoys lintian which warns about these files not being
310 executable. The #! isn't necessary here since if you absolutely
311 must execute them you can always say "python <filename>".
312
313 2003-09-26 Bernhard Herzog <[email protected]>
314
315 * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
316 only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
317 is ported to a newer the import will fail, so it should be noticed
318 immediately that this function is gone.
319 Fixes RT#1919
320
321 2003-09-26 Bernhard Herzog <[email protected]>
322
323 Add a DTD for the projection files and make thuban write valid
324 projection files
325
326 * Resources/XML/projfile.dtd: New. DTD for thuban's projection
327 files
328
329 * Thuban/Model/resource.py (ProjFileSaver.write): Use
330 'projectionlist' as the name in the document type declaration so
331 that it matches the element type of the root element.
332
333 * test/test_proj.py (sample_projfile, sample_projfile2): Use
334 'projectionlist' as the name in the document type declaration just
335 as it is done now in the files thuban would write
336 (sample_projfile, sample_projfile_data): Fix spelling of
337 "Mercator"
338 (TestProjFile.doTestWrite): Validate the written and the expected
339 XML data
340 (TestProjFile): Derive from ValidationTest so that we can run xml
341 validation tests
342
343 2003-09-24 Bernhard Herzog <[email protected]>
344
345 * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
346 modify the list returned by map.Layers() in place since it is the
347 actual list of layers used by the map.
348
349 2003-09-23 Jan-Oliver Wagner <[email protected]>
350
351 * Doc/manual/thuban-manual.xml: Added subsection to chapter
352 Extensions to describe the extensions coming with the Thuban
353 standard package (gns2shp and importAPR).
354
355 2003-09-23 Bernhard Herzog <[email protected]>
356
357 * libraries/thuban/wxproj.cpp (project_point): if there's an
358 inverse but no forward projection, convert to degrees after
359 applying the inverse projection. Fixes RT#2096
360
361 * test/test_wxproj.py: New. Test cases for wxproj.so. One test
362 implicitly tests for the fix to RT#2096
363
364 * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
365 Check that the sequences have the same lengths
366
367 * Resources/Projections/defaults.proj (Geographic projection): Use
368 a much more precise value for the to_meter attribute.
369
370 2003-09-22 Bernhard Herzog <[email protected]>
371
372 * test/support.py (initthuban): Make sure to unset the LANG env.
373 var. so that tests that compare translated strings work. Solves RT
374 #2094
375
376 2003-09-22 Jan-Oliver Wagner <[email protected]>
377
378 Small improvement of APR import.
379
380 * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
381 Added tests for text-ranges.
382
383 * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
384 returns a string object if the range is based on text.
385
386 * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
387 range retrieval.
388
389 2003-09-22 Jan-Oliver Wagner <[email protected]>
390
391 Initial version of the importAPR extension which is in
392 experimental state.
393
394 * /Extensions/importAPR/, /Extensions/importAPR/samples/,
395 /Extensions/importAPR/test/: New directories.
396
397 * /Extensions/importAPR/samples/README: New: Howto load the samples.
398
399 * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
400 file which refers to the Thuban Iceland demo data.
401
402 * /Extensions/importAPR/test/README: New: Howto execute the tests.
403
404 * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
405
406 * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
407 as in '.apr'-files.
408
409 * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
410 ODB Objects as in '.apr', '.avl' and other files.
411
412 * /Extensions/importAPR/__init__.py: New: Init to make this
413 directory a package.
414
415 * /Extensions/importAPR/importAPR.py: New: Import a ArcView
416 project file (.apr) and convert it to Thuban.
417
418 2003-09-22 Jan-Oliver Wagner <[email protected]>
419
420 * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
421
422 2003-09-19 Jan-Oliver Wagner <[email protected]>
423
424 * Doc/manual/thuban-manual.xml: Extended section 'Installation'
425 with description on RPM installation and RPM binary package
426 creation.
427
428 2003-09-18 Bernhard Herzog <[email protected]>
429
430 * setup.py (data_files): Only add the mo files if the Locales
431 directory actually exists, so that setup.py works with a fresh CVS
432 checkout
433
434 2003-09-12 Jan-Oliver Wagner <[email protected]>
435
436 * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
437 in viewport, not anymore in view
438
439 2003-09-04 Jan-Oliver Wagner <[email protected]>
440
441 Introducing first Extension (gns2shp).
442
443 * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
444
445 * Extensions/__init__.py: New. init to make this dir a package.
446
447 * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
448
449 * Extensions/gns2shp/test/README: New. some info on this test directory.
450
451 * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
452
453 * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
454 of Shapefile from GNS text file format
455
456 2003-09-03 Jan-Oliver Wagner <[email protected]>
457
458 Fix/workaround for bug #2019:
459 https://intevation.de/rt/webrt?serial_num=2019
460
461 * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
462 (IdentifyView.__init__): Added another button that allows to
463 stop the identify mode.
464 (IdentifyView.OnStop): New. Stops the identify mode.
465
466 2003-09-03 Jan-Oliver Wagner <[email protected]>
467
468 Introducing a new exception dialog that allows to exit the
469 application immediately.
470 This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
471
472 * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
473
474 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
475 Made strings available to translations. Exchanged the simple
476 ScrolledMessageDialog by the new ExceptionDialog.
477
478 2003-09-01 Bernhard Herzog <[email protected]>
479
480 * NEWS: New. Summary of changes and release notes.
481
482 * MANIFEST.in: Add NEWS
483
484 2003-09-01 Bernhard Herzog <[email protected]>
485
486 * MANIFEST.in: Correct the include statement for the mo-files and
487 include the documentation too.
488
489 * setup.py (data_files): Add the .mo files
490 (setup call): Up to version 0.9.0
491
492 2003-09-01 Bernhard Herzog <[email protected]>
493
494 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
495 parameter list to just parent and session
496 (ChooseDBTableDialog.__set_properties): Removed. Setting the
497 selection of empty list boxes is not allowed (and produces C++
498 assertion errors) and the rest of the setup is better done in
499 __init__ anyway.
500 (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
501 (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
502 builtins True/False for booleans to avoid warnings from wxPython
503
504 * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
505 ChooseDBTableDialog constructor parameters.
506
507 2003-09-01 Bernhard Herzog <[email protected]>
508
509 * Thuban/Model/postgisdb.py
510 (PostGISTable): Extend doc-string
511 (PostGISTable._fetch_table_information): Set the column index
512 correctly, pretending ignored columns don't exist.
513
514 * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
515 for postgis tables with data types not yet supported by thuban.
516
517 2003-08-29 Bernhard Herzog <[email protected]>
518
519 * HOWTO-Release: Tweak item about running the tests.
520
521 2003-08-29 Jan-Oliver Wagner <[email protected]>
522
523 * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
524
525 2003-08-29 Bernhard Herzog <[email protected]>
526
527 Add some missing parameters to projections. Proj complains about
528 them on windows but for some reason not on Linux.
529
530 * test/test_save.py (SaveSessionTest.testLayerProjection): Add
531 missing required projection parameters
532
533 * test/test_proj.py (TestProjFile.test): Add missing required
534 projection parameters
535
536 * test/test_load_0_8.py (TestLayerProjection.file_contents)
537 (TestLayerProjection.test): Add missing required projection
538 parameters and tests for them
539
540 * test/test_load.py (TestLayerProjection.file_contents)
541 (TestLayerProjection.test): Add missing required projection
542 parameters and tests for them
543
544 * test/test_layer.py (TestLayer.test_base_layer): Add missing
545 required projection parameters
546
547 2003-08-29 Bernhard Herzog <[email protected]>
548
549 * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
550 access the pj_errno because directly accessing pj_errno doesn't
551 work on windows if the proj library is in a DLL
552
553 * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
554
555 2003-08-28 Bernhard Herzog <[email protected]>
556
557 * test/test_proj.py: Import things from Thuban after calling
558 initthuban
559
560 * test/test_load.py (LoadSessionTest.filenames): New class
561 variable with the filename attributes to normalize
562 (LoadSessionTest.check_format): Pass self.filenames to
563 sax_eventlist to normalize the filename attributes
564
565 * test/xmlsupport.py: Add cvs keywords
566 (SaxEventLister.__init__): New parameter filenames which indicates
567 attributes that contain filenames
568 (SaxEventLister.startElementNS): Normalize the filename attributes
569 with os.path.normpath
570 (sax_eventlist): New parameter filenames to pass through to
571 SaxEventLister
572
573 * test/test_derivedshapestore.py: Make this file callable as a
574 program to execute the tests
575 (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
576 the session to self.session so that it gets destroyed properly
577
578 * test/test_layer.py (TestLayer.tearDown): Call the session's
579 Destroy method
580
581 * test/test_map.py (TestMapBase.tearDown): Destroy self.session
582 too if it exists
583 (TestMapAddLayer.test_add_layer): Bind the session to self.session
584 so that it gets destroyed properly
585
586 * test/postgissupport.py (reason_for_not_running_tests): Add a
587 test for the existence of popen2.Popen4.
588
589 * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
590 reliable way to destroy the sessions created in the test cases
591 (SaveSessionTest.test_dbf_table): Bind the session to self.session
592 so that it gets destroyed properly
593 (SaveSessionTest.testLayerProjection): Bind the session to
594 self.session so that it gets destroyed properly
595
596 * test/test_session.py (UnreferencedTablesTests.tearDown): Make
597 sure that the session is destroyed properly
598
599 * test/test_shapefilestore.py: Make this callable as a program to
600 execute the tests
601
602 * test/test_scalebar.py: Remove unnecessary import of _ from
603 Thuban
604
605 * test/support.py (print_garbage_information): Call initthuban
606 here because it may be called indirectly from test cases that test
607 test support modules which do not use anything from thuban itself
608 (ThubanTestProgram.runTests): Remove unnecessary debug print
609
610 2003-08-28 Bernhard Herzog <[email protected]>
611
612 * Thuban/version.py (longversion): Update to 0.9
613
614 * Thuban/UI/mainwindow.py: Remove some unused imports
615
616 * README: Add section about required additional software. Add date
617 and revision CVS keywords
618
619 * HOWTO-Release: Add item about the translations. Add date and
620 revision CVs keywords and change formatting to match README a bit
621 better
622
623 * po/de.po: Update for 0.9
624
625 * test/README: Tweak the wording a little because many tests are
626 not really unittest.
627
628 2003-08-27 Bernhard Herzog <[email protected]>
629
630 As preparation for the 0.9 release, switch thuban files to a
631 non-dev namespace
632
633 * Thuban/Model/save.py (SessionSaver.write_session): Write files
634 with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
635 namespace
636
637 * Thuban/Model/load.py (SessionLoader.__init__): Accept the
638 http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
639
640 * test/test_save.py (SaveSessionTest.dtd)
641 (SaveSessionTest.testEmptySession)
642 (SaveSessionTest.testSingleLayer)
643 (SaveSessionTest.testLayerProjection)
644 (SaveSessionTest.testRasterLayer)
645 (SaveSessionTest.testClassifiedLayer)
646 (SaveSessionTest.test_dbf_table)
647 (SaveSessionTest.test_joined_table)
648 (SaveSessionTest.test_save_postgis): Update for new namespace
649
650 * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
651 (TestLayerVisibility.file_contents, TestLabels.file_contents)
652 (TestLayerProjection.file_contents)
653 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
654 (TestPostGISLayer.file_contents)
655 (TestPostGISLayerPassword.file_contents)
656 (TestLoadError.file_contents, TestLoadError.test): Update for new
657 namespace
658
659 2003-08-27 Bernhard Herzog <[email protected]>
660
661 Make the table interface distinguish between row ids (an integer
662 that uniquely identifies a row) and row ordinals (a simple row
663 count from 0 to NumRows() - 1)
664
665 * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
666 (PostGISTable.RowOrdinalToId): New methods to conver between row
667 ids and row ordinals
668 (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
669 parameter row_is_ordinal to indicate whether the row parameter is
670 the row id or the ordinal
671
672 * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
673 (TransientTableBase.RowOrdinalToId)
674 (AutoTransientTable.RowIdToOrdinal)
675 (AutoTransientTable.RowOrdinalToId): Same new methods as in
676 PostGISTable.
677 (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
678 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
679 Same new parameter as in PostGISTable.
680
681 * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
682 (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
683 (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
684 (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
685 (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
686 parameter as in PostGISTable.
687
688 * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
689 (DataTable.RowOrdinalToId): New methods to convert between row ids
690 and row ordinals.
691 (TableGrid.SelectRowById): New method to select a row based on its
692 ID as opposed to its ordinal
693 (DataTable.GetValue, TableGrid.OnRangeSelect)
694 (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
695 (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
696 (LayerTableFrame.__init__): Convert between row ids and row
697 ordinals as appropriate
698
699 * test/postgissupport.py (PostGISDatabase.__init__): Add
700 doc-string.
701 (PostGISDatabase.initdb): The optional third item in a tuple in
702 tables is now a (key, value) list with additional arguments to
703 pass to upload_shapefile
704 (upload_shapefile): New parameter gid_offset to allow gids that
705 are not the same as the shapeids in the shapefile
706 (PostgreSQLServer.get_default_static_data_db): Use the new
707 gid_offset to make the gids in landmarks 1000 higher than the
708 shapeids in the shapefile
709
710 * test/test_viewport.py
711 (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
712 new shapeids in the landmarks table
713
714 * test/test_transientdb.py
715 (TestTransientTable.run_iceland_political_tests)
716 (TestTransientTable.test_transient_joined_table): Add tests for
717 the new table methods and new keywords arguments.
718
719 * test/test_postgis_db.py
720 (TestPostGISTable.test_read_row_as_dict_row_count_mode)
721 (TestPostGISTable.test_read_value_row_count_mode)
722 (TestPostGISTable.test_row_id_to_ordinal)
723 (TestPostGISTable.test_row_oridnal_to_id): New test for the new
724 table methods and the new arguments
725 (TestPostGISShapestorePoint.test_shapes_in_region)
726 (TestPostGISShapestorePoint.test_shape_raw_data)
727 (TestPostGISShapestorePoint.test_shape_points)
728 (TestPostGISShapestorePoint.test_shape_shapeid)
729 (TestPostGISShapestorePoint.test_all_shapes)
730 (TestPostGISTable.test_simple_query)
731 (TestPostGISTable.test_simple_query)
732 (TestPostGISTable.test_simple_query)
733 (TestPostGISTable.test_read_value)
734 (TestPostGISTable.test_read_row_as_dict): Adapt to the new
735 shapeids in the landmarks table
736
737 * test/test_memory_table.py
738 (TestMemoryTable.test_read_row_as_dict_row_count_mode)
739 (TestMemoryTable.test_read_value_row_count_mode)
740 (TestMemoryTable.test_row_id_to_ordinal)
741 (TestMemoryTable.test_row_oridnal_to_id): New test for the new
742 table methods and the new arguments
743
744 * test/test_dbf_table.py
745 (TestDBFTable.test_read_row_as_dict_row_count_mode)
746 (TestDBFTable.test_read_value_row_count_mode)
747 (TestDBFTable.test_row_id_to_ordinal)
748 (TestDBFTable.test_row_oridnal_to_id): New test for the new table
749 methods and the new arguments
750
751 2003-08-26 Bernhard Herzog <[email protected]>
752
753 * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
754 more postgis specific but much faster method to get the bounding
755 box
756
757 2003-08-26 Bernhard Herzog <[email protected]>
758
759 * Thuban/Model/postgisdb.py (PostGISTable.Title)
760 (PostGISShapeStore.AllShapes): Add these missing methods.
761 (PostGISShapeStore.ShapesInRegion): No need to raise
762 StopIteration. We can simply return
763
764 * test/test_postgis_db.py (TestPostGISTable.test_title)
765 (TestPostGISShapestorePoint.test_all_shapes): New tests for the
766 new methods
767
768 2003-08-25 Bernhard Herzog <[email protected]>
769
770 * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
771
772 * test/test_postgis_db.py (PolygonTests): New class containing
773 those tests from TestPostGISShapestorePolygon that can also be
774 used to test MUTLIPOLYGON tables
775 (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
776 so derive from that
777 (TestPostGISShapestoreMultiPolygon): New class with tests for
778 MUTLIPOLYGON tables
779
780 * test/postgissupport.py (PostGISDatabase.initdb): Allow the
781 tables argument to have tuples with three items to override the
782 WKT type used.
783 (PostgreSQLServer.get_default_static_data_db): Use the above to
784 create a polygon table with MUTLIPOLYGONs
785 (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
786 (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
787 coords_to*
788 (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
789 (wkt_converter): New. Map WKT types to converters
790 (upload_shapefile): New parameter force_wkt_type to use a
791 different WKT type than the default
792
793 2003-08-25 Bernhard Herzog <[email protected]>
794
795 * Thuban/UI/application.py
796 (ThubanApplication.run_db_param_dialog): New. Suitable as a
797 db_connection_callback. Main difference is that the dialog run
798 from this method doesn't have a parent so it can be used even when
799 there is no main window
800 (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
801 no db_connection_callback was given. This way the dialog pops up
802 even when the .thuban file was given as a command line parameter.
803
804 2003-08-25 Bernhard Herzog <[email protected]>
805
806 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
807 before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
808 which leads to an effectively frozen X session because the user
809 can only interact with the dialog but the mouse is still grabbed
810 by the canvas.
811 Also, call the tool's Hide method before MouseLeftUp because
812 MouseLeftUp may change the tool's coordinates.
813
814 2003-08-25 Bernhard Herzog <[email protected]>
815
816 * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
817 LoadCancelled exceptions and handle them by returning immediately.
818
819 2003-08-25 Bernhard Herzog <[email protected]>
820
821 GUI part of loading sessions with postgis connections which may
822 require user interaction to get passwords or updated parameters
823
824 * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
825 bit nucer and be more generic.
826 (DBFrame.OnAdd): Adapt to new DBDialog interface
827
828 * Thuban/UI/application.py (ThubanApplication.OpenSession): New
829 optional parameter db_connection_callback which is passed to
830 load_session.
831
832 * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
833 Suitable as a db_connection_callback
834 (MainWindow.OpenSession): Use self.run_db_param_dialog as the
835 db_connection_callback of the application's OpenSession method
836
837
838 2003-08-25 Bernhard Herzog <[email protected]>
839
840 Basic loading of sessions containing postgis connections:
841
842 * Thuban/Model/load.py (LoadError): Add doc-string
843 (LoadCancelled): New exception class to indicate a cancelled load
844 (SessionLoader.__init__): Add the db_connection_callback parameter
845 which will be used by the loader to get updated parameters and a
846 password for a database connection
847 (SessionLoader.__init__): Add the new XML elements to the
848 dispatchers dictionary
849 (SessionLoader.check_attrs): Two new conversions, ascii to convert
850 to a byte-string object and idref as a generic id reference
851 (SessionLoader.start_dbconnection)
852 (SessionLoader.start_dbshapesource): New. Handlers for the new XML
853 elements
854 (load_session): Add the db_connection_callback to pass through the
855 SessionLoader
856
857 * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
858 New classes to test loading of sessions with postgis database
859 connections.
860
861 2003-08-25 Bernhard Herzog <[email protected]>
862
863 * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
864 replace it and the comment with __BuildDate__ by the Source: and
865 Id: cvs keywords as used in the other files.
866
867 2003-08-25 Bernhard Herzog <[email protected]>
868
869 * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
870 LoadError when a required attribute is missing. The code used to
871 be commented out for some reason, but probably should have been
872 active.
873
874 * test/test_load.py (TestLoadError.test): Test the message in the
875 LoadError too to make sure it really is about the missing
876 attribute
877
878 2003-08-22 Bernhard Herzog <[email protected]>
879
880 * test/test_save.py (SaveSessionTest.test_dbf_table)
881 (SaveSessionTest.test_joined_table): Add XML validation tests.
882
883 2003-08-22 Bernhard Herzog <[email protected]>
884
885 Implement saving a session with a postgis connection
886
887 * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
888 elements for database connections and shapestores using db
889 connections
890 (session): Add the dbconnections to the content model
891
892 * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
893 Write the db connections
894 (SessionSaver.write_session): Call write_db_connections to write
895 the connection before the data sources
896 (SessionSaver.write_data_containers): Handle postgis shapestores
897
898 * test/test_save.py (SaveSessionTest.thubanids)
899 (SaveSessionTest.thubanidrefs): Update for new DTD
900 (SaveSessionTest.test_save_postgis): New. Test saving a session
901 with postgis connections
902
903 * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
904 (PostGISTable.TableName): New accessor methods for the connection
905 and table name
906
907 * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
908 (TestPostGISTable.test_dbname): New methods to test the new
909 PostGISConnection methods
910
911 2003-08-22 Bernhard Herzog <[email protected]>
912
913 * Thuban/Model/postgisdb.py (ConnectionError): New exception class
914 for exceptions occurring when establishing a Database connection
915 (PostGISConnection.connect): Catch psycopg.OperationalError during
916 connects and raise ConnectionError.
917
918 * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
919 tests for database exceptions
920
921 2003-08-22 Bernhard Herzog <[email protected]>
922
923 Prepare the test suite for tests with required authentication
924
925 * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
926 variables with two predefined users/passwords, one for the admin
927 and one for a non-privileged user.
928 (PostgreSQLServer.createdb): Pass the admin name to initdb and add
929 the non-privileged user to the database and set the admin password
930 (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
931 Better error reporting
932 (PostgreSQLServer.connection_params)
933 (PostgreSQLServer.connection_string): New methods to return
934 information about how to connect to the server
935 (PostgreSQLServer.execute_sql): New. Convenience method to execute
936 SQL statements
937 (PostgreSQLServer.require_authentication): Toggle whether the
938 server requires authentication
939 (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
940 Add or alter users
941 (PostGISDatabase.initdb): Pass the admin name one the
942 subprocesses' command lines. Grant select rights on
943 geometry_columns to everybody.
944 (upload_shapefile): Use the admin name and password when
945 connecting. Grant select rights on the new table to everybody.
946
947 * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
948 server's new methods to get the connection parameters.
949
950 * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
951 (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
952 server's new methods to get the connection parameters.
953
954 * test/test_postgis_db.py
955 (TestPostGISConnection.test_gis_tables_empty)
956 (TestPostGISConnection.test_gis_tables_non_empty)
957 (PostGISStaticTests.setUp): Use the server's new methods to get
958 the connection parameters.
959
960 2003-08-22 Bernhard Herzog <[email protected]>
961
962 * Thuban/UI/about.py (About.__init__): Add the psycopg version.
963
964 * Thuban/version.py: Add psycopg version
965
966 * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
967 version of the psycopg module
968
969 2003-08-22 Bernhard Herzog <[email protected]>
970
971 * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
972 (DBFrame.OnEdit): Removed because it's not used and wouldn't work
973 at the moment. The functionality should probably be implemented
974 some time, though.
975 (DBFrame.OnRemove): Display a message if the connection can't be
976 removed because it's still in use.
977
978 2003-08-22 Jan-Oliver Wagner <[email protected]>
979
980 * Thuban/UI/about.py (About.__init__): split up the huge about
981 text into elements/lists for easier translation. This fixes bug
982 https://intevation.de/rt/webrt?serial_num=2058
983 Also, made some forgotten string available for the i18n.
984
985 2003-08-21 Bernhard Herzog <[email protected]>
986
987 Make postgis support really optional including insensitive menu
988 items.
989
990 * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
991 whether the postgis is supported.
992
993 * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
994 to make postgis support optional
995
996 * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
997 version of Thuban.Model.postgisdb.has_postgis_support
998 (database_management command): Make it only sensitive if postgis
999 is supported.
1000
1001 2003-08-21 Jan-Oliver Wagner <[email protected]>
1002
1003 * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
1004 (section Adding and Removing Layers): Added text and described
1005 multi-selection.
1006 (chapter Extensions): New.
1007
1008 2003-08-21 Jan-Oliver Wagner <[email protected]>
1009
1010 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
1011 settings to allow multiple files to load into the map.
1012 Also reduced selection to *.shp as a default.
1013
1014 2003-08-20 Bernhard Herzog <[email protected]>
1015
1016 Add dialogs and commands to open database connections and add
1017 database layers.
1018
1019 * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
1020 method to open the database connection management dialog
1021 (MainWindow.AddDBLayer): New method to add a layer from a database
1022 (_has_dbconnections): New helper function to use for sensitivity
1023 (database_management command, layer_add_db command): New commands
1024 that call the above new methods.
1025 (main_menu): Add the new commands to the menu.
1026
1027 * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
1028 (PostGISConnection.connect): Establish the actual connection in a
1029 separate method and call it in __init__. This makes it easier to
1030 override the behavior in test cases
1031 (PostGISConnection.BriefDescription): New method to return a brief
1032 description for use in dialogs.
1033
1034 * test/test_postgis_db.py (NonConnection): DB connection that
1035 doesn't actually connect
1036 (TestBriefDescription): New class with tests for the new
1037 BriefDescription method
1038
1039 2003-08-19 Jan-Oliver Wagner <[email protected]>
1040
1041 Moved anything from extensions to libraries.
1042
1043 * libraries: New.
1044
1045 * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
1046
1047 * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
1048 Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
1049 been moved here from thuban/extensions/pyprojection/
1050 See there in the Attic for the older history.
1051
1052 * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
1053 dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
1054 shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
1055 have been moved here from thuban/extensions/pyshapelib/
1056 See there in the Attic for the older history.
1057
1058 * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
1059 files have been moved here from thuban/extensions/shapelib/
1060 See there in the Attic for the older history.
1061
1062 * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
1063 gdalwarp.cpp, wxproj.cpp: These files have been moved here from
1064 thuban/extensions/thuban/
1065 See there in the Attic for the older history.
1066
1067 * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
1068
1069 * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
1070 gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
1071
1072 * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
1073 Moved to libraries/shapelib.
1074
1075 * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
1076 shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
1077 ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
1078 Moved to libraries/pyshapelib.
1079
1080 * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
1081 LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
1082 Moved to libraries/pyprojection.
1083
1084 * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
1085
1086 * extensions: Removed.
1087
1088 2003-08-19 Bernhard Herzog <[email protected]>
1089
1090 * test/test_viewport.py (ViewPortTest): We don't use the
1091 facilities of FileTestMixin so don't derive from it.
1092 (TestViewportWithPostGIS): New class with tests for using a
1093 viewport on a map with postgis layers.
1094
1095 2003-08-19 Bernhard Herzog <[email protected]>
1096
1097 Add the db connection management to the session.
1098
1099 * Thuban/Model/session.py (Session.__init__): New instance
1100 variable db_connections
1101 (Session.AddDBConnection, Session.DBConnections)
1102 (Session.HasDBConnections, Session.CanRemoveDBConnection)
1103 (Session.RemoveDBConnection): New methods to manage and query the
1104 db connections managed by the session
1105 (Session.OpenDBShapeStore): New method to open a shapestore from a
1106 db connection
1107
1108 * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
1109 messages for the db connection handling in the session
1110
1111 * test/test_postgis_session.py: New. test cases for the session's
1112 db connection handling with postgis connections
1113
1114 2003-08-19 Bernhard Herzog <[email protected]>
1115
1116 Add very basic postgis database support and the corresponding test
1117 cases. The test cases require a PostgreSQL + postgis installation
1118 but no existing database. The database will be created
1119 automatically by the test cases
1120
1121 * test/README: Add note about skipped tests and the requirements
1122 of the postgis tests.
1123
1124 * Thuban/Model/postgisdb.py: New. Basic postgis database support.
1125
1126 * test/test_postgis_db.py: New. Test cases for the postgis
1127 support.
1128
1129 * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
1130 format
1131
1132 * test/test_wellknowntext.py: New. Test cases for the
1133 wellknowntext parser
1134
1135 * test/postgissupport.py: New. Support module for tests involving
1136 a postgis database.
1137
1138 * test/support.py (execute_as_testsuite): Shut down the postmaster
1139 if it's still running after the tests
1140
1141 * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
1142 well known text format
1143
1144 2003-08-19 Jan-Oliver Wagner <[email protected]>
1145
1146 * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
1147 message dialog.
1148
1149 2003-08-18 Bernhard Herzog <[email protected]>
1150
1151 * test/support.py (ThubanTestResult.printErrors): Indent the
1152 reason for the skips in the output to make it a bit more readable.
1153 (execute_as_testsuite): New helper function to run a test suite
1154 and print some more information.
1155 (run_tests): Use execute_as_testsuite to run the tests
1156
1157 * test/runtests.py (main): Use execute_as_testsuite to run the
1158 tests
1159
1160 2003-08-18 Bernhard Herzog <[email protected]>
1161
1162 Fix some bugs in Thuban and the test suite that were uncovered by
1163 changes introduced in Python 2.3:
1164
1165 * Thuban/Model/table.py (DBFTable.__init__): Make sure the
1166 filename is an absolute name
1167
1168 * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
1169 filename is an absolute name
1170
1171 * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
1172 unique filename to save to and use the correct relative filename
1173 in the expected output.
1174 (SaveSessionTest.test_dbf_table): Use the correct relative
1175 filename in the expected output.
1176
1177 * test/test_layer.py (TestLayer.test_raster_layer): Update the
1178 test to check whether the filename is absolute.
1179
1180 2003-08-18 Jan-Oliver Wagner <[email protected]>
1181
1182 * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
1183
1184 2003-08-15 Bernhard Herzog <[email protected]>
1185
1186 Change the way shapes are returned by a shape store. The
1187 ShapesInRegion method returns an iterator over actual shape
1188 objects instead of a list of shape ids.
1189
1190 * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
1191 id.
1192 (ShapefileStore.ShapesInRegion): Return an iterator over the
1193 shapes which yields shape objects instead of returning a list of
1194 shape ids
1195 (ShapefileStore.AllShapes): New. Return an iterator over all
1196 shapes in the shape store
1197 (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
1198
1199 * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
1200 doc-string.
1201
1202 * Thuban/UI/baserenderer.py
1203 (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
1204 layer_shapes and make it return an iterator containg shapes
1205 instead of a list of ids.
1206 (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
1207 layer_shapes() change
1208
1209 * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
1210 (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
1211
1212 * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
1213 changes in the ShapesInRegion return value.
1214 (ViewPort._get_hit_tester): Remove commented out code
1215
1216 * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
1217 new return value.
1218 (SimpleShapeStore.AllShapes): New. Implement this method too.
1219
1220 * test/test_layer.py (TestLayer.test_arc_layer)
1221 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
1222 (TestLayer.test_point_layer_with_projection)
1223 (TestLayer.test_derived_store): Adapt to changes in the
1224 ShapesInRegion return value.
1225
1226 * test/test_shapefilestore.py
1227 (TestShapefileStoreArc.test_shapes_in_region)
1228 (TestShapefileStorePolygon.test_shapes_in_region)
1229 (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
1230 in the ShapesInRegion return value.
1231 (TestShapefileStorePoint.test_all_shapes)
1232 (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
1233 methods
1234
1235 * test/test_derivedshapestore.py
1236 (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
1237 the ShapesInRegion return value.
1238 (TestDerivedShapeStore.test_all_shapes)
1239 (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
1240 methods
1241
1242 2003-08-15 Bernhard Herzog <[email protected]>
1243
1244 Make the renderers deal correctly with raw vs. python level
1245 representation of shape geometries
1246
1247 * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
1248 Return a flag useraw in addition to the callable and the parameter
1249 to indicate whether the callable can deal with the raw shape data
1250 or uses the higher level python lists of coordinates. The callable
1251 now should accept either the raw data or the return value of the
1252 shape's Points() method.
1253 (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
1254 change
1255 (BaseRenderer.projected_points): Instead of the shape id use the
1256 points list as parameter.
1257 (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
1258 (BaseRenderer.draw_point_shape): Adapt to projected_points()
1259 change and accept the points list as parameter instead of the
1260 shape id.
1261
1262 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
1263 the useraw flag as required by the BaseRenderer
1264 (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
1265 changes.
1266
1267 * test/test_baserenderer.py
1268 (TestBaseRenderer.test_point_with_classification): New test for
1269 rendering a map with classifications.
1270
1271 2003-08-15 Bernhard Herzog <[email protected]>
1272
1273 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
1274 (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
1275 (ViewPort._get_hit_tester, ViewPort.projected_points)
1276 (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
1277 (ViewPort._find_label_at): Split the find_shape_at method into
1278 several new methods and use the functions in the hit-test module.
1279
1280 * Thuban/UI/hittest.py: New module with Python-level hit-testing
1281 functions
1282
1283 * test/test_hittest.py: New. Test for the new hittest module
1284
1285 2003-08-15 Bernhard Herzog <[email protected]>
1286
1287 * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
1288 projection to all corners of the bounding box to get a better
1289 approximation of the projected bounding box
1290
1291 * test/test_layer.py (TestLayer.test_point_layer_with_projection):
1292 New. Test coordinate handling of a layer with a projection.
1293 Catches the bug fixed in Layer.ShapesInRegion
1294
1295 2003-08-15 Bernhard Herzog <[email protected]>
1296
1297 Move some of the mock objects in test_baserenderer into their own
1298 module so they can easily be used from other tests
1299
1300 * test/mockgeo.py: New test helper module with some mock objects
1301 for geometry related things like shapes, shapestores and
1302 projections.
1303
1304 * test/test_mockgeo.py: New. Tests for the new helper module
1305
1306 * test/test_baserenderer.py: Some of the mock-objects are in
1307 mockgeo now.
1308
1309 2003-08-12 Jan-Oliver Wagner <[email protected]>
1310
1311 * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
1312
1313 2003-08-12 Bernhard Herzog <[email protected]>
1314
1315 * po/de.po: New. German translations by Bjoern Broscheit
1316
1317 2003-08-12 Bernhard Herzog <[email protected]>
1318
1319 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
1320 strings have to be one string literal.
1321
1322 2003-08-11 Bernhard Herzog <[email protected]>
1323
1324 * test/support.py (FloatComparisonMixin.assertPointListEquals):
1325 New. This method was used in various derived classes, but it's
1326 better to have it here.
1327
1328 * test/test_shapefilestore.py
1329 (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
1330 FloatComparisonMixin
1331
1332 * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
1333 It's now in FloatComparisonMixin
1334
1335 * test/test_derivedshapestore.py
1336 (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
1337 in FloatComparisonMixin
1338
1339 2003-08-11 Bernhard Herzog <[email protected]>
1340
1341 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
1342 error message
1343
1344 2003-08-08 Jan-Oliver Wagner <[email protected]>
1345
1346 * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
1347 with version number.
1348 Changed title to reflect version number of Thuban.
1349
1350 2003-08-08 Jan-Oliver Wagner <[email protected]>
1351
1352 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
1353 the list corresponds to the "About" web page.
1354
1355 2003-08-08 Bernhard Herzog <[email protected]>
1356
1357 * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
1358 Make sure translated strings are recognized as one string literal.
1359
1360 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
1361 Make sure translated strings are recognized as one string literal.
1362
1363 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
1364 translated strings are recognized as one string literal.
1365
1366 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1367 sure translated strings are recognized as one string literal.
1368
1369 2003-08-07 Bernhard Herzog <[email protected]>
1370
1371 * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
1372 Simply delegates to the original shapestore.
1373
1374 * test/test_derivedshapestore.py
1375 (TestDerivedShapeStore.test_raw_format): New. Test case for
1376 DerivedShapeStore.RawShapeFormat
1377
1378 2003-08-07 Bernhard Herzog <[email protected]>
1379
1380 Add raw data interface to shape objects.
1381
1382 * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
1383 class to ShapefileShape which now holds shapefile specific
1384 information.
1385 (ShapefileShape.compute_bbox): Simplified to not cache any
1386 information. The way this method is used that shouldn't matter
1387 performance wise.
1388 (ShapefileShape.RawData): New. Return the shapeid which is the raw
1389 data format for shapes from shapefiles.
1390 (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
1391 in the shape objects returned by a shapestore. For a
1392 ShapefileStore this is always RAW_SHAPEFILE.
1393 (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
1394 method.
1395
1396 * test/test_shapefilestore.py
1397 (TestShapefileStore.test_raw_format): New test to test the raw
1398 format feature of shapes.
1399
1400 * Thuban/Model/layer.py: Remove the unused import of Shape from
1401 data. It was only there for interface compatibility but it's not
1402 used inside of Thuban and the generic Shape class has gone away.
1403
1404 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
1405 the raw data format and only use an optimized version of its a
1406 shapefile.
1407
1408 2003-08-07 Bernhard Herzog <[email protected]>
1409
1410 * test/test_baserenderer.py (SimpleShape): Shape class for the
1411 tests.
1412 (SimpleShapeStore.Shape): Use SimpleShape instead of
1413 Thuban.Model.data.Shape to make the tests independed of the coming
1414 changes.
1415
1416 2003-08-07 Bernhard Herzog <[email protected]>
1417
1418 * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
1419 (ThubanTestProgram): New classes that extend the respective
1420 classes from unittest. These new version support skipping tests
1421 under certain expected conditions. In the Thuban test suite we
1422 uses this for tests that require the optional gdal support.
1423 (run_tests): Use ThubanTestProgram instead of the unittest.main()
1424
1425 * test/runtests.py (main): Use the new ThubanTestRunner instead of
1426 the normal one from unittest
1427
1428 * test/test_layer.py (TestLayer.test_raster_layer): If this test
1429 is not run because gdal support isn't available report this to the
1430 runner.
1431
1432 * test/test_baserenderer.py
1433 (TestBaseRenderer.test_raster_no_projection): Do not run this test
1434 if gdal support isn't available and report this to the runner.
1435
1436 2003-08-06 Bernhard Herzog <[email protected]>
1437
1438 Rearrange the renderers a bit, partly in preparation for changes
1439 required for the postgis merge, partly to make it more testable.
1440 Also make the representation of coordinates in Shapes more
1441 consistent.
1442
1443 * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
1444 this class is now in BaseRenderer. This class is now practically
1445 only a specialization of BaseRenderer for rendering to an actual
1446 wx DC.
1447 (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
1448 to get the shapetype specific rendering functions.
1449
1450 * Thuban/UI/baserenderer.py: New file with the basic rendering
1451 logic. The code in this file is completely independend of wx.
1452 (BaseRenderer): Class with the basic rendering logic
1453
1454 * test/test_baserenderer.py: New. Test cases for BaseRenderer
1455
1456 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
1457 error_on_redraw to guard agains endless loops and stack overflows
1458 when there's a bug in the rendering code that raises exceptions.
1459 (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
1460 rendering into a separate method _do_redraw so that error handling
1461 is a bit easier. When an exception occurs, set error_on_redraw to
1462 true. When it's true on entry to OnIdle do nothing and return
1463 immediately.
1464
1465 * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
1466 Shape object will always have the coordinates as a list of list of
1467 coordinate pairs (tuples).
1468 (Shape.compute_bbox): Adapt to new representation.
1469
1470 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
1471 (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
1472 Shape objects.
1473
1474 * test/test_shapefilestore.py
1475 (ShapefileStoreTests.assertFloatTuplesEqual)
1476 (ShapefileStoreTests.assertPointListEquals): Rename to
1477 assertPointListEquals and change purpose to checking equality of
1478 the lists returned by Shape.Points().
1479 (TestShapefileStoreArc.test_shape)
1480 (TestShapefileStorePolygon.test_shape)
1481 (TestShapefileStorePoint.test_shape): Use the new
1482 assertPointListEquals instead of assertFloatTuplesEqual
1483
1484 * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
1485 (TestLayer.assertPointListEquals): Rename to assertPointListEquals
1486 and change purpose to checking equality of the lists returned by
1487 Shape.Points().
1488 (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
1489 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
1490 (TestLayer.test_derived_store): Use the new assertPointListEquals
1491 instead of assertFloatTuplesEqual
1492
1493 * test/test_derivedshapestore.py
1494 (TestDerivedShapeStore.assertFloatTuplesEqual)
1495 (TestDerivedShapeStore.assertPointListEquals): Rename to
1496 assertPointListEquals and change purpose to checking equality of
1497 the lists returned by Shape.Points().
1498 (TestDerivedShapeStore.test_shape): Use the new
1499 assertPointListEquals instead of assertFloatTuplesEqual
1500
1501 2003-08-06 Jan-Oliver Wagner <[email protected]>
1502
1503 * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
1504 a bounding box. A dialog is raised in case, no bounding box
1505 is found. This fixes bug #2043:
1506 https://intevation.de/rt/webrt?serial_num=2043
1507
1508 2003-08-05 Bernhard Herzog <[email protected]>
1509
1510 * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
1511 object look like a Color instantiation. Formerly it looked like a
1512 tuple.
1513
1514 * test/test_color.py (TestColor.test_repr)
1515 (TestColor.test_equality, TestColor.test_inequality): New. test
1516 some more apects of the Color class
1517 (TestTransparent.test_repr, TestTransparent.test_hex)
1518 (TestTransparent.test_equality): New. Test cases for the
1519 Transparent object.
1520
1521 2003-08-04 Jan-Oliver Wagner <[email protected]>
1522
1523 * Doc/manual/thuban-manual.xml: a number of small improvements.
1524 The resulting file is the version submitted for GREAT-ER II.
1525
1526 2003-08-01 Bernhard Herzog <[email protected]>
1527
1528 * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
1529 Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
1530 Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
1531
1532 * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
1533 (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
1534 (ThubanEndBusyCursor): Add doc-strings
1535
1536 2003-08-01 Bernhard Herzog <[email protected]>
1537
1538 First step towards PostGIS integration. More abstraction by movin
1539 more code from the layer to the shapestore. More methods of the
1540 layer are now simply delegated to the equivalent method of the
1541 shapestore. The SHAPETYPE_* constants are now in data not in
1542 layer.
1543
1544 * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
1545 (SHAPETYPE_POINT, Shape): Move these constants and classes from
1546 layer.py to data.py
1547 (ShapefileStore.__init__): More Initialization for the new methods
1548 and functionality.
1549 (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
1550 (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
1551 (ShapefileStore.Shape): New methods that were formerly implemented
1552 in the layer.
1553 (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
1554 (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
1555 (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
1556 equivalents of the new shape methods. These versions are simply
1557 delegated to the original shapstore.
1558
1559 * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
1560 (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
1561 (Layer.SetShapeStore): Removed the initializatin of instance
1562 variables that were needed for the stuff that's now in
1563 ShapefileStore
1564 (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
1565 (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
1566 shapestore.
1567
1568 * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
1569 Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
1570 instead of layer.
1571
1572 * test/test_shapefilestore.py: New. Tests for ShapefileStore.
1573
1574 * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
1575
1576 * test/test_layer.py: Import the SHAPETYPE_* constants from data
1577 instead of layer.
1578 (TestLayer.test_derived_store): Remove the test for the exception
1579 when instantiating the DerivedShapeStore with an incompatible
1580 table which is now in test_derivedshapestore.py. Add some more
1581 tests of the layer methods to determine whether they work for a
1582 DerivedShapeStore as well.
1583
1584 2003-07-31 Jonathan Coles <[email protected]>
1585
1586 * Doc/manual/thuban-manual.xml: Fix the list of required packages
1587 by just listing the name and where they can be found.
1588
1589 2003-07-31 Frank Koormann <[email protected]>
1590
1591 * Doc/manual/thuban-manual.xml:
1592 Changed the screenshot elements to figure.
1593 Changed some variablelist elements to itemizedlist.
1594 Added section on GDAL formats.
1595
1596 2003-07-31 Jonathan Coles <[email protected]>
1597
1598 * Doc/manual/thuban-manual.xml: Added a few sentences about
1599 the Fix Border Color option when generating classes.
1600
1601 2003-07-30 Jonathan Coles <[email protected]>
1602
1603 * Thuban/Model/classgen.py: Add docstrings. Rename specific
1604 Ramp instances to use lower_case_style.
1605
1606 * Thuban/UI/classgen.py: Use renamed Ramp instances.
1607
1608 * Thuban/UI/classifier.py: Add docstrings.
1609
1610 * Thuban/UI/dock.py: Add docstrings.
1611
1612 * test/test_classgen.py: Use renamed Ramp instances.
1613
1614 2003-07-30 Bernhard Herzog <[email protected]>
1615
1616 * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
1617 was never used in Thuban.
1618
1619 2003-07-30 Bernhard Herzog <[email protected]>
1620
1621 * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
1622 method directly instead of going through the transient_table
1623 method. This faster because transient_table may force the copy of
1624 a DBF file into the transient database and setting a table's title
1625 doesnm't affect the title of the associated transient table, so
1626 this fixes RT #2042
1627
1628 * Thuban/UI/main.py (__version__): Don't import the already
1629 removed show_exception_dialog.
1630
1631 2003-07-29 Jonathan Coles <[email protected]>
1632
1633 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1634 Put back this method and remove the equivalent function since we
1635 are setting the exception hook from within this class (OnInit).
1636
1637 2003-07-29 Jonathan Coles <[email protected]>
1638
1639 * Doc/manual/images/5_2_custom_ramp.png,
1640 Doc/manual/images/5_2_quantiles.png,
1641 Doc/manual/images/5_2_uniform_dist.png,
1642 Doc/manual/images/5_2_unique_values.png,
1643 Doc/manual/images/8_int_error.png: New screen shots.
1644
1645 * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
1646 some points, and added more screen shots.
1647
1648 2003-07-29 Bernhard Herzog <[email protected]>
1649
1650 * Thuban/Model/data.py: Remove the now unused import of warnings
1651
1652 2003-07-29 Bernhard Herzog <[email protected]>
1653
1654 * Thuban/Model/data.py (SimpleStore): Removed. This class has been
1655 deprecated since before the 0.8 release and isn't used in Thuban
1656 itself anymore.
1657
1658 * Thuban/Model/transientdb.py: Remove some unnecessary imports
1659
1660 2003-07-29 Jonathan Coles <[email protected]>
1661
1662 * Thuban/UI/application.py (ThubanApplication.OnInit): set the
1663 python exception hook here so that we are sure to catch any
1664 Thuban exception that happen during initialization.
1665
1666 * Thuban/UI/main.py (main): Don't set the exception hook here,
1667 it will get set in ThubanApplication.OnInit.
1668
1669 2003-07-29 Jonathan Coles <[email protected]>
1670
1671 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
1672 Removed and called it show_exception_dialog() so that the exception
1673 handler can be set before the class is created.
1674
1675 * Thuban/UI/main.py (main): Install the exception handler before
1676 a ThubanApplication is created.
1677
1678 2003-07-29 Bernhard Herzog <[email protected]>
1679
1680 * po/it.po: New. Italian translation by Maurizio Napolitano
1681
1682 * po/ru.po: New. Russian translation by Alex Shevlakov
1683
1684 2003-07-29 Frank Koormann <[email protected]>
1685
1686 * Doc/manual/thuban-manual.xml: Extended section on supported
1687 projections.
1688
1689 2003-07-29 Frank Koormann <[email protected]>
1690
1691 * Doc/manual/thuban-manual.xml: gaspell-checked.
1692
1693 2003-07-29 Jonathan Coles <[email protected]>
1694
1695 * Doc/manual/images/3_5_legend.png: Added border to improve look
1696 on white background.
1697
1698 2003-07-29 Jonathan Coles <[email protected]>
1699
1700 * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
1701 descriptions for the legend toolbar.
1702
1703 * Doc/manual/images/4_2_raster_layer_properties.png: Removed
1704 cursor from dialog box.
1705
1706 2003-07-28 Jonathan Coles <[email protected]>
1707
1708 * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
1709
1710 * Doc/manual/images/2_4_session_tree.png,
1711 Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
1712 Doc/manual/images/4_2_layer_properties.png,
1713 Doc/manual/images/4_2_raster_layer_properties.png,
1714 Doc/manual/images/5_3_genclass.png,
1715 Doc/manual/images/5_classification.png,
1716 Doc/manual/images/6_projection.png,
1717 Doc/manual/images/7_1_table_view.png,
1718 Doc/manual/images/7_2_5_join.png: New screenshots.
1719
1720 2003-07-24 Jonathan Coles <[email protected]>
1721
1722 * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
1723
1724 2003-07-24 Jonathan Coles <[email protected]>
1725
1726 * Doc/manual/thuban-manual.xml: Added EPS images and wrote
1727 chapter on Layer Management.
1728
1729 * Doc/manual/Makefile: New. Makefile to generate all formats for the
1730 manual and images.
1731
1732 2003-07-24 Bernhard Herzog <[email protected]>
1733
1734 * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
1735 it annoys lintian which warns about these files not being
1736 executable. The #! isn't necessary here since if you absolutely
1737 must execute them you can always say "python <filename>".
1738
1739 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
1740 superfluous code to set brush and pen for point shapes
1741
1742 * Thuban/UI/viewport.py: Remove commented out code that wouldn't
1743 belong in viewport anyway
1744
1745 2003-07-24 Frank Koormann <[email protected]>
1746
1747 * Doc/manual/thuban-manual.xml: Added section on table management.
1748
1749 2003-07-24 Bernhard Herzog <[email protected]>
1750
1751 * test/runtests.py (main): Recognize the long "verbose" option
1752 correctly.
1753
1754 2003-07-22 Jonathan Coles <[email protected]>
1755
1756 * Doc/manual/thuban-manual.xml: Continue to write first revision
1757 of the manual.
1758
1759 * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
1760 with Begin/EndDrawing() calls to ensure we aren't doing to
1761 many updates to the dc during rendering.
1762 (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
1763 a pen and brush argument so they need to be passed to the function.
1764
1765 * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
1766 Calculates the minimum and maximum scale values. Factored out
1767 of set_view_transform so that it could be used to zoom all the
1768 way into a single point.
1769 (ViewPort.set_view_transform): Call calc_min_max_scales().
1770 (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
1771 if only a single point is selected.
1772
1773 * Doc/manual/images/1_2_legend_close.png,
1774 Doc/manual/images/1_2_legend_dock.png,
1775 Doc/manual/images/1_2_mainwindow.png,
1776 Doc/manual/images/1_2_mainwindow.ps,
1777 Doc/manual/images/1_2_mainwindow.sk,
1778 Doc/manual/images/3_2_fullextent.png,
1779 Doc/manual/images/3_2_fulllayerextent.png,
1780 Doc/manual/images/3_2_fullshapeextent.png,
1781 Doc/manual/images/3_2_pan.png,
1782 Doc/manual/images/3_2_zoomin.png,
1783 Doc/manual/images/3_2_zoomout.png,
1784 Doc/manual/images/3_3_identify.png,
1785 Doc/manual/images/3_3_label.png,
1786 Doc/manual/images/3_5_invisible.png,
1787 Doc/manual/images/3_5_movedown.png,
1788 Doc/manual/images/3_5_moveup.png,
1789 Doc/manual/images/3_5_props.png,
1790 Doc/manual/images/3_5_tobottom.png,
1791 Doc/manual/images/3_5_totop.png,
1792 Doc/manual/images/3_5_visible.png: New. Images for the documentation.
1793
1794 2003-07-18 Bernhard Herzog <[email protected]>
1795
1796 * Thuban/UI/messages.py (MAP_REPLACED): New message.
1797
1798 * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
1799 after the new map has been assigned
1800
1801 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
1802 Delegate MAP_REPLACED to the canvas too
1803 (MainWindow.prepare_new_session): Removed. Thanks to the new
1804 MAP_REPLACED message it's no longer needed
1805 (MainWindow.OpenSession, MainWindow.NewSession):
1806 prepare_new_session has been removed.
1807
1808 * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
1809 MAP_REPLACED so that we can close the dialog if a new map is set.
1810 (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
1811 (Classifier.map_replaced): Handle MAP_REPLACED by closing the
1812 dialog
1813
1814 * test/test_viewport.py (SimpleViewPortTest)
1815 (SimpleViewPortTest.test_default_size): Add doc-strings
1816 (ViewPortTest.setUp): Bind map to self.map so we can use it in
1817 tests. Subscribe to MAP_REPLACED messages too.
1818 (ViewPortTest.tearDown): No need to explicitly unsubscribe
1819 (ViewPortTest.test_set_map): New test for the SetMap method.
1820
1821 2003-07-18 Bernhard Herzog <[email protected]>
1822
1823 * test/test_viewport.py (SimpleViewPortTest.test_default_size):
1824 Move this test from ViewPortTest.setUp to this new separate test
1825 case. setUp is not the place for the actual tests.
1826 (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
1827 more of the test from setUp to the new test test_inital_settings.
1828 (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
1829 (ViewPortTest.test_proj_conv): Split test_proj_conv into
1830 test_win_to_proj and test_proj_to_win and make the tests easier to
1831 understand
1832 (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
1833 (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
1834 (ViewPortTest.test_unprojected_rect_around_point)
1835 (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
1836 Reformat to increase readability.
1837
1838 2003-07-18 Bernhard Herzog <[email protected]>
1839
1840 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
1841
1842 2003-07-18 Bernhard Herzog <[email protected]>
1843
1844 * test/runtests.py: The test suite can now be run without an X
1845 connection. To make sure this remains true, remove the DISPLAY
1846 environment variable so that an error occurs if the wxGTK is
1847 imported accidentally
1848
1849 2003-07-18 Bernhard Herzog <[email protected]>
1850
1851 * Thuban/UI/viewport.py: Remove unused imports
1852
1853 * Thuban/UI/view.py: Remove unused imports
1854
1855 2003-07-18 Bernhard Herzog <[email protected]>
1856
1857 * test/test_export.py Remove unused imports. The OutputTransform
1858 function is now in viewport.py and is called output_transform
1859 (TestScalebar.test_output_transform)
1860 (TestScalebar.test_OutputTransform): Renamed to
1861 test_output_transform and updated to use output_transform instead
1862 of OutputTransform
1863
1864 * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
1865 renamed.
1866 (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
1867 renamed to output_transform
1868
1869 * Thuban/UI/viewport.py (OutputTransform, output_transform):
1870 Rename to output_transform
1871
1872 2003-07-18 Bernhard Herzog <[email protected]>
1873
1874 * Thuban/Model/layer.py (Layer.__init__): Rename
1875 classificationField to classificatin_column and init it here so
1876 that it can be used in SetClassificationColumn
1877 (Layer.GetClassificationColumn, Layer.GetClassificationField):
1878 Rename to GetClassificationColumn.
1879 (Layer.SetClassificationColumn, Layer.SetClassificationField):
1880 Rename to SetClassificationColumn and issue a LAYER_CHANGED
1881 message if the column changes.
1882 (Layer._classification_changed, Layer.ClassChanged): Rename to
1883 _classification_changed. Update the callers.
1884 (Layer.SetShapeStore): Further field->column renames.
1885
1886 * Thuban/Model/load.py (SessionLoader.start_classification)
1887 (SessionLoader.start_clpoint): Updates because of
1888 field->column method name changes in the Layer class
1889
1890 * Thuban/Model/save.py (SessionSaver.write_classification): Updates
1891 because of field->column method name changes in the Layer class
1892
1893 * Thuban/UI/classifier.py (Classifier.__init__)
1894 (Classifier._OnTry, Classifier._OnRevert): Updates because of
1895 field->column method name changes in the Layer class
1896
1897 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
1898 because of field->column method name changes in the Layer class
1899
1900 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
1901 of field->column method name changes in the Layer class
1902
1903 * test/test_save.py (SaveSessionTest.testClassifiedLayer)
1904 (SaveSessionTest.testClassifiedLayer): Update because of
1905 field->column method name changes in the Layer class
1906
1907 * test/test_layer.py (SetShapeStoreTests.setUp)
1908 (SetShapeStoreTests.test_sanity): Update because of field->column
1909 method name changes in the Layer class
1910 (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
1911 (TestLayerModification.test_sanity)
1912 (TestLayerModification.test_initial_settings): remove unsued code
1913 and rename to test_sanity.
1914 (TestLayerModification.test_set_classification): New test for
1915 SetClassification and SetClassificationField.
1916
1917 2003-07-18 Bernhard Herzog <[email protected]>
1918
1919 * test/test_classgen.py (TestFixedRamp.test): Extend test to check
1920 the non-fixed values as well. The old test would have accepted a
1921 fixed ramp that only returnes the fixed properties
1922
1923 2003-07-17 Jonathan Coles <[email protected]>
1924
1925 * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
1926 shots for the manual. The XCF file is the source image and
1927 has additional layers to support changes.
1928
1929 * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
1930
1931 * Thuban/UI/classifier.py (Classifier.__BuildClassification):
1932 Return both the new class and the field name.
1933
1934 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
1935 fit the map to the window as this changes any zoom level that
1936 the user may have set.
1937
1938 2003-07-16 Jonathan Coles <[email protected]>
1939
1940 * Thuban/Model/classgen.py (generate_singletons,
1941 generate_uniform_distribution, generate_quantiles): Remove
1942 fixes parameter, but maintain the same functionality by having
1943 the calling function pass a FixedRamp object for the ramp.
1944 (FixedRamp): New. Adapts a ramp to have fixed property values.
1945
1946 * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
1947 (Classification): Inherit from Publisher.
1948 (Classification.__init__): Remove the layer parameter.
1949 Classifications no longer need to have a parent layer.
1950 (Classification.GetField, Classification.GetFieldType,
1951 Classification.SetFieldInfo): Removed. The field name is stored
1952 in the layer, and the type can be retreived by calling
1953 Layer.GetFieldType().
1954 (Classification._set_layer, Classification.GetLayer): Removed.
1955 Classifications no longer have a parent layer.
1956
1957 * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
1958 classification.
1959 (Layer.SetShapeStore): Reset the classification first while
1960 we still have the old shape store to work with.
1961 (Layer.GetClassificationField, Layer.SetClassificationField):
1962 New. Method for getting/setting the field to classify on.
1963 (Layer.SetClassification): Simplified now that the layer
1964 simply has to hold a reference to the classification and not
1965 tell the classification who owns it.
1966 Fixes RTbug #2023.
1967
1968 * Thuban/Model/load.py (SessionLoader.start_classification):
1969 Set the field name on the layer, not the classification.
1970
1971 * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
1972 classification is modified.
1973
1974 * Thuban/Model/save.py (SessionSaver.write_classification):
1975 Get the field name and type from the layer.
1976
1977 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
1978 parameter records to rows and add docstring. Fixes RTbug #1997.
1979
1980 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
1981 ramp when we need to fix certain values of a ramp rather than
1982 using the old fixes parameter. Fixes RTbug #2024.
1983
1984 * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
1985 parameter.
1986 (ClassTable.Reset): Add fieldType parameter and use it, rather
1987 than asking the classification.
1988 (Classifier.__init__): Remember the original class's field
1989 and ask the layer for the field type, rather than the classification.
1990 (Classifier.__SetGridTable): Retrieve the field and field type
1991 for the table because they are not in the classification.
1992 (Classifier._OnTry, Classifier._OnRevert): Set the classification
1993 field on the layer in addition to the classification itself.
1994
1995 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
1996 classification field from layer.
1997
1998 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
1999 classification field from layer. Split up tests and remove
2000 *-imports. Fixes RTbug #1992.
2001
2002 * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
2003
2004 * test/test_classification.py
2005 (TestClassification.test_classification): Remove tests for methods
2006 that no longer exist.
2007
2008 * test/test_layer.py (SetShapeStoreTests.setUp): Classification
2009 __init__ no longer has a field parameter, use SetClassificationField.
2010 (SetShapeStoreTests.test_sanity): Use layer object to get class
2011 field info.
2012
2013 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
2014 SetClassificationField on layer to set class field info.
2015
2016 * test/test_viewport.py: Renamed from test/test_view.py.
2017
2018 2003-07-16 Jan-Oliver Wagner <[email protected]>
2019
2020 * Doc/manual/thuban-manual.xml: Added authors and an initial
2021 coarse structure.
2022
2023 2003-07-15 Bernhard Herzog <[email protected]>
2024
2025 * test/support.py (FloatComparisonMixin): This is a mix-in class
2026 and therefore should not be derived from any other class.
2027
2028 * test/test_range.py (RangeTest): FloatComparisonMixin is a
2029 mix-in, so derive from TestCase as well.
2030
2031 2003-07-15 Bernhard Herzog <[email protected]>
2032
2033 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
2034 draw_func handling a bit to remove one layer of indirection. This
2035 makes the renderer about 10% faster in the non-classifying case
2036 and the code a bit cleaner
2037 (MapRenderer.draw_point_shape): Add the pen and brush parameters
2038 and set them in the dc. Now the draw_point_shape method and
2039 wxproj's draw_polygon_shape function have basically the same
2040 signature so that both can be directly used as draw_func
2041
2042 2003-07-15 Bernhard Herzog <[email protected]>
2043
2044 * Thuban/Model/save.py (SessionSaver.write_classification): Encode
2045 string values (in addition to the labels) as UTF 8
2046
2047 * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
2048 values if the field type is string
2049
2050 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
2051 saving a session with non-ascii string classification values.
2052
2053 * test/test_load.py (TestClassification.file_contents)
2054 (TestClassification.test): Check for non-ascii values in string
2055 classifications
2056
2057 2003-07-14 Jonathan Coles <[email protected]>
2058
2059 * test/test_view.py: New. Tests for ViewPort.
2060
2061 2003-07-14 Frank Koormann <[email protected]>
2062
2063 * Thuban/Model/load.py (SessionLoader.start_map): Encode map
2064 title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
2065
2066 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
2067 unicode strings from session file: session title, map title and
2068 projection name.
2069
2070 2003-07-10 Jonathan Coles <[email protected]>
2071
2072 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
2073 drag_stop, not drag_move when the mouse is released.
2074
2075 2003-07-10 Jonathan Coles <[email protected]>
2076
2077 The most important part of this is the seperation of view.py into
2078 two pieces. viewport.py now has a class called ViewPort which
2079 contains all the non-wx parts of view.py and can therefore be
2080 tested. view.py contains only the wx-specific parts and is fairly
2081 simple.
2082
2083 * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
2084 RTTbug #1992.
2085 * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
2086 RTTbug #1992.
2087
2088 * Thuban/Model/classgen.py (generate_singletons,
2089 generate_uniform_distribution, generate_quantiles):
2090 Added 'fixes' parameter so that property attributes can
2091 be held constant over the generated classification groups.
2092 (CustomRamp.GetProperties): Remove unused variables.
2093
2094 * Thuban/Model/map.py (Map.SetProjection): Send the old
2095 projection as an argument to listeners of the MAP_PROJECTION_CHANGED
2096 event.
2097
2098 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
2099 parameter which is a list of records that restricts which
2100 records are saved. Fixes RTbug #1997.
2101
2102 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
2103 Port exception dialog from GREAT-ER. Fixes RTbug #1993.
2104
2105 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
2106 to allow the user to fix line color/width on generated groups.
2107 (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
2108 functions to optionally fix group properties.
2109
2110 * Thuban/UI/main.py (main): Set exception hook to the
2111 ShowExceptionDialog. Fixes RTbug #1993.
2112
2113 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
2114 the table window when it is selectd to be shown.
2115
2116 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
2117 Export Selection button and move the export buttons underneath
2118 the table.
2119 (QueryTableFrame.UpdateStatusText): Added event argument so
2120 that it can respond to grid selection events. The status text
2121 is now updated even when the table is not associated with a
2122 layer as was previously assumed.
2123 (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
2124 UpdateStatusText responds to these events.
2125 (QueryTableFrame.OnSaveAs): Renamed to doExport.
2126 (QueryTableFrame.doExport): Helper function that saves the
2127 entire table, or selected rows, to a file.
2128 (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
2129 Respond to export button events and call doExport.
2130
2131 * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
2132 the function doesn't return NULL without first setting a Python
2133 Error.
2134
2135 * test/runtests.py (main): Only print "Unknown option" for
2136 unsupported options.
2137
2138 * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
2139 optional epsilon argument to specify floating point accuracy.
2140 (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
2141 for each item test.
2142
2143 * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
2144 tests for saving selected records.
2145
2146 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
2147 tests for saving selected records.
2148
2149 * test/test_map.py (TestMapWithContents.test_set_projection):
2150 MAP_PROJECTION_CHANGED events send the old projection.
2151
2152 * test/test_session.py
2153 (TestSessionWithContent.test_forward_map_projection):
2154 MAP_PROJECTION_CHANGED events send the old projection.
2155
2156 * test/test_table.py (TableTest): Update tests to use non-deprecated
2157 functions.
2158
2159 2003-07-08 Bernhard Herzog <[email protected]>
2160
2161 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
2162 constants in the column objects are the standard ones defined in
2163 the table module.
2164
2165 * test/test_transientdb.py
2166 (TestTransientTable.test_transienttable_to_dbf): New. Test whether
2167 exporting transient tables as DBF works. This should catch the bug
2168 just fixed in TransientTableBase.Width.
2169
2170 2003-07-08 Bernhard Herzog <[email protected]>
2171
2172 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
2173 interpolated colors correctly.
2174
2175 * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
2176 New. Test case for the fix in classgen.py
2177
2178 2003-07-08 Bernhard Herzog <[email protected]>
2179
2180 * test/runtests.py (main): Make the default output less verbose
2181 and add a verbosity option (-v) to get the old output
2182
2183 2003-07-08 Bernhard Herzog <[email protected]>
2184
2185 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
2186 0.9.
2187
2188 * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
2189 New. Return the join type
2190
2191 * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
2192 DTD
2193 (SessionSaver.write_data_containers): Save the join type for
2194 joined tables
2195
2196 * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
2197 namespace
2198 (SessionLoader.start_jointable): Handle the jointype attribute
2199
2200 * test/test_load_0_8.py: New. Effectively a copy of test_load.py
2201 as of Thuban 0.8. These are now tests to determine whether Thuban
2202 can still read files generated by Thuban 0.8
2203
2204 * test/test_load.py (LoadSessionTest.dtd)
2205 (TestSingleLayer.file_contents)
2206 (TestLayerVisibility.file_contents, TestLabels.file_contents)
2207 (TestLayerProjection.file_contents)
2208 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2209 (TestJoinedTable.file_contents)
2210 (TestLoadError.file_contents): Update for new DTD
2211 (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
2212 for new join type attribute
2213
2214 * test/test_save.py (SaveSessionTest.dtd)
2215 (SaveSessionTest.testEmptySession)
2216 (SaveSessionTest.testSingleLayer)
2217 (SaveSessionTest.testLayerProjection)
2218 (SaveSessionTest.testRasterLayer)
2219 (SaveSessionTest.testClassifiedLayer)
2220 (SaveSessionTest.test_dbf_table)
2221 (SaveSessionTest.test_joined_table): Update for new DTD
2222 (SaveSessionTest.test_joined_table): Add test for new join type
2223 attribute
2224
2225 2003-07-04 Bernhard Herzog <[email protected]>
2226
2227 * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
2228 function for table_to_dbf
2229 (table_to_dbf): Deal with names longer than the 10 character limit
2230
2231 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
2232 doc-string
2233 (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
2234 long column names
2235
2236 2003-07-03 Bernhard Herzog <[email protected]>
2237
2238 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
2239
2240 2003-07-03 Bernhard Herzog <[email protected]>
2241
2242 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
2243 for the Thuban manual and README with some basic information about
2244 the manual
2245
2246 2003-07-03 Bernhard Herzog <[email protected]>
2247
2248 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
2249 Update doc-string
2250 (TransientJoinedTable.create): Do not modify the column objects of
2251 the input tables in place and copy all columns of the input tables
2252 into the joined table after all.
2253
2254 * test/test_transientdb.py
2255 (TestTransientTable.test_transient_joined_table_same_column_name):
2256 Update to reflect the new behavior
2257 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
2258 Update to reflect the new behavior
2259 (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
2260 New test case for a bug which modified the column objects in place
2261
2262 2003-07-02 Jonathan Coles <[email protected]>
2263
2264 * Thuban/Model/classgen.py (generate_singletons,
2265 generate_uniform_distribution, generate_quantiles,
2266 GenQuantiles0): Make sure maxValue isn't less than
2267 one, otherwise we could divide by zero.
2268
2269 * test/test_classgen.py (ClassGenTest.doClassRangeTest,
2270 ClassGenTest.doClassSingleTest): Call doBoundsTest to
2271 check the end classification groups against the
2272 proper property values.
2273 (ClassGenTest.doBoundsTest): New. Checks the first and
2274 last classification groups to make sure their properties
2275 are the correct upper and lower bounds for a color ramp.
2276
2277 2003-07-02 Jonathan Coles <[email protected]>
2278
2279 * Thuban/Model/classgen.py (generate_singletons,
2280 generate_uniform_distribution, generate_quantiles,
2281 GenQuantiles0): The denominator was one to high when
2282 calculating the index for the ramp causing the index
2283 to never to reach one.
2284
2285 2003-07-02 Jonathan Coles <[email protected]>
2286
2287 Changed the singature of ClassGroupRange.__init__ and
2288 ClassGroupRange.SetRange() so that the min/max values are
2289 passed as a tuple. This makes a better calling scheme for
2290 when a Range object is passed instead.
2291
2292 * Thuban/Model/classgen.py: Fixed parameters to
2293 ClassGroupRange constructor.
2294
2295 * Thuban/Model/classification.py (ClassGroupRange.__init__):
2296 Consolidate the min/max parameters into a single _range which
2297 can either be a tuple or a Range object.
2298 (ClassGroupRange.SetRange): Consolidate the min/max parameters
2299 into a single _range which can either be a tuple or a Range object.
2300
2301 * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
2302 call to ClassGroupRange constructor to use a tuple.
2303
2304 * Thuban/Model/layer.py (Layer.SetClassification): Switch
2305 the classification instance variable to the new class
2306 before calling _set_layer otherwise subscribers to a
2307 LAYER_CHANGED event will not see any difference.
2308
2309 * test/test_classification.py: Fix tests of ClassGroupRange
2310 so that they use the new signature.
2311
2312 * test/test_load.py: Fix use of ClassGroupRange so that it
2313 uses the new signature.
2314
2315 * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
2316 uses the new signature.
2317
2318 * test/test_save.py: Fix use of ClassGroupRange so that it
2319 uses the new signature.
2320
2321
2322 2003-07-01 Jonathan Coles <[email protected]>
2323
2324 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
2325 Import used objects/class from color.
2326 (generate_singletons): We don't
2327 need the numGroups parameter anymore because we are using
2328 the new ramps with GetProperties().
2329 (generate_uniform_distribution): Use new ramp method
2330 GetProperties().
2331 (generate_quantiles, GenQuantiles0): Use new ramp method
2332 GetProperties().
2333 (CustomRamp.SetNumGroups): Removed. The ramps now map
2334 a value from 0 to 1 to class properties so the number
2335 of groups is not needed ahead of time.
2336 (CustomRamp.next): Removed. CustomRamp does not support
2337 interation anymore.
2338 (CustomRamp.GetProperties): Returns a ClassGroupProperties
2339 object based on the index value from 0 to 1 that is
2340 passed to it.
2341 (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
2342 Made into instances of Monochromatic class instread of
2343 deriving from it.
2344 (HotToCold.SetNumGroups): Removed. See CustomRamp.
2345 (HotToCold.next): Removed. See CustomRamp.
2346
2347 * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
2348 (Classification.SetField, Classification.SetFieldType):
2349 Replaced with SetFieldInfo.
2350 (Classification.SetFieldInfo): New. Does a better job of
2351 what SetField and SetFieldType used to do by combining
2352 their function since they should really always be done
2353 at the same time.
2354 (Classification.SetLayer): Renamed to _set_layer.
2355 (Classification._set_layer): Should only be called from
2356 Layer's SetClassification. This does not cause a recursive
2357 call as SetLayer did because we know that Layer knows about
2358 the classification.
2359
2360 * Thuban/Model/color.py: Fixes RTbug #1971.
2361 (_Transparent): Renamed from Transparent so it doesn't
2362 conflict with the module variable.
2363 (Transparent, Black): Renamed from Color.Transparent,
2364 Color.Black so they are not class variables.
2365
2366 * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
2367 (Layer.Destroy): We don't need to call SetClassification
2368 anymore to clear out the back reference in the classifcation
2369 to the layer. It's better to set it to None using _set_layer,
2370 and we won't be creating another clas object too.
2371 (Layer.SetClassification): Classification._set_layer is not
2372 recursive so remove all the locking variables. Also clean
2373 up the code so that it remains unchanged if something fails.
2374
2375 * Thuban/Model/load.py: Fixes RTbug #1971.
2376 (SessionLoader.start_classification): Call
2377 Classification.SetFieldInfo().
2378
2379 * Thuban/Model/save.py: Removed import of Color which wasn't
2380 being used.
2381
2382 * Thuban/UI/classgen.py: Fixes RTbug #1972.
2383 (ClassGenDialog.__init__): Color ramps are now instances
2384 already so we don't need to create any new objects.
2385 (ClassGenDialog.OnOK): Check for numGroups is no longer
2386 necessary because we never use it.
2387
2388 * Thuban/UI/classifier.py: Fixes RTbug #1971.
2389 (Classifier.__BuildClassification, Classifier.__SetGridTable):
2390 Call Classification.SetFieldInfo() instead of SetFieldType.
2391
2392 * Thuban/UI/renderer.py: Fixes RTbug #1971.
2393
2394 * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
2395 (MapCanvas.__init__): Subscribe to the idle time event. Set
2396 background color to white.
2397 (MapCanvas.OnPaint): Set a flag indicating that we should
2398 render the map during idle time. If we already have a bitmap
2399 just draw it now.
2400 (MapCanvas.OnIdle): New. Render the map only during idle time.
2401 This also fixes a problem with the busy cursor under gtk.
2402
2403 * test/test_classgen.py (ClassGenTest.test_generate_singletons):
2404 Fix calls to generate_singletons because the signature changed.
2405
2406 * test/test_classification.py: Fix color references and
2407 change calls to Classification.[SetField|SetFieldType] to
2408 SetFieldInfo.
2409
2410 * test/test_load.py: Fix color references.
2411
2412 * test/test_load_0_2.py: Fix color references.
2413
2414 * test/test_save.py (SaveSessionTest.testClassifiedLayer):
2415 Change calls to Classification.[SetField|SetFieldType] to
2416 SetFieldInfo.
2417
2418 2003-07-01 Frank Koormann <[email protected]>
2419
2420 MERGE from the greater-ms3 branch.
2421
2422 * test/test_transientdb.py
2423 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
2424 New. Test join of two tables with partly equal column names.
2425
2426 * Thuban/Model/transientdb.py (TransientJoinedTable.create):
2427 If duplicates in left and right tables column names are found,
2428 append '_' (underscores) to the name until it is unique.
2429 Create always new internal names for the resulting table and reference
2430 columns in the join statement with <table>.<column>
2431
2432 2003-07-01 Bernhard Herzog <[email protected]>
2433
2434 * test/test_transientdb.py
2435 (TestTransientTable.test_transient_joined_table_same_column_name):
2436 New. Test whether joining on columns with the same names in both
2437 tables works.
2438
2439 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
2440 sure to use the right internal names even when joining on field
2441 with the same names in both tables. Also, detect duplicate names
2442 in the joined table correctly.
2443
2444 2003-07-01 Frank Koormann <[email protected]>
2445
2446 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
2447 Reverse List of layers to render in same order as in desktop legend.
2448
2449 2003-06-30 Jonathan Coles <[email protected]>
2450
2451 * Thuban/version.py (make_tuple): Takes a version string
2452 and splits it into a tuple of at most three integers.
2453 Used make_tuple() to make tuple versions of the version
2454 numbers.
2455
2456 * Thuban/UI/about.py: Add Thuban email addresses.
2457
2458 2003-06-30 Jonathan Coles <[email protected]>
2459
2460 * Thuban/version.py: SQLite/PySQLite version dependencies
2461 were too high.
2462
2463 2003-06-30 Jonathan Coles <[email protected]>
2464
2465 * Thuban/version.py: Update version to 0.8.1
2466
2467 * MANIFEST.in: Added Projections so that default.proj is
2468 included.
2469
2470 2003-06-26 Jonathan Coles <[email protected]>
2471
2472 New About box with lots more information including library
2473 versions and credits. More/better version checking before
2474 Thuban starts.
2475
2476 * Thuban/UI/about.py: New. New About box that displays
2477 library version information and credits.
2478
2479 * Thuban/version.py: Added new 'versions' dictionary which
2480 contains the verions of various libraries which are checked
2481 when the module loads.
2482 (verify_versions): Check all version numbers and returns
2483 a list of errors.
2484
2485 * Thuban/UI/classifier.py (Classifier.__EnableButtons):
2486 Reset the status of the buttons as the situation warrants,
2487 but in a better more reliable way by not relying on the
2488 current status to determine what needs to change.
2489
2490 * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
2491 (verify_versions): Remove most of the code since it is
2492 now in Thuban.version.verify_versions.o
2493
2494 * Thuban/UI/mainwindow.py (MainWindow.About): Call new
2495 About box in Thuban.UI.about.
2496
2497 * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
2498 Returns the version of gdal library being used as a string.
2499
2500 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
2501 Removed.
2502 (get_proj_version): Return the version of PROJ that the file
2503 was compiled with.
2504 (get_gtk_version): Return th version of GTK that the file
2505 was compiled with.
2506
2507 2003-06-25 Jonathan Coles <[email protected]>
2508
2509 * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
2510 of the SelectPropertiesDialog should be self so the window
2511 appears on top.
2512 (ClassGroupPropertiesCtrl.DoEdit): The parent
2513 of the SelectPropertiesDialog should be self so the window
2514 appears on top.
2515
2516 * Thuban/UI/resource.py: Cleaned up how we determine file
2517 extensions.
2518 (GetImageResource): Return an wxImage from our Resources.
2519
2520 2003-06-24 Jonathan Coles <[email protected]>
2521
2522 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
2523 Check that a layer has a classification before trying
2524 to get it. Raster layers don't have classifications.
2525
2526 2003-06-23 Jonathan Coles <[email protected]>
2527
2528 * setup.py: Add Resources/XML to resource list.
2529
2530 2003-06-23 Jonathan Coles <[email protected]>
2531
2532 * setup.cfg: Fix copyright dates
2533
2534 2003-06-23 Jonathan Coles <[email protected]>
2535
2536 * MANIFEST.in: Update with Resources/XML
2537
2538 * setup.py: Don't include Locale resources yet as we don't
2539 have any and it causes problems building the distribution
2540 for Windows. Update version to 0.8.0.
2541
2542 * Doc/thuban.dtd: Removed since it is now in Resources/XML.
2543
2544 * Thuban/UI/mainwindow.py: Add blank line at the end because
2545 file was not being read correctly building the Windows
2546 distribution.
2547
2548 2003-06-23 Jonathan Coles <[email protected]>
2549
2550 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
2551
2552 * Thuban/version.py: Temporarily update longversion for
2553 the 0.8 release so that it doesn't have the cvs revision.
2554
2555 2003-06-23 Jonathan Coles <[email protected]>
2556
2557 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
2558 to make sure that we don't create reentrant possibilities with
2559 wxYield.
2560
2561 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
2562 directly to avoid the wxSafeYield() call which generates an
2563 OnPaint event causing infinite recursion. Don't try to catch
2564 exception anymore. This was for before there were limits on map
2565 scaling.
2566
2567 2003-06-23 Bernhard Herzog <[email protected]>
2568
2569 Bug fix for RT #1961:
2570
2571 * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
2572 Register DerivedShapestores with the session
2573
2574 * Thuban/Model/session.py (Session.Tables): Make sure each table
2575 is only listed once.
2576
2577 * test/test_load.py (TestJoinedTable.test): Add check_format call.
2578 Update file contents to match the one written out.
2579
2580 2003-06-20 Bernhard Herzog <[email protected]>
2581
2582 * test/xmlsupport.py (SaxEventLister.startElementNS)
2583 (SaxEventLister.endElementNS): Do not include the qname. Python
2584 2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
2585 is (presumably incorrectly) None, whereas it's a string with the
2586 element name in the later versions.
2587
2588 * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
2589 (TestEventList.test_even_list_namespace): Update tests to reflect
2590 the new behaviour
2591 (TestEventList.test_even_list_id_normalization): Fix doc-string
2592
2593 2003-06-20 Jonathan Coles <[email protected]>
2594
2595 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
2596 by deriving classes to determine if that layer supports shapes.
2597 (Layer): Override HasShapes and return true.
2598
2599 * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
2600 instead of a direct call to wx[Begin|End]CusyCursor().
2601 (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
2602 table data.
2603
2604 * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
2605 New. Wrappers around the wxWindows functions that allow us to
2606 make additional calls such as wxYield which gives the native
2607 system a chance to update the cursor correctly.
2608
2609 * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
2610 instead of a direct call to wx[Begin|End]CusyCursor().
2611
2612 * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
2613 instead of a direct call to wx[Begin|End]CusyCursor().
2614 (MapCanvas.find_shape_at): Check if the current search layer
2615 support shapes, otherwise go on to the next layer.
2616
2617 * test/test_layer.py: Add tests in each type of layer for
2618 HasClassification() and HasShapes()
2619
2620 2003-06-20 Jonathan Coles <[email protected]>
2621
2622 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
2623 turning on the busy cursor to allow the system to change the
2624 cursor before we begin painting. This fixes a problem that
2625 was occuring only under GTK. Fixes RTbug #1840.
2626
2627 2003-06-20 Bernhard Herzog <[email protected]>
2628
2629 * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
2630 version.
2631
2632 * Thuban/Model/save.py (sort_data_stores): New. Make topological
2633 sort of the data sources so they can be written with sources that
2634 data sources that depend on other data sources come after the
2635 sources they depend on.
2636 (SessionSaver.__init__): Add idmap instance variable to map from
2637 objects to the ids used in the file.
2638 (SessionSaver.get_id, SessionSaver.define_id)
2639 (SessionSaver.has_id): New. Methods to manage the idmap
2640 (SessionSaver.write): Use thuban-0.8.dtd
2641 (SessionSaver.write_session): Add a namespace on the session and
2642 write out the data sources before the maps.
2643 (SessionSaver.write_data_containers): New. Write the data
2644 containers.
2645 (SessionSaver.write_layer): Layer elements now refer to a
2646 shapestore and don't contain filenames anymore.
2647
2648 * Thuban/Model/load.py (LoadError): Exception class to raise when
2649 errors in the files are discovered
2650 (SessionLoader.__init__): Define dispatchers for elements with a
2651 thuban-0.8 namespace too.
2652 (SessionLoader.check_attrs): New helper method to check and
2653 convert attributes
2654 (AttrDesc): New. Helper class for SessionLoader.check_attrs
2655 (SessionLoader.start_fileshapesource)
2656 (SessionLoader.start_derivedshapesource)
2657 (SessionLoader.start_filetable, SessionLoader.start_jointable):
2658 Handlers for the new elements in the new fileformat
2659 (SessionLoader.start_layer): Handle the shapestore attribute in
2660 addition to filename.
2661 (SessionLoader.start_table, SessionLoader.end_table): Removed.
2662 They were never used in the old formats and aren't needed for the
2663 new.
2664
2665 * Thuban/Model/session.py (Session.DataContainers): New method to
2666 return all "data containers", i.e. shapestores and tables
2667
2668 * test/xmlsupport.py (SaxEventLister.__init__)
2669 (SaxEventLister.startElementNS, sax_eventlist): Add support to
2670 normalize IDs.
2671
2672 * test/test_xmlsupport.py
2673 (TestEventList.test_even_list_id_normalization): New test case for
2674 id normalization
2675
2676 * test/test_load.py (LoadSessionTest.check_format): Use ID
2677 normalization
2678 (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
2679 class atrributes used for ID normalization
2680 (TestSingleLayer, TestLayerVisibility, TestLabels.test)
2681 (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
2682 file format
2683 (TestJoinedTable): New test for loading sessions with joined
2684 tables.
2685 (TestLoadError): New. Test whether missing required attributes
2686 cause a LoadError.
2687
2688 * test/test_save.py (SaveSessionTest.thubanids)
2689 (SaveSessionTest.thubanidrefs): New class attributes for ID
2690 normalization in .thuban files.
2691 (SaveSessionTest.compare_xml): Use id-normalization.
2692 (SaveSessionTest.testEmptySession)
2693 (SaveSessionTest.testLayerProjection)
2694 (SaveSessionTest.testRasterLayer)
2695 (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
2696 (SaveSessionTest.testLayerProjection): The filename used was the
2697 same as for testSingleLayer. Use a different one.
2698 (SaveSessionTest.test_dbf_table)
2699 (SaveSessionTest.test_joined_table): New test cases for saving the
2700 new data sources structures.
2701 (TestStoreSort, MockDataStore): Classes to test the sorting of the
2702 data stores for writing.
2703
2704 * test/runtests.py: Add CVS keywords
2705
2706 2003-06-20 Jonathan Coles <[email protected]>
2707
2708 * test/test_session.py
2709 (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
2710 Use the cultural_landmark-point.dbf file for the store so that
2711 the table rows and shape count match.
2712
2713 2003-06-20 Jonathan Coles <[email protected]>
2714
2715 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
2716 an exception if the number of shapes is different from the
2717 number of rows in the table. Address RTbug #1933.
2718
2719 * test/test_layer.py (TestLayer.test_derived_store): Add
2720 a test for the new exception in DerivedShapeStore.__init__.
2721
2722 * test/support.py (FloatTestCase): Removed since there is
2723 already FloatComparisonMixin. Fixes RTbug #1954.
2724 (FloatComparisonMixin.assertFloatEqual): Include test for
2725 infinity that was part of FloatTestCase.
2726
2727 * test/test_range.py (RangeTest): Inherit from
2728 support.FloatComparisonMixin now that we don't have
2729 support.FloatTestCase.
2730
2731 2003-06-20 Bernhard Herzog <[email protected]>
2732
2733 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
2734 the implementation in xmlsupport instead.
2735 (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
2736
2737 * test/test_proj.py: Import sax_eventlist from xmlsupport instead
2738 of test_save
2739
2740 2003-06-20 Bernhard Herzog <[email protected]>
2741
2742 * test/test_load.py (LoadSessionTest.check_format): New helper
2743 method to make sure the test files we load might have been written
2744 by the current thuban version.
2745 (ClassificationTest.TestLayers, TestSingleLayer.test)
2746 (TestLayerVisibility.test, TestClassification.test)
2747 (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
2748 Add check_format() calls and fix the thuban data to match the data
2749 that would be written by saving the session loaded from it.
2750
2751 * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
2752 the same class and function in test_save.
2753
2754 * test/test_xmlsupport.py (TestEventList): New. test cases for
2755 sax_eventlist
2756
2757 2003-06-20 Bernhard Herzog <[email protected]>
2758
2759 * Resources/XML/thuban.dtd: Add comment about which versions of
2760 Thuban are covered by this DTD
2761 (map): Fix content model for layers and raster layers. There can
2762 be any number or layers and raster layers in any order.
2763
2764 2003-06-20 Jonathan Coles <[email protected]>
2765
2766 This is mainly about fixing RTbug #1949.
2767
2768 * Thuban/Model/classification.py: Remove "from __future__"
2769 import statement since python 2.2 is the earliest supported
2770 version.
2771
2772 * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
2773 Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
2774 depending on the units this projection *forwards* into.
2775
2776 * Thuban/Model/save.py (SessionSaver.write_classification):
2777 Remove unnecessary use of lambdas and nested functions.
2778
2779 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
2780 adjustment here if the map projection uses degrees.
2781
2782 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
2783 scale adjust code since it is now done before calling
2784 this method. Don't do anything if the map projection
2785 is None.
2786
2787 2003-06-19 Bernhard Herzog <[email protected]>
2788
2789 Move version specific load tests to their own file.
2790
2791 * test/test_load.py: Expand the doc-string to explain a bit how to
2792 handle file format changes.
2793 (TestClassification.test): Update the docstring as this test is
2794 not about Thuban 0.2 anymore.
2795
2796 * test/test_load_0_2.py: New file with the load tests for thuban
2797 files created with Thuban 0.2 and earlier.
2798
2799 2003-06-19 Bernhard Herzog <[email protected]>
2800
2801 Add XML validation to some of the tests. Validation will only be
2802 done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
2803 To make the DTD available to the test cases it's moved into
2804 Resources/XML
2805
2806 * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
2807 for versions up to and including 0.2. Two slight changes: added an
2808 encoding specification and fixed the comment which refered to
2809 GRASS, not Thuban
2810
2811 * test/xmlsupport.py: New support module for tests involving XML.
2812 Currently there's a mix-in class for XML validation.
2813
2814 * test/test_xmlsupport.py: New. Tests for the xmlsupport module
2815
2816 * test/test_save.py (SaveSessionTest): Derive from ValidationTest
2817 so that we can validate the
2818 (SaveSessionTest.testEmptySession)
2819 (SaveSessionTest.testSingleLayer)
2820 (SaveSessionTest.testSingleLayer)
2821 (SaveSessionTest.testLayerProjection)
2822 (SaveSessionTest.testRasterLayer)
2823 (SaveSessionTest.testClassifiedLayer): Validate the generated XML
2824
2825 * test/runtests.py (main): Call print_additional_summary instead
2826 of print_garbage_information
2827
2828 * test/support.py (resource_dir): New function to return the
2829 "Resource" subdirectory
2830 (print_additional_summary): New function to combine several
2831 summary functions
2832 (run_tests): Use print_additional_summary instead of calling
2833 print_garbage_information directly
2834
2835 2003-06-19 Bernhard Herzog <[email protected]>
2836
2837 * Doc/thuban.dtd (classification): Correct the content model of
2838 the classification element.
2839 (projection): Add the "name" attribute
2840
2841 2003-06-19 Frank Koormann <[email protected]>
2842
2843 MERGE from the greater-ms3 branch.
2844
2845 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
2846 scale if projection is latlong to get better estimate.
2847
2848 Fix problem of hidden properties dialog under windows after double
2849 click on layer tree:
2850 The tree control always gets an Expanded / Collapsed event after
2851 the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply
2852 raises the already displayed window.
2853
2854 * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
2855 raiseProperties initialized to prevent endless loops
2856 (LegendTree._OnItemActivated): Depending on self.raiseProperties
2857 simply raise the properties or open the dialog and issue a second
2858 event.
2859
2860 2003-06-18 Jonathan Coles <[email protected]>
2861
2862 * setup.py: Fix a few problems that occured under Windows.
2863
2864 2003-06-18 Jonathan Coles <[email protected]>
2865
2866 When Thuban loaded the map was redrawn twice because the
2867 legend was being opened after the mainwindow was created
2868 and not during its creation. This meant the map was drawn
2869 initially and then had to be redrawn when the legend
2870 caused the display to change. Now the legend is opened
2871 in the mainwindow constructor which resolves this issue.
2872
2873 Also, although we were checking for the existence of
2874 gdal and gdalwarp modules, the gdalwarp extension was
2875 still being compiled (which may fail if the system doesn't
2876 have gdal installed). the build_ext command to setup.py
2877 now accepts the flags --with-gdal and --without-gdal.
2878 If --without-gdal is specified setup.py will try to
2879 use the gdal parameters specified by gdal-config. Under
2880 windows, those parameters have to be set in setup.py
2881 as with proj4 an wxWindows.
2882
2883 * setup.py: Use a list instead of seperate variables for
2884 extension parameters so we can create a generic function
2885 that runs an appropriate *-config script.
2886 (run_cs_script): Renamed from run_wx_script and modified
2887 to accept a second argument which is a list of lists to
2888 be filled in by the values returned from running the command.
2889 (thuban_build_ext): New. Extends the build_ext command and
2890 provides the options --with-gdal/--without-gdal which then
2891 optionally includes the gdalwarp extension.
2892
2893 * Thuban/Model/resource.py: First check if we can import
2894 the gdalwarp Thuban extension before checking for gdal.
2895 Also added some comments.
2896
2897 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
2898 the map is None which may be the case if none has been loaded
2899 yet.
2900
2901 * Thuban/UI/main.py (main): Remove call to ShowLegend.
2902
2903 * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
2904
2905 * Thuban/UI/renderer.py: Check for gdal support before importing
2906 gdalwarp.
2907 (MapRenderer.render_map): Only try to optimize if we have gdal
2908 support otherwise nothing will get drawn.
2909
2910 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
2911 during startup before a map has been created. Check if map is None
2912 before using it and do nothing if it is.
2913
2914 2003-06-17 Jonathan Coles <[email protected]>
2915
2916 Fix the problem with raster layers under Windows that caused
2917 Thuban to crash. The view should respond to layer projection
2918 changed events to update the display. Changes to a projection
2919 should not cause the map to be set to full extent.
2920
2921 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
2922 current_map_proj to remember the current map projection so that
2923 when the projection changes we know what the previous projection
2924 was.
2925 (MapCanvas.SetMap): Unsubscribe and subscribe to
2926 LAYER_PROJECTION_CHANGED events.
2927 (MapCanvas.projection_changed): Split into two methods that respond
2928 to map and layer projection changes.
2929 (MapCanvas.map_projection_changed): New. Takes the current view and
2930 projects it using the new projection. This does not cause the
2931 map to be redrawn at full extent.
2932 (MapCanvas.layer_projection_changed): New. Cause a redraw which
2933 will draw each layer in its new projection.
2934
2935 * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
2936 VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
2937 under Windows.
2938
2939 * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
2940 to twice sizeof(void*) because there are two digits for each
2941 hex byte.
2942
2943 2003-06-16 Bernhard Herzog <[email protected]>
2944
2945 Update to the layer interface: Direct access to the table,
2946 shapetable, shapefile and filename attributes is now actively
2947 deprecated by issuing deprecation warnings for all places where
2948 this happens.
2949
2950 * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
2951 to the instance variables table, shapetable, shapefile and
2952 filename via __getattr__ so that we can issue a deprecation
2953 warning.
2954 (Layer.SetShapeStore): Don't set the deprecated instance variables
2955 any more
2956 (Layer.SetShapeStore): Don't use deprecated layer instance
2957 variables
2958 (Layer.Destroy): No need to explicitly remove the instance
2959 variables any more
2960 (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
2961 instance variables
2962
2963 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
2964 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
2965 (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
2966 use deprecated layer instance variables
2967
2968 * Thuban/UI/classifier.py (Classifier.__init__): Don't use
2969 deprecated layer instance variables
2970
2971 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
2972 (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
2973 instance variables
2974
2975 * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
2976 deprecated layer instance variables
2977
2978 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
2979 deprecated layer instance variables
2980
2981 * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
2982 deprecated layer instance variables
2983
2984 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
2985 (MapRenderer.polygon_render_param): Don't use deprecated layer instance
2986 variables
2987
2988 * test/runtests.py (main): Turn Thuban's deprecation warnings into
2989 errors so that they're cought by the tests
2990
2991 * test/test_load.py (TestSingleLayer.test): Don't use deprecated
2992 layer instance variables
2993
2994 2003-06-16 Jonathan Coles <[email protected]>
2995
2996 Fix a problem under Windows whereby if the user double-clicks on a
2997 layer in the legend that tree item will expand or collapse as well
2998 as open the layer properties dialog. The state of the tree item
2999 should not be affected.
3000
3001 * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
3002 preventExpandCollapse and subscribe to expanding and collapsing
3003 events.
3004 (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
3005 collapsing events and will veto the event if it has been triggered
3006 by the user double clicking on a layer.
3007 (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
3008 that an expanding/collapsing event should be vetoed.
3009
3010 2003-06-13 Bernhard Herzog <[email protected]>
3011
3012 * Thuban/UI/classifier.py (Classifier.OnClose)
3013 (Classifier.map_layers_removed)
3014 (Classifier.layer_shapestore_replaced): Unsubscribe the messages
3015 in OnClose and not in map_layers_removed or
3016 layer_shapestore_replaced to make sure it always happens when the
3017 dialog is closed
3018
3019 2003-06-13 Jonathan Coles <[email protected]>
3020
3021 This puts back a fix for Windows where a panel is needed so that
3022 the background of the table view appears correctly.
3023
3024 * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
3025 object that can be used by derived classes to place any
3026 controls (including the grid) onto.
3027 (QueryTableFrame.__init__): Use the panel as the parent window
3028 for all the controls. Reparent the grid so that the panel is
3029 the parent. Call UpdateStatusText() to correctly initialize
3030 the status bar.
3031
3032 2003-06-13 Jonathan Coles <[email protected]>
3033
3034 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
3035 from wxFrame (as opposed to wxDialog like the other classes)
3036 but otherwise behaves like the other classes. This is needed
3037 for the TableView which isn't really a dialog and needs to
3038 have a status bar and control buttons.
3039
3040 * Thuban/UI/tableview.py (TableGrid.__init__): Create an
3041 instance variable to keep track of how many rows are selected.
3042 Subscribe once to the the events we are interested in.
3043 (ThubanGrid.OnRangeSelect): Only handle event if event handling
3044 hasn't been turned off.
3045 (ThubanGrid.OnSelectCell): Only handle event if event handling
3046 hasn't been turned off.
3047 (ThubanGrid.ToggleEventListeners): Rather than subscribe None
3048 as an event listener (which changes the event handler stack)
3049 simply set an instance variable to False. This is checked in
3050 the event handlers.
3051 (ThubanGrid.GetNumberSelected): Return the number of currently
3052 selected rows.
3053 (TableFrame): Inherit from ThubanFrame so we can have a
3054 status bar and control buttons.
3055 (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
3056 Explicitly set which items are selected in the operator choice and
3057 action choice so there is always a valid selection. Fixes RTbug #1941.
3058 Subscribe to grid cell selection events so we can update the
3059 status bar.
3060 (QueryTableFrame.UpdateStatusText): Update the status bar with
3061 how many rows are in the grid, how many columns, and how many
3062 rows are selected.
3063 (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
3064 Call UpdateStatusText when cells are (de)selected.
3065 (QueryTableFrame.OnQuery): Use the string value in the value
3066 combo if either the selected item index is 0 or if the string
3067 cannot be found in the predefined list (this happens if the
3068 user changes the text). Fixes RTbug #1940.
3069 Only turn off the grid event listeners if there a query comes
3070 back with a none empty list of ids. in the case that the list
3071 is empty this causes a grid.ClearSelection() call to actually
3072 clear the grid selection which causes the selected items in
3073 the map to be deselected. Fixes RTbug #1939.
3074
3075 * test/test_save.py (XMLWriterTest.Encode): Check return values.
3076 Fixes RTbug #1851.
3077
3078 2003-06-13 Bernhard Herzog <[email protected]>
3079
3080 * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
3081 self.selected_shape with the current selection to make sure the
3082 contents of the dialog are up to date when it's shown for the
3083 first time.
3084 The dialog used to work without this by luck. The recent fix to
3085 the connector module 'broke' a 'feature' the identify view was
3086 relying on, i.e that subscribing to a message in response to
3087 receiving a message of that type would mean that the new
3088 subscriber would also be called for the same message.
3089
3090 2003-06-12 Jonathan Coles <[email protected]>
3091
3092 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
3093 the image is rendered. Fixes RTbug #1937.
3094
3095 2003-06-12 Jonathan Coles <[email protected]>
3096
3097 * Thuban/Lib/fileutil.py: As is done under Windows, create the
3098 user directory if it doesn't exist on a posix system.
3099 Fixes RTbug #1815.
3100
3101 * Thuban/Model/resource.py (get_user_proj_files): Moved the
3102 called to get_application_dir here, so that the directory
3103 will only be called if this method is invoked.
3104
3105 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
3106 the projfilepath if no projection is selected.
3107
3108 2003-06-12 Jonathan Coles <[email protected]>
3109
3110 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
3111 the scalebar if the current map has no projection set.
3112
3113 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
3114 projfilepath label to just the basename of the projection file
3115 rather than include the entire path.
3116
3117 * Thuban/Model/resource.py: Fix missed proj functions that
3118 needed to be renamed.
3119
3120 2003-06-12 Jonathan Coles <[email protected]>
3121
3122 * Thuban/Model/classification.py: Removed assert statements that
3123 tested if the variable was an instance of Color.
3124
3125 * Thuban/Model/color.py (Color): Remove commented code that isn't
3126 used.
3127 (Transparent): Renamed from NoColor. Doesn't inherit from Color.
3128 Fixes RTbug #1835.
3129 (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
3130 Needed now that the class doesn't inherit from Color.
3131
3132 2003-06-12 Jonathan Coles <[email protected]>
3133
3134 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
3135 check unicode strings.
3136
3137 * test/test_layer.py: Check for existence of gdal.
3138
3139 2003-06-12 Jonathan Coles <[email protected]>
3140
3141 * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
3142 that was in load.py
3143
3144 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
3145 that was in save.py
3146
3147 2003-06-12 Jonathan Coles <[email protected]>
3148
3149 This is largely a collection of bug fixes. We also handle the
3150 case where gdal is not on the system. The XMLReader and XMLWriter
3151 classes were moved into there own files to resolve some circular
3152 import references and because they shouldn't really be in the
3153 file that is dediciated to reading/writing session files since
3154 they are also used elsewhere.
3155
3156 * Thuban/Model/classgen.py: Renamed functions to follow the
3157 function_names_with_underscores style. Fixes RTbug #1903.
3158 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
3159
3160 * Thuban/Model/layer.py: Import gdal only if it available.
3161 (RasterLayer): Handle the case where the gdal library is unavailable.
3162 Addresses RTbug #1877.
3163
3164 * Thuban/Model/load.py (XMLReader): Moved into seperate file
3165 xmlreader.py.
3166
3167 2003-06-12 Jonathan Coles <[email protected]>
3168
3169 This is largely a collection of bug fixes. We also handle the
3170 case where gdal is not on the system. The XMLReader and XMLWriter
3171 classes were moved into there own files to resolve some circular
3172 import references and because they shouldn't really be in the
3173 file that is dediciated to reading/writing session files since
3174 they are also used elsewhere.
3175
3176 * Thuban/Model/classgen.py: Renamed functions to follow the
3177 function_names_with_underscores style. Fixes RTbug #1903.
3178 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
3179
3180 * Thuban/Model/layer.py: Import gdal only if it available.
3181 (RasterLayer): Handle the case where the gdal library is unavailable.
3182 Addresses RTbug #1877.
3183
3184 * Thuban/Model/load.py (XMLReader): Moved into seperate file
3185 xmlreader.py.
3186
3187 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
3188 file xmlwriter.py.
3189
3190 * Thuban/Model/resource.py: Renamed functions to following the
3191 function_names_with_underscores style.
3192 (has_gdal_support): New function that returns true if the gdal
3193 library is available. Addresses RTbug #1877.
3194
3195 * Thuban/UI/application.py (ThubanApplication.OpenSession):
3196 Display a message box if the gdal library is not available, but
3197 only if there are any layers that would use it. Addresses RTbug #1877.
3198
3199 * Thuban/UI/classgen.py: Use renamed projection resource functions.
3200 (GenUniformPanel.__CalcStepping): Fix a slight discrepency
3201 when using integers versus floats.
3202
3203 * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
3204 determine if the "Add Image Layer" menu option should be
3205 greyed out or not. Addresses RTbug #1877.
3206
3207 * Thuban/UI/projdialog.py: Use renamed projection resource functions.
3208
3209 * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
3210 optimize if a raster layer is visible. Fixes RTbug #1931.
3211 Only draw the raster layer if the gdal library is available.
3212 Addresses RTbug #1877.
3213
3214 * test/test_classgen.py: Add tests for generate_singletons,
3215 generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
3216 (test_calculate_quantiles): Fix some tests to catch the new
3217 ValueError that is raised.
3218
3219 * test/test_proj.py: Use renamed projection resource functions.
3220
3221 * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
3222 test for saving classified layers. Fixes RTbug #1902.
3223 (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
3224
3225 2003-06-12 Jan-Oliver Wagner <[email protected]>
3226
3227 Fix for http://intevation.de/rt/webrt?serial_num=1900.
3228
3229 * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
3230
3231 * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
3232 multiplechoicedialog.py rather than from the wxPython library.
3233
3234 2003-06-11 Frank Koormann <[email protected]>
3235
3236 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
3237 update.
3238
3239 2003-06-11 Frank Koormann <[email protected]>
3240
3241 * Thuban/Lib/fileutil.py (get_application_dir): New function to
3242 determine the absolute .thuban/thuban directory under
3243 "posix" (os.expanduser) and "nt" (read AppData registry key).
3244
3245 * Thuban/Model/resource.py: Use get_application_dir
3246
3247 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3248 Use get_application_dir.
3249
3250 2003-06-10 Bernhard Herzog <[email protected]>
3251
3252 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
3253 the messages MAP_LAYERS_REMOVED messages
3254 (LayerTableFrame.OnClose): Unsubscribe from it.
3255 (LayerTableFrame.map_layers_removed): New. Receiver for
3256 MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
3257 dialog is showing is removed.
3258
3259 2003-06-10 Bernhard Herzog <[email protected]>
3260
3261 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
3262 of the receivers list so that unsubscribing in a receiver doesn't
3263 modify it while iterating over it.
3264
3265 * test/test_connector.py
3266 (ConnectorTest.test_disconnect_in_receiver): New. Test whether
3267 unsubscribing in a receiver works correctly. See docstring for
3268 details
3269
3270 2003-06-10 Bernhard Herzog <[email protected]>
3271
3272 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
3273 message.
3274
3275 * Thuban/Model/layer.py (Layer.SetShapeStore): Send
3276 LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
3277 LAYER_CHANGED will still be sent if the classification changes.
3278
3279 * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
3280 parameter so we can subscribe to some of its messages
3281 (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
3282 and the layer's LAYER_SHAPESTORE_REPLACED
3283 (Classifier.unsubscribe_messages): New. Unsubscribe from message
3284 subscribed to in __init__
3285 (Classifier.map_layers_removed)
3286 (Classifier.layer_shapestore_replaced): receivers for the messages
3287 subscribed to in __init__. Unsubscribe and close the dialog
3288
3289 * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
3290 the map to the Classifier dialog
3291
3292 * test/test_layer.py (SetShapeStoreTests): Derive from
3293 SubscriberMixin as well so we can test messages
3294 (SetShapeStoreTests.setUp): Subscribe to some of the layer's
3295 messages
3296 (SetShapeStoreTests.tearDown): Clear the messages again
3297 (SetShapeStoreTests.test_sanity): Expand the doc-string and check
3298 for the modified flag too
3299 (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
3300 to check whether SetShapeStore sets the modified flag
3301 (SetShapeStoreTests.test_set_shape_store_different_field_name)
3302 (SetShapeStoreTests.test_set_shape_store_same_field)
3303 (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
3304 Add tests for the messages. This checks both the new
3305 LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
3306
3307 2003-06-06 Jan-Oliver Wagner <[email protected]>
3308
3309 * Thuban/UI/mainwindow.py: Improved and partly added help texts for
3310 the menu items.
3311
3312 2003-06-05 Frank Koormann <[email protected]>
3313
3314 * Thuban/UI/identifyview.py (IdentifyView.__init__):
3315 Layout reimplemented without panel. Make life easier to fit the list
3316 in the dialog.
3317
3318 2003-06-05 Frank Koormann <[email protected]>
3319
3320 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
3321 once on initialisation (Former implementation resulted in multiple
3322 entries for each projection).
3323 (ProjFrame.__FillAvailList): selectProj as second optional parameter,
3324 if set, select the projection found under the specified name. This
3325 overwrites any other selection estimate.
3326 Removed projchoice filling from this method.
3327 (ProjFrame._OnSave, ProjFrame._OnAddToList):
3328 Updated call of ProjFrame.__FillAvailList
3329 (LCCPanel._DoLayout): Moved parameter controls in more common order.
3330
3331 * Resources/Projections/defaults.proj: Extended defaults representing
3332 various common European projections.
3333
3334 2003-06-05 Frank Koormann <[email protected]>
3335
3336 * Thuban/UI/identifyview.py (IdentifyView.__init__):
3337 Use ListCtrl instead of GridCtrl
3338
3339 * Thuban/Model/resource.py:
3340 Guess location of .thuban directory from tempdir parent directory.
3341
3342 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
3343 Guess location of .thuban directory from tempdir parent directory.
3344
3345 2003-06-04 Bernhard Herzog <[email protected]>
3346
3347 Do not cache the values returned by the tree widget's
3348 GetFirstChild and GetNextChild methods because it led to lots of
3349 segfaults. The new way requires more brute force but is more
3350 reliable.
3351
3352 * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
3353 variable layer2id
3354 (LegendTree.find_layer): New method to do with brute force what
3355 layer2id tried to accomplish
3356 (LegendTree._OnMsgLayerChanged)
3357 (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
3358 Use find_layer instead of layer2id
3359 (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
3360 update layer2id anymore
3361 (LegendTree._OnMsgMapLayersRemoved)
3362 (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
3363
3364 2003-06-03 Thomas Koester <[email protected]>
3365
3366 * Thuban/Model/classgen.py (GenQuantiles0): New function.
3367
3368 2003-06-02 Bernhard Herzog <[email protected]>
3369
3370 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
3371 New commands.
3372 (main_menu): Add the new commands.
3373 (MainWindow.TableRename): New. Implementation of the table_rename
3374 command.
3375 (MainWindow.RenameLayer): New. Implementation of the layer_rename
3376 command.
3377
3378 * Thuban/Model/session.py (Session.AddTable): call self.changed to
3379 set the modified flag
3380
3381 * test/test_session.py (TestSessionSimple.test_add_table): Test
3382 whether the modified flag is set properly
3383
3384 * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
3385 instead of issue so that the modified flags get updated.
3386
3387 * test/test_base.py (SomeTitledObject): Derive from Modifiable
3388 instead of Publisher to reflect reality better and to accomodate
3389 the fact that SetTitle now calls changed instead of issue
3390
3391 2003-06-02 Bernhard Herzog <[email protected]>
3392
3393 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
3394 acquisition has to happen before the try in a try-finally.
3395
3396 2003-06-02 Bernhard Herzog <[email protected]>
3397
3398 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
3399 possible that a layer is removed that is not currently selected in
3400 the legend so don't check for this.
3401
3402 2003-05-30 Bernhard Herzog <[email protected]>
3403
3404 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
3405 variables to None that have direct or indirect references to
3406 shapefiles or dbf files to make sure that they do go away and the
3407 files are closed.
3408
3409 2003-05-30 Bernhard Herzog <[email protected]>
3410
3411 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
3412 availImgListIndices when a new image list is created
3413
3414 2003-05-30 Bernhard Herzog <[email protected]>
3415
3416 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
3417 changing_selection to indicate whether the LegendTree code itself
3418 is currently changing the selection
3419 (LegendTree.normalize_selection): New method to normalize the
3420 selection by selecting the layer item even if the user clicked on
3421 the classification.
3422 (LegendTree._OnSelChanged): normalize the selection. This works
3423 around a bug in wx which doesn't keep track of the selection
3424 properly when subtrees are deleted.
3425
3426 2003-05-30 Bernhard Herzog <[email protected]>
3427
3428 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
3429 maximum and minimum scale factors.
3430
3431 * test/test_classgen.py (ClassGenTest.test): Update to reflect the
3432 changes in classgen.py
3433
3434 2003-05-30 Jonathan Coles <[email protected]>
3435
3436 * Thuban/Model/classgen.py: Remove ClassGenerator class but make
3437 all the methods functions. Fixes RTBug #1903.
3438
3439 * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
3440 to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
3441 RTBug #1907.
3442
3443 * Thuban/UI/classgen.py: Use classgen functions that were part
3444 of the ClassGenerator class. Put try/finally blocks around
3445 code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
3446 RTBug #1904.
3447
3448 * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
3449
3450 * Thuban/UI/legend.py: The legend was cleared and repopulated any
3451 time something changed which caused some state to be lost such
3452 as which children were expanded or collapsed. Fixes RTBug #1901.
3453 (LegendTree._OnMsgMapLayersAdded): Add only new layers.
3454 (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
3455 the legend but not in the map.
3456 (LegendTree.__FillTree): Move main functionality out into smaller
3457 methods that can be used by other methods.
3458 (LegendTree.__FillTreeLayer): Reuse old slots in the image list
3459 if they are available.
3460 (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
3461 that we override the wxTreeCtrl method. Iterate over children
3462 and call __RemoveLayer.
3463 (LegendTree.__AddLayer): New. Add a new layer to the legend.
3464 (LegendTree.__RemoveLayer): Remove a layer from the legend.
3465 (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
3466 Should only be called with the id of a layer branch.
3467 (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
3468 Returns the root item or creates one if necessary.
3469
3470 * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
3471 ProjectRasterFile with tuple arguments instead of strings.
3472
3473 * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
3474 with try/finally. Fixes RTBug #1904.
3475
3476 * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
3477 with try/finally. Fixes RTBug #1904.
3478 (MapCanvas.FitSelectedToWindow): If a single point is selected
3479 simply center it on the display. Fixes RTBug #1849.
3480
3481 * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
3482 to be compiled as a standalone app. Now the code can only be
3483 called from Python which simplifies the parameter passing.
3484 (ProjectRasterFile): Handle Python arguments. Remove code that
3485 checks for a destination dataset. Add more clean up code.
3486
3487 * test/test_map.py (TestMapWithContents.test_raise_layer_top,
3488 TestMapWithContents.test_lower_layer_bottom):
3489 Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
3490 Fixes RTBug #1907.
3491
3492 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
3493 extent to the map when the legend is toggled. Fixes RTBug #1881.
3494
3495 2003-05-29 Jan-Oliver Wagner <[email protected]>
3496
3497 * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
3498 unsubscribes all that is subcribed in __init__.
3499
3500 2003-05-28 Bernhard Herzog <[email protected]>
3501
3502 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
3503 (MainWindow.CanDuplicateLayer): New methods to implement the
3504 Layer/Duplicate command.
3505 (layer_duplicate command): New.
3506 (main_menu): Add layer_duplicate to the Layer menu.
3507
3508 2003-05-28 Bernhard Herzog <[email protected]>
3509
3510 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
3511 renderer so that NULL/None values get displayed differently (by a
3512 gray rectangle).
3513 (TableGrid.__init__): Override the default renderers
3514
3515 2003-05-28 Bernhard Herzog <[email protected]>
3516
3517 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
3518 classification to "None" if the type of the field has changed.
3519
3520 * test/test_layer.py (SetShapeStoreTests): New. Class with a few
3521 test for the Layer.SetShapeStore method
3522
3523 2003-05-28 Jan-Oliver Wagner <[email protected]>
3524
3525 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
3526 does not necessarily have a filename).
3527
3528 2003-05-28 Jan-Oliver Wagner <[email protected]>
3529
3530 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
3531 sort the selection list for the dialog.
3532
3533 2003-05-28 Frank Koormann <[email protected]>
3534
3535 * extensions/thuban/wxproj.cpp
3536 (project_point): Removed cast to int for projected point coordinates.
3537 (shape_centroid): Return last point if all polygon vertices fall
3538 to one point.
3539
3540 2003-05-28 Bernhard Herzog <[email protected]>
3541
3542 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
3543 with layers that don't have shapestores, i.e. raster layers.
3544
3545 2003-05-28 Bernhard Herzog <[email protected]>
3546
3547 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
3548 when determining the title from the filename.
3549
3550 * test/test_dbf_table.py (TestDBFTable.test_title): Update to
3551 reflect changes in the way the title is derived from the filename
3552
3553 2003-05-28 Frank Koormann <[email protected]>
3554
3555 * Thuban/UI/mainwindow.py (MainWindow.TableShow):
3556 Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
3557
3558 2003-05-27 Bernhard Herzog <[email protected]>
3559
3560 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
3561 delegate SelectedLayer.
3562 (MainWindow.LayerUnjoinTable): Implement.
3563 (_can_unjoin): New. Helper function for the sensitivity of the
3564 layer/unjoin command.
3565
3566 * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
3567 (DerivedShapeStore.OrigShapeStore): New. Return the original
3568 shapestore. Used to figure out how to unjoin.
3569 (DerivedShapeStore.Shapefile): Fix a typo.
3570
3571 2003-05-27 Bernhard Herzog <[email protected]>
3572
3573 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
3574 well
3575 (JoinDialog.__init__): Use the layer parameter and only build the
3576 left choice when a layer is given
3577 (JoinDialog.OnJoin): Handle layer joins as well
3578 (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
3579 that the user selects the "Select..." item. The sensitivitly
3580 updating is now in update_sensitivity
3581 (JoinDialog.y): New method to refactor the sensitivity update of
3582 the join button into its own method.
3583
3584 * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
3585
3586 2003-05-27 Bernhard Herzog <[email protected]>
3587
3588 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
3589 iff there are unreferenced tables in the session
3590
3591 2003-05-27 Bernhard Herzog <[email protected]>
3592
3593 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
3594
3595 * Thuban/Model/session.py (Session.UnreferencedTables): New method
3596 to return tables that are not referenced by other tables or shape
3597 stores and can be removed.
3598 (Session.RemoveTable): Issue a TABLE_REMOVED message after
3599 removing the table
3600
3601 * Thuban/UI/mainwindow.py: Remove unused imports
3602 (MainWindow.TableClose): Implement.
3603
3604 * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
3605 messages so that the frame will be automatically closed when a new
3606 session is opened or the table is removed.
3607 (TableFrame.OnClose): Unsubscribe the Subscriptions made in
3608 __init__
3609 (TableFrame.close_on_session_replaced)
3610 (TableFrame.close_on_table_removed): New. Subscribers that close
3611 the window
3612
3613 * test/test_session.py (TestSessionMessages.test_remove_table)
3614 (TestSessionSimple.test_remove_table): Move the test to
3615 TestSessionSimple and add test for the TABLE_REMOVED message
3616 (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
3617 (TestSessionSimple.test_unreferenced_tables) New. Test for the
3618 UnreferencedTables method.
3619 (UnreferencedTablesTests): New. Class with some more sophisticated
3620 tests for UnreferencedTables.
3621
3622 2003-05-27 Frank Koormann <[email protected]>
3623
3624 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
3625 display has some unwanted side effects. Removed again.
3626
3627 2003-05-27 Frank Koormann <[email protected]>
3628
3629 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
3630
3631 * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
3632
3633 2003-05-27 Jan-Oliver Wagner <[email protected]>
3634
3635 * test/test_menu.py (MenuTest.test): Added test for
3636 Menu.RemoveItem().
3637
3638 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
3639 the menu.
3640
3641 2003-05-27 Frank Koormann <[email protected]>
3642
3643 Nonmodal dialogs without parent (i.e. they can fall behind the main
3644 window)
3645
3646 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
3647 all dialogs in the dialogs dictionary and the canvas.
3648
3649 * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
3650 parent, i.e. can fall behind other windows.
3651 (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
3652 dictionary before removing it.
3653
3654 * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
3655
3656 * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
3657 * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
3658 * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
3659
3660 2003-05-27 Bernhard Herzog <[email protected]>
3661
3662 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
3663 tableview dialog
3664 (MainWindow.TableShow): Use ShowTableView to open the dialogs.
3665 Also, don't use the table's titles as the dialog names. The titles
3666 aren't guaranteed to be unique.
3667 (MainWindow.TableOpen): Open a table view dialog after opening the
3668 table
3669
3670 2003-05-27 Bernhard Herzog <[email protected]>
3671
3672 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
3673 effect can be achieved by simply closing the window showing the
3674 table.
3675 (MainWindow.TableHide): Removed.
3676 (main_menu): Removed "table_hide"
3677
3678 2003-05-27 Frank Koormann <[email protected]>
3679
3680 Fix legend tree display problems under Win32
3681
3682 * Thuban/UI/legend.py: BMP_SIZE_W = 15
3683 (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
3684 (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
3685
3686 * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
3687
3688 2003-05-27 Jan-Oliver Wagner <[email protected]>
3689
3690 * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
3691 'after' now allows to insert separators almost anywhere in the menu.
3692
3693 2003-05-27 Frank Koormann <[email protected]>
3694
3695 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
3696 "S" of selection box label to hint on hot key (Alt-S). Works under
3697 Win32 but is ignored under GTK.
3698
3699 2003-05-26 Frank Koormann <[email protected]>
3700
3701 * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
3702 Center Choices.
3703
3704 2003-05-26 Bernhard Herzog <[email protected]>
3705
3706 Remove the Precision methods again. They're too DBF specific to be
3707 part of the table interface and they're only used in table_to_dbf
3708 anyway.
3709
3710 * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
3711 fixed precision of 12 for doubles.
3712 (TransientTableBase.Precision): Removed
3713 (AutoTransientTable.Width): Delegate to self.table.
3714
3715 * Thuban/Model/table.py (DBFTable.Precision)
3716 (MemoryTable.Precision): Removed.
3717 (MemoryTable.Width): Use a fixed precision of 12 for doubles.
3718 (table_to_dbf): Use a fixed precision of 12 for floats unless the
3719 column object specifies something else.
3720
3721 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
3722 test for table_to_dbf
3723
3724 2003-05-26 Bernhard Herzog <[email protected]>
3725
3726 * test/test_transientdb.py
3727 (TestTransientTable.run_iceland_political_tests): Fix a comment.
3728
3729 2003-05-26 Bernhard Herzog <[email protected]>
3730
3731 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
3732 implementation. Mark parts of the file format strings for
3733 localization.
3734
3735 * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
3736 file and add the table to the tables managed by the session
3737
3738 * test/test_session.py (TestSessionSimple.test_open_table_file):
3739 New. test case for OpenTableFile
3740
3741 2003-05-26 Jan-Oliver Wagner <[email protected]>
3742
3743 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
3744 Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
3745 Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
3746 Replace the true/false of wxWindows by True/False of Python 2.2.1.
3747
3748 2003-05-26 Jan-Oliver Wagner <[email protected]>
3749
3750 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
3751 already a selection present, update the grid accordingly.
3752
3753 * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
3754 resizeable and increase its initial size.
3755
3756 2003-05-26 Frank Koormann <[email protected]>
3757
3758 Table export functionality
3759
3760 * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
3761 Return width (in characters) for a column.
3762 (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
3763 (table_to_dbf): Write table to dbf file.
3764 (table_to_csv): Write table to csv file.
3765
3766 * Thuban/Model/transientdb.py (TransientTableBase.Width,
3767 TransientTableBase.Precision): Return column width and precision.
3768
3769 * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
3770 or table_to_csv depending on file selection.
3771
3772 * test/test_dbf_table.py:
3773 Test table_to_dbf (extension of former part of test).
3774
3775 * test/test_csv_table.py:
3776 Test table_to_csv.
3777
3778 2003-05-23 Jan-Oliver Wagner <[email protected]>
3779
3780 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
3781 Use QueryTableFrame instead of TableFrame.
3782
3783 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
3784 table window with 'Layer Table:' instead of 'Table:'.
3785
3786 2003-05-23 Jan-Oliver Wagner <[email protected]>
3787
3788 Give all tables a title via mix-in TitledObject.LayerShowTable
3789
3790 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
3791 only if it exists.
3792
3793 * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
3794 and call its init-method with a default title. Remove Title() method.
3795
3796 * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
3797 AutoTransientTable): mix-in TitledObject and call its init-method with
3798 a default title. Remove Title() method.
3799
3800 2003-05-23 Bernhard Herzog <[email protected]>
3801
3802 * Thuban/Model/session.py (Session.AddShapeStore): Define
3803 AddShapeStore analogously to AddTable.
3804
3805 * test/test_session.py (TestSessionSimple.test_add_shapestore):
3806 New. Test for AddShapeStore
3807
3808 2003-05-23 Jan-Oliver Wagner <[email protected]>
3809
3810 Introducing QueryTableFrame and a very coarse ShowTable implementation.
3811
3812 * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
3813 class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
3814 The latter implements the selection GUI without dependency on a layer.
3815 LayerTableFrame now is derived from QueryTableFrame and connects
3816 to a layer.
3817
3818 * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
3819 implementation that still needs work.
3820
3821 * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
3822
3823 2003-05-22 Frank Koormann <[email protected]>
3824
3825 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
3826 Added "outer_join = False" as optional parameter.
3827 (TransientJoinedTable.create): If outer join is true, perform a
3828 "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
3829 the left table. Records not matching are filled with 0 / None.
3830
3831 * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
3832 (JoinDialog.OnJoin): Consider outer join check box.
3833
3834 2003-05-22 Bernhard Herzog <[email protected]>
3835
3836 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
3837 somewhat safer way. Storing the traceback in a local variable can
3838 lead to memory leaks
3839
3840 2003-05-22 Bernhard Herzog <[email protected]>
3841
3842 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
3843 the wxMessageDialog's Destroy() method.
3844
3845 2003-05-22 Frank Koormann <[email protected]>
3846
3847 * Thuban/UI/join.py (JoinDialog.__init__): Make use of
3848 TransientTable.Title()
3849
3850 2003-05-22 Frank Koormann <[email protected]>
3851
3852 Join Dialog, initial version.
3853
3854 * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
3855
3856 * Thuban/UI/join.py (JoinDialog): Functional implementation of
3857 former framework. Renamed Table1/Table2 to LeftTable/RightTable
3858 in all occurences.
3859
3860 * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
3861 Typo fixed.
3862
3863 2003-05-22 Bernhard Herzog <[email protected]>
3864
3865 Give the tables titles so that the GUI can display more meaningful
3866 names. For now the titles are fixed but depend on e.g. filenames
3867 or the titles of the joined tables.
3868
3869 * Thuban/Model/transientdb.py (TransientTable.Title)
3870 (TransientJoinedTable.Title, AutoTransientTable.Title): New.
3871
3872 * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
3873
3874 * test/test_transientdb.py
3875 (TestTransientTable.test_auto_transient_table_title): New. Test
3876 for the Title method
3877 (TestTransientTable.test_transient_joined_table)
3878 (TestTransientTable.test_transient_table): Add test for the Title
3879 methods
3880
3881 * test/test_memory_table.py (TestMemoryTable.test_title): New.
3882 Test for the Title method
3883
3884 * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
3885 the Title method
3886
3887 2003-05-22 Bernhard Herzog <[email protected]>
3888
3889 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
3890 Provide a better way to destroy the layers
3891 (TestLayer.test_base_layer, TestLayer.test_arc_layer)
3892 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
3893 (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
3894 the new way to destroy the layers.
3895 (TestLayer.test_derived_store): New. Test for using a layer with a
3896 DerivedShapeStore
3897
3898 * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
3899 filename if the shape store actually has one.
3900
3901 2003-05-22 Bernhard Herzog <[email protected]>
3902
3903 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
3904 for the filename
3905
3906 * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
3907 for the FileName method
3908 (TestDBFTableWriting.test_write): Fix spelling of filename
3909
3910 2003-05-22 Thomas Koester <[email protected]>
3911
3912 * Thuban/Model/range.py, test/test_range.py: Brought over new Range
3913 from SciParam that now really is immutable.
3914
3915 2003-05-22 Frank Koormann <[email protected]>
3916
3917 Layer Top/Bottom placement added to legend.
3918
3919 * Thuban/UI/legend.py
3920 (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
3921 bound to tool events.
3922 (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
3923 New, methods binding the event methods with the map methods.
3924
3925 * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
3926 layer at top/bottom of layer stack.
3927
3928 * Resources/Bitmaps/top_layer.xpm: New button icon.
3929
3930 * Resources/Bitmaps/bottom_layer.xpm: New button icon.
3931
3932 2003-05-22 Bernhard Herzog <[email protected]>
3933
3934 * Thuban/Model/session.py (Session.RemoveTable): New method to
3935 remove tables
3936
3937 * test/test_session.py (TestSessionSimple.test_remove_table): New.
3938 Test for RemoveTable
3939
3940 2003-05-22 Thomas Koester <[email protected]>
3941
3942 * Thuban/Model/classgen.py: Added short module doc string and CVS id.
3943 (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
3944
3945 2003-05-22 Bernhard Herzog <[email protected]>
3946
3947 Implement a way to discover dependencies between tables and
3948 shapestores.
3949
3950 * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
3951 (TransientJoinedTable.Dependencies)
3952 (AutoTransientTable.SimpleQuery): New. Implement the dependencies
3953 interface
3954 (TransientJoinedTable.__init__): Keep tack of the original table
3955 objects in addition to the corresponding transient tables.
3956
3957 * Thuban/Model/table.py (DBFTable.Dependencies)
3958 (MemoryTable.Dependencies): New. Implement the dependencies
3959 interface
3960
3961 * Thuban/Model/data.py (ShapeTable): New. Helper class for
3962 ShapefileStore
3963 (ShapefileStore.__init__): Use ShapeTable instead of
3964 AutoTransientTable
3965 (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
3966 (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
3967 methods for filename and type
3968 (ShapefileStore.Dependencies): New. Implement the dependencies
3969 interface
3970 (DerivedShapeStore): New class to replace SimpleStore. The main
3971 difference to SimpleStore is that it depends not on a shapefile
3972 but another shapestore which expresses the dependencies a bit
3973 better
3974 (SimpleStore.__init__): Add deprecation warning.
3975
3976 * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
3977 Test for the Dependencies method.
3978
3979 * test/test_memory_table.py (TestMemoryTable.test_dependencies):
3980 New. Test for the Dependencies method.
3981
3982 * test/test_transientdb.py
3983 (TestTransientTable.test_auto_transient_table_dependencies): New.
3984 Test for the Dependencies method.
3985 (TestTransientTable.test_transient_joined_table): Add test for the
3986 Dependencies method.
3987
3988 * test/test_session.py (TestSessionSimple.setUp)
3989 (TestSessionSimple.tearDown): New. Implement a better way to
3990 destroy the sessions.
3991 (TestSessionSimple.test_initial_state)
3992 (TestSessionSimple.test_add_table): Bind session to self.session
3993 so that it's destroyed by tearDown
3994 (TestSessionSimple.test_open_shapefile): New. Test for
3995 OpenShapefile and the object it returns
3996
3997 2003-05-22 Bernhard Herzog <[email protected]>
3998
3999 * Thuban/Model/session.py (Session.AddTable): New method to
4000 register tables with the session.
4001 (Session.Tables): Return the tables registered with AddTable too.
4002
4003 * test/test_session.py (TestSessionSimple.test_add_table): New.
4004 Test case for the AddTable method
4005
4006 2003-05-22 Frank Koormann <[email protected]>
4007
4008 UI polishing updates: Place main buttons (OK, Cancel, etc) in the
4009 lower right corner, center labels for selections, initialize controls
4010 in reasonable order for keyboard navigation.
4011
4012 * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
4013 (ProjFrame.__DoOnProjAvail): Determine position of current projection
4014 using the wxListBox.FindString() method. Still a problem (#1886)
4015
4016 * Thuban/UI/classifier.py
4017 (Classifier.__init__, SelectPropertiesDialog.__init__)
4018
4019 * Thuban/UI/classgen.py (ClassGenDialog.__init__,
4020 (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
4021 different classification types from here to __init__.
4022 (GenUniquePanel.__init__): Set the column width of the first field
4023 in the Field ListCtrl to the full width.
4024
4025 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
4026 Button to 'Export'. Center Buttons in Selection Box, set Focus to
4027 Grid.
4028 (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
4029 changes focus to the Selection when pressing "Alt-S".
4030
4031 * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
4032 the text if not visible. The italic font sometimes exceeds the
4033 rendering area.
4034
4035 2003-05-21 Jonathan Coles <[email protected]>
4036
4037 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
4038 to OnClose so that Thuban closes correctly.
4039
4040 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
4041 DockFrame.OnClose, not DockFrame._OnClose.
4042
4043 2003-05-21 Jonathan Coles <[email protected]>
4044
4045 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
4046 references to 'inf' and use new Range __init__ to pass floats
4047 directly rather than converting them to strings first.
4048 Fixes RTBug #1876.
4049
4050 * Thuban/Model/classification.py (ClassGroupRange.SetRange):
4051 Use new Range ___init__ to pass floats.
4052
4053 * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
4054 filename is a valid image file. Throw IOError otherwise.
4055
4056 * Thuban/Model/range.py: Brought over new Range from SciParam that
4057 is immutable and has an __init__ which can accept floats.
4058
4059 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
4060 into try block. AddLayer doesn't throw any exceptions anymore.
4061 (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
4062 try block.
4063
4064 * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
4065 the first item in choices. Fixes RTBug #1882.
4066
4067 * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
4068 has gone to 0 which is a serious problem. abort.
4069 (MapRenderer.draw_raster_layer): Catch IOError seperately and
4070 print the error from GDAL.
4071
4072 * Thuban/UI/tableview.py (TableGrid.__init__): Call
4073 ToggleEventListeners to turn on listening.
4074 (TableGrid.ToggleEventListeners): New. Turns event listening on
4075 and off so as to prevent excessive messages.
4076 (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
4077 to suppress excessive messages when selecting many rows.
4078 Fixes RTBug #1880.
4079
4080 * Thuban/UI/view.py: Added checks against if scale == 0. This
4081 is a serious problem that can occur when an image without
4082 geo data is loading and causes the map projection bounds to
4083 go to infinity. Right now, the solution is to simply try
4084 to recover.
4085
4086 * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
4087 to set the MFILEReceiver attributes even if the data is NULL.
4088
4089 * extensions/thuban/gdalwarp.cpp: Improved the error handling
4090 and passed GDAL messages back up to the Python layer. Also
4091 tried to fix some memory leaks that were present in the original
4092 utility but didn't matter because the program aborted.
4093
4094 * test/test_range.py: Copied over tests from SciParam. Removed
4095 tests against importing. Fixes RTBug #1867.
4096
4097 2003-05-21 Bernhard Herzog <[email protected]>
4098
4099 * test/test_load.py: Remove unused imports and restructure the
4100 test code
4101 (LoadSessionTest): Split into one class for each test and turn
4102 LoadSessionTest itself into the base class for all such session
4103 tests.
4104 (ClassificationTest): New base class for load tests that test
4105 classifications
4106 (TestSingleLayer, TestLayerVisibility, TestClassification)
4107 (TestLabels, TestLayerProjection, TestRasterLayer): New classes
4108 for the individual tests
4109
4110 * test/support.py (FileLoadTestCase.filename): New base class for
4111 file loading tests
4112
4113 2003-05-21 Jan-Oliver Wagner <[email protected]>
4114
4115 * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
4116 Mercator' to 'UTM Zone 32' as a more convenient example.
4117 Added 'Gauss Krueger Zone 6'.
4118
4119 * Data/iceland_sample_raster.thuban: political polygon now
4120 filled transparent to have the raster image visible at once.
4121
4122 2003-05-21 Frank Koormann <[email protected]>
4123
4124 * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
4125 OnClose() to keep in sync with extensions. Internally Thuban
4126 still uses "underscored" names.
4127
4128 2003-05-20 Jonathan Coles <[email protected]>
4129
4130 This puts back Raster layer support. These layers support projections
4131 through the GDAL library. Currently, the CVS version is being used.
4132 There are no Debian packages available although this may change soon.
4133 A GDAL driver was extended to support writing to memory rather to
4134 files.
4135
4136 There is still some work that needs to be done, such as some error
4137 handling when loading invalid images or when there is a problem
4138 projecting the image. This putback simply checks in the majority
4139 of the work.
4140
4141 * setup.py: Add gdalwarp library extension.
4142
4143 * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
4144 Defaults to False, but can be overridden by subclasses if they
4145 support classification.
4146 (RasterLayer): New. Defines a new layer that represents an
4147 image.
4148
4149 * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
4150 tag handler.
4151 (SessionLoader.start_layer): Encode the filename.
4152 (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
4153 New. Supports reading a rasterlayer tag.
4154
4155 * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
4156
4157 * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
4158 get a string in Latin1. If we get such as string convert it to
4159 unicode first, otherwise leave if alone before encoding.
4160 (SessionSaver.write_layer): Add support for writing both Layers
4161 and RasterLayers.
4162
4163 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
4164 The right argument may not be a string, it could also be a Column.
4165
4166 * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
4167 Make initial window size 600x400. Fixes RTBug #1872.
4168
4169 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
4170 the dialog is constructed so that we can support layers that
4171 do not have classifications.
4172 (Classifier._OnTry): Only build a classification if the layer
4173 supports one.
4174
4175 * Thuban/UI/legend.py: Change all checks that a layer is an
4176 instance of Layer into checks against BaseLayer.
4177 (LegendTree.__FillTreeLayer): Only add children to a branch if
4178 the layer supports classification.
4179
4180 * Thuban/UI/mainwindow.py (MainWindow.NewSession,
4181 MainWindow.OpenSession): Don't proceed with an action if the
4182 user chooses Cancel when they are asked to save changes.
4183 (MainWindow.AddRasterLayer): New. Open a dialog to allow the
4184 user to select an image file. Create a new RasterLayer and add
4185 it to the map.
4186
4187 * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
4188 for rendering RasterLayer layers.
4189 (MapRenderer.draw_raster_layer): Actually method that calls
4190 the GDALWarp python wrapper and constructs an image from the
4191 data returned.
4192
4193 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
4194 Choices symbols to match those used in the table query method.
4195 Replace deprecated method calls on table with new method names.
4196
4197 * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
4198 how small the scale can get. This still needs more testing.
4199
4200 * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
4201 Provides a driver to output in .bmp format.
4202
4203 * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
4204 New. Provides IO routines which write to memory, rather than a file.
4205
4206 * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
4207 of the gdalwarp utility provided in GDAL. Added function calls
4208 that can be accessed from python.
4209
4210 * Data/iceland_sample_raster.thuban: New. Sample file that uses
4211 a raster layer.
4212
4213 * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
4214 layer image data.
4215
4216 * Doc/thuban.dtd: Added rasterlayer attribute definition.
4217
4218 * test/test_layer.py, test/test_load.py, test/test_save.py: Added
4219 tests associated with the raster layer code.
4220
4221 * test/test_transientdb.py
4222 (TestTransientTable.test_auto_transient_table_query): Added a test
4223 for using a Column object as the "right" parameter to a query.
4224
4225 2003-05-19 Frank Koormann <[email protected]>
4226
4227 * Thuban/version.py (get_changelog_date):
4228 Catch exceptions if ChangeLog does not exist.
4229
4230 * Thuban/UI/view.py (MapCanvas.Export): Bugfix
4231
4232 2003-05-19 Frank Koormann <[email protected]>
4233
4234 Extended version information for Thuban
4235
4236 * Thuban/version.py: New, version information for Thuban: Last
4237 modification date and last ChangeLog entry date.
4238
4239 * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
4240 information: Display Thuban, wxPython and Python version.
4241
4242 2003-05-16 Bernhard Herzog <[email protected]>
4243
4244 * Thuban/Model/save.py: Remove some unused imports including the
4245 __future__ import for nested_scopes as Thuban relies on Python 2.2
4246 now.
4247 (XMLWriter.encode): Remove the special case for a None argument.
4248 In the saver encode is always called with a string argument.
4249
4250 2003-05-16 Bernhard Herzog <[email protected]>
4251
4252 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
4253 in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
4254 of the bug was that e.g. float("1.2") would fail. Thuban now
4255 requires 2.4.x.
4256
4257 2003-05-16 Frank Koormann <[email protected]>
4258
4259 Printing enhancement and WMF export (under Win32)
4260
4261 * Thuban/UI/renderer.py (ExportRenderer): New, derived from
4262 ScreenRenderer. Renders Map, Legend and Scalebar for export.
4263 (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
4264 PrintRender.
4265
4266 * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
4267 to fullfil information needed for PrinterRenderer.
4268 (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
4269 (MapCanvas.Print): Adapted to new MapPrintout.
4270 (OutputTransform): General calculations to transform from canvas
4271 coordinates to export/printing devices.
4272
4273 * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
4274 new method_command to call ExportMap, with platform dependency (only
4275 __WXMSW__)
4276
4277 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
4278 of scalebar drawing area as new parameters.
4279
4280 * Thuban/Model/scalebar.py (roundInterval): round long instead of int
4281
4282 * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
4283 Update to extended scalebar.DrawScalebar header.
4284
4285 * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
4286
4287 * test/test_scalebar.py: Made test executable as standalone.
4288
4289 2003-05-16 Bernhard Herzog <[email protected]>
4290
4291 * Thuban/Model/table.py (Table): Remove this compatibility alias
4292 for DBFTable.
4293
4294 * test/test_table.py: Import DBFTable as Table because that alias
4295 doesn't exist anymore.
4296
4297 * Thuban/UI/classgen.py: Remove some unused imports
4298
4299 2003-05-14 Jonathan Coles <[email protected]>
4300
4301 * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
4302 Fix docstring.
4303 (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
4304 (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
4305 values of the supplied range to determine the beginning and end
4306 bounds of the generated classes.
4307
4308 * Thuban/Model/range.py (Range.number_re): Now accepts floats that
4309 do not have a leading 0 (.5 is now accepted as well as 0.5).
4310
4311 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
4312 call to ClassGenerator.GenUniformDistribution.
4313
4314 * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
4315 layout bug with the 'Projection' label.
4316
4317 * test/support.py (FloatTestCase): New. Needed for the Range tests.
4318
4319 * test/test_range.py: New. Imported from SciParam.
4320
4321 2003-05-12 Jonathan Coles <[email protected]>
4322
4323 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
4324 to table.UniqueValues() with calls that retrieve all the values
4325 from the table. This will need to be replaced by a method on table
4326 which can simply return the list (perhaps more efficiently).
4327
4328 2003-05-12 Jonathan Coles <[email protected]>
4329
4330 The return value of ClassGenerator.CalculateQuantiles has changed.
4331 Refer to the documentation for details.
4332
4333 * test/test_classgen.py: Modified Quantile tests to use the
4334 new return values.
4335
4336 * Thuban/Model/classgen.py
4337 (ClassGenerator.GenQuantiles): Add comments describing the parameters,
4338 use new return values from CalculateQuantiles to produce the correct
4339 range bounds in the Classification.
4340 (ClassGenerator.CalculateQuantiles): Add more comments describing
4341 the return values and parameters. Make minor adjustments to improve
4342 the legibility of the code. Fix problem with adjusted not being set
4343 in most cases.
4344
4345 2003-05-12 Frank Koormann <[email protected]>
4346
4347 * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
4348 and latin1. Fixes #1851 finally.
4349
4350 2003-05-09 Jonathan Coles <[email protected]>
4351
4352 * test/test_classgen.py: New. Tests the Quantile algorithm.
4353
4354 * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
4355 Clean up debugging statement, add comments, fix a small bug in the
4356 returned adjusted percentiles.
4357
4358 2003-05-09 Jonathan Coles <[email protected]>
4359
4360 Introduces Range class from SciParam into the ClassGroupRange class,
4361 and such ranges can now be saved and loaded from disk.
4362
4363 Quantiles are now available in the Classification Generator.
4364
4365 Initial support for building Queries on a table. Doesn't do anything
4366 but run some tests.
4367
4368 * Thuban/Model/classification.py: Explicit imports.
4369 (ClassGroupRange): Use the Range class to store the underlying
4370 range information. The interface remains the same, except for
4371 GetRange(), and you can also supply a Range object as the min
4372 parameter to SetRange or __init__.
4373
4374 * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
4375 string appropriately for use in Thuban. Fixes RTbug #1851.
4376 (SessionLoader.end_projection): Handle the context of the
4377 projection tag a bit better by looking at what objects are not
4378 None. There was an assumption that a projection tag for a map
4379 could occur before any layers.
4380 (SessionLoader.start_clrange): Provide backward compatibility for
4381 reading min/max values as well as the new range parameter.
4382
4383 * Thuban/Model/map.py: Explicit imports.
4384
4385 * Thuban/Model/resource.py: Import _.
4386 (ProjFileSaver.write): write header using projfile.dtd.
4387
4388 * Thuban/Model/save.py: Explicit imports.
4389 (XMLWriter.encode): New. Encode the given string from a format
4390 used by Thuban into UTF-8. Fixes RTbug #1851.
4391
4392 * Thuban/UI/classgen.py: Explicit imports.
4393 (ClassGenDialog.__init__): Clean up the code and add support
4394 for Quantiles.
4395 (ClassGenDialog.OnOK): Add support for Quantiles.
4396 (GenQuantilesPanel): New. Input panel for Quantiles.
4397 (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
4398 GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
4399
4400 * Thuban/Model/classgen.py: New. Contains all the classes named above.
4401
4402 * Thuban/UI/classifier.py: Explicit imports.
4403 (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
4404 ClassTable.SetValueAsCustom): Reworked to use new Range class.
4405
4406 * Thuban/UI/legend.py: Explicit imports.
4407
4408 * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
4409 a Table menu and associated method calls.
4410 (MainWindow.choose_color): Removed. No longer needed.
4411
4412 * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
4413 should be disabled if no projection is selected in the available
4414 list.
4415
4416 * Thuban/UI/renderer.py: Explicit imports.
4417
4418 * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
4419 with correctly selecting the rows and issuing the right events.
4420 Be sure to call Skip() to allow the grid to do some of its own
4421 handling which allows the rows to actually be selected.
4422 (LayerTableGrid.select_shapes): Rename from select_shape. Supports
4423 selecting multiple shapes.
4424 (LayerTableFrame): Support for building Queries.
4425 (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
4426
4427 * Thuban/UI/tree.py: Explicit imports.
4428
4429 * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
4430 table view can call it.
4431
4432 * test/test_classification.py: Explicit imports.
4433 (TestClassification.test_ClassGroupRange): Fix test for new
4434 Range class.
4435
4436 * Doc/thuban.dtd: Add range parameter for clrange.
4437
4438 * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
4439 object in ClassGroupRange, and also uesd for inputting ranges in
4440 the classifer table and elsewhere.
4441
4442 * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
4443 yet.
4444
4445 2003-05-09 Frank Koormann <[email protected]>
4446
4447 * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
4448
4449 2003-05-08 Frank Koormann <[email protected]>
4450
4451 Coding style updates
4452
4453 * test/test_scalebar.py: Replaced tab indentation by spaces.
4454
4455 * Thuban/UI/scalebar.py: Explicit imports.
4456
4457 2003-05-08 Frank Koormann <[email protected]>
4458
4459 * Thuban/UI/scalebar.py
4460 (ScaleBar.DrawScalebar): Format string bug fixed.
4461
4462 2003-05-08 Frank Koormann <[email protected]>
4463
4464 Reorganization of scalebar component (no wx in Thuban/Model)
4465
4466 * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
4467 (deriveInterval):
4468 Calculate scalebar interval and unit which fits in width for scale.
4469 (roundInterval): Round float.
4470
4471 * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
4472
4473 * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
4474
4475 * Thuban/UI/legend.py: Import Thuban.UI.scalebar
4476
4477 2003-05-08 Frank Koormann <[email protected]>
4478
4479 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
4480 Initialize ScaleBar with canvas.map
4481
4482 * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
4483 round intervals to display smarter lengths
4484 (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
4485 layer. If the maps has no projection applied grey the scalebar.
4486
4487 2003-05-07 Frank Koormann <[email protected]>
4488
4489 Basic Scalebar features added.
4490
4491 * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
4492
4493 * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
4494 (ScaleBarBitmap): New, links the scalebar bitmap with view messages
4495 and the renderer.
4496
4497 * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
4498
4499 * Thuban/UI/messages.py: SCALE_CHANGED added.
4500
4501 2003-05-07 Bernhard Herzog <[email protected]>
4502
4503 * Thuban/Model/session.py (Session.__init__): New instance
4504 variable shapestores to hold a list of all open shapestore objects
4505 (Session.ShapeStores): New. Accessor method for the shapestores
4506 list.
4507 (Session._add_shapestore, Session._clean_weak_store_refs): New.
4508 Internal methods to maintain the shapestores list.
4509 (Session.Tables): New. Return all tables open in the session.
4510 (Session.OpenShapefile): Insert the new ShapeStore into the
4511 shapestores list.
4512
4513 * test/test_session.py (TestSessionSimple.test_initial_state): Add
4514 tests for ShapeStores and Tables
4515 (TestSessionWithContent.test_shape_stores)
4516 (TestSessionWithContent.test_tables): New. Test cases for
4517 ShapeStores and Tables
4518
4519 2003-05-07 Bernhard Herzog <[email protected]>
4520
4521 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
4522 Add comments about the optimizations used.
4523 (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
4524 Implement the ReadValue table interface method.
4525
4526 * test/test_transientdb.py
4527 (TestTransientTable.run_iceland_political_tests)
4528 (TestTransientTable.test_transient_joined_table): Add tests for
4529 ReadValue
4530
4531 2003-05-07 Frank Koormann <[email protected]>
4532
4533 * Resources/Bitmaps/fulllayerextent.xpm,
4534 Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
4535 new icons.
4536
4537 2003-05-06 Bernhard Herzog <[email protected]>
4538
4539 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
4540 New. Simply delegate to the transient table's version.
4541
4542 * test/test_transientdb.py
4543 (TestTransientTable.test_auto_transient_table_query): New. Test
4544 case for AutoTransientTable's SimpleQuery
4545
4546 2003-05-06 Bernhard Herzog <[email protected]>
4547
4548 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
4549 Implement a simple query method for the query dialog
4550 (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
4551 the row index or shapeid.
4552 (TransientTable.create): Insert the right value of the row index
4553 (TransientJoinedTable.create): Copy the row index of the left
4554 table to the joined result table
4555
4556 * test/test_transientdb.py
4557 (TestTransientTable.test_transient_table_read_twice): Fix
4558 doc-string
4559 (TestTransientTable.test_transient_table_query): New. Test for the
4560 SimpleQuery method
4561
4562 2003-05-06 Bernhard Herzog <[email protected]>
4563
4564 Convert all table users to use the new table interface. This only
4565 covers Thuban itself, not GREAT-ER or other applications built on
4566 Thuban yet, so the compatibility interface stays in place for the
4567 time being but it now issues DeprecationWarnings.
4568
4569 Finally, the new Table interface has a new method, HasColumn.
4570
4571 * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
4572 issue deprecation warnings when they're. The warnings refer to the
4573 caller of the method.
4574 (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
4575 for the deprecation warnings
4576
4577 * test/test_table.py: Ignore the deprecation warnings for the old
4578 table in the tests in this module. The purpose of the tests is to
4579 test the old interface, after all.
4580
4581 * test/test_transientdb.py
4582 (TestTransientTable.run_iceland_political_tests): Use the
4583 constants for the types. Add a test for HasColumn
4584 (TestTransientTable.test_transient_joined_table): Adapt to new
4585 table interface. Add a test for HasColumn
4586 (TestTransientTable.test_transient_table_read_twice): Adapt to new
4587 table interface
4588
4589 * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
4590 Adapt to new table interface
4591
4592 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
4593 new table interface
4594
4595 * Thuban/UI/controls.py (RecordListCtrl.fill_list)
4596 (RecordTable.SetTable): Adapt to new table interface
4597
4598 * Thuban/UI/classifier.py (Classifier.__init__)
4599 (Classifier.__init__): Adapt to new table interface
4600
4601 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
4602 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
4603 to new table interface
4604
4605 * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
4606 (AutoTransientTable.HasColumn): Implement the new table interface
4607 method
4608 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
4609 (AutoTransientTable.UniqueValues): Adapt to new table interface
4610
4611 * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
4612 Adapt to new table interface
4613
4614 * test/test_layer.py (TestLayer.open_shapefile): Helper method to
4615 simplify opening shapefiles a bit easier.
4616 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
4617 (TestLayer.test_point_layer): Use the new helper method
4618 (TestLayer.test_get_field_type): New. Test for the GetFieldType
4619 method
4620
4621 * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
4622 the new table method
4623
4624 * test/test_memory_table.py (TestMemoryTable.test_has_column):
4625 Test for the new table method HasColumn
4626
4627 2003-05-06 Jonathan Coles <[email protected]>
4628
4629 Addresses the "Selection Extent" wish of RTbug #1787.
4630
4631 * Resources/Bitmaps/fulllayerextent.xpm,
4632 Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
4633 extent. These are just place holders for the real bitmaps.
4634
4635 * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
4636 calculate the bounding box once (the first time compute_bbox() is
4637 called).
4638 (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
4639 the bounding box for the shapes in lat/long coordinates.
4640
4641 * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
4642 option.
4643 (MainWindow.has_selected_shapes): New. Returns true if there are
4644 any selected shapes.
4645 (MainWindow.FullSelectionExtent): New. Calls
4646 MapCanvas.FitSelectedToWindow() when the user selects the menu option.
4647 (_has_selected_shapes): New. Returns true if there are any
4648 selected shapes.
4649
4650 * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
4651 true if there are any selected shapes.
4652
4653 * Thuban/UI/view.py (MapCanvas): Added delegated method
4654 HasSelectedShapes.
4655 (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
4656 shapes on the canvas using the map projection (if any).
4657
4658 * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
4659 for Layer.ShapesBoundingBox().
4660
4661 2003-05-06 Bernhard Herzog <[email protected]>
4662
4663 * Resources/Projections/defaults.proj: Fix spelling of Mercator
4664
4665 2003-05-05 Jonathan Coles <[email protected]>
4666
4667 Addresses the "Full Layer Extent" wish of RTbug #1787.
4668
4669 * Resources/Projections/defaults.proj: Added UK National Grid.
4670
4671 * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
4672 (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
4673 when the user selects the menu option.
4674
4675 * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
4676 scales the given layer on the canvas using the map projection.
4677
4678 2003-05-05 Bernhard Herzog <[email protected]>
4679
4680 Convert the table implementations to a new table interface. All
4681 tables use a common mixin class to provide backwards compatibility
4682 until all table users have been updated.
4683
4684 * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
4685 provide backwards compatibility for table classes implementing the
4686 new interface
4687 (DBFTable, MemoryTable): Implement the new table interface. Use
4688 OldTableInterfaceMixin as base for compatibility
4689 (DBFColumn, MemoryColumn): New. Column description for DBFTable
4690 and MemoryTable resp.
4691
4692 * test/test_dbf_table.py: New. Test cases for the DBFTable with
4693 the new table interface.
4694
4695 * test/test_memory_table.py: New. Test cases for the MemoryTable
4696 with the new table interface.
4697
4698 * test/test_table.py: Document the all tests in this file as only
4699 for backwards compatibility. The equivalent tests for the new
4700 interface are in test_memory_table.py and test_dbf_table.py
4701 (MemoryTableTest.test_read): field_info should be returning tuples
4702 with four items
4703 (MemoryTableTest.test_write): Make doc-string a more precise.
4704
4705 * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
4706 table interface. Derive from from OldTableInterfaceMixin for
4707 compatibility.
4708 (TransientTableBase.create): New intance variable column_map to
4709 map from names and indices to column objects
4710 (TransientTable.create): Use the new table interface of the input
4711 table
4712 (AutoTransientTable): Convert to new table interface. Derive from
4713 from OldTableInterfaceMixin for compatibility.
4714 (AutoTransientTable.write_record): Removed. It's not implemented
4715 yet and we still have to decide how to handle writing with the new
4716 table and data framework.
4717
4718 * test/test_transientdb.py
4719 (TestTransientTable.run_iceland_political_tests)
4720 (TestTransientTable.test_transient_joined_table): Use the new
4721 table interface
4722
4723 2003-05-05 Jonathan Coles <[email protected]>
4724
4725 This is namely a collection of UI updates to improve user interactivity.
4726 Tabbing between controls now exists and you can use ESC to close dialog
4727 boxes; ENTER will active the default button.
4728
4729 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
4730 order that the controls are created so that tabbing works correctly.
4731 (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
4732 wxDialog can handle the default button correctly.
4733 (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
4734 same reasons as for OnOK.
4735 (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
4736 when we ask the table for the maximum/minimum values of a field
4737 which could take a very long time.
4738
4739 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
4740 order that the controls are created so that tabbing works correctly.
4741 (SelectPropertiesDialog.__init__): Rearrange the order that the
4742 controls are created so that tabbing works correctly.
4743
4744 * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
4745 to derive from a wxDialog but behave like the original implementation
4746 which was derived from a wxFrame. wxDialog provides useful key
4747 handling functionality like ESC calling OnCancel and ENTER calling
4748 OnOK which is lost with wxFrame.
4749
4750 * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
4751 new dialogs.
4752
4753 * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
4754 order that the controls are created so that tabbing works correctly.
4755 (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
4756 (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
4757 (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
4758 (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
4759 can provide the "UK National Grid" as a default projection.
4760 (UTMPanel.__init__): Rearrange the order that the controls are
4761 created so that tabbing works correctly.
4762
4763 2003-05-05 Bernhard Herzog <[email protected]>
4764
4765 * extensions/thuban/wxproj.cpp: Fix some of the comments.
4766 (project_point): If a map projection but no layer projection is
4767 given, convert degrees to radians before applying the map
4768 projection.
4769
4770 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
4771 (TableGrid.allow_messages): New methods to make it possible to
4772 inhibit message sending.
4773 (TableGrid.issue): Only send the message if not inhibited.
4774 (LayerTableGrid.select_shape): Use the new methods to make sure
4775 that no ROW_SELECTED message is sent while we're updating the
4776 selected rows to match the selected shapes.
4777
4778 2003-05-02 Jan-Oliver Wagner <[email protected]>
4779
4780 Implementation of MemoryTable.
4781
4782 * Thuban/Model/table.py (MemoryTable): New. Quite simple table
4783 implementation that operates on a list of tuples. All of the data
4784 are kept in the memory.
4785
4786 * test/test_table.py (MemoryTableTest): New.
4787
4788 * test/test_transientdb.py (SimpleTable): Removed.
4789 (TestTransientTable.test_transient_joined_table,
4790 (TestTransientTable.test_transient_table_read_twice): Replaced
4791 SimpleTable by MemoryTable.
4792
4793 2003-04-30 Jonathan Coles <[email protected]>
4794
4795 * Data/iceland_sample.thuban: Now contains correct projections
4796 for each of the layers.
4797
4798 * Resources/Projections/defaults.proj: Geographic projection
4799 contains unit conversion parameter.
4800
4801 2003-04-30 Jonathan Coles <[email protected]>
4802
4803 The most important part of this putback is the projection changes.
4804 It should now be possible to specify the projection that a layer
4805 is in and then specify a different projection for the map. The
4806 projection dialog has an extra parameter for a geographic projection
4807 which lets the user select if the input is in degrees or radians.
4808
4809 * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
4810 to say that the parameter is a tuple of unprojected
4811 points (which is what the callers to this method were assuming).
4812 Also, since the points are unprojected we need to projected them.
4813
4814 * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
4815 LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
4816 groups are selected, move the layer up/down. Fixes RTbug #1833.
4817
4818 * Thuban/UI/mainwindow.py: Move menu item map_rename up.
4819
4820 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
4821 parameter in call to SetClientData.
4822 (GeoPanel): Add support for selecting the units that the
4823 source data is in (Radians or Degrees).
4824
4825 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
4826 the rendering loop by reducing the number of if's, removing the
4827 unnecessary try/except block, and checking if the old group
4828 is the same as the new one (which happens a lot if there is
4829 no classification, or lots of shapes are in the same group).
4830
4831 * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
4832 around the redraw routine to try to catch problems that the user
4833 may create by selecting invalid projections for the data set and
4834 map. Clears the display if there are any problems and prints the
4835 error.
4836 (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
4837 rectangle.
4838
4839 * extensions/thuban/wxproj.cpp (project_point): First invert the
4840 supplied point (which should be in projected coordinates) using
4841 the layer's projection and then project the point using the
4842 map's projection.
4843 (project_points): Use project_point() to project each point.
4844
4845 2003-04-30 Jan-Oliver Wagner <[email protected]>
4846
4847 * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
4848 don't set the Classification to None if the classfication field
4849 is None (ie only a DEFAULT).
4850
4851 2003-04-30 Bernhard Herzog <[email protected]>
4852
4853 * Thuban/UI/view.py: Fix some typos.
4854
4855 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
4856 not pop up the dialog if the selection becomes empty (this could
4857 happen if e.g. a new selection is opened while the identify tool
4858 is active and dialog had been closed)
4859
4860 2003-04-30 Bernhard Herzog <[email protected]>
4861
4862 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
4863 instance variable read_record_last_result
4864 (TransientTableBase.read_record): Make sure reading the same
4865 record twice works. The implementation uses the new instance
4866 variable read_record_last_result
4867
4868 * test/test_transientdb.py
4869 (TestTransientTable.test_transient_table_read_twice): New test
4870 case for the above bug-fix.
4871
4872 2003-04-29 Jonathan Coles <[email protected]>
4873
4874 * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
4875
4876 * Thuban/UI/classgen.py: Remove all uses of Str2Num.
4877
4878 * Thuban/UI/classifier.py: Remove all uses of Str2Num.
4879 (ClassTable.SetValueAsCustom): Rename keyword argument in
4880 ClassGroup* constructors to match argument name.
4881
4882 2003-04-29 Bernhard Herzog <[email protected]>
4883
4884 * Thuban/Model/session.py (Session.Destroy): Explicitly close the
4885 transient DB if it exists to make sure it doesn't leave a journal
4886 file in the temp directory.
4887
4888 * Thuban/Model/transientdb.py (TransientDatabase.close): Set
4889 self.conn to None after closing the connection to make sure it's
4890 not closed twice
4891
4892 2003-04-29 Jonathan Coles <[email protected]>
4893
4894 Add a visible parameter in the layer XML tag. The default value is
4895 "true". If anything other than "false" is specified we also assume
4896 "true". Addresses RTbug #1025.
4897
4898 * Doc/thuban.dtd: Add visible parameter to a layer.
4899
4900 * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
4901 of visible from 1 to True.
4902 (Layer.__init__): Change default value of visible from 1 to True.
4903
4904 * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
4905 parameter.
4906
4907 * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
4908 parameter.
4909
4910 * test/test_load.py: Add new test data contents_test_visible.
4911 (LoadSessionTest.setUp): save test data.
4912 (LoadSessionTest.testLayerVisibility): Test if the visible flag
4913 is loaded correctly.
4914
4915 * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
4916 for saving an invisible layer.
4917
4918 2003-04-29 Jonathan Coles <[email protected]>
4919
4920 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
4921 legend dialog box and tell it to change its map to the one
4922 supplied to SetMap(). Fixes RTbug #1770.
4923
4924 2003-04-29 Bernhard Herzog <[email protected]>
4925
4926 Next step of table implementation. Introduce a transient database
4927 using SQLite that some of the data is copied to on demand. This
4928 allows us to do joins and other operations that require an index
4929 for good performance with reasonable efficiency. Thuban now needs
4930 SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
4931 haven't tested that.
4932
4933 * Thuban/Model/transientdb.py: New. Transient database
4934 implementation.
4935
4936 * test/test_transientdb.py: New. Tests for the transient DB
4937 classes.
4938
4939 * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
4940 classes to help automatically remove temporary files and
4941 directories.
4942 (Session.__init__): New instance variables temp_dir for the
4943 temporary directory and transient_db for the SQLite database
4944 (Session.temp_directory): New. Create a temporary directory if not
4945 yet done and return its name. Use AutoRemoveDir to have it
4946 automatically deleted
4947 (Session.TransientDB): Instantiate the transient database if not
4948 done yet and return it.
4949
4950 * Thuban/Model/data.py (ShapefileStore.__init__): Use an
4951 AutoTransientTable so that data is copied to the transient DB on
4952 demand.
4953 (SimpleStore): New class that simply combines a table and a
4954 shapefile
4955
4956 * Thuban/Model/table.py (Table, DBFTable): Rename Table into
4957 DBFTable and update its doc-string to reflect the fact that this
4958 is only the table interface to a DBF file. Table is now an alias
4959 for DBFTable for temporary backwards compatibility.
4960
4961 * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
4962 the last reference to the session goes away so that the temporary
4963 files are removed properly.
4964
4965 * test/test_load.py (LoadSessionTest.tearDown): Remove the
4966 reference to the session to make sure the temporary files are
4967 removed.
4968
4969 2003-04-29 Bernhard Herzog <[email protected]>
4970
4971 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
4972 the __parser instance variable into a normal local variable in
4973 read. It's only used there and read will never be called more than
4974 once. Plus it introduces a reference cycle that keeps can keep the
4975 session object alive for a long time.
4976
4977 2003-04-29 Jonathan Coles <[email protected]>
4978
4979 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
4980 Projection an immutable item. Fixes RTbug #1825.
4981 (Projection.__init__): Initialize instance variables here.
4982 (ProjFile.Replace): New. Replace the given projection object with
4983 the new projection object. This solves the problem of needing the
4984 mutator Projection.SetProjection() in the ProjFrame class and
4985 allows a projection to change parameters without changing its
4986 location in the file.
4987
4988 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
4989 be of type wxSAVE and should verify overwriting a file.
4990
4991 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
4992 ProjFile.Replace() method instead of the mutator
4993 Projection.SetProjection(). Also requires that we reassign the
4994 client data to the new projection.
4995
4996 * test/test_proj.py (TestProjection.test): Test GetName() and
4997 GetAllParameters()
4998 (TestProjFile.test): Remove tests for Set*() methods. Add tests
4999 for Replace().
5000
5001 2003-04-25 Jonathan Coles <[email protected]>
5002
5003 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
5004 to save the name of the projection.
5005
5006 * test/test_save.py (SaveSessionTest.testLayerProjection): New
5007 test to verify layer projections are saved correctly.
5008
5009 2003-04-25 Jonathan Coles <[email protected]>
5010
5011 * Thuban/Model/proj.py (Projection.SetName): Set the name
5012 to "Unknown" if name is None.
5013 (Projection.SetAllParameters): New. Set the projection's
5014 parameter list to the one supplied.
5015 (Projection.SetProjection): New. Set the projection's
5016 properties to those of the supplied Projection.
5017
5018 * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
5019 the dialog title to include the map's title.
5020 (MainWindow.LayerProjection): Set the dialog title to include
5021 the layer's title.
5022
5023 * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
5024 error dialogs into a single method call.
5025 (ProjFrame.__VerifyButtons): Add more states to check.
5026 (ProjFrame.__GetProjection): Return the current state of an
5027 edited projection or None.
5028 (ProjFrame.__FillAvailList): Remove checks for states that
5029 shouldn't exist.
5030 (ProjFrame._OnNew): Clear all selected items and supply
5031 a projection panel if necessary.
5032
5033 * test/test_proj.py (TestProjFile.test): Add tests for
5034 ProjFile.SetAllParameters, ProjFile.SetProjection,
5035 ProjFile.SetName.
5036
5037 2003-04-25 Jonathan Coles <[email protected]>
5038
5039 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
5040 takes an optional argument to select the current projection.
5041 This does not guarantee that the item is visible due to
5042 limited wxWindows functionality. Fixes RTBug #1821.
5043
5044 2003-04-25 Jonathan Coles <[email protected]>
5045
5046 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
5047 the projection name and use it when constructing the Projection
5048 object.
5049
5050 * Thuban/Model/proj.py (Projection.__init__): Change the default
5051 value for 'name' to None and then test if name is equal to None
5052 in the body of the constructor. This way the caller doesn't have to
5053 know what the default value should be. Namely, useful in load.py
5054 where we have to pick a default value if the 'name' parameter
5055 doesn't exist in the XML file.
5056
5057 * test/test_load.py (LoadSessionTest.testLayerProjection): New.
5058 Tests a file where a layer has a projection.
5059
5060 2003-04-25 Jonathan Coles <[email protected]>
5061
5062 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
5063 tree for projection information.
5064
5065 * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
5066 XMLReader.GetFileName.
5067 (SessionLoader): Added support for loading projection tags that
5068 appear inside a layer.
5069
5070 * Thuban/Model/proj.py (ProjFile): Document the class. Move
5071 back to using a list because the order of the projections in
5072 the file is important to maintain. Fixes RTbug #1817.
5073
5074 * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
5075 to ProjFile.GetFilename.
5076
5077 * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
5078 information.
5079
5080 * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
5081 ProjFrame._OnSaveAs. Removed old dead code from previous
5082 implementation.
5083 (ProjFrame._OnExport): Add support for exporting more than one
5084 projection to a single file.
5085 (ProjFrame.__FillAvailList): use string formatting (% operator)
5086 to build strings that are (partly) translated. Fixes RTbug #1818.
5087
5088 * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
5089 class.
5090
5091 2003-04-24 Bernhard Herzog <[email protected]>
5092
5093 * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
5094
5095 * po/fr.po: New. French translation by Daniel Calvelo Aros
5096
5097 * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
5098 empty strings.
5099
5100 2003-04-24 Jonathan Coles <[email protected]>
5101
5102 * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
5103 implement the interface that the ProjFrame dialog expects.
5104
5105 * Thuban/Model/proj.py (Projection.SetName): New. Allows the
5106 name of the projection to be changed.
5107 (ProjFile): Use a dictionary instead of a list so that removing
5108 projections is easier and we are sure about uniqueness.
5109 (ProjFile.Remove): Remove the given projection object.
5110
5111 * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
5112 Return a list with only one projection file instead of searching for
5113 any projection file. This simplifies many things if the user can
5114 only have one system file and one user file.
5115
5116 * Thuban/UI/classgen.py: Change all references to
5117 genCombo to genChoice.
5118
5119 * Thuban/UI/mainwindow.py: Add a Projection option under the
5120 layer menu.
5121 (MainWindow.LayerProjection): New. Open up a projection window
5122 for a layer.
5123
5124 * Thuban/UI/projdialog.py: Large changes to how the dialog is
5125 laid out. Use three panels instead of one. One for the list of
5126 projections, one for the edit controls, and one for the buttons.
5127 Fixed resizing problems so that the dialog resizes correctly
5128 when the projection panel changes. Added import/export, save, and
5129 new buttons/functionality.
5130
5131 2003-04-24 Bernhard Herzog <[email protected]>
5132
5133 First step towards table management. Introduce a simple data
5134 abstraction so that we replace the data a layer uses more easily
5135 in the next step.
5136
5137 * Thuban/Model/data.py: New file with a simple data abstraction
5138 that bundles shapefile and dbffile into one object.
5139
5140 * Thuban/Model/session.py (Session.OpenShapefile): New method to
5141 open shapefiles and return a shape store object
5142
5143 * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
5144 object instead of a shapefile filename. This introduces a new
5145 instance variable store holding the datastore. For intermediate
5146 backwards compatibility keep the old instance variables.
5147 (open_shapefile): Removed. No longer needed with the shape store.
5148 (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
5149 get the shape store used by a layer.
5150 (Layer.Destroy): No need to explicitly destroy the shapefile or
5151 table anymore.
5152
5153 * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
5154 (MainWindow.AddLayer): Use the session's OpenShapefile method to
5155 open shapefiles
5156
5157 * Thuban/Model/load.py (ProcessSession.start_layer): Use the
5158 session's OpenShapefile method to open shapefiles
5159
5160 * test/test_classification.py
5161 (TestClassification.test_classification): Use the session's
5162 OpenShapefile method to open shapefiles and build the filename in
5163 a more platform independed way
5164
5165 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
5166 Implement to have a session to use in the tests
5167 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
5168 (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
5169 session's OpenShapefile method to open shapefiles
5170 (TestLayerLegend.setUp): Instantiate a session so that we can use
5171 it to open shapefiles.
5172 (TestLayerLegend.tearDown): Make sure that all references to
5173 layers and session are removed otherwise we may get a resource
5174 leak
5175
5176 * test/test_map.py (TestMapAddLayer.test_add_layer)
5177 (TestMapWithContents.setUp): Instantiate a session so that we can
5178 use it to open shapefiles.
5179 (TestMapWithContents.tearDown): Make sure that all references to
5180 layers, maps and sessions are removed otherwise we may get a
5181 resource leak
5182 ("__main__"): use support.run_tests() so that more info about
5183 uncollected garbage is printed
5184
5185 * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
5186 session's OpenShapefile method to open shapefiles
5187 ("__main__"): use support.run_tests() so that more info about
5188 uncollected garbage is printed
5189
5190 * test/test_selection.py (TestSelection.tearDown): Make sure that
5191 all references to the session and the selection are removed
5192 otherwise we may get a resource leak
5193 (TestSelection.get_layer): Instantiate a session so that we can
5194 use it to open shapefiles.
5195 ("__main__"): use support.run_tests() so that more info about
5196 uncollected garbage is printed
5197
5198 * test/test_session.py (TestSessionBase.tearDown)
5199 (TestSessionWithContent.tearDown): Make sure that all references
5200 to the session and layers are removed otherwise we may get a
5201 resource leak
5202 (TestSessionWithContent.setUp): Use the session's OpenShapefile
5203 method to open shapefiles
5204
5205 2003-04-24 Jonathan Coles <[email protected]>
5206
5207 * Thuban/Model/load.py (XMLReader.read): Should have been checking
5208 if the file_or_filename object had the 'read' attribute.
5209
5210 2003-04-23 Jonathan Coles <[email protected]>
5211
5212 * Thuban/Model/resource.py: Fixes RTbug #1813.
5213 (ReadProjFile): Add documentation about which exceptions are raised.
5214 Always pass the exceptions up to the caller.
5215 (GetProjFiles): If the directory can't be read return an empty list.
5216 If any of the proj files can't be read skip that file and go
5217 on to the next one.
5218
5219 * test/test_proj.py: Added test cases to handle nonexistent files,
5220 unreadable files, and files that don't parse correctly.
5221
5222 2003-04-23 Jonathan Coles <[email protected]>
5223
5224 Projection dialog. Allows the user to select from a list
5225 of projection templates and optionally edit them and save new ones.
5226
5227 * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
5228 (ProjPanel): Base class for projection specific panels.
5229 (TMPanel): Projection panel for Transverse Mercartor.
5230 (UTMPanel): Projection panel for Universal Transverse Mercartor.
5231 (LCCPanel): Projection panel for Lambert Conic Conformal.
5232 (GeoPanel): Projetion panel for Geographic Projection.
5233
5234 2003-04-23 Jonathan Coles <[email protected]>
5235
5236 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
5237 promote symmetry. There now exists XMLReader and XMLWriter.
5238 (XMLReader.read): New. Call to read the given file descriptor or
5239 filename.
5240 (XMLReader.close): New. Make sure the file is closed.
5241 (XMLReader.GetFileName): New. Return just the file name that is being
5242 read from.
5243 (XMLReader.GetDirectory): New. Return just the directory of the file
5244 that is being read.
5245 (XMLReader.AddDispatchers): New. Take a dictionary which contains
5246 the names of functions to call as the XML tree is parsed.
5247 (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
5248 (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
5249 (SessionLoader): Removed class variables start_dispatcher and
5250 end_dispatcher since this functionality is now part of a class
5251 instance. Fixes RTbug #1808.
5252 (SessionLoader.__init__): Add dispatcher functions.
5253 (load_xmlfile): Code was moved into the XMLReader.read().
5254 (load_session): Use modified SessionLoader.
5255
5256 * Thuban/Model/map.py (Map.GetProjection): New. Returns the
5257 map's projection.
5258
5259 * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
5260 GetAllParameters.
5261 (Projection.GetParameter): Returns the value for the given parameter.
5262
5263 * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
5264 (GetProjFiles): Renamed from GetProjections. Now returns a list
5265 of ProjFile objects.
5266 (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
5267 a list of ProjFile objects whose files are not user defined.
5268 (GetUserProjFiles): Renamed from GetUserProjections. Returns a
5269 list of ProjFile objects whose files are user defined.
5270 (ProjFileReader): Extend new XMLReader.
5271
5272 * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
5273 promote symmetry.
5274
5275 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
5276 control instead of a wxComboBox. wxChoice controls do not generate
5277 events as the uses highlights possible choices which fixes problems
5278 with resizing the dialog when the use selects an option.
5279
5280 * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
5281 control instead of a wxComboBox.
5282
5283 * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
5284 dialog.
5285
5286 * test/test_proj.py (TestProjection.test): New tests for GetParameter
5287 method.
5288
5289 2003-04-22 Bernhard Herzog <[email protected]>
5290
5291 * Thuban/UI/mainwindow.py: Remove some unused imports and global
5292 constants
5293
5294 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
5295 (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
5296
5297 2003-04-17 Bernhard Herzog <[email protected]>
5298
5299 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
5300 (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
5301 anymore.
5302 (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
5303 (Layer.ShapeType, Layer.Shape): No need to call
5304 self.open_shapefile since it's always called in __init__
5305
5306 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
5307 In wxPython 2.4 there's no need to extend MainLoop anymore since
5308 wxPython itself makes sure OnExit is called.
5309
5310 2003-04-16 Jonathan Coles <[email protected]>
5311
5312 Initial putback of projection management code. Includes new
5313 classes to read and write projection files. The current load
5314 and save classes were abstracted a bit so they could be reused.
5315 The Projection class was extended to provide new methods and
5316 have a name.
5317
5318 * Thuban/Model/load.py (XMLProcessor): New. Contains all the
5319 general XML reading methods that were part of ProcessSession.
5320
5321 * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
5322 name.
5323 (ProjFile): New. Represents a file that contains projection
5324 information.
5325
5326 * Thuban/Model/resource.py: New. Contains general utilities
5327 for read and writing projection files.
5328
5329 * Thuban/Model/save.py (XMLSaver): New. Contains all the
5330 general XML writing methods that were part of SessionSaver.
5331 (SessionSaver): Renamed from Saver.
5332
5333 * test/test_proj.py: New test cases for the projection
5334 file read and write functions.
5335
5336 2003-04-16 Jonathan Coles <[email protected]>
5337
5338 * Thuban/Model/classification.py: Use repr() around values
5339 in the ClassGroup*.__repr__() methods so it is clearer when
5340 a value is a string and when it is a number.
5341
5342 * test/test_load.py: Rework the classification test to test
5343 that we can load old files.
5344 (testLabels): Test a file where the groups have labels.
5345
5346 2003-04-16 Bernhard Herzog <[email protected]>
5347
5348 Safer implementation of the performance enhancements of the
5349 low-level renderer:
5350
5351 * extensions/thuban/wxproj.cpp (extract_projection)
5352 (extract_pointer): Rename extract_projection to extract_pointer
5353 and redefine its purpose to return the pointer stored in a CObject
5354 returned by the object's cobject method. Update all callers.
5355 (s_draw_info, free_draw_info, draw_polygon_init): Implement the
5356 handling of these low-level parameters so that each s_draw_info
5357 instance is handled as a CObject at python level that also
5358 contains real references to the actual python objects which
5359 contain the values in the struct. Add free_draw_info as the
5360 destructor.
5361 (draw_polygon_shape): Add the py_draw_info parameter which must a
5362 cobject containing an s_draw_info pointer.
5363
5364 * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
5365 method to instantiat the low-level render parameter
5366 (MapRenderer.draw_shape_layer): Use the new method. Remove some
5367 commented out code.
5368 (MapRenderer.draw_polygon_shape): Make the first parameter not the
5369 layer but the low-level render parameter
5370 (ScreenRenderer.draw_shape_layer): Use the low-level render
5371 parameter.
5372
5373 2003-04-15 Jonathan Coles <[email protected]>
5374
5375 * Thuban/Model/classification.py: Implemented __repr__ for
5376 the ClassGroup* classes to make debugging a bit easier.
5377 (ClassGroup.SetLabel): Check that the string is an instance
5378 of StringTypes not StringType. Accounts for Unicode strings.
5379
5380 * Thuban/Model/color.py: Implemented __repr__ to make
5381 debugging a bit easier.
5382
5383 * Thuban/Model/save.py (Saver.write_classification): Need to
5384 save the group label.
5385
5386 * test/test_load.py (testClassification): New. Loads the
5387 iceland_sample_test.thuban file and checks if it was loaded
5388 correctly.
5389
5390 2003-04-15 Jonathan Coles <[email protected]>
5391
5392 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
5393 to improve rendering performance by initializing the variables
5394 that are not change each time draw_polygon_shape() is called.
5395 The values are stored in a global struct draw_info.
5396 (draw_polygon_shape): Removed initialization code that is
5397 now in draw_polygon_init().
5398
5399 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
5400 drawing initialization call to draw_polygon_init()
5401 (MapRenderer.draw_polygon_shape): Use new signature of
5402 draw_polygon_shape.
5403
5404 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
5405 weirdness by setting the range to (1, maxint).
5406
5407 * Thuban/Model/classification.py (ClassGroupProperties): Make
5408 instance variables private and optimize comparison operator
5409 by first checking if the color references are the same.
5410 (ClassGroupSingleton): Make instance variables private.
5411 (ClassGroupRange): Make instance variables private.
5412
5413 * HOWTO-Release: Filled in missing steps for releasing packages.
5414
5415 2003-04-15 Bernhard Herzog <[email protected]>
5416
5417 First stab at internationalized messages:
5418
5419 * Thuban/__init__.py (_): Implement the translation function for
5420 real using the python gettext module.
5421
5422 * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
5423 translate empty strings.
5424
5425 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
5426 Add a missing space to a warning message
5427
5428 * po/README: New. Notes about the management of the translation
5429 files.
5430
5431 * po/Makefile: New. Makefile to help manage the translation files.
5432
5433 * po/es.po: New. Spanish translation by Daniel Calvelo Aros
5434
5435 * MANIFEST.in: Include the *.mo files in Resources/Locale and the
5436 translations and support files in po/
5437
5438 * setup.py (data_files): Add the *.mo files to the data_files too
5439
5440 * README: Add note about the translations when building from CVS
5441
5442 2003-04-14 Jonathan Coles <[email protected]>
5443
5444 * Thuban/UI/dock.py: Fixes some window resizing problems most
5445 noticable under windows. Always assume the button bitmaps will
5446 be there. Code clean up.
5447 (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
5448 images for the dock/undock button to the same images.
5449 Work around for RTbug #1801.
5450
5451 * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
5452 be allowed to grow within the sizer. Fixes a bug under Windows
5453 where the toolbar wasn't being drawn.
5454
5455 2003-04-14 Frank Koormann <[email protected]>
5456
5457 * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
5458 Updated design to try to make the button functionality more
5459 transparent.
5460
5461 2003-04-14 Jonathan Coles <[email protected]>
5462
5463 * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
5464 finalize the intialization of the panel.
5465
5466 * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
5467 creation of the panel. Should be the last thing called in the
5468 initializer of a subclass.
5469
5470 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
5471 set the current selections in the combo boxes. This is needed
5472 under Windows.
5473
5474 * Thuban/UI/classifier.py (Classifier.__init__): Add a top
5475 level panel to the dialog so that the background colors are
5476 consistent under Windows.
5477
5478 2003-04-11 Jonathan Coles <[email protected]>
5479
5480 * Thuban/UI/classgen.py: Change color ramps to start at white
5481 not black.
5482
5483 * Thuban/UI/legend.py: Enable/disable the legend buttons when
5484 the legend changes. Fixes RTbug #1793.
5485
5486 * test/test_classification.py: Added test for copying of
5487 classifications.
5488
5489 2003-04-11 Jonathan Coles <[email protected]>
5490
5491 * Thuban/UI/resource.py: New. Centralize the loading of resources
5492 such as bitmaps.
5493
5494 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
5495 added images to the move buttons, added 'reverse' button.
5496 (CustomRampPanel.__init__): Added images to the move buttons.
5497 (GreyRamp): New. Generates a ramp from white to black.
5498 (HotToColdRamp): New. Generates a ramp from cold to hot colors.
5499
5500 * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
5501 ID_PROPERTY_*.
5502 (Classifier.__init__): Minor changes to the layout.
5503 (Classifier._OnTitleChanged): Listen for when the user edits the
5504 title and update the dialog's title and the layer's title.
5505
5506 * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
5507
5508 * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
5509 (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
5510 if the layer's title changes.
5511
5512 * Thuban/UI/mainwindow.py: Added new menu item and associated code
5513 to open a dialog to rename the map.
5514 (MainWindow): Use new resource class to import bitmaps.
5515
5516 2003-04-11 Jonathan Coles <[email protected]>
5517
5518 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
5519 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
5520 Resources/Bitmaps/group_use_none.xpm,
5521 Resources/Bitmaps/group_use_not.xpm,
5522 Resources/Bitmaps/hide_layer.xpm,
5523 Resources/Bitmaps/layer_properties.xpm,
5524 Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
5525 Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
5526 New.
5527
5528 2003-04-10 Jonathan Coles <[email protected]>
5529
5530 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
5531 Should pass group to ClassGroup constructor.
5532
5533 2003-04-10 Jonathan Coles <[email protected]>
5534
5535 * Thuban/Model/classification.py: (ClassGroup): Move all the common
5536 methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
5537 here. Implement SetVisible(), IsVisible().
5538 (ClassGroup.__init__): Add group parameter which acts as a copy
5539 constructor.
5540
5541 * Thuban/UI/classifier.py (ClassTable): Add a new column for the
5542 "Visible" check boxes.
5543 (Classifier): Rename the buttons and refactor the code to match
5544 the new labels.
5545
5546 * Thuban/UI/legend.py: Classify button is now called "Properties".
5547 Refactored the code to change variable names.
5548 (LegendTree.__FillTreeLayer): Only list a group if it is visible.
5549
5550 * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
5551 MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
5552 renamed to MainWindow.LayerEditProperties.
5553 (MainWindow.ToggleLegend): Don't include map name in legend title.
5554 (MainWindow.SetMap): Added the map name to the window title.
5555 (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
5556 MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
5557 Functionality is found in the layer properties dialog.
5558
5559 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
5560 draw visible groups.
5561
5562 2003-04-09 Jonathan Coles <[email protected]>
5563
5564 * Thuban/UI/classgen.py: Modifications to allow simple
5565 addition and selection of new color schemes.
5566 (MonochromaticRamp): New. Generates a ramp between two colors.
5567 (RedRamp): New. Generates a ramp of all red.
5568 (GreenRamp): New. Generates a ramp of all green.
5569 (BlueRamp): New. Generates a ramp of all blue.
5570
5571 2003-04-09 Jonathan Coles <[email protected]>
5572
5573 * Thuban/Model/classification.py (Classification.__deepcopy__):
5574 Need to copy over field and fieldType attributes.
5575
5576 * Thuban/Model/table.py (Table.field_range): New. Retrive the
5577 maximum and minimum values over the entire table for a given
5578 field.
5579 (Table.GetUniqueValues): New. Retrieve all the unique values
5580 in the table for a given field.
5581
5582 * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
5583 (GenUniquePanel): New. Controls to allow the user to select
5584 which unique field values they would like in the classification.
5585 (CustomRampPanel): Code that was in ClassGenDialog that allows
5586 the user to select the properties for a custom ramp.
5587 (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
5588
5589 * Thuban/UI/classifier.py: Removed a lot of debugging code.
5590 (Classifier._SetClassification): Callback method so that the
5591 class generator can set the classification in the grid.
5592 (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
5593 editing of a group properties class into a wxWindows control.
5594
5595 * Thuban/UI/dock.py: It was decided that if the user closes
5596 a dockable window the window should simply hide itself. That
5597 way if the user wants to show the dock again it appears in the
5598 same place as it was when it was closed.
5599 (DockableWindow.Destroy): Call renamed method OnDockDestroy().
5600 (DockableWindow._OnButtonClose): Hide the window instead of
5601 destroying it.
5602 (DockableWindow._OnClose): Hide the window instead of
5603 destroying it.
5604
5605 * Thuban/UI/legend.py (LegendTree): Use a private method to
5606 consistently set the font and style of the text. Fixes RTbug #1786.
5607
5608 * Thuban/UI/mainwindow.py: Import just the Classifier class.
5609
5610 2003-04-07 Bernhard Herzog <[email protected]>
5611
5612 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
5613 to the map module
5614
5615 2003-04-07 Bernhard Herzog <[email protected]>
5616
5617 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
5618 favor of ToggleSessionTree
5619 (MainWindow.ToggleSessionTree): New method to toggle visibility of
5620 the session tree.
5621 (MainWindow.SessionTreeShown): New method to return whether the
5622 session tree is currently shown.
5623 (MainWindow.ToggleLegend): New method to toggle visibility of the
5624 legend
5625 (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
5626 LegendShown
5627 (MainWindow.LegendShown): New method to return whether the legend
5628 is currently shown.
5629 (_method_command): Add checked parameter so we can define check
5630 menu items
5631 (_has_tree_window_shown, _has_legend_shown): Use the appropriate
5632 mainwindow methods.
5633 (show_session_tree, show_legend commands): Removed.
5634 (toggle_session_tree, toggle_legend commands): New commands to
5635 toggle the visibility of the dialogs
5636
5637 2003-04-07 Jonathan Coles <[email protected]>
5638
5639 * Thuban/UI/classgen.py: Fix Windows problem.
5640
5641 * Thuban/UI/dock.py: Fix Windows problem.
5642
5643 * Thuban/UI/mainwindow.py: Use False instead of false.
5644 (MainWindow.ShowLegend): Remove unnecessary switch parameter.
5645
5646 2003-04-07 Jonathan Coles <[email protected]>
5647
5648 Since we now say that the order of the groups in a classification
5649 matters, it makes sense to be able to manipulate that order. Most
5650 of the changes to Thuban/Model/classification.py are to that end.
5651
5652 * Thuban/Model/classification.py (Classification.AppendGroup,
5653 Classification.InsertGroup, Classification.ReplaceGroup,
5654 Classification.RemoveGroup, Classification.GetGroup): Do as the
5655 names imply.
5656 (Classification.FindGroup): This was called GetGroup, but GetGroup
5657 takes an index, while FindGroup takes a value.
5658 (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
5659 REFERENCE. Currently there is a cyclic reference between the layer
5660 and its classification. If the classification doesn't need to know
5661 its owning layer we can change this, since it may make sense to be
5662 able to use the same classification with different layers.
5663
5664 * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
5665
5666 * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
5667 not AddGroup()
5668
5669 * Thuban/UI/classifier.py: Now that we can depend on the order in
5670 a Classification and have methods to manipulate that order we don't
5671 need to use our own data structures in the grid. We can simply make
5672 the grid/table access the information they need from a copy of
5673 the classification object.
5674 (Classifier._OnCloseBtn): Event handler for when the user clicks
5675 'Close'. This is needed so if the user applies changes and then
5676 continues to change the table the user has the option of discarding
5677 the most recent changes and keeping what they applied.
5678
5679 * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
5680 into the same group.
5681
5682 * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
5683 with a really old version of proj, PJ_VERSION won't even be defined.
5684 If it isn't defined then just compile so that the function always
5685 returns Py_False.
5686
5687 * test/test_classification.py: Fix tests to use the renamed methods.
5688 Still need to write tests for the new methods.
5689
5690 2003-04-04 Jonathan Coles <[email protected]>
5691
5692 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
5693 call to SetSelection out of the method and before the call
5694 to __SelectField in __init__. This prevents a recursion of events
5695 when _OnFieldSelect is triggered by the user.
5696
5697 2003-04-04 Jonathan Coles <[email protected]>
5698
5699 * Thuban/Model/classification.py: Rename Color.None to
5700 Color.Transparent.
5701 (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
5702 Don't bother copying the color, since Colors are immutable.
5703
5704 * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
5705 Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
5706 Thuban/UI/renderer.py, Thuban/UI/view.py:
5707 Rename Color.None to Color.Transparent.
5708
5709 * test/test_classification.py, test/test_load.py: Rename Color.None
5710 to Color.Transparent.
5711
5712 2003-04-04 Jonathan Coles <[email protected]>
5713
5714 * Thuban/Model/classification.py: Fix assert calls.
5715 (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
5716 Copy the color parameter rather than hold onto a reference.
5717
5718 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
5719 the color object.
5720 (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
5721 are sure there exists only one refernce to Color.None in the system.
5722 This allows us to use 'is' rather than the comparision functions.
5723
5724 * Thuban/Model/save.py: Fix assert calls.
5725
5726 * Thuban/UI/classifier.py: Fix assert calls.
5727 (ClassGrid._OnCellDClick): Call up to the classifier to open the
5728 dialog to edit the groups properties.
5729 (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
5730 correctly if a cell is resized.
5731 (ClassTable.SetClassification): New. Changes the classification
5732 that is in the table.
5733 (ClassTable.__SetRow): Allow groups to be prepended.
5734 (Classifier): New code for opening the EditProperties and
5735 GenerateRanges dialogs.
5736 (SelectPropertiesDialog.__GetColor): Only set the color in the
5737 color dialog if the current color is not None.
5738
5739 * Thuban/UI/dock.py: Fix assert calls.
5740
5741 * Thuban/UI/legend.py: Fix assert calls.
5742
5743 * Thuban/UI/renderer.py: Fix assert calls.
5744
5745 * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
5746 classifications.
5747 (GenRangePanel): Panel specific to range generation.
5748 (GenSingletonPanel): Panel specific to singleton generation.
5749 (ClassGenerator): Class responsible for actually generating
5750 the classification from the data gathered in the dialog box.
5751 (PropertyRamp): Generates properties whose values range from
5752 a starting property to an ending property.
5753
5754 2003-04-03 Bernhard Herzog <[email protected]>
5755
5756 * test/support.py (print_garbage_information): New function that
5757 prints information about still connected messages and memory
5758 leaks.
5759 (run_suite): Removed.
5760 (run_tests): New function for use as a replacement of
5761 unittest.main in the test_* files. This one calls
5762 print_garbage_information at the end.
5763
5764 * test/runtests.py (main): Use support.print_garbage_information
5765
5766 * test/test_layer.py: Use support.run_tests instead of
5767 unittest.main so we get memory leak information
5768 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
5769 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
5770 (TestLayerLegend.test_visibility): Call the layer's Destroy method
5771 to fix a memory leak.
5772
5773 * test/test_classification.py: Use support.run_tests instead of
5774 unittest.main so we get memory leak information
5775 (TestClassification.test_classification): Call the layer's Destroy
5776 method to fix a memory leak.
5777
5778 2003-04-02 Bernhard Herzog <[email protected]>
5779
5780 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
5781 Handle the reference counts of the return value and errors in
5782 PyArg_ParseTuple correctly.
5783
5784 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
5785 sure the filename is absolute to avoid problems when saving the
5786 session again
5787
5788 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
5789
5790 2003-04-01 Jonathan Coles <[email protected]>
5791
5792 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
5793 that there actually are points in the returned list of points
5794 before trying to index into the list. The list may be empty if
5795 the shape is a Null Shape.
5796
5797 2003-04-01 Bernhard Herzog <[email protected]>
5798
5799 * test/test_map.py: Don't use from <module> import *
5800
5801 2003-04-01 Jonathan Coles <[email protected]>
5802
5803 * Thuban/Model/session.py: Use LAYER_CHANGED instead of
5804 LAYER_LEGEND_CHANGED
5805
5806 * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
5807 self.Destroy() to close the window after yesterday's changes.
5808
5809 * test/test_map.py, test/test_session.py: Fix messages that
5810 are sent from maps and layers.
5811
5812 2003-03-31 Jonathan Coles <[email protected]>
5813
5814 * Thuban/UI/classifier.py: Commented out some debugging statements.
5815 (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
5816 RTbug #1769.
5817
5818 * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
5819 position (although position doesn't work yet under GTK).
5820 (DockableWindow.Destroy): New. Called when the window must be
5821 closed. Namely needed when the DockFrame closes and must close
5822 its children.
5823 (DockFrame): Listen for EVT_CLOSE and destroy all children.
5824
5825 * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
5826 when then window is told to close.
5827 (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
5828 comment in source for more info.
5829
5830 * Thuban/UI/main.py: Show the legend by default when Thuban starts.
5831
5832 * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
5833 symmetry with other such methods.
5834 (MainWindow.ShowLegend): Show the legend docked by default.
5835
5836 2003-03-28 Jonathan Coles <[email protected]>
5837
5838 * Thuban/UI/classifier.py: Support for highlighting a specific
5839 group within the grid when the classification dialog is opened.
5840 Also contains a lot of debugging printouts which will later
5841 be removed.
5842
5843 * Thuban/UI/dock.py: Complete rework on the dock code so that
5844 that it is fairly removed from the rest of the Thuban application.
5845 It is easy to add new docks which the rest of the program having
5846 to be aware of them.
5847
5848 * Thuban/UI/legend.py: Modifications to support selecting a
5849 specific group in the classification dialog. Changed how layers
5850 are drawn when the layer is visible/invisible.
5851
5852 * Thuban/UI/mainwindow.py: Removed legend specific code and
5853 replaced it with calls to the new dock code.
5854
5855 * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
5856 to check if scale > 0. Trying to track down a divide by zero.
5857
5858 2003-03-26 Jonathan Coles <[email protected]>
5859
5860 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
5861 (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
5862 now part of DockableWindow.
5863 (LegendPanel.DoOnSelChanged): Select the current layer in the
5864 map.
5865 (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
5866 with the selected layer and/or group.
5867
5868 2003-03-26 Jonathan Coles <[email protected]>
5869
5870 This putback contains the code for dockable windows. There is
5871 no support in wxWindows as of this date for windows that can
5872 attach themselves to other windows.
5873
5874 The current model contains a DockableWindow which has a parent
5875 window for when it is detached and a dock window that it puts
5876 its contents in when it is docked. The contents of a DockableWindow
5877 must be a DockPanel. DockPanel itself derives from wxPanel.
5878
5879 * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
5880 message, not a LAYER_LEGEND_CHANGED message.
5881
5882 * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
5883
5884 * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
5885 as one of the style properties for the fieldTypeText item to
5886 be sure that its size is correct when the text changes.
5887
5888 * Thuban/UI/dock.py: New. Classes for the DockPanel and
5889 DockableWindow.
5890
5891 * Thuban/UI/legend.py: Added some more buttons and made the
5892 LegendPanel a DockPanel.
5893
5894 * Thuban/UI/mainwindow.py: Added sash windows to the main window
5895 and supporting functions for manipulating the sashes.
5896 (MainWindow.ShowLegend): Create a DockableWindow with the
5897 LegendPanel as the contents.
5898
5899 * Thuban/UI/messages.py: Added DOCKABLE_* messages
5900
5901 * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
5902 not LAYER_LEGEND_CHANGED, messages.
5903
5904 2003-03-25 Jonathan Coles <[email protected]>
5905
5906 * setup.py: Added custom script bdist_rpm_build_script so that
5907 when the rpm is built the path to wx-config is correct.
5908
5909 * setup.cfg: Added line saying to use the custom build script
5910
5911 2003-03-20 Jonathan Coles <[email protected]>
5912
5913 Initial implementation of the Legend.
5914
5915 * Thuban/UI/legend.py: New. Creates a window that shows the map's
5916 Legend information and allows the user to add/modify classifications
5917 and how the layers are drawn on the map.
5918
5919 * setup.py: New command 'build_docs' which currently uses
5920 happydoc to generate html documentation for Thuban.
5921
5922 * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
5923 Returns a string which is appropriately describes the group.
5924
5925 * Thuban/Model/layer.py (Layer.SetClassification): Generate a
5926 LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
5927
5928 * Thuban/Model/map.py (Map): Rename messages and use new, more
5929 specific, messages.
5930
5931 * Thuban/Model/messages.py: New message to indicate that a layer's
5932 data has changed (LAYER_CHANGED). New map messages to indicate
5933 when layers have been added/removed/changed or if the stacking order
5934 of the layers has changed.
5935
5936 * Thuban/Model/session.py: Rename and use new messages.
5937
5938 * Thuban/UI/classifier.py: Remember if any changes have actually
5939 been applied so that if the dialog is cancelled without an application
5940 of changes we don't have to set a new classification.
5941 (ClassDataPreviewer): Pulled out the window specific code and put it
5942 ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
5943 symbols on any DC.
5944
5945 * Thuban/UI/mainwindow.py: New code to open the legend.
5946
5947 * Thuban/UI/view.py: Use new message names.
5948
5949 2003-03-19 Jonathan Coles <[email protected]>
5950
5951 * Thuban/UI/main.py (verify_versions): New. Checks the versions
5952 of Python, wxPython, and some other libraries.
5953
5954 * extensions/thuban/wxproj.cpp (check_version): Checks the given
5955 version against what wxproj was compiled with.
5956 (check_version_gtk): If wxproj was compiled with gtk then check
5957 the given version against the version of the gtk library
5958 currently being used.
5959
5960 2003-03-14 Bernhard Herzog <[email protected]>
5961
5962 * test/test_command.py: Run the tests when the module is run as a
5963 script
5964
5965 2003-03-14 Bernhard Herzog <[email protected]>
5966
5967 Implement selection of multiple selected shapes in the same layer:
5968
5969 - Introduce a new class to hold the selection. This basically
5970 replaces the interactor which was nothing more than the
5971 selection anyway. A major difference is of course that the new
5972 selection class supports multiple selected shapes in one layer
5973
5974 - Move the object that represents the selection from the
5975 application to the canvas. The canvas is a better place than the
5976 application because the selection represents which shapes and
5977 layer of the map displayed by the canvas are selected and
5978 affects how the map is drawn.
5979
5980 - Make the selection and its messages publicly available through
5981 the mainwindow.
5982
5983 - The non-modal dialogs do not get a reference to the interactor
5984 anymore as they can simply refer to their parent, the
5985 mainwindow, for the what the interactor had to offer.
5986
5987 * Thuban/UI/selection.py: New module with a class to represent the
5988 selection.
5989
5990 * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
5991 these unused messages
5992
5993 * Thuban/UI/application.py (ThubanApplication.OnInit)
5994 (ThubanApplication.OnExit, ThubanApplication.SetSession): The
5995 interactor is gone now.
5996 (ThubanApplication.CreateMainWindow): There is no interactor
5997 anymore so we pass None as the interactor argument for now for
5998 compatibility.
5999
6000 * Thuban/UI/view.py (MapCanvas.delegated_messages)
6001 (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
6002 Unsubscribe, delegate messages according to the delegated_messages
6003 class variable.
6004 (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
6005 attributes from instance variables as described with the
6006 delegated_methods class variable.
6007 (MapCanvas.__init__): New instance variable selection holding the
6008 current selection
6009 (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
6010 pass them on to the renderer
6011 (MapCanvas.SetMap): Clear the selection when a different map is
6012 selected.
6013 (MapCanvas.shape_selected): Simple force a complete redraw. The
6014 selection class now takes care of only issueing SHAPES_SELECTED
6015 messages when the set of selected shapes actually does change.
6016 (MapCanvas.SelectShapeAt): The selection is now managed in
6017 self.selection
6018
6019 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
6020 (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
6021 Unsubscribe, delegate messages according to the delegated_messages
6022 class variable.
6023 (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
6024 attributes from instance variables as described with the
6025 delegated_methods class variable.
6026 (MainWindow.__init__): The interactor as ivar is gone. The
6027 parameter is still there for compatibility. The selection messages
6028 now come from the canvas.
6029 (MainWindow.current_layer, MainWindow.has_selected_layer):
6030 Delegate to the the canvas.
6031 (MainWindow.LayerShowTable, MainWindow.Classify)
6032 (MainWindow.identify_view_on_demand): The dialogs don't need the
6033 interactor parameter anymore.
6034
6035 * Thuban/UI/tableview.py (TableFrame.__init__)
6036 (LayerTableFrame.__init__, LayerTableFrame.OnClose)
6037 (LayerTableFrame.row_selected): The interactor is gone. It's job
6038 from the dialog's point of view is now done by the mainwindow,
6039 i.e. the parent. Subscribe to SHAPES_SELECTED instead
6040 of SELECTED_SHAPE
6041
6042 * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
6043 is gone. It's job from the dialog's point of view is now done by
6044 the mainwindow, i.e. the parent.
6045
6046 * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
6047 gone. It's job from the dialog's point of view is now done by the
6048 mainwindow, i.e. the parent.
6049
6050 * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
6051 gone. It's job from the dialog's point of view is now done by the
6052 mainwindow, i.e. the parent.
6053 (SessionTreeCtrl.__init__): New parameter mainwindow which is
6054 stored as self.mainwindow. The mainwindow is need so that the tree
6055 can still subscribe to the selection messages.
6056 (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
6057 (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
6058 selection is now accessible through the mainwindow. Subscribe to
6059 SHAPES_SELECTED instead of SELECTED_SHAPE
6060
6061 * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
6062 SHAPES_SELECTED message now.
6063 (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
6064 so deal with multiple shapes
6065 (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
6066 gone. It's job from the dialog's point of view is now done by the
6067 mainwindow, i.e. the parent.
6068
6069 * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
6070 parameter is now a list of shape ids.
6071 (RecordTable.SetTable): The second parameter is now a list of
6072 indices.
6073
6074 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
6075 selected_shape parameter and ivar to selected_shapes. It's now a
6076 list of shape ids.
6077 (MapRenderer.draw_label_layer): Deal with multiple selected
6078 shapes. Rearrange the code a bit so that the setup and shape type
6079 distinctions are only executed once.
6080
6081 * test/test_selection.py: Test cases for the selection class
6082
6083 2003-03-11 Jonathan Coles <[email protected]>
6084
6085 * Thuban/Model/load.py: Temporary fix so that the xml reader
6086 doesn't cause Thuban to crash.
6087
6088 * Thuban/Model/layer.py: Handle the cyclic references between
6089 a layer and its classification better, and be sure to disconnect
6090 the classification from the layer when the layer is destroyed
6091 so that we don't maintain a cyclic reference that may not be
6092 garbage collected.
6093
6094 * Thuban/Model/classification.py: See comment for layer.py.
6095
6096 2003-03-12 Jan-Oliver Wagner <[email protected]>
6097
6098 * HOWTO-Release: New. Information on the steps for releasing
6099 a new version of Thuban.
6100
6101 2003-03-11 Jonathan Coles <[email protected]>
6102
6103 * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
6104 Use True instead of true.
6105 (Classifier): Should have a single panel in which all the controls lie.
6106
6107 * Thuban/UI/proj4dialog.py: Add normal border.
6108
6109 * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
6110
6111 * Thuban/UI/mainwindow.py: Use True instead of true.
6112
6113 * setup.py: Update some definitions to use wxWindows2.4 files
6114
6115 * Data/iceland_sample_class.thuban: Fixed file so that the
6116 field_type information is present.
6117
6118 2003-03-10 Jonathan Coles <[email protected]>
6119
6120 * Thuban/UI/classifier.py (Classifier.__init__): Make the
6121 field type label grow so that when the text changes the
6122 size is updated correctly. This may be a wxWindows bug.
6123
6124 2003-03-10 Jonathan Coles <[email protected]>
6125
6126 * Thuban/UI/application.py: Changed SESSION_CHANGED to
6127 SESSION_REPLACED.
6128
6129 * Thuban/UI/classifier.py: Wrap text with _().
6130 (ClassGrid.CreateTable): Set dimensions and size hints here,
6131 instead of in Reset, so we only set the size once.
6132
6133 * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
6134
6135 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
6136 Call Close() instead of Shutdown().
6137
6138 * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
6139
6140 * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
6141 Go back to using OnClose() instead of Shutdown().
6142
6143 2003-03-10 Jonathan Coles <[email protected]>
6144
6145 * Thuban/UI/classifier.py (Classifier): SelectField() needed
6146 to know the old field index as well as the new one.
6147
6148 2003-03-10 Jonathan Coles <[email protected]>
6149
6150 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
6151 to correctly set the table information and call this from
6152 __init__ and from _OnFieldSelect so that all the information
6153 is up to date when the dialog opens and when a field is changed.
6154
6155 2003-03-10 Jonathan Coles <[email protected]>
6156
6157 * Thuban/Model/classification.py (Classification): Don't use
6158 layer's message function directly, use the ClassChanged() method
6159 when then classification changes. SetField/SetFieldType/SetLayer
6160 must keep the information about field name and field type in
6161 sync when an owning layer is set or removed.
6162
6163 * Thuban/Model/layer.py: Added ClassChanged() so that the
6164 classification can tell the layer when its data has changed.
6165 (Layer.SetClassification): Accepts None as an arguement to
6166 remove the current classification and correctly handles
6167 adding a new classification.
6168
6169 * Thuban/Model/load.py: Comment out print statement
6170
6171 * test/test_classification.py, test/test_save.py: New and
6172 improved tests.
6173
6174 2003-03-07 Jonathan Coles <[email protected]>
6175
6176 * Thuban/Model/classification.py: Implemented __copy__ and
6177 __deepcopy__ for ClassGroup* and ClassGroupProperites so
6178 they can easily be copied by the classifier dialog.
6179 (ClassGroupProperites.__init__): The default line color should
6180 have been Color.Black.
6181
6182 * Thuban/UI/classifier.py: Setting and Getting table values now
6183 uses a consistent set of functions.
6184 (Classifier): Now non-modal. Has field type label which changes
6185 as the field changes. Keep track of buttons in a list so that
6186 we can enable/disable the buttons when the None field is selected.
6187 (SelectPropertiesDialog): Add buttons to make the colors transparent.
6188
6189 * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
6190 does what OnClose did, but can be called by the application to
6191 close a window. Needed when a session changes, and we have to
6192 close the classifier windows.
6193
6194 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
6195 Shuts down open dialogs. Used when a new session is created
6196 or a session is opened.
6197 (MainWindow.SaveSession): Should only call application.SaveSession()
6198 if we don't call SaveSessionAs first.
6199 (MainWindow.Classify): Allow different classifier dialogs for
6200 different layers.
6201
6202 * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
6203 the parent class handle it. Add Shutdown() to unsubscibe from
6204 event notification and call the parent Shutdown(). This was
6205 necessary so the application can close the tree window.
6206
6207 2003-03-06 Jonathan Coles <[email protected]>
6208
6209 * Thuban/Model/classification.py: Minor documentation changes,
6210 Addition of __eq__ and __ne__ methods.
6211 (Classification.SetLayer): prevent recursion between this method
6212 and Layer.SetClassification().
6213
6214 * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
6215
6216 * Thuban/Model/layer.py (SetClassification): prevent recursion
6217 between this method and Classification.SetLayer().
6218
6219 * test/test_classification.py, test/test_load.py,
6220 test/test_session.py: Fixed and added tests for the classification
6221 classes.
6222
6223 2003-03-06 Bernhard Herzog <[email protected]>
6224
6225 * Thuban/UI/classifier.py (ClassGrid.__init__)
6226 (ClassGrid.CreateTable): Move the SetSelectionMode call to
6227 CreateTable because otherwise it triggers an assertion in
6228 wxPython/wxGTK 2.4.
6229
6230 2003-03-05 Jonathan Coles <[email protected]>
6231
6232 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
6233
6234 * Thuban/Model/load.py: import FIELDTYPE constants from table.
6235
6236 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
6237
6238 * Thuban/Model/table.py: Put FIELDTYPE constants back.
6239
6240 2003-03-05 Jonathan Coles <[email protected]>
6241
6242 * Thuban/UI/classifier.py: Added class documentation.
6243 Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
6244 Store just the groups in the table and generate the other
6245 column information when it is requested. Add "None" field
6246 to pull-down to select no classification.
6247
6248 * Thuban/common.py: Moved FIELDTYPE constants from table.py
6249 (Str2Num): Only catch ValueError exceptions.
6250
6251 * Thuban/Model/classification.py: Class documentation. Renaming
6252 of methods with Stroke to Line. Groups are stored in a single
6253 list with the default as the first element. Groups are searched
6254 in the order they appear in the list.
6255
6256 * Thuban/Model/color.py: Documentation.
6257
6258 * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
6259 the kind of data represented by a field.
6260
6261 * Thuban/Model/load.py (ProcessSession): Use proper string
6262 conversion function; fixes RTbug #1713.
6263
6264 * Thuban/Model/save.py (Saver): Store field type information.
6265
6266 * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
6267 (Table): Add field_info_by_name() to retrieve field information
6268 by specifying the field name, not the number.
6269
6270 * Thuban/UI/mainwindow.py: Function name changes.
6271
6272 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
6273 get the layer classification once. Don't try to classify
6274 values when the field is None: just use the default properties.
6275
6276 * Thuban/UI/view.py: Function name changes.
6277
6278 * Doc/thuban.dtd: Add field_type attribute to a classification.
6279
6280 2003-03-04 Bernhard Herzog <[email protected]>
6281
6282 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
6283 the fill and stroke layer attributes optional with suitable
6284 default values. Add the stroke_width layer attribute. Use correct
6285 syntax for empty elements. Make the attribute list for labels
6286 refer to the label element.
6287
6288 2003-03-04 Bernhard Herzog <[email protected]>
6289
6290 * setup.py (thuban_build_py.build): Add a comment about distutils in
6291 Python 2.3 containing some of the functionality we implement in
6292 setup.py ourselves.
6293
6294 * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
6295 before the selection mode. Doing it the other way round triggers
6296 an assertion in wxWindows.
6297
6298 * Thuban/Model/save.py (escape): Fix typo in doc-string
6299
6300 * Thuban/Model/classification.py: Remove unnecessary wxPython
6301 import
6302
6303 2003-03-04 Jonathan Coles <[email protected]>
6304
6305 * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
6306 Parameter 'value' should default to None.
6307
6308 * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
6309 the class attribute __classification is now private.
6310
6311 * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
6312 Classifier to ClassGrid. Added support for removing selected rows,
6313 which including code for keeping track of when cells are selected,
6314 and deselected.
6315 (ClassTable): Support for added/removing rows. Fixed a problem
6316 with __ParseInput whereby it would not allow strings (only numbers)
6317 to be entered.
6318 (Classifier): Added button and supporting code for removing
6319 selected rows.
6320
6321 2003-02-27 Jonathan Coles <[email protected]>
6322
6323 * Thuban/common.py: Moved color conversion functions into
6324 Thuban/UI/common.py.
6325 (Str2Num): Now converts the float (not the string) to a long/int
6326 so that an exception isn't thrown.
6327
6328 * Thuban/UI/common.py: Common functions used in several UI modules
6329
6330 * Thuban/Model/classification.py: Changed the class hierarchy
6331 so that a Classification consists of Groups which return
6332 Properties when a value matches a Group.
6333
6334 * Thuban/Model/layer.py: Fixed name resolution problem.
6335
6336 * Thuban/Model/load.py: Use new Classification and Group functions.
6337
6338 * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
6339 failure.
6340 (Saver.write_classification): Use new Classification and Group
6341 functions.
6342
6343 * Thuban/UI/classifier.py: Changes to use new Classification and Group
6344 functions. Fix to create a tuple with a single value instead of
6345 simply returning the value.
6346
6347 * Thuban/UI/renderer.py: Use new Classification and Group functions.
6348 Use common.py functions.
6349
6350 * Thuban/UI/tree.py: Use common.py functions.
6351
6352 * test/test_classification.py: Use new Classification and Group
6353 classes.
6354
6355 2003-02-24 Jonathan Coles <[email protected]>
6356
6357 * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
6358 functions from Thuban color objects to wxWindow colour objects.
6359
6360 * Thuban/Model/classification.py (Classification): Renamed
6361 GetProperties() to GetClassData(). Used the new iterator
6362 in TreeInfo().
6363 (ClassIterator): Iterator implementation to iterate over the
6364 ClassData objects in a classification object.
6365
6366 * Thuban/Model/save.py (Saver.write_classificaton): Uses
6367 the new iterator to save the classification information.
6368
6369 * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
6370 for changing the stroke and fill colors and previewing the
6371 changes.
6372
6373 * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
6374 MainWindow.SaveSessionAs): Text string changes so the dialogs
6375 have more meaningful titles.
6376
6377 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
6378 Classification method name from GetProperties to GetClassData.
6379
6380 * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
6381 instead of accessing now non-existent class variables.
6382
6383 2003-02-24 Bernhard Herzog <[email protected]>
6384
6385 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
6386 unneeded Shape() call. Rendering is substantially faster without
6387 it and it avoids some problems with broken shape files.
6388
6389 2003-02-20 Frank Koormann <[email protected]>
6390
6391 Force minimal size of identify and label dialogs. The autosizing
6392 looked too ugly.
6393
6394 * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
6395 * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
6396 Set size of listctrl.
6397 * Thuban/UI/identifyview.py (IdentifyView.__init__):
6398 Set size of dialog.
6399
6400 2003-02-19 Jonathan Coles <[email protected]>
6401
6402 * test/test_classification.py, test/test_layer.py,
6403 test/test_load.py, test/test_map.py, test/test_session.py:
6404 Updated the tests to use the new functions that are in the
6405 respective classes.
6406
6407 * Thuban/Model/classification.py (Classification):
6408 Uses the new ClassData* classes. Modification messages are
6409 passed up to the parent layer (if it exists).
6410 (ClassData): New class to encapsulate the common data in each
6411 classification property.
6412 (ClassDataDefault): Represents the Default class. data.
6413 (ClassDataPoint): Represents a single class. data point
6414 (ClassDataRange): Represents a class. range
6415 (ClassDataMap): Represents a class. map (unused).
6416
6417 * Thuban/Model/color.py: Added Color.None to represent something
6418 with no color. Color.Black represents the color black.
6419 (NoColor): Helper class derived from Color to represent something
6420 with no color.
6421
6422 * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
6423 stroke_width attributes. Made the 'classification' attribute private.
6424 New methods for setting/getting the classification.
6425
6426 * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
6427 to get the classifcation and use the new ClassData* classes to
6428 hold the classification data. Use Str2Num to convert numbers
6429 properly.
6430
6431 * Thuban/Model/save.py (Saver): Use new Color and Classification
6432 methods
6433
6434 * Thuban/UI/classifier.py (ClassGrid): New class to represent a
6435 custom grid.
6436 (ClassTable): Support for editing Values and Labels and for
6437 changing what type (point or range) of data is stored in each
6438 property based on how the user enters the data.
6439 (Classifier): Support for saving the new classifications and
6440 launching the dialog to edit a property.
6441 (SelectPropertiesDialog): New class for editing the visual
6442 properties of a classification (stroke color, width, and fill color)
6443 (ClassPreviewer): Took the Draw method from ClassRenderer and
6444 made most of it into this new class. Intend to use this class in
6445 the SelectPropertiesDialog for previewing changes.
6446
6447 * Thuban/UI/renderer.py: Use new Color and Classification methods.
6448
6449 * Thuban/UI/tree.py: Formatting changes.
6450
6451 * Doc/thuban.dtd: Add 'label' element
6452
6453 * Thuban/common.py: New. Contains common routines used throughout
6454 the code.
6455 (Str2Num): Takes a string and converts it to the "best" type of
6456 number.
6457
6458 2003-02-14 Bernhard Herzog <[email protected]>
6459
6460 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
6461 dragging flag is always set to 0 even when the tool implementation
6462 raises an exception
6463
6464 2003-02-11 Bernhard Herzog <[email protected]>
6465
6466 * Thuban/UI/application.py (ThubanApplication.splash_screen): New
6467 method to create a splash screen.
6468 (ThubanApplication.ShowMainWindow): New. Show the main window.
6469 Needed so the splash screen can display the mainwindow
6470 (ThubanApplication.OnInit): Call the
6471 new splash_screen method to determine whether the application
6472 should display a splash screen. If it displays a splash screen do
6473 not immediately show the main window.
6474
6475 2003-02-11 Jonathan Coles <[email protected]>
6476
6477 * Thuban/Model/classification.py: Added import line to fix
6478 feature conflicts between running on python2.2 and python2.1.
6479
6480 * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
6481 onto the clinfo parameter, so removed the deepcopy().
6482
6483 2003-02-10 Jonathan Coles <[email protected]>
6484
6485 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
6486 Added element_open variable to track opening and closing of tags
6487 so that tags that don't span more than one line are closed with
6488 /> instead of </tag_name>. Use the GetDefault*() methods of
6489 the Classification class.
6490
6491 * Thuban/Model/classification.py (Classificaton): Added set and
6492 get methods for the default data. The class also takes a layer
6493 reference so that modification messages can be sent. Fixed the
6494 methods to use the new ClassData class.
6495 (ClassData): New class to encapsulate the classification data
6496
6497 * Thuban/Model/layer.py (Layer): Remove the
6498 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
6499 SetDefault*() methods on the layer's classification object.
6500 (Layer.__init__): Use the new SetDefault*() methods in the
6501 Classification class.
6502
6503 * Thuban/Model/load.py (ProcessSession): Use the new ClassData
6504 object instead of a dictionary.
6505
6506 * Thuban/UI/classifier.py (ClassRenderer): New class to
6507 draw the classifications in the dialog box's table.
6508 (Classifier): Modified to use the ClassRenderer class.
6509
6510 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
6511 methods of the Classification class.
6512
6513 * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
6514 of the ClassData class.
6515
6516 * test/test_classification.py, test/test_layer.py,
6517 test/test_map.py, test/test_session.py: Fix the tests to work
6518 with the above code changes.
6519
6520 2003-02-03 Jonathan Coles <[email protected]>
6521
6522 * Thuban/Model/classification.py (Classification): Added getNull()
6523 to return the NullData reference
6524
6525 * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
6526 Layer.SetStrokeWidth): Modified these functions to change the
6527 null data in the classification rather than keep these values
6528 directly in the Layer class. Menu options to change these values
6529 work again.
6530
6531 2003-01-28 Jonathan Coles <[email protected]>
6532
6533 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
6534 Fixed crashing problem on some systems. Dialog box shows
6535 classification data.
6536
6537 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
6538 Colors in the tree view.
6539
6540 * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
6541 the tree info for classifications. Commented out unnecessary lines.
6542
6543 * Thuban/Model/classification.py (Classification.TreeInfo): New
6544 function to add information about the classification into the
6545 tree view.
6546
6547 2003-01-27 Jan-Oliver Wagner <[email protected]>
6548
6549 * Thuban/__init__.py (_): New.
6550
6551 * Thuban/Model/classification.py, Thuban/Model/extension.py,
6552 Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
6553 Thuban/Model/session.py, Thuban/UI/application.py,
6554 Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
6555 Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
6556 Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
6557 Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
6558 Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
6559
6560 2003-01-27 Jonathan Coles <[email protected]>
6561
6562 * Thuban/Model/layer.py: Classification initialization calls.
6563
6564 * Thuban/Model/classification.py: Created class to encapsulate
6565 a layer classification. Supports specific data points and
6566 ranges.
6567
6568 * Thuban/Model/load.py: Added support for loading classification
6569 information.
6570
6571 * Thuban/Model/save.py: Added support for saving classification
6572 information.
6573
6574 * Thuban/UI/classifier.py: Initial class for a dialog box for
6575 specifying classification information.
6576
6577 * Thuban/UI/mainwindows.py: Support for opening the classifier
6578 dialog.
6579
6580 * Thuban/UI/renderer.py: Support for drawing a layer with the
6581 classification information.
6582
6583 * Data/iceland_sample_class.thuban: iceland_sample with
6584 classification data.
6585
6586 * test/test_classification: Tests for the Classification class.
6587
6588 2002-12-09 Bernhard Herzog <[email protected]>
6589
6590 * test/test_command.py: New. Tests for the command classes.
6591
6592 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
6593 (Command.IsTool): New method to distinguish between command
6594 switching tools and other commands.
6595
6596 * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
6597 the tool to avoid direct assignments to instance variables
6598 (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
6599 (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
6600 change the tool
6601
6602 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
6603 active tool's command turns insensitive, disable the tool.
6604 (_tool_command): Use the new ToolCommand class
6605
6606 * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
6607 SelectTool method to change the tool
6608 (iconfile): Use the ToolCommand class
6609
6610 2002-12-03 Bernhard Herzog <[email protected]>
6611
6612 * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
6613 the case of selected items that are not children of Layers or Maps
6614 properly. Previously this bug would trigger an assertion in
6615 wxWindows.
6616
6617 2002-11-06 Frank Koormann <[email protected]>
6618
6619 * Thuban/UI/mainwindow.py: Altered the order of tools in the
6620 toolbar: First now are all navigation tools (Zoom In/Out, Pan,
6621 Full Extent).
6622
6623 2002-10-23 Bernhard Herzog <[email protected]>
6624
6625 * setup.py (setup call): version now 0.1.3
6626
6627 * MANIFEST.in: Add the files in test/
6628
6629 * test/README: Add note about tests requiring the iceland data
6630
6631 * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
6632 copyright notice.
6633
6634 2002-10-18 Bernhard Herzog <[email protected]>
6635
6636 * test/test_map.py
6637 (TestMapWithContents.test_projected_bounding_box): Use an explicit
6638 epsilon.
6639
6640 * test/support.py (FloatComparisonMixin.assertFloatEqual)
6641 (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
6642 message if the assertion fails and don't return the return value
6643 of self.assert_. In assertFloatSeqEqual the return meant that not
6644 all items of the sequence were compared.
6645
6646 2002-09-20 Bernhard Herzog <[email protected]>
6647
6648 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
6649
6650 * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
6651
6652 * test/test_map.py (TestMapWithContents.test_tree_info): Create
6653 the string with the bounding box on the fly because of platform
6654 differences in the way %g is handled.
6655
6656 * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
6657 DBFfile too because Thuban layers can't yet cope missing DBF
6658 files.
6659
6660 2002-09-20 Bernhard Herzog <[email protected]>
6661
6662 * test/test_menu.py: Use initthuban instead of
6663 add_thuban_dir_to_path to initialize Thuban.
6664
6665 * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
6666 Mixin class for float comparisons
6667 (SubscriberMixin): New. Mixin class to test messages sent through
6668 the Connector class
6669
6670 * test/README: Fix a typo and add the -v flag to the command for
6671 individual tests
6672
6673 * test/test_session.py: New. Test cases for Thuban.Model.session
6674
6675 * test/test_proj.py: New. Test cases for Thuban.Model.proj
6676
6677 * test/test_map.py: New. Test cases for Thuban.Model.map
6678
6679 * test/test_layer.py: New. Test cases for Thuban.Model.layer
6680
6681 * test/test_label.py: New. Test cases for Thuban.Model.label
6682
6683 * test/test_connector.py: New. Test cases for Thuban.Lib.connector
6684
6685 * test/test_color.py: New. Test cases for Thuban.Model.color
6686
6687 * test/test_base.py: New. Test cases for Thuban.Model.base
6688
6689 2002-09-13 Bernhard Herzog <[email protected]>
6690
6691 * Thuban/Model/session.py (Session.forwarded_channels): Forward
6692 the CHANGED channel too.
6693
6694 * Thuban/Model/map.py (Map.forwarded_channels): Forward the
6695 CHANGED channel too.
6696 (Map.__init__): Call the Modifiable constructor as well.
6697
6698 * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
6699 event if the modified flag changes.
6700 (Modifiable.changed): Tweak the doc-string.
6701
6702 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
6703 (MainWindow.set_position_text): Put the code that puts the text
6704 with the mouse position into the status bar into the new method
6705 set_position_text so that it can overwritten in derived classes.
6706
6707 2002-09-12 Bernhard Herzog <[email protected]>
6708
6709 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
6710 message box on the main window.
6711
6712 2002-09-11 Bernhard Herzog <[email protected]>
6713
6714 * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
6715 the 'E' because it's less likely to interfere with other menu
6716 entries.
6717 (MainWindow.build_menu): remove an incorrect comment.
6718
6719 2002-09-10 Bernhard Herzog <[email protected]>
6720
6721 * Thuban/UI/mainwindow.py (MainWindow.Map): New.
6722 (_tool_command): Add sensitive parameter
6723 (_has_visible_map): Sensitivity callback to tools and other
6724 commands that require a visible map. Use it in map_zoom_in_tool,
6725 map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
6726 and map_full_extent
6727
6728 2002-09-06 Bernhard Herzog <[email protected]>
6729
6730 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
6731 VIEW_POSITION
6732
6733 2002-09-04 Frank Koormann <[email protected]>
6734
6735 * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
6736
6737 2002-09-02 Bernhard Herzog <[email protected]>
6738
6739 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
6740 wxWindows already and our implementation doesn't work correctly
6741 with wxGTK 2.3:
6742 (MapCanvas.__init__): Remove the instance variable
6743 (MapCanvas.OnPaint): Always call do_redraw when there's a map to
6744 be drawin
6745 (MapCanvas.OnIdle): Removed.
6746
6747 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
6748 a parameter to determine the size of the rectangle.
6749 (MapCanvas.find_shape_at): Create the box around the point on a
6750 layer by layer basis and make the size depend on the shape type.
6751 This solves a problem with the selection of point shapes at the
6752 border of the layer's bounding box
6753
6754 2002-08-30 Bernhard Herzog <[email protected]>
6755
6756 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
6757 for the sensitivity of remove layer.
6758 (_can_remove_layer): New. Sensitivity callback for remove layer
6759 (Command layer_remove): Use _can_remove_layer
6760
6761 * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
6762 determine whether a given layer can be deleted.
6763
6764 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
6765 (MapCanvas.do_redraw): Get rid of the unused update_region
6766 instance variable
6767
6768 * Thuban/UI/view.py: Add/update some doc-strings.
6769
6770 * test/: new subdirectory with a bunch of unit tests.
6771
6772 * test/README, test/test_table.py, test/test_save.py,
6773 test/test_menu.py, test/test_load.py: Initial set of tests and
6774 brief instructions on how to run them
6775
6776 2002-08-29 Bernhard Herzog <[email protected]>
6777
6778 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
6779 arcs with multiple parts.
6780
6781 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
6782 Handle degenrate rectangles.
6783
6784 * Thuban/Model/table.py: Make writing records work correctly:
6785 (Table.__init__): Keep track of whether the DBF is open for
6786 writing
6787 (Table.write_record): Open the DBF file for writing when necessary
6788
6789 2002-08-27 Bernhard Herzog <[email protected]>
6790
6791 * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
6792 dbf files only for reading by default. Use a new writable dbf
6793 object for writing.
6794
6795 2002-08-26 Bernhard Herzog <[email protected]>
6796
6797 * Thuban/UI/mainwindow.py: Refactor the context creation:
6798 (MainWindow.Context): New method to return a context
6799 (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
6800 new method
6801
6802 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
6803 layer table specific code from TableGrid into LayerTableGrid
6804 (TableFrame, LayerTableFrame): Split the layer table specific code
6805 from TableFrame into LayerTableFrame
6806 (LayerTableGrid.select_shape): Remove a debug print
6807
6808 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
6809 LayerTableFrame
6810
6811 2002-08-23 Bernhard Herzog <[email protected]>
6812
6813 * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
6814 absolute filename.
6815
6816 2002-08-22 Bernhard Herzog <[email protected]>
6817
6818 * Thuban/Model/table.py (Table.write_record): New method to write
6819 records.
6820 (Table.__init__): Open the DBF file for writing too.
6821
6822 * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
6823 into the underlying table.
6824
6825 * extensions/shapelib/shapefil.h (DBFCommit),
6826 extensions/shapelib/dbfopen.c (DBFCommit): New API function to
6827 commit any changes made to the DBF file.
6828
6829 * Thuban/UI/mainwindow.py (make_check_current_tool)
6830 (_tool_command): Put the code that generates the "checked"
6831 callback into a separate function so that we can reuse it
6832 elsewhere
6833
6834 * Thuban/Model/save.py (Saver): New class to handle serializing a
6835 session into an XML file. The main reason to introduce a class is
6836 that applications built on Thuban can derive from it so that they
6837 can save additional information in a session file.
6838 (save_session): Delegate almost all the work to the Saver class.
6839 Rename the filename argument to file because it may be a file like
6840 object now.
6841
6842 * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
6843 code. Remove the little test code which would be executed when the
6844 module is run as a script which didn't work anymore since it can't
6845 import the other Thuban modules.
6846 (ProcessSession, load_session): Refactor the ProcessSession to
6847 have one method for each element start and end tag so that derived
6848 classes can easily override the processing of individual tags.
6849 Also, always parse with namespaces enabled because applications
6850 built on top of Thuban will likely use namespaces if they extend
6851 the session file format.
6852
6853 2002-08-21 Bernhard Herzog <[email protected]>
6854
6855 * setup.py (ThubanInstall.run): Don't repr install_lib_orig
6856 because thubaninit_contents will do it for us.
6857
6858 2002-08-16 Jan-Oliver Wagner <[email protected]>
6859
6860 * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
6861 tree window already open
6862
6863 2002-08-15 Bernhard Herzog <[email protected]>
6864
6865 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
6866 with self.
6867
6868 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
6869 when we have actually captured it.
6870
6871 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
6872 shapefile and destroy the table.
6873
6874 * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
6875
6876 2002-08-14 Bernhard Herzog <[email protected]>
6877
6878 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
6879 instance variable columns
6880 (RecordTable.GetTypeName): row and col may be negative in some
6881 cases.
6882
6883 * setup.py (InstallLocal.initialize_options)
6884 (InstallLocal.finalize_options, InstallLocal.user_options): New
6885 option create-init-file to build a thubaninit.py when running
6886 install_local
6887 (InstallLocal.run): Create the thubaninit.py module when requested
6888 (thubaninit_contents): Split the template into several parts and
6889 create a new function thubaninit_contents that creates the
6890 contents of a thubaninit module.
6891 (ThubanInstall.run): Use the new function to create the thubaninit
6892 module.
6893
6894 2002-07-30 Bernhard Herzog <[email protected]>
6895
6896 * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
6897 cleanup.
6898 (ThubanApplication.MainLoop): Extend to automatically call OnExit.
6899
6900 * Thuban/Model/session.py (Session.Destroy): Don't bypass the
6901 direct base class' Destroy method.
6902
6903 * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
6904 layers.
6905 (Map.Destroy): Destroy the label_layer as well and call the
6906 inherited Desatroymethod first so that no more messages are
6907 issued.
6908 (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
6909 message if the stacking order actually has changed. Add
6910 doc-strings.
6911 (Map.BoundingBox): Correct the doc-string.
6912 (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
6913 (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
6914
6915 * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
6916 all labels.
6917
6918 2002-07-29 Bernhard Herzog <[email protected]>
6919
6920 * Thuban/Model/map.py (Map.subscribe_layer_channels)
6921 (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
6922 to a layer's channels into separate methods.
6923 (Map.RemoveLayer, Map.AddLayer): Call the new methods
6924 (Map.Destroy): Unsubscribe from a layer's channels before
6925 destroying it.
6926
6927 * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
6928 selected_layer parameter to searched_layer which is the layer to
6929 search in.
6930 (MapCanvas.SelectShapeAt): New parameter layer to restrict the
6931 search to that layer. Return the selected layer and shape.
6932
6933 * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
6934 typo
6935
6936 2002-07-24 Bernhard Herzog <[email protected]>
6937
6938 * Thuban/UI/application.py (ThubanApplication.create_session):
6939 Extend the doc string.
6940 (ThubanApplication.subscribe_session)
6941 (ThubanApplication.unsubscribe_session): New methods to
6942 subscribe/unsubscribe to/from session channels.
6943 (ThubanApplication.SetSession): Call the new methods here.
6944 (ThubanApplication.maps_changed, ThubanApplication.set_map):
6945 Renamed set_map to maps_changed. Its now a subscriber for
6946 MAPS_CHANGED.
6947
6948 * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
6949 x-coordinate in case of simple clicks
6950
6951 * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
6952 don't pass it as a parameter
6953
6954 * Thuban/Model/session.py (Session.RemoveMap): New
6955
6956 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
6957 window size into a parameter.
6958
6959 2002-07-23 Bernhard Herzog <[email protected]>
6960
6961 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
6962 just commands.
6963
6964 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
6965 parameter list a bit to allow setting the window title and the
6966 initial message in the status bar. Update the callers.
6967
6968 * Thuban/UI/application.py (ThubanApplication.OnInit)
6969 (ThubanApplication.CreateMainWindow): Put the mainwindow
6970 instantiation into a separate method so that it can be overridden
6971 by a subclass.
6972
6973 2002-07-19 Bernhard Herzog <[email protected]>
6974
6975 * Thuban/Model/session.py: Issue a CHANGED message every time
6976 another changed message is issued to make it easier to get
6977 notified of changes.
6978 (Session): Update the doc string
6979 (Session.forward): Issue changed-events as CHANGED as well.
6980 (Session.changed): Overwrite the inherited version to issue
6981 CHANGED events as well.
6982
6983 * Thuban/UI/tree.py: We can now simply subscribe to the session's
6984 CHANGED channel to be informed of changes.
6985 (SessionTreeCtrl.session_channels): Not needed any longer.
6986 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
6987 Only have to (un)subscribe CHANGED
6988
6989 * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
6990
6991 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
6992 for the wxPython locale bug to __init__.py so that it's
6993 automatically executed by anybody using UI code from Thuban.
6994
6995 2002-07-18 Bernhard Herzog <[email protected]>
6996
6997 * Thuban/UI/main.py (main): app no longer needs to be global
6998
6999 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
7000 as parameter and store it in an instance variable
7001 (MainWindow.invoke_command, MainWindow.update_command_ui)
7002 (MainWindow.save_modified_session, MainWindow.NewSession)
7003 (MainWindow.OpenSession, MainWindow.SaveSession)
7004 (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
7005 application object.
7006
7007 * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
7008 the main window with self.
7009
7010 * Thuban/UI/context.py: New module with the context class
7011
7012 * Thuban/UI/command.py (Command): Update doc string.
7013
7014 * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
7015 MainWindow.update_command_ui): Pass an instance of the context
7016 class to the command's methods
7017 (check_current_tool, call_method): Handle the new context
7018 implementation
7019
7020 * Examples/simple_extensions/simple_tool.py (simple_tool,
7021 check_simple_tool): Handle the new context implementation
7022
7023 * Examples/simple_extensions/simple_command.py (simple_command):
7024 Handle the new context implementation. Update the comments about
7025 the context.
7026
7027 * Thuban/UI/application.py (ThubanApplication.SetSession): Add
7028 doc-string
7029 (ThubanApplication.Session): New method to return the session
7030 object
7031
7032 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
7033 interactor's selected_layer may not be a layer of the current
7034 session when the tree is updated while a new session is being set.
7035
7036 2002-07-17 Bernhard Herzog <[email protected]>
7037
7038 * Thuban/UI/tree.py (color_string): Removed. No longer used.
7039 (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
7040 update_tree into update_tree and add_items. The tree now uses a
7041 more generic way to display the contents of the tree.
7042 (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
7043
7044 * Thuban/Model/layer.py (Layer.TreeInfo),
7045 Thuban/Model/extension.py (Extension.TreeInfo),
7046 Thuban/Model/map.py (Map.TreeInfo),
7047 Thuban/Model/session.py (Session.TreeInfo):
7048 Add TreeInfo methods to implement the new tree view update scheme
7049
7050 2002-07-16 Bernhard Herzog <[email protected]>
7051
7052 * Thuban/UI/application.py: Don't use "import from" for the
7053 MainWindow. It can't always be resolved.
7054 (ThubanApplication.OnInit): change reference to MainWindow
7055 accordingly.
7056
7057 * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
7058 completely
7059
7060 2002-07-10 Bernhard Herzog <[email protected]>
7061
7062 * setup.py (create_init_module): New configurable variable whose
7063 default depends on the platform we're running on.
7064 (ThubanInstall.initialize_options): Initialize
7065 self.create_init_module from the global create_init_module
7066 (ThubanInstall.user_options): indictate that the options
7067 create-init-module and init-module-dir have arguments.
7068
7069 * setup.py: In the setup call change the version number to include
7070 cvs.
7071
7072 * MANIFEST.in: Add the files in Examples
7073
7074 2002-07-09 Bernhard Herzog <[email protected]>
7075
7076 * setup.py: In the setup call, use the thuban homepage as the
7077 value of the url parameter.
7078
7079 * Examples: New subdirectory for examples.
7080
7081 * Examples/simple_extensions/simple_tool.xpm,
7082 Examples/simple_extensions/simple_tool.py,
7083 Examples/simple_extensions/simple_command.py,
7084 Examples/simple_extensions/README: Simple examples showing how to
7085 add new commands and tools.
7086
7087 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
7088 bdist_rpm that we also have an install script.
7089 (bdist_inno): Add 2002 to the copyright notice.
7090
7091 * setup.py: Create a file in python's site-packages directory to
7092 make installation of Thuban as a library easier.
7093 (ThubanInstall.user_options): Add two new options,
7094 create-init-module and init-module-dir
7095 (ThubanInstall.expand_with_pure_python_dirs): New method to expand
7096 filenames for installation in the default directories.
7097 (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
7098 the inherited methods to capture some filenames before they're
7099 transformed too much by distutils.
7100 (ThubanInstall.run): Create the init module if requested.
7101 (ThubanInstall.thuban_init_filename): New method to return the
7102 full name of the init module.
7103 (ThubanInstall.get_outputs): Append the filename of the init
7104 module.
7105
7106 2002-07-08 Bernhard Herzog <[email protected]>
7107
7108 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
7109 handle the prefix properly which means that the default for the
7110 installation prefix should be /usr for RPMs and /usr/local when
7111 doing a normal source install.
7112 (bdist_rpm_install_script): Script to override the default install
7113 commands in the specfile generated by the bdist_rpm command.
7114 (thuban_bdist_rpm.user_options): Add a prefix option
7115 (thuban_bdist_rpm.initialize_options): Init the prefix option.
7116 Create the script files for the spec files as empty files here
7117 (thuban_bdist_rpm._make_spec_file): Override the inherited method
7118 to fill the script files with content.
7119
7120 * Thuban/Model/save.py (relative_filename): Wrapper around
7121 Thuban.Lib.fileutil.relative_filename that accepts an empty dir
7122 argument. save_session now automatically uses this version,
7123 solving a problem when saving to a relative filename.
7124
7125 * setup.py: In the setup call, make sure that the library
7126 directories are under $prefix/lib not directly under $prefix.
7127
7128 2002-06-20 Jan-Oliver Wagner <[email protected]>
7129
7130 * Thuban/Model/extension.py: new module to handle extension objects.
7131 * Thuban/Model/messages.py: new messages for extensions.
7132 * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
7133 Session.AddExtension): new for handling extensions.
7134 Also some other minor changes to round up extension handling.
7135 * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
7136 of Extension titles and title and names of its objects.
7137
7138 2002-05-29 Bernhard Herzog <[email protected]>
7139
7140 * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
7141 the events for a command.
7142 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
7143 Call bind_command_events to bind the events. add_toolbar_command
7144 can now bind events too so that it's possible to have commands
7145 that are only available through the toolbar.
7146 (MainWindow.init_ids): New instance variable events_bound to keep
7147 track of for which commands events have been bound.
7148
7149 2002-05-28 Bernhard Herzog <[email protected]>
7150
7151 * Thuban/UI/menu.py: New module to build and manage menus.
7152
7153 * Thuban/UI/mainwindow.py: Remove some unused imports.
7154 (MainWindow.__init__, main_menu): move the definition of the main
7155 menu from __init__ to the Menu instance main_menu.
7156 (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
7157 build the menu bar and sub-menus from a menu description.
7158
7159 * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
7160 startup file
7161 (ThubanApplication.read_startup_files): New method to run
7162 ~/.thuban/thubanstart.py
7163
7164 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
7165 Move the toolbar definition to the Menu instance main_toolbar.
7166 (MainWindow.build_toolbar): New method to build the toolbar
7167 similar to the build_menu methods
7168
7169 2002-05-23 Bernhard Herzog <[email protected]>
7170
7171 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
7172 layer_outline_color. Fix it in the definition of the command too.
7173
7174 * Thuban/UI/command.py (Command): Fix typo in doc string
7175
7176 2002-05-22 Bernhard Herzog <[email protected]>
7177
7178 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
7179 in the docstring
7180
7181 2002-05-15 Bernhard Herzog <[email protected]>
7182
7183 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
7184 when the shapefile is empty.
7185 (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
7186 now return None for empty shapefiles. Update doc-strings.
7187
7188 * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
7189 the layer's bbox being None.
7190
7191 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
7192 layer's bbox being None.
7193
7194 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
7195 necessary.
7196 (MapCanvas.__init__): New instance variables, last_selected_layer
7197 and last_selected_shape to determine how the selection has
7198 changed.
7199
7200 * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
7201 AutoSizeColumns because it will cause a traversal of the entire
7202 table which for large .dbf files will take a very long time.
7203
7204 2002-05-14 Bernhard Herzog <[email protected]>
7205
7206 * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
7207 maximum depth for the tree than shapelib does by default.
7208
7209 2002-05-10 Bernhard Herzog <[email protected]>
7210
7211 * setup.py (py_modules): The shptree modules doesn't have a
7212 wrapper, so don't include it in the py_modules
7213
7214 2002-05-08 Bernhard Herzog <[email protected]>
7215
7216 * extensions/shapelib/shptree.c (compare_ints): Make arguments
7217 const void * as in the qsort prototype
7218 (SHPTreeFindLikelyShapes): Remove some unused variables.
7219
7220 * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
7221 maintains to redraw the window during a drag.
7222 (MapCanvas.unprojected_rect_around_point): New method to determine
7223 a small region around a point for hit-testing.
7224 (MapCanvas.find_shape_at): Only test the shapes in a small region
7225 around the point.
7226
7227 * setup.py: Increment the version to 0.1.2
7228
7229 * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
7230 debug print and set session to None after unsubscribing
7231
7232 2002-05-07 Bernhard Herzog <[email protected]>
7233
7234 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
7235 the file to have a .thuban extension.
7236
7237 * Thuban/UI/tree.py (session_channels): New class constant with
7238 all the session channels to subscribe to to update the tree
7239 (SessionTreeCtrl.session_changed): Remember the session so that we
7240 can unsubscribe properly. Use the new class constant to
7241 unsubscribe from the old session and subscribe to the new one.
7242 (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
7243 subscriptions of the SessionTreeCtrl.
7244 (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
7245
7246 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
7247 Session Tree" command to the file menu.
7248
7249 * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
7250 as update_region to the renderer.
7251
7252 * Thuban/UI/renderer.py
7253 (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
7254 update box is now directly a tuple, not a wxRect anymore.
7255
7256 * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
7257 prints.
7258
7259 2002-05-07 Bernhard Herzog <[email protected]>
7260
7261 * setup.py: Add the shptree extension module. See
7262 extensions/pyshapelib/ChangeLog for more details.
7263
7264 * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
7265 extensions/shapelib/dbfopen.c: Really update to the versions of
7266 shapelib 1.2.9. For some reason it wasn't really done on
7267 2002-04-11.
7268
7269 * extensions/shapelib/shptree.c: Modified version of shptree.c of
7270 shapelib 1.2.9. The only real difference is the use of qsort
7271 instead of a bubble sort implementation
7272
7273 * Thuban/Model/layer.py (Layer.__init__): New instance variable
7274 shapetree to hold the shapelib quadtree for the shapefile
7275 (Layer.open_shapefile): Create the quad tree.
7276 (Layer.ShapesInRegion): New method to return the ids of shapes in
7277 a given region using the quad tree.
7278
7279 * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
7280 comment
7281 (draw_polygon_shape): Accept both arcs and polygons.
7282 (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
7283 the api.
7284
7285 * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
7286 return the shape ids to be rendered in a given layer.
7287 (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
7288 ids. Use draw_polygon_shape to draw arc shapes as well.
7289 (ScreenRenderer.RenderMap): New parameter for the rectangle that
7290 has to be updated
7291 (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
7292 calling it's ShapesInRegion method.
7293
7294 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
7295 update_region for the update region.
7296 (MapCanvas.OnPaint): Maintain the update region
7297 (MapCanvas.do_redraw): Pass the bounding box of the update_region
7298 to the renderer when drawing the bitmap. Reset the update_region.
7299
7300 2002-05-03 Bernhard Herzog <[email protected]>
7301
7302 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
7303 MainWindow.OpenSession): Change the file extension of the session
7304 files to .thuban
7305
7306 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
7307 Move the map channels to be forwarded by the session into the
7308 class constant with forwarded_channels. Also add
7309 LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
7310 forwarded_channels
7311
7312 * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
7313 typo and some rewording).
7314
7315 2002-05-02 Bernhard Herzog <[email protected]>
7316
7317 * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
7318 around to speed up most redraws:
7319 (MapCanvas.__init__): New instance variable bitmap which holds the
7320 bitmap
7321 (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
7322 self.bitmap to draw.
7323 (MapCanvas.full_redraw): New method to force a full redraw
7324 including the bitmap
7325 (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
7326 make sure the bitmap is redrawn.
7327 (MapCanvas.projection_changed, MapCanvas.set_view_transform,
7328 MapCanvas.shape_selected): Call full_redraw instead of readraw to
7329 make sure the bitmap is redrawn.
7330 (MapCanvas.OnSize): New method to handle size events so that the
7331 bitmap can be redrawn.
7332
7333 2002-04-29 Bernhard Herzog <[email protected]>
7334
7335 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
7336 canvas' VIEW_POSITION event
7337 (MainWindow.view_position_changed): Handler for VIEW_POSITION.
7338 Update the text in the status-bar accordingly.
7339
7340 * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
7341 (MapCanvas.__del__): Implement because Publisher.__del__ has to be
7342 called.
7343 (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
7344 current_position
7345 (MapCanvas.set_current_position): New method to set
7346 current_position. Issue a VIEW_POSITION event
7347 (MapCanvas.CurrentPosition): New public method to return the value
7348 of current_position. Should be called when the VIEW_POSITION event
7349 is processed.
7350 (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
7351 Update the position.
7352 (MapCanvas.OnLeaveWindow): Set the position to None.
7353
7354 * Thuban/UI/messages.py (VIEW_POSITION): New message for the
7355 position in the statusbar
7356
7357 2002-04-26 Frank Koormann <[email protected]>
7358
7359 * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
7360
7361 2002-04-24 Frank Koormann <[email protected]>
7362
7363 * Resources/Bitmaps/identify.xpm: shadow added
7364
7365 * Resources/Bitmaps/fullextent.xpm: new
7366
7367 2002-04-22 Jan-Oliver Wagner <[email protected]>
7368
7369 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
7370 box
7371
7372 2002-04-21 Jan-Oliver Wagner <[email protected]>
7373
7374 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
7375
7376 * Thuban/UI/tree.py (update_tree): added added map extent
7377
7378 * Thuban/UI/mainwindow.py (_method_command): extended by parameter
7379 icon; added map_full_extend as tool
7380
7381 2002-04-19 Jan-Oliver Wagner <[email protected]>
7382
7383 * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
7384 saving _new_ sessions
7385
7386 * Thuban/Model/session.py (create_empty_session): new session
7387 don't have a filename (set to None)
7388
7389 * Thuban/UI/tree.py (update_tree): added filename and modified flag
7390
7391 * Thuban/Model/load.py (ProcessSession): convert projection
7392 parameters from unicode to regular string
7393
7394 * Data/iceland_sample.session: Added UTM Zone 26 projection.
7395
7396 2002-04-11 Bernhard Herzog <[email protected]>
7397
7398 * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
7399 extensions/shapelib/dbfopen.c: Update to the versions of shapelib
7400 1.2.9
7401
7402 * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
7403 the pyshapelib directoy into the list of include dirs, so that
7404 pyshapelib_api.h can be found.
7405
7406 * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
7407 holds the pyshapelib C-API
7408 (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
7409 pyshapelib_api to access the shapelib functions.
7410 (initwxproj): Import the c_api from the shapelib module and
7411 initialize pyshapelib_api.
7412
7413 2002-04-04 Bernhard Herzog <[email protected]>
7414
7415 * setup.py (thuban_bdist_rpm.initialize_options): Use
7416 initialize_options to create the scripts for the rpm.
7417
7418 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
7419
7420 2002-04-03 Bernhard Herzog <[email protected]>
7421
7422 * setup.py: Increment version to 0.1.1
7423
7424 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
7425 Layer" and "Remove Layer" commands from the layer menu to the map
7426 menu
7427
7428 2002-02-15 Bernhard Herzog <[email protected]>
7429
7430 * Thuban/Model/layer.py (Layer.Shape): list append only takes one
7431 argument (python <= 1.5.2 erroneously accepted multiuple
7432 arguments)
7433
7434 2002-02-04 Bernhard Herzog <[email protected]>
7435
7436 * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
7437 RecordGrid in the identifyview.
7438 (IdentifyView.__init__): Use IdentifyGridCtrl instead of
7439 IdentifyListCtrl. The grid allows editing of the values.
7440
7441 * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
7442 implementing a grid for a single row of a thuban table.
7443
7444 * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
7445 layers by default. Easier to use than the previous default of only
7446 searching through the select layer which meant that if no layer
7447 was selected, you couldn't select a shape.
7448
7449 * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
7450
7451 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
7452 stroke_width attribute
7453
7454 * Thuban/Model/save.py (save_session): Write the new stroke_width
7455 attribute
7456
7457 * Thuban/Model/load.py (ProcessSession.startElement): Read the
7458 stroke_width attribute
7459
7460 * Thuban/Model/layer.py (Layer.__init__): New parameter and
7461 instance variable stroke_width
7462 (Layer.SetStrokeWidth): Set the stroke_width.
7463
7464 2002-02-01 Bernhard Herzog <[email protected]>
7465
7466 * extensions/thuban/wxproj.cpp (project_points): Fix two
7467 off-by-one errors in the last loop that joins the various parts
7468 together.
7469
7470 2002-01-14 Bernhard Herzog <[email protected]>
7471
7472 * setup.py (data_dist.make_distribution): Fix some typos
7473
7474 2001-09-18 Bernhard Herzog <[email protected]>
7475
7476 * README: Slight tweaking in preparation for the 0.1 release
7477
7478 * setup.cfg: Add section for sdist to create both tgz and zip
7479 archives
7480
7481 * setup.py: increase version number to 0.1
7482 (data_dist): New command class for data distribution
7483
7484 2001-09-14 Bernhard Herzog <[email protected]>
7485
7486 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
7487 Handle the case of no layer (i.e. layer is None) properly.
7488
7489 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
7490 Set the initial selection of the combo boxes to reflect the
7491 projection we're starting with in a way that works on windows,
7492 too.
7493
7494 * Thuban/Lib/connector.py (Connector.print_connections): Print the
7495 puiblisher's ids in hex to make it easier to compare them to the
7496 standard repr of python methods
7497
7498 * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
7499 messages
7500
7501 2001-09-13 Bernhard Herzog <[email protected]>
7502
7503 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
7504 deselect the layer if no layer is selected
7505
7506 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
7507 idle time when there actually is something to draw. If there's
7508 nothing to draw simply clear the window
7509 (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
7510 (MapCanvas.SetMap): force a redraw in all cases because
7511 FitMapToWindow doesn't always do it.
7512 (MapCanvas.ZoomFactor): Add an optional parameter, center, to
7513 specify the point to move into the center of the window
7514 (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
7515 dragged, zoon in/out by a factor of 2
7516 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
7517 index, i.e. reversed drawing order) so that objects appearing to
7518 be in from of others are selected first. This is probably mostly
7519 relevant for point shapes where the symbols used may overlap
7520
7521 * Thuban/Model/session.py (create_empty_session): Unset the
7522 modified bit before returning it
7523
7524 * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
7525 create_empty_session session to create the new, empty session.
7526
7527 * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
7528 the tool bitmaps.
7529 (MainWindow.OnClose, MainWindow.save_modified_session): Separate
7530 the code that asks whether the session should be saved into the
7531 new method save_modified_session.
7532 (MainWindow.OpenSession, MainWindow.NewSession): Use the new
7533 method to save modified session here too.
7534
7535 2001-09-11 Bernhard Herzog <[email protected]>
7536
7537 * setup.py (InnoIconItem): fix typo
7538
7539 (thuban_bdist_inno.run):
7540 (bdist_inno.run): Move the decision not to create symlinks on
7541 non-nt platforms to thuban_bdist_inno and do it unconditinally
7542 since we never want to create the symlinks here
7543
7544 2001-09-10 Bernhard Herzog <[email protected]>
7545
7546 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
7547 identify view immediately
7548
7549 * Thuban/UI/controls.py: New file with two classes RecordListCtrl
7550 and SelectableRecordListCtrl that implement the code shared by the
7551 identify view and the label dialog
7552
7553 * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
7554 new class RecordListCtrl
7555
7556 * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
7557 return value of GetValue is None instead of using it as a boolean
7558 directly so that Zero numbers are handled properly.
7559 (LabelListCtrl): Derive from the new class
7560 SelectableRecordListCtrl
7561
7562 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
7563 (Proj4Dialog.dialogLayout): Make the window resizable and set the
7564 size of the text control explicitly to make the sizers work on
7565 both Windows and X.
7566
7567 2001-09-07 Bernhard Herzog <[email protected]>
7568
7569 * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
7570 that can limit the search to the currently selected layer.
7571 (MapCanvas.SelectShapeAt): Make sure that the currently selected
7572 layer stays selected even when no shape is found
7573 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
7574 height do nothing (avoids zero division errors)
7575
7576 2001-09-06 Bernhard Herzog <[email protected]>
7577
7578 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
7579 Correct the spelling of SessionTreeCtrl. dabbrev is too damn
7580 convenient :-)
7581 (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
7582 a new instvar layer_to_item to map layers to tree items
7583 (SessionTreeCtrl.layer_selected): Select the appropriate tree item
7584 to match the current selection in the interactor
7585
7586 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
7587 (Interactor.HasSelectedLayer): New methods to query the current
7588 selection
7589
7590 * Thuban/UI/mainwindow.py (MainWindow.current_layer):
7591 (MainWindow.has_selected_layer): Simply call the appropriate
7592 interactor method
7593
7594 * Thuban/UI/mainwindow.py (MainWindow.__init__):
7595 (MainWindow.LayerShowTable):
7596 (MainWindow.identify_view_on_demand): Store the interactor in an
7597 instvar and use that reference instead of going through main.app
7598
7599 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
7600 * Thuban/UI/application.py (ThubanApplication.OnInit):
7601 * Thuban/UI/main.py (main): Create the session tree view in main
7602 with the new mainwindow method ShowSessionTree and not directly
7603 the application's OnInit method
7604
7605 * Thuban/UI/tree.py (myTreeCtrlPanel):
7606 (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
7607 TreeCtrl isntead of a panel. This affects most method since we now
7608 refer to self instead of self.tree
7609 (SessionTreeView): New class implementing a non-modal dialog
7610 showing the session tree.
7611
7612 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
7613 layer to the tableview dialog.
7614
7615 * Thuban/UI/tableview.py: Add some doc-strings
7616 (TableGrid):
7617 (TableGrid.OnRangeSelect):
7618 (TableGrid.OnSelectCell):
7619 (TableFrame.__init__):
7620 (TableFrame.row_selected):
7621 Selecting rows in the grid view now updates the selected shapes
7622 through the TableFrame. To achieve this we derive TableGrid from
7623 Publisher and introduce the message type ROW_SELECTED which the
7624 TableFrame subscribes to and which is issued by OnRangeSelect and
7625 OnSelectCell
7626
7627 (DataTable.SelectRow): Removed because it's no longer needed in
7628 the row/shape selection scheme
7629
7630 * Thuban/UI/dialogs.py: New file implementing common classes for
7631 dialogs
7632
7633 * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
7634 the SELECTED_SHAPE message anymore. This is now handled by the
7635 parent.
7636 (TableGrid.select_shape): Only update the selection if the shape
7637 is not None.
7638 (TableFrame): Inherit from the new NonModalDialog class.
7639 (TableFrame.__init__, TableFrame.select_shape): Handle the
7640 SELECT_SHAPE message.
7641 (TableFrame.OnClose): Extend the inherited method to unsubscribe
7642 SELECT_SHAPE
7643
7644 * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
7645 (MainWindow.add_dialog):
7646 (MainWindow.dialog_open):
7647 (MainWindow.remove_dialog):
7648 (MainWindow.get_open_dialog): New methods to maintain a dictionary
7649 of opened non-modal dialogs.
7650
7651 (MainWindow.__init__): Initialize the new non-modal dictionary
7652 management code
7653 (MainWindow.LayerShowTable): maintain separate dialogs for each
7654 table using the non-modal dialog management code to only open a
7655 view once for each table.
7656
7657 (MainWindow.IdentifyTool):
7658 (MainWindow.__init__):
7659 (MainWindow.identify_view_on_demand): Don't open the identify view
7660 in IdentifyTool anymore. This will be done automatically by the
7661 new method identify_view_on_demand which handles the
7662 SELECTED_SHAPE message so that the identify view will be opened on
7663 demand
7664
7665 * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
7666 the interactor argument. The SELECTED_SHAPE message is now handled
7667 by the parent.
7668 (IdentifyView.__init__): Add the interactor argument so that we
7669 can handle the SELECTED_SHAPE message here
7670 (IdentifyView.selected_shape): New method to handle the
7671 SELECTED_SHAPE messages
7672
7673 * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
7674 NonModalDialog class
7675 (IdentifyView.OnClose): Extend the inherited version to
7676 unsubscribe SELECT_SHAPE
7677
7678 * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
7679
7680 2001-09-05 Bernhard Herzog <[email protected]>
7681
7682 * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
7683
7684 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
7685 interactor to pass through to the MapCanvas
7686
7687 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
7688 argument to the MainWindow constructor to get rid of the ugly hack
7689 that made main.app available early just so that the mapcanvas
7690 could access the interactor object.
7691
7692 2001-09-04 Bernhard Herzog <[email protected]>
7693
7694 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
7695 that runs a modal message box
7696 (MainWindow.OnClose): Use the new method
7697 (MainWindow.RemoveLayer): Just do nothing in case no layer is
7698 selected. The command should be grayed out anyway, so there's no
7699 need to pop up a message box.
7700 (MainWindow.AddLayer): Pop up a message box with an error message
7701 if the shape file can't be opened
7702
7703 * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
7704 immediately. This will cause an exception in case the file can't
7705 be opened and we can display an appropriate message.
7706
7707 * MANIFEST.in: Add extensions/pyprojection/LICENSE
7708
7709 * setup.py (thuban_bdist_rpm): New class implementing a Thuban
7710 specific bdist_rpm command.
7711
7712 * Thuban/UI/main.py: Catch ImportError exceptions when importing
7713 the locale module because it may not be available on some
7714 installations.
7715
7716 * extensions/pyprojection/LICENSE: Copy of the license text in
7717 Projection.i. Having it in a separate file makes it easier to
7718 refer to license text in e.g. RPMs
7719
7720 2001-09-03 Bernhard Herzog <[email protected]>
7721
7722 * setup.py: use wx-config instead of wxgtk-config because it's
7723 more generic
7724
7725 * setup.py (ThubanInstall.get_outputs): Add the symlink in
7726 <prefix>/bin to the outputs
7727 (ThubanInstall.link_file): New method to link files. We need this
7728 because the standard copy_files refuses to link non-existing
7729 files.
7730 (ThubanInstall.run): Remove the leading install root from the
7731 script filename if an install root was specified and use the new
7732 link_file method
7733
7734 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
7735 the window when the first layer is added to the map.
7736
7737 * setup.py (ThubanInstall.run): Honor the build root (self.root)
7738 when linking thuban.py to <prefix>/bin
7739
7740 2001-08-31 Bernhard Herzog <[email protected]>
7741
7742 * setup.py: In the setup call, the install parameters shouldn't
7743 have trailing slashes because distutils on non-posix platforms
7744 doesn't like that. The same applies to other directories like
7745 "Resources/Bitmaps"
7746
7747 In the configuration section for nt, move the wxWindows directory
7748 optins into the part clearly marked as editable.
7749
7750 (InstallLocal.initialize_options):
7751 (InstallLocal.user_options): remove the currently unused debug
7752 flag
7753 (thuban_build_py.find_all_modules): Add this method so that it
7754 works for our case of having packages and modules in one
7755 distribution as well.
7756 (ThubanInstall.initialize_options):
7757 (ThubanInstall.finalize_options):
7758 (ThubanInstall.user_options):
7759 (ThubanInstall.boolean_options): Add new options, do-symlink and
7760 extra files. Since these are the first ThubanInstall specific
7761 options, override user_options and boolean_options
7762 (ThubanInstall.run): Honor the new do-symlink and extra-files
7763 options.
7764 (ThubanInstall.get_outputs): Add to override the base-class's
7765 version and add the extra-files to the outputs
7766 (bdist_inno): New class for windows distributions with Inno Setup
7767 (InnoIconItem): Helper class for bdist_inno
7768 (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
7769 this together with the appropriate parameters, to the setup call.
7770
7771 * setup.cfg (bdist_inno): added new section for the inno setup
7772 installer
7773
7774 * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
7775 changing_selection to avoid recursive selection events when
7776 modifying the selection in response to a selection event.
7777 (myTreeCtrlPanel.normalize_selection): Set the new inst var when
7778 changing the tree's selection.
7779 (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
7780 we're not being called indirectly from normalize_selection.
7781
7782 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
7783 event.Check only if the command is actuall checkable.
7784 (MainWindow.__init__): Call the toolbar's Realize method to make
7785 sure that the items are actually shown
7786
7787 2001-08-28 Bernhard Herzog <[email protected]>
7788
7789 * setup.py: Fix some doc strings
7790
7791 * ChangeLog: started
7792

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26