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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1629 - (show annotations)
Fri Aug 22 12:54:04 2003 UTC (21 years, 6 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 263021 byte(s)
fixed bug #2058

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26