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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2025 - (show annotations)
Fri Dec 5 16:45:37 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 340149 byte(s)
update ChangeLog

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26