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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1685 - (show annotations)
Thu Aug 28 18:55:17 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 279596 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26