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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2506 - (hide annotations)
Thu Dec 23 15:10:58 2004 UTC (20 years, 2 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 425985 byte(s)
Tiny fix

1 jan 2506 2004-12-23 Jan-Oliver Wagner <[email protected]>
2    
3     * Thuban/UI/projdialog.py (ProjFrame.load_user_proj): Added a
4     \n to stderr after the warnings. Thanks to Russell Nelson.
5    
6 nhueffme 2493 2004-12-20 Nina Hueffmeyer <[email protected]>
7    
8     * Extensions/ogr/ogrshapes.py: Fixed some issues from
9     Bernhard (coding guidelines etc.). Additionally it is now possible to
10     display shapefiles containing feature collections (e.g.polygons
11     with holes). Works with gdal 1.2.1 now.
12    
13     * Extensions/ogr/test/test_OGRShapestore.py: Fixed some issues
14     from Bernhard (coding guidelines etc.). If ogr can't be imported,
15     tests are skipped now.
16    
17     * Extensions/ogr/ogrstart.py: Fixed some typings.
18    
19 bernhard 2490 2004-12-20 Bernhard Reiter <[email protected]>
20    
21     * Extensions/svgexport/TODO: updated to add support for
22     raster layers and labels for 1.0.1.
23    
24     * Extensions/svgexport/svgmapwriter.py (draw_raster_layer):
25     Issue a warning now.
26    
27 bernhard 2488 2004-12-19 Bernhard Reiter <[email protected]>
28    
29 bernhard 2489 * Extensions/svgexport/TODO: Added idea to support triggering
30     the application down the pipe.
31    
32     2004-12-19 Bernhard Reiter <[email protected]>
33    
34 bernhard 2488 svgexport: Improved code quality, mainly by better naming.
35    
36     * Extensions/svgexport/svgmapwriter.py:
37     DrawPath() renamed to DrawPolygonPath(),
38     added documentation, improved comments and variable names.
39    
40     * Extensions/svgexport/svgmapwriter.py,
41     Extensions/svgexport/test/test_svgmapwriter.py:
42     All using DrawPolygonPath() now, the default parameter closed=True
43     omitted.
44    
45     * Extensions/svgexport/test/test_svgmapwriter.py:
46     renamed test_polygon_opened() to test_polyline()
47     renamed test_transparent_polygon() to test_transparent_polyline()
48    
49 jan 2487 2004-12-18 Jan-Oliver Wagner <[email protected]>
50    
51     Some fixes of gns2shp extension.
52    
53     * Extensions/gns2shp/test/__init__.py: New. Make this directory a
54     package.
55    
56     * Extensions/gns2shp/test/test_gns2shp.py: Add some import paths
57     dynamically.
58    
59     * Extensions/gns2shp/test/README: Simplified description how to test.
60    
61     * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed doc-string,
62     fixed some dimensions of fields according to the GNS documentation
63     which seems to change undocumented.
64     Now killing trailing \n and/or \r from MODIFY_DATE.
65     This fixes RT#2453.
66    
67 bernhard 2479 2004-12-18 Bernhard Reiter <[email protected]>
68 bernhard 2480
69 bernhard 2482 svgexport 1.0.0: Treats holes and islands nicely. Documentation added.
70    
71     * Extensions/svgexport/test/test_svgmapwriter.py:
72     Added new tests: test_export_polygon_with_hole()
73     and test_polygon_with_hole().
74    
75     * Extensions/svgexport/svgmapwriter.py
76     (draw_polygon_shape()): Uses DrawPath correctly now.
77    
78     * Doc/manual/thuban-manual.xml: Added documentation for stable
79     extention svgexport.
80     * Doc/manual/thuban-manual-de.xml: Copied English section about
81     svexport over.
82    
83     * Extensions/svgexport/__init__.py: Bumped version number to 1.0.0.
84    
85     * Extensions/svgexport/svgsaver.py,maplegend.py:
86     Moved from experimental to stable extension menu.
87    
88     * Extensions/svgexport/TODO: updated.
89    
90    
91     2004-12-18 Bernhard Reiter <[email protected]>
92    
93 bernhard 2481 Added Extensions/svgexport/TODO
94    
95     2004-12-18 Bernhard Reiter <[email protected]>
96    
97 bernhard 2480 Refactored in svgexport:
98     DrawPath replaces DrawPolygon; added newline in front of "M" in paths.
99    
100     * Extensions/svgexport/svgmapwriter.py
101     Added verbosity level 3 to print out polygon points.
102     (class Point): added __repr__
103     (class Brush, __str__()): Added space after ,.
104     (DrawPolygon): Renamed to DrawPath()
105     (DrawPath): Takes list of polygons as input now, adds \n before "M"s.
106     (DrawLines): Using DrawPath now.
107    
108     * Extensions/svgexport/test/test_svgmapwriter.py:
109     Replaced DrawPolygon() calls with DrawPath() and put the first argument
110     inside another list. Adapted test data with a newline before "M".
111    
112     2004-12-18 Bernhard Reiter <[email protected]>
113 bernhard 2479
114     Refactored svgexport tests: 9 double tests runs eliminated;
115     code size reduced by 8 lines.
116    
117     * Extensions/svgexport/test/test_svgmapwriter.py:
118     (class TestWithDC): Renamed to BaseTestWithDC, moved to top.
119     (class BaseWithDCtools): New, subclass from BaseTestWithDC.
120     (class TestDrawSplines): now subclass from BaseTestWithDCtools,
121     this fixed the double running of the nine tests of TestVirtualDC.
122     (class TestVirtualDC): Using self.dc and self.file from setUp().
123    
124 bh 2478 2004-12-17 Bernhard Herzog <[email protected]>
125    
126     Two windows specific fixes ported from thuban-1­0-branch:
127    
128     * Thuban/UI/about.py (unicodeToLocale): Use getdefaultlocale
129     instead of getlocale because getlocale doesn't return a usable
130     encoding name on a german windows 2000
131    
132     * setup.py: windows build: Removed the absolute path names and
133     made all prfixes relative to the directory containing setup.py.
134     Makes it a little easier to adapt to a different system.
135    
136 bh 2470 2004-12-16 Bernhard Herzog <[email protected]>
137    
138 bernhard 2479 Add support for PostGIS tables with LINESTRING geometries.
139 bh 2472 Fixes RT#2299
140    
141     * Thuban/Model/postgisdb.py (shapetype_map): Add LINESTRING
142    
143     * test/postgissupport.py
144     (PostgreSQLServer.get_default_static_data_db): Rename the "roads"
145     table to "roads-multi" because it now uses MULTILINESTRING
146     geometries and introduce a new "roads" table that uses LINESTRING
147     (coords_to_multilinestring): Make the doc string more precise
148     (coords_to_linestring): New. Create a LINESTRING WKT
149     representatin
150     (wkt_converter): Add coords_to_linestring
151     (upload_shapefile): Rephrase the doc-string a bit.
152    
153     * test/test_postgis_db.py (TestPostGISShapestoreArc)
154     (LineStringTests)
155     (TestPostGISShapestoreLineString)
156     (TestPostGISShapestoreMultiLineString): Split
157     TestPostGISShapestoreArc into a base class LineStringTests and two
158     derived classes TestPostGISShapestoreLineString for LINESTRING
159     geometries and TestPostGISShapestoreMultiLineString for
160     MULTILINESTRING geometries. Most test methods are in the base
161     class with the exception of tests that explicitly check the raw
162     format.
163    
164     2004-12-16 Bernhard Herzog <[email protected]>
165    
166 bh 2471 Make the test suite work with PostGIS 0.8.2 and PostgreSQL 7.4
167    
168     * test/postgissupport.py (find_postgis_sql): Different postgis
169     versions put the postgis.sql file into slightly different places
170     so we have to look in both. The updated doc string describes this
171     is more detail.
172    
173     * test/test_postgis_db.py
174     (TestPostGISSpecialCases.test_column_name_quoting): The return
175     value of UniqueValues is unsorted, so it has to be sorted for
176     comparison.
177    
178     2004-12-16 Bernhard Herzog <[email protected]>
179    
180 bh 2470 Fix for RT#2237
181    
182     * Thuban/UI/projdialog.py (ProjFrame._show_proj_panel): If the
183     panel to be shown is the UnknownProjPanel disable the OK and Try
184     buttons. Otherwise enable them.
185     (ProjFrame.__GetProjection): The UnknownProjPanel returns None for
186     the parameters. In that case __GetProjection also returns None
187     now.
188    
189 bh 2459 2004-12-15 Bernhard Herzog <[email protected]>
190    
191 bh 2462 * Thuban/UI/classgen.py (GenQuantilesPanel.__init__): Set the
192     minimum number of classes to 2. The calculate_quantiles needs at
193     least two and raises an exception otherwise.
194     Fixes RT#2549
195    
196     2004-12-15 Bernhard Herzog <[email protected]>
197    
198 bh 2460 * test/postgissupport.py (PostgreSQLServer.execute_sql): Extend to
199     so that it returns a result for select statements.
200     (PostgreSQLServer.server_version): New. Return the version of the
201     server software.
202     (PostgreSQLServer.require_authentication): The format of
203     pg_hba.conf has changed between PostgrSQL 7.2 and 7.3. Check the
204     server version and generate the file in the correct format
205    
206     2004-12-15 Bernhard Herzog <[email protected]>
207    
208 bh 2459 * test/postgissupport.py (PostgreSQLServer.is_running): Fix typo
209     in the doc string and rephrase it a little.
210    
211 frank 2457 2004-12-15 Frank Koormann <[email protected]>
212    
213     * test/test_load.py (TestAltPath.checkSession): New, extended checks if
214     session has been loaded successfully. The check is called by the relevant
215     tests after executing load_session().
216    
217 bh 2450 2004-12-13 Bernhard Herzog <[email protected]>
218    
219 bh 2454 Make sure the region used to determine which shapes are visible
220     actually matches the region on the printed page. If this isn't
221     done properly some shapes might not be printed.
222     Fixes RT #2692
223    
224     * Thuban/UI/view.py (MapPrintout.draw_on_dc): The region for the
225     renderer has to be at the same position as the mapregion
226    
227     * Thuban/UI/renderer.py (ExportRenderer.RenderMap): self.region
228     has to be moved by (self.shiftx, self.shifty) too.
229    
230     2004-12-13 Bernhard Herzog <[email protected]>
231    
232 bh 2452 * libraries/pyprojection/Projection.i: Work around a bug in the
233     generated python code which leads to exception in the __del__
234     method when the constructor fails. See the comments in the code
235     for more details.
236    
237     * libraries/pyprojection/Projection.py: Updated from Projection.i
238     with SWIG.
239    
240     2004-12-13 Bernhard Herzog <[email protected]>
241    
242 bh 2451 * test/test_load.py (TestAltPath.test_01_single_path_error_fix)
243     (TestAltPath.test_02_path_error_fix_from_list)
244     (TestAltPath.test_05_path_error_fix_from_list_changed)
245     (TestAltPath.test_06_path_error_fix_from_list_fails): self.session
246     is destroyed in tearDown, so there's no need to do it in a test
247     case.
248    
249     * Thuban/Model/load.py (SessionLoader.open_shapefile): Remove a
250     debug print
251    
252     2004-12-13 Bernhard Herzog <[email protected]>
253    
254 bh 2450 * Extensions/svgexport/test/test_svgmapwriter.py
255     (TestDrawSplines.setUp): Do not use super with the unittest
256     classes because in Python 2.2 they're still old-style classes.
257    
258 frank 2448 2004-12-13 Frank Koormann <[email protected]>
259    
260     Alternative Path feature: When loading a (moved) session where
261     shapefiles cannot be found, ask the user. Use the specified path
262     if further shapefiles are missing. However, ask the usr for confirmation
263     in such cases.
264    
265     * test/test_load.py (TestAltPath): New, tests for alternative path feature
266     in load_session()
267     (Shapefile_CallBack): Helper, implements controllable callback.
268    
269     * Thuban/UI/application.py (ThubanApplication.OnInit):
270     Added "alt_path" to self.path
271     (ThubanApplication.OpenSession): Added shapefile_callback as second
272     callback similar to db_connection_callback.
273     (ThubanApplication.run_alt_path_dialog): New, implementaion of
274     shapefile_callback. In addition to raising the dialog the control of
275     self.path('alt_path') is implemented here.
276    
277     * Thuban/Model/load.py (SessionLoader.__init__): Added shapefile_callback.
278     (SessionLoader.open_shapefile): Open shapefile, eventually with
279     alternative path. This wrapps the "theSession.OpenShapefile(filename)"
280     formerly used in start_fileshapesource()/start_layer().
281     (SessionLoader.start_fileshapesource): Call open_shapefile().
282     (SessionLoader.start_layer): Call open_shapefile().
283     (load_session): Added shapefile_callback.
284    
285     * Thuban/UI/altpathdialog.py: New, implements dialogs for alternative path
286     feature (search / check).
287    
288     * Doc/manual/thuban-manual.xml: Added documentation of new feature.
289    
290 bernhard 2443 2004-12-11 Bernhard Reiter <[email protected]>
291    
292 bernhard 2445 svgexport 0.9.2: Point size supports for maps.
293    
294     * Extensions/svgexport/svgmapwriter.py: Added import of SHAPETYPE_POINT
295     (def draw_point_shape): new parameter size defaults to 2 as before.
296     (draw_shape_layer_incrementally): Moved draw_func log line higher.
297     Added draw_func call with size when dealing with a point layer.
298    
299     * Extensions/svgexport/__init__.py: bumped version to 0.9.2.
300    
301     2004-12-11 Bernhard Reiter <[email protected]>
302    
303 bernhard 2444 Made sure that newlines are inserted in the svg path d attributes
304     to raise the chance that the line length will be below 255 characters,
305     as recommended by REC SVG 1.1 in section 8.3.1.
306    
307     * Extensions/svgexport/svgmapwriter.py(DrawPolygon):
308     Adding \n before L's and changed whitespace handling.
309    
310     * Extensions/svgexport/test/test_svgmapwriter.py:
311     Adapted tests to new whitespace handling of DrawPolygon.
312    
313     2004-12-11 Bernhard Reiter <[email protected]>
314    
315 bernhard 2443 * Doc/technotes/coding_guidelines.txt: easy typo fixed.
316    
317     * Extensions/svgexport/test/test_svgmapwriter.py:
318     Removed test_drawbezier in favour of new test_drawspline3 and
319     test_drawspline4 within new class TestDrawSplines(TestVirtualDC).
320     All only to test DrawSpline.
321    
322     * Extensions/svgexport/svgmapwriter.py(DrawSpline):
323     New implementation now really using the strange algorithm of
324     xfig 3.1's approximated splines and its conversion to postscript
325     with one twist: SVG can do quadratic beziers, so skipped translation
326     to cubic beziers.
327     (TestWithDC): Typo in comment fixed.
328    
329 joey 2442 2004-12-09 Martin Schulze <[email protected]>
330    
331     * Thuban/Model/classgen.py: Added missing character encoding
332    
333     * Extensions/wms/properties.py (OpenWMSProperties): removed
334    
335     * Extensions/wms/parser.py (WMSCapabilitiesParser.error): Dropped
336     support for get_srs_discrepancies() since there are no
337     discrepancies anymore (was a thinko)
338    
339     * Extensions/wms/layer.py (WMSLayer.GetMapImg): Improved graphic
340     format priority now that more formats are supported globally by
341     the render engine.
342    
343 silke 2437 2004-12-08 Silke Reimer <[email protected]>
344     * Extensions/ogr/ogrshapes.py: Substituted ogr-method CloseRings
345     because it is not available in all versions of ogr
346    
347 bernhard 2436 2004-12-08 Bernhard Reiter <[email protected]>
348     * Extensions/ogr/__init__.py: Added empty __init__.py to heal
349     global tests until a real one is commited.
350    
351 nhueffme 2435 2004-12-07 Nina Hüffmeyer <[email protected]>
352    
353     * /Extensions/ogr/: Adding a new extension to read shapefiles with
354     ogr. It is planned to add other vector formats.
355    
356     * /test/runtests.py: Adding tests from /Extensions/ogr/test/.
357    
358 jan 2434 2004-12-07 Jan-Oliver Wagner <[email protected]>
359    
360     * /Extensions/svgexport/test/test_svgmapwriter.py: Reverting
361     part of a (non-)fix to renable that the tests are always
362     executed.
363    
364 bernhard 2432 2004-12-07 Bernhard Reiter <[email protected]>
365    
366     * Extensions/svgexport/test/test_svgmapwriter.py:
367     Added test_drawbezier() to test DrawSpline().
368    
369     * Extensions/svgexport/svgmapwriter.py(DrawSpline):
370     Really implemented bezier drawing.
371    
372     * Extensions/svgexport/__init__.py: Bumped version of svgexport
373     to 0.9.1 because now the legend examples lines styles
374     will be drawing with beziers.
375    
376 joey 2431 2004-12-05 Martin Schulze <[email protected]>
377    
378     * Thuban/UI/renderer.py (raster_format_map): Added PNG, TIFF and
379     GIF as supported bitmap image formats (helpful for the WMS extension)
380    
381 joey 2430 2004-11-30 Martin Schulze <[email protected]>
382    
383     * Extensions/wms/test/test_ogclib.py (TestOGCLib.test_compareURLs):
384     Improved the test for the internal compare method
385    
386 jan 2429 2004-11-27 Jan-Oliver Wagner <[email protected]>
387    
388     * Thuban/UI/about.py (About.__init__): Added
389     Norbert Solymosi for hungarian translation and Ole Rahn
390     as contrbutor. Moved Bernhard Reiter from Contributor
391     to Developer.
392    
393 bernhard 2425 2004-11-27 Bernhard Reiter <[email protected]>
394    
395     * Extensions/svgexport/test/test_svgmapwriter.py:
396     Removed Jan from author list as he did not change enough significant
397     lines yet.
398    
399     * Extensions/svgexport/__init__.py: Added Bernhard as author
400     of the Extension.
401    
402 jan 2422 2004-11-27 Jan-Oliver Wagner <[email protected]>
403    
404     * po/hu.po: New. Hungarian translation. Contributed
405     by Norbert Solymosi.
406    
407 bh 2419 2004-11-26 Bernhard Herzog <[email protected]>
408    
409     * Extensions/svgexport/test/test_svgmapwriter.py
410     (Testobjectexport.test_transparent_polygon): Commented out some
411     debug prints
412    
413 jan 2418 2004-11-24 Jan-Oliver Wagner <[email protected]>
414    
415     Fix broken tests for svg extension and added svg legend
416     to Experimental menu.
417    
418     * Extensions/svgexport/test/test_svgmapwriter.py: Fix to have
419     the test run correctly even if the extension is a package.
420     Also removed the "import Thuban" which makes no sense.
421    
422     * Extensions/svgexport/__init__.py: Fix to have the extensions'
423     test module also be executed from the global test routine.
424     This is done by looking for the absense of the DISPLAY variable.
425    
426     * Extensions/svgexport/maplegend.py: Moved the menu entry from Extensions
427     to Experimental menu since this module has yet not reached a stable
428     status (ie. 1.0).
429    
430 bernhard 2414 2004-11-22 Bernhard Reiter <[email protected]>
431    
432     * Extensions/svgexport/svgmapwriter.py:
433     Added verbose variable and some logging depending on it.
434     (class VirtualDC(XMLWriter)): Minor improvement in the polygon loop,
435     because counting i is not necessary.
436     (class Pen, class Brush): Added simple __str__ methods.
437     (SVGRenderer.draw_polygone_shape): Fix #2698 (transparent polygons are
438     not exported to svg file) Note: holes still unhandled.
439    
440     * Extensions/svgexport/test/test_svgmapwriter.py:
441     Made a baseclass TestWithDC for test needed a DC.
442     Added tests for bug #2698 (transparent polygons are not
443     exported to svg file):
444     Testobjectexport.test_transparent_polygon()
445    
446     * Thuban/Model/base.py (UnsetModified):
447     Fixed some typos in docstring.
448    
449     * Thuban/UI/baserenderer.py (BaseRenderer.draw_polygon_shape()):
450     Added hints on the used algorithm for handling holes.
451    
452 jan 2403 2004-11-20 Jan-Oliver Wagner <[email protected]>
453    
454 jan 2412 Some face lifting for the examples.
455    
456     * Examples/__init__.py: Make this directory a package.
457    
458     * Examples/simple_extensions/__init__.py: Make this directory a package.
459    
460     * Examples/simple_extensions/hello_world.py: Moved entry from Extensions
461     menu to Examples menu.
462    
463     * Examples/simple_extensions/simple_command.py: Some more comments,
464     minor changes.
465    
466     * Examples/simple_extensions/simple_tool.py: Minor changes.
467    
468     2004-11-20 Jan-Oliver Wagner <[email protected]>
469    
470 jan 2407 Changed way of extension registry for wms and added extension
471     registry for umn_mapserver extension.
472    
473     * Extensions/wms/__init__.py: Added registry entry and the importing
474     of the actual wms module. Included a test for the required PyOGCLib.
475    
476     * Extensions/wms/wms.py: Removed registry entry (moved to __init__.py).
477    
478     * Extensions/umn_mapserver/__init__.py: Added registry entry and the
479     importing of the actual umn mapserver management modules.
480     Included a test for the required Python MapScript.
481    
482     2004-11-20 Jan-Oliver Wagner <[email protected]>
483    
484 jan 2403 Changed way of extension registry for importAPR, bboxdump
485     and added extension registry for svgexport.extension registry for
486     svgexport.
487    
488     * Extensions/importAPR/__init__.py: Added registry entry and the importing
489     of the actual importAPR module.
490    
491     * Extensions/importAPR/importAPR.py: Removed registry entry (moved to
492     __init__.py).
493    
494     * Extensions/bboxdump/__init__.py: Added registry entry and the importing
495     »···of the actual bboxdump module.
496    
497     * Extensions/bboxdump/bboxdump.py: Removed registry entry (moved to
498     »···__init__.py).
499    
500     * Extensions/svgexport/__init__.py: Added registry entry and the importing
501     of the svgsaver module.
502    
503     * Extensions/svgexport/svgsaver.py: Moved the menu entry from Extensions
504     to Experimental menu since this module has yet not reached a stable
505     status (ie. 1.0).
506    
507 jan 2397 2004-11-18 Jan-Oliver Wagner <[email protected]>
508    
509     Now the hit test considers the size of point symbols.
510    
511     * Thuban/UI/viewport.py (ViewPort._hit_point): Added optional parameter
512     'size' defaulting to the previously fixed value 5.
513     Extended doc-string.
514     (Viewport._find_shape_in_layer): Resolved FIXME regarding flexibility
515     for symbols.
516     Now the size of the largest point symbol is determined to find out
517     about whether the point has been hit.
518     This fixes the problem that only clicks inside a fixed distance of
519     5 where found.
520    
521 jan 2395 2004-11-17 Jan-Oliver Wagner <[email protected]>
522    
523 jan 2397 Another open issue fixed regarding sizeable symbols: correct rendering of
524 jan 2395 selected symbols.
525    
526     * Thuban/UI/renderer.py (ScreenRenderer.draw_selection_incrementally):
527     Added consideration of the specific size of point symbols.
528     The property for each point symbol is retrieved and the size applied
529     for the rendering method.
530     Added doc-string.
531    
532 jan 2393 2004-11-16 Jan-Oliver Wagner <[email protected]>
533    
534     Changed way of Extension Registry for gns2shp and profiling.
535    
536     * Extensions/gns2shp/gns2shp.py: Removed registry entry (moved to
537     __init__.py).
538    
539     * Extensions/gns2shp/__init__.py: Added registry entry and the importing
540     of the actual gns2shp module.
541    
542     * Extensions/profiling/profiling.py: Removed registry entry (moved to
543     __init__.py).
544    
545     * Extensions/profiling/__init__.py: Added registry entry and the importing
546     of the actual profiling module.
547    
548 bernhard 2388 2004-10-28 Bernhard Reiter <[email protected]>
549    
550     * Extensions/svgexport/: Minor improvements to doc strings.
551    
552 jan 2387 2004-10-07 Jan-Oliver Wagner <[email protected]>
553    
554     Further elements for sizable point objects now
555     making this feature usable though not yet complete.
556    
557     * Thuban/Model/save.py (SessionSaver.write_classification): Write
558     attribute 'size' for cldata when the shape layer is of point type.
559     This also now make the test_load.py tests happy.
560    
561     * Thuban/Model/classgen.py (CustomRamp.GetProperties): Added size
562     gradient.
563    
564     * Thuban/UI/classifier.py (ID_SELPROP_SPINCTRL): Renamed to
565     ID_SELPROP_SPINCTRL_LINEWIDTH.
566     (ID_SELPROP_SPINCTRL_LINEWIDTH): New Id replaces ID_SELPROP_SPINCTRL.
567     (ID_SELPROP_SPINCTRL_SIZE): New Id.
568     (SelectPropertiesDialog.__init__): Added a second spin control
569     for the size in case the corresponding layer is of point type.
570     (SelectPropertiesDialog._OnSpin): Renamed to _OnSpinLineWidth.
571     (SelectPropertiesDialog._OnSpinLineWidth): New. Former _OnSpin.
572     (SelectPropertiesDialog._OnSpinSize): New. Set size of property
573     and refresh preview.
574    
575    
576    
577 joey 2381 2004-10-04 Martin Schulze <[email protected]>
578    
579     * Extensions/wms/test/test_parser.py
580     (TestWMSCapabilitiesParser.test_compareLists): Added missing
581     self-test for compareLists()
582     (TestWMSCapabilitiesParser.test_compareDicts): Added missing
583     self-test for compareDicts()
584 joey 2382 (TestWMSCapabilitiesParser.test_compareLists): Adding more tests
585     to verify the test routine fails with non-equal arguments
586     (TestWMSCapabilitiesParser.test_compareDicts): Adding more tests
587     to verify the test routine fails with non-equal arguments
588 joey 2381
589 jan 2370 2004-10-03 Jan-Oliver Wagner <[email protected]>
590    
591 jan 2380 First elements for sizeable point objects.
592    
593     * Resources/XML/thuban-1.1.dtd: Added size attribute to cldata.
594    
595     * Data/iceland_sample_size.thuban: New. Sample for sized point objects.
596    
597     * test/test_load.py (ClassificationTest.TestLayers): Added SetSize in case
598     of a corresponding argument is given.
599     (TestSymbolSize): New. Test the size attribute of cldata.
600    
601     * Thuban/Model/classification.py: Removed some trailing whitespaces.
602     (ClassGroupProperties.__init__): Set default size.
603     (ClassGroupProperties.SetProperties): Set the size.
604     (ClassGroupProperties.GetSize): New. Return the size.
605     (ClassGroupProperties.SetSize): New. Set the size.
606     (ClassGroupProperties__eq__): Compare also size.
607     (ClassGroupProperties__repr__): Print also size.
608    
609     * Thuban/Model/load.py (SessionLoader.start_cldata): Also parse
610     the size attribute.
611    
612     * Thuban/UI/classifier.py (ClassDataPreviewer.Draw): Added doc-string.
613     Also, now there is a return value that indicates whether the drawing
614     size exceeded the given rect extent and if so the new extent.
615     Finally, point objects are drawn depending on the size. If either
616     the width or height is exceeded, the new extent is returned.
617     (ClassRenderer.Draw): Now when calling the previewer drawing function,
618     evaluate the return value and, if not None, adapt the grid widget size
619     accordingly and redraw again.
620    
621     * Thuban/UI/baserenderer.py (BaseRenderer.draw_shape_layer_incrementally):
622     If the draw function is for points, call it with the size as additional
623     parameter.
624     (BaseRenderer.draw_point_shape): Added additional, optional parameter for
625     the size. Compute the radius using the size.
626    
627     * Extensions/importAPR/apr.py (APR_BMkSym.GetThubanProp): Now
628     that Thuban supports size, apply this correctly.
629    
630     * Extensions/importAPR/importAPR.py: Bumped version to 0.1.1.
631    
632     2004-10-03 Jan-Oliver Wagner <[email protected]>
633    
634 jan 2370 * Doc/manual/thuban-manual-de.xml: Started translation of
635     Map chapter.
636    
637 joey 2368 2004-10-01 Martin Schulze <[email protected]>
638    
639     * Extensions/wms/properties.py (wmsProperties.__init__): Extended
640     argument for general use through properties-dialog selector
641    
642     * Thuban/UI/classifier.py: Register properties dialog classes for
643     both provided layer classes/types.
644    
645     * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): The
646     map can be retrieved through the parent which is passed to the
647     constructor anyway and doesn't require an argument of its own,
648     required for the unification of arguments for general use through
649     properties-dialog selector.
650     (MainWindow.OpenOrRaiseDialog): Move the logic for checking
651     whether a dialog is already opened (and raising it to the users
652     attention) and creating a new dialog into a function of its own
653     (MainWindow.OpenLayerProperties): Use the new OpenOrRaiseDialog()
654     method
655     (MainWindow.OpenLayerProperties): Utilise the new ClassMapper for
656     global registration of properties dialog classes (which are indeed
657     layer-specific).
658    
659     * Thuban/UI/classifier.py (Classifier.__init__): Unify arguments
660     for general use through properties-dialog selector, the map can be
661     retrieved through the parent and doesn't require an argument of
662     its own.
663    
664     * Extensions/wms/wms.py: Register the properties dialog class for
665     the provided WMS layer
666    
667 jan 2358 2004-09-28 Jan-Oliver Wagner <[email protected]>
668    
669     New feature: Registry for Extensions.
670    
671     * Thuban/UI/extensionregistry.py: This module defines a registry for
672     Extensions.
673    
674     * Thuban/UI/about.py (About.__init__): Added description
675     of the registered extensions with all of the information.
676    
677     * Thuban/Model/extension.py (Extension): Improved doc-string.
678    
679     * Extensions/gns2shp/gns2shp.py, Extensions/importAPR/importAPR.py,
680     Extensions/bboxdump/bboxdump.py, Extensions/profiling/profiling.py,
681     Extensions/wms/wms.py: Added registration of the extension.
682    
683 bernhard 2352 2004-09-27 Bernhard Reiter <[email protected]>
684    
685     More fixes to svgexport to make used ids unique and
686     conforming to XML's Name production.
687    
688     * Extensions/svgexport/test/test_svgmapwriter.py: Added new tests
689     test_xml_id_constraints(), test_make_ide_nosetbaseid() and
690     test_make_id_nonintegersetid(). Switched SetID and SetBaseID.
691     Added Bernhard R. as author.
692     * Extensions/svgexport/svgmapwriter.py (make_id): Using "_" as
693     concatenation char now (makes test_make_ide_nosetbaseid() valid).
694     Also transform second id part with "%d" and catch the TypeError
695     to raise SVGMapWriterError (making test_make_id_nonintegersetid() ok).
696     Corrected typo inBernhard's author line.
697     (SetBaseID): Return the transformed base id. Transform characters
698     which are not alnum() or in ".-_" to binascii.b2a_hex(). Added
699     import binascii. If to be set string starts with "xml" or so, add "t".
700     (draw_shape_layer_incrementally): use the returned value of SetBaseID
701     for used_baseids checks.
702    
703 bh 2351 2004-09-25 Bernhard Herzog <[email protected]>
704    
705     * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
706     Remove a debug print and some tab characters.
707    
708 bernhard 2350 2004-09-25 Bernhard Reiter <[email protected]>
709    
710     * Extensions/svgexport/svgmapwriter.py: Added Bernhard R. as Author.
711     (SetBaseID, SetID, make_id): Improved docstring comments to explain
712     the interaction of the three functions and the XML id contrains.
713    
714 bernhard 2352
715 jan 2346 2004-09-23 Jan-Oliver Wagner <[email protected]>
716    
717 jan 2349 * Doc/ThubanModel.xmi: New. UML file for Thuban Model
718     Module.
719    
720     * Doc/README: Added info on ThubanModel.xmi.
721    
722     2004-09-23 Jan-Oliver Wagner <[email protected]>
723    
724 jan 2346 * Doc/README: New. Some info about how to generate technical
725     documentation from the source code.
726     This text was send to the Thuban developer mailing list on
727     September 21st 2004 by Bernhard Reiter.
728    
729 bernhard 2344 2004-09-21 Bernhard Reiter <[email protected]>
730    
731     Improved the svgexport to only use unique ids. Will issues
732     an error message dialoge when two layer names are the same.
733     ShapeIDs are now added with a dash within the svg ids.
734    
735     * Extensions/svgexport/svgmapwriter.py (SVGMapWriterError): New.
736     * Extensions/svgexport/test/test_svgmapwriter.py: Added imports
737     (TestSVGRenderer): New test class with test_make_in() and
738     test_check_for_layer_name_clash()
739     * Extensions/svgexport/svgmapwriter.py (SVGRenderer): Fixed __init__()
740     and draw_shape_layer_incrementally() to not use a baseid twice,
741     satisfying test_check_for_layer_name_clash()
742     (VirtualDC.make_id): Use a dash between baseit and id, satisfies
743     test_make_in().
744     * Extensions/svexport/svgsaver.py: Import SVGMapWriterError, wxOK
745     and wxICON_HAND.
746     (write_to_svg): Put dc and rendering in a try statement and on
747     catching SVGmapWriterError notify the user and delete the target file.
748    
749 bernhard 2343 2004-09-20 Bernhard Reiter <[email protected]>
750    
751     * Model/base.by, Model/layer.py: Fixed typos in docstrings.
752    
753 jschuengel 2342 2004-09-03 Jan Schüngel <[email protected]>
754    
755     * Extensions/umn_mapserver/mapfile(MF_Class.add_thubanstyle): Fix a
756     small bug with the line color. Now the line color will now only set
757     if it is set in Thuban an not Transparent.
758    
759     * Extensions/umn_mapserver/mf_export(tblayer_to_map): Fixed a bug with
760     deleting the layers from mapfile. Now all layers will delete backwards
761     from the last.
762    
763 silke 2339 2004-08-20 Silke Reimer <[email protected]>
764 silke 2338
765 silke 2339 * Thuban/Model/layer.py:
766     Fixes bug in projection handling: Otherwise very large region might not
767     have valid values in the layer's projection.
768    
769     2004-08-20 Silke Reimer <[email protected]>
770    
771 silke 2338 * Thuban/UI/about.py:
772     small changes to be consistent with coding style.
773    
774 joey 2337 2004-08-13 Martin Schulze <[email protected]>
775    
776     * Extensions/wms/test/test_ogclib.py (TestOGCLib.compare_URLs):
777     Adjusted a comment
778    
779 silke 2335 2004-08-11 Silke Reimer <[email protected]>
780 silke 2334
781 silke 2335 * Thuban/UI/about.py: Small changes to encoding related stuff to avoid
782     too many and too enhanced imports of locale
783    
784 silke 2334 2004-08-10 Silke Reimer <[email protected]>
785    
786     * Thuban/UI/about.py: Fixed encoding problem of about dialog: Added
787 silke 2339 function unicodeToLocale() to convert special characters to users
788     locale encoding
789 silke 2334
790 jan 2333 2004-08-10 Jan-Oliver Wagner <[email protected]>
791    
792     * Doc/technotes/coding_guidelines.txt: Added rule 'Method names start with
793     lower case letter'
794    
795 jschuengel 2331 2004-08-09 Jan Schüngel <[email protected]>
796    
797     * ChangeLog: Rewrite the last ChangeLog entry to follow
798     the standard way.
799    
800     * Extensions/umn_mapserver/mapfile: Moved the import AnnotationLayer to
801     the function where it is needed, because it don't works if it stands
802     at the beginning.
803     (MF_Layer.__init__): Removed the extra numclassed variable. Now
804     numclasses from the mapscript will be used.
805     (MF_Layer.get_index): New. Return the index of the layer in mapfile.
806     (MF_Layer.set_classes): New. A Classlist will be set to the layer.
807     (MF_Layer.set_metadata): New. A Metadata mapscript object will set.
808     (MF_Layer.remove_allclasses): New. All class of the layer will remove.
809     (MF_Map.create_new_layer): New. A new Layer is created and associated
810     with the mapscript object.
811     (MF_Map.set_layerorder): New. The Layer order like in thuban is set in
812     the mapscript.
813     (MF_Map.add_thubanlayer): Now a new layerobj is created if no one is
814     linked to the layer in thuban, else the layerobject linked to the
815     thubanlayer will be used.
816     AnnotationLayer will now store the filename of the shapefile.
817     (MF_Map.remove_layer): If a layer is removed the associated object
818     must be set new.
819    
820     * Extensions/umn_mapserver/mf_export.py(tb_layer_to_map): Add all
821     layers which are exists in thuban to the mapobj. All removed Layers
822     will be removed from the mapobj.
823     Added comments to all functions.
824     (thuban_to_map): No layer will be removed here.
825    
826     * Extensions/umn_mapserver/mf_handle.py
827     (_has_umn_mapobj_and_selectedlayer): Activating the layer menu. Now
828     Layersettings for the mapserver kann be edited.
829    
830     * Extensions/umn_mapserver/mf_import.py: Now all layers which are
831     imported, will be linked with the associated MF_Layer.
832     (import_mapfile): All layers, which are not selected, will be removed.
833     Disable the "import layer from mapfile" menu option.
834    
835     * Extensions/umn_mapserver/sample/iceland.map: Set the status of the
836     Annotation Layer from DEFAULT to OFF. The DEFAULT setting turns the
837     layer on permanently.
838    
839 jschuengel 2323 2004-08-03 Jan Schüngel <[email protected]>
840    
841 jschuengel 2331 * Extensions/umn_mapserver/mapfile.py(MF_Metadata.remove_allmetadata):
842     New. This function removes all metadata
843     (MF_Layer.set_group): New. Set the group setting.
844     (MF_Layer.get_group): New. Get the group setting.
845     (MF_Map): Removed the extra numlayers variable, used the mapscript
846     parameter instead.
847     (MF_Map.get_numlayers): New. This get numlayers.
848     (MF_Map.remove_all_layers): New. Removes all layers from the mapobj.
849 jschuengel 2323 (MF_Map.add_thubanlayer): Replaced the exception handling by a check
850     if the object is an instance. Also added the annotation layer here to
851     export, but only the layer is created in the mapfile.
852    
853 jschuengel 2331 * Extensions/umn_mapserver/mf_export.py(export_mapfile): Removed
854     the check if a mapobj exist, because its not needed anymore. The
855     export function is only available if a mapobj exist.
856     Use the new function to remove all layers.
857 jschuengel 2323
858 jschuengel 2331 * Extensions/umn_mapserver/mf_handle.py(Layer_Dialog): Added a group
859     option and the metadata button. The layer dialog is temporary disabled.
860     (Metadata_CustomDataTable): Added some functions to show the grid
861 jschuengel 2323 correct.
862    
863 jschuengel 2331 * Extensions/umn_mapserver/mf_import.py: Moved the code for showing
864     the number of layer from import_mapfile to this function.
865     (AnnotationLayer): New. This Class shows the Annotation layer in
866     thuban. The layer don't do anything. It's only to show the layer
867     and to save the layer order.
868     (add_annotationlayer): New. Import an annotation layer to thuban.
869     (select_layer2import): New. Import only layers to thuban and not
870     the other settings like projection or scalebar.
871     (create_new_mapfile): Moved the _has_umn_mapobj function and the
872     create_new_mapfile functions from mf_handle.py to mf_import.py.
873 jschuengel 2323
874     * Extensions/umn_mapserver/sample/iceland.map: Added the group
875     parameter to the roads and cultural layers. Also added a new
876     Annotation Layer for the cultural points.
877    
878     * Extensions/umn_mapserver/sample/iceland.html: Added the select
879     option for the annotation layer.
880    
881     * Extensions/umn_mapserver/sample/index.html: Added the start
882     parameter for the annotation layer.
883    
884 jan 2315 2004-08-01 Jan-Oliver Wagner <[email protected]>
885    
886     * Doc/manual/thuban-manual-de.xml (Chapter Session Management):
887     translation completed.
888    
889     * Doc/manual/thuban-manual.xml (Chapter Session Management):
890     Fixed unprecise description for Save Session.
891    
892 jan 2312 2004-07-31 Jan-Oliver Wagner <[email protected]>
893    
894     Started translation of Users Manual into german.
895    
896     * Doc/manual/thuban-manual-de.xml: New. German Users Manual.
897    
898     * Doc/manual/Makefile: Added build instructions for german
899     users manual.
900    
901     * Doc/manual/thuban-manual.xml: Minor corrections in Introduction.
902    
903 jschuengel 2308 2004-07-28 Jan Schüngel <[email protected]>
904    
905     * Extensions/umn_mapserver/mapfile.py(MF_Metadata): Changed all class
906     functions. Now all metadata will handle by the function and its not
907     needed to initialize it from outside. Therefor the associated mapobj
908     will be stored in the Metadata Object. So we can use the special
909     functions from the associated mapobj to get the Metadata.
910     Therefor all initialization code for the metadata is removed from the
911     other classes.
912     (MF_Layer): Added a function to get the metadata object.
913     (MF_Map): Added a function to set the mappath, the path where
914     the mapfile ist stored.
915    
916     * Extensions/umn_mapserver/mf_export.py(thuban_to_map): Changed the code
917     to set the extent in the mapfile. Now the code is set by the displayed
918     data in the Thuban-view.
919     (export_mapfile): The shapepath is now set empty, until relative
920     pathnames are supported.
921    
922     * Extension/umn_mapserver/mf_handle.py: Added a dialog to handle
923     metadata. Yet only mapfile metadata are supported. Layer and class
924     supported are not implemented.
925     Added a dialog to handle layer informations. The dialog only shows the
926     selected layer at the moment.
927    
928     * Extensions/umn_mapserver/mf_import.py(import_mapfile): Changed the
929     code for setting the extent in thuban. Now the extent is set to the
930     given extent from the mapfile.
931     Fixed a logical mistake. Now the extent is set when realy a layer is
932     loaded, and not if one is selected to load.
933    
934     * Extensions/umn_mapserver/sample/iceland.html: Added code to zoom and
935     move the shown map in the browser.
936    
937     * Extensions/umn_mapserver/sample/iceland.map: Added a new metadata
938     line to the mapobj and added metadata to the political layer.
939    
940     * Extensions/umn_mapserver/test/test_mapserver.py: Changed the test
941     for Metadata.
942    
943 joey 2300 2004-07-26 Martin Schulze <[email protected]>
944    
945     * Thuban/Lib/classmapper.py (ClassMapper.has): Added the new
946     ClassMapper
947    
948     * test/test_classmapper.py (TestMapping.test_mapper): Added a Test
949     case for the new ClassMapper
950    
951    
952 bh 2296 2004-07-22 Bernhard Herzog <[email protected]>
953    
954 bh 2297 * Thuban/UI/viewport.py (ViewPort.VisibleExtent): New. Return the
955     visible extent of the map in projected coordinates
956    
957     * test/test_viewport.py (SimpleViewPortTest.test_default_size)
958     (SimpleViewPortTest.test_init_with_size): Add some VisibleExtent()
959     tests.
960     (SimpleViewPortTest.test_visible_extent): New. The real test for
961     VisibleExtent()
962    
963     2004-07-22 Bernhard Herzog <[email protected]>
964    
965 bh 2296 * test/test_viewport.py: Use support.run_tests as the main
966     function when running asa script.
967    
968 jschuengel 2295 2004-07-22 Jan Schüngel <[email protected]>
969    
970     * Extensions/umn_mapserver/mf_export.py: Added "import os"
971     Removed the old "import Thuban.UI.mainwindow" code.
972     (tbextent_to_map): Removed the extra function and at the code direct
973     to "thuban_to_map" function.
974     (write_creatorcomment): Added. Now a short comment is added to the
975     beginning of an generated mapfile.
976     (export_mapfile): Now the Path and filename are saved in to variables,
977     and not together in one variable. This is needed for the new
978     write_creatorcomment function.
979    
980     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Added the
981     import module "re". Also added Range and the ClassGroupRange import
982     from Thuban. Both are needed for the new range expression import.
983     (create_rangeexpression): Added. Creates a Range Expression in Thuban
984     style from a given mapfile expression.
985     (added_rasterlayer): Make some small code changes. The shapepath is
986     now stored in an extra variable and the clazz_name is set empty if no
987     class name set in the mapfile.
988     Changed the Error message for Range Expressions, becaus the new
989     function create a error string which will be shown in the dialog.
990    
991     * Extensions/umn_mapserver/test/test_mapserver.py: Added a test for the
992     range expression import.
993 jan 2312
994 jan 2291 2004-07-21 Jan-Oliver Wagner <[email protected]>
995    
996     * Extensions/umn_mapserver/README: Added hint that
997     installation as root can be avoided. Removed all tabs.
998    
999 bh 2289 2004-07-16 Bernhard Herzog <[email protected]>
1000    
1001     * test/test_viewport.py
1002     (ViewPortTest.test_changing_map_projection): Check that changing
1003     the projection of an empty map shown in a viewport doesn't lead to
1004     exceptions in the viewport's handler for the
1005     MAP_PROJECTION_CHANGED messages
1006    
1007     * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
1008     try to keep the same region visible when the map actually contains
1009     something
1010    
1011 jschuengel 2288 2004-07-15 Jan Schüngel <[email protected]>
1012    
1013     * Extensions/umn_mapserver/mapfile.py: Added a function to get the
1014     mappath directly from the mapobj. Is needed because of the changes
1015     in mf_import.py.
1016     (MF_Layer.add_thubanclass): Added a new comment.
1017     (MF_Map.set_extent): Fixed a bug with exporting empty mapobj. If the
1018     mapobj is empty there is no extent get from thuban an so no one can
1019     set to th mapobj.
1020    
1021     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Updated
1022     the discription.
1023     Split the funktion in to three smaller ones. The new functions are
1024     add_rasterlayer, add_polygonlayer and select_layer2import.
1025     Removed the mapfilepath and filepath initialisation, because its know
1026     include in the new functions.
1027     Now nothing will be imported if cancel is pressed in the
1028     layer choice dialog.
1029    
1030 jschuengel 2285 2004-07-14 Jan Schüngel <[email protected]>
1031    
1032     * Extensions/umn_mapserver/mapfile.py: Added ClassGroupDefault to
1033     import.
1034     (MF_Symbolset): Removed the extra variable for numsymbols.
1035     (MF_Class.__init__): Added a comment to the exception clause.
1036     Removed the extent init, because it was not needed anymore.
1037     (MF_Layer.add_thubanclass): Added the code to set the class name to
1038     the expression value from thuban if no label is defined.
1039     Added the code to export Range expressions from thuban to the mapfile.
1040     (MF_Map.set_extent): Removed the exception and replace it by some if
1041     code. If the size of a map is not defined the size will be set to 1,1.
1042     This is necessary because if the extent is set, mapscript checks if
1043     the size is greater than zero.
1044     (MF_Web): Added the get and set function for the template.
1045    
1046     * Extensions/umn_mapserver/mf_export.py: Added the function to check
1047     if a mapobject exists and used it to set the status of the menu items.
1048     If no mapfile exists the settings could not be edditied.
1049     Define after which menuitem the exportitem will include.
1050    
1051     * Extensions/umn_mapserver/mf_handle.py: Removed the import
1052     Thuban.UI.mainwindow clause, because it is not needed.
1053     Added the command Refresh() to all "OnChangeColor()" functions,
1054     because the color preview window was not updated on a color change.
1055     Added the function to check if a mapobject exists and used it to set the
1056     status of the menu items. If no mapobject exists the settings could not
1057     be edditied.
1058     (Map_Dialog): Moved the imagetype selector from the
1059     Outputformat_Dialog to Map_Dialog and removed Outputformat_Dialog.
1060     (Web_Dialog): Removed the name label and added the template textbox.
1061    
1062     * Extensions/umn_mapserver/mf_import.py (import_mapfile): Replace
1063     the exception handling on loading the layers by an if statement. It
1064     is not necessary to us the exception there.
1065     The Filepath creation now use os.path.join to build the path.
1066    
1067     * Extensions/umn_mapserver/test/test_mapserver.py: Moved the testMap
1068     definition from global to the setUp function. Now the testMap will
1069     initialize new on each test.
1070    
1071     * Extensions/umn_mapserver/sample/iceland.map: Include three new
1072     classes in the Line Layer, to test logical Expressions.
1073     Set the status of the class "Point9" in the Point Layer to off
1074    
1075 bh 2278 2004-07-13 Bernhard Herzog <[email protected]>
1076    
1077     * Thuban/UI/baserenderer.py
1078     (BaseRenderer.render_map_incrementally): Fix a logic bug in the
1079     optimization that tries not to draw layers under a raster layer.
1080     The bug was harmless. All it effectively did was to produce The a
1081     strange messages about not being able to draw Layer instances for
1082     all vector layers below a raster layer which would be invisible
1083     anyway because the raster layer currently always covers the entire
1084     window
1085    
1086 jschuengel 2277 2004-07-08 Jan Schüngel <[email protected]>
1087    
1088     * Extensions/umn_mapserver/mapfile.py: Added code to generade and get
1089     a list of supported outputformats. This formats are not alle supported
1090     because there is no possibility to get the outputformat without the
1091     name known. Make some formal changes to the code.
1092     (MF_Map.set_name()): Fixed a bug if the name is None.
1093    
1094     * Extensions/umn_mapserver/mf_handle.py: Removed the image_type import
1095     statement, because its not needed anymore. The Outputformat is now
1096     given as string from the object. Make some formal changes to the code.
1097    
1098     * Extensions/umn_mapserver/test/test_mapserver.py: Added new test for
1099     most of the new setting which were added during the last changes.
1100     Removed the MF_Size Test.
1101    
1102     * Extensions/umn_mapserver/test/test.map: Added a new class to the
1103     cultural Layer to test expressions and the the status of that layer
1104     from on to default.
1105     Changed the data path the the correct Thuban Data
1106     Added the Outputformat Object and Symbol Object
1107    
1108 jschuengel 2272 2004-07-07 Jan Schüngel <[email protected]>
1109    
1110     * Extensions/umn_mapserver/mapfile.py: Added some new
1111     settings to edit (outputformat, label, imagetype)
1112    
1113     * Extensions/umn_mapserver/mf_handle.py: Added some setting to
1114     the Label Dialog and add the OutputDialog.
1115     Make some changes to the code order.
1116    
1117 jschuengel 2269 2004-07-06 Jan Schüngel <[email protected]>
1118    
1119     * Extensions/umn_mapserver/mapfile.py: Added the symbolObj, pointObj
1120     and line Obj and add the scalebar_status_type, scalebar_style_type and
1121     scalebar_position_type.
1122     Added the symbol- and symbolsetObject (MF_Symbol,MF_Symbolset). The
1123     are only used to create a Symbol like the circle in Thuban.
1124     Added the scalebarObject (MF_Scalebar)
1125     (MF_Class): Added set_status and get_status.
1126     (MF_Layer.add_thubanclass): Added code to set the class status
1127     (MF_Map): Added code to handle the symbols and scalebar
1128     (MF_Label): Added the set_partials and get_partials functions
1129    
1130     * Extensions/umn_mapserver/mf_export.py: Added MF_Symbol to import
1131     from mapfile. Added a function to create a circle object like the one
1132     from thuban if no one exists.
1133    
1134     * Extensions/umn_mapserver/mf_handle.py: All colors are now set when
1135     press ok in the assosiated dialog and not at the end of the
1136     colordialog.
1137     Added the Dialog for the Scalebar.
1138     (Label_Dialog): Added the offset option
1139    
1140     * Extensions/umn_mapserver/mf_import.py: Added code to import the
1141     status of the Classes.
1142     Fixed a bug with the projection. Now the to_meter parameter will be
1143     added to the Projection only if it doesn't exists.
1144    
1145 jschuengel 2264 2004-07-01 Jan Schüngel <[email protected]>
1146    
1147     Added the functionality to handle the content thuban is not
1148     able to handle directly.
1149    
1150     * Extensions/umn_mapserver/mf_handle.py: New. This module extents
1151     Thuban with the possibility to edit the mapfile content.
1152    
1153     * Extensions/umn_mapserver/mf_import.py: Added the possibility
1154     to import mapfiles without any layer selected. So it is possible
1155     to edit the other settings in a mapfile.
1156     (import_mapfile): Added code to use the editing functions.
1157     Added the possibility to import the projection to a layer if one
1158     is defined.
1159     Status settings (On,Off) will now set in thuban (visible, invisible).
1160     fixed a bug with with classnames. If no classname is set in mapfile
1161     the value in Thuban will set to the expression.
1162    
1163     * Extensions/umn_mapserver/mf_export.py(export_mapfile): Added the
1164     possibility to save a new mapfile or use the old one which is
1165     imported or new created.
1166     Added code to use the editing functions.
1167     Remove some not needed import statements
1168    
1169     * Extensions/umn_mapserver/mapfile.py: Added new types which are
1170     need for the editing functions.
1171     Added needed set-functions for the editing functions.
1172     Added the possibility to export rasterimages.
1173     Added new classes (MF_Web, MF_Label, MF_Legend, MF_Symbol,
1174     MF_SymbolSet). MF_Symbol and MF_SymbolSet are not needed at the
1175     moment.
1176     (MF_Class.set_thubanstyle): Now point layers will set to a default
1177     symbol to show a circle in mapserver and not only a 1px dot.
1178     (MF_Style.__init__): Fixed a bug with the color. Color was not set
1179     correct before.
1180     (MF_Size): Removed, because it is not needed.
1181    
1182     * Extensions/umn_mapserver/README: Added the hints to use the
1183     export and editing functions, too.
1184    
1185     * Extensions/umn_mapserver/sample/iceland.map: Added the
1186     new parameter "UNITS METERS".
1187     Change the political layer to status OFF.
1188    
1189     * Extensions/umn_mapserver/sample/README: Added some
1190     more details to setup the sample in the MapServer.
1191    
1192 bernhard 2256 2004-06-26 Bernhard Reiter <[email protected]>
1193    
1194     * Extensions/svgexport/test/test_svgmapwriter.py:
1195     Removed class VFile and used standard StringIO instead.
1196    
1197 jschuengel 2255 2004-06-23 Jan Schüngel <[email protected]>
1198    
1199     Add the export function to the umn_mapserver extension.
1200    
1201     * Extension/umn_mapserver/mf_export.py: New. This module extents
1202     Thuban with the possibility to export the Thuban content.
1203    
1204     * Extensions/umn_mapserver/mapfile.py: Expand the classes to use
1205     with the export module. Especially added the possibility to
1206     add thuban objects directly to the map objects.
1207    
1208     * Extensions/umn_mapserver/mf_import.py: Removed the wxCHANGE_DIR,
1209     because of the hint from Bernhard Herzog.
1210     Corrected the handling of absolute pathnames.
1211     Changed the Text of the Menu-Item, now the beginning is upper case.
1212    
1213     * Extensions/umn_mapserver/README: Added the --with-tiff statement.
1214    
1215 jschuengel 2250 2004-06-16 Jan Schüngel <[email protected]>
1216 jschuengel 2242
1217 jschuengel 2250 Add a sample and make some changes.
1218    
1219     * Extension/umn_mapserver/mf_import.py: Changed the wxPython.wx
1220     import from * to explicit used statements. Changed the
1221     Thuban.UI.mainwindow import phrase, too.
1222     (import_mapfile):Corrected a clerical mistake.
1223     Added wxCHANGE_DIR in OpenFile Dialog.
1224     Added a MultipleChoiceDialog, to select the layers to load from
1225     mapfile into thuban. Thereby the projection is only set if one layer
1226     is selected.
1227     Added the possibility to handle relative pathnames which uses
1228     up-level references.
1229     Removed some doubled code.
1230     Corrected an error with integer values used as label in thuban
1231     ClassGroup.
1232    
1233     * Extensions/umn_mapserver/sample: New.
1234    
1235     * Extensions/umn_mapserver/sample/README: New. Describes the
1236     usage of the sample files.
1237    
1238     * Extensions/umn_mapserver/sample/iceland.map: New. This is
1239     a suitable .map-file for the iceland data.
1240    
1241     * Extensions/umn_mapserver/sample/index.html: New. The template
1242     for the mapfile.
1243    
1244     * Extensions/umn_mapserver/sample/iceland.html: New. Initialisation
1245     file for the Iceland Application on web.
1246    
1247     * Extensions/umn_mapserver/README: Corrected a inaccuracy and added
1248     some details.
1249    
1250     * Extensions/umn_mapserver/test/test_mapserver
1251     (mapserver_import_Test_generalClasses.test_MF_Color):
1252     Corrected the thubancolor test.
1253    
1254     2004-06-15 Jan Schüngel <[email protected]>
1255    
1256 jschuengel 2242 * Extensions/umn_mapserver/README: New. Install instruction.
1257    
1258 bernhard 2240 2004-06-14 Bernhard Reiter <[email protected]>
1259    
1260     * libraries/thuban/cpl_mfile.h: Added copyright header.
1261    
1262     * libraries/thuban/ cpl_mfile.cpp, cpl_mfile.h: Added non-protecting
1263     Free Software License so that it is most useful with gdalwarp
1264     and bmpdataset.
1265    
1266 bh 2239 2004-06-14 Bernhard Herzog <[email protected]>
1267    
1268     * Thuban/UI/multiplechoicedialog.py (__version__): Add missing
1269     import of wxPython.wx itself (as opposed to the contents of
1270     wxPython.wx). For some reason wxPython.wx is available as
1271     wxPython.wx.wx in at least some 2.4 releases. Fixes RT#2482
1272     wrt. wxPython 2.4.
1273    
1274 jschuengel 2238 2004-06-10 Jan Schüngel <[email protected]>
1275    
1276     Initial version of new extension "umn_mapserver". This extension aims
1277     to manage configuration for the UMN MapServer application. This
1278     inital version just imports the .map-files and displays all, Thuban is
1279     capable of.
1280    
1281     * Extensions/umn_mapserver, Extensions/umn_mapserver/test: New.
1282    
1283     * Extensions/umn_mapserver/test/README: New. Describes how to run the
1284     tests.
1285    
1286     * Extensions/umn_mapserver/test/test.map: New. This is a test
1287     .map-file for automated tests of the umn_mapserver extension of
1288     Thuban.
1289    
1290     * Extensions/umn_mapserver/test/test_mapserver.py: New. Tests for
1291     UMN Mapserver classes.
1292    
1293     * Extensions/umn_mapserver/__init__.py: New. Init to make this
1294     directory a package.
1295    
1296     * Extensions/umn_mapserver/mapfile.py: New. Classes to represent
1297     '.map'-file objects.
1298    
1299     * Extensions/umn_mapserver/mf_import.py: New. This module extends
1300     Thuban with the possibility to handle UMN MapServer mapfiles.
1301    
1302 bh 2230 2004-06-03 Bernhard Herzog <[email protected]>
1303    
1304     * Thuban/Model/layer.py (Layer.TreeInfo): Convert the bounding box
1305     to a tuple before using it as arguments to the % operator. This
1306     fixes the formatting issue filed in RT#2239 on 2004-01-13 and
1307     reported today on thuban-list by Jan Schüngel
1308    
1309     * test/test_layer.py (TestLayerModification.setUp): Save the
1310     filename as an instance variable so we can refer to it in tests
1311     (TestLayerModification.test_tree_info): Uncomment this method
1312     again and make it work. This tests for the formatting issue
1313     filed in RT#2239 on 2004-01-13
1314    
1315 bh 2224 2004-05-28 Bernhard Herzog <[email protected]>
1316    
1317     * Thuban/UI/baserenderer.py: Fix some typos.
1318    
1319 jan 2217 2004-05-18 Jan-Oliver Wagner <[email protected]>
1320    
1321     * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed a bug
1322     by increasing a field size.
1323    
1324 bh 2213 2004-05-17 Bernhard Herzog <[email protected]>
1325    
1326     Update to newest shapelib and get rid of Thuban specific
1327     extensions, i.e. use the new DBFUpdateHeader instead of our
1328     DBFCommit kludge
1329    
1330     * libraries/shapelib/shpopen.c: Update to version from current
1331     shapelib CVS.
1332    
1333     * libraries/shapelib/shapefil.h: Update to version from current
1334     shapelib CVS.
1335    
1336     * libraries/shapelib/dbfopen.c: Update to version from current
1337     shapelib CVS.
1338     (DBFCommit): Effectively removed since shapelib itself has
1339     DBFUpdateHeader now which is better for what DBFCommit wanted to
1340     achieve.
1341     We're now using an unmodified version of dbfopen.
1342    
1343     * setup.py (extensions): Add the HAVE_UPDATE_HEADER macro with
1344     value '1' to the Lib.dbflibc extension. This simply reflects the
1345     shapelib and pyshapelib updates
1346    
1347 jan 2211 2004-05-16 Jan-Oliver Wagner <[email protected]>
1348    
1349     Finished introduction of Menu.FindOrInsertMenu.
1350    
1351     * Extensions/drawshape/drawshape.py: Add the command
1352     to the experimental menu additionally to the toolbar.
1353    
1354     * Extensions/svgexport/svgsaver.py: Use FindOrInsertMenu() instead of
1355     finding menu on its own.
1356    
1357     * Doc/manual/thuban-manual.xml: updated sample file
1358     to use FindOrInsertMenu().
1359    
1360     * Examples/simple_extensions/hello_world.py: Use FindOrInsertMenu()
1361     instead of finding menu on its own.
1362    
1363 jan 2206 2004-05-11 Jan-Oliver Wagner <[email protected]>
1364    
1365     * test/test_menu.py (MenuTest.test): Added testing
1366     of method Menu.FindOrInsertMenu.
1367    
1368 jan 2204 2004-05-10 Jan-Oliver Wagner <[email protected]>
1369    
1370     Introduce and use Menu.FindOrInsertMenu.
1371    
1372     * Thuban/UI/menu.py (Menu.FindOrInsertMenu): New. Find a
1373     given menu or, if not found, insert it.
1374    
1375     * Extensions/bboxdump/bboxdump.py, /Extensions/gns2shp/gns2shp.py,
1376     /Extensions/importAPR/importAPR.py, Extensions/profiling/profiling.py,
1377     /Extensions/wms/wms.py: Use FindOrInsertMenu() instead of finding
1378     menu on its own.
1379    
1380 jan 2201 2004-05-06 Jan-Oliver Wagner <[email protected]>
1381    
1382     Introduce a abstract ColorDialog class and remove
1383     and outdated file.
1384    
1385     * Thuban/UI/proj4dialog.py: Removed. It is has been
1386     replaced by projdialog for quite a while and is not used
1387     anymore.
1388    
1389     * Thuban/UI/colordialog.py: New. Abstraction for color selection
1390     dialog(s).
1391    
1392     * Thuban/UI/classifier.py (SelectPropertiesDialog.__GetColor):
1393     Now calls the abstract ColorDialog instead of wxColourDialog.
1394     This also removed the dependency to Color class conversion
1395     from this function.
1396    
1397 frank 2197 2004-05-04 Frank Koormann <[email protected]>
1398    
1399     * Extensions/bboxdump/__init__.py: Fixed string left over from
1400     copying.
1401    
1402     * Extensions/bboxdump/bboxdump.py (bboxdump):
1403     Use layer.ShapeStore().AllShapes() to loop over shapes instead of
1404     xrange(layer.NumShapes()). Compile the bboxmessage from a list
1405     of formatted outputs (string.join) instead of appending to the
1406     message. Two progress bar dialogs to report progress on the sometimes
1407     lenghty processing.
1408    
1409 frank 2196 2004-04-22 Frank Koormann <[email protected]>
1410    
1411     New Extension to dump bounding boxes of all shapes of the selected
1412     layer. An optional column can be specified to group the objects,
1413     in this case the bounding box is a union of the separate boxes.
1414     Dump can be displayed in a ScrolledMessageDialog or written to file.
1415     The Extension is simply a combination of available and well tested
1416     Thuban functionality.
1417    
1418     * Extensions/bboxdump/__init__.py: New: Init to make this
1419     directory a package.
1420    
1421     * Extensions/bboxdump/bboxdump.py: New: Dump bounding boxes of
1422     all shapes of the selected layer.
1423    
1424 jan 2192 2004-04-22 Jan-Oliver Wagner <[email protected]>
1425    
1426     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Fixed two
1427     strings to be i18n now.
1428    
1429 jan 2188 2004-04-18 Jan-Oliver Wagner <[email protected]>
1430    
1431     Changing popup menu of legend from direct building
1432     to using the Menu construction as used for the mainwindow.
1433    
1434     * Thuban/UI/mainwindow.py: New method commands: layer_to_top,
1435     layer_to_bottom, layer_visibility
1436     (MainWindow.LayerToTop): New. Put current layer to the top.
1437     (MainWindow.LayerToBottom): New. Put current layer to bottom.
1438     (MainWindow.HideLayer, MainWindow.ShowLayer, _has_visible_map):
1439     Replace 1,0 by True, False.
1440     (MainWindow.ToggleLayerVisibility): New. Toggle visibility of
1441     current layer.
1442     (MainWindow.LayerShowTable): Removed raising of dialog.
1443     (_has_selected_layer_visible): New. Support function.
1444    
1445     * Thuban/UI/legend.py: ID_POP_xxx: removed.
1446     (LegendPanel.__init__): Removed EVT_MENU bindings.
1447     (LegendTree._OnRightClick): Replace direct creation of
1448     menu via wx Classes by applying the menu definition
1449     as of Menu class of menu.py.
1450    
1451 jan 2185 2004-04-16 Jan-Oliver Wagner <[email protected]>
1452    
1453     * Thuban/UI/exceptiondialog.py (ExceptionDialog.dialog_layout): Improved
1454     button string to stronger clearify that Thuban will be closed when hitting
1455     the button.
1456    
1457     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Added docstring.
1458     Now for layers without a ShapeStore a corresponding message is given
1459     to the user, that this layer has no table to show.
1460    
1461 joey 2182 2004-04-15 Martin Schulze <[email protected]>
1462    
1463     * Extensions/wms/layer.py (WMSLayer.setWMSFormat): Need to
1464     recalculate the format for the internal render engine as well.
1465    
1466     * Extensions/wms/properties.py (wmsProperties): First start for a
1467     properties dialog. It's functional for a first selection of
1468     layers, but still has some weired wxWidgets/GTK problems but
1469     beautification can be done later.
1470    
1471     * Extensions/wms/layer.py: Added more documentation
1472     (WMSLayer.getFormats): New: Return list of supported image formats
1473     by the WMS server
1474     (WMSLayer.getLayers): New: Return the list of layer names
1475     supported by the WMS server
1476     (WMSLayer.getLayerTitle): New: Return the title of the named layer
1477     (WMSLayer.getWMSFormat): New: Return the image format that is used
1478     for WMS GetMap requests
1479     (WMSLayer.setWMSFormat): New: Set the image format that is used
1480     for WMS GetMap requests
1481     (WMSLayer.__init__): Move away from using only one layer to using
1482     a list of layers (unsorted at the moment, though).
1483     (WMSLayer.getVisibleLayers): New: Return the list of names for all
1484     visible layers
1485     (WMSLayer.setVisibleLayers): New: Set the list of names for all
1486     visible layers
1487    
1488     * Extensions/wms/wms.py: Moved the WMS layer into layer.py in
1489     order to establish a clean structure.
1490    
1491     * Extensions/wms/layer.py: Moved the WMS layer into a file on its
1492     own in order to establish a clean structure.
1493    
1494 joey 2174 2004-04-13 Martin Schulze <[email protected]>
1495    
1496     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Added
1497     support for oldstyle (WMS 1.0 apparently) image format
1498     specification.
1499    
1500     * Extensions/wms/wms.py (WMSLayer.calcFormat): Reduce the list of
1501     supported graphic formats back to JPEG and BMP, PNG and others are
1502     too *cough* experimental... Sorry, I meant to filter this out
1503     before I committed this part. This should make the WMS extension
1504     run from CVS again.
1505     (wms_dialog): Reset an empty URL to None so that the subsequent
1506     program can depend on this, since the dialog will indeed return an
1507     empty URL, causing another declaration of love by Python.
1508    
1509     * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerBBox):
1510     Whenever a native BoundingBox request cannot be fulfilled, check
1511     whether the requested SRS is EPSG:3426, in which case return the
1512     LatLonBoundingBox values.
1513    
1514     * Extensions/wms/test/test_parser.py
1515     (TestWMSCapabilitiesParser.test_LayerSRS): Added a test for
1516     ignoring AUTO:* SRS.
1517     (TestWMSCapabilitiesParser.test_LatLonBoundingBoxes_as_bboxes):
1518     Added another test method to test whether the LatLonBoundingBox
1519     values will be returned if BoundingBox values are requested with
1520     SRS set to EPSG:3426.
1521    
1522     * Extensions/wms/parser.py (WMSCapabilitiesParser.peekLayers):
1523     Added rudimentary support for non-EPSG SRS, i.e. ignore them for
1524     the moment by placing them into a variable which is currently
1525     unused. Also test whether the EPSG SRS is numerical as it should
1526     be and add an error message if it is not.
1527    
1528     * Extensions/wms/test/sample.xml: Added AUTO:* SRS since they
1529     appear in the real world as well. Since we cannot handle them yet
1530     (OGCLib can't either), we will ignore them for the moment.
1531    
1532     * Extensions/wms/parser.py: Use a variable for denoting the sample
1533     filename
1534     (WMSCapabilitiesParser.peekLayers): Added support for error
1535     messages during grok(). They will be aggregated in an array and
1536     may be displayed later. We may have to add a classification
1537     "Warning" and "Error" to this. That requires more experience,
1538     though, since not every error may be lethal.
1539    
1540     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Raise the
1541     ShowTable() dialog/frame when the user attempts to display it
1542     while it has been opened before already and not closed again.
1543    
1544 joey 2161 2004-04-11 Martin Schulze <[email protected]>
1545    
1546     * Extensions/wms/infodialog.py: Adjusted the class documentation
1547    
1548     * Extensions/wms/wms.py (WMSLayer.__init__, WMSLayer.GetMapImg):
1549     Switch to using Thuban{Begin,End}BusyCursor instead of the pure
1550     wxWidgets variants.
1551     (WMSLayer.__init__): The epsg_id variable is named top_srs now.
1552    
1553     * Extensions/wms/infodialog.py: Added an information dialog that
1554     will display various information about the WMS current resource,
1555     so that additional information such as the title, the abstract,
1556     fees and access constraints can be displayed for the user if they
1557     are documented in the WMS XML.
1558    
1559 joey 2156 2004-04-10 Martin Schulze <[email protected]>
1560    
1561     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Adjusted
1562     string handling. It's "foo".lower() and not lower(foo) without
1563     lower imported from strings or something.
1564    
1565     * Extensions/wms/wms.py (WMSLayer): Incorporated WMSCapabilities
1566     from capabilities.py and parser.py. Implement priority list for
1567     supported graphics formats, take care of wbmp != bmp. PNG, TIFF
1568     and GIF are supported here, but not yet by main Thuban. Hence,
1569     support for them may be removed later. Special contribution to
1570     usability: get wxWidgets to change the cursor when we're waiting
1571     for data from the network so the user won't start to worry. This
1572     causes a redrawing error/warning, though.
1573    
1574     * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Unlink
1575     the DOM object.
1576    
1577     2004-04-01 Martin Schulze <[email protected]>
1578    
1579     * Extensions/wms/capabilities.py: Adjusted documentation
1580     (WMSCapabilities.__init__): Improved documentation, fixed syntax
1581     (WMSCapabilities.saveCapabilities): Only catch IOError when
1582     handling files
1583     (WMSCapabilities.loadCapabilities): Only catch IOError when
1584     handling files
1585     __main__: corrected variable naming
1586     (WMSCapabilities.fetchCapabilities,loadCapabilities): Make this
1587     class a specialisation of WMSCapabilitiesParser as well. Also
1588     execute grok() after loading or fetching capabilities, if that
1589     went well, so that subsequent calls can already access the data.
1590     (WMSCapabilities.getVersion): Export the used version of the
1591     GetCapabilities request, so we can use it for subsequent calls,
1592     i.e. for GetMap requests.
1593     (WMSCapabilities.fetchCapabilities): Added proper error handling
1594     when the GetCapabilities request failed, so that the surrounding
1595     program can act accordingly.
1596    
1597 joey 2146 2004-03-30 Martin Schulze <[email protected]>
1598    
1599     * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerSRS):
1600     Adjusted the getLayerSRS method to return the list of SRSes
1601     extracted from <SRS> elements instead of <BoundingBox> elements.
1602     Added a bit of documentation as well.
1603     (WMSCapabilitiesParser.checkLayerSRS): Removed integrity test
1604     since it was only implemented due to a misunderstanding.
1605    
1606     * Extensions/wms/test/test_parser.py
1607     (TestWMSCapabilitiesParser.test_LayerSRS): Adjust the tests to
1608     reflect the corrected interpretation of the standard: i.e. a layer
1609     does not have to define a BoundingBox for all SRSes it supports.
1610     Hence the <SRS></SRS> specification is authoritative, not the list
1611     of BoundingBoxes.
1612     (TestWMSCapabilitiesParser.test_BoundingBoxes): Added a new test
1613     to ensure None is returned for a non-existing SRS.
1614     (TestWMSCapabilitiesParser.test_grok): Removed test_grok method
1615     since it is not applicable anymore. Listing more SRSes in <SRS>
1616     elements is valid according to the specs.
1617    
1618 bernhard 2140 2004-03-26 Bernhard Reiter <[email protected]>
1619 joey 2146
1620 bernhard 2140 * README: Nicer formatting of text. Improved descriptions.
1621     Reflected wxWidgets name change.
1622    
1623     * Thuban/UI/about.py: Extended copyright to 2004 and added
1624     information about the thuban-devel mailinglist.
1625    
1626 joey 2138 2004-03-24 Martin Schulze <[email protected]>
1627 joey 2120
1628 joey 2138 * Extensions/wms/capabilities.py: Renamed the class to contain
1629     'WMS', also added a linebreak where required
1630    
1631     * Extensions/wms/parser.py: Finally added the XML parser for the
1632     GetCapabilities response.
1633    
1634     * Extensions/wms/test/sample.xml: Adjusted the sample file so that
1635     <SRS> elements match the <BoundingBox> elements, except for the
1636     layer 'beschriftung'.
1637    
1638     * Extensions/wms/test/test_parser.py: Encode non-ascii strings
1639     since Python uses unicode strings internally, otherwise
1640     comparisons will fail. Removed tests for getLayerBBoxSRS() since
1641     the SRS will be calculated anyway and this method is obsoleted by
1642     getLayerSRS(). Denote SRS as strings and not as cardinal numbers.
1643     Move loading the sample file into the setUp method. Added a test
1644     for finding the integrity problem in the sample response.
1645     Improved formatting.
1646    
1647     * Extensions/wms/domutils.py: Added convenience routines for
1648     handling of Document Object Model (DOM) nodes.
1649    
1650     * Extensions/wms/test/test_domutils.py: Added a test for the
1651     domutils module
1652    
1653     2004-03-19 Martin Schulze <[email protected]>
1654    
1655 joey 2120 * Extensions/wms/test/test_parser.py (TestWMSCapabilitiesParser):
1656     Moved path detection and adding into a module of its own,
1657     adjustpath, which exports thubandir as main Thuban directory.
1658    
1659     * Extensions/wms/test/test_ogclib.py (TestWMSLib): Moved path
1660     detection and adding into a module of its own, adjustpath, which
1661     exports thubandir as main Thuban directory. Reorganised the
1662     module in order to support the SkipTest feature for Thuban test
1663     cases.
1664    
1665     * Extensions/wms/test/adjustpath.py: Moved path detection and
1666     adding into a module of its own.
1667    
1668 joey 2115 2004-03-18 Martin Schulze <[email protected]>
1669    
1670     * Extensions/wms/test/test_parser.py: Added another test for
1671     checking whether the WMS XML parser (to be implemented) returns
1672     the information we expect. This requires a sample WMS WML file
1673     (sample.xml) which has been extracted from the frida server and
1674     "improved" manually.
1675    
1676     * Extensions/wms/test/test_ogclib.py: Added legacy code to add the
1677     main Thuban directory to the path in order to be able to import
1678     random modules. Adjusted the PyOGCLib detection to reuse the
1679     information gathered. Also added a note about the PYTHONPATH
1680     environment variable.
1681    
1682     * Extensions/wms/test/test_ogclib.py: The format specification is
1683     a mime-type, not a graphic format, hence image/jpeg wou ld be the
1684     proper format and not JPEG. We'll also have to take care of the
1685     encoding of / as %2F.
1686    
1687 joey 2111 2004-03-16 Martin Schulze <[email protected]>
1688    
1689     * Extensions/wms/test/test_ogclib.py: Added a (hopefully)
1690     comprehensive test for the getMapURL method, built compare URLs
1691     according to the documentation in OGC 01-068r3
1692    
1693     * Extensions/wms/capabilities.py (WMSCapabilities): Added the
1694     class WMSCapabilities to manage capabilites, will incorporate
1695     parsing the capabilities response and provide details for other
1696     classes.
1697    
1698 bh 2105 2004-03-12 Bernhard Herzog <[email protected]>
1699    
1700 bh 2107 Support views in addition to normal tables in the postgis
1701     shapestore
1702    
1703     * Thuban/Model/postgisdb.py
1704     (PostGISShapeStore._fetch_table_information): Add a fallback for
1705     the case where the table name is not in the geometry_columns
1706     table. This is usually the case for views. Also, set
1707     self.shapestore here.
1708     (PostGISShapeStore.ShapeType): No need to query the database all
1709     the time. The shape type is now determined in
1710     _fetch_table_information
1711    
1712     * test/postgissupport.py (PostgreSQLServer.new_postgis_db)
1713     (PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
1714     New parameter to specify views.
1715     (PostGISDatabase.has_data): Also compare the views. New views
1716     parameter
1717     (PostGISDatabase.initdb): Create the views.
1718     (PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
1719     view
1720    
1721     * test/test_postgis_db.py
1722     (TestPostGISShapestorePointFromViews): New. Test a
1723     PostGISShapeStore with a view
1724     (TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
1725     the geometry_column explicitly to test whether that works
1726    
1727     2004-03-12 Bernhard Herzog <[email protected]>
1728    
1729 bh 2105 Final step for explicit id/geometry columns: Loading and saving
1730    
1731     * Resources/XML/thuban-1.1.dtd: New. Derived from thuban-1.0.dtd
1732     with the following changes:
1733     (dbshapesource): Two new attributes id_column and geometry_column
1734    
1735     * Thuban/Model/save.py (SessionSaver.write): Use the new dtd
1736     (SessionSaver.write_session): Use the new namespace
1737     (SessionSaver.write_data_containers): Write the new dbshapesource
1738     parameters
1739    
1740     * Thuban/Model/load.py (SessionLoader.__init__): New namespace for
1741     the new file format version
1742     (SessionLoader.start_dbshapesource): Handle the new db parameters
1743    
1744     * test/test_save.py: Update to the new dtd and namespace
1745     (SaveSessionTest.test_save_postgis): Update the NonConnectionStore
1746     mock object to provide a working IDColumn method.
1747    
1748     * test/test_load_1_0.py: New. Copy of the test_load.py before
1749     today's changes but with the round-trip tests removed.
1750    
1751     * test/test_load_0_9.py: Update doc-string.
1752    
1753     * test/test_load.py: Update all .thuban files to the new dtd and
1754     namespace.
1755     (TestPostGISLayer.file_contents): Add the new dbshapesource
1756     paramters
1757    
1758 bh 2100 2004-03-11 Bernhard Herzog <[email protected]>
1759    
1760 bh 2103 Next step for explicit id/geometry columns: User interaction
1761    
1762     * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
1763     the dialog is constructed. Add combo boxes to select id and
1764     geometry column. Rename some instance variables.
1765     (ChooseDBTableDialog.GetTable): Return id and geometry column
1766     names
1767     (ChooseDBTableDialog.OnTableSelect): New. Event handler for
1768     selections in the table list
1769    
1770     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
1771     and geometry_column
1772    
1773     * Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
1774     parameters for id_column and geometry column of PostGISShapeStore
1775     here as well.
1776    
1777     * Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
1778     (_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
1779     (PostGISConnection.GeometryTables): Use a better query to
1780     determine which relations in the database might be usable for
1781     shapestores. Now supports views as well but is more PostgreSQL
1782     specific
1783     (PostGISConnection.table_columns): New. Somewhat experimental
1784     method to let the db dialogs provide lists of columns to users so
1785     that they can select id and geometry columns.
1786     (PostGISTable.__init__): The default value of the id_column
1787     parameter is now None it still means "gid" effectively, though.
1788     (PostGISTable.IDColumn): New introspection method to return a
1789     column object for the id column
1790     (PostGISShapeStore.GeometryColumn): New introspection method to
1791     return a column object for the geometry column
1792    
1793     * test/test_postgis_db.py
1794     (TestPostGISConnection.test_gis_tables_non_empty):
1795     Removed. Subsumed by the new:
1796     (TestPostGISConnection.test_gis_tables_with_views_and_tables):
1797     New. Tes the GeometryTables and table_columns methods with actual
1798     tables and views.
1799     (PointTests.test_id_column, PointTests.test_geometry_column):
1800     New. tests for the new methods.
1801     (TestPostGISShapestorePoint.setUp)
1802     (TestPostGISShapestorePointSRID.setUp)
1803     (TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
1804     instance variables needed by the new tests
1805    
1806     2004-03-11 Bernhard Herzog <[email protected]>
1807    
1808 bh 2100 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): The row
1809     numbers given to ReadValue are ordinals.
1810    
1811     2004-03-11 Bernhard Herzog <[email protected]>
1812    
1813     Elimiate the requirement for PostGIS tables to have a column
1814     called "gid".
1815    
1816     * Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
1817     id_column to specify which column to use to identify rows. Also
1818     new instance variables id_column and quoted_id_column
1819     (PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
1820     (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
1821     (PostGISTable.SimpleQuery): Use the id column name provided to the
1822     constructor instead of "gid"
1823     (PostGISShapeStore.__init__): New parameter id_column analogously
1824     to PostGISTable.__init__. This parameter is simply passed through
1825     to the base class constructor
1826     (PostGISShapeStore._create_col_from_description): Fix typo in
1827     doc-string
1828     (PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
1829     (PostGISShapeStore.ShapesInRegion): Use the id column name
1830     provided to the constructor instead of "gid"
1831    
1832     * test/postgissupport.py
1833     (PostgreSQLServer.get_default_static_data_db): New static table
1834     landmarks_point_id with an id column != "gid. Update the comments
1835     a bit.
1836     (skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
1837     doc-
1838     (upload_shapefile): New parameter gid_column to use a name other
1839     than "gid" for the column to store the shape ids
1840    
1841     * test/test_postgis_db.py (TableTests): New. Mixin-class
1842     containing all tests previously in TestPostGISTable. The actual
1843     tests are the same but the code is a bit more configurable to
1844     allow for different id columns etc.
1845     (TestPostGISTable): Derive from TableTests now for the actual
1846     tests.
1847     (TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
1848     except that it the landmarks_point_id table to test the id_column
1849     parameter
1850     (PointTests): Extend the doc-string
1851     (TestPostGISShapestorePointExplicitGIDColumn)
1852     (TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
1853     from PointTests to test the explicit id_column parameter. One
1854     tests with the name of the column holding the shape ids, the other
1855     uses PostgreSQL's OID column. For the latter a number of methods
1856     have to be overwritten to make them independent of the actual id
1857     values.
1858    
1859 silke 2095 2004-03-08 Silke Reimer <[email protected]>
1860    
1861     Update debian directory:
1862    
1863     * debian/changelog: Added new version.
1864     * deiban/rules: Updated management of patches (with cbds)
1865     * debian/control: Added cbds to dependencies
1866     * debian/patches/*: New. Adds better support for patches of thuban in
1867     debian
1868     * debian/menu: Syntax of menu changed slightly
1869     * debian/setup.py.patch: removed because it has been moved to
1870     debian/patechs/setup.py.patch
1871    
1872    
1873 bh 2094 2004-02-26 Bernhard Herzog <[email protected]>
1874    
1875     Create the Doc/technotes directory for text files with information
1876     for developers
1877    
1878     * Doc/technotes/README: New. README for the technotes
1879    
1880     * Doc/technotes/coding_guidelines.txt: New. Coding guidelines for
1881     Thuban
1882    
1883     * Doc/technotes/release_process.txt: New. Used to be
1884     HOWTO-Release. Now slightly adapted to technote formatting style.
1885    
1886     * HOWTO-Release: Removed. It's contents are now in
1887     Doc/technotes/release_process.txt
1888    
1889 bh 2089 2004-02-25 Bernhard Herzog <[email protected]>
1890    
1891     * libraries/thuban/wxproj.cpp (get_wx_version): New. Return the
1892     version of wxWindows the module was compiled with so we can check
1893     that against the wxPython version.
1894    
1895     * Thuban/version.py (thuban_branch, thuban_release): New variables
1896     controlling which and how Thuban versions are shown. See the
1897     comments for details.
1898     (verify_versions): Also check that the wx version that wxproj is
1899     compiled against matches that of the wxPython we use at runtime
1900    
1901 bh 2080 2004-02-20 Bernhard Herzog <[email protected]>
1902    
1903 bh 2087 * Extensions/wms/wms.py (epsg_code_to_projection): Use
1904     get_system_proj_file to read the epsg projections. The old way
1905     depended on the current directory being the top Thuban directory.
1906    
1907     2004-02-20 Bernhard Herzog <[email protected]>
1908    
1909 bh 2085 * Extensions/svgexport/test/test_svgmapwriter.py
1910     (TestVirtualDC.test_clippath): Remove a debug print
1911    
1912     2004-02-20 Bernhard Herzog <[email protected]>
1913    
1914 bh 2083 * Extensions/svgexport/__init__.py: New. Turn
1915     Extensions/svgexport into a package.
1916    
1917     * Extensions/svgexport/svgmapwriter.py: Reorder the imports and
1918     doc-string a bit. The doc-string must come first, otherwise it's
1919     not a doc-string. The __future__ import must be the first thing
1920     after the doc-string. Use only double quotes in doc-strings.
1921     Single quotes trip up emacs syntax highlighting if the text
1922     contains apostrophes.
1923    
1924     2004-02-20 Bernhard Herzog <[email protected]>
1925    
1926 bh 2080 * Extensions/svgexport/test/__init__.py,
1927     Extensions/svgexport/test/test_svgmapwriter.py: New. Initial test
1928     suite for svgexport
1929    
1930     * test/runtests.py (find_test_modules): New. Function with the
1931     module finding code from main.
1932     (main): Use find_test_modules to figure out the default test
1933     modules and take modules from Extensions.svgexport.test too.
1934    
1935 bh 2075 2004-02-19 Bernhard Herzog <[email protected]>
1936    
1937 bh 2077 * Thuban/UI/application.py (ThubanApplication.OnInit): Make sure
1938     the mainwindow has a reference to the map of the initial session.
1939     This fixes a bug introduced with the fix for RT#2245
1940    
1941     2004-02-19 Bernhard Herzog <[email protected]>
1942    
1943 bh 2075 * Extensions/svgexport/svgsaver.py,
1944     Extensions/svgexport/svgmapwriter.py,
1945     Extensions/svgexport/maplegend.py: Added again. This time in the
1946     correct place.
1947    
1948 bh 2070 2004-02-17 Bernhard Herzog <[email protected]>
1949    
1950 bh 2073 Fix for RT#2245
1951    
1952     * Thuban/UI/application.py (ThubanApplication.OnInit): Initialize
1953     instance variables before trying to create any windows. Creating
1954     windows can start an event loop if e.g. message boxes are popped
1955     up for some reason, and event handlers, especially EVT_UPDATE_UI
1956     may want to access things from the application.
1957     (ThubanApplication.maps_changed): The mainwindow may not have been
1958     created yet, so check whether it has been created before calling
1959     its methods
1960    
1961     * Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
1962     have a map
1963    
1964     2004-02-17 Bernhard Herzog <[email protected]>
1965    
1966 bh 2070 * test/test_svgmapwriter.py, Extensions/svgsaver.py,
1967     Extensions/svgmapwriter.py, Extensions/maplegend.py,
1968     extensions/svgexport/svgsaver.py,
1969     extensions/svgexport/svgmapwriter.py,
1970     extensions/svgexport/maplegend.py: Removed. These files were in
1971     the wrong places or didn't work at all.
1972    
1973 bh 2067 2004-02-16 Bernhard Herzog <[email protected]>
1974    
1975 bh 2069 * Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
1976     line
1977    
1978     2004-02-16 Bernhard Herzog <[email protected]>
1979    
1980 bh 2067 * Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.
1981    
1982 mrechtie 2064 2004-02-15 Markus Rechtien <[email protected]>
1983    
1984     * Extensions/svgexport/svgmapwriter.py: New. Adds the capability
1985     to write a session to a file in SVG format.
1986     * Extensions/svgexport/svgsaver.py: New. Uses svgmapwriter.py
1987     to write a SVG map of a session.
1988     * Extensions/svgexport/maplegend: New. Writes a basic maplegend
1989     in SVG format for the current session.
1990    
1991 bh 2062 2004-02-13 Bernhard Herzog <[email protected]>
1992    
1993     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): When the layer
1994     can't be created, return immediately after displaying the error
1995     message.
1996    
1997 bh 2060 2004-02-11 Bernhard Herzog <[email protected]>
1998    
1999     Handle postgis tables with more than one geometry column.
2000    
2001     * Thuban/Model/postgisdb.py
2002     (PostGISTable._fetch_table_information): Delegate the creation of
2003     column objects to a different method so that we can extend that in
2004     derived classes
2005     (PostGISTable._create_col_from_description): New. Column object
2006     creation part of _fetch_table_information
2007     (PostGISShapeStore._create_col_from_description): New. Extend
2008     inherited method to handle geometry columns
2009     (PostGISShapeStore.__init__): New parameter geometry_column to
2010     specify which geometry column to use. Optional but mandatory for
2011     tables with more than one geometry column
2012     (PostGISShapeStore._fetch_table_information): Also use the name of
2013     the geometry column when looking for the srid
2014     (PostGISShapeStore.ShapeType): Also use the name of the geometry
2015     column when looking for the shape type
2016    
2017     * test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
2018     NonConnectionStore to changes in the PostGISShapeStore
2019    
2020     * test/test_postgis_db.py
2021     (TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
2022     PostGISShapeStore with tables having two geometry columns.
2023    
2024 bh 2058 2004-02-10 Bernhard Herzog <[email protected]>
2025    
2026     Fix some postgis problems. What remains to be done is real
2027     handling of SRIDs as they affect how reprojection is done
2028    
2029     * Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
2030     doc-string
2031     (PostGISShapeStore._fetch_table_information): New. Extend
2032     inherited method to retrieve srid
2033     (PostGISShapeStore.BoundingBox): Handle tables without data.
2034     extent yields NULL for those
2035     (PostGISShapeStore.ShapesInRegion): Use the srid of the table.
2036    
2037     * test/test_postgis_db.py
2038     (TestPostGISSpecialCases.test_shapestore_empty_table): New test
2039     for the special case of a table without any data
2040     (TestPostGISShapestorePointSRID): New class with tests for a table
2041     that uses srids
2042     (PolygonTests): Fix a doc-string typo
2043    
2044     * test/postgissupport.py (PostGISDatabase.__init__): New parameter
2045     reference_systems with a specification of spacial reference
2046     systems to create in the new db.
2047     (PostgreSQLServer.new_postgis_db)
2048     (PostgreSQLServer.get_static_data_db): New parameter
2049     reference_systems to be passed through ultimately to
2050     PostGISDatabase. In new_postgis_db also check whether an existing
2051     db already has the right srids
2052     (PostgreSQLServer.get_default_static_data_db): Add srids and a
2053     table that uses srids
2054     (PostGISDatabase.initdb): Create the entries for the reference
2055     systems
2056     (PostGISDatabase.has_data): Add reference_systems parameter to
2057     check for those too
2058     (upload_shapefile): New parameter srid to create tables with a
2059     specific srid
2060    
2061 frank 2055 2004-02-06 Frank Koormann <[email protected]>
2062    
2063     * po/pt_BR.po: Fixed charset
2064    
2065 frank 2054 2004-02-05 Frank Koormann <[email protected]>
2066    
2067     * po/pt_BR.po: Fixed format string for error message, missing %s
2068     added (Thuban/UI/application.py:273)
2069    
2070 frank 2053 2004-02-03 Frank Koormann <[email protected]>
2071    
2072     First version of Portuguese (Brazilian) translation
2073    
2074     * po/pt_BR.po: New, translation of pot (2004-01-15 16:07+0300) for
2075     Brazilian Portuguese by Eduardo Patto Kanegae.
2076    
2077     * Thuban/UI/about.py (About.__init.py__): Added Eduardo to the list of
2078     translators.
2079    
2080    
2081 frank 2052 2004-01-22 Frank Koormann <[email protected]>
2082    
2083     * Doc/manual/thuban-manual.xml: Added section on installation of
2084     Thuban under Win32 systems. Fixed image path references in the postgis
2085     section. Some minor source formattings.
2086    
2087 frank 2051 2004-01-21 Frank Koormann <[email protected]>
2088    
2089     Make Thuban remember path selections (at least for one application run).
2090    
2091     * Thuban/UI/application.py (Application.OnInit): Initialize path as a
2092     attribute of application object. Path is a dictionary of
2093     strings, currently with the items "data" and "projection".
2094     (Application.SetPath): New, stores path for the specified item.
2095     (Application.Path): New, return path for the specified item.
2096    
2097     * Thuban/UI/mainwindow.py
2098     (MainWindow.OpenSession, MainWindow.SaveSessionAs,
2099     MainWindow.AddLayer, MainWindow.AddRasterLayer,
2100     MainWindow.TableOpen): Access "data" path information of the
2101     application.
2102    
2103     * Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport):
2104     Access "projection" path information of the application.
2105    
2106 bh 2048 2004-01-05 Bernhard Herzog <[email protected]>
2107    
2108 bh 2050 * po/ru.po: Updated translations from Alex Shevlakov
2109    
2110     2004-01-05 Bernhard Herzog <[email protected]>
2111    
2112 bh 2048 * po/Makefile, po/README: Move the description of how to generate
2113     the translation statistics to the README.
2114    
2115 bh 2042 2003-12-23 Bernhard Herzog <[email protected]>
2116    
2117 bh 2045 * NEWS: Update for 1.0.0
2118    
2119     * po/it.po: Another update from Maurizio Napolitano
2120    
2121     2003-12-23 Bernhard Herzog <[email protected]>
2122    
2123 bh 2042 * po/it.po: Updated translation from Maurizio Napolitano
2124    
2125     2003-12-23 Bernhard Herzog <[email protected]>
2126    
2127     * Thuban/UI/join.py (JoinDialog.__init__): Mark one more string
2128     for translation
2129    
2130     * Thuban/UI/mainwindow.py (MainWindow.TableRename)
2131     (MainWindow.RenameMap, MainWindow.RenameLayer): Mark some more
2132     strings for translation
2133    
2134     * po/de.po: Update with the newly marked strings.
2135    
2136 bh 2033 2003-12-22 Bernhard Herzog <[email protected]>
2137    
2138 bh 2039 * HOWTO-Release: Fix the places where version numbers have to be
2139     updated
2140    
2141     2003-12-22 Bernhard Herzog <[email protected]>
2142    
2143 bh 2037 * setup.py (setup call): 1.0.0, yeah!
2144    
2145     * Thuban/version.py (longversion): 1.0.0, yeah!
2146    
2147     * Thuban/Model/load.py (SessionLoader.__init__): Accept the
2148     1.0.0 namespace too
2149    
2150     * Thuban/Model/save.py (SessionSaver.write_session): Save with
2151     1.0.0 namespace
2152    
2153     * test/test_load.py (LoadSessionTest.dtd)
2154     (TestSingleLayer.file_contents)
2155     (TestNonAsciiColumnName.file_contents)
2156     (TestLayerVisibility.file_contents)
2157     (TestClassification.file_contents, TestLabels.file_contents)
2158     (TestLayerProjection.file_contents)
2159     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2160     (TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
2161     (TestPostGISLayerPassword.file_contents)
2162     (TestLoadError.file_contents, TestLoadError.test): Update for
2163     1.0.0 namespace
2164    
2165     * test/test_save.py (SaveSessionTest.dtd)
2166     (SaveSessionTest.testEmptySession)
2167     (SaveSessionTest.testSingleLayer)
2168     (SaveSessionTest.testLayerProjection)
2169     (SaveSessionTest.testRasterLayer)
2170     (SaveSessionTest.testClassifiedLayer)
2171     (SaveSessionTest.test_dbf_table)
2172     (SaveSessionTest.test_joined_table)
2173     (SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace
2174    
2175     2003-12-22 Bernhard Herzog <[email protected]>
2176    
2177 bh 2035 * Thuban/Model/load.py (SessionLoader.start_label): Make sure the
2178     alignment flags are byte strings not unicode and that they have
2179     valid values
2180    
2181     * test/test_load.py (TestLabelLayer): New. Test loading (and
2182     indirectly saving) of maps with labels.
2183    
2184     2003-12-22 Bernhard Herzog <[email protected]>
2185    
2186 bh 2033 * Thuban/UI/tableview.py (TableGrid.OnDestroy)
2187     (TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
2188     unsubscribe all subscribers.
2189     (LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
2190     self.grid since it may already have been destroyed.
2191     Fixes RT #2256
2192    
2193 bh 2031 2003-12-19 Bernhard Herzog <[email protected]>
2194    
2195     * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
2196    
2197 bh 2028 2003-12-16 Bernhard Herzog <[email protected]>
2198 silke 2029
2199     * debian/bitmappath.patch, debian/setup.py.patch:
2200     added to ensure compliance with FHS for debian
2201     * debian/rules, debian/changelog:
2202     added patches in rules to ensure compliance with FHS for debian
2203 bh 2028
2204 silke 2029 2003-12-16 Bernhard Herzog <[email protected]>
2205    
2206 bh 2028 * po/Makefile (mo): Make the output a bit nicer so that it prints
2207     statistics about the translations. Add a comment how produce even
2208     nicer statistics with sed.
2209    
2210 frank 2026 2003-12-09 Frank Koormann <[email protected]>
2211    
2212     * Resources/Projections/defaults.proj:
2213     French projection sample with correct accents (UNICODE).
2214    
2215 bh 2025 2003-12-05 Bernhard Herzog <[email protected]>
2216    
2217     * MANIFEST.in: Add the devtools directory
2218    
2219     * setup.py (setup call): Use license instead of licence. This
2220     silences a deprecation warning on Python 2.3
2221    
2222 frank 2022 2003-12-05 Frank Koormann <[email protected]>
2223    
2224 frank 2023 Documentation synced with 1.0rc1
2225    
2226     * Doc/manual/thuban-manual.xml:
2227     Minor formatting changes and references to database layers .
2228     Introduction.Internationalization: New section on i18n.
2229     MapManagement.AddingandRemovingLayers: Added item on database layers.
2230     MapManagement.TheLegend: Added section and screenshot on popup menu.
2231     ProjectionManagement: Updated screenshot and sentence on EPSG.
2232     Appendix.SupportedDataSources: Added PostGIS.
2233     Appendix.WorkingwithPostGIS: New section.
2234    
2235     * Doc/manual/images/6_projection.png: Updated screenshot including
2236     EPSG checkboxes.
2237    
2238     * Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.
2239    
2240     * Doc/manual/images/app_postgis_add_layer.png,
2241     Doc/manual/images/app_postgis_db_add.png,
2242     Doc/manual/images/app_postgis_db_management.png:
2243     New screenshots focussing on database layers
2244    
2245     2003-12-05 Frank Koormann <[email protected]>
2246    
2247 frank 2022 * Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
2248     write warning to stderr instead of rising a warning dialog
2249    
2250 bh 2016 2003-12-03 Bernhard Herzog <[email protected]>
2251    
2252 bh 2021 Fix for RT #2243
2253    
2254 bh 2020 * Thuban/UI/mainwindow.py (MainWindow.has_selected_shape_layer):
2255     New. Like has_selected_layer but for shape layers only
2256     (_has_selected_shape_layer): New. Like _has_selected_layer but for
2257     shape layers only
2258     (layer_show_table command, layer_jointable command): Use these
2259     commands should only be available for shape layers
2260    
2261     2003-12-03 Bernhard Herzog <[email protected]>
2262    
2263 bh 2018 * Thuban/UI/mainwindow.py (MainWindow.Unsubscribe): Deal with
2264     publishers that are wx objects and may have been destroyed by wx
2265     already. Fixes RT #2242.
2266    
2267     2003-12-03 Bernhard Herzog <[email protected]>
2268    
2269 bh 2016 * po/ru.po: Updates from Alex Shevlakov
2270    
2271 silke 2013 2003-12-03 Silke Reimer <silkeintevation.de>
2272    
2273     * debian/control, debian/changelog: Added gdal-support to
2274     debian package, updated to new thuban version
2275    
2276    
2277 bh 2012 2003-12-03 Bernhard Herzog <[email protected]>
2278    
2279     * Thuban/Lib/version.py: New. Module for version number
2280     manipulations. The version of make_tuple here also deals better
2281     with more unusual version number strings, such as e.g.
2282     "1.2+cvs20031111"
2283    
2284     * Thuban/version.py (make_tuple): Removed. It's now in
2285     Thuban.Lib.version. Use that implementation instead.
2286    
2287     * test/test_lib_version.py: New. Tests for Thuban/Lib/version.py
2288    
2289 bh 2005 2003-12-02 Bernhard Herzog <[email protected]>
2290    
2291 bh 2010 * MANIFEST.in: Add debian files
2292    
2293 bh 2008 * setup.py (setup call): Add packages for the Extensions so that
2294     they're installed too
2295     (data_files): Add READMEs and sample data from some Extensions
2296    
2297     * NEWS: Add note about the extensions in binary packages
2298    
2299     2003-12-02 Bernhard Herzog <[email protected]>
2300    
2301 bh 2005 * Thuban/Model/save.py (SessionSaver.write_session): Save files
2302     with the thuban-1.0rc1
2303    
2304     * Thuban/Model/load.py (SessionLoader.__init__): Recognize the
2305     thuban-1.0rc1 namespace too
2306    
2307     * test/test_save.py (SaveSessionTest.dtd)
2308     (SaveSessionTest.testEmptySession)
2309     (SaveSessionTest.testSingleLayer)
2310     (SaveSessionTest.testLayerProjection)
2311     (SaveSessionTest.testRasterLayer)
2312     (SaveSessionTest.testClassifiedLayer)
2313     (SaveSessionTest.test_dbf_table)
2314     (SaveSessionTest.test_joined_table)
2315     (SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
2316     namespace
2317    
2318     * test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
2319     namespace
2320     (TestSingleLayer.file_contents)
2321     (TestNonAsciiColumnName.file_contents)
2322     (TestLayerVisibility.file_contents)
2323     (TestClassification.file_contents, TestLabels.file_contents)
2324     (TestLayerProjection.file_contents)
2325     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2326     (TestPostGISLayer.file_contents)
2327     (TestPostGISLayerPassword.file_contents)
2328     (TestLoadError.file_contents, TestLoadError.test): Update to
2329     thuban-1.0rc1 namespace
2330    
2331 bh 1996 2003-12-01 Bernhard Herzog <[email protected]>
2332    
2333 bh 2003 * setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
2334     nt to better match Intevation's current w32 setup
2335    
2336 bh 2001 * HOWTO-Release: Add note about updating MANIFEST.in
2337    
2338     * MANIFEST.in: Add the Extensions
2339    
2340 bh 1998 * NEWS: Update for 1.0rc1
2341    
2342     2003-12-01 Bernhard Herzog <[email protected]>
2343    
2344 bh 1996 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Change the wild
2345     cards for the dialog so that shapefiles ending in all uppercase
2346     SHP are listed too
2347    
2348 bh 1988 2003-11-28 Bernhard Herzog <[email protected]>
2349    
2350 bh 1996 * Thuban/version.py (longversion): Update to 1.0rc1
2351    
2352     * setup.py (setup call): Update version to 1.0rc1. Use the
2353     [email protected] email address as author email instead of my
2354     personal one.
2355    
2356     2003-11-28 Bernhard Herzog <[email protected]>
2357    
2358 bh 1992 * po/de.po: Update german translation.
2359    
2360     2003-11-28 Bernhard Herzog <[email protected]>
2361    
2362 bh 1990 Unify the filenames stored in .thuban files so that the .thuban
2363     files are more platform independend
2364    
2365     * Thuban/Model/save.py (unify_filename): New. Unify filenames so
2366     that they can be used on both windows and unix
2367     (SessionSaver.prepare_filename): New. Handle all filename
2368     transformations for filenames stored in the thuban file
2369     (SessionSaver.write_data_containers, SessionSaver.write_layer):
2370     Use prepare_filename
2371    
2372     * test/test_save.py (SaveSessionTest.testSingleLayer)
2373     (SaveSessionTest.testLayerProjection)
2374     (SaveSessionTest.testRasterLayer)
2375     (SaveSessionTest.testClassifiedLayer)
2376     (SaveSessionTest.test_dbf_table)
2377     (SaveSessionTest.test_joined_table): Filenames are always stored
2378     with slashes on all currently supported platforms so adapt all
2379     tests to this
2380    
2381     * test/test_load.py (LoadSessionTest.filenames): With the new
2382     filename scheme the filenames in the tests should be
2383     understandable on all currently supported platforms so we turn
2384     this into an empty list because we don't have to normalize them
2385     anymore
2386    
2387     2003-11-28 Bernhard Herzog <[email protected]>
2388    
2389 bh 1988 * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
2390     Add the ellipsoid to the projection since some Proj versions
2391     complain if it's missing.
2392    
2393 bh 1984 2003-11-27 Bernhard Herzog <[email protected]>
2394    
2395     Corect some bounding box projection problems
2396    
2397     * Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
2398     version of ForwardBBox
2399     (Projection._transform_bbox): New. common implementation of
2400     ForwardBBox and InverseBBox
2401     (Projection.ForwardBBox): Use _transform_bbox.
2402    
2403     * test/test_proj.py (TestProjection.test): Add test for
2404     InverseBBox
2405    
2406     * Thuban/Model/layer.py (Layer.LatLongBoundingBox)
2407     (Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
2408     new InverseBBox method to determine the unprojected bounding box
2409     (Layer.ShapesInRegion): Use the ForwardBBox method to project the
2410     bbox.
2411    
2412     * test/test_layer.py (TestLayer.test_point_layer_with_projection):
2413     Removed.
2414     (TestLayer.test_arc_layer_with_projection): New. This test is
2415     better able to test whether bounding boxes are projected correctly
2416     than test_point_layer_with_projection
2417    
2418 bh 1986 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
2419     InverseBBox to unproject bboxes
2420    
2421 bh 1975 2003-11-25 Bernhard Herzog <[email protected]>
2422    
2423 bh 1981 * Thuban/UI/about.py (About.__init__): Make sure we have ASCII
2424     source code.
2425    
2426     2003-11-25 Bernhard Herzog <[email protected]>
2427    
2428 bh 1979 * Thuban/Model/layer.py (Layer.__getattr__): Removed. It was only
2429     there for backwards compatibility and all code relying on that
2430     should have been updated by now.
2431    
2432     2003-11-25 Bernhard Herzog <[email protected]>
2433    
2434 bh 1977 * test/test_load.py (TestClassification.test): Add the missing
2435     round trip test.
2436     (TestClassification.file_contents): Update to the newest file
2437     format
2438    
2439     2003-11-25 Bernhard Herzog <[email protected]>
2440    
2441 bh 1975 Add very experimental (and possibly dangerous) extension to draw
2442     polygons:
2443    
2444     * Extensions/drawshape/README: New. Brief installation
2445     instructions
2446    
2447     * Extensions/drawshape/drawshape.py: New. Implementation of the
2448     drawshape extensions
2449    
2450     * Extensions/drawshape/patch.diff: Patch to apply before the
2451     extension can be used.
2452    
2453 bh 1971 2003-11-24 Bernhard Herzog <[email protected]>
2454    
2455 bh 1973 * Thuban/Model/data.py (ShapefileStore._open_shapefile)
2456     (ShapefileStore.__init__): Factor opening the shapefile into a
2457     separate method (the new _open_shapefile). This makes the code a
2458     bit more readable but the real reason is that it makes some evil
2459     hacks easier. :-)
2460    
2461     2003-11-24 Bernhard Herzog <[email protected]>
2462    
2463 bh 1971 * Thuban/Model/load.py (SessionLoader.check_attrs): If no
2464     converter is specified for an attribute assume it's a string
2465     containing only Latin1 characters. Update doc-string accordingly.
2466     This change should fix many places where unicode objects might
2467     accidentally enter Thuban.
2468    
2469     * test/test_load.py (TestNonAsciiColumnName): New test to check
2470     what happens with column names in DBF files that contain non-ascii
2471     characters
2472    
2473 bh 1969 2003-11-21 Bernhard Herzog <[email protected]>
2474    
2475     Enable the experimental attribute editing again and introduce a
2476     command line switch to actually activate it
2477    
2478     * Thuban/UI/main.py (options): New. Container for options set on
2479     the commmand line
2480     (main): Add the --enable-attribute-editing flag.
2481    
2482     * Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute
2483     editing is enabled use the grid ctrl which allows editing of the
2484     values
2485    
2486     * Thuban/Model/transientdb.py (AutoTransientTable.write_record):
2487     New. Just delegate this to the underlying table.
2488    
2489 bh 1967 2003-11-20 Bernhard Herzog <[email protected]>
2490    
2491     * test/test_proj.py (ProjFileReadTests.test_read_unreadable_file):
2492     Skip this test if run under non-posix systems since it only works
2493     there
2494    
2495 bh 1960 2003-11-19 Bernhard Herzog <[email protected]>
2496    
2497 bh 1965 * Thuban/Model/resource.py: Rework the way gdal support is
2498     determined so that we can give a reason in the about why gdal is
2499     not supported.
2500     (gdal_support_status): New. Variable holding a string with the
2501     reason for no gdal support
2502    
2503     * Thuban/UI/about.py (About.__init__): Add the reason why gdal is
2504     not supported to the message
2505    
2506     2003-11-19 Bernhard Herzog <[email protected]>
2507    
2508 bh 1963 Remove the old table interface and its test cases
2509    
2510     * Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
2511     (DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
2512     anymore
2513    
2514     * Thuban/Model/transientdb.py (TransientTableBase)
2515     (AutoTransientTable): Do not derive from OldTableInterfaceMixin
2516     anymore
2517    
2518     * test/test_table.py: Removed since the old interface it tests is
2519     gone.
2520    
2521     * test/runtests.py (main): The old table interface is gone and
2522     with it the deprecation warnings so remove the code that turns
2523     these warnings into errors
2524    
2525     2003-11-19 Bernhard Herzog <[email protected]>
2526    
2527 bh 1960 * test/test_table.py: Revert to revision 1.5 again. Changing the
2528     tests to use the new table interface is completely wrong since the
2529     whole purpose of the tests in this module is to test the old
2530     interface.
2531    
2532 bh 1954 2003-11-18 Bernhard Herzog <[email protected]>
2533    
2534 bh 1958 * Thuban/Model/postgisdb.py (PostGISConnection.MatchesParameters):
2535     New. Test whether the connection matches a set of connection
2536     parameters
2537    
2538     * Thuban/UI/dbdialog.py (DBFrame.conns_changed): Fix doc-string
2539     (DBFrame.OnAdd): Use the new MatchesParameters method when looking
2540     for existing connections with the same parameters and break out of
2541     the loop correctly.
2542    
2543     * test/test_postgis_db.py (TestBriefDescription)
2544     (TestPostGISSimple.test_brief_description): Rename
2545     TestBriefDescription to TestPostGISSimple and the test method to
2546     test_brief_description so that we can add more test methods.
2547     (TestPostGISSimple.test_matches_parameters): New. Test the new
2548     MatchesParameters method
2549    
2550     2003-11-18 Bernhard Herzog <[email protected]>
2551    
2552 bh 1960 * Thuban/Lib/connector.py (Publisher): Introduce a new flag,
2553 bh 1954 _was_destroyed, to indicate whether an publisher instance has
2554     already been destroyed.
2555     (Publisher.Unsubscribe): Only disconnect if the publisher has not
2556     been destroyed yet.
2557     (Publisher.Destroy): Set the _was_destroyed flag to true.
2558    
2559     * test/test_connector.py
2560     (TestPublisher.test_unsubscribe_after_destroy): New. Test that
2561     calling Unsubscribe after Destroy doesn't raise an exception
2562    
2563 bh 1951 2003-11-14 Bernhard Herzog <[email protected]>
2564    
2565     * Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
2566     typo in doc-string
2567    
2568 bh 1949 2003-11-13 Bernhard Herzog <[email protected]>
2569    
2570     Quote table and column names properly for postgis.
2571    
2572     * Thuban/Model/postgisdb.py (quote_identifier): New. Function to
2573     quote an identifier for use in an sql statement
2574     (PostGISColumn.__init__): Add the quoted_name attribute
2575     (PostGISTable.__init__): New instance variable quoted_tablename
2576     (PostGISTable._fetch_table_information): Use the quoted table
2577     name. New isntance variable quoted_geo_col with a quoted version
2578     of geometry_column
2579     (PostGISTable.NumRows, PostGISTable.RowIdToOrdinal)
2580     (PostGISTable.RowOrdinalToId): Use the quoted table name
2581     (PostGISTable.ReadValue, PostGISTable.ValueRange)
2582     (PostGISTable.UniqueValues, PostGISTable.SimpleQuery)
2583     (PostGISShapeStore.BoundingBox, PostGISShapeStore.Shape)
2584     (PostGISShapeStore.AllShapes, PostGISShapeStore.ShapesInRegion):
2585     Use quoted table and column names
2586    
2587     * test/test_postgis_db.py (TestPostGISSpecialCases)
2588     (TestPostGISIgnoredColumns): Rename the class to
2589     TestPostGISSpecialCases because that better describes the new
2590     cases
2591     (TestPostGISSpecialCases.test_unsupported_types)
2592     (TestPostGISSpecialCases.test): Rename the method to
2593     test_unsupported_types because we need a more descriptive name now
2594     that there are more methods
2595     (TestPostGISSpecialCases.test_table_name_quoting)
2596     (TestPostGISSpecialCases.test_column_name_quoting)
2597     (TestPostGISSpecialCases.test_shapestore_name_quoting): New test
2598     cases to test quoting of table and column names in PostGISTable
2599     and PostGISShapeStore
2600    
2601     * test/postgissupport.py
2602     (skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
2603     AddGeometryColumn desn't support table or column names with sapces
2604     or double quotes
2605    
2606 jan 1945 2003-11-12 Jan-Oliver Wagner <[email protected]>
2607    
2608     * Extensions/wms/__init__.py: New: Init to make this
2609     directory a package.
2610    
2611     * Extensions/wms/wms.py: New: Provide layers via OGC WMS.
2612    
2613 bh 1932 2003-11-11 Bernhard Herzog <[email protected]>
2614    
2615 bh 1942 * Thuban/Model/resource.py (EPSG_DEPRECATED_PROJ_FILE): New.
2616     Constant for the file woth deprecated epsg projections
2617     (get_system_proj_file): Update doc-string
2618    
2619     * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Add a space
2620     above the EPS widgets, introduce a check box for the deprecated
2621     eps projections and a label for the epsg widgets
2622     (ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections
2623     too
2624    
2625     2003-11-11 Bernhard Herzog <[email protected]>
2626    
2627 bh 1939 Avoid warnings when run under Python 2.3
2628    
2629     * Thuban/UI/baserenderer.py (BaseRenderer.draw_point_shape)
2630     (BaseRenderer.draw_label_layer): Coordinates must be ints.
2631    
2632     * Thuban/UI/renderer.py (MapRenderer.make_point): Turn this into a
2633     real method so that we can convert to int.
2634     (MapRenderer.label_font): The font size mist be an int.
2635    
2636     * Thuban/UI/common.py (Color2wxColour): The color values must be
2637     ints. Also, remove the unnecessary asserts.
2638    
2639     * test/test_load_0_8.py (TestUnicodeStrings.file_contents)
2640     (TestUnicodeStrings.test): Python source code should not contain
2641     non-ascii characters unless an encoding is specified in the file.
2642     Therefore use \x escapes in the string literals for non-ascii
2643     characters.
2644    
2645     2003-11-11 Bernhard Herzog <[email protected]>
2646    
2647 bh 1934 * Thuban/Model/resource.py (get_system_proj_file): Add a filename
2648     parameter so that this function can be used for all proj files in
2649     Resource/Projections
2650     (DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
2651     get_system_proj_file
2652    
2653     * Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
2654     ProjFile self.__sysProjFile use a dictionary of system ProjFile
2655     objects self._sys_proj_files
2656     (ProjFrame.build_dialog): Adapt to the new changes in the
2657     ProjectionList constructor. Add a check button to toggle whether
2658     EPSG projections are shown
2659     (ProjFrame._OnShowEPSG): New. Handler for the epsg check button
2660     events.
2661     (ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
2662     the busy cursor if the files have not yet been loaded by the
2663     dialog.
2664     (ProjFrame.load_system_proj): Add a parameter for the name of the
2665     proj file. Maintain the dictionary of system projections
2666     self._sys_proj_files
2667    
2668     * Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
2669     user_projs parameters into one parameter proj_files which is a
2670     list of proj files.
2671     (ProjectionList._subscribe_proj_files)
2672     (ProjectionList._unsubscribe_proj_files): New. Move
2673     subscription/unsubscription of projfile messages to separate
2674     methods
2675     (ProjectionList.Destroy): The unsubscribe is now done in
2676     _unsubscribe_proj_files
2677     (ProjectionList.update_projections): We now have a list of proj
2678     file objects
2679     (ProjectionList.SetProjFiles): New method to set a new list of
2680     proj file objects
2681    
2682     * test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
2683     Specify explicitly which system proj file to load.
2684    
2685     2003-11-11 Bernhard Herzog <[email protected]>
2686    
2687 bh 1932 * Thuban/Model/load.py (SessionLoader.Destroy): New. Clear all
2688     instance variables to cut cyclic references. The GC would have
2689     collected the loader eventually but it can happen that it doesn't
2690     run at all until thuban is closed (2.3 but not 2.2 tries a bit
2691     harder and forces a collection when the interpreter terminates)
2692     (load_session): Call the handler's Destroy method to make sure
2693     that it gets garbage collected early. Otherwise it will be
2694     collected very late if at all and it holds some references to e.g.
2695     shapestores and the session which can lead to leaks (of e.g. the
2696     temporary files)
2697    
2698     * test/test_load.py (TestSingleLayer.test_leak): New. test for the
2699     resource leak in load_session
2700    
2701 bh 1929 2003-11-10 Bernhard Herzog <[email protected]>
2702    
2703     * Thuban/UI/baserenderer.py: Add a way to specify how layers in
2704     extensions are to be rendered.
2705     (_renderer_extensions): New. List with renderer for layers in
2706     extensions
2707     (add_renderer_extension): New. Add a renderer extension
2708     (init_renderer_extensions): New. Init the renderer extensions
2709     (BaseRenderer.render_map_incrementally): Search
2710     _renderer_extensions for how to draw unknown layer types
2711     (BaseRenderer.draw_raster_data): Add format parameter so that
2712     formats other than BMP can be drawn
2713     (BaseRenderer.draw_raster_layer): Pass an explicit format to
2714     draw_raster_data
2715    
2716     * Thuban/UI/renderer.py (raster_format_map): New. Mapping form the
2717     strings of the format parameter of draw_raster_data method to wx
2718     constants
2719     (MapRenderer.draw_raster_data): Add the format parameter and use
2720     raster_format_map to map it to the right wxwindows constant for
2721     wxImageFromStream
2722    
2723     * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add
2724     the format parameter and record it
2725     (TestBaseRenderer.test_raster_no_projection): check the format
2726     paramter of the draw_raster_data method
2727     (TestBaseRenderer.test_renderer_extension): New. Test the renderer
2728     extension facility
2729    
2730 bh 1925 2003-11-07 Bernhard Herzog <[email protected]>
2731    
2732     Tweak the usage of the sqlite database to make common use cases
2733     more responsive. In most cases copying the data to the sqlite
2734     database takes so long that using sqlite doesn't have enough
2735     advantages.
2736    
2737     * Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add
2738     comments about performance and query the min and max in separate
2739     statements because only that way will indexes be used.
2740     (TransientTableBase.UniqueValues): Add some comments about
2741     performance.
2742     (AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues):
2743     Do not copy the data to the transient DB but use the transient
2744     copy if it exists. See the new comments for the performance trade
2745     offs
2746    
2747     * test/test_transientdb.py
2748     (TestTransientTable.test_auto_transient_table): Make sure that the
2749     data is copied to the transient database at some point.
2750    
2751 bh 1913 2003-11-03 Bernhard Herzog <[email protected]>
2752    
2753 bh 1922 * Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some
2754     globals to locals so that it's a bit faster
2755    
2756     2003-11-03 Bernhard Herzog <[email protected]>
2757    
2758 bh 1920 * Thuban/UI/baserenderer.py
2759     (BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
2760     method. ReadValue is faster than ReadRowAsDict since it only reads
2761     one cell especially now that the dbf file objects actually
2762     implement it.
2763    
2764     * Thuban/Model/table.py (DBFTable.ReadValue): Use the new
2765     read_attribute method of the dbf objects
2766    
2767     2003-11-03 Bernhard Herzog <[email protected]>
2768    
2769 bh 1916 * Extensions/profiling/profiling.py (popup_dialog_box): New config
2770     variable to indicate whether the result should be shown in a
2771     dialog box
2772     (profile_screen_renderer, time_screen_renderer): Only show a
2773     dialog box if popup_dialog_box is true.
2774     (profile_screen_renderer): Flush stdout after the printing the
2775     first part of the "profiling..." message
2776    
2777     * Thuban/UI/baserenderer.py
2778     (BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
2779     brushes for the groups so that they're not created over and over
2780     again
2781    
2782 bh 1913 * Thuban/Model/classification.py (Classification.__getattr__)
2783     (Classification._compile_classification)
2784     (Classification._clear_compiled_classification): New. Methods to
2785     manage a 'compiled' representation of the classification groups
2786     which is created on demand
2787     (Classification.InsertGroup, Classification.RemoveGroup)
2788     (Classification.ReplaceGroup): reset the compiled representation
2789     (Classification.FindGroup): Use the compiled representation to
2790     find the matching group
2791     (ClassGroupRange.GetRangeTuple): New. Return the range as a tuple
2792    
2793 bh 1904 2003-10-31 Bernhard Herzog <[email protected]>
2794    
2795 bh 1911 * Thuban/Model/classification.py (Classification.SetDefaultGroup):
2796     Send a CLASS_CHANGED message
2797     (Classification.RemoveGroup): Send a CLASS_CHANGED message and do
2798     not return the removed group since it wasn't used.
2799    
2800     * test/test_classification.py
2801     (TestClassification.test_set_default_group): New. Test the
2802     SetDefaultGroup method
2803     (TestClassification.test_insert_group): New. Test the InsertGroup
2804     method
2805     (TestClassification.test_remove_group): New. Test the RemoveGroup
2806     method
2807     (TestClassification.test_replace_group): New. Test the
2808     ReplaceGroup method
2809    
2810     2003-10-31 Bernhard Herzog <[email protected]>
2811    
2812 bh 1908 * test/test_classification.py (TestClassification.setUp):
2813     Subscribe to the CLASS_CHANGED messages
2814     (TestClassification.tearDown): New. Destroy the classification
2815     properly
2816     (TestClassification.test_defaults): Add tests for the default line
2817     width and whether no messages were sent yet
2818     (TestClassification.test_set_default_properties): Add tests for
2819     messages and setting the default line width
2820     (TestClassification.test_add_singleton)
2821     (TestClassification.test_add_range)
2822     (TestClassification.test_multiple_groups): Add tests for messages
2823    
2824     2003-10-31 Bernhard Herzog <[email protected]>
2825    
2826 bh 1906 Some more refactoring in preparation for new tests:
2827    
2828     * test/test_classification.py (TestClassification.setUp): New.
2829     Instantiate the classification here. Update the test methods
2830     accordingly.
2831     (TestClassification.test_multiple_groups): Make sure that the two
2832     singletons matching 1 are considered different.
2833    
2834     2003-10-31 Bernhard Herzog <[email protected]>
2835    
2836 bh 1904 * test/test_classification.py (red, green, blue): New. These
2837     constants were used in several cases. Update the relevant methods.
2838     (TestClassification.test_defaults)
2839     (TestClassification.test_set_default_properties)
2840     (TestClassification.test_add_singleton)
2841     (TestClassification.test_add_range)
2842     (TestClassification.test_multiple_groups)
2843     (TestClassification.test_deepcopy): New. These were formerly all
2844     part of the single method test.
2845     (TestClassification.test_deepcopy): Removed.
2846     (TestClassIterator): Removed. The test case is now a method of
2847     TestClassification since it tests part of the public interface of
2848     Classification
2849     (TestClassification.test_iterator): New. Used to be
2850     TestClassIterator effectively
2851    
2852 jan 1902 2003-10-31 Jan-Oliver Wagner <[email protected]>
2853    
2854     GUIfied the functions of the profiling extension.
2855    
2856     * /Extensions/profiling/__init__.py: New: Init to make this
2857     directory a package.
2858    
2859     * Extensions/profiling/profiling.py: Moved menu entries to
2860     the Extensions menu. Applied _() for strings.
2861     (profile_screen_renderer): Catch the detailed printout and present
2862     it in a dialog.
2863 bh 1904 (time_screen_renderer): Raise a dialog to present the result instead
2864 jan 1902 of printing it to stdout.
2865    
2866 bh 1897 2003-10-31 Bernhard Herzog <[email protected]>
2867    
2868 bh 1899 * test/test_classification.py (TestClassGroupProperties)
2869     (TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
2870     (TestClassGroupSingleton, TestClassIterator, TestClassification):
2871     Split TestClassification into several classes, one for each class
2872     being tested. TestClassification itself now only tests
2873     Classification. This split makes changes to the tests a bit easier
2874    
2875     2003-10-31 Bernhard Herzog <[email protected]>
2876    
2877 bh 1897 * Extensions/profiling/profiling.py: New. Extension to measure
2878     Thuban performance
2879    
2880 frank 1895 2003-10-31 Frank Koormann <[email protected]>
2881    
2882     Added two items to legend popup menu: Remove Layer and Show Layer Table
2883    
2884     * Thuban/UI/legend.py (LegendPanel._OnRemoveLayer,
2885     LegendPanel._OnShowTable): New event handlers, call the corresponding
2886     mainwindow methods.
2887     (LegendTree._OnRightClick): Added items to popup menu.
2888    
2889 bh 1894 2003-10-30 Bernhard Herzog <[email protected]>
2890    
2891     * Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle
2892     EVT_WINDOW_DESTROY
2893     (ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
2894     nothing but is convenient for the derived classes.
2895    
2896     * Thuban/UI/tableview.py
2897     (TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
2898     Unsubscribe the messages here not in OnClose because that might
2899     get called multiple times. Fixes RT #2196
2900     (TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
2901     anymore.
2902    
2903     * README: Update the minimum requirement for wxPython. Since we
2904     now use the EVT_WINDOW_DESTROY event, we need at least 2.4.0.4,
2905     the version in which that was introduced for all platforms
2906    
2907 frank 1890 2003-10-30 Frank Koormann <[email protected]>
2908    
2909     * Thuban/UI/join.py (JoinDialog.OnJoin): Wrapped the major parts of
2910     the join process in a ThubanBeginBusyCursor, ThubanEndBusyCursor
2911     frame.
2912    
2913 jan 1889 2003-10-30 Jan-Oliver Wagner <[email protected]>
2914    
2915     Improved APR import extension, added further EPSG definitions
2916     and some cleanup regarding string class.
2917    
2918     * test/test_proj.py (TestProjection.test_get_projection_units_geo):
2919     Added test for alias 'longlat'.
2920    
2921     * Resources/Projections/epsg-deprecated.proj: New. Contains
2922     deprecated EPSG definitions.
2923    
2924     * Extensions/importAPR/odb.py (ODBBaseObject.TreeInfo): Added
2925     the variable names for objects.
2926    
2927     * Extensions/importAPR/apr.py (APR_BLnSym, APR_BMkSym, APR_BShSym): New.
2928     Copied from importAPR and provided with documentation.
2929    
2930     * Extensions/importAPR/importAPR.py (APR_BLnSym, APR_BMkSym, APR_BShSym):
2931     Moved to apr.py.
2932     (APR_View): Added object ref 'ITheme'.
2933    
2934     * Thuban/Lib/fileutil.py, Thuban/UI/proj4dialog.py: Replaced string
2935     split function by corresponding use of the string class method.
2936    
2937     * Thuban/Model/xmlwriter.py: Replaced string replace function by
2938     corresponding string method.
2939    
2940 bh 1880 2003-10-29 Bernhard Herzog <[email protected]>
2941    
2942     * Thuban/UI/baserenderer.py
2943     (BaseRenderer.draw_shape_layer_incrementally): Speed up the
2944     special case of a classification that only has the default group
2945    
2946 bh 1868 2003-10-27 Bernhard Herzog <[email protected]>
2947    
2948 bh 1878 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
2949    
2950 bh 1876 * po/de.po: Update.
2951    
2952     * Thuban/UI/application.py
2953     (ThubanApplication.ShowExceptionDialog): Handle translation of the
2954     dialog message properly
2955    
2956     2003-10-27 Bernhard Herzog <[email protected]>
2957    
2958 bh 1873 Rework how localization works so that we use wx's translation
2959     functions when running Thuban as a normal application but not when
2960     we don't need any UI, such as in the test suite. See the comment
2961     in Thuban/__init__.py for details
2962    
2963     * Thuban/__init__.py (_): Add one level of indirection to make the
2964     translation handling more flexible and to make it possible to use
2965     either wx's translation services or not.
2966     (gettext_identity, translation_function_installed)
2967     (install_translation_function): New function to help with this
2968    
2969     * Thuban/UI/__init__.py: Install the wx specific translation
2970     function if it's OK to do that
2971    
2972     * test/support.py (initthuban): Install a dummy translation
2973     function so that importing Thuban.UI doesn't install a wx specific
2974     one for which would need to import wxPython
2975    
2976     2003-10-27 Bernhard Herzog <[email protected]>
2977    
2978 bh 1870 * HOWTO-Release: Source archives should be created first and the
2979     binary packages should be created from the source archives.
2980     There's an official debian package now so there's no need to test
2981     the rpm on debian anymore
2982    
2983     2003-10-27 Bernhard Herzog <[email protected]>
2984    
2985 bh 1868 Several rendering changes:
2986    
2987     - Render the selection into a separate bitmap so that only that
2988     bitmap needs to be redrawn when the selection changes
2989    
2990     - Render incrementally showing previews and allowing interaction
2991     before rendering is complete
2992    
2993     - Update the renderer interface a bit. Most parameters of
2994     RenderMap are now parameters of the constructor
2995    
2996     * Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
2997     and the update region as parameters. Update the doc-string
2998     (BaseRenderer.render_map_incrementally): New. Generator function
2999     to renders the map incrementally
3000     (BaseRenderer.render_map): Remove the map argument (it's now in
3001     the constructor) and simply iterate over the
3002     render_map_incrementally generator to draw the map.
3003     (BaseRenderer.draw_shape_layer_incrementally)
3004     (BaseRenderer.draw_shape_layer): Renamed to
3005     draw_shape_layer_incrementally and changed into a generator that
3006     yields True every 500 shapes. Used by render_map_incrementally to
3007     render shape layers incrementally
3008    
3009     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
3010     map and region parameters which are now in the constructor
3011     (ScreenRenderer.RenderMapIncrementally): New. Public frontend for
3012     the inherited render_map_incrementally.
3013     (BaseRenderer.draw_shape_layer): Removed.
3014     (ScreenRenderer.draw_selection_incrementally): New. The selection
3015     drawing part of the removed draw_shape_layer as a generator
3016     (ScreenRenderer.layer_shapes): Update because of the region
3017     parameter change
3018     (ExportRenderer.__init__): New. Extend the inherited constructor
3019     with the destination region for the drawing
3020     (ExportRenderer.RenderMap): Removed the map and region parameters
3021     which are now in the constructor
3022    
3023     * Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
3024     bitmap suitable for a preview in a tool
3025     (CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
3026     bitmap
3027     (MapPrintout.draw_on_dc): Adapt to new renderer interface
3028     (MapCanvas.OnPaint): Handle drawing the selection bitmap if it
3029     exists
3030     (MapCanvas.OnIdle): Update the logic to deal with incremental
3031     rendering and the selection bitmap
3032     (MapCanvas._do_redraw): Handle the instantiation of the render
3033     iterator and the redraws during rendering
3034     (MapCanvas._render_iterator): New. Generator to incrementally
3035     redraw both bitmaps
3036     (MapCanvas.Export): Adapt to new renderer interface.
3037     (MapCanvas.full_redraw): Reset the selection bitmap and the
3038     renderer iterator too
3039     (MapCanvas.redraw_selection): New. Force a redraw of the selection
3040     bitmap
3041     (MapCanvas.shape_selected): Only redraw the selection bitmap
3042    
3043     * test/test_baserenderer.py
3044     (TestBaseRenderer.test_polygon_no_projection)
3045     (TestBaseRenderer.test_raster_no_projection)
3046     (TestBaseRenderer.test_point_map_projection)
3047     (TestBaseRenderer.test_point_layer_and_map_projection)
3048     (TestBaseRenderer.test_point_layer_projection)
3049     (TestBaseRenderer.test_point_with_classification): Adapt to new
3050     renderer interface
3051    
3052 bh 1865 2003-10-24 Bernhard Herzog <[email protected]>
3053    
3054     * libraries/thuban/wxproj.cpp (draw_polygon_shape)
3055     (point_in_polygon_shape, shape_centroid): Raise an exception if
3056     the shape can't be read. Previously invalid shape ids would lead
3057     to a segfault.
3058    
3059     * test/test_wxproj.py (TestShapeCentroid.test_invalid_shape_id):
3060     New. test whether an exception is raised for invalid shape ids
3061    
3062 jan 1857 2003-10-24 Jan-Oliver Wagner <[email protected]>
3063    
3064 jan 1862 * Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
3065     as alias for 'latlong'.
3066    
3067     * Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
3068     as alias for 'latlong'.
3069    
3070     2003-10-24 Jan-Oliver Wagner <[email protected]>
3071    
3072 jan 1859 * Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
3073     the projection even for the UnknownPanel.
3074     (UnknownProjPanel.__init__): Define the text and create the textctrl
3075     widget.
3076     (UnknownProjPanel._DoLayout): Replaced static text widget by the
3077     textctrl created in __init__.
3078     (UnknownProjPanel.SetProjection): Set the text for the text ctrl
3079     including the parameters of the projection.
3080    
3081     2003-10-24 Jan-Oliver Wagner <[email protected]>
3082    
3083 jan 1857 * Resources/Projections/epsg.proj: New. This is a list of
3084     EPSG codes with parameters for proj. The list has been
3085     generated using devtools/create_epsg.py based on the
3086     file nad/epsg of the proj 4.4.7 package. Four projection
3087     definitions have been deleted as they are not accepted by proj:
3088     "CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
3089     and "HD72 / EOV".
3090    
3091 bh 1855 2003-10-22 Bernhard Herzog <[email protected]>
3092    
3093     Some more tweaks to the projection dialog which should fix RT
3094     #1886.
3095    
3096     * Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
3097     the ProjFile's messages and call the base class methods correctly
3098     (ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
3099     flag on the newly selected item too. Otherwise some other item is
3100     focused and the first time the focus is moved with the keyboard
3101     the selection moves in unexpected ways.
3102    
3103     * Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
3104     focus on the OK button, only on the projection list. That way the
3105     list really has the focus initially
3106     (ProjFrame.OnClose): Call the projection list's Destroy method to
3107     make it unsubscribe all messages
3108    
3109 bh 1840 2003-10-21 Bernhard Herzog <[email protected]>
3110    
3111 bh 1852 Rework the projection dialog to fix a few bugs, including RT 2166
3112     and most of 2168
3113    
3114     * Thuban/UI/projlist.py: New. The class ProjectionList is a
3115     special wxListCtrl to show a list of projections in a more MVC
3116     fashion
3117    
3118     * Thuban/UI/projdialog.py (ProjFrame): Substantial changes
3119     throughout the class. The main change is to use the ProjectionList
3120     class instead of a normal wxListBox. Also, add an explicit
3121     "Unknown" projection to the projection choice control.
3122     (ProjPanel.__init__): Add an "unknown" ellipsoid
3123     (TMPanel.__init__, LCCPanel.__init__): Tweak the order of
3124     instantiation of the panel's controls to make the tab-order more
3125     natural
3126    
3127     2003-10-21 Bernhard Herzog <[email protected]>
3128    
3129 bh 1849 * test/test_load.py (TestSingleLayer.file_contents)
3130     (TestSingleLayer.test): Add non-ascii characters to the titles of
3131     session, map and layer. This is effectively a port of the
3132     TestUnicodeStrings test in test_load_0_8.py which for some reason
3133     was only added there.
3134    
3135     * test/test_load_0_9.py (TestSingleLayer.file_contents)
3136     (TestSingleLayer.test): Same as in test_load.py: add non-ascii
3137     characters to the titles of session, map and layer,.
3138    
3139     2003-10-21 Bernhard Herzog <[email protected]>
3140    
3141 bh 1847 Add EPSG projection handling to .thuban files
3142    
3143     * test/test_save.py (SaveSessionTest.dtd)
3144     (SaveSessionTest.testEmptySession)
3145     (SaveSessionTest.testLayerProjection)
3146     (SaveSessionTest.testRasterLayer)
3147     (SaveSessionTest.testClassifiedLayer)
3148     (SaveSessionTest.test_dbf_table)
3149     (SaveSessionTest.test_joined_table)
3150     (SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
3151     (SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
3152     use a and epsg projection to test saving them
3153    
3154     * test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
3155     namespace
3156     (TestLayerVisibility.file_contents, TestLabels.file_contents)
3157     (TestLayerProjection.file_contents)
3158     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3159     (TestPostGISLayer.file_contents)
3160     (TestPostGISLayerPassword.file_contents)
3161     (TestLoadError.file_contents, TestLoadError.test): Update to use
3162     1.0-dev namespace
3163     (TestSingleLayer.file_contents, TestSingleLayer.test): Update to
3164     use 1.0-dev namespace and use an EPSG projection to test whether
3165     loading it works
3166    
3167     * test/test_load_0_9.py: New. Effectively a copy of test_load.py
3168     as of Thuban 0.9. These are now tests to determine whether Thuban
3169     can still read files generated by Thuban 0.9
3170    
3171     * Thuban/Model/save.py (SessionSaver.write)
3172     (SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
3173     namespace
3174     (SessionSaver.write_projection): Write the projection's epsg
3175     attribute
3176    
3177     * Thuban/Model/load.py (SessionLoader.__init__): Also accept the
3178     thuban-1.0-dev.dtd namespace
3179     (SessionLoader.check_attrs): Allow a callable object as conversion
3180     too
3181     (SessionLoader.start_projection, SessionLoader.end_projection)
3182     (SessionLoader.start_parameter): Handle the epsg attribute and
3183     rename a few instance variables to lower case
3184    
3185     * Resources/XML/thuban-1.0.dtd: New. Only difference to
3186     thuban-0.9.dtd is the epsg attribute for projections.
3187    
3188     2003-10-21 Bernhard Herzog <[email protected]>
3189    
3190 bh 1840 * test/runtests.py (main): Let the user specify which tests to run
3191     on the command line
3192    
3193     * test/support.py (ThubanTestResult.getDescription): Override to
3194     give a better short description. The description can be used as a
3195     parameter to run_tests to run that particular test in isolation.
3196    
3197 frank 1837 2003-10-21 Frank Koormann <[email protected]>
3198    
3199     Popup menu for legend. Scheduled for the 1.2 release this was too
3200     simple to implement: The popup menu is bound to the legend tree, while
3201     the events are hanlded by its anchestor, the legend panel. This
3202     allows reuse of all the event handlers already implemented for the
3203     legend toolbar buttons.
3204    
3205     * Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
3206     to add handlers for the events issued by the popup menu.
3207     (LegendPanel._OnToggleVisibility): Handler for toggling layer
3208     visibility event
3209     (LegendPanel._OnProjection): Handler for layer projection event.
3210     (LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
3211     (LegendTree._OnRightClick): Event handler for right click, select item
3212     and pop up menu.
3213     (LegendTree.ToggleVisibility): Toggle layer visibility
3214     (LegendTree.LayerProjection): Raise layer projection dialog for
3215     current layer.
3216    
3217 bh 1836 2003-10-21 Bernhard Herzog <[email protected]>
3218    
3219     * Resources/Projections/defaults.proj: Use correct DOCTYPE
3220     declaration. The top-level element is projectionlist not projfile
3221    
3222 bh 1834 2003-10-20 Bernhard Herzog <[email protected]>
3223    
3224     * Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
3225     method to write a projfile and display a busy cursor and error
3226     dialogs.
3227     (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
3228     (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
3229     (ProjFrame.__FillAvailList): Translate "<None>" too and display a
3230     busy cursor while loading the user and system prj files.
3231    
3232 bh 1832 2003-10-16 Bernhard Herzog <[email protected]>
3233    
3234     * Thuban/Model/resource.py (projfile_cache): Introduce a cache for
3235     ProjFile objects
3236     (clear_proj_file_cache): New function to clear the cache. Mainly
3237     useful for use by the test suite
3238     (read_proj_file): Use the cache.
3239    
3240     * test/test_proj.py (TestProjFile): Clarify the doc-string
3241     (ProjFileReadTests): Update doc-string
3242     (ProjFileReadTests.test_get_system_proj_file): Check whether the
3243     system proj files is cached.
3244     (ProjFileLoadTestCase): New base class for the proj file tests
3245     derived from support.FileLoadTestCase to provide some common
3246     behavior.
3247     (TestLoadingProjFile)
3248     (TestLoadingProjFileWithEmptyProjectionlist.file_contents)
3249     (TestProjFileWithInvalidParameters.file_contents): Derive from
3250     ProjFileLoadTestCase
3251     (TestLoadingProjFile.test_caching): New. Test whether the cache
3252     works
3253    
3254 silke 1829 2003-10-16 Silke Reimer <[email protected]>
3255    
3256     * debian/*: New directory with configuration files for building a thuban
3257     deb-package.
3258    
3259 bh 1822 2003-10-14 Bernhard Herzog <[email protected]>
3260    
3261 bh 1828 * test/test_proj.py: Execute support.run_tests when run as
3262     __main__ so that missing unsubscribes are detected
3263     (TestProjFile.tearDown): Destroy the proj_file properly
3264    
3265     2003-10-14 Bernhard Herzog <[email protected]>
3266    
3267 bh 1826 * Thuban/Model/messages.py (PROJECTION_ADDED)
3268     (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
3269     the ProjFile objects
3270    
3271     * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
3272     easily send messages when the projections change
3273     (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
3274     when the change was successful
3275    
3276     * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
3277     proj file messages
3278     (TestProjFile.test_add_remove)
3279     (TestProjFile.test_remove_non_existing)
3280     (TestProjFile.test_replace)
3281     (TestProjFile.test_replace_non_existing): Test whether the right
3282     messages are sent
3283    
3284     2003-10-14 Bernhard Herzog <[email protected]>
3285    
3286 bh 1822 * test/test_proj.py (TestProjFile.test): Refactor into several
3287     tests
3288     (TestProjFile.test_add_remove)
3289     (TestProjFile.test_remove_non_existing)
3290     (TestProjFile.test_replace)
3291     (TestProjFile.test_replace_non_existing): Some of the new
3292     individual test cases
3293     (TestProjFileSimple): New class for the rest of the test cases
3294     that came out of the refactoring
3295     (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
3296     derived classes don't have to
3297    
3298 bh 1812 2003-10-13 Bernhard Herzog <[email protected]>
3299    
3300 bh 1820 Add an optional EPSG code to the projection objects and extend the
3301     .proj file format accordingly.
3302    
3303     * Resources/XML/projfile.dtd (element projection): Add epsg
3304     attribute
3305    
3306     * Thuban/Model/proj.py (Projection.__init__): New parameter and
3307     instance variable epsg. Update doc-string
3308     (Projection.EPSGCode, Projection.Label): New methods to provide
3309     access to EPSG code and a label for use in dialogs
3310    
3311     * Thuban/Model/resource.py (ProjFileReader.start_projection)
3312     (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
3313     Handle the epsg code attribute when reading or writing proj files
3314    
3315     * Thuban/UI/projdialog.py (ProjFrame._OnSave)
3316     (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
3317     (ProjFrame.__FillAvailList): Use the projection's Label method to
3318     get the string for the list box
3319    
3320     * test/test_proj.py (TestProjection.test_label)
3321     (TestProjection.test_label_epsg)
3322     (TestProjection.test_epsgcode_for_non_epsg_projection)
3323     (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
3324     for the label and EPSGCode methods
3325     (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
3326     (WriteProjFileTests.test_write_empty_file): Create the ProjFile
3327     objects in the test cases and put the expected contents into the
3328     test case methods too. Update doTestWrite accordingly
3329     (TestLoadingProjFile)
3330     (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
3331     read tests from TestProjFile.
3332     (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
3333     tests are now in the new classes.
3334     (sample_projfile, sample_projfile_data)
3335     (sample_projfile2, sample_projfile_data2): Removed. Not used
3336     anymore.
3337     (TestProjFile.test_read_unreadable_file): No need to reset the
3338     permissions at the end anymore since we use a unique filename
3339    
3340     2003-10-13 Bernhard Herzog <[email protected]>
3341    
3342 bh 1814 * test/test_proj.py: Some more refactoring of the test cases
3343     (ProjFileTest): New base class for the proj file tests.
3344     (TestProjFile): Derive from ProjFileTest
3345     (TestProjFile.test_read_unreadable_file)
3346     (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
3347     the new filename method to get a unique filename
3348     (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
3349     (WriteProjFileTests): New class for proj file write tests.
3350     Contains the write test that were in TestProjFile originally.
3351    
3352     2003-10-13 Bernhard Herzog <[email protected]>
3353    
3354 bh 1812 * test/test_proj.py (TestProjFile.testRead)
3355     (TestProjFile.test_read_non_existing_file)
3356     (TestProjFile.test_read_unreadable_file)
3357     (TestProjFile.test_read_empty_file): Split into several methods.
3358    
3359 bh 1805 2003-10-10 Bernhard Herzog <[email protected]>
3360    
3361 bh 1810 * Thuban/UI/sizers.py: New file with custom sizers.
3362    
3363     * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
3364     all projection type specific panels and put them into a
3365     NotebookLikeSizer. This way the dialog doesn't change its size
3366     when a different projection is selected
3367     (ProjFrame.__init__): Rename projection_panels
3368     projection_panel_defs and reuse projection_panels for a list of
3369     the instantiated panels.
3370     (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
3371     (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
3372     the panels
3373     (UnknownProjPanel._DoLayout): Place the newlines in the message
3374     differently to make the panel narrower.
3375     (TMPanel._DoLayout): Layout the parameters in one column.
3376    
3377     2003-10-10 Bernhard Herzog <[email protected]>
3378    
3379 bh 1807 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
3380     that contains all the setup for the dialog's widgets, layout and
3381     event handling.
3382     (__): Call build_dialog to build the dialog.
3383     (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
3384     Their functionality is now in build_dialog
3385     (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
3386     (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
3387     (ProjFrame.__DoOnProjChoice): Small updates due to slightly
3388     different widget names and hierarchy introduced with build_dialog.
3389    
3390     2003-10-10 Bernhard Herzog <[email protected]>
3391    
3392 bh 1805 * README: Fix typo.
3393    
3394 bh 1803 2003-10-09 Bernhard Herzog <[email protected]>
3395    
3396     * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
3397     projection is already in the list. This is *a lot* faster when
3398     loading files with hundreds of projections since it saves a linear
3399     search. OTOH this will allow adding the same projection to the
3400     user.proj file multiple times in the projection dialog but we'll
3401     deal with that later
3402    
3403 jan 1801 2003-10-09 Jan-Oliver Wagner <[email protected]>
3404    
3405     * devtools: New. Directory for developer tools that are not intended
3406     for the regular user.
3407    
3408     * devtools/create_epsg.py: New. Convert the epsg file of proj into
3409     a python .proj file.
3410    
3411 bh 1799 2003-10-09 Bernhard Herzog <[email protected]>
3412    
3413     * test/test_proj.py
3414     (TestProjection.test_get_parameter_without_equals_sign): New. Test
3415     whether GetParameter handles parameters without "=" sign correctly
3416    
3417     * Thuban/Model/proj.py (Projection.GetParameter): Handle
3418     parameters that do not contain a "=". Update the doc-string
3419    
3420 bh 1794 2003-10-08 Bernhard Herzog <[email protected]>
3421    
3422 bh 1796 * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
3423     length limit on the projname text control
3424    
3425     2003-10-08 Bernhard Herzog <[email protected]>
3426    
3427 bh 1794 * test/test_proj.py (TestProjection.test_get_projection_units_geo)
3428     (TestProjection.test_get_projection_units_normal): New. Tests for
3429     the Projection.GetProjectedUnits method
3430    
3431 jan 1792 2003-10-08 Jan-Oliver Wagner <[email protected]>
3432    
3433     * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
3434     Added missing 'val' parameter.
3435    
3436 bh 1788 2003-10-08 Bernhard Herzog <[email protected]>
3437    
3438 bh 1790 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
3439     projection type of the currently selected projection is not known,
3440     i.e. there's no panel for it, use the UnknownProjPanel
3441     (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
3442     the actual replacing of the proj panel into the new method
3443     _show_proj_panel.
3444     (UnknownProjPanel): Add doc-string.
3445     (UnknownProjPanel._DoLayout): Insert a newline into the text so
3446     that the panel is not so wide.
3447    
3448     2003-10-08 Bernhard Herzog <[email protected]>
3449    
3450 bh 1788 * Thuban/Model/resource.py (read_proj_file): Return the warnings
3451     too. Update the doc-string
3452     (get_proj_files): Removed. It wasn't used anywhere
3453     (get_system_proj_files, get_system_proj_file): Rename to
3454     get_system_proj_file and return the ProjFile object and not a list
3455     of ProjFile objects. Update the callers.
3456     (get_user_proj_files, get_user_proj_file): Rename to
3457     get_user_proj_file return the ProjFile object and not a list of
3458     ProjFile objects. Update the callers.
3459     (ProjFileReader.__init__): New instance variable for the warnings.
3460     Rename the __pf ivar to projfile. Update the methods referring to
3461     __pf
3462     (ProjFileReader.end_projection): Catch any errors raised when
3463     instantiating the projection and record that as an error. The
3464     projection will not be in the final ProjFile object.
3465     (ProjFileReader.GetWarnings): New method to return the warnings.
3466    
3467     * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
3468     show the warnings from the projfile reader
3469     (ProjFrame._OnImport): Deal with any warnings returned by
3470     read_proj_file
3471     (ProjFrame.__FillAvailList): Deal with any warnings returned by
3472     get_system_proj_file or get_user_proj_file.
3473    
3474     * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
3475     (TestProjFileWithInvalidParameters.file_contents): New test cases
3476     to test whether read_proj_file handles invalid projection
3477     parameters correctly
3478     (TestProjFile.test_get_system_proj_file): New. Simple test for
3479     resource.get_system_proj_file
3480    
3481 bh 1785 2003-10-07 Bernhard Herzog <[email protected]>
3482    
3483     * test/test_derivedshapestore.py
3484     (TestDerivedShapeStoreExceptions.tearDown): Clear the session
3485     properly so that the temporary directories get deleted correctly
3486    
3487 bh 1773 2003-10-06 Bernhard Herzog <[email protected]>
3488    
3489 bh 1783 Handle the title changes in a proper MVC way.
3490    
3491     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
3492     canvas' TITLE_CHANGED messages
3493     (MainWindow.update_title): New. Update the main window's title
3494     (MainWindow.__SetTitle): Removed. Use update_title instead.
3495     (MainWindow.SetMap): Use update_title instead of __SetTitle
3496     (MainWindow.RenameMap): Do change the window title explicitly
3497     here. That's handled in a proper MVC way now.
3498     (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
3499     messages
3500    
3501     * Thuban/Lib/connector.py (Conduit): New class to help classes
3502     that forward messages
3503    
3504     * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
3505     (ViewPort): Derive from Conduit instead of Publisher
3506     (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
3507     when calling the inherited versions
3508     (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
3509     methods to subscribe and unsubscribe map messages
3510     (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
3511     handle the map subscriptions
3512     (ViewPort.Map, ViewPort.map_projection_changed)
3513     (ViewPort.layer_projection_changed): Add or update doc-strings
3514    
3515     * test/test_connector.py (TestPublisher.test_issue_simple): Fix
3516     typo
3517     (MyConduit): Helper class for the Conduit test.
3518     (TestConduit): Test cases for Conduit
3519    
3520     * test/test_connector.py: Use support.run_tests as main.
3521    
3522     * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
3523     the TITLE_CHANGED messages
3524     (ViewPortTest.test_forwarding_title_changed): New test to check
3525     whether the viewport forwards the map's TITLE_CHANGED messages
3526     (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
3527     after the port's because the latter may require a still functional
3528     map.
3529    
3530     2003-10-06 Bernhard Herzog <[email protected]>
3531    
3532 bh 1777 * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
3533     doc-string
3534    
3535     2003-10-06 Bernhard Herzog <[email protected]>
3536    
3537 bh 1775 * test/test_viewport.py (ViewPortTest.setUp)
3538     (SimpleViewPortTest.test_init_with_size): Move the test for the
3539     initial size as a constructor parameter from ViewPortTest.setUp
3540     method to a new separate test in SimpleViewPortTest.
3541    
3542     2003-10-06 Bernhard Herzog <[email protected]>
3543    
3544 bh 1773 * test/test_viewport.py (MockView): New class derived from
3545     ViewPort with a mock implementation of GetTextExtent to be used in
3546     the test cases
3547     (ViewPortTest.setUp): Use MockView instead of ViewPort
3548    
3549     * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
3550     into what would be a "pure virtual function" in C++: always raise
3551     NotImplementedError. Mock implementations for test cases don't
3552     belong into the real code
3553    
3554 bh 1770 2003-10-02 Bernhard Herzog <[email protected]>
3555    
3556     * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
3557     close the dbf file we create so that it's contents have been
3558     written properly.
3559    
3560     * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
3561     libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
3562     Update to shapelib 1.2.10
3563    
3564 jan 1767 2003-10-01 Jan-Oliver Wagner <[email protected]>
3565    
3566     * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
3567     it annoys lintian which warns about these files not being
3568     executable. The #! isn't necessary here since if you absolutely
3569     must execute them you can always say "python <filename>".
3570    
3571 bh 1757 2003-09-26 Bernhard Herzog <[email protected]>
3572    
3573 bh 1760 * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
3574     only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
3575     is ported to a newer the import will fail, so it should be noticed
3576     immediately that this function is gone.
3577     Fixes RT#1919
3578    
3579     2003-09-26 Bernhard Herzog <[email protected]>
3580    
3581 bh 1757 Add a DTD for the projection files and make thuban write valid
3582     projection files
3583    
3584     * Resources/XML/projfile.dtd: New. DTD for thuban's projection
3585     files
3586    
3587     * Thuban/Model/resource.py (ProjFileSaver.write): Use
3588     'projectionlist' as the name in the document type declaration so
3589     that it matches the element type of the root element.
3590    
3591     * test/test_proj.py (sample_projfile, sample_projfile2): Use
3592     'projectionlist' as the name in the document type declaration just
3593     as it is done now in the files thuban would write
3594     (sample_projfile, sample_projfile_data): Fix spelling of
3595     "Mercator"
3596     (TestProjFile.doTestWrite): Validate the written and the expected
3597     XML data
3598     (TestProjFile): Derive from ValidationTest so that we can run xml
3599     validation tests
3600    
3601 bh 1751 2003-09-24 Bernhard Herzog <[email protected]>
3602    
3603     * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
3604     modify the list returned by map.Layers() in place since it is the
3605     actual list of layers used by the map.
3606    
3607 jan 1745 2003-09-23 Jan-Oliver Wagner <[email protected]>
3608    
3609     * Doc/manual/thuban-manual.xml: Added subsection to chapter
3610     Extensions to describe the extensions coming with the Thuban
3611     standard package (gns2shp and importAPR).
3612    
3613 bh 1743 2003-09-23 Bernhard Herzog <[email protected]>
3614    
3615     * libraries/thuban/wxproj.cpp (project_point): if there's an
3616     inverse but no forward projection, convert to degrees after
3617     applying the inverse projection. Fixes RT#2096
3618    
3619     * test/test_wxproj.py: New. Test cases for wxproj.so. One test
3620     implicitly tests for the fix to RT#2096
3621    
3622     * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
3623     Check that the sequences have the same lengths
3624    
3625     * Resources/Projections/defaults.proj (Geographic projection): Use
3626     a much more precise value for the to_meter attribute.
3627    
3628 bh 1737 2003-09-22 Bernhard Herzog <[email protected]>
3629    
3630     * test/support.py (initthuban): Make sure to unset the LANG env.
3631     var. so that tests that compare translated strings work. Solves RT
3632     #2094
3633    
3634 jan 1730 2003-09-22 Jan-Oliver Wagner <[email protected]>
3635    
3636 jan 1735 Small improvement of APR import.
3637    
3638     * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
3639     Added tests for text-ranges.
3640    
3641     * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
3642     returns a string object if the range is based on text.
3643    
3644     * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
3645     range retrieval.
3646    
3647     2003-09-22 Jan-Oliver Wagner <[email protected]>
3648    
3649 jan 1730 Initial version of the importAPR extension which is in
3650     experimental state.
3651    
3652     * /Extensions/importAPR/, /Extensions/importAPR/samples/,
3653     /Extensions/importAPR/test/: New directories.
3654    
3655     * /Extensions/importAPR/samples/README: New: Howto load the samples.
3656    
3657     * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
3658     file which refers to the Thuban Iceland demo data.
3659    
3660     * /Extensions/importAPR/test/README: New: Howto execute the tests.
3661    
3662     * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
3663    
3664     * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
3665     as in '.apr'-files.
3666    
3667     * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
3668     ODB Objects as in '.apr', '.avl' and other files.
3669    
3670     * /Extensions/importAPR/__init__.py: New: Init to make this
3671     directory a package.
3672    
3673     * /Extensions/importAPR/importAPR.py: New: Import a ArcView
3674     project file (.apr) and convert it to Thuban.
3675    
3676     2003-09-22 Jan-Oliver Wagner <[email protected]>
3677    
3678     * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
3679    
3680 jan 1720 2003-09-19 Jan-Oliver Wagner <[email protected]>
3681    
3682     * Doc/manual/thuban-manual.xml: Extended section 'Installation'
3683     with description on RPM installation and RPM binary package
3684     creation.
3685    
3686 bh 1718 2003-09-18 Bernhard Herzog <[email protected]>
3687    
3688     * setup.py (data_files): Only add the mo files if the Locales
3689     directory actually exists, so that setup.py works with a fresh CVS
3690     checkout
3691    
3692 jan 1716 2003-09-12 Jan-Oliver Wagner <[email protected]>
3693    
3694     * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
3695     in viewport, not anymore in view
3696    
3697 jan 1714 2003-09-04 Jan-Oliver Wagner <[email protected]>
3698    
3699     Introducing first Extension (gns2shp).
3700    
3701     * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
3702    
3703     * Extensions/__init__.py: New. init to make this dir a package.
3704    
3705     * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
3706    
3707     * Extensions/gns2shp/test/README: New. some info on this test directory.
3708    
3709     * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
3710    
3711     * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
3712     of Shapefile from GNS text file format
3713    
3714 jan 1705 2003-09-03 Jan-Oliver Wagner <[email protected]>
3715    
3716 jan 1707 Fix/workaround for bug #2019:
3717     https://intevation.de/rt/webrt?serial_num=2019
3718    
3719     * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
3720     (IdentifyView.__init__): Added another button that allows to
3721     stop the identify mode.
3722     (IdentifyView.OnStop): New. Stops the identify mode.
3723    
3724     2003-09-03 Jan-Oliver Wagner <[email protected]>
3725    
3726 jan 1705 Introducing a new exception dialog that allows to exit the
3727     application immediately.
3728     This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
3729    
3730     * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
3731    
3732     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
3733     Made strings available to translations. Exchanged the simple
3734     ScrolledMessageDialog by the new ExceptionDialog.
3735    
3736 bh 1694 2003-09-01 Bernhard Herzog <[email protected]>
3737    
3738 bh 1701 * NEWS: New. Summary of changes and release notes.
3739    
3740     * MANIFEST.in: Add NEWS
3741    
3742     2003-09-01 Bernhard Herzog <[email protected]>
3743    
3744 bh 1699 * MANIFEST.in: Correct the include statement for the mo-files and
3745     include the documentation too.
3746    
3747     * setup.py (data_files): Add the .mo files
3748     (setup call): Up to version 0.9.0
3749    
3750     2003-09-01 Bernhard Herzog <[email protected]>
3751    
3752 bh 1696 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
3753     parameter list to just parent and session
3754     (ChooseDBTableDialog.__set_properties): Removed. Setting the
3755     selection of empty list boxes is not allowed (and produces C++
3756     assertion errors) and the rest of the setup is better done in
3757     __init__ anyway.
3758     (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
3759     (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
3760     builtins True/False for booleans to avoid warnings from wxPython
3761    
3762     * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
3763     ChooseDBTableDialog constructor parameters.
3764    
3765     2003-09-01 Bernhard Herzog <[email protected]>
3766    
3767 bh 1694 * Thuban/Model/postgisdb.py
3768     (PostGISTable): Extend doc-string
3769     (PostGISTable._fetch_table_information): Set the column index
3770     correctly, pretending ignored columns don't exist.
3771    
3772     * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
3773     for postgis tables with data types not yet supported by thuban.
3774    
3775 bh 1692 2003-08-29 Bernhard Herzog <[email protected]>
3776    
3777     * HOWTO-Release: Tweak item about running the tests.
3778    
3779 jan 1690 2003-08-29 Jan-Oliver Wagner <[email protected]>
3780    
3781     * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
3782    
3783 bh 1688 2003-08-29 Bernhard Herzog <[email protected]>
3784    
3785     Add some missing parameters to projections. Proj complains about
3786     them on windows but for some reason not on Linux.
3787    
3788     * test/test_save.py (SaveSessionTest.testLayerProjection): Add
3789     missing required projection parameters
3790    
3791     * test/test_proj.py (TestProjFile.test): Add missing required
3792     projection parameters
3793    
3794     * test/test_load_0_8.py (TestLayerProjection.file_contents)
3795     (TestLayerProjection.test): Add missing required projection
3796     parameters and tests for them
3797    
3798     * test/test_load.py (TestLayerProjection.file_contents)
3799     (TestLayerProjection.test): Add missing required projection
3800     parameters and tests for them
3801    
3802     * test/test_layer.py (TestLayer.test_base_layer): Add missing
3803     required projection parameters
3804    
3805     2003-08-29 Bernhard Herzog <[email protected]>
3806    
3807     * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
3808     access the pj_errno because directly accessing pj_errno doesn't
3809     work on windows if the proj library is in a DLL
3810    
3811     * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
3812    
3813 bh 1672 2003-08-28 Bernhard Herzog <[email protected]>
3814    
3815 bh 1685 * test/test_proj.py: Import things from Thuban after calling
3816     initthuban
3817    
3818     * test/test_load.py (LoadSessionTest.filenames): New class
3819     variable with the filename attributes to normalize
3820     (LoadSessionTest.check_format): Pass self.filenames to
3821     sax_eventlist to normalize the filename attributes
3822    
3823     * test/xmlsupport.py: Add cvs keywords
3824     (SaxEventLister.__init__): New parameter filenames which indicates
3825     attributes that contain filenames
3826     (SaxEventLister.startElementNS): Normalize the filename attributes
3827     with os.path.normpath
3828     (sax_eventlist): New parameter filenames to pass through to
3829     SaxEventLister
3830    
3831     * test/test_derivedshapestore.py: Make this file callable as a
3832     program to execute the tests
3833     (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
3834     the session to self.session so that it gets destroyed properly
3835    
3836     * test/test_layer.py (TestLayer.tearDown): Call the session's
3837     Destroy method
3838    
3839     * test/test_map.py (TestMapBase.tearDown): Destroy self.session
3840     too if it exists
3841     (TestMapAddLayer.test_add_layer): Bind the session to self.session
3842     so that it gets destroyed properly
3843    
3844     * test/postgissupport.py (reason_for_not_running_tests): Add a
3845     test for the existence of popen2.Popen4.
3846    
3847     * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
3848     reliable way to destroy the sessions created in the test cases
3849     (SaveSessionTest.test_dbf_table): Bind the session to self.session
3850     so that it gets destroyed properly
3851     (SaveSessionTest.testLayerProjection): Bind the session to
3852     self.session so that it gets destroyed properly
3853    
3854     * test/test_session.py (UnreferencedTablesTests.tearDown): Make
3855     sure that the session is destroyed properly
3856    
3857     * test/test_shapefilestore.py: Make this callable as a program to
3858     execute the tests
3859    
3860     * test/test_scalebar.py: Remove unnecessary import of _ from
3861     Thuban
3862    
3863     * test/support.py (print_garbage_information): Call initthuban
3864     here because it may be called indirectly from test cases that test
3865     test support modules which do not use anything from thuban itself
3866     (ThubanTestProgram.runTests): Remove unnecessary debug print
3867    
3868     2003-08-28 Bernhard Herzog <[email protected]>
3869    
3870 bh 1672 * Thuban/version.py (longversion): Update to 0.9
3871    
3872     * Thuban/UI/mainwindow.py: Remove some unused imports
3873    
3874     * README: Add section about required additional software. Add date
3875     and revision CVS keywords
3876    
3877     * HOWTO-Release: Add item about the translations. Add date and
3878     revision CVs keywords and change formatting to match README a bit
3879     better
3880    
3881     * po/de.po: Update for 0.9
3882    
3883     * test/README: Tweak the wording a little because many tests are
3884     not really unittest.
3885    
3886 bh 1663 2003-08-27 Bernhard Herzog <[email protected]>
3887    
3888 bh 1665 As preparation for the 0.9 release, switch thuban files to a
3889     non-dev namespace
3890    
3891     * Thuban/Model/save.py (SessionSaver.write_session): Write files
3892     with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
3893     namespace
3894    
3895     * Thuban/Model/load.py (SessionLoader.__init__): Accept the
3896     http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
3897    
3898     * test/test_save.py (SaveSessionTest.dtd)
3899     (SaveSessionTest.testEmptySession)
3900     (SaveSessionTest.testSingleLayer)
3901     (SaveSessionTest.testLayerProjection)
3902     (SaveSessionTest.testRasterLayer)
3903     (SaveSessionTest.testClassifiedLayer)
3904     (SaveSessionTest.test_dbf_table)
3905     (SaveSessionTest.test_joined_table)
3906     (SaveSessionTest.test_save_postgis): Update for new namespace
3907    
3908     * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
3909     (TestLayerVisibility.file_contents, TestLabels.file_contents)
3910     (TestLayerProjection.file_contents)
3911     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3912     (TestPostGISLayer.file_contents)
3913     (TestPostGISLayerPassword.file_contents)
3914     (TestLoadError.file_contents, TestLoadError.test): Update for new
3915     namespace
3916    
3917     2003-08-27 Bernhard Herzog <[email protected]>
3918    
3919 bh 1663 Make the table interface distinguish between row ids (an integer
3920     that uniquely identifies a row) and row ordinals (a simple row
3921     count from 0 to NumRows() - 1)
3922    
3923     * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
3924     (PostGISTable.RowOrdinalToId): New methods to conver between row
3925     ids and row ordinals
3926     (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
3927     parameter row_is_ordinal to indicate whether the row parameter is
3928     the row id or the ordinal
3929    
3930     * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
3931     (TransientTableBase.RowOrdinalToId)
3932     (AutoTransientTable.RowIdToOrdinal)
3933     (AutoTransientTable.RowOrdinalToId): Same new methods as in
3934     PostGISTable.
3935     (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
3936     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
3937     Same new parameter as in PostGISTable.
3938    
3939     * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
3940     (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
3941     (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
3942     (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
3943     (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
3944     parameter as in PostGISTable.
3945    
3946     * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
3947     (DataTable.RowOrdinalToId): New methods to convert between row ids
3948     and row ordinals.
3949     (TableGrid.SelectRowById): New method to select a row based on its
3950     ID as opposed to its ordinal
3951     (DataTable.GetValue, TableGrid.OnRangeSelect)
3952     (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
3953     (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
3954     (LayerTableFrame.__init__): Convert between row ids and row
3955     ordinals as appropriate
3956    
3957     * test/postgissupport.py (PostGISDatabase.__init__): Add
3958     doc-string.
3959     (PostGISDatabase.initdb): The optional third item in a tuple in
3960     tables is now a (key, value) list with additional arguments to
3961     pass to upload_shapefile
3962     (upload_shapefile): New parameter gid_offset to allow gids that
3963     are not the same as the shapeids in the shapefile
3964     (PostgreSQLServer.get_default_static_data_db): Use the new
3965     gid_offset to make the gids in landmarks 1000 higher than the
3966     shapeids in the shapefile
3967    
3968     * test/test_viewport.py
3969     (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
3970     new shapeids in the landmarks table
3971    
3972     * test/test_transientdb.py
3973     (TestTransientTable.run_iceland_political_tests)
3974     (TestTransientTable.test_transient_joined_table): Add tests for
3975     the new table methods and new keywords arguments.
3976    
3977     * test/test_postgis_db.py
3978     (TestPostGISTable.test_read_row_as_dict_row_count_mode)
3979     (TestPostGISTable.test_read_value_row_count_mode)
3980     (TestPostGISTable.test_row_id_to_ordinal)
3981     (TestPostGISTable.test_row_oridnal_to_id): New test for the new
3982     table methods and the new arguments
3983     (TestPostGISShapestorePoint.test_shapes_in_region)
3984     (TestPostGISShapestorePoint.test_shape_raw_data)
3985     (TestPostGISShapestorePoint.test_shape_points)
3986     (TestPostGISShapestorePoint.test_shape_shapeid)
3987     (TestPostGISShapestorePoint.test_all_shapes)
3988     (TestPostGISTable.test_simple_query)
3989     (TestPostGISTable.test_simple_query)
3990     (TestPostGISTable.test_simple_query)
3991     (TestPostGISTable.test_read_value)
3992     (TestPostGISTable.test_read_row_as_dict): Adapt to the new
3993     shapeids in the landmarks table
3994    
3995     * test/test_memory_table.py
3996     (TestMemoryTable.test_read_row_as_dict_row_count_mode)
3997     (TestMemoryTable.test_read_value_row_count_mode)
3998     (TestMemoryTable.test_row_id_to_ordinal)
3999     (TestMemoryTable.test_row_oridnal_to_id): New test for the new
4000     table methods and the new arguments
4001    
4002     * test/test_dbf_table.py
4003     (TestDBFTable.test_read_row_as_dict_row_count_mode)
4004     (TestDBFTable.test_read_value_row_count_mode)
4005     (TestDBFTable.test_row_id_to_ordinal)
4006     (TestDBFTable.test_row_oridnal_to_id): New test for the new table
4007     methods and the new arguments
4008    
4009 bh 1659 2003-08-26 Bernhard Herzog <[email protected]>
4010    
4011 bh 1661 * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
4012     more postgis specific but much faster method to get the bounding
4013     box
4014    
4015     2003-08-26 Bernhard Herzog <[email protected]>
4016    
4017 bh 1659 * Thuban/Model/postgisdb.py (PostGISTable.Title)
4018     (PostGISShapeStore.AllShapes): Add these missing methods.
4019     (PostGISShapeStore.ShapesInRegion): No need to raise
4020     StopIteration. We can simply return
4021    
4022     * test/test_postgis_db.py (TestPostGISTable.test_title)
4023     (TestPostGISShapestorePoint.test_all_shapes): New tests for the
4024     new methods
4025    
4026 bh 1643 2003-08-25 Bernhard Herzog <[email protected]>
4027    
4028 bh 1657 * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
4029    
4030     * test/test_postgis_db.py (PolygonTests): New class containing
4031     those tests from TestPostGISShapestorePolygon that can also be
4032     used to test MUTLIPOLYGON tables
4033     (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
4034     so derive from that
4035     (TestPostGISShapestoreMultiPolygon): New class with tests for
4036     MUTLIPOLYGON tables
4037    
4038     * test/postgissupport.py (PostGISDatabase.initdb): Allow the
4039     tables argument to have tuples with three items to override the
4040     WKT type used.
4041     (PostgreSQLServer.get_default_static_data_db): Use the above to
4042     create a polygon table with MUTLIPOLYGONs
4043     (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
4044     (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
4045     coords_to*
4046     (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
4047     (wkt_converter): New. Map WKT types to converters
4048     (upload_shapefile): New parameter force_wkt_type to use a
4049     different WKT type than the default
4050    
4051     2003-08-25 Bernhard Herzog <[email protected]>
4052    
4053 bh 1655 * Thuban/UI/application.py
4054     (ThubanApplication.run_db_param_dialog): New. Suitable as a
4055     db_connection_callback. Main difference is that the dialog run
4056     from this method doesn't have a parent so it can be used even when
4057     there is no main window
4058     (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
4059     no db_connection_callback was given. This way the dialog pops up
4060     even when the .thuban file was given as a command line parameter.
4061    
4062     2003-08-25 Bernhard Herzog <[email protected]>
4063    
4064 bh 1653 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
4065     before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
4066     which leads to an effectively frozen X session because the user
4067     can only interact with the dialog but the mouse is still grabbed
4068     by the canvas.
4069     Also, call the tool's Hide method before MouseLeftUp because
4070     MouseLeftUp may change the tool's coordinates.
4071    
4072     2003-08-25 Bernhard Herzog <[email protected]>
4073    
4074 bh 1651 * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
4075     LoadCancelled exceptions and handle them by returning immediately.
4076    
4077     2003-08-25 Bernhard Herzog <[email protected]>
4078    
4079 bh 1649 GUI part of loading sessions with postgis connections which may
4080     require user interaction to get passwords or updated parameters
4081    
4082     * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
4083     bit nucer and be more generic.
4084     (DBFrame.OnAdd): Adapt to new DBDialog interface
4085    
4086     * Thuban/UI/application.py (ThubanApplication.OpenSession): New
4087     optional parameter db_connection_callback which is passed to
4088     load_session.
4089    
4090     * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
4091     Suitable as a db_connection_callback
4092     (MainWindow.OpenSession): Use self.run_db_param_dialog as the
4093     db_connection_callback of the application's OpenSession method
4094    
4095    
4096     2003-08-25 Bernhard Herzog <[email protected]>
4097    
4098 bh 1647 Basic loading of sessions containing postgis connections:
4099    
4100     * Thuban/Model/load.py (LoadError): Add doc-string
4101     (LoadCancelled): New exception class to indicate a cancelled load
4102     (SessionLoader.__init__): Add the db_connection_callback parameter
4103     which will be used by the loader to get updated parameters and a
4104     password for a database connection
4105     (SessionLoader.__init__): Add the new XML elements to the
4106     dispatchers dictionary
4107     (SessionLoader.check_attrs): Two new conversions, ascii to convert
4108     to a byte-string object and idref as a generic id reference
4109     (SessionLoader.start_dbconnection)
4110     (SessionLoader.start_dbshapesource): New. Handlers for the new XML
4111     elements
4112     (load_session): Add the db_connection_callback to pass through the
4113     SessionLoader
4114    
4115     * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
4116     New classes to test loading of sessions with postgis database
4117     connections.
4118    
4119     2003-08-25 Bernhard Herzog <[email protected]>
4120    
4121 bh 1645 * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
4122     replace it and the comment with __BuildDate__ by the Source: and
4123     Id: cvs keywords as used in the other files.
4124    
4125     2003-08-25 Bernhard Herzog <[email protected]>
4126    
4127 bh 1643 * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
4128     LoadError when a required attribute is missing. The code used to
4129     be commented out for some reason, but probably should have been
4130     active.
4131    
4132     * test/test_load.py (TestLoadError.test): Test the message in the
4133     LoadError too to make sure it really is about the missing
4134     attribute
4135    
4136 bh 1632 2003-08-22 Bernhard Herzog <[email protected]>
4137 bh 1641
4138     * test/test_save.py (SaveSessionTest.test_dbf_table)
4139     (SaveSessionTest.test_joined_table): Add XML validation tests.
4140    
4141     2003-08-22 Bernhard Herzog <[email protected]>
4142    
4143 bh 1639 Implement saving a session with a postgis connection
4144 bh 1632
4145 bh 1639 * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
4146     elements for database connections and shapestores using db
4147     connections
4148     (session): Add the dbconnections to the content model
4149    
4150     * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
4151     Write the db connections
4152     (SessionSaver.write_session): Call write_db_connections to write
4153     the connection before the data sources
4154     (SessionSaver.write_data_containers): Handle postgis shapestores
4155    
4156     * test/test_save.py (SaveSessionTest.thubanids)
4157     (SaveSessionTest.thubanidrefs): Update for new DTD
4158     (SaveSessionTest.test_save_postgis): New. Test saving a session
4159     with postgis connections
4160    
4161     * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
4162     (PostGISTable.TableName): New accessor methods for the connection
4163     and table name
4164    
4165     * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
4166     (TestPostGISTable.test_dbname): New methods to test the new
4167     PostGISConnection methods
4168    
4169     2003-08-22 Bernhard Herzog <[email protected]>
4170    
4171 bh 1637 * Thuban/Model/postgisdb.py (ConnectionError): New exception class
4172     for exceptions occurring when establishing a Database connection
4173     (PostGISConnection.connect): Catch psycopg.OperationalError during
4174     connects and raise ConnectionError.
4175    
4176     * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
4177     tests for database exceptions
4178    
4179     2003-08-22 Bernhard Herzog <[email protected]>
4180    
4181 bh 1635 Prepare the test suite for tests with required authentication
4182    
4183     * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
4184     variables with two predefined users/passwords, one for the admin
4185     and one for a non-privileged user.
4186     (PostgreSQLServer.createdb): Pass the admin name to initdb and add
4187     the non-privileged user to the database and set the admin password
4188     (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
4189     Better error reporting
4190     (PostgreSQLServer.connection_params)
4191     (PostgreSQLServer.connection_string): New methods to return
4192     information about how to connect to the server
4193     (PostgreSQLServer.execute_sql): New. Convenience method to execute
4194     SQL statements
4195     (PostgreSQLServer.require_authentication): Toggle whether the
4196     server requires authentication
4197     (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
4198     Add or alter users
4199     (PostGISDatabase.initdb): Pass the admin name one the
4200     subprocesses' command lines. Grant select rights on
4201     geometry_columns to everybody.
4202     (upload_shapefile): Use the admin name and password when
4203     connecting. Grant select rights on the new table to everybody.
4204    
4205     * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
4206     server's new methods to get the connection parameters.
4207    
4208     * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
4209     (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
4210     server's new methods to get the connection parameters.
4211    
4212     * test/test_postgis_db.py
4213     (TestPostGISConnection.test_gis_tables_empty)
4214     (TestPostGISConnection.test_gis_tables_non_empty)
4215     (PostGISStaticTests.setUp): Use the server's new methods to get
4216     the connection parameters.
4217    
4218     2003-08-22 Bernhard Herzog <[email protected]>
4219    
4220 bh 1632 * Thuban/UI/about.py (About.__init__): Add the psycopg version.
4221    
4222     * Thuban/version.py: Add psycopg version
4223    
4224     * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
4225     version of the psycopg module
4226    
4227     2003-08-22 Bernhard Herzog <[email protected]>
4228    
4229     * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
4230     (DBFrame.OnEdit): Removed because it's not used and wouldn't work
4231     at the moment. The functionality should probably be implemented
4232     some time, though.
4233 bh 1633 (DBFrame.OnRemove): Display a message if the connection can't be
4234     removed because it's still in use.
4235 bh 1632
4236 jan 1629 2003-08-22 Jan-Oliver Wagner <[email protected]>
4237    
4238     * Thuban/UI/about.py (About.__init__): split up the huge about
4239     text into elements/lists for easier translation. This fixes bug
4240     https://intevation.de/rt/webrt?serial_num=2058
4241     Also, made some forgotten string available for the i18n.
4242    
4243 bh 1627 2003-08-21 Bernhard Herzog <[email protected]>
4244    
4245     Make postgis support really optional including insensitive menu
4246     items.
4247    
4248     * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
4249     whether the postgis is supported.
4250    
4251     * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
4252     to make postgis support optional
4253    
4254     * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
4255     version of Thuban.Model.postgisdb.has_postgis_support
4256     (database_management command): Make it only sensitive if postgis
4257     is supported.
4258    
4259 jan 1623 2003-08-21 Jan-Oliver Wagner <[email protected]>
4260    
4261 jan 1626 * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
4262     (section Adding and Removing Layers): Added text and described
4263     multi-selection.
4264     (chapter Extensions): New.
4265    
4266     2003-08-21 Jan-Oliver Wagner <[email protected]>
4267    
4268 jan 1623 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
4269     settings to allow multiple files to load into the map.
4270     Also reduced selection to *.shp as a default.
4271    
4272 bh 1621 2003-08-20 Bernhard Herzog <[email protected]>
4273    
4274     Add dialogs and commands to open database connections and add
4275     database layers.
4276    
4277     * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
4278     method to open the database connection management dialog
4279     (MainWindow.AddDBLayer): New method to add a layer from a database
4280     (_has_dbconnections): New helper function to use for sensitivity
4281     (database_management command, layer_add_db command): New commands
4282     that call the above new methods.
4283     (main_menu): Add the new commands to the menu.
4284    
4285     * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
4286     (PostGISConnection.connect): Establish the actual connection in a
4287     separate method and call it in __init__. This makes it easier to
4288     override the behavior in test cases
4289     (PostGISConnection.BriefDescription): New method to return a brief
4290     description for use in dialogs.
4291    
4292     * test/test_postgis_db.py (NonConnection): DB connection that
4293     doesn't actually connect
4294     (TestBriefDescription): New class with tests for the new
4295     BriefDescription method
4296    
4297 jan 1619 2003-08-19 Jan-Oliver Wagner <[email protected]>
4298    
4299     Moved anything from extensions to libraries.
4300    
4301     * libraries: New.
4302    
4303     * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
4304    
4305     * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
4306     Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
4307     been moved here from thuban/extensions/pyprojection/
4308     See there in the Attic for the older history.
4309    
4310     * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
4311     dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
4312     shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
4313     have been moved here from thuban/extensions/pyshapelib/
4314     See there in the Attic for the older history.
4315    
4316     * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
4317     files have been moved here from thuban/extensions/shapelib/
4318     See there in the Attic for the older history.
4319    
4320     * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
4321     gdalwarp.cpp, wxproj.cpp: These files have been moved here from
4322     thuban/extensions/thuban/
4323     See there in the Attic for the older history.
4324    
4325     * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
4326    
4327     * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
4328     gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
4329    
4330     * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
4331     Moved to libraries/shapelib.
4332    
4333     * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
4334     shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
4335     ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
4336     Moved to libraries/pyshapelib.
4337    
4338     * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
4339     LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
4340     Moved to libraries/pyprojection.
4341    
4342     * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
4343    
4344     * extensions: Removed.
4345    
4346 bh 1606 2003-08-19 Bernhard Herzog <[email protected]>
4347    
4348 bh 1609 * test/test_viewport.py (ViewPortTest): We don't use the
4349     facilities of FileTestMixin so don't derive from it.
4350     (TestViewportWithPostGIS): New class with tests for using a
4351     viewport on a map with postgis layers.
4352    
4353     2003-08-19 Bernhard Herzog <[email protected]>
4354    
4355     Add the db connection management to the session.
4356    
4357     * Thuban/Model/session.py (Session.__init__): New instance
4358     variable db_connections
4359     (Session.AddDBConnection, Session.DBConnections)
4360     (Session.HasDBConnections, Session.CanRemoveDBConnection)
4361     (Session.RemoveDBConnection): New methods to manage and query the
4362     db connections managed by the session
4363     (Session.OpenDBShapeStore): New method to open a shapestore from a
4364     db connection
4365    
4366     * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
4367     messages for the db connection handling in the session
4368    
4369     * test/test_postgis_session.py: New. test cases for the session's
4370     db connection handling with postgis connections
4371    
4372     2003-08-19 Bernhard Herzog <[email protected]>
4373    
4374 bh 1606 Add very basic postgis database support and the corresponding test
4375     cases. The test cases require a PostgreSQL + postgis installation
4376     but no existing database. The database will be created
4377     automatically by the test cases
4378    
4379     * test/README: Add note about skipped tests and the requirements
4380     of the postgis tests.
4381    
4382     * Thuban/Model/postgisdb.py: New. Basic postgis database support.
4383    
4384     * test/test_postgis_db.py: New. Test cases for the postgis
4385     support.
4386    
4387     * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
4388     format
4389    
4390     * test/test_wellknowntext.py: New. Test cases for the
4391     wellknowntext parser
4392    
4393     * test/postgissupport.py: New. Support module for tests involving
4394     a postgis database.
4395    
4396     * test/support.py (execute_as_testsuite): Shut down the postmaster
4397     if it's still running after the tests
4398    
4399     * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
4400     well known text format
4401    
4402 jan 1604 2003-08-19 Jan-Oliver Wagner <[email protected]>
4403    
4404     * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
4405     message dialog.
4406    
4407 bh 1600 2003-08-18 Bernhard Herzog <[email protected]>
4408    
4409 bh 1602 * test/support.py (ThubanTestResult.printErrors): Indent the
4410     reason for the skips in the output to make it a bit more readable.
4411     (execute_as_testsuite): New helper function to run a test suite
4412     and print some more information.
4413     (run_tests): Use execute_as_testsuite to run the tests
4414    
4415     * test/runtests.py (main): Use execute_as_testsuite to run the
4416     tests
4417    
4418     2003-08-18 Bernhard Herzog <[email protected]>
4419    
4420 bh 1600 Fix some bugs in Thuban and the test suite that were uncovered by
4421     changes introduced in Python 2.3:
4422    
4423     * Thuban/Model/table.py (DBFTable.__init__): Make sure the
4424     filename is an absolute name
4425    
4426     * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
4427     filename is an absolute name
4428    
4429     * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
4430     unique filename to save to and use the correct relative filename
4431     in the expected output.
4432     (SaveSessionTest.test_dbf_table): Use the correct relative
4433     filename in the expected output.
4434    
4435     * test/test_layer.py (TestLayer.test_raster_layer): Update the
4436     test to check whether the filename is absolute.
4437    
4438 jan 1596 2003-08-18 Jan-Oliver Wagner <[email protected]>
4439    
4440     * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
4441    
4442 bh 1586 2003-08-15 Bernhard Herzog <[email protected]>
4443    
4444 bh 1594 Change the way shapes are returned by a shape store. The
4445     ShapesInRegion method returns an iterator over actual shape
4446     objects instead of a list of shape ids.
4447    
4448     * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
4449     id.
4450     (ShapefileStore.ShapesInRegion): Return an iterator over the
4451     shapes which yields shape objects instead of returning a list of
4452     shape ids
4453     (ShapefileStore.AllShapes): New. Return an iterator over all
4454     shapes in the shape store
4455     (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
4456    
4457     * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
4458     doc-string.
4459    
4460     * Thuban/UI/baserenderer.py
4461     (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
4462     layer_shapes and make it return an iterator containg shapes
4463     instead of a list of ids.
4464     (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
4465     layer_shapes() change
4466    
4467     * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
4468     (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
4469    
4470     * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
4471     changes in the ShapesInRegion return value.
4472     (ViewPort._get_hit_tester): Remove commented out code
4473    
4474     * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
4475     new return value.
4476     (SimpleShapeStore.AllShapes): New. Implement this method too.
4477    
4478     * test/test_layer.py (TestLayer.test_arc_layer)
4479     (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
4480     (TestLayer.test_point_layer_with_projection)
4481     (TestLayer.test_derived_store): Adapt to changes in the
4482     ShapesInRegion return value.
4483    
4484     * test/test_shapefilestore.py
4485     (TestShapefileStoreArc.test_shapes_in_region)
4486     (TestShapefileStorePolygon.test_shapes_in_region)
4487     (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
4488     in the ShapesInRegion return value.
4489     (TestShapefileStorePoint.test_all_shapes)
4490     (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
4491     methods
4492    
4493     * test/test_derivedshapestore.py
4494     (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
4495     the ShapesInRegion return value.
4496     (TestDerivedShapeStore.test_all_shapes)
4497     (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
4498     methods
4499    
4500     2003-08-15 Bernhard Herzog <[email protected]>
4501    
4502 bh 1592 Make the renderers deal correctly with raw vs. python level
4503     representation of shape geometries
4504    
4505     * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
4506     Return a flag useraw in addition to the callable and the parameter
4507     to indicate whether the callable can deal with the raw shape data
4508     or uses the higher level python lists of coordinates. The callable
4509     now should accept either the raw data or the return value of the
4510     shape's Points() method.
4511     (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
4512     change
4513     (BaseRenderer.projected_points): Instead of the shape id use the
4514     points list as parameter.
4515     (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
4516     (BaseRenderer.draw_point_shape): Adapt to projected_points()
4517     change and accept the points list as parameter instead of the
4518     shape id.
4519    
4520     * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
4521     the useraw flag as required by the BaseRenderer
4522     (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
4523     changes.
4524    
4525     * test/test_baserenderer.py
4526     (TestBaseRenderer.test_point_with_classification): New test for
4527     rendering a map with classifications.
4528    
4529     2003-08-15 Bernhard Herzog <[email protected]>
4530    
4531 bh 1590 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
4532     (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
4533     (ViewPort._get_hit_tester, ViewPort.projected_points)
4534     (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
4535     (ViewPort._find_label_at): Split the find_shape_at method into
4536     several new methods and use the functions in the hit-test module.
4537    
4538     * Thuban/UI/hittest.py: New module with Python-level hit-testing
4539     functions
4540    
4541     * test/test_hittest.py: New. Test for the new hittest module
4542    
4543     2003-08-15 Bernhard Herzog <[email protected]>
4544    
4545 bh 1588 * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
4546     projection to all corners of the bounding box to get a better
4547     approximation of the projected bounding box
4548    
4549     * test/test_layer.py (TestLayer.test_point_layer_with_projection):
4550     New. Test coordinate handling of a layer with a projection.
4551     Catches the bug fixed in Layer.ShapesInRegion
4552    
4553     2003-08-15 Bernhard Herzog <[email protected]>
4554    
4555 bh 1586 Move some of the mock objects in test_baserenderer into their own
4556     module so they can easily be used from other tests
4557    
4558     * test/mockgeo.py: New test helper module with some mock objects
4559     for geometry related things like shapes, shapestores and
4560     projections.
4561    
4562     * test/test_mockgeo.py: New. Tests for the new helper module
4563    
4564     * test/test_baserenderer.py: Some of the mock-objects are in
4565     mockgeo now.
4566    
4567 jan 1584 2003-08-12 Jan-Oliver Wagner <[email protected]>
4568    
4569     * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
4570    
4571 bh 1580 2003-08-12 Bernhard Herzog <[email protected]>
4572    
4573 bh 1582 * po/de.po: New. German translations by Bjoern Broscheit
4574    
4575     2003-08-12 Bernhard Herzog <[email protected]>
4576    
4577 bh 1580 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
4578     strings have to be one string literal.
4579    
4580 bh 1573 2003-08-11 Bernhard Herzog <[email protected]>
4581    
4582 bh 1578 * test/support.py (FloatComparisonMixin.assertPointListEquals):
4583     New. This method was used in various derived classes, but it's
4584     better to have it here.
4585    
4586     * test/test_shapefilestore.py
4587     (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
4588     FloatComparisonMixin
4589    
4590     * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
4591     It's now in FloatComparisonMixin
4592    
4593     * test/test_derivedshapestore.py
4594     (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
4595     in FloatComparisonMixin
4596    
4597     2003-08-11 Bernhard Herzog <[email protected]>
4598    
4599 bh 1573 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
4600     error message
4601    
4602 jan 1569 2003-08-08 Jan-Oliver Wagner <[email protected]>
4603    
4604 jan 1571 * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
4605     with version number.
4606     Changed title to reflect version number of Thuban.
4607    
4608     2003-08-08 Jan-Oliver Wagner <[email protected]>
4609    
4610 jan 1569 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
4611     the list corresponds to the "About" web page.
4612    
4613 bh 1567 2003-08-08 Bernhard Herzog <[email protected]>
4614    
4615     * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
4616     Make sure translated strings are recognized as one string literal.
4617    
4618     * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
4619     Make sure translated strings are recognized as one string literal.
4620    
4621     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
4622     translated strings are recognized as one string literal.
4623    
4624     * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
4625     sure translated strings are recognized as one string literal.
4626    
4627 bh 1556 2003-08-07 Bernhard Herzog <[email protected]>
4628    
4629 bh 1565 * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
4630     Simply delegates to the original shapestore.
4631    
4632     * test/test_derivedshapestore.py
4633     (TestDerivedShapeStore.test_raw_format): New. Test case for
4634     DerivedShapeStore.RawShapeFormat
4635    
4636     2003-08-07 Bernhard Herzog <[email protected]>
4637    
4638 bh 1561 Add raw data interface to shape objects.
4639    
4640     * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
4641     class to ShapefileShape which now holds shapefile specific
4642     information.
4643     (ShapefileShape.compute_bbox): Simplified to not cache any
4644     information. The way this method is used that shouldn't matter
4645     performance wise.
4646     (ShapefileShape.RawData): New. Return the shapeid which is the raw
4647     data format for shapes from shapefiles.
4648     (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
4649     in the shape objects returned by a shapestore. For a
4650     ShapefileStore this is always RAW_SHAPEFILE.
4651     (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
4652     method.
4653    
4654     * test/test_shapefilestore.py
4655     (TestShapefileStore.test_raw_format): New test to test the raw
4656     format feature of shapes.
4657    
4658 bh 1560 * Thuban/Model/layer.py: Remove the unused import of Shape from
4659     data. It was only there for interface compatibility but it's not
4660 bh 1561 used inside of Thuban and the generic Shape class has gone away.
4661 bh 1560
4662 bh 1563 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
4663     the raw data format and only use an optimized version of its a
4664     shapefile.
4665    
4666 bh 1561 2003-08-07 Bernhard Herzog <[email protected]>
4667    
4668 bh 1559 * test/test_baserenderer.py (SimpleShape): Shape class for the
4669     tests.
4670     (SimpleShapeStore.Shape): Use SimpleShape instead of
4671     Thuban.Model.data.Shape to make the tests independed of the coming
4672     changes.
4673    
4674     2003-08-07 Bernhard Herzog <[email protected]>
4675    
4676 bh 1556 * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
4677     (ThubanTestProgram): New classes that extend the respective
4678     classes from unittest. These new version support skipping tests
4679     under certain expected conditions. In the Thuban test suite we
4680     uses this for tests that require the optional gdal support.
4681     (run_tests): Use ThubanTestProgram instead of the unittest.main()
4682    
4683     * test/runtests.py (main): Use the new ThubanTestRunner instead of
4684     the normal one from unittest
4685    
4686     * test/test_layer.py (TestLayer.test_raster_layer): If this test
4687     is not run because gdal support isn't available report this to the
4688     runner.
4689    
4690     * test/test_baserenderer.py
4691     (TestBaseRenderer.test_raster_no_projection): Do not run this test
4692     if gdal support isn't available and report this to the runner.
4693    
4694 bh 1553 2003-08-06 Bernhard Herzog <[email protected]>
4695    
4696     Rearrange the renderers a bit, partly in preparation for changes
4697     required for the postgis merge, partly to make it more testable.
4698     Also make the representation of coordinates in Shapes more
4699     consistent.
4700    
4701     * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
4702     this class is now in BaseRenderer. This class is now practically
4703     only a specialization of BaseRenderer for rendering to an actual
4704     wx DC.
4705     (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
4706     to get the shapetype specific rendering functions.
4707    
4708     * Thuban/UI/baserenderer.py: New file with the basic rendering
4709     logic. The code in this file is completely independend of wx.
4710     (BaseRenderer): Class with the basic rendering logic
4711    
4712     * test/test_baserenderer.py: New. Test cases for BaseRenderer
4713    
4714     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
4715     error_on_redraw to guard agains endless loops and stack overflows
4716     when there's a bug in the rendering code that raises exceptions.
4717     (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
4718     rendering into a separate method _do_redraw so that error handling
4719     is a bit easier. When an exception occurs, set error_on_redraw to
4720     true. When it's true on entry to OnIdle do nothing and return
4721     immediately.
4722    
4723     * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
4724     Shape object will always have the coordinates as a list of list of
4725     coordinate pairs (tuples).
4726     (Shape.compute_bbox): Adapt to new representation.
4727    
4728     * Thuban/UI/viewport.py (ViewPort.find_shape_at)
4729     (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
4730     Shape objects.
4731    
4732     * test/test_shapefilestore.py
4733     (ShapefileStoreTests.assertFloatTuplesEqual)
4734     (ShapefileStoreTests.assertPointListEquals): Rename to
4735     assertPointListEquals and change purpose to checking equality of
4736     the lists returned by Shape.Points().
4737     (TestShapefileStoreArc.test_shape)
4738     (TestShapefileStorePolygon.test_shape)
4739     (TestShapefileStorePoint.test_shape): Use the new
4740     assertPointListEquals instead of assertFloatTuplesEqual
4741    
4742     * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
4743     (TestLayer.assertPointListEquals): Rename to assertPointListEquals
4744     and change purpose to checking equality of the lists returned by
4745     Shape.Points().
4746     (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
4747     (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
4748     (TestLayer.test_derived_store): Use the new assertPointListEquals
4749     instead of assertFloatTuplesEqual
4750    
4751     * test/test_derivedshapestore.py
4752     (TestDerivedShapeStore.assertFloatTuplesEqual)
4753     (TestDerivedShapeStore.assertPointListEquals): Rename to
4754     assertPointListEquals and change purpose to checking equality of
4755     the lists returned by Shape.Points().
4756     (TestDerivedShapeStore.test_shape): Use the new
4757     assertPointListEquals instead of assertFloatTuplesEqual
4758    
4759 jan 1550 2003-08-06 Jan-Oliver Wagner <[email protected]>
4760    
4761     * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
4762     a bounding box. A dialog is raised in case, no bounding box
4763     is found. This fixes bug #2043:
4764     https://intevation.de/rt/webrt?serial_num=2043
4765    
4766 bh 1548 2003-08-05 Bernhard Herzog <[email protected]>
4767    
4768     * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
4769     object look like a Color instantiation. Formerly it looked like a
4770     tuple.
4771    
4772     * test/test_color.py (TestColor.test_repr)
4773     (TestColor.test_equality, TestColor.test_inequality): New. test
4774     some more apects of the Color class
4775     (TestTransparent.test_repr, TestTransparent.test_hex)
4776     (TestTransparent.test_equality): New. Test cases for the
4777     Transparent object.
4778    
4779 jan 1545 2003-08-04 Jan-Oliver Wagner <[email protected]>
4780    
4781     * Doc/manual/thuban-manual.xml: a number of small improvements.
4782     The resulting file is the version submitted for GREAT-ER II.
4783    
4784 bh 1540 2003-08-01 Bernhard Herzog <[email protected]>
4785    
4786 bh 1543 * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
4787     Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
4788     Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
4789    
4790     * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
4791     (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
4792     (ThubanEndBusyCursor): Add doc-strings
4793    
4794     2003-08-01 Bernhard Herzog <[email protected]>
4795    
4796 bh 1540 First step towards PostGIS integration. More abstraction by movin
4797     more code from the layer to the shapestore. More methods of the
4798     layer are now simply delegated to the equivalent method of the
4799     shapestore. The SHAPETYPE_* constants are now in data not in
4800     layer.
4801    
4802     * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
4803     (SHAPETYPE_POINT, Shape): Move these constants and classes from
4804     layer.py to data.py
4805     (ShapefileStore.__init__): More Initialization for the new methods
4806     and functionality.
4807     (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
4808     (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
4809     (ShapefileStore.Shape): New methods that were formerly implemented
4810     in the layer.
4811     (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
4812     (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
4813     (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
4814     equivalents of the new shape methods. These versions are simply
4815     delegated to the original shapstore.
4816    
4817     * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
4818     (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
4819     (Layer.SetShapeStore): Removed the initializatin of instance
4820     variables that were needed for the stuff that's now in
4821     ShapefileStore
4822     (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
4823     (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
4824     shapestore.
4825    
4826     * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
4827     Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
4828     instead of layer.
4829    
4830     * test/test_shapefilestore.py: New. Tests for ShapefileStore.
4831    
4832     * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
4833    
4834     * test/test_layer.py: Import the SHAPETYPE_* constants from data
4835     instead of layer.
4836     (TestLayer.test_derived_store): Remove the test for the exception
4837     when instantiating the DerivedShapeStore with an incompatible
4838     table which is now in test_derivedshapestore.py. Add some more
4839     tests of the layer methods to determine whether they work for a
4840     DerivedShapeStore as well.
4841    
4842 jonathan 1534 2003-07-31 Jonathan Coles <[email protected]>
4843    
4844     * Doc/manual/thuban-manual.xml: Fix the list of required packages
4845     by just listing the name and where they can be found.
4846    
4847 frank 1532 2003-07-31 Frank Koormann <[email protected]>
4848    
4849     * Doc/manual/thuban-manual.xml:
4850     Changed the screenshot elements to figure.
4851     Changed some variablelist elements to itemizedlist.
4852     Added section on GDAL formats.
4853    
4854 jonathan 1531 2003-07-31 Jonathan Coles <[email protected]>
4855    
4856     * Doc/manual/thuban-manual.xml: Added a few sentences about
4857     the Fix Border Color option when generating classes.
4858    
4859 jonathan 1529 2003-07-30 Jonathan Coles <[email protected]>
4860    
4861     * Thuban/Model/classgen.py: Add docstrings. Rename specific
4862     Ramp instances to use lower_case_style.
4863    
4864     * Thuban/UI/classgen.py: Use renamed Ramp instances.
4865    
4866     * Thuban/UI/classifier.py: Add docstrings.
4867    
4868     * Thuban/UI/dock.py: Add docstrings.
4869    
4870     * test/test_classgen.py: Use renamed Ramp instances.
4871    
4872 bh 1522 2003-07-30 Bernhard Herzog <[email protected]>
4873    
4874 bh 1524 * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
4875     was never used in Thuban.
4876    
4877     2003-07-30 Bernhard Herzog <[email protected]>
4878    
4879 bh 1522 * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
4880     method directly instead of going through the transient_table
4881     method. This faster because transient_table may force the copy of
4882     a DBF file into the transient database and setting a table's title
4883     doesnm't affect the title of the associated transient table, so
4884     this fixes RT #2042
4885    
4886     * Thuban/UI/main.py (__version__): Don't import the already
4887     removed show_exception_dialog.
4888    
4889 jonathan 1517 2003-07-29 Jonathan Coles <[email protected]>
4890    
4891 jonathan 1519 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4892     Put back this method and remove the equivalent function since we
4893     are setting the exception hook from within this class (OnInit).
4894    
4895     2003-07-29 Jonathan Coles <[email protected]>
4896    
4897 jonathan 1517 * Doc/manual/images/5_2_custom_ramp.png,
4898     Doc/manual/images/5_2_quantiles.png,
4899     Doc/manual/images/5_2_uniform_dist.png,
4900     Doc/manual/images/5_2_unique_values.png,
4901     Doc/manual/images/8_int_error.png: New screen shots.
4902    
4903     * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
4904     some points, and added more screen shots.
4905    
4906 bh 1512 2003-07-29 Bernhard Herzog <[email protected]>
4907    
4908 bh 1516 * Thuban/Model/data.py: Remove the now unused import of warnings
4909    
4910     2003-07-29 Bernhard Herzog <[email protected]>
4911    
4912 bh 1514 * Thuban/Model/data.py (SimpleStore): Removed. This class has been
4913     deprecated since before the 0.8 release and isn't used in Thuban
4914     itself anymore.
4915    
4916 bh 1512 * Thuban/Model/transientdb.py: Remove some unnecessary imports
4917    
4918 jonathan 1503 2003-07-29 Jonathan Coles <[email protected]>
4919 jonathan 1506
4920     * Thuban/UI/application.py (ThubanApplication.OnInit): set the
4921     python exception hook here so that we are sure to catch any
4922     Thuban exception that happen during initialization.
4923    
4924     * Thuban/UI/main.py (main): Don't set the exception hook here,
4925     it will get set in ThubanApplication.OnInit.
4926    
4927     2003-07-29 Jonathan Coles <[email protected]>
4928 jonathan 1503
4929     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
4930     Removed and called it show_exception_dialog() so that the exception
4931     handler can be set before the class is created.
4932    
4933     * Thuban/UI/main.py (main): Install the exception handler before
4934     a ThubanApplication is created.
4935    
4936 bh 1500 2003-07-29 Bernhard Herzog <[email protected]>
4937    
4938     * po/it.po: New. Italian translation by Maurizio Napolitano
4939    
4940     * po/ru.po: New. Russian translation by Alex Shevlakov
4941    
4942 frank 1497 2003-07-29 Frank Koormann <[email protected]>
4943    
4944 frank 1508 * Doc/manual/thuban-manual.xml: Extended section on supported
4945     projections.
4946    
4947     2003-07-29 Frank Koormann <[email protected]>
4948    
4949 frank 1497 * Doc/manual/thuban-manual.xml: gaspell-checked.
4950    
4951 jonathan 1493 2003-07-29 Jonathan Coles <[email protected]>
4952    
4953 jonathan 1495 * Doc/manual/images/3_5_legend.png: Added border to improve look
4954     on white background.
4955    
4956     2003-07-29 Jonathan Coles <[email protected]>
4957    
4958 jonathan 1493 * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
4959     descriptions for the legend toolbar.
4960    
4961     * Doc/manual/images/4_2_raster_layer_properties.png: Removed
4962     cursor from dialog box.
4963    
4964     2003-07-28 Jonathan Coles <[email protected]>
4965    
4966     * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
4967    
4968     * Doc/manual/images/2_4_session_tree.png,
4969     Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
4970     Doc/manual/images/4_2_layer_properties.png,
4971     Doc/manual/images/4_2_raster_layer_properties.png,
4972     Doc/manual/images/5_3_genclass.png,
4973     Doc/manual/images/5_classification.png,
4974     Doc/manual/images/6_projection.png,
4975     Doc/manual/images/7_1_table_view.png,
4976     Doc/manual/images/7_2_5_join.png: New screenshots.
4977    
4978     2003-07-24 Jonathan Coles <[email protected]>
4979    
4980     * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
4981    
4982     2003-07-24 Jonathan Coles <[email protected]>
4983    
4984     * Doc/manual/thuban-manual.xml: Added EPS images and wrote
4985     chapter on Layer Management.
4986    
4987     * Doc/manual/Makefile: New. Makefile to generate all formats for the
4988     manual and images.
4989    
4990 bh 1483 2003-07-24 Bernhard Herzog <[email protected]>
4991    
4992     * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
4993     it annoys lintian which warns about these files not being
4994 jan 1767 executable. The #! isn't necessary here since if you absolutely
4995 bh 1483 must execute them you can always say "python <filename>".
4996    
4997     * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
4998     superfluous code to set brush and pen for point shapes
4999    
5000     * Thuban/UI/viewport.py: Remove commented out code that wouldn't
5001     belong in viewport anyway
5002    
5003 frank 1479 2003-07-24 Frank Koormann <[email protected]>
5004    
5005     * Doc/manual/thuban-manual.xml: Added section on table management.
5006    
5007 bh 1477 2003-07-24 Bernhard Herzog <[email protected]>
5008    
5009     * test/runtests.py (main): Recognize the long "verbose" option
5010     correctly.
5011    
5012 jonathan 1470 2003-07-22 Jonathan Coles <[email protected]>
5013    
5014     * Doc/manual/thuban-manual.xml: Continue to write first revision
5015     of the manual.
5016    
5017     * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
5018     with Begin/EndDrawing() calls to ensure we aren't doing to
5019     many updates to the dc during rendering.
5020     (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
5021     a pen and brush argument so they need to be passed to the function.
5022    
5023     * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
5024     Calculates the minimum and maximum scale values. Factored out
5025     of set_view_transform so that it could be used to zoom all the
5026     way into a single point.
5027     (ViewPort.set_view_transform): Call calc_min_max_scales().
5028     (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
5029     if only a single point is selected.
5030    
5031     * Doc/manual/images/1_2_legend_close.png,
5032     Doc/manual/images/1_2_legend_dock.png,
5033     Doc/manual/images/1_2_mainwindow.png,
5034     Doc/manual/images/1_2_mainwindow.ps,
5035     Doc/manual/images/1_2_mainwindow.sk,
5036     Doc/manual/images/3_2_fullextent.png,
5037     Doc/manual/images/3_2_fulllayerextent.png,
5038     Doc/manual/images/3_2_fullshapeextent.png,
5039     Doc/manual/images/3_2_pan.png,
5040     Doc/manual/images/3_2_zoomin.png,
5041     Doc/manual/images/3_2_zoomout.png,
5042     Doc/manual/images/3_3_identify.png,
5043     Doc/manual/images/3_3_label.png,
5044     Doc/manual/images/3_5_invisible.png,
5045     Doc/manual/images/3_5_movedown.png,
5046     Doc/manual/images/3_5_moveup.png,
5047     Doc/manual/images/3_5_props.png,
5048     Doc/manual/images/3_5_tobottom.png,
5049     Doc/manual/images/3_5_totop.png,
5050     Doc/manual/images/3_5_visible.png: New. Images for the documentation.
5051    
5052 bh 1451 2003-07-18 Bernhard Herzog <[email protected]>
5053    
5054 bh 1465 * Thuban/UI/messages.py (MAP_REPLACED): New message.
5055    
5056     * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
5057     after the new map has been assigned
5058    
5059     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
5060     Delegate MAP_REPLACED to the canvas too
5061     (MainWindow.prepare_new_session): Removed. Thanks to the new
5062     MAP_REPLACED message it's no longer needed
5063     (MainWindow.OpenSession, MainWindow.NewSession):
5064     prepare_new_session has been removed.
5065    
5066     * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
5067     MAP_REPLACED so that we can close the dialog if a new map is set.
5068     (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
5069     (Classifier.map_replaced): Handle MAP_REPLACED by closing the
5070     dialog
5071    
5072     * test/test_viewport.py (SimpleViewPortTest)
5073     (SimpleViewPortTest.test_default_size): Add doc-strings
5074     (ViewPortTest.setUp): Bind map to self.map so we can use it in
5075     tests. Subscribe to MAP_REPLACED messages too.
5076     (ViewPortTest.tearDown): No need to explicitly unsubscribe
5077     (ViewPortTest.test_set_map): New test for the SetMap method.
5078    
5079     2003-07-18 Bernhard Herzog <[email protected]>
5080    
5081 bh 1463 * test/test_viewport.py (SimpleViewPortTest.test_default_size):
5082     Move this test from ViewPortTest.setUp to this new separate test
5083     case. setUp is not the place for the actual tests.
5084     (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
5085     more of the test from setUp to the new test test_inital_settings.
5086     (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
5087     (ViewPortTest.test_proj_conv): Split test_proj_conv into
5088     test_win_to_proj and test_proj_to_win and make the tests easier to
5089     understand
5090     (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
5091     (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
5092     (ViewPortTest.test_unprojected_rect_around_point)
5093     (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
5094     Reformat to increase readability.
5095    
5096     2003-07-18 Bernhard Herzog <[email protected]>
5097    
5098 bh 1461 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
5099    
5100     2003-07-18 Bernhard Herzog <[email protected]>
5101    
5102 bh 1459 * test/runtests.py: The test suite can now be run without an X
5103     connection. To make sure this remains true, remove the DISPLAY
5104     environment variable so that an error occurs if the wxGTK is
5105     imported accidentally
5106    
5107     2003-07-18 Bernhard Herzog <[email protected]>
5108    
5109 bh 1457 * Thuban/UI/viewport.py: Remove unused imports
5110    
5111     * Thuban/UI/view.py: Remove unused imports
5112    
5113     2003-07-18 Bernhard Herzog <[email protected]>
5114    
5115 bh 1455 * test/test_export.py Remove unused imports. The OutputTransform
5116     function is now in viewport.py and is called output_transform
5117     (TestScalebar.test_output_transform)
5118     (TestScalebar.test_OutputTransform): Renamed to
5119     test_output_transform and updated to use output_transform instead
5120     of OutputTransform
5121    
5122     * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
5123     renamed.
5124     (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
5125     renamed to output_transform
5126    
5127     * Thuban/UI/viewport.py (OutputTransform, output_transform):
5128     Rename to output_transform
5129    
5130     2003-07-18 Bernhard Herzog <[email protected]>
5131    
5132 bh 1453 * Thuban/Model/layer.py (Layer.__init__): Rename
5133     classificationField to classificatin_column and init it here so
5134     that it can be used in SetClassificationColumn
5135     (Layer.GetClassificationColumn, Layer.GetClassificationField):
5136     Rename to GetClassificationColumn.
5137     (Layer.SetClassificationColumn, Layer.SetClassificationField):
5138     Rename to SetClassificationColumn and issue a LAYER_CHANGED
5139     message if the column changes.
5140     (Layer._classification_changed, Layer.ClassChanged): Rename to
5141     _classification_changed. Update the callers.
5142     (Layer.SetShapeStore): Further field->column renames.
5143    
5144     * Thuban/Model/load.py (SessionLoader.start_classification)
5145     (SessionLoader.start_clpoint): Updates because of
5146     field->column method name changes in the Layer class
5147    
5148     * Thuban/Model/save.py (SessionSaver.write_classification): Updates
5149     because of field->column method name changes in the Layer class
5150    
5151     * Thuban/UI/classifier.py (Classifier.__init__)
5152     (Classifier._OnTry, Classifier._OnRevert): Updates because of
5153     field->column method name changes in the Layer class
5154    
5155     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
5156     because of field->column method name changes in the Layer class
5157    
5158     * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
5159     of field->column method name changes in the Layer class
5160    
5161     * test/test_save.py (SaveSessionTest.testClassifiedLayer)
5162     (SaveSessionTest.testClassifiedLayer): Update because of
5163     field->column method name changes in the Layer class
5164    
5165     * test/test_layer.py (SetShapeStoreTests.setUp)
5166     (SetShapeStoreTests.test_sanity): Update because of field->column
5167     method name changes in the Layer class
5168     (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
5169     (TestLayerModification.test_sanity)
5170     (TestLayerModification.test_initial_settings): remove unsued code
5171     and rename to test_sanity.
5172     (TestLayerModification.test_set_classification): New test for
5173     SetClassification and SetClassificationField.
5174    
5175     2003-07-18 Bernhard Herzog <[email protected]>
5176    
5177 bh 1451 * test/test_classgen.py (TestFixedRamp.test): Extend test to check
5178     the non-fixed values as well. The old test would have accepted a
5179     fixed ramp that only returnes the fixed properties
5180    
5181 jonathan 1449 2003-07-17 Jonathan Coles <[email protected]>
5182    
5183     * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
5184     shots for the manual. The XCF file is the source image and
5185     has additional layers to support changes.
5186    
5187     * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
5188    
5189     * Thuban/UI/classifier.py (Classifier.__BuildClassification):
5190     Return both the new class and the field name.
5191    
5192     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
5193     fit the map to the window as this changes any zoom level that
5194     the user may have set.
5195    
5196 jonathan 1442 2003-07-16 Jonathan Coles <[email protected]>
5197    
5198     * Thuban/Model/classgen.py (generate_singletons,
5199     generate_uniform_distribution, generate_quantiles): Remove
5200     fixes parameter, but maintain the same functionality by having
5201     the calling function pass a FixedRamp object for the ramp.
5202     (FixedRamp): New. Adapts a ramp to have fixed property values.
5203    
5204     * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
5205     (Classification): Inherit from Publisher.
5206     (Classification.__init__): Remove the layer parameter.
5207     Classifications no longer need to have a parent layer.
5208     (Classification.GetField, Classification.GetFieldType,
5209     Classification.SetFieldInfo): Removed. The field name is stored
5210     in the layer, and the type can be retreived by calling
5211     Layer.GetFieldType().
5212     (Classification._set_layer, Classification.GetLayer): Removed.
5213     Classifications no longer have a parent layer.
5214    
5215     * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
5216     classification.
5217     (Layer.SetShapeStore): Reset the classification first while
5218     we still have the old shape store to work with.
5219     (Layer.GetClassificationField, Layer.SetClassificationField):
5220     New. Method for getting/setting the field to classify on.
5221     (Layer.SetClassification): Simplified now that the layer
5222     simply has to hold a reference to the classification and not
5223     tell the classification who owns it.
5224     Fixes RTbug #2023.
5225    
5226     * Thuban/Model/load.py (SessionLoader.start_classification):
5227     Set the field name on the layer, not the classification.
5228    
5229     * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
5230     classification is modified.
5231    
5232     * Thuban/Model/save.py (SessionSaver.write_classification):
5233     Get the field name and type from the layer.
5234    
5235     * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
5236     parameter records to rows and add docstring. Fixes RTbug #1997.
5237    
5238     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
5239     ramp when we need to fix certain values of a ramp rather than
5240     using the old fixes parameter. Fixes RTbug #2024.
5241    
5242     * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
5243     parameter.
5244     (ClassTable.Reset): Add fieldType parameter and use it, rather
5245     than asking the classification.
5246     (Classifier.__init__): Remember the original class's field
5247     and ask the layer for the field type, rather than the classification.
5248     (Classifier.__SetGridTable): Retrieve the field and field type
5249     for the table because they are not in the classification.
5250     (Classifier._OnTry, Classifier._OnRevert): Set the classification
5251     field on the layer in addition to the classification itself.
5252    
5253     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
5254     classification field from layer.
5255    
5256     * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
5257     classification field from layer. Split up tests and remove
5258     *-imports. Fixes RTbug #1992.
5259    
5260     * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
5261    
5262     * test/test_classification.py
5263     (TestClassification.test_classification): Remove tests for methods
5264     that no longer exist.
5265    
5266     * test/test_layer.py (SetShapeStoreTests.setUp): Classification
5267     __init__ no longer has a field parameter, use SetClassificationField.
5268     (SetShapeStoreTests.test_sanity): Use layer object to get class
5269     field info.
5270    
5271     * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
5272     SetClassificationField on layer to set class field info.
5273    
5274     * test/test_viewport.py: Renamed from test/test_view.py.
5275    
5276 jan 1424 2003-07-16 Jan-Oliver Wagner <[email protected]>
5277    
5278     * Doc/manual/thuban-manual.xml: Added authors and an initial
5279     coarse structure.
5280    
5281 bh 1418 2003-07-15 Bernhard Herzog <[email protected]>
5282    
5283 bh 1422 * test/support.py (FloatComparisonMixin): This is a mix-in class
5284     and therefore should not be derived from any other class.
5285    
5286     * test/test_range.py (RangeTest): FloatComparisonMixin is a
5287     mix-in, so derive from TestCase as well.
5288    
5289     2003-07-15 Bernhard Herzog <[email protected]>
5290    
5291 bh 1420 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
5292     draw_func handling a bit to remove one layer of indirection. This
5293     makes the renderer about 10% faster in the non-classifying case
5294     and the code a bit cleaner
5295     (MapRenderer.draw_point_shape): Add the pen and brush parameters
5296     and set them in the dc. Now the draw_point_shape method and
5297     wxproj's draw_polygon_shape function have basically the same
5298     signature so that both can be directly used as draw_func
5299    
5300     2003-07-15 Bernhard Herzog <[email protected]>
5301    
5302 bh 1418 * Thuban/Model/save.py (SessionSaver.write_classification): Encode
5303     string values (in addition to the labels) as UTF 8
5304    
5305     * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
5306     values if the field type is string
5307    
5308     * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
5309     saving a session with non-ascii string classification values.
5310    
5311     * test/test_load.py (TestClassification.file_contents)
5312     (TestClassification.test): Check for non-ascii values in string
5313     classifications
5314    
5315 jonathan 1416 2003-07-14 Jonathan Coles <[email protected]>
5316    
5317     * test/test_view.py: New. Tests for ViewPort.
5318    
5319 frank 1409 2003-07-14 Frank Koormann <[email protected]>
5320    
5321     * Thuban/Model/load.py (SessionLoader.start_map): Encode map
5322     title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
5323    
5324 frank 1411 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
5325     unicode strings from session file: session title, map title and
5326     projection name.
5327    
5328 jonathan 1403 2003-07-10 Jonathan Coles <[email protected]>
5329    
5330 jonathan 1406 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
5331     drag_stop, not drag_move when the mouse is released.
5332    
5333     2003-07-10 Jonathan Coles <[email protected]>
5334    
5335 jonathan 1403 The most important part of this is the seperation of view.py into
5336     two pieces. viewport.py now has a class called ViewPort which
5337     contains all the non-wx parts of view.py and can therefore be
5338     tested. view.py contains only the wx-specific parts and is fairly
5339     simple.
5340    
5341     * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
5342     RTTbug #1992.
5343     * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
5344     RTTbug #1992.
5345    
5346     * Thuban/Model/classgen.py (generate_singletons,
5347     generate_uniform_distribution, generate_quantiles):
5348     Added 'fixes' parameter so that property attributes can
5349     be held constant over the generated classification groups.
5350     (CustomRamp.GetProperties): Remove unused variables.
5351    
5352     * Thuban/Model/map.py (Map.SetProjection): Send the old
5353     projection as an argument to listeners of the MAP_PROJECTION_CHANGED
5354     event.
5355    
5356     * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
5357     parameter which is a list of records that restricts which
5358     records are saved. Fixes RTbug #1997.
5359    
5360     * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
5361     Port exception dialog from GREAT-ER. Fixes RTbug #1993.
5362    
5363     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
5364     to allow the user to fix line color/width on generated groups.
5365     (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
5366     functions to optionally fix group properties.
5367    
5368     * Thuban/UI/main.py (main): Set exception hook to the
5369     ShowExceptionDialog. Fixes RTbug #1993.
5370    
5371     * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
5372     the table window when it is selectd to be shown.
5373    
5374     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
5375     Export Selection button and move the export buttons underneath
5376     the table.
5377     (QueryTableFrame.UpdateStatusText): Added event argument so
5378     that it can respond to grid selection events. The status text
5379     is now updated even when the table is not associated with a
5380     layer as was previously assumed.
5381     (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
5382     UpdateStatusText responds to these events.
5383     (QueryTableFrame.OnSaveAs): Renamed to doExport.
5384     (QueryTableFrame.doExport): Helper function that saves the
5385     entire table, or selected rows, to a file.
5386     (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
5387     Respond to export button events and call doExport.
5388    
5389     * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
5390     the function doesn't return NULL without first setting a Python
5391     Error.
5392    
5393     * test/runtests.py (main): Only print "Unknown option" for
5394     unsupported options.
5395    
5396     * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
5397     optional epsilon argument to specify floating point accuracy.
5398     (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
5399     for each item test.
5400    
5401     * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
5402     tests for saving selected records.
5403    
5404     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
5405     tests for saving selected records.
5406    
5407     * test/test_map.py (TestMapWithContents.test_set_projection):
5408     MAP_PROJECTION_CHANGED events send the old projection.
5409    
5410     * test/test_session.py
5411     (TestSessionWithContent.test_forward_map_projection):
5412     MAP_PROJECTION_CHANGED events send the old projection.
5413    
5414     * test/test_table.py (TableTest): Update tests to use non-deprecated
5415     functions.
5416    
5417 bh 1376 2003-07-08 Bernhard Herzog <[email protected]>
5418    
5419 bh 1382 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
5420     constants in the column objects are the standard ones defined in
5421     the table module.
5422    
5423     * test/test_transientdb.py
5424     (TestTransientTable.test_transienttable_to_dbf): New. Test whether
5425     exporting transient tables as DBF works. This should catch the bug
5426     just fixed in TransientTableBase.Width.
5427    
5428     2003-07-08 Bernhard Herzog <[email protected]>
5429    
5430 bh 1380 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
5431     interpolated colors correctly.
5432    
5433     * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
5434     New. Test case for the fix in classgen.py
5435    
5436     2003-07-08 Bernhard Herzog <[email protected]>
5437    
5438 bh 1378 * test/runtests.py (main): Make the default output less verbose
5439     and add a verbosity option (-v) to get the old output
5440    
5441     2003-07-08 Bernhard Herzog <[email protected]>
5442    
5443 bh 1376 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
5444     0.9.
5445    
5446     * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
5447     New. Return the join type
5448    
5449     * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
5450     DTD
5451     (SessionSaver.write_data_containers): Save the join type for
5452     joined tables
5453    
5454     * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
5455     namespace
5456     (SessionLoader.start_jointable): Handle the jointype attribute
5457    
5458     * test/test_load_0_8.py: New. Effectively a copy of test_load.py
5459     as of Thuban 0.8. These are now tests to determine whether Thuban
5460     can still read files generated by Thuban 0.8
5461    
5462     * test/test_load.py (LoadSessionTest.dtd)
5463     (TestSingleLayer.file_contents)
5464     (TestLayerVisibility.file_contents, TestLabels.file_contents)
5465     (TestLayerProjection.file_contents)
5466     (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
5467     (TestJoinedTable.file_contents)
5468     (TestLoadError.file_contents): Update for new DTD
5469     (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
5470     for new join type attribute
5471    
5472     * test/test_save.py (SaveSessionTest.dtd)
5473     (SaveSessionTest.testEmptySession)
5474     (SaveSessionTest.testSingleLayer)
5475     (SaveSessionTest.testLayerProjection)
5476     (SaveSessionTest.testRasterLayer)
5477     (SaveSessionTest.testClassifiedLayer)
5478     (SaveSessionTest.test_dbf_table)
5479     (SaveSessionTest.test_joined_table): Update for new DTD
5480     (SaveSessionTest.test_joined_table): Add test for new join type
5481     attribute
5482    
5483 bh 1372 2003-07-04 Bernhard Herzog <[email protected]>
5484    
5485     * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
5486     function for table_to_dbf
5487     (table_to_dbf): Deal with names longer than the 10 character limit
5488    
5489     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
5490     doc-string
5491     (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
5492     long column names
5493    
5494 bh 1365 2003-07-03 Bernhard Herzog <[email protected]>
5495    
5496 bh 1370 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
5497    
5498     2003-07-03 Bernhard Herzog <[email protected]>
5499    
5500 bh 1368 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
5501     for the Thuban manual and README with some basic information about
5502     the manual
5503    
5504     2003-07-03 Bernhard Herzog <[email protected]>
5505    
5506 bh 1365 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
5507     Update doc-string
5508     (TransientJoinedTable.create): Do not modify the column objects of
5509     the input tables in place and copy all columns of the input tables
5510     into the joined table after all.
5511    
5512     * test/test_transientdb.py
5513     (TestTransientTable.test_transient_joined_table_same_column_name):
5514     Update to reflect the new behavior
5515     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
5516     Update to reflect the new behavior
5517     (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
5518     New test case for a bug which modified the column objects in place
5519    
5520 jonathan 1360 2003-07-02 Jonathan Coles <[email protected]>
5521 jonathan 1349
5522 jonathan 1360 * Thuban/Model/classgen.py (generate_singletons,
5523     generate_uniform_distribution, generate_quantiles,
5524 jonathan 1363 GenQuantiles0): Make sure maxValue isn't less than
5525     one, otherwise we could divide by zero.
5526    
5527     * test/test_classgen.py (ClassGenTest.doClassRangeTest,
5528     ClassGenTest.doClassSingleTest): Call doBoundsTest to
5529     check the end classification groups against the
5530     proper property values.
5531     (ClassGenTest.doBoundsTest): New. Checks the first and
5532     last classification groups to make sure their properties
5533     are the correct upper and lower bounds for a color ramp.
5534    
5535     2003-07-02 Jonathan Coles <[email protected]>
5536    
5537     * Thuban/Model/classgen.py (generate_singletons,
5538     generate_uniform_distribution, generate_quantiles,
5539 jonathan 1360 GenQuantiles0): The denominator was one to high when
5540     calculating the index for the ramp causing the index
5541     to never to reach one.
5542    
5543     2003-07-02 Jonathan Coles <[email protected]>
5544    
5545 jonathan 1358 Changed the singature of ClassGroupRange.__init__ and
5546     ClassGroupRange.SetRange() so that the min/max values are
5547     passed as a tuple. This makes a better calling scheme for
5548     when a Range object is passed instead.
5549    
5550     * Thuban/Model/classgen.py: Fixed parameters to
5551     ClassGroupRange constructor.
5552    
5553     * Thuban/Model/classification.py (ClassGroupRange.__init__):
5554     Consolidate the min/max parameters into a single _range which
5555     can either be a tuple or a Range object.
5556     (ClassGroupRange.SetRange): Consolidate the min/max parameters
5557     into a single _range which can either be a tuple or a Range object.
5558    
5559     * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
5560     call to ClassGroupRange constructor to use a tuple.
5561    
5562     * Thuban/Model/layer.py (Layer.SetClassification): Switch
5563     the classification instance variable to the new class
5564     before calling _set_layer otherwise subscribers to a
5565     LAYER_CHANGED event will not see any difference.
5566    
5567     * test/test_classification.py: Fix tests of ClassGroupRange
5568     so that they use the new signature.
5569    
5570     * test/test_load.py: Fix use of ClassGroupRange so that it
5571     uses the new signature.
5572    
5573     * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
5574     uses the new signature.
5575    
5576     * test/test_save.py: Fix use of ClassGroupRange so that it
5577     uses the new signature.
5578    
5579    
5580     2003-07-01 Jonathan Coles <[email protected]>
5581    
5582 jonathan 1349 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
5583     Import used objects/class from color.
5584     (generate_singletons): We don't
5585     need the numGroups parameter anymore because we are using
5586     the new ramps with GetProperties().
5587     (generate_uniform_distribution): Use new ramp method
5588     GetProperties().
5589     (generate_quantiles, GenQuantiles0): Use new ramp method
5590     GetProperties().
5591     (CustomRamp.SetNumGroups): Removed. The ramps now map
5592     a value from 0 to 1 to class properties so the number
5593     of groups is not needed ahead of time.
5594     (CustomRamp.next): Removed. CustomRamp does not support
5595     interation anymore.
5596     (CustomRamp.GetProperties): Returns a ClassGroupProperties
5597     object based on the index value from 0 to 1 that is
5598     passed to it.
5599     (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
5600     Made into instances of Monochromatic class instread of
5601     deriving from it.
5602     (HotToCold.SetNumGroups): Removed. See CustomRamp.
5603     (HotToCold.next): Removed. See CustomRamp.
5604    
5605     * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
5606     (Classification.SetField, Classification.SetFieldType):
5607     Replaced with SetFieldInfo.
5608     (Classification.SetFieldInfo): New. Does a better job of
5609     what SetField and SetFieldType used to do by combining
5610     their function since they should really always be done
5611     at the same time.
5612     (Classification.SetLayer): Renamed to _set_layer.
5613     (Classification._set_layer): Should only be called from
5614     Layer's SetClassification. This does not cause a recursive
5615     call as SetLayer did because we know that Layer knows about
5616     the classification.
5617    
5618     * Thuban/Model/color.py: Fixes RTbug #1971.
5619     (_Transparent): Renamed from Transparent so it doesn't
5620     conflict with the module variable.
5621     (Transparent, Black): Renamed from Color.Transparent,
5622     Color.Black so they are not class variables.
5623    
5624     * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
5625     (Layer.Destroy): We don't need to call SetClassification
5626     anymore to clear out the back reference in the classifcation
5627     to the layer. It's better to set it to None using _set_layer,
5628     and we won't be creating another clas object too.
5629     (Layer.SetClassification): Classification._set_layer is not
5630     recursive so remove all the locking variables. Also clean
5631     up the code so that it remains unchanged if something fails.
5632    
5633     * Thuban/Model/load.py: Fixes RTbug #1971.
5634     (SessionLoader.start_classification): Call
5635     Classification.SetFieldInfo().
5636    
5637     * Thuban/Model/save.py: Removed import of Color which wasn't
5638     being used.
5639    
5640     * Thuban/UI/classgen.py: Fixes RTbug #1972.
5641     (ClassGenDialog.__init__): Color ramps are now instances
5642     already so we don't need to create any new objects.
5643     (ClassGenDialog.OnOK): Check for numGroups is no longer
5644     necessary because we never use it.
5645    
5646     * Thuban/UI/classifier.py: Fixes RTbug #1971.
5647     (Classifier.__BuildClassification, Classifier.__SetGridTable):
5648     Call Classification.SetFieldInfo() instead of SetFieldType.
5649    
5650     * Thuban/UI/renderer.py: Fixes RTbug #1971.
5651    
5652     * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
5653     (MapCanvas.__init__): Subscribe to the idle time event. Set
5654     background color to white.
5655     (MapCanvas.OnPaint): Set a flag indicating that we should
5656     render the map during idle time. If we already have a bitmap
5657     just draw it now.
5658     (MapCanvas.OnIdle): New. Render the map only during idle time.
5659     This also fixes a problem with the busy cursor under gtk.
5660    
5661     * test/test_classgen.py (ClassGenTest.test_generate_singletons):
5662     Fix calls to generate_singletons because the signature changed.
5663    
5664     * test/test_classification.py: Fix color references and
5665     change calls to Classification.[SetField|SetFieldType] to
5666     SetFieldInfo.
5667    
5668     * test/test_load.py: Fix color references.
5669    
5670     * test/test_load_0_2.py: Fix color references.
5671    
5672     * test/test_save.py (SaveSessionTest.testClassifiedLayer):
5673     Change calls to Classification.[SetField|SetFieldType] to
5674     SetFieldInfo.
5675    
5676 frank 1334 2003-07-01 Frank Koormann <[email protected]>
5677    
5678     MERGE from the greater-ms3 branch.
5679    
5680     * test/test_transientdb.py
5681     (TestTransientTable.test_transient_joined_table_with_equal_column_names):
5682     New. Test join of two tables with partly equal column names.
5683    
5684     * Thuban/Model/transientdb.py (TransientJoinedTable.create):
5685     If duplicates in left and right tables column names are found,
5686     append '_' (underscores) to the name until it is unique.
5687     Create always new internal names for the resulting table and reference
5688     columns in the join statement with <table>.<column>
5689    
5690 bh 1329 2003-07-01 Bernhard Herzog <[email protected]>
5691    
5692     * test/test_transientdb.py
5693     (TestTransientTable.test_transient_joined_table_same_column_name):
5694     New. Test whether joining on columns with the same names in both
5695     tables works.
5696 frank 1334
5697 bh 1329 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
5698     sure to use the right internal names even when joining on field
5699     with the same names in both tables. Also, detect duplicate names
5700     in the joined table correctly.
5701    
5702 frank 1325 2003-07-01 Frank Koormann <[email protected]>
5703    
5704     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
5705     Reverse List of layers to render in same order as in desktop legend.
5706    
5707 jonathan 1318 2003-06-30 Jonathan Coles <[email protected]>
5708    
5709 jonathan 1349 * Thuban/version.py (make_tuple): Takes a version string
5710     and splits it into a tuple of at most three integers.
5711     Used make_tuple() to make tuple versions of the version
5712     numbers.
5713    
5714     * Thuban/UI/about.py: Add Thuban email addresses.
5715    
5716     2003-06-30 Jonathan Coles <[email protected]>
5717    
5718 jonathan 1320 * Thuban/version.py: SQLite/PySQLite version dependencies
5719     were too high.
5720    
5721     2003-06-30 Jonathan Coles <[email protected]>
5722    
5723 jonathan 1318 * Thuban/version.py: Update version to 0.8.1
5724    
5725     * MANIFEST.in: Added Projections so that default.proj is
5726     included.
5727    
5728 jonathan 1312 2003-06-26 Jonathan Coles <[email protected]>
5729    
5730     New About box with lots more information including library
5731     versions and credits. More/better version checking before
5732     Thuban starts.
5733    
5734     * Thuban/UI/about.py: New. New About box that displays
5735     library version information and credits.
5736    
5737     * Thuban/version.py: Added new 'versions' dictionary which
5738     contains the verions of various libraries which are checked
5739     when the module loads.
5740     (verify_versions): Check all version numbers and returns
5741     a list of errors.
5742    
5743     * Thuban/UI/classifier.py (Classifier.__EnableButtons):
5744     Reset the status of the buttons as the situation warrants,
5745     but in a better more reliable way by not relying on the
5746     current status to determine what needs to change.
5747    
5748     * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
5749     (verify_versions): Remove most of the code since it is
5750     now in Thuban.version.verify_versions.o
5751    
5752     * Thuban/UI/mainwindow.py (MainWindow.About): Call new
5753     About box in Thuban.UI.about.
5754    
5755     * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
5756     Returns the version of gdal library being used as a string.
5757    
5758     * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
5759     Removed.
5760     (get_proj_version): Return the version of PROJ that the file
5761     was compiled with.
5762     (get_gtk_version): Return th version of GTK that the file
5763     was compiled with.
5764    
5765 jonathan 1304 2003-06-25 Jonathan Coles <[email protected]>
5766    
5767     * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
5768     of the SelectPropertiesDialog should be self so the window
5769     appears on top.
5770     (ClassGroupPropertiesCtrl.DoEdit): The parent
5771     of the SelectPropertiesDialog should be self so the window
5772     appears on top.
5773    
5774     * Thuban/UI/resource.py: Cleaned up how we determine file
5775     extensions.
5776     (GetImageResource): Return an wxImage from our Resources.
5777    
5778 jonathan 1299 2003-06-24 Jonathan Coles <[email protected]>
5779    
5780     * Thuban/UI/renderer.py (ExportRenderer.render_legend):
5781     Check that a layer has a classification before trying
5782     to get it. Raster layers don't have classifications.
5783    
5784 jonathan 1286 2003-06-23 Jonathan Coles <[email protected]>
5785 jonathan 1297
5786     * setup.py: Add Resources/XML to resource list.
5787    
5788     2003-06-23 Jonathan Coles <[email protected]>
5789 jonathan 1286
5790 jonathan 1297 * setup.cfg: Fix copyright dates
5791    
5792     2003-06-23 Jonathan Coles <[email protected]>
5793    
5794 jonathan 1294 * MANIFEST.in: Update with Resources/XML
5795    
5796     * setup.py: Don't include Locale resources yet as we don't
5797     have any and it causes problems building the distribution
5798     for Windows. Update version to 0.8.0.
5799    
5800     * Doc/thuban.dtd: Removed since it is now in Resources/XML.
5801    
5802     * Thuban/UI/mainwindow.py: Add blank line at the end because
5803     file was not being read correctly building the Windows
5804     distribution.
5805    
5806     2003-06-23 Jonathan Coles <[email protected]>
5807    
5808 jonathan 1289 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
5809    
5810     * Thuban/version.py: Temporarily update longversion for
5811     the 0.8 release so that it doesn't have the cvs revision.
5812    
5813     2003-06-23 Jonathan Coles <[email protected]>
5814    
5815 jonathan 1286 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
5816     to make sure that we don't create reentrant possibilities with
5817     wxYield.
5818    
5819     * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
5820     directly to avoid the wxSafeYield() call which generates an
5821     OnPaint event causing infinite recursion. Don't try to catch
5822     exception anymore. This was for before there were limits on map
5823     scaling.
5824    
5825 bh 1283 2003-06-23 Bernhard Herzog <[email protected]>
5826    
5827     Bug fix for RT #1961:
5828    
5829     * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
5830     Register DerivedShapestores with the session
5831    
5832     * Thuban/Model/session.py (Session.Tables): Make sure each table
5833     is only listed once.
5834    
5835     * test/test_load.py (TestJoinedTable.test): Add check_format call.
5836     Update file contents to match the one written out.
5837    
5838 bh 1281 2003-06-20 Bernhard Herzog <[email protected]>
5839    
5840     * test/xmlsupport.py (SaxEventLister.startElementNS)
5841     (SaxEventLister.endElementNS): Do not include the qname. Python
5842     2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
5843     is (presumably incorrectly) None, whereas it's a string with the
5844     element name in the later versions.
5845    
5846     * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
5847     (TestEventList.test_even_list_namespace): Update tests to reflect
5848     the new behaviour
5849     (TestEventList.test_even_list_id_normalization): Fix doc-string
5850    
5851 jonathan 1272 2003-06-20 Jonathan Coles <[email protected]>
5852    
5853 jonathan 1279 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
5854     by deriving classes to determine if that layer supports shapes.
5855     (Layer): Override HasShapes and return true.
5856    
5857     * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
5858     instead of a direct call to wx[Begin|End]CusyCursor().
5859     (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
5860     table data.
5861    
5862     * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
5863     New. Wrappers around the wxWindows functions that allow us to
5864     make additional calls such as wxYield which gives the native
5865     system a chance to update the cursor correctly.
5866    
5867     * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
5868     instead of a direct call to wx[Begin|End]CusyCursor().
5869    
5870     * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
5871     instead of a direct call to wx[Begin|End]CusyCursor().
5872     (MapCanvas.find_shape_at): Check if the current search layer
5873     support shapes, otherwise go on to the next layer.
5874    
5875     * test/test_layer.py: Add tests in each type of layer for
5876     HasClassification() and HasShapes()
5877    
5878     2003-06-20 Jonathan Coles <[email protected]>
5879    
5880 jonathan 1272 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
5881     turning on the busy cursor to allow the system to change the
5882     cursor before we begin painting. This fixes a problem that
5883     was occuring only under GTK. Fixes RTbug #1840.
5884    
5885 bh 1270 2003-06-20 Bernhard Herzog <[email protected]>
5886    
5887     * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
5888     version.
5889    
5890     * Thuban/Model/save.py (sort_data_stores): New. Make topological
5891     sort of the data sources so they can be written with sources that
5892     data sources that depend on other data sources come after the
5893     sources they depend on.
5894     (SessionSaver.__init__): Add idmap instance variable to map from
5895     objects to the ids used in the file.
5896     (SessionSaver.get_id, SessionSaver.define_id)
5897     (SessionSaver.has_id): New. Methods to manage the idmap
5898     (SessionSaver.write): Use thuban-0.8.dtd
5899     (SessionSaver.write_session): Add a namespace on the session and
5900     write out the data sources before the maps.
5901     (SessionSaver.write_data_containers): New. Write the data
5902     containers.
5903     (SessionSaver.write_layer): Layer elements now refer to a
5904     shapestore and don't contain filenames anymore.
5905    
5906     * Thuban/Model/load.py (LoadError): Exception class to raise when
5907     errors in the files are discovered
5908     (SessionLoader.__init__): Define dispatchers for elements with a
5909     thuban-0.8 namespace too.
5910     (SessionLoader.check_attrs): New helper method to check and
5911     convert attributes
5912     (AttrDesc): New. Helper class for SessionLoader.check_attrs
5913     (SessionLoader.start_fileshapesource)
5914     (SessionLoader.start_derivedshapesource)
5915     (SessionLoader.start_filetable, SessionLoader.start_jointable):
5916     Handlers for the new elements in the new fileformat
5917     (SessionLoader.start_layer): Handle the shapestore attribute in
5918     addition to filename.
5919     (SessionLoader.start_table, SessionLoader.end_table): Removed.
5920     They were never used in the old formats and aren't needed for the
5921     new.
5922    
5923     * Thuban/Model/session.py (Session.DataContainers): New method to
5924     return all "data containers", i.e. shapestores and tables
5925    
5926     * test/xmlsupport.py (SaxEventLister.__init__)
5927     (SaxEventLister.startElementNS, sax_eventlist): Add support to
5928     normalize IDs.
5929    
5930     * test/test_xmlsupport.py
5931     (TestEventList.test_even_list_id_normalization): New test case for
5932     id normalization
5933    
5934     * test/test_load.py (LoadSessionTest.check_format): Use ID
5935     normalization
5936     (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
5937     class atrributes used for ID normalization
5938     (TestSingleLayer, TestLayerVisibility, TestLabels.test)
5939     (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
5940     file format
5941     (TestJoinedTable): New test for loading sessions with joined
5942     tables.
5943     (TestLoadError): New. Test whether missing required attributes
5944     cause a LoadError.
5945    
5946     * test/test_save.py (SaveSessionTest.thubanids)
5947     (SaveSessionTest.thubanidrefs): New class attributes for ID
5948     normalization in .thuban files.
5949     (SaveSessionTest.compare_xml): Use id-normalization.
5950     (SaveSessionTest.testEmptySession)
5951     (SaveSessionTest.testLayerProjection)
5952     (SaveSessionTest.testRasterLayer)
5953     (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
5954     (SaveSessionTest.testLayerProjection): The filename used was the
5955     same as for testSingleLayer. Use a different one.
5956     (SaveSessionTest.test_dbf_table)
5957     (SaveSessionTest.test_joined_table): New test cases for saving the
5958     new data sources structures.
5959     (TestStoreSort, MockDataStore): Classes to test the sorting of the
5960     data stores for writing.
5961    
5962     * test/runtests.py: Add CVS keywords
5963    
5964 jonathan 1265 2003-06-20 Jonathan Coles <[email protected]>
5965    
5966 jonathan 1267 * test/test_session.py
5967     (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
5968     Use the cultural_landmark-point.dbf file for the store so that
5969     the table rows and shape count match.
5970    
5971     2003-06-20 Jonathan Coles <[email protected]>
5972    
5973 jonathan 1265 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
5974     an exception if the number of shapes is different from the
5975     number of rows in the table. Address RTbug #1933.
5976    
5977     * test/test_layer.py (TestLayer.test_derived_store): Add
5978     a test for the new exception in DerivedShapeStore.__init__.
5979    
5980     * test/support.py (FloatTestCase): Removed since there is
5981     already FloatComparisonMixin. Fixes RTbug #1954.
5982     (FloatComparisonMixin.assertFloatEqual): Include test for
5983     infinity that was part of FloatTestCase.
5984    
5985     * test/test_range.py (RangeTest): Inherit from
5986     support.FloatComparisonMixin now that we don't have
5987     support.FloatTestCase.
5988    
5989 bh 1256 2003-06-20 Bernhard Herzog <[email protected]>
5990    
5991 bh 1260 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
5992     the implementation in xmlsupport instead.
5993     (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
5994    
5995     * test/test_proj.py: Import sax_eventlist from xmlsupport instead
5996     of test_save
5997    
5998     2003-06-20 Bernhard Herzog <[email protected]>
5999    
6000 bh 1258 * test/test_load.py (LoadSessionTest.check_format): New helper
6001     method to make sure the test files we load might have been written
6002     by the current thuban version.
6003     (ClassificationTest.TestLayers, TestSingleLayer.test)
6004     (TestLayerVisibility.test, TestClassification.test)
6005     (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
6006     Add check_format() calls and fix the thuban data to match the data
6007     that would be written by saving the session loaded from it.
6008    
6009     * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
6010     the same class and function in test_save.
6011    
6012     * test/test_xmlsupport.py (TestEventList): New. test cases for
6013     sax_eventlist
6014    
6015     2003-06-20 Bernhard Herzog <[email protected]>
6016    
6017 bh 1256 * Resources/XML/thuban.dtd: Add comment about which versions of
6018     Thuban are covered by this DTD
6019     (map): Fix content model for layers and raster layers. There can
6020     be any number or layers and raster layers in any order.
6021    
6022 jonathan 1254 2003-06-20 Jonathan Coles <[email protected]>
6023    
6024 jonathan 1265 This is mainly about fixing RTbug #1949.
6025    
6026 jonathan 1254 * Thuban/Model/classification.py: Remove "from __future__"
6027     import statement since python 2.2 is the earliest supported
6028     version.
6029    
6030     * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
6031     Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
6032     depending on the units this projection *forwards* into.
6033    
6034     * Thuban/Model/save.py (SessionSaver.write_classification):
6035     Remove unnecessary use of lambdas and nested functions.
6036    
6037     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
6038     adjustment here if the map projection uses degrees.
6039    
6040     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
6041     scale adjust code since it is now done before calling
6042     this method. Don't do anything if the map projection
6043     is None.
6044    
6045 bh 1244 2003-06-19 Bernhard Herzog <[email protected]>
6046    
6047 bh 1248 Move version specific load tests to their own file.
6048    
6049     * test/test_load.py: Expand the doc-string to explain a bit how to
6050     handle file format changes.
6051     (TestClassification.test): Update the docstring as this test is
6052     not about Thuban 0.2 anymore.
6053    
6054     * test/test_load_0_2.py: New file with the load tests for thuban
6055     files created with Thuban 0.2 and earlier.
6056    
6057     2003-06-19 Bernhard Herzog <[email protected]>
6058    
6059 bh 1246 Add XML validation to some of the tests. Validation will only be
6060     done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
6061     To make the DTD available to the test cases it's moved into
6062     Resources/XML
6063    
6064     * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
6065     for versions up to and including 0.2. Two slight changes: added an
6066     encoding specification and fixed the comment which refered to
6067     GRASS, not Thuban
6068    
6069     * test/xmlsupport.py: New support module for tests involving XML.
6070     Currently there's a mix-in class for XML validation.
6071    
6072     * test/test_xmlsupport.py: New. Tests for the xmlsupport module
6073    
6074     * test/test_save.py (SaveSessionTest): Derive from ValidationTest
6075     so that we can validate the
6076     (SaveSessionTest.testEmptySession)
6077     (SaveSessionTest.testSingleLayer)
6078     (SaveSessionTest.testSingleLayer)
6079     (SaveSessionTest.testLayerProjection)
6080     (SaveSessionTest.testRasterLayer)
6081     (SaveSessionTest.testClassifiedLayer): Validate the generated XML
6082    
6083     * test/runtests.py (main): Call print_additional_summary instead
6084     of print_garbage_information
6085    
6086     * test/support.py (resource_dir): New function to return the
6087     "Resource" subdirectory
6088     (print_additional_summary): New function to combine several
6089     summary functions
6090     (run_tests): Use print_additional_summary instead of calling
6091     print_garbage_information directly
6092    
6093     2003-06-19 Bernhard Herzog <[email protected]>
6094    
6095 bh 1244 * Doc/thuban.dtd (classification): Correct the content model of
6096     the classification element.
6097     (projection): Add the "name" attribute
6098    
6099 frank 1242 2003-06-19 Frank Koormann <[email protected]>
6100    
6101     MERGE from the greater-ms3 branch.
6102    
6103     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
6104     scale if projection is latlong to get better estimate.
6105    
6106     Fix problem of hidden properties dialog under windows after double
6107     click on layer tree:
6108     The tree control always gets an Expanded / Collapsed event after
6109 joey 2162 the ItemActivated on double click, which raises the main window again.
6110     We add a second ItemActivated event to the queue, which simply
6111 frank 1242 raises the already displayed window.
6112    
6113     * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
6114     raiseProperties initialized to prevent endless loops
6115     (LegendTree._OnItemActivated): Depending on self.raiseProperties
6116     simply raise the properties or open the dialog and issue a second
6117     event.
6118    
6119 jonathan 1235 2003-06-18 Jonathan Coles <[email protected]>
6120    
6121 jonathan 1239 * setup.py: Fix a few problems that occured under Windows.
6122    
6123     2003-06-18 Jonathan Coles <[email protected]>
6124    
6125 jonathan 1235 When Thuban loaded the map was redrawn twice because the
6126     legend was being opened after the mainwindow was created
6127     and not during its creation. This meant the map was drawn
6128     initially and then had to be redrawn when the legend
6129     caused the display to change. Now the legend is opened
6130     in the mainwindow constructor which resolves this issue.
6131    
6132     Also, although we were checking for the existence of
6133     gdal and gdalwarp modules, the gdalwarp extension was
6134     still being compiled (which may fail if the system doesn't
6135     have gdal installed). the build_ext command to setup.py
6136     now accepts the flags --with-gdal and --without-gdal.
6137     If --without-gdal is specified setup.py will try to
6138     use the gdal parameters specified by gdal-config. Under
6139     windows, those parameters have to be set in setup.py
6140     as with proj4 an wxWindows.
6141    
6142     * setup.py: Use a list instead of seperate variables for
6143     extension parameters so we can create a generic function
6144     that runs an appropriate *-config script.
6145     (run_cs_script): Renamed from run_wx_script and modified
6146     to accept a second argument which is a list of lists to
6147     be filled in by the values returned from running the command.
6148     (thuban_build_ext): New. Extends the build_ext command and
6149     provides the options --with-gdal/--without-gdal which then
6150     optionally includes the gdalwarp extension.
6151    
6152     * Thuban/Model/resource.py: First check if we can import
6153     the gdalwarp Thuban extension before checking for gdal.
6154     Also added some comments.
6155    
6156     * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
6157     the map is None which may be the case if none has been loaded
6158     yet.
6159    
6160     * Thuban/UI/main.py (main): Remove call to ShowLegend.
6161    
6162     * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
6163    
6164     * Thuban/UI/renderer.py: Check for gdal support before importing
6165     gdalwarp.
6166     (MapRenderer.render_map): Only try to optimize if we have gdal
6167     support otherwise nothing will get drawn.
6168    
6169 jonathan 1237 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
6170     during startup before a map has been created. Check if map is None
6171     before using it and do nothing if it is.
6172    
6173 jonathan 1224 2003-06-17 Jonathan Coles <[email protected]>
6174    
6175     Fix the problem with raster layers under Windows that caused
6176     Thuban to crash. The view should respond to layer projection
6177     changed events to update the display. Changes to a projection
6178     should not cause the map to be set to full extent.
6179    
6180     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
6181     current_map_proj to remember the current map projection so that
6182     when the projection changes we know what the previous projection
6183     was.
6184     (MapCanvas.SetMap): Unsubscribe and subscribe to
6185     LAYER_PROJECTION_CHANGED events.
6186     (MapCanvas.projection_changed): Split into two methods that respond
6187     to map and layer projection changes.
6188     (MapCanvas.map_projection_changed): New. Takes the current view and
6189     projects it using the new projection. This does not cause the
6190     map to be redrawn at full extent.
6191     (MapCanvas.layer_projection_changed): New. Cause a redraw which
6192     will draw each layer in its new projection.
6193    
6194     * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
6195     VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
6196     under Windows.
6197    
6198     * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
6199     to twice sizeof(void*) because there are two digits for each
6200     hex byte.
6201    
6202 bh 1220 2003-06-16 Bernhard Herzog <[email protected]>
6203    
6204     Update to the layer interface: Direct access to the table,
6205     shapetable, shapefile and filename attributes is now actively
6206     deprecated by issuing deprecation warnings for all places where
6207     this happens.
6208    
6209     * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
6210     to the instance variables table, shapetable, shapefile and
6211     filename via __getattr__ so that we can issue a deprecation
6212     warning.
6213     (Layer.SetShapeStore): Don't set the deprecated instance variables
6214     any more
6215     (Layer.SetShapeStore): Don't use deprecated layer instance
6216     variables
6217     (Layer.Destroy): No need to explicitly remove the instance
6218     variables any more
6219     (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
6220     instance variables
6221    
6222     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
6223     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
6224     (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
6225     use deprecated layer instance variables
6226    
6227     * Thuban/UI/classifier.py (Classifier.__init__): Don't use
6228     deprecated layer instance variables
6229    
6230     * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
6231     (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
6232     instance variables
6233    
6234     * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
6235     deprecated layer instance variables
6236    
6237     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
6238     deprecated layer instance variables
6239    
6240     * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
6241     deprecated layer instance variables
6242    
6243     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
6244     (MapRenderer.polygon_render_param): Don't use deprecated layer instance
6245     variables
6246    
6247     * test/runtests.py (main): Turn Thuban's deprecation warnings into
6248     errors so that they're cought by the tests
6249    
6250     * test/test_load.py (TestSingleLayer.test): Don't use deprecated
6251     layer instance variables
6252    
6253 jonathan 1212 2003-06-16 Jonathan Coles <[email protected]>
6254    
6255     Fix a problem under Windows whereby if the user double-clicks on a
6256     layer in the legend that tree item will expand or collapse as well
6257     as open the layer properties dialog. The state of the tree item
6258     should not be affected.
6259    
6260     * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
6261     preventExpandCollapse and subscribe to expanding and collapsing
6262     events.
6263     (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
6264     collapsing events and will veto the event if it has been triggered
6265     by the user double clicking on a layer.
6266     (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
6267     that an expanding/collapsing event should be vetoed.
6268    
6269 bh 1208 2003-06-13 Bernhard Herzog <[email protected]>
6270    
6271     * Thuban/UI/classifier.py (Classifier.OnClose)
6272     (Classifier.map_layers_removed)
6273     (Classifier.layer_shapestore_replaced): Unsubscribe the messages
6274     in OnClose and not in map_layers_removed or
6275     layer_shapestore_replaced to make sure it always happens when the
6276     dialog is closed
6277    
6278 jonathan 1201 2003-06-13 Jonathan Coles <[email protected]>
6279    
6280 jonathan 1203 This puts back a fix for Windows where a panel is needed so that
6281     the background of the table view appears correctly.
6282    
6283     * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
6284     object that can be used by derived classes to place any
6285     controls (including the grid) onto.
6286     (QueryTableFrame.__init__): Use the panel as the parent window
6287     for all the controls. Reparent the grid so that the panel is
6288     the parent. Call UpdateStatusText() to correctly initialize
6289     the status bar.
6290    
6291     2003-06-13 Jonathan Coles <[email protected]>
6292    
6293 jonathan 1201 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
6294     from wxFrame (as opposed to wxDialog like the other classes)
6295     but otherwise behaves like the other classes. This is needed
6296     for the TableView which isn't really a dialog and needs to
6297     have a status bar and control buttons.
6298    
6299     * Thuban/UI/tableview.py (TableGrid.__init__): Create an
6300     instance variable to keep track of how many rows are selected.
6301     Subscribe once to the the events we are interested in.
6302     (ThubanGrid.OnRangeSelect): Only handle event if event handling
6303     hasn't been turned off.
6304     (ThubanGrid.OnSelectCell): Only handle event if event handling
6305     hasn't been turned off.
6306     (ThubanGrid.ToggleEventListeners): Rather than subscribe None
6307     as an event listener (which changes the event handler stack)
6308     simply set an instance variable to False. This is checked in
6309     the event handlers.
6310     (ThubanGrid.GetNumberSelected): Return the number of currently
6311     selected rows.
6312     (TableFrame): Inherit from ThubanFrame so we can have a
6313     status bar and control buttons.
6314     (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
6315     Explicitly set which items are selected in the operator choice and
6316     action choice so there is always a valid selection. Fixes RTbug #1941.
6317     Subscribe to grid cell selection events so we can update the
6318     status bar.
6319     (QueryTableFrame.UpdateStatusText): Update the status bar with
6320     how many rows are in the grid, how many columns, and how many
6321     rows are selected.
6322     (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
6323     Call UpdateStatusText when cells are (de)selected.
6324     (QueryTableFrame.OnQuery): Use the string value in the value
6325     combo if either the selected item index is 0 or if the string
6326     cannot be found in the predefined list (this happens if the
6327     user changes the text). Fixes RTbug #1940.
6328     Only turn off the grid event listeners if there a query comes
6329     back with a none empty list of ids. in the case that the list
6330     is empty this causes a grid.ClearSelection() call to actually
6331     clear the grid selection which causes the selected items in
6332     the map to be deselected. Fixes RTbug #1939.
6333    
6334     * test/test_save.py (XMLWriterTest.Encode): Check return values.
6335     Fixes RTbug #1851.
6336    
6337 bh 1195 2003-06-13 Bernhard Herzog <[email protected]>
6338    
6339     * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
6340     self.selected_shape with the current selection to make sure the
6341     contents of the dialog are up to date when it's shown for the
6342     first time.
6343     The dialog used to work without this by luck. The recent fix to
6344     the connector module 'broke' a 'feature' the identify view was
6345     relying on, i.e that subscribing to a message in response to
6346     receiving a message of that type would mean that the new
6347     subscriber would also be called for the same message.
6348    
6349 jonathan 1169 2003-06-12 Jonathan Coles <[email protected]>
6350 jonathan 1175
6351 jonathan 1193 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
6352     the image is rendered. Fixes RTbug #1937.
6353    
6354     2003-06-12 Jonathan Coles <[email protected]>
6355    
6356 jonathan 1191 * Thuban/Lib/fileutil.py: As is done under Windows, create the
6357 jonathan 1193 user directory if it doesn't exist on a posix system.
6358     Fixes RTbug #1815.
6359 jonathan 1191
6360     * Thuban/Model/resource.py (get_user_proj_files): Moved the
6361     called to get_application_dir here, so that the directory
6362     will only be called if this method is invoked.
6363    
6364     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
6365     the projfilepath if no projection is selected.
6366    
6367     2003-06-12 Jonathan Coles <[email protected]>
6368    
6369 jonathan 1182 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
6370     the scalebar if the current map has no projection set.
6371    
6372     * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
6373     projfilepath label to just the basename of the projection file
6374     rather than include the entire path.
6375    
6376     * Thuban/Model/resource.py: Fix missed proj functions that
6377     needed to be renamed.
6378    
6379     2003-06-12 Jonathan Coles <[email protected]>
6380    
6381 jonathan 1178 * Thuban/Model/classification.py: Removed assert statements that
6382     tested if the variable was an instance of Color.
6383    
6384     * Thuban/Model/color.py (Color): Remove commented code that isn't
6385     used.
6386     (Transparent): Renamed from NoColor. Doesn't inherit from Color.
6387     Fixes RTbug #1835.
6388     (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
6389     Needed now that the class doesn't inherit from Color.
6390    
6391     2003-06-12 Jonathan Coles <[email protected]>
6392    
6393 jonathan 1175 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
6394     check unicode strings.
6395    
6396     * test/test_layer.py: Check for existence of gdal.
6397    
6398     2003-06-12 Jonathan Coles <[email protected]>
6399 jonathan 1172
6400     * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
6401     that was in load.py
6402 jonathan 1169
6403 jonathan 1172 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
6404     that was in save.py
6405    
6406     2003-06-12 Jonathan Coles <[email protected]>
6407    
6408 jonathan 1169 This is largely a collection of bug fixes. We also handle the
6409     case where gdal is not on the system. The XMLReader and XMLWriter
6410     classes were moved into there own files to resolve some circular
6411     import references and because they shouldn't really be in the
6412     file that is dediciated to reading/writing session files since
6413     they are also used elsewhere.
6414    
6415     * Thuban/Model/classgen.py: Renamed functions to follow the
6416     function_names_with_underscores style. Fixes RTbug #1903.
6417     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
6418    
6419     * Thuban/Model/layer.py: Import gdal only if it available.
6420     (RasterLayer): Handle the case where the gdal library is unavailable.
6421     Addresses RTbug #1877.
6422    
6423     * Thuban/Model/load.py (XMLReader): Moved into seperate file
6424     xmlreader.py.
6425    
6426 jonathan 1172 2003-06-12 Jonathan Coles <[email protected]>
6427    
6428     This is largely a collection of bug fixes. We also handle the
6429     case where gdal is not on the system. The XMLReader and XMLWriter
6430     classes were moved into there own files to resolve some circular
6431     import references and because they shouldn't really be in the
6432     file that is dediciated to reading/writing session files since
6433     they are also used elsewhere.
6434    
6435     * Thuban/Model/classgen.py: Renamed functions to follow the
6436     function_names_with_underscores style. Fixes RTbug #1903.
6437     (calculate_quantiles): Raise ValueError if 'percents' is invalid.
6438    
6439     * Thuban/Model/layer.py: Import gdal only if it available.
6440     (RasterLayer): Handle the case where the gdal library is unavailable.
6441     Addresses RTbug #1877.
6442    
6443     * Thuban/Model/load.py (XMLReader): Moved into seperate file
6444     xmlreader.py.
6445    
6446 jonathan 1169 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
6447     file xmlwriter.py.
6448    
6449     * Thuban/Model/resource.py: Renamed functions to following the
6450     function_names_with_underscores style.
6451     (has_gdal_support): New function that returns true if the gdal
6452     library is available. Addresses RTbug #1877.
6453    
6454     * Thuban/UI/application.py (ThubanApplication.OpenSession):
6455     Display a message box if the gdal library is not available, but
6456     only if there are any layers that would use it. Addresses RTbug #1877.
6457    
6458     * Thuban/UI/classgen.py: Use renamed projection resource functions.
6459     (GenUniformPanel.__CalcStepping): Fix a slight discrepency
6460     when using integers versus floats.
6461    
6462     * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
6463     determine if the "Add Image Layer" menu option should be
6464     greyed out or not. Addresses RTbug #1877.
6465    
6466     * Thuban/UI/projdialog.py: Use renamed projection resource functions.
6467    
6468     * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
6469     optimize if a raster layer is visible. Fixes RTbug #1931.
6470     Only draw the raster layer if the gdal library is available.
6471     Addresses RTbug #1877.
6472    
6473     * test/test_classgen.py: Add tests for generate_singletons,
6474     generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
6475     (test_calculate_quantiles): Fix some tests to catch the new
6476     ValueError that is raised.
6477    
6478     * test/test_proj.py: Use renamed projection resource functions.
6479    
6480     * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
6481     test for saving classified layers. Fixes RTbug #1902.
6482     (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
6483    
6484 jan 1156 2003-06-12 Jan-Oliver Wagner <[email protected]>
6485    
6486     Fix for http://intevation.de/rt/webrt?serial_num=1900.
6487    
6488     * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
6489    
6490     * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
6491     multiplechoicedialog.py rather than from the wxPython library.
6492    
6493 frank 1151 2003-06-11 Frank Koormann <[email protected]>
6494    
6495 frank 1152 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
6496     update.
6497    
6498     2003-06-11 Frank Koormann <[email protected]>
6499    
6500 frank 1151 * Thuban/Lib/fileutil.py (get_application_dir): New function to
6501     determine the absolute .thuban/thuban directory under
6502     "posix" (os.expanduser) and "nt" (read AppData registry key).
6503    
6504     * Thuban/Model/resource.py: Use get_application_dir
6505    
6506     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
6507     Use get_application_dir.
6508    
6509 bh 1143 2003-06-10 Bernhard Herzog <[email protected]>
6510    
6511 bh 1147 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
6512     the messages MAP_LAYERS_REMOVED messages
6513     (LayerTableFrame.OnClose): Unsubscribe from it.
6514     (LayerTableFrame.map_layers_removed): New. Receiver for
6515     MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
6516     dialog is showing is removed.
6517    
6518     2003-06-10 Bernhard Herzog <[email protected]>
6519    
6520 bh 1145 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
6521     of the receivers list so that unsubscribing in a receiver doesn't
6522     modify it while iterating over it.
6523    
6524     * test/test_connector.py
6525     (ConnectorTest.test_disconnect_in_receiver): New. Test whether
6526     unsubscribing in a receiver works correctly. See docstring for
6527     details
6528    
6529     2003-06-10 Bernhard Herzog <[email protected]>
6530    
6531 bh 1143 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
6532     message.
6533    
6534     * Thuban/Model/layer.py (Layer.SetShapeStore): Send
6535     LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
6536     LAYER_CHANGED will still be sent if the classification changes.
6537    
6538     * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
6539     parameter so we can subscribe to some of its messages
6540     (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
6541     and the layer's LAYER_SHAPESTORE_REPLACED
6542     (Classifier.unsubscribe_messages): New. Unsubscribe from message
6543     subscribed to in __init__
6544     (Classifier.map_layers_removed)
6545     (Classifier.layer_shapestore_replaced): receivers for the messages
6546     subscribed to in __init__. Unsubscribe and close the dialog
6547    
6548     * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
6549     the map to the Classifier dialog
6550    
6551     * test/test_layer.py (SetShapeStoreTests): Derive from
6552     SubscriberMixin as well so we can test messages
6553     (SetShapeStoreTests.setUp): Subscribe to some of the layer's
6554     messages
6555     (SetShapeStoreTests.tearDown): Clear the messages again
6556     (SetShapeStoreTests.test_sanity): Expand the doc-string and check
6557     for the modified flag too
6558     (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
6559     to check whether SetShapeStore sets the modified flag
6560     (SetShapeStoreTests.test_set_shape_store_different_field_name)
6561     (SetShapeStoreTests.test_set_shape_store_same_field)
6562     (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
6563     Add tests for the messages. This checks both the new
6564     LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
6565    
6566 jan 1141 2003-06-06 Jan-Oliver Wagner <[email protected]>
6567    
6568     * Thuban/UI/mainwindow.py: Improved and partly added help texts for
6569     the menu items.
6570    
6571 frank 1134 2003-06-05 Frank Koormann <[email protected]>
6572    
6573 frank 1139 * Thuban/UI/identifyview.py (IdentifyView.__init__):
6574     Layout reimplemented without panel. Make life easier to fit the list
6575     in the dialog.
6576    
6577     2003-06-05 Frank Koormann <[email protected]>
6578    
6579 frank 1137 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
6580     once on initialisation (Former implementation resulted in multiple
6581     entries for each projection).
6582     (ProjFrame.__FillAvailList): selectProj as second optional parameter,
6583     if set, select the projection found under the specified name. This
6584     overwrites any other selection estimate.
6585     Removed projchoice filling from this method.
6586     (ProjFrame._OnSave, ProjFrame._OnAddToList):
6587     Updated call of ProjFrame.__FillAvailList
6588     (LCCPanel._DoLayout): Moved parameter controls in more common order.
6589    
6590     * Resources/Projections/defaults.proj: Extended defaults representing
6591     various common European projections.
6592    
6593     2003-06-05 Frank Koormann <[email protected]>
6594    
6595 frank 1134 * Thuban/UI/identifyview.py (IdentifyView.__init__):
6596     Use ListCtrl instead of GridCtrl
6597    
6598     * Thuban/Model/resource.py:
6599     Guess location of .thuban directory from tempdir parent directory.
6600    
6601     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
6602     Guess location of .thuban directory from tempdir parent directory.
6603    
6604 bh 1130 2003-06-04 Bernhard Herzog <[email protected]>
6605    
6606     Do not cache the values returned by the tree widget's
6607     GetFirstChild and GetNextChild methods because it led to lots of
6608     segfaults. The new way requires more brute force but is more
6609     reliable.
6610    
6611     * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
6612     variable layer2id
6613     (LegendTree.find_layer): New method to do with brute force what
6614     layer2id tried to accomplish
6615     (LegendTree._OnMsgLayerChanged)
6616     (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
6617     Use find_layer instead of layer2id
6618     (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
6619     update layer2id anymore
6620     (LegendTree._OnMsgMapLayersRemoved)
6621     (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
6622    
6623 tkoester 1128 2003-06-03 Thomas Koester <[email protected]>
6624    
6625     * Thuban/Model/classgen.py (GenQuantiles0): New function.
6626    
6627 bh 1120 2003-06-02 Bernhard Herzog <[email protected]>
6628    
6629 bh 1127 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
6630     New commands.
6631     (main_menu): Add the new commands.
6632     (MainWindow.TableRename): New. Implementation of the table_rename
6633     command.
6634     (MainWindow.RenameLayer): New. Implementation of the layer_rename
6635     command.
6636    
6637     * Thuban/Model/session.py (Session.AddTable): call self.changed to
6638     set the modified flag
6639    
6640     * test/test_session.py (TestSessionSimple.test_add_table): Test
6641     whether the modified flag is set properly
6642    
6643     * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
6644     instead of issue so that the modified flags get updated.
6645    
6646     * test/test_base.py (SomeTitledObject): Derive from Modifiable
6647     instead of Publisher to reflect reality better and to accomodate
6648     the fact that SetTitle now calls changed instead of issue
6649    
6650     2003-06-02 Bernhard Herzog <[email protected]>
6651    
6652     * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
6653     acquisition has to happen before the try in a try-finally.
6654    
6655     2003-06-02 Bernhard Herzog <[email protected]>
6656    
6657 bh 1120 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
6658     possible that a layer is removed that is not currently selected in
6659     the legend so don't check for this.
6660    
6661 bh 1112 2003-05-30 Bernhard Herzog <[email protected]>
6662    
6663 bh 1118 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
6664     variables to None that have direct or indirect references to
6665     shapefiles or dbf files to make sure that they do go away and the
6666     files are closed.
6667    
6668     2003-05-30 Bernhard Herzog <[email protected]>
6669    
6670 bh 1116 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
6671     availImgListIndices when a new image list is created
6672    
6673     2003-05-30 Bernhard Herzog <[email protected]>
6674    
6675 bh 1114 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
6676     changing_selection to indicate whether the LegendTree code itself
6677     is currently changing the selection
6678     (LegendTree.normalize_selection): New method to normalize the
6679     selection by selecting the layer item even if the user clicked on
6680     the classification.
6681     (LegendTree._OnSelChanged): normalize the selection. This works
6682     around a bug in wx which doesn't keep track of the selection
6683     properly when subtrees are deleted.
6684    
6685     2003-05-30 Bernhard Herzog <[email protected]>
6686    
6687 bh 1112 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
6688     maximum and minimum scale factors.
6689    
6690     * test/test_classgen.py (ClassGenTest.test): Update to reflect the
6691     changes in classgen.py
6692    
6693 jonathan 1109 2003-05-30 Jonathan Coles <[email protected]>
6694    
6695     * Thuban/Model/classgen.py: Remove ClassGenerator class but make
6696     all the methods functions. Fixes RTBug #1903.
6697    
6698     * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
6699     to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
6700     RTBug #1907.
6701    
6702     * Thuban/UI/classgen.py: Use classgen functions that were part
6703     of the ClassGenerator class. Put try/finally blocks around
6704     code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
6705     RTBug #1904.
6706    
6707     * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
6708    
6709     * Thuban/UI/legend.py: The legend was cleared and repopulated any
6710     time something changed which caused some state to be lost such
6711     as which children were expanded or collapsed. Fixes RTBug #1901.
6712     (LegendTree._OnMsgMapLayersAdded): Add only new layers.
6713     (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
6714     the legend but not in the map.
6715     (LegendTree.__FillTree): Move main functionality out into smaller
6716     methods that can be used by other methods.
6717     (LegendTree.__FillTreeLayer): Reuse old slots in the image list
6718     if they are available.
6719     (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
6720     that we override the wxTreeCtrl method. Iterate over children
6721     and call __RemoveLayer.
6722     (LegendTree.__AddLayer): New. Add a new layer to the legend.
6723     (LegendTree.__RemoveLayer): Remove a layer from the legend.
6724     (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
6725     Should only be called with the id of a layer branch.
6726     (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
6727     Returns the root item or creates one if necessary.
6728    
6729     * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
6730     ProjectRasterFile with tuple arguments instead of strings.
6731    
6732     * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
6733     with try/finally. Fixes RTBug #1904.
6734    
6735     * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
6736     with try/finally. Fixes RTBug #1904.
6737     (MapCanvas.FitSelectedToWindow): If a single point is selected
6738     simply center it on the display. Fixes RTBug #1849.
6739    
6740     * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
6741     to be compiled as a standalone app. Now the code can only be
6742     called from Python which simplifies the parameter passing.
6743     (ProjectRasterFile): Handle Python arguments. Remove code that
6744     checks for a destination dataset. Add more clean up code.
6745    
6746     * test/test_map.py (TestMapWithContents.test_raise_layer_top,
6747     TestMapWithContents.test_lower_layer_bottom):
6748     Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
6749     Fixes RTBug #1907.
6750    
6751     * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
6752     extent to the map when the legend is toggled. Fixes RTBug #1881.
6753    
6754 jan 1097 2003-05-29 Jan-Oliver Wagner <[email protected]>
6755    
6756     * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
6757     unsubscribes all that is subcribed in __init__.
6758    
6759 bh 1089 2003-05-28 Bernhard Herzog <[email protected]>
6760    
6761 bh 1095 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
6762     (MainWindow.CanDuplicateLayer): New methods to implement the
6763     Layer/Duplicate command.
6764     (layer_duplicate command): New.
6765     (main_menu): Add layer_duplicate to the Layer menu.
6766    
6767     2003-05-28 Bernhard Herzog <[email protected]>
6768    
6769 bh 1093 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
6770     renderer so that NULL/None values get displayed differently (by a
6771     gray rectangle).
6772     (TableGrid.__init__): Override the default renderers
6773    
6774     2003-05-28 Bernhard Herzog <[email protected]>
6775    
6776 bh 1089 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
6777     classification to "None" if the type of the field has changed.
6778    
6779     * test/test_layer.py (SetShapeStoreTests): New. Class with a few
6780     test for the Layer.SetShapeStore method
6781    
6782 jan 1087 2003-05-28 Jan-Oliver Wagner <[email protected]>
6783 jan 1085
6784 jan 1087 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
6785     does not necessarily have a filename).
6786    
6787     2003-05-28 Jan-Oliver Wagner <[email protected]>
6788    
6789 jan 1085 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
6790     sort the selection list for the dialog.
6791    
6792 frank 1083 2003-05-28 Frank Koormann <[email protected]>
6793    
6794     * extensions/thuban/wxproj.cpp
6795     (project_point): Removed cast to int for projected point coordinates.
6796     (shape_centroid): Return last point if all polygon vertices fall
6797     to one point.
6798    
6799 bh 1079 2003-05-28 Bernhard Herzog <[email protected]>
6800    
6801 bh 1081 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
6802     with layers that don't have shapestores, i.e. raster layers.
6803    
6804     2003-05-28 Bernhard Herzog <[email protected]>
6805    
6806 bh 1079 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
6807     when determining the title from the filename.
6808    
6809     * test/test_dbf_table.py (TestDBFTable.test_title): Update to
6810     reflect changes in the way the title is derived from the filename
6811    
6812 frank 1077 2003-05-28 Frank Koormann <[email protected]>
6813    
6814     * Thuban/UI/mainwindow.py (MainWindow.TableShow):
6815     Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
6816    
6817 bh 1069 2003-05-27 Bernhard Herzog <[email protected]>
6818    
6819 bh 1075 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
6820     delegate SelectedLayer.
6821     (MainWindow.LayerUnjoinTable): Implement.
6822     (_can_unjoin): New. Helper function for the sensitivity of the
6823     layer/unjoin command.
6824    
6825     * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
6826     (DerivedShapeStore.OrigShapeStore): New. Return the original
6827     shapestore. Used to figure out how to unjoin.
6828     (DerivedShapeStore.Shapefile): Fix a typo.
6829    
6830     2003-05-27 Bernhard Herzog <[email protected]>
6831    
6832 bh 1073 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
6833     well
6834     (JoinDialog.__init__): Use the layer parameter and only build the
6835     left choice when a layer is given
6836     (JoinDialog.OnJoin): Handle layer joins as well
6837     (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
6838     that the user selects the "Select..." item. The sensitivitly
6839     updating is now in update_sensitivity
6840     (JoinDialog.y): New method to refactor the sensitivity update of
6841     the join button into its own method.
6842    
6843     * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
6844    
6845     2003-05-27 Bernhard Herzog <[email protected]>
6846    
6847 bh 1071 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
6848     iff there are unreferenced tables in the session
6849    
6850     2003-05-27 Bernhard Herzog <[email protected]>
6851    
6852 bh 1069 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
6853    
6854     * Thuban/Model/session.py (Session.UnreferencedTables): New method
6855     to return tables that are not referenced by other tables or shape
6856     stores and can be removed.
6857     (Session.RemoveTable): Issue a TABLE_REMOVED message after
6858     removing the table
6859    
6860     * Thuban/UI/mainwindow.py: Remove unused imports
6861     (MainWindow.TableClose): Implement.
6862    
6863     * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
6864     messages so that the frame will be automatically closed when a new
6865     session is opened or the table is removed.
6866     (TableFrame.OnClose): Unsubscribe the Subscriptions made in
6867     __init__
6868     (TableFrame.close_on_session_replaced)
6869     (TableFrame.close_on_table_removed): New. Subscribers that close
6870     the window
6871    
6872     * test/test_session.py (TestSessionMessages.test_remove_table)
6873     (TestSessionSimple.test_remove_table): Move the test to
6874     TestSessionSimple and add test for the TABLE_REMOVED message
6875     (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
6876     (TestSessionSimple.test_unreferenced_tables) New. Test for the
6877     UnreferencedTables method.
6878     (UnreferencedTablesTests): New. Class with some more sophisticated
6879     tests for UnreferencedTables.
6880    
6881 frank 1065 2003-05-27 Frank Koormann <[email protected]>
6882    
6883 frank 1067 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
6884     display has some unwanted side effects. Removed again.
6885    
6886     2003-05-27 Frank Koormann <[email protected]>
6887    
6888 frank 1065 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
6889    
6890     * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
6891    
6892 jan 1062 2003-05-27 Jan-Oliver Wagner <[email protected]>
6893    
6894 bh 1069 * test/test_menu.py (MenuTest.test): Added test for
6895     Menu.RemoveItem().
6896 jan 1062
6897 bh 1069 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
6898     the menu.
6899 jan 1062
6900 frank 1059 2003-05-27 Frank Koormann <[email protected]>
6901    
6902     Nonmodal dialogs without parent (i.e. they can fall behind the main
6903     window)
6904    
6905     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
6906     all dialogs in the dialogs dictionary and the canvas.
6907    
6908     * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
6909     parent, i.e. can fall behind other windows.
6910     (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
6911     dictionary before removing it.
6912    
6913     * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
6914    
6915     * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
6916     * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
6917     * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
6918    
6919 bh 1053 2003-05-27 Bernhard Herzog <[email protected]>
6920    
6921 bh 1055 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
6922     tableview dialog
6923     (MainWindow.TableShow): Use ShowTableView to open the dialogs.
6924     Also, don't use the table's titles as the dialog names. The titles
6925     aren't guaranteed to be unique.
6926     (MainWindow.TableOpen): Open a table view dialog after opening the
6927     table
6928    
6929     2003-05-27 Bernhard Herzog <[email protected]>
6930    
6931 bh 1053 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
6932     effect can be achieved by simply closing the window showing the
6933     table.
6934     (MainWindow.TableHide): Removed.
6935     (main_menu): Removed "table_hide"
6936    
6937 frank 1051 2003-05-27 Frank Koormann <[email protected]>
6938    
6939     Fix legend tree display problems under Win32
6940    
6941     * Thuban/UI/legend.py: BMP_SIZE_W = 15
6942     (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
6943     (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
6944    
6945     * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
6946    
6947 jan 1048 2003-05-27 Jan-Oliver Wagner <[email protected]>
6948    
6949     * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
6950     'after' now allows to insert separators almost anywhere in the menu.
6951    
6952 frank 1046 2003-05-27 Frank Koormann <[email protected]>
6953    
6954     * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
6955     "S" of selection box label to hint on hot key (Alt-S). Works under
6956     Win32 but is ignored under GTK.
6957    
6958     2003-05-26 Frank Koormann <[email protected]>
6959    
6960     * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
6961     Center Choices.
6962    
6963 bh 1038 2003-05-26 Bernhard Herzog <[email protected]>
6964    
6965 bh 1044 Remove the Precision methods again. They're too DBF specific to be
6966     part of the table interface and they're only used in table_to_dbf
6967     anyway.
6968    
6969     * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
6970     fixed precision of 12 for doubles.
6971     (TransientTableBase.Precision): Removed
6972     (AutoTransientTable.Width): Delegate to self.table.
6973    
6974     * Thuban/Model/table.py (DBFTable.Precision)
6975     (MemoryTable.Precision): Removed.
6976     (MemoryTable.Width): Use a fixed precision of 12 for doubles.
6977     (table_to_dbf): Use a fixed precision of 12 for floats unless the
6978     column object specifies something else.
6979    
6980     * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
6981     test for table_to_dbf
6982    
6983     2003-05-26 Bernhard Herzog <[email protected]>
6984    
6985     * test/test_transientdb.py
6986     (TestTransientTable.run_iceland_political_tests): Fix a comment.
6987    
6988     2003-05-26 Bernhard Herzog <[email protected]>
6989    
6990 bh 1038 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
6991     implementation. Mark parts of the file format strings for
6992     localization.
6993    
6994     * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
6995     file and add the table to the tables managed by the session
6996    
6997 bh 1040 * test/test_session.py (TestSessionSimple.test_open_table_file):
6998     New. test case for OpenTableFile
6999    
7000 jan 1033 2003-05-26 Jan-Oliver Wagner <[email protected]>
7001    
7002 jan 1035 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
7003     Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
7004     Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
7005     Replace the true/false of wxWindows by True/False of Python 2.2.1.
7006    
7007     2003-05-26 Jan-Oliver Wagner <[email protected]>
7008    
7009 bh 1038 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
7010     already a selection present, update the grid accordingly.
7011 jan 1033
7012     * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
7013     resizeable and increase its initial size.
7014    
7015 frank 1030 2003-05-26 Frank Koormann <[email protected]>
7016    
7017     Table export functionality
7018    
7019     * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
7020     Return width (in characters) for a column.
7021     (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
7022     (table_to_dbf): Write table to dbf file.
7023     (table_to_csv): Write table to csv file.
7024    
7025     * Thuban/Model/transientdb.py (TransientTableBase.Width,
7026     TransientTableBase.Precision): Return column width and precision.
7027    
7028     * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
7029     or table_to_csv depending on file selection.
7030    
7031     * test/test_dbf_table.py:
7032     Test table_to_dbf (extension of former part of test).
7033    
7034     * test/test_csv_table.py:
7035     Test table_to_csv.
7036    
7037 jan 1021 2003-05-23 Jan-Oliver Wagner <[email protected]>
7038    
7039 jan 1024 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
7040     Use QueryTableFrame instead of TableFrame.
7041 jan 1021
7042 jan 1024 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
7043     table window with 'Layer Table:' instead of 'Table:'.
7044    
7045     2003-05-23 Jan-Oliver Wagner <[email protected]>
7046    
7047     Give all tables a title via mix-in TitledObject.LayerShowTable
7048    
7049 jan 1021 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
7050     only if it exists.
7051    
7052     * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
7053     and call its init-method with a default title. Remove Title() method.
7054    
7055     * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
7056     AutoTransientTable): mix-in TitledObject and call its init-method with
7057     a default title. Remove Title() method.
7058    
7059 bh 1017 2003-05-23 Bernhard Herzog <[email protected]>
7060    
7061     * Thuban/Model/session.py (Session.AddShapeStore): Define
7062     AddShapeStore analogously to AddTable.
7063    
7064     * test/test_session.py (TestSessionSimple.test_add_shapestore):
7065     New. Test for AddShapeStore
7066    
7067 jan 1015 2003-05-23 Jan-Oliver Wagner <[email protected]>
7068    
7069     Introducing QueryTableFrame and a very coarse ShowTable implementation.
7070    
7071     * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
7072     class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
7073     The latter implements the selection GUI without dependency on a layer.
7074     LayerTableFrame now is derived from QueryTableFrame and connects
7075     to a layer.
7076    
7077     * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
7078     implementation that still needs work.
7079    
7080     * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
7081    
7082 frank 1011 2003-05-22 Frank Koormann <[email protected]>
7083    
7084     * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
7085     Added "outer_join = False" as optional parameter.
7086     (TransientJoinedTable.create): If outer join is true, perform a
7087     "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
7088     the left table. Records not matching are filled with 0 / None.
7089    
7090     * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
7091     (JoinDialog.OnJoin): Consider outer join check box.
7092    
7093 bh 1006 2003-05-22 Bernhard Herzog <[email protected]>
7094    
7095 bh 1008 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
7096     somewhat safer way. Storing the traceback in a local variable can
7097     lead to memory leaks
7098    
7099     2003-05-22 Bernhard Herzog <[email protected]>
7100    
7101 bh 1006 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
7102     the wxMessageDialog's Destroy() method.
7103    
7104 frank 1004 2003-05-22 Frank Koormann <[email protected]>
7105    
7106     * Thuban/UI/join.py (JoinDialog.__init__): Make use of
7107     TransientTable.Title()
7108    
7109     2003-05-22 Frank Koormann <[email protected]>
7110    
7111     Join Dialog, initial version.
7112    
7113     * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
7114    
7115     * Thuban/UI/join.py (JoinDialog): Functional implementation of
7116     former framework. Renamed Table1/Table2 to LeftTable/RightTable
7117     in all occurences.
7118    
7119     * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
7120     Typo fixed.
7121    
7122 bh 995 2003-05-22 Bernhard Herzog <[email protected]>
7123    
7124 bh 999 Give the tables titles so that the GUI can display more meaningful
7125     names. For now the titles are fixed but depend on e.g. filenames
7126     or the titles of the joined tables.
7127    
7128     * Thuban/Model/transientdb.py (TransientTable.Title)
7129     (TransientJoinedTable.Title, AutoTransientTable.Title): New.
7130    
7131     * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
7132    
7133     * test/test_transientdb.py
7134     (TestTransientTable.test_auto_transient_table_title): New. Test
7135     for the Title method
7136     (TestTransientTable.test_transient_joined_table)
7137     (TestTransientTable.test_transient_table): Add test for the Title
7138     methods
7139    
7140     * test/test_memory_table.py (TestMemoryTable.test_title): New.
7141     Test for the Title method
7142    
7143     * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
7144     the Title method
7145    
7146     2003-05-22 Bernhard Herzog <[email protected]>
7147    
7148 bh 997 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
7149     Provide a better way to destroy the layers
7150     (TestLayer.test_base_layer, TestLayer.test_arc_layer)
7151     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
7152     (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
7153     the new way to destroy the layers.
7154     (TestLayer.test_derived_store): New. Test for using a layer with a
7155     DerivedShapeStore
7156    
7157     * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
7158     filename if the shape store actually has one.
7159    
7160     2003-05-22 Bernhard Herzog <[email protected]>
7161    
7162 bh 995 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
7163     for the filename
7164    
7165     * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
7166     for the FileName method
7167     (TestDBFTableWriting.test_write): Fix spelling of filename
7168    
7169 tkoester 993 2003-05-22 Thomas Koester <[email protected]>
7170    
7171     * Thuban/Model/range.py, test/test_range.py: Brought over new Range
7172     from SciParam that now really is immutable.
7173    
7174 frank 992 2003-05-22 Frank Koormann <[email protected]>
7175    
7176     Layer Top/Bottom placement added to legend.
7177    
7178     * Thuban/UI/legend.py
7179     (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
7180     bound to tool events.
7181     (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
7182     New, methods binding the event methods with the map methods.
7183    
7184     * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
7185     layer at top/bottom of layer stack.
7186    
7187     * Resources/Bitmaps/top_layer.xpm: New button icon.
7188    
7189     * Resources/Bitmaps/bottom_layer.xpm: New button icon.
7190    
7191 bh 988 2003-05-22 Bernhard Herzog <[email protected]>
7192    
7193     * Thuban/Model/session.py (Session.RemoveTable): New method to
7194     remove tables
7195    
7196     * test/test_session.py (TestSessionSimple.test_remove_table): New.
7197     Test for RemoveTable
7198    
7199 tkoester 986 2003-05-22 Thomas Koester <[email protected]>
7200    
7201     * Thuban/Model/classgen.py: Added short module doc string and CVS id.
7202     (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
7203    
7204 bh 983 2003-05-22 Bernhard Herzog <[email protected]>
7205    
7206 bh 985 Implement a way to discover dependencies between tables and
7207     shapestores.
7208    
7209     * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
7210     (TransientJoinedTable.Dependencies)
7211     (AutoTransientTable.SimpleQuery): New. Implement the dependencies
7212     interface
7213     (TransientJoinedTable.__init__): Keep tack of the original table
7214     objects in addition to the corresponding transient tables.
7215    
7216     * Thuban/Model/table.py (DBFTable.Dependencies)
7217     (MemoryTable.Dependencies): New. Implement the dependencies
7218     interface
7219    
7220     * Thuban/Model/data.py (ShapeTable): New. Helper class for
7221     ShapefileStore
7222     (ShapefileStore.__init__): Use ShapeTable instead of
7223     AutoTransientTable
7224     (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
7225     (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
7226     methods for filename and type
7227     (ShapefileStore.Dependencies): New. Implement the dependencies
7228     interface
7229     (DerivedShapeStore): New class to replace SimpleStore. The main
7230     difference to SimpleStore is that it depends not on a shapefile
7231     but another shapestore which expresses the dependencies a bit
7232     better
7233     (SimpleStore.__init__): Add deprecation warning.
7234    
7235     * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
7236     Test for the Dependencies method.
7237    
7238     * test/test_memory_table.py (TestMemoryTable.test_dependencies):
7239     New. Test for the Dependencies method.
7240    
7241     * test/test_transientdb.py
7242     (TestTransientTable.test_auto_transient_table_dependencies): New.
7243     Test for the Dependencies method.
7244     (TestTransientTable.test_transient_joined_table): Add test for the
7245     Dependencies method.
7246    
7247     * test/test_session.py (TestSessionSimple.setUp)
7248     (TestSessionSimple.tearDown): New. Implement a better way to
7249     destroy the sessions.
7250     (TestSessionSimple.test_initial_state)
7251     (TestSessionSimple.test_add_table): Bind session to self.session
7252     so that it's destroyed by tearDown
7253     (TestSessionSimple.test_open_shapefile): New. Test for
7254     OpenShapefile and the object it returns
7255    
7256     2003-05-22 Bernhard Herzog <[email protected]>
7257    
7258 bh 983 * Thuban/Model/session.py (Session.AddTable): New method to
7259     register tables with the session.
7260     (Session.Tables): Return the tables registered with AddTable too.
7261    
7262     * test/test_session.py (TestSessionSimple.test_add_table): New.
7263     Test case for the AddTable method
7264    
7265 frank 981 2003-05-22 Frank Koormann <[email protected]>
7266    
7267     UI polishing updates: Place main buttons (OK, Cancel, etc) in the
7268     lower right corner, center labels for selections, initialize controls
7269     in reasonable order for keyboard navigation.
7270    
7271     * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
7272     (ProjFrame.__DoOnProjAvail): Determine position of current projection
7273     using the wxListBox.FindString() method. Still a problem (#1886)
7274    
7275     * Thuban/UI/classifier.py
7276     (Classifier.__init__, SelectPropertiesDialog.__init__)
7277    
7278     * Thuban/UI/classgen.py (ClassGenDialog.__init__,
7279     (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
7280     different classification types from here to __init__.
7281     (GenUniquePanel.__init__): Set the column width of the first field
7282     in the Field ListCtrl to the full width.
7283    
7284     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
7285     Button to 'Export'. Center Buttons in Selection Box, set Focus to
7286     Grid.
7287     (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
7288     changes focus to the Selection when pressing "Alt-S".
7289    
7290     * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
7291     the text if not visible. The italic font sometimes exceeds the
7292     rendering area.
7293    
7294 jonathan 972 2003-05-21 Jonathan Coles <[email protected]>
7295 jonathan 971
7296 jonathan 975 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
7297     to OnClose so that Thuban closes correctly.
7298    
7299     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
7300     DockFrame.OnClose, not DockFrame._OnClose.
7301    
7302     2003-05-21 Jonathan Coles <[email protected]>
7303    
7304 jonathan 971 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
7305     references to 'inf' and use new Range __init__ to pass floats
7306     directly rather than converting them to strings first.
7307     Fixes RTBug #1876.
7308    
7309     * Thuban/Model/classification.py (ClassGroupRange.SetRange):
7310     Use new Range ___init__ to pass floats.
7311    
7312     * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
7313     filename is a valid image file. Throw IOError otherwise.
7314    
7315     * Thuban/Model/range.py: Brought over new Range from SciParam that
7316     is immutable and has an __init__ which can accept floats.
7317    
7318     * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
7319     into try block. AddLayer doesn't throw any exceptions anymore.
7320     (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
7321     try block.
7322    
7323     * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
7324     the first item in choices. Fixes RTBug #1882.
7325    
7326     * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
7327     has gone to 0 which is a serious problem. abort.
7328     (MapRenderer.draw_raster_layer): Catch IOError seperately and
7329     print the error from GDAL.
7330    
7331     * Thuban/UI/tableview.py (TableGrid.__init__): Call
7332     ToggleEventListeners to turn on listening.
7333     (TableGrid.ToggleEventListeners): New. Turns event listening on
7334     and off so as to prevent excessive messages.
7335     (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
7336     to suppress excessive messages when selecting many rows.
7337     Fixes RTBug #1880.
7338    
7339     * Thuban/UI/view.py: Added checks against if scale == 0. This
7340     is a serious problem that can occur when an image without
7341     geo data is loading and causes the map projection bounds to
7342     go to infinity. Right now, the solution is to simply try
7343     to recover.
7344    
7345     * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
7346     to set the MFILEReceiver attributes even if the data is NULL.
7347    
7348     * extensions/thuban/gdalwarp.cpp: Improved the error handling
7349     and passed GDAL messages back up to the Python layer. Also
7350     tried to fix some memory leaks that were present in the original
7351     utility but didn't matter because the program aborted.
7352    
7353     * test/test_range.py: Copied over tests from SciParam. Removed
7354     tests against importing. Fixes RTBug #1867.
7355    
7356 bh 958 2003-05-21 Bernhard Herzog <[email protected]>
7357    
7358     * test/test_load.py: Remove unused imports and restructure the
7359     test code
7360     (LoadSessionTest): Split into one class for each test and turn
7361     LoadSessionTest itself into the base class for all such session
7362     tests.
7363     (ClassificationTest): New base class for load tests that test
7364     classifications
7365     (TestSingleLayer, TestLayerVisibility, TestClassification)
7366     (TestLabels, TestLayerProjection, TestRasterLayer): New classes
7367     for the individual tests
7368    
7369     * test/support.py (FileLoadTestCase.filename): New base class for
7370     file loading tests
7371    
7372 jan 955 2003-05-21 Jan-Oliver Wagner <[email protected]>
7373    
7374     * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
7375     Mercator' to 'UTM Zone 32' as a more convenient example.
7376     Added 'Gauss Krueger Zone 6'.
7377    
7378     * Data/iceland_sample_raster.thuban: political polygon now
7379     filled transparent to have the raster image visible at once.
7380    
7381 frank 952 2003-05-21 Frank Koormann <[email protected]>
7382    
7383     * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
7384     OnClose() to keep in sync with extensions. Internally Thuban
7385     still uses "underscored" names.
7386    
7387 jonathan 949 2003-05-20 Jonathan Coles <[email protected]>
7388    
7389     This puts back Raster layer support. These layers support projections
7390     through the GDAL library. Currently, the CVS version is being used.
7391     There are no Debian packages available although this may change soon.
7392     A GDAL driver was extended to support writing to memory rather to
7393     files.
7394    
7395     There is still some work that needs to be done, such as some error
7396     handling when loading invalid images or when there is a problem
7397     projecting the image. This putback simply checks in the majority
7398     of the work.
7399    
7400     * setup.py: Add gdalwarp library extension.
7401    
7402     * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
7403     Defaults to False, but can be overridden by subclasses if they
7404     support classification.
7405     (RasterLayer): New. Defines a new layer that represents an
7406     image.
7407    
7408     * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
7409     tag handler.
7410     (SessionLoader.start_layer): Encode the filename.
7411     (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
7412     New. Supports reading a rasterlayer tag.
7413    
7414     * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
7415    
7416     * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
7417     get a string in Latin1. If we get such as string convert it to
7418     unicode first, otherwise leave if alone before encoding.
7419     (SessionSaver.write_layer): Add support for writing both Layers
7420     and RasterLayers.
7421    
7422     * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
7423     The right argument may not be a string, it could also be a Column.
7424    
7425     * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
7426     Make initial window size 600x400. Fixes RTBug #1872.
7427    
7428     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
7429     the dialog is constructed so that we can support layers that
7430     do not have classifications.
7431     (Classifier._OnTry): Only build a classification if the layer
7432     supports one.
7433    
7434     * Thuban/UI/legend.py: Change all checks that a layer is an
7435     instance of Layer into checks against BaseLayer.
7436     (LegendTree.__FillTreeLayer): Only add children to a branch if
7437     the layer supports classification.
7438    
7439     * Thuban/UI/mainwindow.py (MainWindow.NewSession,
7440     MainWindow.OpenSession): Don't proceed with an action if the
7441     user chooses Cancel when they are asked to save changes.
7442     (MainWindow.AddRasterLayer): New. Open a dialog to allow the
7443     user to select an image file. Create a new RasterLayer and add
7444     it to the map.
7445    
7446     * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
7447     for rendering RasterLayer layers.
7448     (MapRenderer.draw_raster_layer): Actually method that calls
7449     the GDALWarp python wrapper and constructs an image from the
7450     data returned.
7451    
7452     * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
7453     Choices symbols to match those used in the table query method.
7454     Replace deprecated method calls on table with new method names.
7455    
7456     * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
7457     how small the scale can get. This still needs more testing.
7458    
7459     * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
7460     Provides a driver to output in .bmp format.
7461    
7462     * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
7463     New. Provides IO routines which write to memory, rather than a file.
7464    
7465     * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
7466     of the gdalwarp utility provided in GDAL. Added function calls
7467     that can be accessed from python.
7468    
7469     * Data/iceland_sample_raster.thuban: New. Sample file that uses
7470     a raster layer.
7471    
7472     * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
7473     layer image data.
7474    
7475     * Doc/thuban.dtd: Added rasterlayer attribute definition.
7476    
7477     * test/test_layer.py, test/test_load.py, test/test_save.py: Added
7478     tests associated with the raster layer code.
7479    
7480     * test/test_transientdb.py
7481     (TestTransientTable.test_auto_transient_table_query): Added a test
7482     for using a Column object as the "right" parameter to a query.
7483    
7484 frank 924 2003-05-19 Frank Koormann <[email protected]>
7485    
7486 frank 927 * Thuban/version.py (get_changelog_date):
7487     Catch exceptions if ChangeLog does not exist.
7488    
7489     * Thuban/UI/view.py (MapCanvas.Export): Bugfix
7490    
7491     2003-05-19 Frank Koormann <[email protected]>
7492    
7493 frank 924 Extended version information for Thuban
7494    
7495     * Thuban/version.py: New, version information for Thuban: Last
7496     modification date and last ChangeLog entry date.
7497    
7498     * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
7499     information: Display Thuban, wxPython and Python version.
7500    
7501 bh 919 2003-05-16 Bernhard Herzog <[email protected]>
7502    
7503 bh 921 * Thuban/Model/save.py: Remove some unused imports including the
7504     __future__ import for nested_scopes as Thuban relies on Python 2.2
7505     now.
7506     (XMLWriter.encode): Remove the special case for a None argument.
7507     In the saver encode is always called with a string argument.
7508    
7509     2003-05-16 Bernhard Herzog <[email protected]>
7510    
7511 bh 919 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
7512     in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
7513     of the bug was that e.g. float("1.2") would fail. Thuban now
7514     requires 2.4.x.
7515    
7516 frank 917 2003-05-16 Frank Koormann <[email protected]>
7517    
7518     Printing enhancement and WMF export (under Win32)
7519    
7520     * Thuban/UI/renderer.py (ExportRenderer): New, derived from
7521     ScreenRenderer. Renders Map, Legend and Scalebar for export.
7522     (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
7523     PrintRender.
7524    
7525     * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
7526     to fullfil information needed for PrinterRenderer.
7527     (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
7528     (MapCanvas.Print): Adapted to new MapPrintout.
7529     (OutputTransform): General calculations to transform from canvas
7530     coordinates to export/printing devices.
7531    
7532     * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
7533     new method_command to call ExportMap, with platform dependency (only
7534     __WXMSW__)
7535    
7536     * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
7537     of scalebar drawing area as new parameters.
7538    
7539     * Thuban/Model/scalebar.py (roundInterval): round long instead of int
7540    
7541     * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
7542     Update to extended scalebar.DrawScalebar header.
7543    
7544     * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
7545    
7546     * test/test_scalebar.py: Made test executable as standalone.
7547    
7548 bh 908 2003-05-16 Bernhard Herzog <[email protected]>
7549    
7550     * Thuban/Model/table.py (Table): Remove this compatibility alias
7551     for DBFTable.
7552    
7553     * test/test_table.py: Import DBFTable as Table because that alias
7554     doesn't exist anymore.
7555    
7556     * Thuban/UI/classgen.py: Remove some unused imports
7557    
7558 jonathan 906 2003-05-14 Jonathan Coles <[email protected]>
7559    
7560     * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
7561     Fix docstring.
7562     (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
7563     (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
7564     values of the supplied range to determine the beginning and end
7565     bounds of the generated classes.
7566    
7567     * Thuban/Model/range.py (Range.number_re): Now accepts floats that
7568     do not have a leading 0 (.5 is now accepted as well as 0.5).
7569    
7570     * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
7571     call to ClassGenerator.GenUniformDistribution.
7572    
7573     * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
7574     layout bug with the 'Projection' label.
7575    
7576     * test/support.py (FloatTestCase): New. Needed for the Range tests.
7577    
7578     * test/test_range.py: New. Imported from SciParam.
7579    
7580 jonathan 897 2003-05-12 Jonathan Coles <[email protected]>
7581    
7582 jonathan 899 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
7583     to table.UniqueValues() with calls that retrieve all the values
7584     from the table. This will need to be replaced by a method on table
7585     which can simply return the list (perhaps more efficiently).
7586    
7587     2003-05-12 Jonathan Coles <[email protected]>
7588    
7589 jonathan 897 The return value of ClassGenerator.CalculateQuantiles has changed.
7590     Refer to the documentation for details.
7591    
7592     * test/test_classgen.py: Modified Quantile tests to use the
7593     new return values.
7594    
7595     * Thuban/Model/classgen.py
7596     (ClassGenerator.GenQuantiles): Add comments describing the parameters,
7597     use new return values from CalculateQuantiles to produce the correct
7598     range bounds in the Classification.
7599     (ClassGenerator.CalculateQuantiles): Add more comments describing
7600     the return values and parameters. Make minor adjustments to improve
7601     the legibility of the code. Fix problem with adjusted not being set
7602     in most cases.
7603    
7604 frank 893 2003-05-12 Frank Koormann <[email protected]>
7605    
7606     * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
7607     and latin1. Fixes #1851 finally.
7608    
7609 jonathan 889 2003-05-09 Jonathan Coles <[email protected]>
7610    
7611 jonathan 897 * test/test_classgen.py: New. Tests the Quantile algorithm.
7612    
7613     * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
7614     Clean up debugging statement, add comments, fix a small bug in the
7615     returned adjusted percentiles.
7616    
7617     2003-05-09 Jonathan Coles <[email protected]>
7618    
7619 jonathan 889 Introduces Range class from SciParam into the ClassGroupRange class,
7620     and such ranges can now be saved and loaded from disk.
7621    
7622     Quantiles are now available in the Classification Generator.
7623    
7624     Initial support for building Queries on a table. Doesn't do anything
7625     but run some tests.
7626    
7627     * Thuban/Model/classification.py: Explicit imports.
7628     (ClassGroupRange): Use the Range class to store the underlying
7629     range information. The interface remains the same, except for
7630     GetRange(), and you can also supply a Range object as the min
7631     parameter to SetRange or __init__.
7632    
7633     * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
7634     string appropriately for use in Thuban. Fixes RTbug #1851.
7635     (SessionLoader.end_projection): Handle the context of the
7636     projection tag a bit better by looking at what objects are not
7637     None. There was an assumption that a projection tag for a map
7638     could occur before any layers.
7639     (SessionLoader.start_clrange): Provide backward compatibility for
7640     reading min/max values as well as the new range parameter.
7641    
7642     * Thuban/Model/map.py: Explicit imports.
7643    
7644     * Thuban/Model/resource.py: Import _.
7645     (ProjFileSaver.write): write header using projfile.dtd.
7646    
7647     * Thuban/Model/save.py: Explicit imports.
7648     (XMLWriter.encode): New. Encode the given string from a format
7649     used by Thuban into UTF-8. Fixes RTbug #1851.
7650    
7651     * Thuban/UI/classgen.py: Explicit imports.
7652     (ClassGenDialog.__init__): Clean up the code and add support
7653     for Quantiles.
7654     (ClassGenDialog.OnOK): Add support for Quantiles.
7655     (GenQuantilesPanel): New. Input panel for Quantiles.
7656     (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
7657     GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
7658    
7659     * Thuban/Model/classgen.py: New. Contains all the classes named above.
7660    
7661     * Thuban/UI/classifier.py: Explicit imports.
7662     (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
7663     ClassTable.SetValueAsCustom): Reworked to use new Range class.
7664    
7665     * Thuban/UI/legend.py: Explicit imports.
7666    
7667     * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
7668     a Table menu and associated method calls.
7669     (MainWindow.choose_color): Removed. No longer needed.
7670    
7671     * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
7672     should be disabled if no projection is selected in the available
7673     list.
7674    
7675     * Thuban/UI/renderer.py: Explicit imports.
7676    
7677     * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
7678     with correctly selecting the rows and issuing the right events.
7679     Be sure to call Skip() to allow the grid to do some of its own
7680     handling which allows the rows to actually be selected.
7681     (LayerTableGrid.select_shapes): Rename from select_shape. Supports
7682     selecting multiple shapes.
7683     (LayerTableFrame): Support for building Queries.
7684     (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
7685    
7686     * Thuban/UI/tree.py: Explicit imports.
7687    
7688     * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
7689     table view can call it.
7690    
7691     * test/test_classification.py: Explicit imports.
7692     (TestClassification.test_ClassGroupRange): Fix test for new
7693     Range class.
7694    
7695     * Doc/thuban.dtd: Add range parameter for clrange.
7696    
7697     * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
7698     object in ClassGroupRange, and also uesd for inputting ranges in
7699     the classifer table and elsewhere.
7700    
7701     * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
7702     yet.
7703    
7704 frank 872 2003-05-09 Frank Koormann <[email protected]>
7705    
7706     * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
7707    
7708 frank 860 2003-05-08 Frank Koormann <[email protected]>
7709    
7710 frank 870 Coding style updates
7711    
7712     * test/test_scalebar.py: Replaced tab indentation by spaces.
7713    
7714     * Thuban/UI/scalebar.py: Explicit imports.
7715    
7716     2003-05-08 Frank Koormann <[email protected]>
7717    
7718 frank 867 * Thuban/UI/scalebar.py
7719     (ScaleBar.DrawScalebar): Format string bug fixed.
7720    
7721     2003-05-08 Frank Koormann <[email protected]>
7722    
7723 frank 865 Reorganization of scalebar component (no wx in Thuban/Model)
7724    
7725     * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
7726     (deriveInterval):
7727     Calculate scalebar interval and unit which fits in width for scale.
7728     (roundInterval): Round float.
7729    
7730     * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
7731    
7732     * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
7733    
7734     * Thuban/UI/legend.py: Import Thuban.UI.scalebar
7735    
7736     2003-05-08 Frank Koormann <[email protected]>
7737    
7738 frank 860 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
7739     Initialize ScaleBar with canvas.map
7740    
7741     * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
7742     round intervals to display smarter lengths
7743     (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
7744     layer. If the maps has no projection applied grey the scalebar.
7745    
7746 frank 857 2003-05-07 Frank Koormann <[email protected]>
7747    
7748     Basic Scalebar features added.
7749    
7750     * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
7751    
7752     * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
7753     (ScaleBarBitmap): New, links the scalebar bitmap with view messages
7754     and the renderer.
7755    
7756     * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
7757    
7758     * Thuban/UI/messages.py: SCALE_CHANGED added.
7759    
7760 bh 850 2003-05-07 Bernhard Herzog <[email protected]>
7761    
7762 bh 852 * Thuban/Model/session.py (Session.__init__): New instance
7763     variable shapestores to hold a list of all open shapestore objects
7764     (Session.ShapeStores): New. Accessor method for the shapestores
7765     list.
7766     (Session._add_shapestore, Session._clean_weak_store_refs): New.
7767     Internal methods to maintain the shapestores list.
7768     (Session.Tables): New. Return all tables open in the session.
7769     (Session.OpenShapefile): Insert the new ShapeStore into the
7770     shapestores list.
7771    
7772     * test/test_session.py (TestSessionSimple.test_initial_state): Add
7773     tests for ShapeStores and Tables
7774     (TestSessionWithContent.test_shape_stores)
7775     (TestSessionWithContent.test_tables): New. Test cases for
7776     ShapeStores and Tables
7777    
7778     2003-05-07 Bernhard Herzog <[email protected]>
7779    
7780 bh 850 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
7781     Add comments about the optimizations used.
7782     (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
7783     Implement the ReadValue table interface method.
7784    
7785     * test/test_transientdb.py
7786     (TestTransientTable.run_iceland_political_tests)
7787     (TestTransientTable.test_transient_joined_table): Add tests for
7788     ReadValue
7789    
7790 frank 848 2003-05-07 Frank Koormann <[email protected]>
7791    
7792     * Resources/Bitmaps/fulllayerextent.xpm,
7793     Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
7794     new icons.
7795    
7796 bh 840 2003-05-06 Bernhard Herzog <[email protected]>
7797    
7798 bh 846 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
7799     New. Simply delegate to the transient table's version.
7800    
7801     * test/test_transientdb.py
7802     (TestTransientTable.test_auto_transient_table_query): New. Test
7803     case for AutoTransientTable's SimpleQuery
7804    
7805     2003-05-06 Bernhard Herzog <[email protected]>
7806    
7807 bh 843 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
7808     Implement a simple query method for the query dialog
7809     (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
7810     the row index or shapeid.
7811     (TransientTable.create): Insert the right value of the row index
7812     (TransientJoinedTable.create): Copy the row index of the left
7813     table to the joined result table
7814    
7815     * test/test_transientdb.py
7816     (TestTransientTable.test_transient_table_read_twice): Fix
7817     doc-string
7818     (TestTransientTable.test_transient_table_query): New. Test for the
7819     SimpleQuery method
7820    
7821     2003-05-06 Bernhard Herzog <[email protected]>
7822    
7823 bh 840 Convert all table users to use the new table interface. This only
7824     covers Thuban itself, not GREAT-ER or other applications built on
7825     Thuban yet, so the compatibility interface stays in place for the
7826     time being but it now issues DeprecationWarnings.
7827    
7828     Finally, the new Table interface has a new method, HasColumn.
7829    
7830     * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
7831     issue deprecation warnings when they're. The warnings refer to the
7832     caller of the method.
7833     (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
7834     for the deprecation warnings
7835    
7836     * test/test_table.py: Ignore the deprecation warnings for the old
7837     table in the tests in this module. The purpose of the tests is to
7838     test the old interface, after all.
7839    
7840     * test/test_transientdb.py
7841     (TestTransientTable.run_iceland_political_tests): Use the
7842     constants for the types. Add a test for HasColumn
7843     (TestTransientTable.test_transient_joined_table): Adapt to new
7844     table interface. Add a test for HasColumn
7845     (TestTransientTable.test_transient_table_read_twice): Adapt to new
7846     table interface
7847    
7848     * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
7849     Adapt to new table interface
7850    
7851     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
7852     new table interface
7853    
7854     * Thuban/UI/controls.py (RecordListCtrl.fill_list)
7855     (RecordTable.SetTable): Adapt to new table interface
7856    
7857     * Thuban/UI/classifier.py (Classifier.__init__)
7858     (Classifier.__init__): Adapt to new table interface
7859    
7860     * Thuban/UI/classgen.py (ClassGenDialog.__init__)
7861     (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
7862     to new table interface
7863    
7864     * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
7865     (AutoTransientTable.HasColumn): Implement the new table interface
7866     method
7867     (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
7868     (AutoTransientTable.UniqueValues): Adapt to new table interface
7869    
7870     * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
7871     Adapt to new table interface
7872    
7873     * test/test_layer.py (TestLayer.open_shapefile): Helper method to
7874     simplify opening shapefiles a bit easier.
7875     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
7876     (TestLayer.test_point_layer): Use the new helper method
7877     (TestLayer.test_get_field_type): New. Test for the GetFieldType
7878     method
7879    
7880     * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
7881     the new table method
7882    
7883     * test/test_memory_table.py (TestMemoryTable.test_has_column):
7884     Test for the new table method HasColumn
7885    
7886 jonathan 833 2003-05-06 Jonathan Coles <[email protected]>
7887    
7888     Addresses the "Selection Extent" wish of RTbug #1787.
7889    
7890     * Resources/Bitmaps/fulllayerextent.xpm,
7891     Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
7892     extent. These are just place holders for the real bitmaps.
7893    
7894     * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
7895     calculate the bounding box once (the first time compute_bbox() is
7896     called).
7897     (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
7898     the bounding box for the shapes in lat/long coordinates.
7899    
7900     * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
7901     option.
7902     (MainWindow.has_selected_shapes): New. Returns true if there are
7903     any selected shapes.
7904     (MainWindow.FullSelectionExtent): New. Calls
7905     MapCanvas.FitSelectedToWindow() when the user selects the menu option.
7906     (_has_selected_shapes): New. Returns true if there are any
7907     selected shapes.
7908    
7909     * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
7910     true if there are any selected shapes.
7911    
7912     * Thuban/UI/view.py (MapCanvas): Added delegated method
7913     HasSelectedShapes.
7914     (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
7915     shapes on the canvas using the map projection (if any).
7916    
7917     * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
7918     for Layer.ShapesBoundingBox().
7919    
7920 bh 826 2003-05-06 Bernhard Herzog <[email protected]>
7921    
7922     * Resources/Projections/defaults.proj: Fix spelling of Mercator
7923    
7924 jonathan 823 2003-05-05 Jonathan Coles <[email protected]>
7925    
7926     Addresses the "Full Layer Extent" wish of RTbug #1787.
7927    
7928     * Resources/Projections/defaults.proj: Added UK National Grid.
7929    
7930     * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
7931     (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
7932     when the user selects the menu option.
7933    
7934     * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
7935     scales the given layer on the canvas using the map projection.
7936    
7937 bh 819 2003-05-05 Bernhard Herzog <[email protected]>
7938    
7939     Convert the table implementations to a new table interface. All
7940     tables use a common mixin class to provide backwards compatibility
7941     until all table users have been updated.
7942    
7943     * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
7944     provide backwards compatibility for table classes implementing the
7945     new interface
7946     (DBFTable, MemoryTable): Implement the new table interface. Use
7947     OldTableInterfaceMixin as base for compatibility
7948     (DBFColumn, MemoryColumn): New. Column description for DBFTable
7949     and MemoryTable resp.
7950    
7951     * test/test_dbf_table.py: New. Test cases for the DBFTable with
7952     the new table interface.
7953    
7954     * test/test_memory_table.py: New. Test cases for the MemoryTable
7955     with the new table interface.
7956    
7957     * test/test_table.py: Document the all tests in this file as only
7958     for backwards compatibility. The equivalent tests for the new
7959     interface are in test_memory_table.py and test_dbf_table.py
7960     (MemoryTableTest.test_read): field_info should be returning tuples
7961     with four items
7962     (MemoryTableTest.test_write): Make doc-string a more precise.
7963    
7964     * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
7965     table interface. Derive from from OldTableInterfaceMixin for
7966     compatibility.
7967     (TransientTableBase.create): New intance variable column_map to
7968     map from names and indices to column objects
7969     (TransientTable.create): Use the new table interface of the input
7970     table
7971     (AutoTransientTable): Convert to new table interface. Derive from
7972     from OldTableInterfaceMixin for compatibility.
7973     (AutoTransientTable.write_record): Removed. It's not implemented
7974     yet and we still have to decide how to handle writing with the new
7975     table and data framework.
7976    
7977     * test/test_transientdb.py
7978     (TestTransientTable.run_iceland_political_tests)
7979     (TestTransientTable.test_transient_joined_table): Use the new
7980     table interface
7981    
7982 jonathan 817 2003-05-05 Jonathan Coles <[email protected]>
7983    
7984     This is namely a collection of UI updates to improve user interactivity.
7985     Tabbing between controls now exists and you can use ESC to close dialog
7986     boxes; ENTER will active the default button.
7987    
7988     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
7989     order that the controls are created so that tabbing works correctly.
7990     (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
7991     wxDialog can handle the default button correctly.
7992     (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
7993     same reasons as for OnOK.
7994     (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
7995     when we ask the table for the maximum/minimum values of a field
7996     which could take a very long time.
7997    
7998     * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
7999     order that the controls are created so that tabbing works correctly.
8000     (SelectPropertiesDialog.__init__): Rearrange the order that the
8001     controls are created so that tabbing works correctly.
8002    
8003     * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
8004     to derive from a wxDialog but behave like the original implementation
8005     which was derived from a wxFrame. wxDialog provides useful key
8006     handling functionality like ESC calling OnCancel and ENTER calling
8007     OnOK which is lost with wxFrame.
8008    
8009     * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
8010     new dialogs.
8011    
8012     * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
8013     order that the controls are created so that tabbing works correctly.
8014     (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
8015     (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
8016     (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
8017     (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
8018     can provide the "UK National Grid" as a default projection.
8019     (UTMPanel.__init__): Rearrange the order that the controls are
8020     created so that tabbing works correctly.
8021    
8022 bh 809 2003-05-05 Bernhard Herzog <[email protected]>
8023    
8024 bh 811 * extensions/thuban/wxproj.cpp: Fix some of the comments.
8025     (project_point): If a map projection but no layer projection is
8026     given, convert degrees to radians before applying the map
8027     projection.
8028    
8029 bh 809 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
8030     (TableGrid.allow_messages): New methods to make it possible to
8031     inhibit message sending.
8032     (TableGrid.issue): Only send the message if not inhibited.
8033     (LayerTableGrid.select_shape): Use the new methods to make sure
8034     that no ROW_SELECTED message is sent while we're updating the
8035     selected rows to match the selected shapes.
8036    
8037 jan 807 2003-05-02 Jan-Oliver Wagner <[email protected]>
8038    
8039     Implementation of MemoryTable.
8040    
8041     * Thuban/Model/table.py (MemoryTable): New. Quite simple table
8042     implementation that operates on a list of tuples. All of the data
8043     are kept in the memory.
8044    
8045     * test/test_table.py (MemoryTableTest): New.
8046    
8047     * test/test_transientdb.py (SimpleTable): Removed.
8048     (TestTransientTable.test_transient_joined_table,
8049     (TestTransientTable.test_transient_table_read_twice): Replaced
8050     SimpleTable by MemoryTable.
8051    
8052 jonathan 793 2003-04-30 Jonathan Coles <[email protected]>
8053    
8054 jonathan 803 * Data/iceland_sample.thuban: Now contains correct projections
8055     for each of the layers.
8056    
8057     * Resources/Projections/defaults.proj: Geographic projection
8058     contains unit conversion parameter.
8059    
8060     2003-04-30 Jonathan Coles <[email protected]>
8061    
8062 jonathan 793 The most important part of this putback is the projection changes.
8063     It should now be possible to specify the projection that a layer
8064     is in and then specify a different projection for the map. The
8065     projection dialog has an extra parameter for a geographic projection
8066     which lets the user select if the input is in degrees or radians.
8067    
8068     * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
8069     to say that the parameter is a tuple of unprojected
8070     points (which is what the callers to this method were assuming).
8071     Also, since the points are unprojected we need to projected them.
8072    
8073     * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
8074     LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
8075     groups are selected, move the layer up/down. Fixes RTbug #1833.
8076    
8077     * Thuban/UI/mainwindow.py: Move menu item map_rename up.
8078    
8079     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
8080     parameter in call to SetClientData.
8081     (GeoPanel): Add support for selecting the units that the
8082     source data is in (Radians or Degrees).
8083    
8084     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
8085     the rendering loop by reducing the number of if's, removing the
8086     unnecessary try/except block, and checking if the old group
8087     is the same as the new one (which happens a lot if there is
8088     no classification, or lots of shapes are in the same group).
8089    
8090     * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
8091     around the redraw routine to try to catch problems that the user
8092     may create by selecting invalid projections for the data set and
8093     map. Clears the display if there are any problems and prints the
8094     error.
8095     (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
8096     rectangle.
8097    
8098     * extensions/thuban/wxproj.cpp (project_point): First invert the
8099     supplied point (which should be in projected coordinates) using
8100     the layer's projection and then project the point using the
8101     map's projection.
8102     (project_points): Use project_point() to project each point.
8103    
8104 jan 792 2003-04-30 Jan-Oliver Wagner <[email protected]>
8105    
8106     * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
8107     don't set the Classification to None if the classfication field
8108     is None (ie only a DEFAULT).
8109    
8110 bh 786 2003-04-30 Bernhard Herzog <[email protected]>
8111    
8112 bh 790 * Thuban/UI/view.py: Fix some typos.
8113    
8114 bh 788 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
8115     not pop up the dialog if the selection becomes empty (this could
8116     happen if e.g. a new selection is opened while the identify tool
8117     is active and dialog had been closed)
8118    
8119     2003-04-30 Bernhard Herzog <[email protected]>
8120    
8121 bh 786 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
8122     instance variable read_record_last_result
8123     (TransientTableBase.read_record): Make sure reading the same
8124     record twice works. The implementation uses the new instance
8125     variable read_record_last_result
8126    
8127     * test/test_transientdb.py
8128     (TestTransientTable.test_transient_table_read_twice): New test
8129     case for the above bug-fix.
8130    
8131 jonathan 793 2003-04-29 Jonathan Coles <[email protected]>
8132    
8133     * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
8134    
8135     * Thuban/UI/classgen.py: Remove all uses of Str2Num.
8136    
8137     * Thuban/UI/classifier.py: Remove all uses of Str2Num.
8138     (ClassTable.SetValueAsCustom): Rename keyword argument in
8139     ClassGroup* constructors to match argument name.
8140    
8141 bh 779 2003-04-29 Bernhard Herzog <[email protected]>
8142    
8143     * Thuban/Model/session.py (Session.Destroy): Explicitly close the
8144     transient DB if it exists to make sure it doesn't leave a journal
8145     file in the temp directory.
8146    
8147     * Thuban/Model/transientdb.py (TransientDatabase.close): Set
8148     self.conn to None after closing the connection to make sure it's
8149     not closed twice
8150    
8151 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
8152    
8153 jonathan 769 Add a visible parameter in the layer XML tag. The default value is
8154     "true". If anything other than "false" is specified we also assume
8155 jonathan 776 "true". Addresses RTbug #1025.
8156 jonathan 769
8157     * Doc/thuban.dtd: Add visible parameter to a layer.
8158    
8159     * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
8160     of visible from 1 to True.
8161     (Layer.__init__): Change default value of visible from 1 to True.
8162    
8163     * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
8164     parameter.
8165    
8166     * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
8167     parameter.
8168    
8169     * test/test_load.py: Add new test data contents_test_visible.
8170     (LoadSessionTest.setUp): save test data.
8171     (LoadSessionTest.testLayerVisibility): Test if the visible flag
8172     is loaded correctly.
8173    
8174     * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
8175     for saving an invisible layer.
8176    
8177     2003-04-29 Jonathan Coles <[email protected]>
8178    
8179 jonathan 767 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
8180     legend dialog box and tell it to change its map to the one
8181     supplied to SetMap(). Fixes RTbug #1770.
8182    
8183 bh 764 2003-04-29 Bernhard Herzog <[email protected]>
8184    
8185 bh 766 Next step of table implementation. Introduce a transient database
8186     using SQLite that some of the data is copied to on demand. This
8187     allows us to do joins and other operations that require an index
8188     for good performance with reasonable efficiency. Thuban now needs
8189     SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
8190     haven't tested that.
8191    
8192     * Thuban/Model/transientdb.py: New. Transient database
8193     implementation.
8194    
8195     * test/test_transientdb.py: New. Tests for the transient DB
8196     classes.
8197    
8198     * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
8199     classes to help automatically remove temporary files and
8200     directories.
8201     (Session.__init__): New instance variables temp_dir for the
8202     temporary directory and transient_db for the SQLite database
8203     (Session.temp_directory): New. Create a temporary directory if not
8204     yet done and return its name. Use AutoRemoveDir to have it
8205     automatically deleted
8206     (Session.TransientDB): Instantiate the transient database if not
8207     done yet and return it.
8208    
8209     * Thuban/Model/data.py (ShapefileStore.__init__): Use an
8210     AutoTransientTable so that data is copied to the transient DB on
8211     demand.
8212     (SimpleStore): New class that simply combines a table and a
8213     shapefile
8214    
8215     * Thuban/Model/table.py (Table, DBFTable): Rename Table into
8216     DBFTable and update its doc-string to reflect the fact that this
8217     is only the table interface to a DBF file. Table is now an alias
8218     for DBFTable for temporary backwards compatibility.
8219    
8220     * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
8221     the last reference to the session goes away so that the temporary
8222     files are removed properly.
8223    
8224     * test/test_load.py (LoadSessionTest.tearDown): Remove the
8225     reference to the session to make sure the temporary files are
8226     removed.
8227    
8228     2003-04-29 Bernhard Herzog <[email protected]>
8229    
8230 bh 764 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
8231     the __parser instance variable into a normal local variable in
8232     read. It's only used there and read will never be called more than
8233     once. Plus it introduces a reference cycle that keeps can keep the
8234     session object alive for a long time.
8235    
8236 jonathan 767 2003-04-29 Jonathan Coles <[email protected]>
8237 jonathan 735
8238 jonathan 762 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
8239     Projection an immutable item. Fixes RTbug #1825.
8240     (Projection.__init__): Initialize instance variables here.
8241     (ProjFile.Replace): New. Replace the given projection object with
8242     the new projection object. This solves the problem of needing the
8243     mutator Projection.SetProjection() in the ProjFrame class and
8244     allows a projection to change parameters without changing its
8245     location in the file.
8246    
8247     * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
8248     be of type wxSAVE and should verify overwriting a file.
8249    
8250     * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
8251     ProjFile.Replace() method instead of the mutator
8252     Projection.SetProjection(). Also requires that we reassign the
8253     client data to the new projection.
8254    
8255     * test/test_proj.py (TestProjection.test): Test GetName() and
8256     GetAllParameters()
8257     (TestProjFile.test): Remove tests for Set*() methods. Add tests
8258     for Replace().
8259    
8260     2003-04-25 Jonathan Coles <[email protected]>
8261    
8262 jonathan 756 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
8263     to save the name of the projection.
8264    
8265     * test/test_save.py (SaveSessionTest.testLayerProjection): New
8266     test to verify layer projections are saved correctly.
8267    
8268     2003-04-25 Jonathan Coles <[email protected]>
8269    
8270 jonathan 753 * Thuban/Model/proj.py (Projection.SetName): Set the name
8271     to "Unknown" if name is None.
8272     (Projection.SetAllParameters): New. Set the projection's
8273     parameter list to the one supplied.
8274     (Projection.SetProjection): New. Set the projection's
8275     properties to those of the supplied Projection.
8276    
8277     * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
8278     the dialog title to include the map's title.
8279     (MainWindow.LayerProjection): Set the dialog title to include
8280     the layer's title.
8281    
8282     * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
8283     error dialogs into a single method call.
8284     (ProjFrame.__VerifyButtons): Add more states to check.
8285     (ProjFrame.__GetProjection): Return the current state of an
8286     edited projection or None.
8287     (ProjFrame.__FillAvailList): Remove checks for states that
8288     shouldn't exist.
8289     (ProjFrame._OnNew): Clear all selected items and supply
8290     a projection panel if necessary.
8291    
8292     * test/test_proj.py (TestProjFile.test): Add tests for
8293     ProjFile.SetAllParameters, ProjFile.SetProjection,
8294     ProjFile.SetName.
8295    
8296     2003-04-25 Jonathan Coles <[email protected]>
8297    
8298 jonathan 748 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
8299     takes an optional argument to select the current projection.
8300     This does not guarantee that the item is visible due to
8301     limited wxWindows functionality. Fixes RTBug #1821.
8302    
8303     2003-04-25 Jonathan Coles <[email protected]>
8304    
8305 jonathan 743 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
8306     the projection name and use it when constructing the Projection
8307     object.
8308    
8309     * Thuban/Model/proj.py (Projection.__init__): Change the default
8310     value for 'name' to None and then test if name is equal to None
8311     in the body of the constructor. This way the caller doesn't have to
8312     know what the default value should be. Namely, useful in load.py
8313     where we have to pick a default value if the 'name' parameter
8314     doesn't exist in the XML file.
8315    
8316     * test/test_load.py (LoadSessionTest.testLayerProjection): New.
8317     Tests a file where a layer has a projection.
8318    
8319     2003-04-25 Jonathan Coles <[email protected]>
8320    
8321 jonathan 735 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
8322     tree for projection information.
8323    
8324     * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
8325     XMLReader.GetFileName.
8326     (SessionLoader): Added support for loading projection tags that
8327     appear inside a layer.
8328    
8329     * Thuban/Model/proj.py (ProjFile): Document the class. Move
8330     back to using a list because the order of the projections in
8331     the file is important to maintain. Fixes RTbug #1817.
8332    
8333     * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
8334     to ProjFile.GetFilename.
8335    
8336     * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
8337     information.
8338    
8339     * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
8340     ProjFrame._OnSaveAs. Removed old dead code from previous
8341     implementation.
8342     (ProjFrame._OnExport): Add support for exporting more than one
8343     projection to a single file.
8344     (ProjFrame.__FillAvailList): use string formatting (% operator)
8345     to build strings that are (partly) translated. Fixes RTbug #1818.
8346    
8347     * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
8348     class.
8349    
8350 bh 734 2003-04-24 Bernhard Herzog <[email protected]>
8351    
8352     * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
8353    
8354     * po/fr.po: New. French translation by Daniel Calvelo Aros
8355    
8356     * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
8357     empty strings.
8358    
8359 jonathan 735 2003-04-24 Jonathan Coles <[email protected]>
8360 jonathan 724
8361     * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
8362     implement the interface that the ProjFrame dialog expects.
8363    
8364     * Thuban/Model/proj.py (Projection.SetName): New. Allows the
8365     name of the projection to be changed.
8366     (ProjFile): Use a dictionary instead of a list so that removing
8367     projections is easier and we are sure about uniqueness.
8368     (ProjFile.Remove): Remove the given projection object.
8369    
8370     * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
8371     Return a list with only one projection file instead of searching for
8372     any projection file. This simplifies many things if the user can
8373     only have one system file and one user file.
8374    
8375     * Thuban/UI/classgen.py: Change all references to
8376     genCombo to genChoice.
8377    
8378     * Thuban/UI/mainwindow.py: Add a Projection option under the
8379     layer menu.
8380     (MainWindow.LayerProjection): New. Open up a projection window
8381     for a layer.
8382    
8383     * Thuban/UI/projdialog.py: Large changes to how the dialog is
8384     laid out. Use three panels instead of one. One for the list of
8385     projections, one for the edit controls, and one for the buttons.
8386     Fixed resizing problems so that the dialog resizes correctly
8387     when the projection panel changes. Added import/export, save, and
8388     new buttons/functionality.
8389    
8390 bh 723 2003-04-24 Bernhard Herzog <[email protected]>
8391    
8392     First step towards table management. Introduce a simple data
8393     abstraction so that we replace the data a layer uses more easily
8394     in the next step.
8395    
8396     * Thuban/Model/data.py: New file with a simple data abstraction
8397     that bundles shapefile and dbffile into one object.
8398    
8399     * Thuban/Model/session.py (Session.OpenShapefile): New method to
8400     open shapefiles and return a shape store object
8401    
8402     * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
8403     object instead of a shapefile filename. This introduces a new
8404     instance variable store holding the datastore. For intermediate
8405     backwards compatibility keep the old instance variables.
8406     (open_shapefile): Removed. No longer needed with the shape store.
8407     (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
8408     get the shape store used by a layer.
8409     (Layer.Destroy): No need to explicitly destroy the shapefile or
8410     table anymore.
8411    
8412     * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
8413     (MainWindow.AddLayer): Use the session's OpenShapefile method to
8414     open shapefiles
8415    
8416     * Thuban/Model/load.py (ProcessSession.start_layer): Use the
8417     session's OpenShapefile method to open shapefiles
8418    
8419     * test/test_classification.py
8420     (TestClassification.test_classification): Use the session's
8421     OpenShapefile method to open shapefiles and build the filename in
8422     a more platform independed way
8423    
8424     * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
8425     Implement to have a session to use in the tests
8426     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
8427     (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
8428     session's OpenShapefile method to open shapefiles
8429     (TestLayerLegend.setUp): Instantiate a session so that we can use
8430     it to open shapefiles.
8431     (TestLayerLegend.tearDown): Make sure that all references to
8432     layers and session are removed otherwise we may get a resource
8433     leak
8434    
8435     * test/test_map.py (TestMapAddLayer.test_add_layer)
8436     (TestMapWithContents.setUp): Instantiate a session so that we can
8437     use it to open shapefiles.
8438     (TestMapWithContents.tearDown): Make sure that all references to
8439     layers, maps and sessions are removed otherwise we may get a
8440     resource leak
8441     ("__main__"): use support.run_tests() so that more info about
8442     uncollected garbage is printed
8443    
8444     * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
8445     session's OpenShapefile method to open shapefiles
8446     ("__main__"): use support.run_tests() so that more info about
8447     uncollected garbage is printed
8448    
8449     * test/test_selection.py (TestSelection.tearDown): Make sure that
8450     all references to the session and the selection are removed
8451     otherwise we may get a resource leak
8452     (TestSelection.get_layer): Instantiate a session so that we can
8453     use it to open shapefiles.
8454     ("__main__"): use support.run_tests() so that more info about
8455     uncollected garbage is printed
8456    
8457     * test/test_session.py (TestSessionBase.tearDown)
8458     (TestSessionWithContent.tearDown): Make sure that all references
8459     to the session and layers are removed otherwise we may get a
8460     resource leak
8461     (TestSessionWithContent.setUp): Use the session's OpenShapefile
8462     method to open shapefiles
8463    
8464 jonathan 721 2003-04-24 Jonathan Coles <[email protected]>
8465    
8466     * Thuban/Model/load.py (XMLReader.read): Should have been checking
8467     if the file_or_filename object had the 'read' attribute.
8468    
8469 jonathan 715 2003-04-23 Jonathan Coles <[email protected]>
8470    
8471 jonathan 720 * Thuban/Model/resource.py: Fixes RTbug #1813.
8472     (ReadProjFile): Add documentation about which exceptions are raised.
8473     Always pass the exceptions up to the caller.
8474     (GetProjFiles): If the directory can't be read return an empty list.
8475     If any of the proj files can't be read skip that file and go
8476     on to the next one.
8477    
8478     * test/test_proj.py: Added test cases to handle nonexistent files,
8479     unreadable files, and files that don't parse correctly.
8480    
8481     2003-04-23 Jonathan Coles <[email protected]>
8482    
8483 jonathan 716 Projection dialog. Allows the user to select from a list
8484     of projection templates and optionally edit them and save new ones.
8485    
8486     * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
8487     (ProjPanel): Base class for projection specific panels.
8488     (TMPanel): Projection panel for Transverse Mercartor.
8489     (UTMPanel): Projection panel for Universal Transverse Mercartor.
8490     (LCCPanel): Projection panel for Lambert Conic Conformal.
8491     (GeoPanel): Projetion panel for Geographic Projection.
8492    
8493     2003-04-23 Jonathan Coles <[email protected]>
8494    
8495 jonathan 715 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
8496     promote symmetry. There now exists XMLReader and XMLWriter.
8497     (XMLReader.read): New. Call to read the given file descriptor or
8498     filename.
8499     (XMLReader.close): New. Make sure the file is closed.
8500     (XMLReader.GetFileName): New. Return just the file name that is being
8501     read from.
8502     (XMLReader.GetDirectory): New. Return just the directory of the file
8503     that is being read.
8504     (XMLReader.AddDispatchers): New. Take a dictionary which contains
8505     the names of functions to call as the XML tree is parsed.
8506     (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
8507     (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
8508     (SessionLoader): Removed class variables start_dispatcher and
8509     end_dispatcher since this functionality is now part of a class
8510     instance. Fixes RTbug #1808.
8511     (SessionLoader.__init__): Add dispatcher functions.
8512     (load_xmlfile): Code was moved into the XMLReader.read().
8513     (load_session): Use modified SessionLoader.
8514    
8515     * Thuban/Model/map.py (Map.GetProjection): New. Returns the
8516     map's projection.
8517    
8518     * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
8519     GetAllParameters.
8520     (Projection.GetParameter): Returns the value for the given parameter.
8521    
8522     * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
8523     (GetProjFiles): Renamed from GetProjections. Now returns a list
8524     of ProjFile objects.
8525     (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
8526     a list of ProjFile objects whose files are not user defined.
8527     (GetUserProjFiles): Renamed from GetUserProjections. Returns a
8528     list of ProjFile objects whose files are user defined.
8529     (ProjFileReader): Extend new XMLReader.
8530    
8531     * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
8532     promote symmetry.
8533    
8534     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
8535     control instead of a wxComboBox. wxChoice controls do not generate
8536     events as the uses highlights possible choices which fixes problems
8537     with resizing the dialog when the use selects an option.
8538    
8539     * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
8540     control instead of a wxComboBox.
8541    
8542     * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
8543     dialog.
8544    
8545     * test/test_proj.py (TestProjection.test): New tests for GetParameter
8546     method.
8547    
8548 bh 703 2003-04-22 Bernhard Herzog <[email protected]>
8549    
8550 bh 705 * Thuban/UI/mainwindow.py: Remove some unused imports and global
8551     constants
8552    
8553 bh 703 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
8554     (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
8555    
8556 bh 700 2003-04-17 Bernhard Herzog <[email protected]>
8557    
8558 bh 701 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
8559     (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
8560     anymore.
8561     (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
8562     (Layer.ShapeType, Layer.Shape): No need to call
8563     self.open_shapefile since it's always called in __init__
8564    
8565 bh 700 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
8566     In wxPython 2.4 there's no need to extend MainLoop anymore since
8567     wxPython itself makes sure OnExit is called.
8568    
8569 jonathan 688 2003-04-16 Jonathan Coles <[email protected]>
8570    
8571 jonathan 693 Initial putback of projection management code. Includes new
8572     classes to read and write projection files. The current load
8573     and save classes were abstracted a bit so they could be reused.
8574     The Projection class was extended to provide new methods and
8575     have a name.
8576    
8577     * Thuban/Model/load.py (XMLProcessor): New. Contains all the
8578     general XML reading methods that were part of ProcessSession.
8579    
8580     * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
8581     name.
8582     (ProjFile): New. Represents a file that contains projection
8583     information.
8584    
8585     * Thuban/Model/resource.py: New. Contains general utilities
8586     for read and writing projection files.
8587    
8588     * Thuban/Model/save.py (XMLSaver): New. Contains all the
8589     general XML writing methods that were part of SessionSaver.
8590     (SessionSaver): Renamed from Saver.
8591    
8592     * test/test_proj.py: New test cases for the projection
8593     file read and write functions.
8594    
8595     2003-04-16 Jonathan Coles <[email protected]>
8596    
8597 jonathan 688 * Thuban/Model/classification.py: Use repr() around values
8598     in the ClassGroup*.__repr__() methods so it is clearer when
8599     a value is a string and when it is a number.
8600    
8601     * test/test_load.py: Rework the classification test to test
8602     that we can load old files.
8603     (testLabels): Test a file where the groups have labels.
8604    
8605 bh 687 2003-04-16 Bernhard Herzog <[email protected]>
8606    
8607     Safer implementation of the performance enhancements of the
8608     low-level renderer:
8609    
8610     * extensions/thuban/wxproj.cpp (extract_projection)
8611     (extract_pointer): Rename extract_projection to extract_pointer
8612     and redefine its purpose to return the pointer stored in a CObject
8613     returned by the object's cobject method. Update all callers.
8614     (s_draw_info, free_draw_info, draw_polygon_init): Implement the
8615     handling of these low-level parameters so that each s_draw_info
8616     instance is handled as a CObject at python level that also
8617     contains real references to the actual python objects which
8618     contain the values in the struct. Add free_draw_info as the
8619     destructor.
8620     (draw_polygon_shape): Add the py_draw_info parameter which must a
8621     cobject containing an s_draw_info pointer.
8622    
8623     * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
8624     method to instantiat the low-level render parameter
8625     (MapRenderer.draw_shape_layer): Use the new method. Remove some
8626     commented out code.
8627     (MapRenderer.draw_polygon_shape): Make the first parameter not the
8628     layer but the low-level render parameter
8629     (ScreenRenderer.draw_shape_layer): Use the low-level render
8630     parameter.
8631    
8632 jonathan 673 2003-04-15 Jonathan Coles <[email protected]>
8633    
8634 jonathan 680 * Thuban/Model/classification.py: Implemented __repr__ for
8635     the ClassGroup* classes to make debugging a bit easier.
8636     (ClassGroup.SetLabel): Check that the string is an instance
8637     of StringTypes not StringType. Accounts for Unicode strings.
8638    
8639     * Thuban/Model/color.py: Implemented __repr__ to make
8640     debugging a bit easier.
8641    
8642     * Thuban/Model/save.py (Saver.write_classification): Need to
8643     save the group label.
8644    
8645     * test/test_load.py (testClassification): New. Loads the
8646     iceland_sample_test.thuban file and checks if it was loaded
8647     correctly.
8648    
8649     2003-04-15 Jonathan Coles <[email protected]>
8650    
8651 jonathan 673 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
8652     to improve rendering performance by initializing the variables
8653     that are not change each time draw_polygon_shape() is called.
8654     The values are stored in a global struct draw_info.
8655     (draw_polygon_shape): Removed initialization code that is
8656     now in draw_polygon_init().
8657    
8658     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
8659 jonathan 674 drawing initialization call to draw_polygon_init()
8660     (MapRenderer.draw_polygon_shape): Use new signature of
8661     draw_polygon_shape.
8662 jonathan 673
8663 jonathan 674 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
8664     weirdness by setting the range to (1, maxint).
8665 jonathan 673
8666 jonathan 674 * Thuban/Model/classification.py (ClassGroupProperties): Make
8667     instance variables private and optimize comparison operator
8668     by first checking if the color references are the same.
8669     (ClassGroupSingleton): Make instance variables private.
8670     (ClassGroupRange): Make instance variables private.
8671 jonathan 673
8672 jonathan 674 * HOWTO-Release: Filled in missing steps for releasing packages.
8673    
8674 bh 672 2003-04-15 Bernhard Herzog <[email protected]>
8675    
8676     First stab at internationalized messages:
8677    
8678     * Thuban/__init__.py (_): Implement the translation function for
8679     real using the python gettext module.
8680    
8681     * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
8682     translate empty strings.
8683    
8684     * Thuban/UI/application.py (ThubanApplication.read_startup_files):
8685     Add a missing space to a warning message
8686    
8687     * po/README: New. Notes about the management of the translation
8688     files.
8689    
8690     * po/Makefile: New. Makefile to help manage the translation files.
8691    
8692     * po/es.po: New. Spanish translation by Daniel Calvelo Aros
8693    
8694     * MANIFEST.in: Include the *.mo files in Resources/Locale and the
8695     translations and support files in po/
8696    
8697     * setup.py (data_files): Add the *.mo files to the data_files too
8698    
8699     * README: Add note about the translations when building from CVS
8700    
8701 jonathan 669 2003-04-14 Jonathan Coles <[email protected]>
8702    
8703     * Thuban/UI/dock.py: Fixes some window resizing problems most
8704     noticable under windows. Always assume the button bitmaps will
8705     be there. Code clean up.
8706     (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
8707     images for the dock/undock button to the same images.
8708     Work around for RTbug #1801.
8709    
8710     * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
8711     be allowed to grow within the sizer. Fixes a bug under Windows
8712     where the toolbar wasn't being drawn.
8713    
8714 frank 664 2003-04-14 Frank Koormann <[email protected]>
8715    
8716     * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
8717     Updated design to try to make the button functionality more
8718     transparent.
8719    
8720 jonathan 662 2003-04-14 Jonathan Coles <[email protected]>
8721    
8722     * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
8723     finalize the intialization of the panel.
8724    
8725     * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
8726     creation of the panel. Should be the last thing called in the
8727     initializer of a subclass.
8728    
8729     * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
8730     set the current selections in the combo boxes. This is needed
8731     under Windows.
8732    
8733     * Thuban/UI/classifier.py (Classifier.__init__): Add a top
8734     level panel to the dialog so that the background colors are
8735     consistent under Windows.
8736    
8737 jonathan 646 2003-04-11 Jonathan Coles <[email protected]>
8738    
8739 jonathan 662 * Thuban/UI/classgen.py: Change color ramps to start at white
8740     not black.
8741    
8742     * Thuban/UI/legend.py: Enable/disable the legend buttons when
8743     the legend changes. Fixes RTbug #1793.
8744    
8745     * test/test_classification.py: Added test for copying of
8746     classifications.
8747    
8748     2003-04-11 Jonathan Coles <[email protected]>
8749    
8750 jonathan 647 * Thuban/UI/resource.py: New. Centralize the loading of resources
8751     such as bitmaps.
8752    
8753     * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
8754     added images to the move buttons, added 'reverse' button.
8755     (CustomRampPanel.__init__): Added images to the move buttons.
8756     (GreyRamp): New. Generates a ramp from white to black.
8757     (HotToColdRamp): New. Generates a ramp from cold to hot colors.
8758    
8759     * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
8760     ID_PROPERTY_*.
8761     (Classifier.__init__): Minor changes to the layout.
8762     (Classifier._OnTitleChanged): Listen for when the user edits the
8763     title and update the dialog's title and the layer's title.
8764    
8765     * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
8766    
8767     * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
8768     (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
8769     if the layer's title changes.
8770    
8771     * Thuban/UI/mainwindow.py: Added new menu item and associated code
8772     to open a dialog to rename the map.
8773     (MainWindow): Use new resource class to import bitmaps.
8774    
8775     2003-04-11 Jonathan Coles <[email protected]>
8776    
8777 jonathan 646 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
8778 jonathan 647 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
8779     Resources/Bitmaps/group_use_none.xpm,
8780     Resources/Bitmaps/group_use_not.xpm,
8781     Resources/Bitmaps/hide_layer.xpm,
8782     Resources/Bitmaps/layer_properties.xpm,
8783     Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
8784     Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
8785     New.
8786 jonathan 646
8787 jonathan 636 2003-04-10 Jonathan Coles <[email protected]>
8788    
8789 jonathan 644 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
8790     Should pass group to ClassGroup constructor.
8791    
8792     2003-04-10 Jonathan Coles <[email protected]>
8793    
8794 jonathan 636 * Thuban/Model/classification.py: (ClassGroup): Move all the common
8795     methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
8796     here. Implement SetVisible(), IsVisible().
8797     (ClassGroup.__init__): Add group parameter which acts as a copy
8798     constructor.
8799    
8800     * Thuban/UI/classifier.py (ClassTable): Add a new column for the
8801     "Visible" check boxes.
8802     (Classifier): Rename the buttons and refactor the code to match
8803     the new labels.
8804    
8805     * Thuban/UI/legend.py: Classify button is now called "Properties".
8806     Refactored the code to change variable names.
8807     (LegendTree.__FillTreeLayer): Only list a group if it is visible.
8808    
8809     * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
8810     MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
8811     renamed to MainWindow.LayerEditProperties.
8812     (MainWindow.ToggleLegend): Don't include map name in legend title.
8813     (MainWindow.SetMap): Added the map name to the window title.
8814     (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
8815     MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
8816     Functionality is found in the layer properties dialog.
8817    
8818     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
8819     draw visible groups.
8820    
8821 jonathan 626 2003-04-09 Jonathan Coles <[email protected]>
8822    
8823 jonathan 634 * Thuban/UI/classgen.py: Modifications to allow simple
8824     addition and selection of new color schemes.
8825     (MonochromaticRamp): New. Generates a ramp between two colors.
8826     (RedRamp): New. Generates a ramp of all red.
8827     (GreenRamp): New. Generates a ramp of all green.
8828     (BlueRamp): New. Generates a ramp of all blue.
8829    
8830     2003-04-09 Jonathan Coles <[email protected]>
8831    
8832 jonathan 626 * Thuban/Model/classification.py (Classification.__deepcopy__):
8833     Need to copy over field and fieldType attributes.
8834    
8835     * Thuban/Model/table.py (Table.field_range): New. Retrive the
8836     maximum and minimum values over the entire table for a given
8837     field.
8838     (Table.GetUniqueValues): New. Retrieve all the unique values
8839     in the table for a given field.
8840    
8841     * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
8842     (GenUniquePanel): New. Controls to allow the user to select
8843     which unique field values they would like in the classification.
8844     (CustomRampPanel): Code that was in ClassGenDialog that allows
8845     the user to select the properties for a custom ramp.
8846     (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
8847    
8848     * Thuban/UI/classifier.py: Removed a lot of debugging code.
8849     (Classifier._SetClassification): Callback method so that the
8850     class generator can set the classification in the grid.
8851     (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
8852     editing of a group properties class into a wxWindows control.
8853    
8854     * Thuban/UI/dock.py: It was decided that if the user closes
8855     a dockable window the window should simply hide itself. That
8856     way if the user wants to show the dock again it appears in the
8857     same place as it was when it was closed.
8858     (DockableWindow.Destroy): Call renamed method OnDockDestroy().
8859     (DockableWindow._OnButtonClose): Hide the window instead of
8860     destroying it.
8861     (DockableWindow._OnClose): Hide the window instead of
8862     destroying it.
8863    
8864     * Thuban/UI/legend.py (LegendTree): Use a private method to
8865     consistently set the font and style of the text. Fixes RTbug #1786.
8866    
8867     * Thuban/UI/mainwindow.py: Import just the Classifier class.
8868    
8869 bh 623 2003-04-07 Bernhard Herzog <[email protected]>
8870    
8871 bh 625 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
8872     to the map module
8873    
8874     2003-04-07 Bernhard Herzog <[email protected]>
8875    
8876 bh 623 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
8877     favor of ToggleSessionTree
8878     (MainWindow.ToggleSessionTree): New method to toggle visibility of
8879     the session tree.
8880     (MainWindow.SessionTreeShown): New method to return whether the
8881     session tree is currently shown.
8882     (MainWindow.ToggleLegend): New method to toggle visibility of the
8883     legend
8884     (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
8885     LegendShown
8886     (MainWindow.LegendShown): New method to return whether the legend
8887     is currently shown.
8888     (_method_command): Add checked parameter so we can define check
8889     menu items
8890     (_has_tree_window_shown, _has_legend_shown): Use the appropriate
8891     mainwindow methods.
8892     (show_session_tree, show_legend commands): Removed.
8893     (toggle_session_tree, toggle_legend commands): New commands to
8894     toggle the visibility of the dialogs
8895    
8896 jonathan 612 2003-04-07 Jonathan Coles <[email protected]>
8897    
8898 jonathan 619 * Thuban/UI/classgen.py: Fix Windows problem.
8899    
8900     * Thuban/UI/dock.py: Fix Windows problem.
8901    
8902     * Thuban/UI/mainwindow.py: Use False instead of false.
8903     (MainWindow.ShowLegend): Remove unnecessary switch parameter.
8904    
8905     2003-04-07 Jonathan Coles <[email protected]>
8906    
8907 jonathan 612 Since we now say that the order of the groups in a classification
8908     matters, it makes sense to be able to manipulate that order. Most
8909     of the changes to Thuban/Model/classification.py are to that end.
8910    
8911     * Thuban/Model/classification.py (Classification.AppendGroup,
8912     Classification.InsertGroup, Classification.ReplaceGroup,
8913     Classification.RemoveGroup, Classification.GetGroup): Do as the
8914     names imply.
8915     (Classification.FindGroup): This was called GetGroup, but GetGroup
8916     takes an index, while FindGroup takes a value.
8917     (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
8918     REFERENCE. Currently there is a cyclic reference between the layer
8919     and its classification. If the classification doesn't need to know
8920     its owning layer we can change this, since it may make sense to be
8921     able to use the same classification with different layers.
8922    
8923     * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
8924    
8925     * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
8926     not AddGroup()
8927    
8928     * Thuban/UI/classifier.py: Now that we can depend on the order in
8929     a Classification and have methods to manipulate that order we don't
8930     need to use our own data structures in the grid. We can simply make
8931     the grid/table access the information they need from a copy of
8932     the classification object.
8933     (Classifier._OnCloseBtn): Event handler for when the user clicks
8934     'Close'. This is needed so if the user applies changes and then
8935     continues to change the table the user has the option of discarding
8936     the most recent changes and keeping what they applied.
8937    
8938     * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
8939     into the same group.
8940    
8941     * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
8942     with a really old version of proj, PJ_VERSION won't even be defined.
8943     If it isn't defined then just compile so that the function always
8944     returns Py_False.
8945    
8946     * test/test_classification.py: Fix tests to use the renamed methods.
8947     Still need to write tests for the new methods.
8948    
8949 jonathan 601 2003-04-04 Jonathan Coles <[email protected]>
8950 jonathan 608
8951 jonathan 612 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
8952     call to SetSelection out of the method and before the call
8953     to __SelectField in __init__. This prevents a recursion of events
8954     when _OnFieldSelect is triggered by the user.
8955    
8956     2003-04-04 Jonathan Coles <[email protected]>
8957    
8958 jonathan 608 * Thuban/Model/classification.py: Rename Color.None to
8959     Color.Transparent.
8960     (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
8961     Don't bother copying the color, since Colors are immutable.
8962    
8963     * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
8964     Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
8965     Thuban/UI/renderer.py, Thuban/UI/view.py:
8966     Rename Color.None to Color.Transparent.
8967    
8968     * test/test_classification.py, test/test_load.py: Rename Color.None
8969     to Color.Transparent.
8970    
8971     2003-04-04 Jonathan Coles <[email protected]>
8972 jonathan 603
8973     * Thuban/Model/classification.py: Fix assert calls.
8974     (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
8975     Copy the color parameter rather than hold onto a reference.
8976 jonathan 601
8977 jonathan 603 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
8978     the color object.
8979     (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
8980     are sure there exists only one refernce to Color.None in the system.
8981     This allows us to use 'is' rather than the comparision functions.
8982    
8983     * Thuban/Model/save.py: Fix assert calls.
8984    
8985     * Thuban/UI/classifier.py: Fix assert calls.
8986     (ClassGrid._OnCellDClick): Call up to the classifier to open the
8987     dialog to edit the groups properties.
8988     (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
8989     correctly if a cell is resized.
8990     (ClassTable.SetClassification): New. Changes the classification
8991     that is in the table.
8992     (ClassTable.__SetRow): Allow groups to be prepended.
8993     (Classifier): New code for opening the EditProperties and
8994     GenerateRanges dialogs.
8995     (SelectPropertiesDialog.__GetColor): Only set the color in the
8996     color dialog if the current color is not None.
8997    
8998     * Thuban/UI/dock.py: Fix assert calls.
8999    
9000     * Thuban/UI/legend.py: Fix assert calls.
9001    
9002     * Thuban/UI/renderer.py: Fix assert calls.
9003    
9004     * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
9005     classifications.
9006     (GenRangePanel): Panel specific to range generation.
9007     (GenSingletonPanel): Panel specific to singleton generation.
9008     (ClassGenerator): Class responsible for actually generating
9009     the classification from the data gathered in the dialog box.
9010     (PropertyRamp): Generates properties whose values range from
9011     a starting property to an ending property.
9012 jonathan 601
9013 bh 600 2003-04-03 Bernhard Herzog <[email protected]>
9014    
9015     * test/support.py (print_garbage_information): New function that
9016     prints information about still connected messages and memory
9017     leaks.
9018     (run_suite): Removed.
9019     (run_tests): New function for use as a replacement of
9020     unittest.main in the test_* files. This one calls
9021     print_garbage_information at the end.
9022    
9023     * test/runtests.py (main): Use support.print_garbage_information
9024    
9025     * test/test_layer.py: Use support.run_tests instead of
9026     unittest.main so we get memory leak information
9027     (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
9028     (TestLayer.test_point_layer, TestLayer.test_empty_layer)
9029     (TestLayerLegend.test_visibility): Call the layer's Destroy method
9030     to fix a memory leak.
9031    
9032     * test/test_classification.py: Use support.run_tests instead of
9033     unittest.main so we get memory leak information
9034     (TestClassification.test_classification): Call the layer's Destroy
9035     method to fix a memory leak.
9036    
9037 bh 591 2003-04-02 Bernhard Herzog <[email protected]>
9038    
9039 bh 595 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
9040     Handle the reference counts of the return value and errors in
9041     PyArg_ParseTuple correctly.
9042    
9043 bh 593 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
9044     sure the filename is absolute to avoid problems when saving the
9045     session again
9046    
9047 bh 591 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
9048    
9049 jonathan 587 2003-04-01 Jonathan Coles <[email protected]>
9050    
9051 jonathan 589 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
9052 jonathan 587 that there actually are points in the returned list of points
9053     before trying to index into the list. The list may be empty if
9054     the shape is a Null Shape.
9055    
9056 bh 586 2003-04-01 Bernhard Herzog <[email protected]>
9057    
9058     * test/test_map.py: Don't use from <module> import *
9059    
9060 jonathan 581 2003-04-01 Jonathan Coles <[email protected]>
9061    
9062     * Thuban/Model/session.py: Use LAYER_CHANGED instead of
9063     LAYER_LEGEND_CHANGED
9064    
9065     * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
9066     self.Destroy() to close the window after yesterday's changes.
9067    
9068     * test/test_map.py, test/test_session.py: Fix messages that
9069     are sent from maps and layers.
9070    
9071 jonathan 575 2003-03-31 Jonathan Coles <[email protected]>
9072    
9073     * Thuban/UI/classifier.py: Commented out some debugging statements.
9074     (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
9075     RTbug #1769.
9076    
9077     * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
9078     position (although position doesn't work yet under GTK).
9079     (DockableWindow.Destroy): New. Called when the window must be
9080     closed. Namely needed when the DockFrame closes and must close
9081     its children.
9082     (DockFrame): Listen for EVT_CLOSE and destroy all children.
9083    
9084     * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
9085     when then window is told to close.
9086     (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
9087     comment in source for more info.
9088    
9089     * Thuban/UI/main.py: Show the legend by default when Thuban starts.
9090    
9091     * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
9092     symmetry with other such methods.
9093     (MainWindow.ShowLegend): Show the legend docked by default.
9094    
9095 jonathan 569 2003-03-28 Jonathan Coles <[email protected]>
9096    
9097     * Thuban/UI/classifier.py: Support for highlighting a specific
9098     group within the grid when the classification dialog is opened.
9099     Also contains a lot of debugging printouts which will later
9100     be removed.
9101    
9102     * Thuban/UI/dock.py: Complete rework on the dock code so that
9103     that it is fairly removed from the rest of the Thuban application.
9104     It is easy to add new docks which the rest of the program having
9105     to be aware of them.
9106    
9107     * Thuban/UI/legend.py: Modifications to support selecting a
9108     specific group in the classification dialog. Changed how layers
9109     are drawn when the layer is visible/invisible.
9110    
9111     * Thuban/UI/mainwindow.py: Removed legend specific code and
9112     replaced it with calls to the new dock code.
9113    
9114     * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
9115     to check if scale > 0. Trying to track down a divide by zero.
9116    
9117 jonathan 557 2003-03-26 Jonathan Coles <[email protected]>
9118    
9119 jonathan 567 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
9120     (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
9121     now part of DockableWindow.
9122     (LegendPanel.DoOnSelChanged): Select the current layer in the
9123     map.
9124     (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
9125     with the selected layer and/or group.
9126    
9127     2003-03-26 Jonathan Coles <[email protected]>
9128    
9129 jonathan 557 This putback contains the code for dockable windows. There is
9130     no support in wxWindows as of this date for windows that can
9131     attach themselves to other windows.
9132    
9133     The current model contains a DockableWindow which has a parent
9134     window for when it is detached and a dock window that it puts
9135     its contents in when it is docked. The contents of a DockableWindow
9136     must be a DockPanel. DockPanel itself derives from wxPanel.
9137    
9138     * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
9139     message, not a LAYER_LEGEND_CHANGED message.
9140    
9141     * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
9142    
9143     * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
9144     as one of the style properties for the fieldTypeText item to
9145     be sure that its size is correct when the text changes.
9146    
9147     * Thuban/UI/dock.py: New. Classes for the DockPanel and
9148     DockableWindow.
9149    
9150     * Thuban/UI/legend.py: Added some more buttons and made the
9151     LegendPanel a DockPanel.
9152    
9153     * Thuban/UI/mainwindow.py: Added sash windows to the main window
9154     and supporting functions for manipulating the sashes.
9155     (MainWindow.ShowLegend): Create a DockableWindow with the
9156     LegendPanel as the contents.
9157    
9158     * Thuban/UI/messages.py: Added DOCKABLE_* messages
9159    
9160     * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
9161     not LAYER_LEGEND_CHANGED, messages.
9162    
9163 jonathan 554 2003-03-25 Jonathan Coles <[email protected]>
9164    
9165     * setup.py: Added custom script bdist_rpm_build_script so that
9166     when the rpm is built the path to wx-config is correct.
9167    
9168     * setup.cfg: Added line saying to use the custom build script
9169    
9170 jonathan 552 2003-03-20 Jonathan Coles <[email protected]>
9171    
9172     Initial implementation of the Legend.
9173    
9174     * Thuban/UI/legend.py: New. Creates a window that shows the map's
9175     Legend information and allows the user to add/modify classifications
9176     and how the layers are drawn on the map.
9177    
9178     * setup.py: New command 'build_docs' which currently uses
9179     happydoc to generate html documentation for Thuban.
9180    
9181     * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
9182     Returns a string which is appropriately describes the group.
9183    
9184     * Thuban/Model/layer.py (Layer.SetClassification): Generate a
9185     LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
9186    
9187     * Thuban/Model/map.py (Map): Rename messages and use new, more
9188     specific, messages.
9189    
9190     * Thuban/Model/messages.py: New message to indicate that a layer's
9191     data has changed (LAYER_CHANGED). New map messages to indicate
9192     when layers have been added/removed/changed or if the stacking order
9193     of the layers has changed.
9194    
9195     * Thuban/Model/session.py: Rename and use new messages.
9196    
9197     * Thuban/UI/classifier.py: Remember if any changes have actually
9198     been applied so that if the dialog is cancelled without an application
9199     of changes we don't have to set a new classification.
9200     (ClassDataPreviewer): Pulled out the window specific code and put it
9201     ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
9202     symbols on any DC.
9203    
9204     * Thuban/UI/mainwindow.py: New code to open the legend.
9205    
9206     * Thuban/UI/view.py: Use new message names.
9207    
9208 jonathan 541 2003-03-19 Jonathan Coles <[email protected]>
9209    
9210     * Thuban/UI/main.py (verify_versions): New. Checks the versions
9211     of Python, wxPython, and some other libraries.
9212    
9213     * extensions/thuban/wxproj.cpp (check_version): Checks the given
9214     version against what wxproj was compiled with.
9215     (check_version_gtk): If wxproj was compiled with gtk then check
9216     the given version against the version of the gtk library
9217     currently being used.
9218    
9219 bh 538 2003-03-14 Bernhard Herzog <[email protected]>
9220    
9221     * test/test_command.py: Run the tests when the module is run as a
9222     script
9223    
9224     2003-03-14 Bernhard Herzog <[email protected]>
9225    
9226     Implement selection of multiple selected shapes in the same layer:
9227    
9228     - Introduce a new class to hold the selection. This basically
9229     replaces the interactor which was nothing more than the
9230     selection anyway. A major difference is of course that the new
9231     selection class supports multiple selected shapes in one layer
9232    
9233     - Move the object that represents the selection from the
9234     application to the canvas. The canvas is a better place than the
9235     application because the selection represents which shapes and
9236     layer of the map displayed by the canvas are selected and
9237     affects how the map is drawn.
9238    
9239     - Make the selection and its messages publicly available through
9240     the mainwindow.
9241    
9242     - The non-modal dialogs do not get a reference to the interactor
9243     anymore as they can simply refer to their parent, the
9244     mainwindow, for the what the interactor had to offer.
9245    
9246     * Thuban/UI/selection.py: New module with a class to represent the
9247     selection.
9248    
9249     * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
9250     these unused messages
9251    
9252     * Thuban/UI/application.py (ThubanApplication.OnInit)
9253     (ThubanApplication.OnExit, ThubanApplication.SetSession): The
9254     interactor is gone now.
9255     (ThubanApplication.CreateMainWindow): There is no interactor
9256     anymore so we pass None as the interactor argument for now for
9257     compatibility.
9258    
9259     * Thuban/UI/view.py (MapCanvas.delegated_messages)
9260     (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
9261     Unsubscribe, delegate messages according to the delegated_messages
9262     class variable.
9263     (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
9264     attributes from instance variables as described with the
9265     delegated_methods class variable.
9266     (MapCanvas.__init__): New instance variable selection holding the
9267     current selection
9268     (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
9269     pass them on to the renderer
9270     (MapCanvas.SetMap): Clear the selection when a different map is
9271     selected.
9272     (MapCanvas.shape_selected): Simple force a complete redraw. The
9273     selection class now takes care of only issueing SHAPES_SELECTED
9274     messages when the set of selected shapes actually does change.
9275     (MapCanvas.SelectShapeAt): The selection is now managed in
9276     self.selection
9277    
9278     * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
9279     (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
9280     Unsubscribe, delegate messages according to the delegated_messages
9281     class variable.
9282     (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
9283     attributes from instance variables as described with the
9284     delegated_methods class variable.
9285     (MainWindow.__init__): The interactor as ivar is gone. The
9286     parameter is still there for compatibility. The selection messages
9287     now come from the canvas.
9288     (MainWindow.current_layer, MainWindow.has_selected_layer):
9289     Delegate to the the canvas.
9290     (MainWindow.LayerShowTable, MainWindow.Classify)
9291     (MainWindow.identify_view_on_demand): The dialogs don't need the
9292     interactor parameter anymore.
9293    
9294     * Thuban/UI/tableview.py (TableFrame.__init__)
9295     (LayerTableFrame.__init__, LayerTableFrame.OnClose)
9296     (LayerTableFrame.row_selected): The interactor is gone. It's job
9297     from the dialog's point of view is now done by the mainwindow,
9298     i.e. the parent. Subscribe to SHAPES_SELECTED instead
9299     of SELECTED_SHAPE
9300    
9301     * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
9302     is gone. It's job from the dialog's point of view is now done by
9303     the mainwindow, i.e. the parent.
9304    
9305     * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
9306     gone. It's job from the dialog's point of view is now done by the
9307     mainwindow, i.e. the parent.
9308    
9309     * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
9310     gone. It's job from the dialog's point of view is now done by the
9311     mainwindow, i.e. the parent.
9312     (SessionTreeCtrl.__init__): New parameter mainwindow which is
9313     stored as self.mainwindow. The mainwindow is need so that the tree
9314     can still subscribe to the selection messages.
9315     (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
9316     (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
9317     selection is now accessible through the mainwindow. Subscribe to
9318     SHAPES_SELECTED instead of SELECTED_SHAPE
9319    
9320     * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
9321     SHAPES_SELECTED message now.
9322     (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
9323     so deal with multiple shapes
9324     (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
9325     gone. It's job from the dialog's point of view is now done by the
9326     mainwindow, i.e. the parent.
9327    
9328     * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
9329     parameter is now a list of shape ids.
9330     (RecordTable.SetTable): The second parameter is now a list of
9331     indices.
9332    
9333     * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
9334     selected_shape parameter and ivar to selected_shapes. It's now a
9335     list of shape ids.
9336     (MapRenderer.draw_label_layer): Deal with multiple selected
9337     shapes. Rearrange the code a bit so that the setup and shape type
9338     distinctions are only executed once.
9339    
9340     * test/test_selection.py: Test cases for the selection class
9341    
9342 jonathan 527 2003-03-11 Jonathan Coles <[email protected]>
9343    
9344     * Thuban/Model/load.py: Temporary fix so that the xml reader
9345     doesn't cause Thuban to crash.
9346    
9347     * Thuban/Model/layer.py: Handle the cyclic references between
9348     a layer and its classification better, and be sure to disconnect
9349     the classification from the layer when the layer is destroyed
9350     so that we don't maintain a cyclic reference that may not be
9351     garbage collected.
9352    
9353     * Thuban/Model/classification.py: See comment for layer.py.
9354    
9355 jan 523 2003-03-12 Jan-Oliver Wagner <[email protected]>
9356    
9357     * HOWTO-Release: New. Information on the steps for releasing
9358     a new version of Thuban.
9359    
9360 jonathan 514 2003-03-11 Jonathan Coles <[email protected]>
9361    
9362     * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
9363     Use True instead of true.
9364     (Classifier): Should have a single panel in which all the controls lie.
9365    
9366     * Thuban/UI/proj4dialog.py: Add normal border.
9367    
9368     * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
9369    
9370     * Thuban/UI/mainwindow.py: Use True instead of true.
9371    
9372     * setup.py: Update some definitions to use wxWindows2.4 files
9373    
9374     * Data/iceland_sample_class.thuban: Fixed file so that the
9375     field_type information is present.
9376    
9377 jonathan 490 2003-03-10 Jonathan Coles <[email protected]>
9378    
9379 jonathan 505 * Thuban/UI/classifier.py (Classifier.__init__): Make the
9380     field type label grow so that when the text changes the
9381     size is updated correctly. This may be a wxWindows bug.
9382    
9383     2003-03-10 Jonathan Coles <[email protected]>
9384    
9385 jonathan 499 * Thuban/UI/application.py: Changed SESSION_CHANGED to
9386     SESSION_REPLACED.
9387    
9388     * Thuban/UI/classifier.py: Wrap text with _().
9389     (ClassGrid.CreateTable): Set dimensions and size hints here,
9390     instead of in Reset, so we only set the size once.
9391    
9392     * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
9393    
9394     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
9395     Call Close() instead of Shutdown().
9396    
9397     * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
9398    
9399     * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
9400     Go back to using OnClose() instead of Shutdown().
9401    
9402     2003-03-10 Jonathan Coles <[email protected]>
9403    
9404 jonathan 497 * Thuban/UI/classifier.py (Classifier): SelectField() needed
9405     to know the old field index as well as the new one.
9406    
9407     2003-03-10 Jonathan Coles <[email protected]>
9408    
9409 jonathan 495 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
9410     to correctly set the table information and call this from
9411     __init__ and from _OnFieldSelect so that all the information
9412     is up to date when the dialog opens and when a field is changed.
9413    
9414     2003-03-10 Jonathan Coles <[email protected]>
9415    
9416 jonathan 490 * Thuban/Model/classification.py (Classification): Don't use
9417     layer's message function directly, use the ClassChanged() method
9418     when then classification changes. SetField/SetFieldType/SetLayer
9419     must keep the information about field name and field type in
9420     sync when an owning layer is set or removed.
9421    
9422     * Thuban/Model/layer.py: Added ClassChanged() so that the
9423     classification can tell the layer when its data has changed.
9424     (Layer.SetClassification): Accepts None as an arguement to
9425     remove the current classification and correctly handles
9426     adding a new classification.
9427    
9428     * Thuban/Model/load.py: Comment out print statement
9429    
9430     * test/test_classification.py, test/test_save.py: New and
9431     improved tests.
9432    
9433 jonathan 483 2003-03-07 Jonathan Coles <[email protected]>
9434    
9435     * Thuban/Model/classification.py: Implemented __copy__ and
9436     __deepcopy__ for ClassGroup* and ClassGroupProperites so
9437     they can easily be copied by the classifier dialog.
9438     (ClassGroupProperites.__init__): The default line color should
9439     have been Color.Black.
9440    
9441     * Thuban/UI/classifier.py: Setting and Getting table values now
9442     uses a consistent set of functions.
9443     (Classifier): Now non-modal. Has field type label which changes
9444     as the field changes. Keep track of buttons in a list so that
9445     we can enable/disable the buttons when the None field is selected.
9446     (SelectPropertiesDialog): Add buttons to make the colors transparent.
9447    
9448     * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
9449     does what OnClose did, but can be called by the application to
9450     close a window. Needed when a session changes, and we have to
9451     close the classifier windows.
9452    
9453     * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
9454     Shuts down open dialogs. Used when a new session is created
9455     or a session is opened.
9456     (MainWindow.SaveSession): Should only call application.SaveSession()
9457     if we don't call SaveSessionAs first.
9458     (MainWindow.Classify): Allow different classifier dialogs for
9459     different layers.
9460    
9461     * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
9462     the parent class handle it. Add Shutdown() to unsubscibe from
9463     event notification and call the parent Shutdown(). This was
9464     necessary so the application can close the tree window.
9465    
9466 jonathan 478 2003-03-06 Jonathan Coles <[email protected]>
9467    
9468     * Thuban/Model/classification.py: Minor documentation changes,
9469     Addition of __eq__ and __ne__ methods.
9470     (Classification.SetLayer): prevent recursion between this method
9471     and Layer.SetClassification().
9472    
9473     * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
9474    
9475     * Thuban/Model/layer.py (SetClassification): prevent recursion
9476     between this method and Classification.SetLayer().
9477    
9478     * test/test_classification.py, test/test_load.py,
9479     test/test_session.py: Fixed and added tests for the classification
9480     classes.
9481    
9482 bh 477 2003-03-06 Bernhard Herzog <[email protected]>
9483    
9484     * Thuban/UI/classifier.py (ClassGrid.__init__)
9485     (ClassGrid.CreateTable): Move the SetSelectionMode call to
9486     CreateTable because otherwise it triggers an assertion in
9487     wxPython/wxGTK 2.4.
9488    
9489 jonathan 459 2003-03-05 Jonathan Coles <[email protected]>
9490    
9491 jonathan 475 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
9492 jonathan 471
9493 jonathan 475 * Thuban/Model/load.py: import FIELDTYPE constants from table.
9494 jonathan 471
9495 jonathan 475 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
9496 jonathan 471
9497 jonathan 475 * Thuban/Model/table.py: Put FIELDTYPE constants back.
9498 jonathan 471
9499     2003-03-05 Jonathan Coles <[email protected]>
9500    
9501 jonathan 459 * Thuban/UI/classifier.py: Added class documentation.
9502     Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
9503     Store just the groups in the table and generate the other
9504     column information when it is requested. Add "None" field
9505     to pull-down to select no classification.
9506    
9507     * Thuban/common.py: Moved FIELDTYPE constants from table.py
9508     (Str2Num): Only catch ValueError exceptions.
9509    
9510     * Thuban/Model/classification.py: Class documentation. Renaming
9511     of methods with Stroke to Line. Groups are stored in a single
9512     list with the default as the first element. Groups are searched
9513     in the order they appear in the list.
9514    
9515     * Thuban/Model/color.py: Documentation.
9516    
9517     * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
9518     the kind of data represented by a field.
9519    
9520     * Thuban/Model/load.py (ProcessSession): Use proper string
9521     conversion function; fixes RTbug #1713.
9522    
9523     * Thuban/Model/save.py (Saver): Store field type information.
9524    
9525     * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
9526     (Table): Add field_info_by_name() to retrieve field information
9527     by specifying the field name, not the number.
9528    
9529     * Thuban/UI/mainwindow.py: Function name changes.
9530    
9531     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
9532     get the layer classification once. Don't try to classify
9533     values when the field is None: just use the default properties.
9534    
9535     * Thuban/UI/view.py: Function name changes.
9536    
9537     * Doc/thuban.dtd: Add field_type attribute to a classification.
9538    
9539 bh 456 2003-03-04 Bernhard Herzog <[email protected]>
9540    
9541 bh 458 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
9542     the fill and stroke layer attributes optional with suitable
9543     default values. Add the stroke_width layer attribute. Use correct
9544     syntax for empty elements. Make the attribute list for labels
9545     refer to the label element.
9546    
9547     2003-03-04 Bernhard Herzog <[email protected]>
9548    
9549 bh 456 * setup.py (thuban_build_py.build): Add a comment about distutils in
9550     Python 2.3 containing some of the functionality we implement in
9551     setup.py ourselves.
9552    
9553     * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
9554     before the selection mode. Doing it the other way round triggers
9555     an assertion in wxWindows.
9556    
9557     * Thuban/Model/save.py (escape): Fix typo in doc-string
9558    
9559     * Thuban/Model/classification.py: Remove unnecessary wxPython
9560     import
9561    
9562 jonathan 448 2003-03-04 Jonathan Coles <[email protected]>
9563    
9564     * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
9565     Parameter 'value' should default to None.
9566    
9567     * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
9568     the class attribute __classification is now private.
9569    
9570     * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
9571     Classifier to ClassGrid. Added support for removing selected rows,
9572     which including code for keeping track of when cells are selected,
9573     and deselected.
9574     (ClassTable): Support for added/removing rows. Fixed a problem
9575     with __ParseInput whereby it would not allow strings (only numbers)
9576     to be entered.
9577     (Classifier): Added button and supporting code for removing
9578     selected rows.
9579    
9580 jonathan 445 2003-02-27 Jonathan Coles <[email protected]>
9581 jonathan 434
9582     * Thuban/common.py: Moved color conversion functions into
9583     Thuban/UI/common.py.
9584     (Str2Num): Now converts the float (not the string) to a long/int
9585     so that an exception isn't thrown.
9586    
9587     * Thuban/UI/common.py: Common functions used in several UI modules
9588    
9589     * Thuban/Model/classification.py: Changed the class hierarchy
9590     so that a Classification consists of Groups which return
9591     Properties when a value matches a Group.
9592    
9593     * Thuban/Model/layer.py: Fixed name resolution problem.
9594    
9595     * Thuban/Model/load.py: Use new Classification and Group functions.
9596    
9597     * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
9598     failure.
9599     (Saver.write_classification): Use new Classification and Group
9600     functions.
9601    
9602     * Thuban/UI/classifier.py: Changes to use new Classification and Group
9603 jonathan 445 functions. Fix to create a tuple with a single value instead of
9604     simply returning the value.
9605 jonathan 434
9606     * Thuban/UI/renderer.py: Use new Classification and Group functions.
9607     Use common.py functions.
9608    
9609 jonathan 445 * Thuban/UI/tree.py: Use common.py functions.
9610 jonathan 447
9611     * test/test_classification.py: Use new Classification and Group
9612     classes.
9613 jonathan 434
9614 jonathan 426 2003-02-24 Jonathan Coles <[email protected]>
9615    
9616     * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
9617     functions from Thuban color objects to wxWindow colour objects.
9618    
9619     * Thuban/Model/classification.py (Classification): Renamed
9620     GetProperties() to GetClassData(). Used the new iterator
9621     in TreeInfo().
9622     (ClassIterator): Iterator implementation to iterate over the
9623     ClassData objects in a classification object.
9624    
9625     * Thuban/Model/save.py (Saver.write_classificaton): Uses
9626     the new iterator to save the classification information.
9627    
9628     * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
9629     for changing the stroke and fill colors and previewing the
9630     changes.
9631    
9632     * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
9633     MainWindow.SaveSessionAs): Text string changes so the dialogs
9634     have more meaningful titles.
9635    
9636     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
9637     Classification method name from GetProperties to GetClassData.
9638    
9639     * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
9640     instead of accessing now non-existent class variables.
9641    
9642 bh 425 2003-02-24 Bernhard Herzog <[email protected]>
9643    
9644     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
9645     unneeded Shape() call. Rendering is substantially faster without
9646     it and it avoids some problems with broken shape files.
9647    
9648 frank 423 2003-02-20 Frank Koormann <[email protected]>
9649    
9650     Force minimal size of identify and label dialogs. The autosizing
9651     looked too ugly.
9652    
9653     * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
9654     * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
9655     Set size of listctrl.
9656     * Thuban/UI/identifyview.py (IdentifyView.__init__):
9657     Set size of dialog.
9658    
9659 jonathan 408 2003-02-19 Jonathan Coles <[email protected]>
9660    
9661     * test/test_classification.py, test/test_layer.py,
9662     test/test_load.py, test/test_map.py, test/test_session.py:
9663     Updated the tests to use the new functions that are in the
9664     respective classes.
9665    
9666     * Thuban/Model/classification.py (Classification):
9667     Uses the new ClassData* classes. Modification messages are
9668     passed up to the parent layer (if it exists).
9669     (ClassData): New class to encapsulate the common data in each
9670     classification property.
9671     (ClassDataDefault): Represents the Default class. data.
9672     (ClassDataPoint): Represents a single class. data point
9673     (ClassDataRange): Represents a class. range
9674     (ClassDataMap): Represents a class. map (unused).
9675    
9676     * Thuban/Model/color.py: Added Color.None to represent something
9677     with no color. Color.Black represents the color black.
9678     (NoColor): Helper class derived from Color to represent something
9679     with no color.
9680    
9681     * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
9682     stroke_width attributes. Made the 'classification' attribute private.
9683     New methods for setting/getting the classification.
9684    
9685     * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
9686     to get the classifcation and use the new ClassData* classes to
9687     hold the classification data. Use Str2Num to convert numbers
9688     properly.
9689    
9690     * Thuban/Model/save.py (Saver): Use new Color and Classification
9691     methods
9692    
9693     * Thuban/UI/classifier.py (ClassGrid): New class to represent a
9694     custom grid.
9695     (ClassTable): Support for editing Values and Labels and for
9696     changing what type (point or range) of data is stored in each
9697     property based on how the user enters the data.
9698     (Classifier): Support for saving the new classifications and
9699     launching the dialog to edit a property.
9700     (SelectPropertiesDialog): New class for editing the visual
9701     properties of a classification (stroke color, width, and fill color)
9702     (ClassPreviewer): Took the Draw method from ClassRenderer and
9703     made most of it into this new class. Intend to use this class in
9704     the SelectPropertiesDialog for previewing changes.
9705    
9706     * Thuban/UI/renderer.py: Use new Color and Classification methods.
9707    
9708     * Thuban/UI/tree.py: Formatting changes.
9709    
9710     * Doc/thuban.dtd: Add 'label' element
9711    
9712     * Thuban/common.py: New. Contains common routines used throughout
9713     the code.
9714     (Str2Num): Takes a string and converts it to the "best" type of
9715     number.
9716    
9717 bh 405 2003-02-14 Bernhard Herzog <[email protected]>
9718    
9719     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
9720     dragging flag is always set to 0 even when the tool implementation
9721     raises an exception
9722    
9723 bh 402 2003-02-11 Bernhard Herzog <[email protected]>
9724    
9725     * Thuban/UI/application.py (ThubanApplication.splash_screen): New
9726     method to create a splash screen.
9727     (ThubanApplication.ShowMainWindow): New. Show the main window.
9728     Needed so the splash screen can display the mainwindow
9729     (ThubanApplication.OnInit): Call the
9730     new splash_screen method to determine whether the application
9731     should display a splash screen. If it displays a splash screen do
9732     not immediately show the main window.
9733    
9734 jonathan 399 2003-02-11 Jonathan Coles <[email protected]>
9735    
9736     * Thuban/Model/classification.py: Added import line to fix
9737     feature conflicts between running on python2.2 and python2.1.
9738    
9739     * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
9740     onto the clinfo parameter, so removed the deepcopy().
9741    
9742 jonathan 396 2003-02-10 Jonathan Coles <[email protected]>
9743    
9744 tkoester 403 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
9745 jonathan 396 Added element_open variable to track opening and closing of tags
9746     so that tags that don't span more than one line are closed with
9747     /> instead of </tag_name>. Use the GetDefault*() methods of
9748     the Classification class.
9749    
9750     * Thuban/Model/classification.py (Classificaton): Added set and
9751     get methods for the default data. The class also takes a layer
9752     reference so that modification messages can be sent. Fixed the
9753     methods to use the new ClassData class.
9754     (ClassData): New class to encapsulate the classification data
9755    
9756     * Thuban/Model/layer.py (Layer): Remove the
9757 tkoester 403 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
9758 jonathan 396 SetDefault*() methods on the layer's classification object.
9759 tkoester 403 (Layer.__init__): Use the new SetDefault*() methods in the
9760 jonathan 396 Classification class.
9761    
9762     * Thuban/Model/load.py (ProcessSession): Use the new ClassData
9763     object instead of a dictionary.
9764    
9765 tkoester 403 * Thuban/UI/classifier.py (ClassRenderer): New class to
9766 jonathan 396 draw the classifications in the dialog box's table.
9767     (Classifier): Modified to use the ClassRenderer class.
9768    
9769 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
9770     methods of the Classification class.
9771 jonathan 396
9772     * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
9773     of the ClassData class.
9774    
9775     * test/test_classification.py, test/test_layer.py,
9776     test/test_map.py, test/test_session.py: Fix the tests to work
9777     with the above code changes.
9778    
9779 jonathan 387 2003-02-03 Jonathan Coles <[email protected]>
9780    
9781     * Thuban/Model/classification.py (Classification): Added getNull()
9782     to return the NullData reference
9783    
9784     * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
9785     Layer.SetStrokeWidth): Modified these functions to change the
9786     null data in the classification rather than keep these values
9787     directly in the Layer class. Menu options to change these values
9788     work again.
9789    
9790 jonathan 380 2003-01-28 Jonathan Coles <[email protected]>
9791    
9792 jonathan 384 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
9793 tkoester 403 Fixed crashing problem on some systems. Dialog box shows
9794 jonathan 380 classification data.
9795    
9796 jonathan 384 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
9797     Colors in the tree view.
9798    
9799     * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
9800     the tree info for classifications. Commented out unnecessary lines.
9801    
9802     * Thuban/Model/classification.py (Classification.TreeInfo): New
9803     function to add information about the classification into the
9804     tree view.
9805    
9806 tkoester 403 2003-01-27 Jan-Oliver Wagner <[email protected]>
9807 jan 375
9808 tkoester 403 * Thuban/__init__.py (_): New.
9809 jan 375
9810     * Thuban/Model/classification.py, Thuban/Model/extension.py,
9811     Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
9812 tkoester 403 Thuban/Model/session.py, Thuban/UI/application.py,
9813     Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
9814     Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
9815     Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
9816     Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
9817     Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
9818 jan 375
9819 jonathan 370 2003-01-27 Jonathan Coles <[email protected]>
9820    
9821 tkoester 403 * Thuban/Model/layer.py: Classification initialization calls.
9822 jonathan 370
9823 tkoester 403 * Thuban/Model/classification.py: Created class to encapsulate
9824     a layer classification. Supports specific data points and
9825     ranges.
9826 jonathan 370
9827 tkoester 403 * Thuban/Model/load.py: Added support for loading classification
9828     information.
9829 jonathan 370
9830 tkoester 403 * Thuban/Model/save.py: Added support for saving classification
9831     information.
9832 jonathan 370
9833 tkoester 403 * Thuban/UI/classifier.py: Initial class for a dialog box for
9834     specifying classification information.
9835 jonathan 370
9836 tkoester 403 * Thuban/UI/mainwindows.py: Support for opening the classifier
9837     dialog.
9838 jonathan 370
9839 tkoester 403 * Thuban/UI/renderer.py: Support for drawing a layer with the
9840     classification information.
9841 jonathan 370
9842 tkoester 403 * Data/iceland_sample_class.thuban: iceland_sample with
9843     classification data.
9844 jonathan 370
9845 tkoester 403 * test/test_classification: Tests for the Classification class.
9846 jonathan 370
9847 bh 359 2002-12-09 Bernhard Herzog <[email protected]>
9848    
9849 bh 361 * test/test_command.py: New. Tests for the command classes.
9850    
9851 bh 359 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
9852     (Command.IsTool): New method to distinguish between command
9853     switching tools and other commands.
9854    
9855     * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
9856     the tool to avoid direct assignments to instance variables
9857     (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
9858     (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
9859     change the tool
9860    
9861     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
9862     active tool's command turns insensitive, disable the tool.
9863     (_tool_command): Use the new ToolCommand class
9864    
9865     * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
9866     SelectTool method to change the tool
9867     (iconfile): Use the ToolCommand class
9868    
9869 bh 354 2002-12-03 Bernhard Herzog <[email protected]>
9870    
9871     * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
9872     the case of selected items that are not children of Layers or Maps
9873     properly. Previously this bug would trigger an assertion in
9874     wxWindows.
9875    
9876 frank 352 2002-11-06 Frank Koormann <[email protected]>
9877    
9878 bh 354 * Thuban/UI/mainwindow.py: Altered the order of tools in the
9879     toolbar: First now are all navigation tools (Zoom In/Out, Pan,
9880     Full Extent).
9881 tkoester 403
9882 bh 349 2002-10-23 Bernhard Herzog <[email protected]>
9883    
9884     * setup.py (setup call): version now 0.1.3
9885    
9886     * MANIFEST.in: Add the files in test/
9887    
9888     * test/README: Add note about tests requiring the iceland data
9889    
9890     * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
9891     copyright notice.
9892    
9893 bh 344 2002-10-18 Bernhard Herzog <[email protected]>
9894    
9895     * test/test_map.py
9896     (TestMapWithContents.test_projected_bounding_box): Use an explicit
9897     epsilon.
9898    
9899     * test/support.py (FloatComparisonMixin.assertFloatEqual)
9900     (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
9901     message if the assertion fails and don't return the return value
9902     of self.assert_. In assertFloatSeqEqual the return meant that not
9903     all items of the sequence were compared.
9904    
9905 bh 326 2002-09-20 Bernhard Herzog <[email protected]>
9906    
9907 bh 341 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
9908    
9909     * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
9910    
9911 bh 338 * test/test_map.py (TestMapWithContents.test_tree_info): Create
9912     the string with the bounding box on the fly because of platform
9913     differences in the way %g is handled.
9914    
9915     * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
9916     DBFfile too because Thuban layers can't yet cope missing DBF
9917     files.
9918    
9919     2002-09-20 Bernhard Herzog <[email protected]>
9920    
9921 bh 326 * test/test_menu.py: Use initthuban instead of
9922     add_thuban_dir_to_path to initialize Thuban.
9923    
9924     * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
9925     Mixin class for float comparisons
9926     (SubscriberMixin): New. Mixin class to test messages sent through
9927     the Connector class
9928    
9929     * test/README: Fix a typo and add the -v flag to the command for
9930     individual tests
9931    
9932 bh 335 * test/test_session.py: New. Test cases for Thuban.Model.session
9933    
9934     * test/test_proj.py: New. Test cases for Thuban.Model.proj
9935    
9936     * test/test_map.py: New. Test cases for Thuban.Model.map
9937    
9938     * test/test_layer.py: New. Test cases for Thuban.Model.layer
9939    
9940     * test/test_label.py: New. Test cases for Thuban.Model.label
9941    
9942     * test/test_connector.py: New. Test cases for Thuban.Lib.connector
9943    
9944     * test/test_color.py: New. Test cases for Thuban.Model.color
9945    
9946     * test/test_base.py: New. Test cases for Thuban.Model.base
9947    
9948 bh 322 2002-09-13 Bernhard Herzog <[email protected]>
9949    
9950     * Thuban/Model/session.py (Session.forwarded_channels): Forward
9951     the CHANGED channel too.
9952    
9953     * Thuban/Model/map.py (Map.forwarded_channels): Forward the
9954     CHANGED channel too.
9955     (Map.__init__): Call the Modifiable constructor as well.
9956    
9957     * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
9958     event if the modified flag changes.
9959     (Modifiable.changed): Tweak the doc-string.
9960    
9961     * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
9962     (MainWindow.set_position_text): Put the code that puts the text
9963     with the mouse position into the status bar into the new method
9964     set_position_text so that it can overwritten in derived classes.
9965    
9966 bh 317 2002-09-12 Bernhard Herzog <[email protected]>
9967    
9968     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
9969     message box on the main window.
9970    
9971 bh 313 2002-09-11 Bernhard Herzog <[email protected]>
9972    
9973     * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
9974     the 'E' because it's less likely to interfere with other menu
9975     entries.
9976 bh 315 (MainWindow.build_menu): remove an incorrect comment.
9977 bh 313
9978 bh 311 2002-09-10 Bernhard Herzog <[email protected]>
9979    
9980     * Thuban/UI/mainwindow.py (MainWindow.Map): New.
9981     (_tool_command): Add sensitive parameter
9982     (_has_visible_map): Sensitivity callback to tools and other
9983     commands that require a visible map. Use it in map_zoom_in_tool,
9984     map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
9985     and map_full_extent
9986    
9987 bh 308 2002-09-06 Bernhard Herzog <[email protected]>
9988    
9989     * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
9990     VIEW_POSITION
9991    
9992 tkoester 403 2002-09-04 Frank Koormann <[email protected]>
9993 frank 306
9994     * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
9995    
9996 bh 302 2002-09-02 Bernhard Herzog <[email protected]>
9997    
9998 bh 304 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
9999     wxWindows already and our implementation doesn't work correctly
10000     with wxGTK 2.3:
10001     (MapCanvas.__init__): Remove the instance variable
10002     (MapCanvas.OnPaint): Always call do_redraw when there's a map to
10003     be drawin
10004     (MapCanvas.OnIdle): Removed.
10005    
10006 bh 302 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
10007     a parameter to determine the size of the rectangle.
10008     (MapCanvas.find_shape_at): Create the box around the point on a
10009     layer by layer basis and make the size depend on the shape type.
10010     This solves a problem with the selection of point shapes at the
10011     border of the layer's bounding box
10012    
10013 bh 292 2002-08-30 Bernhard Herzog <[email protected]>
10014    
10015 bh 300 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
10016     for the sensitivity of remove layer.
10017     (_can_remove_layer): New. Sensitivity callback for remove layer
10018     (Command layer_remove): Use _can_remove_layer
10019    
10020     * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
10021     determine whether a given layer can be deleted.
10022    
10023 bh 297 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
10024     (MapCanvas.do_redraw): Get rid of the unused update_region
10025     instance variable
10026    
10027 bh 294 * Thuban/UI/view.py: Add/update some doc-strings.
10028    
10029 bh 292 * test/: new subdirectory with a bunch of unit tests.
10030    
10031     * test/README, test/test_table.py, test/test_save.py,
10032     test/test_menu.py, test/test_load.py: Initial set of tests and
10033     brief instructions on how to run them
10034    
10035 bh 287 2002-08-29 Bernhard Herzog <[email protected]>
10036    
10037 bh 291 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
10038     arcs with multiple parts.
10039    
10040 bh 289 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
10041     Handle degenrate rectangles.
10042    
10043 bh 287 * Thuban/Model/table.py: Make writing records work correctly:
10044     (Table.__init__): Keep track of whether the DBF is open for
10045     writing
10046     (Table.write_record): Open the DBF file for writing when necessary
10047    
10048 bh 285 2002-08-27 Bernhard Herzog <[email protected]>
10049    
10050     * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
10051     dbf files only for reading by default. Use a new writable dbf
10052     object for writing.
10053    
10054 bh 278 2002-08-26 Bernhard Herzog <[email protected]>
10055    
10056 bh 282 * Thuban/UI/mainwindow.py: Refactor the context creation:
10057     (MainWindow.Context): New method to return a context
10058     (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
10059     new method
10060    
10061 bh 278 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
10062     layer table specific code from TableGrid into LayerTableGrid
10063     (TableFrame, LayerTableFrame): Split the layer table specific code
10064     from TableFrame into LayerTableFrame
10065 bh 280 (LayerTableGrid.select_shape): Remove a debug print
10066 bh 278
10067     * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
10068     LayerTableFrame
10069    
10070 bh 277 2002-08-23 Bernhard Herzog <[email protected]>
10071    
10072     * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
10073     absolute filename.
10074    
10075 bh 269 2002-08-22 Bernhard Herzog <[email protected]>
10076    
10077 bh 275 * Thuban/Model/table.py (Table.write_record): New method to write
10078     records.
10079 tkoester 403 (Table.__init__): Open the DBF file for writing too.
10080 bh 275
10081     * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
10082     into the underlying table.
10083    
10084     * extensions/shapelib/shapefil.h (DBFCommit),
10085     extensions/shapelib/dbfopen.c (DBFCommit): New API function to
10086     commit any changes made to the DBF file.
10087    
10088 bh 271 * Thuban/UI/mainwindow.py (make_check_current_tool)
10089     (_tool_command): Put the code that generates the "checked"
10090     callback into a separate function so that we can reuse it
10091     elsewhere
10092    
10093 bh 269 * Thuban/Model/save.py (Saver): New class to handle serializing a
10094     session into an XML file. The main reason to introduce a class is
10095     that applications built on Thuban can derive from it so that they
10096     can save additional information in a session file.
10097     (save_session): Delegate almost all the work to the Saver class.
10098     Rename the filename argument to file because it may be a file like
10099     object now.
10100    
10101     * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
10102     code. Remove the little test code which would be executed when the
10103     module is run as a script which didn't work anymore since it can't
10104     import the other Thuban modules.
10105     (ProcessSession, load_session): Refactor the ProcessSession to
10106     have one method for each element start and end tag so that derived
10107     classes can easily override the processing of individual tags.
10108     Also, always parse with namespaces enabled because applications
10109     built on top of Thuban will likely use namespaces if they extend
10110     the session file format.
10111    
10112 bh 266 2002-08-21 Bernhard Herzog <[email protected]>
10113    
10114     * setup.py (ThubanInstall.run): Don't repr install_lib_orig
10115     because thubaninit_contents will do it for us.
10116    
10117 tkoester 403 2002-08-16 Jan-Oliver Wagner <[email protected]>
10118 jan 265
10119     * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
10120     tree window already open
10121    
10122 bh 259 2002-08-15 Bernhard Herzog <[email protected]>
10123    
10124 bh 263 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
10125     with self.
10126    
10127     * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
10128     when we have actually captured it.
10129    
10130 bh 259 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
10131     shapefile and destroy the table.
10132    
10133     * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
10134    
10135 bh 254 2002-08-14 Bernhard Herzog <[email protected]>
10136    
10137 bh 256 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
10138     instance variable columns
10139     (RecordTable.GetTypeName): row and col may be negative in some
10140     cases.
10141    
10142 bh 254 * setup.py (InstallLocal.initialize_options)
10143     (InstallLocal.finalize_options, InstallLocal.user_options): New
10144     option create-init-file to build a thubaninit.py when running
10145     install_local
10146     (InstallLocal.run): Create the thubaninit.py module when requested
10147     (thubaninit_contents): Split the template into several parts and
10148     create a new function thubaninit_contents that creates the
10149     contents of a thubaninit module.
10150     (ThubanInstall.run): Use the new function to create the thubaninit
10151     module.
10152    
10153 bh 252 2002-07-30 Bernhard Herzog <[email protected]>
10154    
10155     * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
10156     cleanup.
10157     (ThubanApplication.MainLoop): Extend to automatically call OnExit.
10158    
10159     * Thuban/Model/session.py (Session.Destroy): Don't bypass the
10160     direct base class' Destroy method.
10161    
10162     * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
10163     layers.
10164     (Map.Destroy): Destroy the label_layer as well and call the
10165     inherited Desatroymethod first so that no more messages are
10166     issued.
10167     (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
10168     message if the stacking order actually has changed. Add
10169     doc-strings.
10170     (Map.BoundingBox): Correct the doc-string.
10171     (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
10172     (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
10173    
10174     * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
10175     all labels.
10176    
10177 bh 247 2002-07-29 Bernhard Herzog <[email protected]>
10178    
10179     * Thuban/Model/map.py (Map.subscribe_layer_channels)
10180     (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
10181     to a layer's channels into separate methods.
10182     (Map.RemoveLayer, Map.AddLayer): Call the new methods
10183     (Map.Destroy): Unsubscribe from a layer's channels before
10184     destroying it.
10185    
10186     * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
10187     selected_layer parameter to searched_layer which is the layer to
10188     search in.
10189     (MapCanvas.SelectShapeAt): New parameter layer to restrict the
10190     search to that layer. Return the selected layer and shape.
10191    
10192     * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
10193     typo
10194    
10195 bh 238 2002-07-24 Bernhard Herzog <[email protected]>
10196    
10197 bh 243 * Thuban/UI/application.py (ThubanApplication.create_session):
10198     Extend the doc string.
10199     (ThubanApplication.subscribe_session)
10200     (ThubanApplication.unsubscribe_session): New methods to
10201     subscribe/unsubscribe to/from session channels.
10202     (ThubanApplication.SetSession): Call the new methods here.
10203     (ThubanApplication.maps_changed, ThubanApplication.set_map):
10204     Renamed set_map to maps_changed. Its now a subscriber for
10205     MAPS_CHANGED.
10206    
10207     * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
10208     x-coordinate in case of simple clicks
10209    
10210     * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
10211     don't pass it as a parameter
10212    
10213     * Thuban/Model/session.py (Session.RemoveMap): New
10214    
10215 bh 238 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
10216     window size into a parameter.
10217    
10218 bh 235 2002-07-23 Bernhard Herzog <[email protected]>
10219    
10220 bh 237 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
10221     just commands.
10222    
10223 bh 235 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
10224     parameter list a bit to allow setting the window title and the
10225     initial message in the status bar. Update the callers.
10226    
10227     * Thuban/UI/application.py (ThubanApplication.OnInit)
10228     (ThubanApplication.CreateMainWindow): Put the mainwindow
10229     instantiation into a separate method so that it can be overridden
10230     by a subclass.
10231    
10232 bh 230 2002-07-19 Bernhard Herzog <[email protected]>
10233    
10234 bh 234 * Thuban/Model/session.py: Issue a CHANGED message every time
10235     another changed message is issued to make it easier to get
10236     notified of changes.
10237     (Session): Update the doc string
10238     (Session.forward): Issue changed-events as CHANGED as well.
10239     (Session.changed): Overwrite the inherited version to issue
10240     CHANGED events as well.
10241    
10242     * Thuban/UI/tree.py: We can now simply subscribe to the session's
10243     CHANGED channel to be informed of changes.
10244     (SessionTreeCtrl.session_channels): Not needed any longer.
10245 tkoester 403 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
10246 bh 234 Only have to (un)subscribe CHANGED
10247    
10248     * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
10249    
10250 bh 230 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
10251     for the wxPython locale bug to __init__.py so that it's
10252     automatically executed by anybody using UI code from Thuban.
10253    
10254 bh 225 2002-07-18 Bernhard Herzog <[email protected]>
10255    
10256 bh 228 * Thuban/UI/main.py (main): app no longer needs to be global
10257    
10258     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
10259     as parameter and store it in an instance variable
10260     (MainWindow.invoke_command, MainWindow.update_command_ui)
10261     (MainWindow.save_modified_session, MainWindow.NewSession)
10262     (MainWindow.OpenSession, MainWindow.SaveSession)
10263     (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
10264     application object.
10265    
10266     * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
10267     the main window with self.
10268    
10269 bh 225 * Thuban/UI/context.py: New module with the context class
10270    
10271     * Thuban/UI/command.py (Command): Update doc string.
10272    
10273     * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
10274     MainWindow.update_command_ui): Pass an instance of the context
10275     class to the command's methods
10276     (check_current_tool, call_method): Handle the new context
10277     implementation
10278    
10279     * Examples/simple_extensions/simple_tool.py (simple_tool,
10280     check_simple_tool): Handle the new context implementation
10281    
10282     * Examples/simple_extensions/simple_command.py (simple_command):
10283     Handle the new context implementation. Update the comments about
10284     the context.
10285    
10286     * Thuban/UI/application.py (ThubanApplication.SetSession): Add
10287     doc-string
10288     (ThubanApplication.Session): New method to return the session
10289     object
10290    
10291     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
10292     interactor's selected_layer may not be a layer of the current
10293     session when the tree is updated while a new session is being set.
10294    
10295 bh 217 2002-07-17 Bernhard Herzog <[email protected]>
10296    
10297     * Thuban/UI/tree.py (color_string): Removed. No longer used.
10298     (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
10299     update_tree into update_tree and add_items. The tree now uses a
10300     more generic way to display the contents of the tree.
10301     (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
10302    
10303     * Thuban/Model/layer.py (Layer.TreeInfo),
10304     Thuban/Model/extension.py (Extension.TreeInfo),
10305     Thuban/Model/map.py (Map.TreeInfo),
10306 tkoester 403 Thuban/Model/session.py (Session.TreeInfo):
10307 bh 217 Add TreeInfo methods to implement the new tree view update scheme
10308    
10309 bh 216 2002-07-16 Bernhard Herzog <[email protected]>
10310    
10311     * Thuban/UI/application.py: Don't use "import from" for the
10312     MainWindow. It can't always be resolved.
10313     (ThubanApplication.OnInit): change reference to MainWindow
10314     accordingly.
10315    
10316     * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
10317     completely
10318    
10319 bh 213 2002-07-10 Bernhard Herzog <[email protected]>
10320    
10321     * setup.py (create_init_module): New configurable variable whose
10322     default depends on the platform we're running on.
10323     (ThubanInstall.initialize_options): Initialize
10324     self.create_init_module from the global create_init_module
10325     (ThubanInstall.user_options): indictate that the options
10326     create-init-module and init-module-dir have arguments.
10327    
10328     * setup.py: In the setup call change the version number to include
10329     cvs.
10330    
10331     * MANIFEST.in: Add the files in Examples
10332    
10333 bh 205 2002-07-09 Bernhard Herzog <[email protected]>
10334    
10335 bh 210 * setup.py: In the setup call, use the thuban homepage as the
10336     value of the url parameter.
10337    
10338 bh 208 * Examples: New subdirectory for examples.
10339    
10340     * Examples/simple_extensions/simple_tool.xpm,
10341     Examples/simple_extensions/simple_tool.py,
10342     Examples/simple_extensions/simple_command.py,
10343     Examples/simple_extensions/README: Simple examples showing how to
10344     add new commands and tools.
10345    
10346 bh 207 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
10347     bdist_rpm that we also have an install script.
10348     (bdist_inno): Add 2002 to the copyright notice.
10349    
10350 bh 205 * setup.py: Create a file in python's site-packages directory to
10351     make installation of Thuban as a library easier.
10352     (ThubanInstall.user_options): Add two new options,
10353     create-init-module and init-module-dir
10354     (ThubanInstall.expand_with_pure_python_dirs): New method to expand
10355     filenames for installation in the default directories.
10356     (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
10357     the inherited methods to capture some filenames before they're
10358     transformed too much by distutils.
10359     (ThubanInstall.run): Create the init module if requested.
10360     (ThubanInstall.thuban_init_filename): New method to return the
10361     full name of the init module.
10362     (ThubanInstall.get_outputs): Append the filename of the init
10363     module.
10364    
10365 bh 202 2002-07-08 Bernhard Herzog <[email protected]>
10366    
10367 bh 205 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
10368     handle the prefix properly which means that the default for the
10369     installation prefix should be /usr for RPMs and /usr/local when
10370     doing a normal source install.
10371     (bdist_rpm_install_script): Script to override the default install
10372     commands in the specfile generated by the bdist_rpm command.
10373     (thuban_bdist_rpm.user_options): Add a prefix option
10374     (thuban_bdist_rpm.initialize_options): Init the prefix option.
10375     Create the script files for the spec files as empty files here
10376     (thuban_bdist_rpm._make_spec_file): Override the inherited method
10377     to fill the script files with content.
10378    
10379 bh 202 * Thuban/Model/save.py (relative_filename): Wrapper around
10380     Thuban.Lib.fileutil.relative_filename that accepts an empty dir
10381     argument. save_session now automatically uses this version,
10382     solving a problem when saving to a relative filename.
10383    
10384     * setup.py: In the setup call, make sure that the library
10385     directories are under $prefix/lib not directly under $prefix.
10386    
10387 tkoester 403 2002-06-20 Jan-Oliver Wagner <[email protected]>
10388 jan 199
10389     * Thuban/Model/extension.py: new module to handle extension objects.
10390     * Thuban/Model/messages.py: new messages for extensions.
10391     * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
10392     Session.AddExtension): new for handling extensions.
10393     Also some other minor changes to round up extension handling.
10394     * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
10395     of Extension titles and title and names of its objects.
10396    
10397 bh 194 2002-05-29 Bernhard Herzog <[email protected]>
10398    
10399     * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
10400 bh 202 the events for a command.
10401 bh 194 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
10402     Call bind_command_events to bind the events. add_toolbar_command
10403     can now bind events too so that it's possible to have commands
10404     that are only available through the toolbar.
10405     (MainWindow.init_ids): New instance variable events_bound to keep
10406     track of for which commands events have been bound.
10407    
10408 bh 190 2002-05-28 Bernhard Herzog <[email protected]>
10409    
10410     * Thuban/UI/menu.py: New module to build and manage menus.
10411    
10412     * Thuban/UI/mainwindow.py: Remove some unused imports.
10413     (MainWindow.__init__, main_menu): move the definition of the main
10414     menu from __init__ to the Menu instance main_menu.
10415     (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
10416     build the menu bar and sub-menus from a menu description.
10417    
10418     * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
10419     startup file
10420     (ThubanApplication.read_startup_files): New method to run
10421     ~/.thuban/thubanstart.py
10422    
10423 bh 192 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
10424     Move the toolbar definition to the Menu instance main_toolbar.
10425     (MainWindow.build_toolbar): New method to build the toolbar
10426     similar to the build_menu methods
10427    
10428 bh 184 2002-05-23 Bernhard Herzog <[email protected]>
10429    
10430 bh 186 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
10431     layer_outline_color. Fix it in the definition of the command too.
10432    
10433 bh 184 * Thuban/UI/command.py (Command): Fix typo in doc string
10434    
10435 bh 182 2002-05-22 Bernhard Herzog <[email protected]>
10436    
10437     * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
10438     in the docstring
10439    
10440 bh 175 2002-05-15 Bernhard Herzog <[email protected]>
10441    
10442 bh 180 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
10443     when the shapefile is empty.
10444     (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
10445     now return None for empty shapefiles. Update doc-strings.
10446    
10447     * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
10448     the layer's bbox being None.
10449    
10450     * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
10451     layer's bbox being None.
10452    
10453 bh 175 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
10454     necessary.
10455     (MapCanvas.__init__): New instance variables, last_selected_layer
10456     and last_selected_shape to determine how the selection has
10457     changed.
10458    
10459     * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
10460     AutoSizeColumns because it will cause a traversal of the entire
10461     table which for large .dbf files will take a very long time.
10462    
10463 bh 172 2002-05-14 Bernhard Herzog <[email protected]>
10464    
10465     * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
10466     maximum depth for the tree than shapelib does by default.
10467    
10468 bh 165 2002-05-10 Bernhard Herzog <[email protected]>
10469    
10470     * setup.py (py_modules): The shptree modules doesn't have a
10471     wrapper, so don't include it in the py_modules
10472    
10473 bh 163 2002-05-08 Bernhard Herzog <[email protected]>
10474    
10475     * extensions/shapelib/shptree.c (compare_ints): Make arguments
10476     const void * as in the qsort prototype
10477     (SHPTreeFindLikelyShapes): Remove some unused variables.
10478    
10479     * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
10480     maintains to redraw the window during a drag.
10481     (MapCanvas.unprojected_rect_around_point): New method to determine
10482     a small region around a point for hit-testing.
10483     (MapCanvas.find_shape_at): Only test the shapes in a small region
10484     around the point.
10485    
10486     * setup.py: Increment the version to 0.1.2
10487    
10488     * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
10489     debug print and set session to None after unsubscribing
10490    
10491 bh 146 2002-05-07 Bernhard Herzog <[email protected]>
10492    
10493 bh 154 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
10494     the file to have a .thuban extension.
10495    
10496 bh 152 * Thuban/UI/tree.py (session_channels): New class constant with
10497     all the session channels to subscribe to to update the tree
10498     (SessionTreeCtrl.session_changed): Remember the session so that we
10499     can unsubscribe properly. Use the new class constant to
10500     unsubscribe from the old session and subscribe to the new one.
10501     (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
10502     subscriptions of the SessionTreeCtrl.
10503     (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
10504    
10505     * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
10506     Session Tree" command to the file menu.
10507    
10508     * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
10509     as update_region to the renderer.
10510    
10511     * Thuban/UI/renderer.py
10512     (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
10513     update box is now directly a tuple, not a wxRect anymore.
10514    
10515     * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
10516     prints.
10517    
10518     2002-05-07 Bernhard Herzog <[email protected]>
10519    
10520 bh 146 * setup.py: Add the shptree extension module. See
10521     extensions/pyshapelib/ChangeLog for more details.
10522    
10523     * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
10524     extensions/shapelib/dbfopen.c: Really update to the versions of
10525     shapelib 1.2.9. For some reason it wasn't really done on
10526     2002-04-11.
10527    
10528     * extensions/shapelib/shptree.c: Modified version of shptree.c of
10529     shapelib 1.2.9. The only real difference is the use of qsort
10530     instead of a bubble sort implementation
10531    
10532     * Thuban/Model/layer.py (Layer.__init__): New instance variable
10533     shapetree to hold the shapelib quadtree for the shapefile
10534     (Layer.open_shapefile): Create the quad tree.
10535     (Layer.ShapesInRegion): New method to return the ids of shapes in
10536     a given region using the quad tree.
10537    
10538     * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
10539     comment
10540     (draw_polygon_shape): Accept both arcs and polygons.
10541     (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
10542     the api.
10543    
10544     * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
10545     return the shape ids to be rendered in a given layer.
10546     (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
10547     ids. Use draw_polygon_shape to draw arc shapes as well.
10548     (ScreenRenderer.RenderMap): New parameter for the rectangle that
10549     has to be updated
10550     (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
10551     calling it's ShapesInRegion method.
10552    
10553     * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
10554     update_region for the update region.
10555     (MapCanvas.OnPaint): Maintain the update region
10556     (MapCanvas.do_redraw): Pass the bounding box of the update_region
10557     to the renderer when drawing the bitmap. Reset the update_region.
10558    
10559 bh 129 2002-05-03 Bernhard Herzog <[email protected]>
10560    
10561 bh 131 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
10562     MainWindow.OpenSession): Change the file extension of the session
10563     files to .thuban
10564    
10565 bh 129 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
10566     Move the map channels to be forwarded by the session into the
10567 bh 146 class constant with forwarded_channels. Also add
10568     LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
10569     forwarded_channels
10570 bh 129
10571     * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
10572     typo and some rewording).
10573    
10574 bh 126 2002-05-02 Bernhard Herzog <[email protected]>
10575    
10576     * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
10577     around to speed up most redraws:
10578     (MapCanvas.__init__): New instance variable bitmap which holds the
10579     bitmap
10580     (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
10581     self.bitmap to draw.
10582     (MapCanvas.full_redraw): New method to force a full redraw
10583     including the bitmap
10584     (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
10585     make sure the bitmap is redrawn.
10586     (MapCanvas.projection_changed, MapCanvas.set_view_transform,
10587     MapCanvas.shape_selected): Call full_redraw instead of readraw to
10588     make sure the bitmap is redrawn.
10589     (MapCanvas.OnSize): New method to handle size events so that the
10590     bitmap can be redrawn.
10591    
10592 bh 124 2002-04-29 Bernhard Herzog <[email protected]>
10593    
10594     * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
10595     canvas' VIEW_POSITION event
10596     (MainWindow.view_position_changed): Handler for VIEW_POSITION.
10597     Update the text in the status-bar accordingly.
10598    
10599     * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
10600     (MapCanvas.__del__): Implement because Publisher.__del__ has to be
10601     called.
10602     (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
10603     current_position
10604     (MapCanvas.set_current_position): New method to set
10605     current_position. Issue a VIEW_POSITION event
10606     (MapCanvas.CurrentPosition): New public method to return the value
10607     of current_position. Should be called when the VIEW_POSITION event
10608     is processed.
10609     (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
10610     Update the position.
10611     (MapCanvas.OnLeaveWindow): Set the position to None.
10612    
10613     * Thuban/UI/messages.py (VIEW_POSITION): New message for the
10614     position in the statusbar
10615    
10616 tkoester 403 2002-04-26 Frank Koormann <[email protected]>
10617 frank 120
10618     * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
10619    
10620 tkoester 403 2002-04-24 Frank Koormann <[email protected]>
10621    
10622 frank 118 * Resources/Bitmaps/identify.xpm: shadow added
10623    
10624     * Resources/Bitmaps/fullextent.xpm: new
10625 jan 116
10626 tkoester 403 2002-04-22 Jan-Oliver Wagner <[email protected]>
10627 jan 116
10628 tkoester 403 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
10629     box
10630 jan 114
10631 tkoester 403 2002-04-21 Jan-Oliver Wagner <[email protected]>
10632    
10633 jan 114 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
10634    
10635     * Thuban/UI/tree.py (update_tree): added added map extent
10636    
10637     * Thuban/UI/mainwindow.py (_method_command): extended by parameter
10638 tkoester 403 icon; added map_full_extend as tool
10639 jan 114
10640 tkoester 403 2002-04-19 Jan-Oliver Wagner <[email protected]>
10641 jan 107
10642     * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
10643     saving _new_ sessions
10644    
10645     * Thuban/Model/session.py (create_empty_session): new session
10646     don't have a filename (set to None)
10647    
10648     * Thuban/UI/tree.py (update_tree): added filename and modified flag
10649    
10650     * Thuban/Model/load.py (ProcessSession): convert projection
10651     parameters from unicode to regular string
10652    
10653     * Data/iceland_sample.session: Added UTM Zone 26 projection.
10654    
10655 bh 100 2002-04-11 Bernhard Herzog <[email protected]>
10656    
10657     * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
10658     extensions/shapelib/dbfopen.c: Update to the versions of shapelib
10659     1.2.9
10660    
10661     * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
10662     the pyshapelib directoy into the list of include dirs, so that
10663     pyshapelib_api.h can be found.
10664    
10665     * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
10666     holds the pyshapelib C-API
10667     (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
10668     pyshapelib_api to access the shapelib functions.
10669     (initwxproj): Import the c_api from the shapelib module and
10670     initialize pyshapelib_api.
10671    
10672 bh 89 2002-04-04 Bernhard Herzog <[email protected]>
10673    
10674 bh 91 * setup.py (thuban_bdist_rpm.initialize_options): Use
10675     initialize_options to create the scripts for the rpm.
10676    
10677 bh 89 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
10678    
10679 bh 85 2002-04-03 Bernhard Herzog <[email protected]>
10680    
10681 bh 87 * setup.py: Increment version to 0.1.1
10682    
10683 bh 85 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
10684     Layer" and "Remove Layer" commands from the layer menu to the map
10685     menu
10686    
10687 bh 83 2002-02-15 Bernhard Herzog <[email protected]>
10688    
10689     * Thuban/Model/layer.py (Layer.Shape): list append only takes one
10690     argument (python <= 1.5.2 erroneously accepted multiuple
10691     arguments)
10692    
10693 bh 81 2002-02-04 Bernhard Herzog <[email protected]>
10694    
10695     * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
10696     RecordGrid in the identifyview.
10697     (IdentifyView.__init__): Use IdentifyGridCtrl instead of
10698     IdentifyListCtrl. The grid allows editing of the values.
10699    
10700     * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
10701     implementing a grid for a single row of a thuban table.
10702    
10703     * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
10704     layers by default. Easier to use than the previous default of only
10705     searching through the select layer which meant that if no layer
10706     was selected, you couldn't select a shape.
10707    
10708     * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
10709    
10710     * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
10711     stroke_width attribute
10712    
10713     * Thuban/Model/save.py (save_session): Write the new stroke_width
10714     attribute
10715    
10716     * Thuban/Model/load.py (ProcessSession.startElement): Read the
10717     stroke_width attribute
10718    
10719     * Thuban/Model/layer.py (Layer.__init__): New parameter and
10720     instance variable stroke_width
10721     (Layer.SetStrokeWidth): Set the stroke_width.
10722    
10723 bh 72 2002-02-01 Bernhard Herzog <[email protected]>
10724    
10725     * extensions/thuban/wxproj.cpp (project_points): Fix two
10726     off-by-one errors in the last loop that joins the various parts
10727     together.
10728    
10729 bh 71 2002-01-14 Bernhard Herzog <[email protected]>
10730    
10731     * setup.py (data_dist.make_distribution): Fix some typos
10732    
10733 bh 70 2001-09-18 Bernhard Herzog <[email protected]>
10734    
10735     * README: Slight tweaking in preparation for the 0.1 release
10736    
10737     * setup.cfg: Add section for sdist to create both tgz and zip
10738     archives
10739    
10740     * setup.py: increase version number to 0.1
10741     (data_dist): New command class for data distribution
10742    
10743 bh 64 2001-09-14 Bernhard Herzog <[email protected]>
10744    
10745 bh 70 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
10746     Handle the case of no layer (i.e. layer is None) properly.
10747    
10748 tkoester 403 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
10749 bh 70 Set the initial selection of the combo boxes to reflect the
10750     projection we're starting with in a way that works on windows,
10751     too.
10752    
10753 bh 64 * Thuban/Lib/connector.py (Connector.print_connections): Print the
10754     puiblisher's ids in hex to make it easier to compare them to the
10755     standard repr of python methods
10756    
10757     * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
10758     messages
10759    
10760 bh 59 2001-09-13 Bernhard Herzog <[email protected]>
10761    
10762 bh 64 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
10763     deselect the layer if no layer is selected
10764    
10765 bh 59 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
10766     idle time when there actually is something to draw. If there's
10767     nothing to draw simply clear the window
10768     (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
10769     (MapCanvas.SetMap): force a redraw in all cases because
10770     FitMapToWindow doesn't always do it.
10771     (MapCanvas.ZoomFactor): Add an optional parameter, center, to
10772     specify the point to move into the center of the window
10773     (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
10774     dragged, zoon in/out by a factor of 2
10775 bh 64 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
10776     index, i.e. reversed drawing order) so that objects appearing to
10777     be in from of others are selected first. This is probably mostly
10778     relevant for point shapes where the symbols used may overlap
10779 bh 59
10780     * Thuban/Model/session.py (create_empty_session): Unset the
10781     modified bit before returning it
10782    
10783     * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
10784     create_empty_session session to create the new, empty session.
10785    
10786     * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
10787     the tool bitmaps.
10788     (MainWindow.OnClose, MainWindow.save_modified_session): Separate
10789     the code that asks whether the session should be saved into the
10790     new method save_modified_session.
10791     (MainWindow.OpenSession, MainWindow.NewSession): Use the new
10792     method to save modified session here too.
10793    
10794 bh 55 2001-09-11 Bernhard Herzog <[email protected]>
10795    
10796     * setup.py (InnoIconItem): fix typo
10797    
10798     (thuban_bdist_inno.run):
10799     (bdist_inno.run): Move the decision not to create symlinks on
10800     non-nt platforms to thuban_bdist_inno and do it unconditinally
10801     since we never want to create the symlinks here
10802    
10803 bh 48 2001-09-10 Bernhard Herzog <[email protected]>
10804    
10805 bh 53 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
10806     identify view immediately
10807    
10808     * Thuban/UI/controls.py: New file with two classes RecordListCtrl
10809     and SelectableRecordListCtrl that implement the code shared by the
10810     identify view and the label dialog
10811    
10812     * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
10813     new class RecordListCtrl
10814    
10815     * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
10816     return value of GetValue is None instead of using it as a boolean
10817     directly so that Zero numbers are handled properly.
10818     (LabelListCtrl): Derive from the new class
10819     SelectableRecordListCtrl
10820    
10821 bh 48 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
10822     (Proj4Dialog.dialogLayout): Make the window resizable and set the
10823     size of the text control explicitly to make the sizers work on
10824     both Windows and X.
10825    
10826 bh 44 2001-09-07 Bernhard Herzog <[email protected]>
10827    
10828     * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
10829     that can limit the search to the currently selected layer.
10830     (MapCanvas.SelectShapeAt): Make sure that the currently selected
10831     layer stays selected even when no shape is found
10832 bh 46 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
10833     height do nothing (avoids zero division errors)
10834 bh 44
10835 bh 32 2001-09-06 Bernhard Herzog <[email protected]>
10836    
10837 bh 42 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
10838     Correct the spelling of SessionTreeCtrl. dabbrev is too damn
10839     convenient :-)
10840     (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
10841     a new instvar layer_to_item to map layers to tree items
10842     (SessionTreeCtrl.layer_selected): Select the appropriate tree item
10843     to match the current selection in the interactor
10844    
10845 bh 40 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
10846     (Interactor.HasSelectedLayer): New methods to query the current
10847     selection
10848    
10849     * Thuban/UI/mainwindow.py (MainWindow.current_layer):
10850     (MainWindow.has_selected_layer): Simply call the appropriate
10851     interactor method
10852    
10853     * Thuban/UI/mainwindow.py (MainWindow.__init__):
10854     (MainWindow.LayerShowTable):
10855     (MainWindow.identify_view_on_demand): Store the interactor in an
10856     instvar and use that reference instead of going through main.app
10857    
10858 tkoester 403 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
10859     * Thuban/UI/application.py (ThubanApplication.OnInit):
10860 bh 40 * Thuban/UI/main.py (main): Create the session tree view in main
10861     with the new mainwindow method ShowSessionTree and not directly
10862     the application's OnInit method
10863    
10864     * Thuban/UI/tree.py (myTreeCtrlPanel):
10865     (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
10866     TreeCtrl isntead of a panel. This affects most method since we now
10867     refer to self instead of self.tree
10868     (SessionTreeView): New class implementing a non-modal dialog
10869     showing the session tree.
10870    
10871 bh 35 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
10872     layer to the tableview dialog.
10873    
10874     * Thuban/UI/tableview.py: Add some doc-strings
10875 tkoester 403 (TableGrid):
10876 bh 35 (TableGrid.OnRangeSelect):
10877     (TableGrid.OnSelectCell):
10878     (TableFrame.__init__):
10879     (TableFrame.row_selected):
10880     Selecting rows in the grid view now updates the selected shapes
10881     through the TableFrame. To achieve this we derive TableGrid from
10882     Publisher and introduce the message type ROW_SELECTED which the
10883     TableFrame subscribes to and which is issued by OnRangeSelect and
10884     OnSelectCell
10885    
10886     (DataTable.SelectRow): Removed because it's no longer needed in
10887     the row/shape selection scheme
10888    
10889 bh 32 * Thuban/UI/dialogs.py: New file implementing common classes for
10890     dialogs
10891    
10892     * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
10893     the SELECTED_SHAPE message anymore. This is now handled by the
10894     parent.
10895     (TableGrid.select_shape): Only update the selection if the shape
10896     is not None.
10897     (TableFrame): Inherit from the new NonModalDialog class.
10898     (TableFrame.__init__, TableFrame.select_shape): Handle the
10899     SELECT_SHAPE message.
10900     (TableFrame.OnClose): Extend the inherited method to unsubscribe
10901     SELECT_SHAPE
10902    
10903     * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
10904     (MainWindow.add_dialog):
10905     (MainWindow.dialog_open):
10906     (MainWindow.remove_dialog):
10907     (MainWindow.get_open_dialog): New methods to maintain a dictionary
10908     of opened non-modal dialogs.
10909    
10910     (MainWindow.__init__): Initialize the new non-modal dictionary
10911     management code
10912     (MainWindow.LayerShowTable): maintain separate dialogs for each
10913     table using the non-modal dialog management code to only open a
10914     view once for each table.
10915    
10916     (MainWindow.IdentifyTool):
10917     (MainWindow.__init__):
10918     (MainWindow.identify_view_on_demand): Don't open the identify view
10919     in IdentifyTool anymore. This will be done automatically by the
10920     new method identify_view_on_demand which handles the
10921     SELECTED_SHAPE message so that the identify view will be opened on
10922     demand
10923    
10924     * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
10925     the interactor argument. The SELECTED_SHAPE message is now handled
10926     by the parent.
10927     (IdentifyView.__init__): Add the interactor argument so that we
10928     can handle the SELECTED_SHAPE message here
10929     (IdentifyView.selected_shape): New method to handle the
10930     SELECTED_SHAPE messages
10931    
10932     * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
10933     NonModalDialog class
10934     (IdentifyView.OnClose): Extend the inherited version to
10935     unsubscribe SELECT_SHAPE
10936    
10937     * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
10938    
10939 bh 26 2001-09-05 Bernhard Herzog <[email protected]>
10940    
10941     * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
10942 tkoester 403
10943 bh 26 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
10944     interactor to pass through to the MapCanvas
10945 tkoester 403
10946 bh 26 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
10947     argument to the MainWindow constructor to get rid of the ugly hack
10948     that made main.app available early just so that the mapcanvas
10949     could access the interactor object.
10950    
10951 bh 19 2001-09-04 Bernhard Herzog <[email protected]>
10952    
10953 bh 22 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
10954     that runs a modal message box
10955     (MainWindow.OnClose): Use the new method
10956     (MainWindow.RemoveLayer): Just do nothing in case no layer is
10957     selected. The command should be grayed out anyway, so there's no
10958     need to pop up a message box.
10959     (MainWindow.AddLayer): Pop up a message box with an error message
10960     if the shape file can't be opened
10961    
10962     * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
10963     immediately. This will cause an exception in case the file can't
10964     be opened and we can display an appropriate message.
10965    
10966 bh 19 * MANIFEST.in: Add extensions/pyprojection/LICENSE
10967    
10968     * setup.py (thuban_bdist_rpm): New class implementing a Thuban
10969     specific bdist_rpm command.
10970    
10971     * Thuban/UI/main.py: Catch ImportError exceptions when importing
10972     the locale module because it may not be available on some
10973     installations.
10974    
10975     * extensions/pyprojection/LICENSE: Copy of the license text in
10976     Projection.i. Having it in a separate file makes it easier to
10977     refer to license text in e.g. RPMs
10978    
10979 bh 18 2001-09-03 Bernhard Herzog <[email protected]>
10980    
10981 bh 19 * setup.py: use wx-config instead of wxgtk-config because it's
10982     more generic
10983    
10984     * setup.py (ThubanInstall.get_outputs): Add the symlink in
10985     <prefix>/bin to the outputs
10986     (ThubanInstall.link_file): New method to link files. We need this
10987     because the standard copy_files refuses to link non-existing
10988     files.
10989     (ThubanInstall.run): Remove the leading install root from the
10990     script filename if an install root was specified and use the new
10991     link_file method
10992 tkoester 403
10993 bh 18 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
10994     the window when the first layer is added to the map.
10995    
10996     * setup.py (ThubanInstall.run): Honor the build root (self.root)
10997     when linking thuban.py to <prefix>/bin
10998    
10999 bh 16 2001-08-31 Bernhard Herzog <[email protected]>
11000    
11001     * setup.py: In the setup call, the install parameters shouldn't
11002     have trailing slashes because distutils on non-posix platforms
11003     doesn't like that. The same applies to other directories like
11004     "Resources/Bitmaps"
11005    
11006     In the configuration section for nt, move the wxWindows directory
11007     optins into the part clearly marked as editable.
11008    
11009     (InstallLocal.initialize_options):
11010     (InstallLocal.user_options): remove the currently unused debug
11011     flag
11012     (thuban_build_py.find_all_modules): Add this method so that it
11013     works for our case of having packages and modules in one
11014     distribution as well.
11015     (ThubanInstall.initialize_options):
11016     (ThubanInstall.finalize_options):
11017     (ThubanInstall.user_options):
11018     (ThubanInstall.boolean_options): Add new options, do-symlink and
11019     extra files. Since these are the first ThubanInstall specific
11020     options, override user_options and boolean_options
11021     (ThubanInstall.run): Honor the new do-symlink and extra-files
11022     options.
11023     (ThubanInstall.get_outputs): Add to override the base-class's
11024     version and add the extra-files to the outputs
11025     (bdist_inno): New class for windows distributions with Inno Setup
11026     (InnoIconItem): Helper class for bdist_inno
11027     (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
11028     this together with the appropriate parameters, to the setup call.
11029 tkoester 403
11030 bh 16 * setup.cfg (bdist_inno): added new section for the inno setup
11031     installer
11032    
11033     * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
11034     changing_selection to avoid recursive selection events when
11035     modifying the selection in response to a selection event.
11036     (myTreeCtrlPanel.normalize_selection): Set the new inst var when
11037     changing the tree's selection.
11038     (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
11039     we're not being called indirectly from normalize_selection.
11040    
11041     * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
11042     event.Check only if the command is actuall checkable.
11043     (MainWindow.__init__): Call the toolbar's Realize method to make
11044     sure that the items are actually shown
11045    
11046 bh 7 2001-08-28 Bernhard Herzog <[email protected]>
11047    
11048 bh 9 * setup.py: Fix some doc strings
11049    
11050 bh 7 * ChangeLog: started
11051    

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26