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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1609 - (show annotations)
Tue Aug 19 12:51:32 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 258822 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26