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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1826 - (show annotations)
Tue Oct 14 15:21:27 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 300190 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26