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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2070 - (show annotations)
Tue Feb 17 12:53:37 2004 UTC (21 years ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 349008 byte(s)
* test/test_svgmapwriter.py, Extensions/svgsaver.py,
Extensions/svgmapwriter.py, Extensions/maplegend.py,
extensions/svgexport/svgsaver.py,
extensions/svgexport/svgmapwriter.py,
extensions/svgexport/maplegend.py: Removed.  These files were in
the wrong places or didn't work at all.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26