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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2457 - (hide annotations)
Wed Dec 15 09:44:58 2004 UTC (20 years, 2 months ago) by frank
Original Path: trunk/thuban/ChangeLog
File size: 418459 byte(s)
Extended load tests

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26