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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2544 - (show annotations)
Mon Jan 24 11:19:53 2005 UTC (20 years, 1 month ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 433592 byte(s)
Rework the status bar updates a bit to make sure the message about
the projections is produced at the right times.

* Thuban/UI/mainwindow.py (MainWindow.update_status_bar_messages):
New class variable with messages that may require a status bar
update.
(MainWindow.view_position_changed)
(MainWindow.update_status_bar): Rename from view_position_changed
to update_status_bar.  It's meaning has changed now that it may
also generate messages about problems with projection settings.
(MainWindow.__init__): Use the new update_status_bar_messages
class variable to subscribe update_status_bar
(MainWindow.set_position_text): Update doc-string.  This method
has to be renamed at some point.  See doc-string and comments.
(MainWindow.OnClose): Unsubscribe update_status_bar from all
messages in update_status_bar_messages

* Thuban/UI/viewport.py (ViewPort.forwarded_map_messages): New
class attribute.  map messages to be forwarded by the viewport.
(ViewPort._subscribe_map, ViewPort._unsubscribe_map): (un)subscribe
the messages in forwarded_map_messages

1 2005-01-24 Bernhard Herzog <[email protected]>
2
3 Rework the status bar updates a bit to make sure the message about
4 the projections is produced at the right times.
5
6 * Thuban/UI/mainwindow.py (MainWindow.update_status_bar_messages):
7 New class variable with messages that may require a status bar
8 update.
9 (MainWindow.view_position_changed)
10 (MainWindow.update_status_bar): Rename from view_position_changed
11 to update_status_bar. It's meaning has changed now that it may
12 also generate messages about problems with projection settings.
13 (MainWindow.__init__): Use the new update_status_bar_messages
14 class variable to subscribe update_status_bar
15 (MainWindow.set_position_text): Update doc-string. This method
16 has to be renamed at some point. See doc-string and comments.
17 (MainWindow.OnClose): Unsubscribe update_status_bar from all
18 messages in update_status_bar_messages
19
20 * Thuban/UI/viewport.py (ViewPort.forwarded_map_messages): New
21 class attribute. map messages to be forwarded by the viewport.
22 (ViewPort._subscribe_map, ViewPort._unsubscribe_map): (un)subscribe
23 the messages in forwarded_map_messages
24
25 2005-01-21 Bernhard Herzog <[email protected]>
26
27 * test/postgissupport.py (PostGISDatabase.__init__): Tweak
28 doc-string
29 (find_postgis_sql): Update for postgis-1.0.0-rc1, which uses a
30 different name for the initialization SQL file.
31
32 2005-01-21 Jonathan Coles <[email protected]>
33
34 * Thuban/UI/baserenderer.py (proj_params_to_str): New. Takes
35 a projection and returns a formatted string representing the
36 parameters to feed to gdalwarp. This function eliminates
37 redundancy in draw_raster_layer().
38 (BaseRenderer.render_map_incrementally): Removed the optimization which
39 drew the top most raster layer first and then only those vector-
40 based layers that are above it. With the support for transparency
41 this optimization breaks correct behaviour.
42 (BaseRenderer.draw_raster_layer): Reorganize code to support possible
43 future enhancements to raster layer bounding box. The old behaviour has
44 not changed. Also, change calling parameters to draw_raster_data()
45 to specify new RAW data format and mask.
46 (BaseRenderer.draw_raster_data): Change signature to include an optional
47 parameter for mask information. Change documentation to mention
48 support for new parameter and added option for RAW data format.
49 The data argument is now a list of [width, height, data].
50
51 * Thuban/UI/renderer.py (MapRenderer.draw_raster_data): Add new optional
52 mask parameter. Add new condition for RAW format, which
53 significantly reduces rendering time. Add condition for
54 mask parameter.
55
56 * libraries/thuban/gdalwarp.cpp (GetImageData): New. Creates a
57 data array of RGB values from the projected image returned from
58 the gdal warping functions. In the case of palette based images, it
59 converts the NO_DATA index to the mask color.
60 (ProjectRasterFile): Removed all custom memory driver references
61 and replaced it with the standard in-memory dataset provided
62 by gdal. The return data is no longer a BMP file, but an array
63 of RGB values, one set triple per pixel.
64
65 * libraries/thuban/bmpdataset.cpp: Removed. Unnecessary.
66 * libraries/thuban/cpl_mfile.h: Removed. Unnecessary.
67 * libraries/thuban/cpl_mfile.cpp: Removed. Unnecessary.
68
69 * setup.py (thuban_build_ext.finalize_options): Removed mention
70 of cpl_mfile.cpp and bmpdataset.cpp files in the list of source
71 files. These are obsolete with the new version of gdalwarp.cpp
72
73 * test/test_baserenderer.py (SimpleRenderer.draw_raster_data):
74 Updated signature.
75 (TestBaseRenderer.test_raster_no_projection): Changed the test
76 data to be data in the uncompressed RAW format returned from
77 ProjectRasterFile.
78
79 2005-01-21 Jan-Oliver Wagner <[email protected]>
80
81 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Made
82 string available for i18n.
83
84 2005-01-20 Russell Nelson <[email protected]>
85
86 * Resources/Projections/defaults.proj: Ruin the speling of the
87 Lambert-93 projection so it doesn't run into the wx UTF-8 bug.
88 It's the wrong thing to do in the long run, but it's necessary for
89 those users until that bug is fixed. Otherwise the projection
90 dialog segfaults. Better to annoy some Lambert-93 users with a
91 spelling mistake than every Fedora Core 3 user of Thuban-CVS.
92
93 2005-01-20 Bernhard Reiter <[email protected]>
94
95 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Added
96 docstring and comment that the warning code here is a hack.
97
98 2005-01-20 Russell Nelson <[email protected]>
99
100 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed): Warn
101 user about misprojected layers when their lat/lon bounding
102 box exceeds rational lat/lon values.
103
104 2005-01-20 Bernhard Reiter <[email protected]>
105
106 * Thuban/UI/about.py (unicodeToLocale): Improved:
107 Use 'ascii' and then 'replace' for other characters
108 when getdefaultlocale returns None. Thanks to Bernhard H. .
109
110 2005-01-20 Bernhard Reiter <[email protected]>
111
112 * Thuban/UI/classgen.py (GenQuantilesPanel.OnRetrieve): Added a comment
113 that OnRangeText might be called twice and using None as argument.
114
115 2005-01-20 Bernhard Reiter <[email protected]>
116
117 * Thuban/UI/classgen.py (GenQuantilesPanel.OnRetrieve): Add a
118 OnRangeText(0) to work around a different in wx Behaviour noticed
119 on MacOSX, thanks to Lorenzo Moretti and Daniel Calvelo for the fix.
120
121 2005-01-20 Bernhard Reiter <[email protected]>
122
123 * Thuban/UI/about.py: take iso-8859-15 when getdefaultlocale returns
124 None. (Fixes rt#2910.)
125
126 2005-01-18 Frank Koormann <[email protected]>
127
128 New Extension: mouseposition
129 Tool to collect mouse click positions (map coordinates) in a dialog.
130
131 * Extensions/mouseposition/__init__.py: New, extension registration
132
133 * Extensions/mouseposition/mouseposition.py: New, implements the
134 dialog and adds a tool to Thuban mainwindow.
135
136 * Extensions/mouseposition/position.xpm: New, icon for tool.
137
138 2005-01-14 Jan-Oliver Wagner <[email protected]>
139
140 * Doc/manual/thuban-manual-de.xml: More translations.
141
142 2005-01-11 Frank Koormann <[email protected]>
143
144 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer):
145 Fix indention bug.
146
147 2005-01-09 Frank Koormann <[email protected]>
148
149 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer):
150 BugFix 2901: Explicitly copy layers ClassificationColumn since it
151 is not part of the layers Classification.
152
153 2005-01-03 Frank Koormann <[email protected]>
154
155 * Thuban/UI/renderer.py (ScreenRendererdraw_selection_incrementally):
156 BugFix 2883: Former implementation only worked on classified point
157 layers: KeyError was raised, now use the default size if field is None.
158
159 2004-12-27 Bernhard Reiter <[email protected]>
160
161 svgexport 1.0.0cvs: Fixed label export.
162
163 * Extensions/svgexport/test/test_svgmapwriter.py:
164 class TestSVGRenderer(): New class; new test test_label_font().
165
166 * Extensions/svgexport/svgmapwriter.py
167 (SVGRenderer.label_font()): initialised Font size with self.factor now,
168 makes test_label_font happy.
169
170 * Extensions/svgexport/TODO: crossed out fixed label export item.
171 Added item for options.
172
173 * Extensions/svgexport/__init__.py: Bumped version to 1.0.0cvs.
174
175 2004-12-27 Russell Nelson <[email protected]>
176
177 Middle mouse button pans.
178
179 * Thuban/UI/view.py (MapCanvas.__init__): Subscribe also
180 OnMiddleDown and OnMiddleUp events.
181 (MapCanvas.OnMiddleDown): New. Activate the pan tool and remember the
182 previously used tool.
183 (MapCanvas.OnMiddleUp): New. Reactivate the remebered tool used before
184 pressing the middle mouse button.
185
186 2004-12-27 Jan-Oliver Wagner <[email protected]>
187
188 * Doc/manual/thuban-manual-de.xml: More translations.
189
190 2004-12-23 Jan-Oliver Wagner <[email protected]>
191
192 * Thuban/UI/projdialog.py (ProjFrame.load_user_proj): Added a
193 \n to stderr after the warnings. Thanks to Russell Nelson.
194
195 2004-12-20 Nina Hueffmeyer <[email protected]>
196
197 * Extensions/ogr/ogrshapes.py: Fixed some issues from
198 Bernhard (coding guidelines etc.). Additionally it is now possible to
199 display shapefiles containing feature collections (e.g.polygons
200 with holes). Works with gdal 1.2.1 now.
201
202 * Extensions/ogr/test/test_OGRShapestore.py: Fixed some issues
203 from Bernhard (coding guidelines etc.). If ogr can't be imported,
204 tests are skipped now.
205
206 * Extensions/ogr/ogrstart.py: Fixed some typings.
207
208 2004-12-20 Bernhard Reiter <[email protected]>
209
210 * Extensions/svgexport/TODO: updated to add support for
211 raster layers and labels for 1.0.1.
212
213 * Extensions/svgexport/svgmapwriter.py (draw_raster_layer):
214 Issue a warning now.
215
216 2004-12-19 Bernhard Reiter <[email protected]>
217
218 * Extensions/svgexport/TODO: Added idea to support triggering
219 the application down the pipe.
220
221 2004-12-19 Bernhard Reiter <[email protected]>
222
223 svgexport: Improved code quality, mainly by better naming.
224
225 * Extensions/svgexport/svgmapwriter.py:
226 DrawPath() renamed to DrawPolygonPath(),
227 added documentation, improved comments and variable names.
228
229 * Extensions/svgexport/svgmapwriter.py,
230 Extensions/svgexport/test/test_svgmapwriter.py:
231 All using DrawPolygonPath() now, the default parameter closed=True
232 omitted.
233
234 * Extensions/svgexport/test/test_svgmapwriter.py:
235 renamed test_polygon_opened() to test_polyline()
236 renamed test_transparent_polygon() to test_transparent_polyline()
237
238 2004-12-18 Jan-Oliver Wagner <[email protected]>
239
240 Some fixes of gns2shp extension.
241
242 * Extensions/gns2shp/test/__init__.py: New. Make this directory a
243 package.
244
245 * Extensions/gns2shp/test/test_gns2shp.py: Add some import paths
246 dynamically.
247
248 * Extensions/gns2shp/test/README: Simplified description how to test.
249
250 * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed doc-string,
251 fixed some dimensions of fields according to the GNS documentation
252 which seems to change undocumented.
253 Now killing trailing \n and/or \r from MODIFY_DATE.
254 This fixes RT#2453.
255
256 2004-12-18 Bernhard Reiter <[email protected]>
257
258 svgexport 1.0.0: Treats holes and islands nicely. Documentation added.
259
260 * Extensions/svgexport/test/test_svgmapwriter.py:
261 Added new tests: test_export_polygon_with_hole()
262 and test_polygon_with_hole().
263
264 * Extensions/svgexport/svgmapwriter.py
265 (draw_polygon_shape()): Uses DrawPath correctly now.
266
267 * Doc/manual/thuban-manual.xml: Added documentation for stable
268 extention svgexport.
269 * Doc/manual/thuban-manual-de.xml: Copied English section about
270 svexport over.
271
272 * Extensions/svgexport/__init__.py: Bumped version number to 1.0.0.
273
274 * Extensions/svgexport/svgsaver.py,maplegend.py:
275 Moved from experimental to stable extension menu.
276
277 * Extensions/svgexport/TODO: updated.
278
279
280 2004-12-18 Bernhard Reiter <[email protected]>
281
282 Added Extensions/svgexport/TODO
283
284 2004-12-18 Bernhard Reiter <[email protected]>
285
286 Refactored in svgexport:
287 DrawPath replaces DrawPolygon; added newline in front of "M" in paths.
288
289 * Extensions/svgexport/svgmapwriter.py
290 Added verbosity level 3 to print out polygon points.
291 (class Point): added __repr__
292 (class Brush, __str__()): Added space after ,.
293 (DrawPolygon): Renamed to DrawPath()
294 (DrawPath): Takes list of polygons as input now, adds \n before "M"s.
295 (DrawLines): Using DrawPath now.
296
297 * Extensions/svgexport/test/test_svgmapwriter.py:
298 Replaced DrawPolygon() calls with DrawPath() and put the first argument
299 inside another list. Adapted test data with a newline before "M".
300
301 2004-12-18 Bernhard Reiter <[email protected]>
302
303 Refactored svgexport tests: 9 double tests runs eliminated;
304 code size reduced by 8 lines.
305
306 * Extensions/svgexport/test/test_svgmapwriter.py:
307 (class TestWithDC): Renamed to BaseTestWithDC, moved to top.
308 (class BaseWithDCtools): New, subclass from BaseTestWithDC.
309 (class TestDrawSplines): now subclass from BaseTestWithDCtools,
310 this fixed the double running of the nine tests of TestVirtualDC.
311 (class TestVirtualDC): Using self.dc and self.file from setUp().
312
313 2004-12-17 Bernhard Herzog <[email protected]>
314
315 Two windows specific fixes ported from thuban-1­0-branch:
316
317 * Thuban/UI/about.py (unicodeToLocale): Use getdefaultlocale
318 instead of getlocale because getlocale doesn't return a usable
319 encoding name on a german windows 2000
320
321 * setup.py: windows build: Removed the absolute path names and
322 made all prfixes relative to the directory containing setup.py.
323 Makes it a little easier to adapt to a different system.
324
325 2004-12-16 Bernhard Herzog <[email protected]>
326
327 Add support for PostGIS tables with LINESTRING geometries.
328 Fixes RT#2299
329
330 * Thuban/Model/postgisdb.py (shapetype_map): Add LINESTRING
331
332 * test/postgissupport.py
333 (PostgreSQLServer.get_default_static_data_db): Rename the "roads"
334 table to "roads-multi" because it now uses MULTILINESTRING
335 geometries and introduce a new "roads" table that uses LINESTRING
336 (coords_to_multilinestring): Make the doc string more precise
337 (coords_to_linestring): New. Create a LINESTRING WKT
338 representatin
339 (wkt_converter): Add coords_to_linestring
340 (upload_shapefile): Rephrase the doc-string a bit.
341
342 * test/test_postgis_db.py (TestPostGISShapestoreArc)
343 (LineStringTests)
344 (TestPostGISShapestoreLineString)
345 (TestPostGISShapestoreMultiLineString): Split
346 TestPostGISShapestoreArc into a base class LineStringTests and two
347 derived classes TestPostGISShapestoreLineString for LINESTRING
348 geometries and TestPostGISShapestoreMultiLineString for
349 MULTILINESTRING geometries. Most test methods are in the base
350 class with the exception of tests that explicitly check the raw
351 format.
352
353 2004-12-16 Bernhard Herzog <[email protected]>
354
355 Make the test suite work with PostGIS 0.8.2 and PostgreSQL 7.4
356
357 * test/postgissupport.py (find_postgis_sql): Different postgis
358 versions put the postgis.sql file into slightly different places
359 so we have to look in both. The updated doc string describes this
360 is more detail.
361
362 * test/test_postgis_db.py
363 (TestPostGISSpecialCases.test_column_name_quoting): The return
364 value of UniqueValues is unsorted, so it has to be sorted for
365 comparison.
366
367 2004-12-16 Bernhard Herzog <[email protected]>
368
369 Fix for RT#2237
370
371 * Thuban/UI/projdialog.py (ProjFrame._show_proj_panel): If the
372 panel to be shown is the UnknownProjPanel disable the OK and Try
373 buttons. Otherwise enable them.
374 (ProjFrame.__GetProjection): The UnknownProjPanel returns None for
375 the parameters. In that case __GetProjection also returns None
376 now.
377
378 2004-12-15 Bernhard Herzog <[email protected]>
379
380 * Thuban/UI/classgen.py (GenQuantilesPanel.__init__): Set the
381 minimum number of classes to 2. The calculate_quantiles needs at
382 least two and raises an exception otherwise.
383 Fixes RT#2549
384
385 2004-12-15 Bernhard Herzog <[email protected]>
386
387 * test/postgissupport.py (PostgreSQLServer.execute_sql): Extend to
388 so that it returns a result for select statements.
389 (PostgreSQLServer.server_version): New. Return the version of the
390 server software.
391 (PostgreSQLServer.require_authentication): The format of
392 pg_hba.conf has changed between PostgrSQL 7.2 and 7.3. Check the
393 server version and generate the file in the correct format
394
395 2004-12-15 Bernhard Herzog <[email protected]>
396
397 * test/postgissupport.py (PostgreSQLServer.is_running): Fix typo
398 in the doc string and rephrase it a little.
399
400 2004-12-15 Frank Koormann <[email protected]>
401
402 * test/test_load.py (TestAltPath.checkSession): New, extended checks if
403 session has been loaded successfully. The check is called by the relevant
404 tests after executing load_session().
405
406 2004-12-13 Bernhard Herzog <[email protected]>
407
408 Make sure the region used to determine which shapes are visible
409 actually matches the region on the printed page. If this isn't
410 done properly some shapes might not be printed.
411 Fixes RT #2692
412
413 * Thuban/UI/view.py (MapPrintout.draw_on_dc): The region for the
414 renderer has to be at the same position as the mapregion
415
416 * Thuban/UI/renderer.py (ExportRenderer.RenderMap): self.region
417 has to be moved by (self.shiftx, self.shifty) too.
418
419 2004-12-13 Bernhard Herzog <[email protected]>
420
421 * libraries/pyprojection/Projection.i: Work around a bug in the
422 generated python code which leads to exception in the __del__
423 method when the constructor fails. See the comments in the code
424 for more details.
425
426 * libraries/pyprojection/Projection.py: Updated from Projection.i
427 with SWIG.
428
429 2004-12-13 Bernhard Herzog <[email protected]>
430
431 * test/test_load.py (TestAltPath.test_01_single_path_error_fix)
432 (TestAltPath.test_02_path_error_fix_from_list)
433 (TestAltPath.test_05_path_error_fix_from_list_changed)
434 (TestAltPath.test_06_path_error_fix_from_list_fails): self.session
435 is destroyed in tearDown, so there's no need to do it in a test
436 case.
437
438 * Thuban/Model/load.py (SessionLoader.open_shapefile): Remove a
439 debug print
440
441 2004-12-13 Bernhard Herzog <[email protected]>
442
443 * Extensions/svgexport/test/test_svgmapwriter.py
444 (TestDrawSplines.setUp): Do not use super with the unittest
445 classes because in Python 2.2 they're still old-style classes.
446
447 2004-12-13 Frank Koormann <[email protected]>
448
449 Alternative Path feature: When loading a (moved) session where
450 shapefiles cannot be found, ask the user. Use the specified path
451 if further shapefiles are missing. However, ask the usr for confirmation
452 in such cases.
453
454 * test/test_load.py (TestAltPath): New, tests for alternative path feature
455 in load_session()
456 (Shapefile_CallBack): Helper, implements controllable callback.
457
458 * Thuban/UI/application.py (ThubanApplication.OnInit):
459 Added "alt_path" to self.path
460 (ThubanApplication.OpenSession): Added shapefile_callback as second
461 callback similar to db_connection_callback.
462 (ThubanApplication.run_alt_path_dialog): New, implementaion of
463 shapefile_callback. In addition to raising the dialog the control of
464 self.path('alt_path') is implemented here.
465
466 * Thuban/Model/load.py (SessionLoader.__init__): Added shapefile_callback.
467 (SessionLoader.open_shapefile): Open shapefile, eventually with
468 alternative path. This wrapps the "theSession.OpenShapefile(filename)"
469 formerly used in start_fileshapesource()/start_layer().
470 (SessionLoader.start_fileshapesource): Call open_shapefile().
471 (SessionLoader.start_layer): Call open_shapefile().
472 (load_session): Added shapefile_callback.
473
474 * Thuban/UI/altpathdialog.py: New, implements dialogs for alternative path
475 feature (search / check).
476
477 * Doc/manual/thuban-manual.xml: Added documentation of new feature.
478
479 2004-12-11 Bernhard Reiter <[email protected]>
480
481 svgexport 0.9.2: Point size supports for maps.
482
483 * Extensions/svgexport/svgmapwriter.py: Added import of SHAPETYPE_POINT
484 (def draw_point_shape): new parameter size defaults to 2 as before.
485 (draw_shape_layer_incrementally): Moved draw_func log line higher.
486 Added draw_func call with size when dealing with a point layer.
487
488 * Extensions/svgexport/__init__.py: bumped version to 0.9.2.
489
490 2004-12-11 Bernhard Reiter <[email protected]>
491
492 Made sure that newlines are inserted in the svg path d attributes
493 to raise the chance that the line length will be below 255 characters,
494 as recommended by REC SVG 1.1 in section 8.3.1.
495
496 * Extensions/svgexport/svgmapwriter.py(DrawPolygon):
497 Adding \n before L's and changed whitespace handling.
498
499 * Extensions/svgexport/test/test_svgmapwriter.py:
500 Adapted tests to new whitespace handling of DrawPolygon.
501
502 2004-12-11 Bernhard Reiter <[email protected]>
503
504 * Doc/technotes/coding_guidelines.txt: easy typo fixed.
505
506 * Extensions/svgexport/test/test_svgmapwriter.py:
507 Removed test_drawbezier in favour of new test_drawspline3 and
508 test_drawspline4 within new class TestDrawSplines(TestVirtualDC).
509 All only to test DrawSpline.
510
511 * Extensions/svgexport/svgmapwriter.py(DrawSpline):
512 New implementation now really using the strange algorithm of
513 xfig 3.1's approximated splines and its conversion to postscript
514 with one twist: SVG can do quadratic beziers, so skipped translation
515 to cubic beziers.
516 (TestWithDC): Typo in comment fixed.
517
518 2004-12-09 Martin Schulze <[email protected]>
519
520 * Thuban/Model/classgen.py: Added missing character encoding
521
522 * Extensions/wms/properties.py (OpenWMSProperties): removed
523
524 * Extensions/wms/parser.py (WMSCapabilitiesParser.error): Dropped
525 support for get_srs_discrepancies() since there are no
526 discrepancies anymore (was a thinko)
527
528 * Extensions/wms/layer.py (WMSLayer.GetMapImg): Improved graphic
529 format priority now that more formats are supported globally by
530 the render engine.
531
532 2004-12-08 Silke Reimer <[email protected]>
533 * Extensions/ogr/ogrshapes.py: Substituted ogr-method CloseRings
534 because it is not available in all versions of ogr
535
536 2004-12-08 Bernhard Reiter <[email protected]>
537 * Extensions/ogr/__init__.py: Added empty __init__.py to heal
538 global tests until a real one is commited.
539
540 2004-12-07 Nina Hüffmeyer <[email protected]>
541
542 * /Extensions/ogr/: Adding a new extension to read shapefiles with
543 ogr. It is planned to add other vector formats.
544
545 * /test/runtests.py: Adding tests from /Extensions/ogr/test/.
546
547 2004-12-07 Jan-Oliver Wagner <[email protected]>
548
549 * /Extensions/svgexport/test/test_svgmapwriter.py: Reverting
550 part of a (non-)fix to renable that the tests are always
551 executed.
552
553 2004-12-07 Bernhard Reiter <[email protected]>
554
555 * Extensions/svgexport/test/test_svgmapwriter.py:
556 Added test_drawbezier() to test DrawSpline().
557
558 * Extensions/svgexport/svgmapwriter.py(DrawSpline):
559 Really implemented bezier drawing.
560
561 * Extensions/svgexport/__init__.py: Bumped version of svgexport
562 to 0.9.1 because now the legend examples lines styles
563 will be drawing with beziers.
564
565 2004-12-05 Martin Schulze <[email protected]>
566
567 * Thuban/UI/renderer.py (raster_format_map): Added PNG, TIFF and
568 GIF as supported bitmap image formats (helpful for the WMS extension)
569
570 2004-11-30 Martin Schulze <[email protected]>
571
572 * Extensions/wms/test/test_ogclib.py (TestOGCLib.test_compareURLs):
573 Improved the test for the internal compare method
574
575 2004-11-27 Jan-Oliver Wagner <[email protected]>
576
577 * Thuban/UI/about.py (About.__init__): Added
578 Norbert Solymosi for hungarian translation and Ole Rahn
579 as contrbutor. Moved Bernhard Reiter from Contributor
580 to Developer.
581
582 2004-11-27 Bernhard Reiter <[email protected]>
583
584 * Extensions/svgexport/test/test_svgmapwriter.py:
585 Removed Jan from author list as he did not change enough significant
586 lines yet.
587
588 * Extensions/svgexport/__init__.py: Added Bernhard as author
589 of the Extension.
590
591 2004-11-27 Jan-Oliver Wagner <[email protected]>
592
593 * po/hu.po: New. Hungarian translation. Contributed
594 by Norbert Solymosi.
595
596 2004-11-26 Bernhard Herzog <[email protected]>
597
598 * Extensions/svgexport/test/test_svgmapwriter.py
599 (Testobjectexport.test_transparent_polygon): Commented out some
600 debug prints
601
602 2004-11-24 Jan-Oliver Wagner <[email protected]>
603
604 Fix broken tests for svg extension and added svg legend
605 to Experimental menu.
606
607 * Extensions/svgexport/test/test_svgmapwriter.py: Fix to have
608 the test run correctly even if the extension is a package.
609 Also removed the "import Thuban" which makes no sense.
610
611 * Extensions/svgexport/__init__.py: Fix to have the extensions'
612 test module also be executed from the global test routine.
613 This is done by looking for the absense of the DISPLAY variable.
614
615 * Extensions/svgexport/maplegend.py: Moved the menu entry from Extensions
616 to Experimental menu since this module has yet not reached a stable
617 status (ie. 1.0).
618
619 2004-11-22 Bernhard Reiter <[email protected]>
620
621 * Extensions/svgexport/svgmapwriter.py:
622 Added verbose variable and some logging depending on it.
623 (class VirtualDC(XMLWriter)): Minor improvement in the polygon loop,
624 because counting i is not necessary.
625 (class Pen, class Brush): Added simple __str__ methods.
626 (SVGRenderer.draw_polygone_shape): Fix #2698 (transparent polygons are
627 not exported to svg file) Note: holes still unhandled.
628
629 * Extensions/svgexport/test/test_svgmapwriter.py:
630 Made a baseclass TestWithDC for test needed a DC.
631 Added tests for bug #2698 (transparent polygons are not
632 exported to svg file):
633 Testobjectexport.test_transparent_polygon()
634
635 * Thuban/Model/base.py (UnsetModified):
636 Fixed some typos in docstring.
637
638 * Thuban/UI/baserenderer.py (BaseRenderer.draw_polygon_shape()):
639 Added hints on the used algorithm for handling holes.
640
641 2004-11-20 Jan-Oliver Wagner <[email protected]>
642
643 Some face lifting for the examples.
644
645 * Examples/__init__.py: Make this directory a package.
646
647 * Examples/simple_extensions/__init__.py: Make this directory a package.
648
649 * Examples/simple_extensions/hello_world.py: Moved entry from Extensions
650 menu to Examples menu.
651
652 * Examples/simple_extensions/simple_command.py: Some more comments,
653 minor changes.
654
655 * Examples/simple_extensions/simple_tool.py: Minor changes.
656
657 2004-11-20 Jan-Oliver Wagner <[email protected]>
658
659 Changed way of extension registry for wms and added extension
660 registry for umn_mapserver extension.
661
662 * Extensions/wms/__init__.py: Added registry entry and the importing
663 of the actual wms module. Included a test for the required PyOGCLib.
664
665 * Extensions/wms/wms.py: Removed registry entry (moved to __init__.py).
666
667 * Extensions/umn_mapserver/__init__.py: Added registry entry and the
668 importing of the actual umn mapserver management modules.
669 Included a test for the required Python MapScript.
670
671 2004-11-20 Jan-Oliver Wagner <[email protected]>
672
673 Changed way of extension registry for importAPR, bboxdump
674 and added extension registry for svgexport.extension registry for
675 svgexport.
676
677 * Extensions/importAPR/__init__.py: Added registry entry and the importing
678 of the actual importAPR module.
679
680 * Extensions/importAPR/importAPR.py: Removed registry entry (moved to
681 __init__.py).
682
683 * Extensions/bboxdump/__init__.py: Added registry entry and the importing
684 »···of the actual bboxdump module.
685
686 * Extensions/bboxdump/bboxdump.py: Removed registry entry (moved to
687 »···__init__.py).
688
689 * Extensions/svgexport/__init__.py: Added registry entry and the importing
690 of the svgsaver module.
691
692 * Extensions/svgexport/svgsaver.py: Moved the menu entry from Extensions
693 to Experimental menu since this module has yet not reached a stable
694 status (ie. 1.0).
695
696 2004-11-18 Jan-Oliver Wagner <[email protected]>
697
698 Now the hit test considers the size of point symbols.
699
700 * Thuban/UI/viewport.py (ViewPort._hit_point): Added optional parameter
701 'size' defaulting to the previously fixed value 5.
702 Extended doc-string.
703 (Viewport._find_shape_in_layer): Resolved FIXME regarding flexibility
704 for symbols.
705 Now the size of the largest point symbol is determined to find out
706 about whether the point has been hit.
707 This fixes the problem that only clicks inside a fixed distance of
708 5 where found.
709
710 2004-11-17 Jan-Oliver Wagner <[email protected]>
711
712 Another open issue fixed regarding sizeable symbols: correct rendering of
713 selected symbols.
714
715 * Thuban/UI/renderer.py (ScreenRenderer.draw_selection_incrementally):
716 Added consideration of the specific size of point symbols.
717 The property for each point symbol is retrieved and the size applied
718 for the rendering method.
719 Added doc-string.
720
721 2004-11-16 Jan-Oliver Wagner <[email protected]>
722
723 Changed way of Extension Registry for gns2shp and profiling.
724
725 * Extensions/gns2shp/gns2shp.py: Removed registry entry (moved to
726 __init__.py).
727
728 * Extensions/gns2shp/__init__.py: Added registry entry and the importing
729 of the actual gns2shp module.
730
731 * Extensions/profiling/profiling.py: Removed registry entry (moved to
732 __init__.py).
733
734 * Extensions/profiling/__init__.py: Added registry entry and the importing
735 of the actual profiling module.
736
737 2004-10-28 Bernhard Reiter <[email protected]>
738
739 * Extensions/svgexport/: Minor improvements to doc strings.
740
741 2004-10-07 Jan-Oliver Wagner <[email protected]>
742
743 Further elements for sizable point objects now
744 making this feature usable though not yet complete.
745
746 * Thuban/Model/save.py (SessionSaver.write_classification): Write
747 attribute 'size' for cldata when the shape layer is of point type.
748 This also now make the test_load.py tests happy.
749
750 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Added size
751 gradient.
752
753 * Thuban/UI/classifier.py (ID_SELPROP_SPINCTRL): Renamed to
754 ID_SELPROP_SPINCTRL_LINEWIDTH.
755 (ID_SELPROP_SPINCTRL_LINEWIDTH): New Id replaces ID_SELPROP_SPINCTRL.
756 (ID_SELPROP_SPINCTRL_SIZE): New Id.
757 (SelectPropertiesDialog.__init__): Added a second spin control
758 for the size in case the corresponding layer is of point type.
759 (SelectPropertiesDialog._OnSpin): Renamed to _OnSpinLineWidth.
760 (SelectPropertiesDialog._OnSpinLineWidth): New. Former _OnSpin.
761 (SelectPropertiesDialog._OnSpinSize): New. Set size of property
762 and refresh preview.
763
764
765
766 2004-10-04 Martin Schulze <[email protected]>
767
768 * Extensions/wms/test/test_parser.py
769 (TestWMSCapabilitiesParser.test_compareLists): Added missing
770 self-test for compareLists()
771 (TestWMSCapabilitiesParser.test_compareDicts): Added missing
772 self-test for compareDicts()
773 (TestWMSCapabilitiesParser.test_compareLists): Adding more tests
774 to verify the test routine fails with non-equal arguments
775 (TestWMSCapabilitiesParser.test_compareDicts): Adding more tests
776 to verify the test routine fails with non-equal arguments
777
778 2004-10-03 Jan-Oliver Wagner <[email protected]>
779
780 First elements for sizeable point objects.
781
782 * Resources/XML/thuban-1.1.dtd: Added size attribute to cldata.
783
784 * Data/iceland_sample_size.thuban: New. Sample for sized point objects.
785
786 * test/test_load.py (ClassificationTest.TestLayers): Added SetSize in case
787 of a corresponding argument is given.
788 (TestSymbolSize): New. Test the size attribute of cldata.
789
790 * Thuban/Model/classification.py: Removed some trailing whitespaces.
791 (ClassGroupProperties.__init__): Set default size.
792 (ClassGroupProperties.SetProperties): Set the size.
793 (ClassGroupProperties.GetSize): New. Return the size.
794 (ClassGroupProperties.SetSize): New. Set the size.
795 (ClassGroupProperties__eq__): Compare also size.
796 (ClassGroupProperties__repr__): Print also size.
797
798 * Thuban/Model/load.py (SessionLoader.start_cldata): Also parse
799 the size attribute.
800
801 * Thuban/UI/classifier.py (ClassDataPreviewer.Draw): Added doc-string.
802 Also, now there is a return value that indicates whether the drawing
803 size exceeded the given rect extent and if so the new extent.
804 Finally, point objects are drawn depending on the size. If either
805 the width or height is exceeded, the new extent is returned.
806 (ClassRenderer.Draw): Now when calling the previewer drawing function,
807 evaluate the return value and, if not None, adapt the grid widget size
808 accordingly and redraw again.
809
810 * Thuban/UI/baserenderer.py (BaseRenderer.draw_shape_layer_incrementally):
811 If the draw function is for points, call it with the size as additional
812 parameter.
813 (BaseRenderer.draw_point_shape): Added additional, optional parameter for
814 the size. Compute the radius using the size.
815
816 * Extensions/importAPR/apr.py (APR_BMkSym.GetThubanProp): Now
817 that Thuban supports size, apply this correctly.
818
819 * Extensions/importAPR/importAPR.py: Bumped version to 0.1.1.
820
821 2004-10-03 Jan-Oliver Wagner <[email protected]>
822
823 * Doc/manual/thuban-manual-de.xml: Started translation of
824 Map chapter.
825
826 2004-10-01 Martin Schulze <[email protected]>
827
828 * Extensions/wms/properties.py (wmsProperties.__init__): Extended
829 argument for general use through properties-dialog selector
830
831 * Thuban/UI/classifier.py: Register properties dialog classes for
832 both provided layer classes/types.
833
834 * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): The
835 map can be retrieved through the parent which is passed to the
836 constructor anyway and doesn't require an argument of its own,
837 required for the unification of arguments for general use through
838 properties-dialog selector.
839 (MainWindow.OpenOrRaiseDialog): Move the logic for checking
840 whether a dialog is already opened (and raising it to the users
841 attention) and creating a new dialog into a function of its own
842 (MainWindow.OpenLayerProperties): Use the new OpenOrRaiseDialog()
843 method
844 (MainWindow.OpenLayerProperties): Utilise the new ClassMapper for
845 global registration of properties dialog classes (which are indeed
846 layer-specific).
847
848 * Thuban/UI/classifier.py (Classifier.__init__): Unify arguments
849 for general use through properties-dialog selector, the map can be
850 retrieved through the parent and doesn't require an argument of
851 its own.
852
853 * Extensions/wms/wms.py: Register the properties dialog class for
854 the provided WMS layer
855
856 2004-09-28 Jan-Oliver Wagner <[email protected]>
857
858 New feature: Registry for Extensions.
859
860 * Thuban/UI/extensionregistry.py: This module defines a registry for
861 Extensions.
862
863 * Thuban/UI/about.py (About.__init__): Added description
864 of the registered extensions with all of the information.
865
866 * Thuban/Model/extension.py (Extension): Improved doc-string.
867
868 * Extensions/gns2shp/gns2shp.py, Extensions/importAPR/importAPR.py,
869 Extensions/bboxdump/bboxdump.py, Extensions/profiling/profiling.py,
870 Extensions/wms/wms.py: Added registration of the extension.
871
872 2004-09-27 Bernhard Reiter <[email protected]>
873
874 More fixes to svgexport to make used ids unique and
875 conforming to XML's Name production.
876
877 * Extensions/svgexport/test/test_svgmapwriter.py: Added new tests
878 test_xml_id_constraints(), test_make_ide_nosetbaseid() and
879 test_make_id_nonintegersetid(). Switched SetID and SetBaseID.
880 Added Bernhard R. as author.
881 * Extensions/svgexport/svgmapwriter.py (make_id): Using "_" as
882 concatenation char now (makes test_make_ide_nosetbaseid() valid).
883 Also transform second id part with "%d" and catch the TypeError
884 to raise SVGMapWriterError (making test_make_id_nonintegersetid() ok).
885 Corrected typo inBernhard's author line.
886 (SetBaseID): Return the transformed base id. Transform characters
887 which are not alnum() or in ".-_" to binascii.b2a_hex(). Added
888 import binascii. If to be set string starts with "xml" or so, add "t".
889 (draw_shape_layer_incrementally): use the returned value of SetBaseID
890 for used_baseids checks.
891
892 2004-09-25 Bernhard Herzog <[email protected]>
893
894 * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
895 Remove a debug print and some tab characters.
896
897 2004-09-25 Bernhard Reiter <[email protected]>
898
899 * Extensions/svgexport/svgmapwriter.py: Added Bernhard R. as Author.
900 (SetBaseID, SetID, make_id): Improved docstring comments to explain
901 the interaction of the three functions and the XML id contrains.
902
903
904 2004-09-23 Jan-Oliver Wagner <[email protected]>
905
906 * Doc/ThubanModel.xmi: New. UML file for Thuban Model
907 Module.
908
909 * Doc/README: Added info on ThubanModel.xmi.
910
911 2004-09-23 Jan-Oliver Wagner <[email protected]>
912
913 * Doc/README: New. Some info about how to generate technical
914 documentation from the source code.
915 This text was send to the Thuban developer mailing list on
916 September 21st 2004 by Bernhard Reiter.
917
918 2004-09-21 Bernhard Reiter <[email protected]>
919
920 Improved the svgexport to only use unique ids. Will issues
921 an error message dialoge when two layer names are the same.
922 ShapeIDs are now added with a dash within the svg ids.
923
924 * Extensions/svgexport/svgmapwriter.py (SVGMapWriterError): New.
925 * Extensions/svgexport/test/test_svgmapwriter.py: Added imports
926 (TestSVGRenderer): New test class with test_make_in() and
927 test_check_for_layer_name_clash()
928 * Extensions/svgexport/svgmapwriter.py (SVGRenderer): Fixed __init__()
929 and draw_shape_layer_incrementally() to not use a baseid twice,
930 satisfying test_check_for_layer_name_clash()
931 (VirtualDC.make_id): Use a dash between baseit and id, satisfies
932 test_make_in().
933 * Extensions/svexport/svgsaver.py: Import SVGMapWriterError, wxOK
934 and wxICON_HAND.
935 (write_to_svg): Put dc and rendering in a try statement and on
936 catching SVGmapWriterError notify the user and delete the target file.
937
938 2004-09-20 Bernhard Reiter <[email protected]>
939
940 * Model/base.by, Model/layer.py: Fixed typos in docstrings.
941
942 2004-09-03 Jan Schüngel <[email protected]>
943
944 * Extensions/umn_mapserver/mapfile(MF_Class.add_thubanstyle): Fix a
945 small bug with the line color. Now the line color will now only set
946 if it is set in Thuban an not Transparent.
947
948 * Extensions/umn_mapserver/mf_export(tblayer_to_map): Fixed a bug with
949 deleting the layers from mapfile. Now all layers will delete backwards
950 from the last.
951
952 2004-08-20 Silke Reimer <[email protected]>
953
954 * Thuban/Model/layer.py:
955 Fixes bug in projection handling: Otherwise very large region might not
956 have valid values in the layer's projection.
957
958 2004-08-20 Silke Reimer <[email protected]>
959
960 * Thuban/UI/about.py:
961 small changes to be consistent with coding style.
962
963 2004-08-13 Martin Schulze <[email protected]>
964
965 * Extensions/wms/test/test_ogclib.py (TestOGCLib.compare_URLs):
966 Adjusted a comment
967
968 2004-08-11 Silke Reimer <[email protected]>
969
970 * Thuban/UI/about.py: Small changes to encoding related stuff to avoid
971 too many and too enhanced imports of locale
972
973 2004-08-10 Silke Reimer <[email protected]>
974
975 * Thuban/UI/about.py: Fixed encoding problem of about dialog: Added
976 function unicodeToLocale() to convert special characters to users
977 locale encoding
978
979 2004-08-10 Jan-Oliver Wagner <[email protected]>
980
981 * Doc/technotes/coding_guidelines.txt: Added rule 'Method names start with
982 lower case letter'
983
984 2004-08-09 Jan Schüngel <[email protected]>
985
986 * ChangeLog: Rewrite the last ChangeLog entry to follow
987 the standard way.
988
989 * Extensions/umn_mapserver/mapfile: Moved the import AnnotationLayer to
990 the function where it is needed, because it don't works if it stands
991 at the beginning.
992 (MF_Layer.__init__): Removed the extra numclassed variable. Now
993 numclasses from the mapscript will be used.
994 (MF_Layer.get_index): New. Return the index of the layer in mapfile.
995 (MF_Layer.set_classes): New. A Classlist will be set to the layer.
996 (MF_Layer.set_metadata): New. A Metadata mapscript object will set.
997 (MF_Layer.remove_allclasses): New. All class of the layer will remove.
998 (MF_Map.create_new_layer): New. A new Layer is created and associated
999 with the mapscript object.
1000 (MF_Map.set_layerorder): New. The Layer order like in thuban is set in
1001 the mapscript.
1002 (MF_Map.add_thubanlayer): Now a new layerobj is created if no one is
1003 linked to the layer in thuban, else the layerobject linked to the
1004 thubanlayer will be used.
1005 AnnotationLayer will now store the filename of the shapefile.
1006 (MF_Map.remove_layer): If a layer is removed the associated object
1007 must be set new.
1008
1009 * Extensions/umn_mapserver/mf_export.py(tb_layer_to_map): Add all
1010 layers which are exists in thuban to the mapobj. All removed Layers
1011 will be removed from the mapobj.
1012 Added comments to all functions.
1013 (thuban_to_map): No layer will be removed here.
1014
1015 * Extensions/umn_mapserver/mf_handle.py
1016 (_has_umn_mapobj_and_selectedlayer): Activating the layer menu. Now
1017 Layersettings for the mapserver kann be edited.
1018
1019 * Extensions/umn_mapserver/mf_import.py: Now all layers which are
1020 imported, will be linked with the associated MF_Layer.
1021 (import_mapfile): All layers, which are not selected, will be removed.
1022 Disable the "import layer from mapfile" menu option.
1023
1024 * Extensions/umn_mapserver/sample/iceland.map: Set the status of the
1025 Annotation Layer from DEFAULT to OFF. The DEFAULT setting turns the
1026 layer on permanently.
1027
1028 2004-08-03 Jan Schüngel <[email protected]>
1029
1030 * Extensions/umn_mapserver/mapfile.py(MF_Metadata.remove_allmetadata):
1031 New. This function removes all metadata
1032 (MF_Layer.set_group): New. Set the group setting.
1033 (MF_Layer.get_group): New. Get the group setting.
1034 (MF_Map): Removed the extra numlayers variable, used the mapscript
1035 parameter instead.
1036 (MF_Map.get_numlayers): New. This get numlayers.
1037 (MF_Map.remove_all_layers): New. Removes all layers from the mapobj.
1038 (MF_Map.add_thubanlayer): Replaced the exception handling by a check
1039 if the object is an instance. Also added the annotation layer here to
1040 export, but only the layer is created in the mapfile.
1041
1042 * Extensions/umn_mapserver/mf_export.py(export_mapfile): Removed
1043 the check if a mapobj exist, because its not needed anymore. The
1044 export function is only available if a mapobj exist.
1045 Use the new function to remove all layers.
1046
1047 * Extensions/umn_mapserver/mf_handle.py(Layer_Dialog): Added a group
1048 option and the metadata button. The layer dialog is temporary disabled.
1049 (Metadata_CustomDataTable): Added some functions to show the grid
1050 correct.
1051
1052 * Extensions/umn_mapserver/mf_import.py: Moved the code for showing
1053 the number of layer from import_mapfile to this function.
1054 (AnnotationLayer): New. This Class shows the Annotation layer in
1055 thuban. The layer don't do anything. It's only to show the layer
1056 and to save the layer order.
1057 (add_annotationlayer): New. Import an annotation layer to thuban.
1058 (select_layer2import): New. Import only layers to thuban and not
1059 the other settings like projection or scalebar.
1060 (create_new_mapfile): Moved the _has_umn_mapobj function and the
1061 create_new_mapfile functions from mf_handle.py to mf_import.py.
1062
1063 * Extensions/umn_mapserver/sample/iceland.map: Added the group
1064 parameter to the roads and cultural layers. Also added a new
1065 Annotation Layer for the cultural points.
1066
1067 * Extensions/umn_mapserver/sample/iceland.html: Added the select
1068 option for the annotation layer.
1069
1070 * Extensions/umn_mapserver/sample/index.html: Added the start
1071 parameter for the annotation layer.
1072
1073 2004-08-01 Jan-Oliver Wagner <[email protected]>
1074
1075 * Doc/manual/thuban-manual-de.xml (Chapter Session Management):
1076 translation completed.
1077
1078 * Doc/manual/thuban-manual.xml (Chapter Session Management):
1079 Fixed unprecise description for Save Session.
1080
1081 2004-07-31 Jan-Oliver Wagner <[email protected]>
1082
1083 Started translation of Users Manual into german.
1084
1085 * Doc/manual/thuban-manual-de.xml: New. German Users Manual.
1086
1087 * Doc/manual/Makefile: Added build instructions for german
1088 users manual.
1089
1090 * Doc/manual/thuban-manual.xml: Minor corrections in Introduction.
1091
1092 2004-07-28 Jan Schüngel <[email protected]>
1093
1094 * Extensions/umn_mapserver/mapfile.py(MF_Metadata): Changed all class
1095 functions. Now all metadata will handle by the function and its not
1096 needed to initialize it from outside. Therefor the associated mapobj
1097 will be stored in the Metadata Object. So we can use the special
1098 functions from the associated mapobj to get the Metadata.
1099 Therefor all initialization code for the metadata is removed from the
1100 other classes.
1101 (MF_Layer): Added a function to get the metadata object.
1102 (MF_Map): Added a function to set the mappath, the path where
1103 the mapfile ist stored.
1104
1105 * Extensions/umn_mapserver/mf_export.py(thuban_to_map): Changed the code
1106 to set the extent in the mapfile. Now the code is set by the displayed
1107 data in the Thuban-view.
1108 (export_mapfile): The shapepath is now set empty, until relative
1109 pathnames are supported.
1110
1111 * Extension/umn_mapserver/mf_handle.py: Added a dialog to handle
1112 metadata. Yet only mapfile metadata are supported. Layer and class
1113 supported are not implemented.
1114 Added a dialog to handle layer informations. The dialog only shows the
1115 selected layer at the moment.
1116
1117 * Extensions/umn_mapserver/mf_import.py(import_mapfile): Changed the
1118 code for setting the extent in thuban. Now the extent is set to the
1119 given extent from the mapfile.
1120 Fixed a logical mistake. Now the extent is set when realy a layer is
1121 loaded, and not if one is selected to load.
1122
1123 * Extensions/umn_mapserver/sample/iceland.html: Added code to zoom and
1124 move the shown map in the browser.
1125
1126 * Extensions/umn_mapserver/sample/iceland.map: Added a new metadata
1127 line to the mapobj and added metadata to the political layer.
1128
1129 * Extensions/umn_mapserver/test/test_mapserver.py: Changed the test
1130 for Metadata.
1131
1132 2004-07-26 Martin Schulze <[email protected]>
1133
1134 * Thuban/Lib/classmapper.py (ClassMapper.has): Added the new
1135 ClassMapper
1136
1137 * test/test_classmapper.py (TestMapping.test_mapper): Added a Test
1138 case for the new ClassMapper
1139
1140
1141 2004-07-22 Bernhard Herzog <[email protected]>
1142
1143 * Thuban/UI/viewport.py (ViewPort.VisibleExtent): New. Return the
1144 visible extent of the map in projected coordinates
1145
1146 * test/test_viewport.py (SimpleViewPortTest.test_default_size)
1147 (SimpleViewPortTest.test_init_with_size): Add some VisibleExtent()
1148 tests.
1149 (SimpleViewPortTest.test_visible_extent): New. The real test for
1150 VisibleExtent()
1151
1152 2004-07-22 Bernhard Herzog <[email protected]>
1153
1154 * test/test_viewport.py: Use support.run_tests as the main
1155 function when running asa script.
1156
1157 2004-07-22 Jan Schüngel <[email protected]>
1158
1159 * Extensions/umn_mapserver/mf_export.py: Added "import os"
1160 Removed the old "import Thuban.UI.mainwindow" code.
1161 (tbextent_to_map): Removed the extra function and at the code direct
1162 to "thuban_to_map" function.
1163 (write_creatorcomment): Added. Now a short comment is added to the
1164 beginning of an generated mapfile.
1165 (export_mapfile): Now the Path and filename are saved in to variables,
1166 and not together in one variable. This is needed for the new
1167 write_creatorcomment function.
1168
1169 * Extensions/umn_mapserver/mf_import.py (import_mapfile): Added the
1170 import module "re". Also added Range and the ClassGroupRange import
1171 from Thuban. Both are needed for the new range expression import.
1172 (create_rangeexpression): Added. Creates a Range Expression in Thuban
1173 style from a given mapfile expression.
1174 (added_rasterlayer): Make some small code changes. The shapepath is
1175 now stored in an extra variable and the clazz_name is set empty if no
1176 class name set in the mapfile.
1177 Changed the Error message for Range Expressions, becaus the new
1178 function create a error string which will be shown in the dialog.
1179
1180 * Extensions/umn_mapserver/test/test_mapserver.py: Added a test for the
1181 range expression import.
1182
1183 2004-07-21 Jan-Oliver Wagner <[email protected]>
1184
1185 * Extensions/umn_mapserver/README: Added hint that
1186 installation as root can be avoided. Removed all tabs.
1187
1188 2004-07-16 Bernhard Herzog <[email protected]>
1189
1190 * test/test_viewport.py
1191 (ViewPortTest.test_changing_map_projection): Check that changing
1192 the projection of an empty map shown in a viewport doesn't lead to
1193 exceptions in the viewport's handler for the
1194 MAP_PROJECTION_CHANGED messages
1195
1196 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Only
1197 try to keep the same region visible when the map actually contains
1198 something
1199
1200 2004-07-15 Jan Schüngel <[email protected]>
1201
1202 * Extensions/umn_mapserver/mapfile.py: Added a function to get the
1203 mappath directly from the mapobj. Is needed because of the changes
1204 in mf_import.py.
1205 (MF_Layer.add_thubanclass): Added a new comment.
1206 (MF_Map.set_extent): Fixed a bug with exporting empty mapobj. If the
1207 mapobj is empty there is no extent get from thuban an so no one can
1208 set to th mapobj.
1209
1210 * Extensions/umn_mapserver/mf_import.py (import_mapfile): Updated
1211 the discription.
1212 Split the funktion in to three smaller ones. The new functions are
1213 add_rasterlayer, add_polygonlayer and select_layer2import.
1214 Removed the mapfilepath and filepath initialisation, because its know
1215 include in the new functions.
1216 Now nothing will be imported if cancel is pressed in the
1217 layer choice dialog.
1218
1219 2004-07-14 Jan Schüngel <[email protected]>
1220
1221 * Extensions/umn_mapserver/mapfile.py: Added ClassGroupDefault to
1222 import.
1223 (MF_Symbolset): Removed the extra variable for numsymbols.
1224 (MF_Class.__init__): Added a comment to the exception clause.
1225 Removed the extent init, because it was not needed anymore.
1226 (MF_Layer.add_thubanclass): Added the code to set the class name to
1227 the expression value from thuban if no label is defined.
1228 Added the code to export Range expressions from thuban to the mapfile.
1229 (MF_Map.set_extent): Removed the exception and replace it by some if
1230 code. If the size of a map is not defined the size will be set to 1,1.
1231 This is necessary because if the extent is set, mapscript checks if
1232 the size is greater than zero.
1233 (MF_Web): Added the get and set function for the template.
1234
1235 * Extensions/umn_mapserver/mf_export.py: Added the function to check
1236 if a mapobject exists and used it to set the status of the menu items.
1237 If no mapfile exists the settings could not be edditied.
1238 Define after which menuitem the exportitem will include.
1239
1240 * Extensions/umn_mapserver/mf_handle.py: Removed the import
1241 Thuban.UI.mainwindow clause, because it is not needed.
1242 Added the command Refresh() to all "OnChangeColor()" functions,
1243 because the color preview window was not updated on a color change.
1244 Added the function to check if a mapobject exists and used it to set the
1245 status of the menu items. If no mapobject exists the settings could not
1246 be edditied.
1247 (Map_Dialog): Moved the imagetype selector from the
1248 Outputformat_Dialog to Map_Dialog and removed Outputformat_Dialog.
1249 (Web_Dialog): Removed the name label and added the template textbox.
1250
1251 * Extensions/umn_mapserver/mf_import.py (import_mapfile): Replace
1252 the exception handling on loading the layers by an if statement. It
1253 is not necessary to us the exception there.
1254 The Filepath creation now use os.path.join to build the path.
1255
1256 * Extensions/umn_mapserver/test/test_mapserver.py: Moved the testMap
1257 definition from global to the setUp function. Now the testMap will
1258 initialize new on each test.
1259
1260 * Extensions/umn_mapserver/sample/iceland.map: Include three new
1261 classes in the Line Layer, to test logical Expressions.
1262 Set the status of the class "Point9" in the Point Layer to off
1263
1264 2004-07-13 Bernhard Herzog <[email protected]>
1265
1266 * Thuban/UI/baserenderer.py
1267 (BaseRenderer.render_map_incrementally): Fix a logic bug in the
1268 optimization that tries not to draw layers under a raster layer.
1269 The bug was harmless. All it effectively did was to produce The a
1270 strange messages about not being able to draw Layer instances for
1271 all vector layers below a raster layer which would be invisible
1272 anyway because the raster layer currently always covers the entire
1273 window
1274
1275 2004-07-08 Jan Schüngel <[email protected]>
1276
1277 * Extensions/umn_mapserver/mapfile.py: Added code to generade and get
1278 a list of supported outputformats. This formats are not alle supported
1279 because there is no possibility to get the outputformat without the
1280 name known. Make some formal changes to the code.
1281 (MF_Map.set_name()): Fixed a bug if the name is None.
1282
1283 * Extensions/umn_mapserver/mf_handle.py: Removed the image_type import
1284 statement, because its not needed anymore. The Outputformat is now
1285 given as string from the object. Make some formal changes to the code.
1286
1287 * Extensions/umn_mapserver/test/test_mapserver.py: Added new test for
1288 most of the new setting which were added during the last changes.
1289 Removed the MF_Size Test.
1290
1291 * Extensions/umn_mapserver/test/test.map: Added a new class to the
1292 cultural Layer to test expressions and the the status of that layer
1293 from on to default.
1294 Changed the data path the the correct Thuban Data
1295 Added the Outputformat Object and Symbol Object
1296
1297 2004-07-07 Jan Schüngel <[email protected]>
1298
1299 * Extensions/umn_mapserver/mapfile.py: Added some new
1300 settings to edit (outputformat, label, imagetype)
1301
1302 * Extensions/umn_mapserver/mf_handle.py: Added some setting to
1303 the Label Dialog and add the OutputDialog.
1304 Make some changes to the code order.
1305
1306 2004-07-06 Jan Schüngel <[email protected]>
1307
1308 * Extensions/umn_mapserver/mapfile.py: Added the symbolObj, pointObj
1309 and line Obj and add the scalebar_status_type, scalebar_style_type and
1310 scalebar_position_type.
1311 Added the symbol- and symbolsetObject (MF_Symbol,MF_Symbolset). The
1312 are only used to create a Symbol like the circle in Thuban.
1313 Added the scalebarObject (MF_Scalebar)
1314 (MF_Class): Added set_status and get_status.
1315 (MF_Layer.add_thubanclass): Added code to set the class status
1316 (MF_Map): Added code to handle the symbols and scalebar
1317 (MF_Label): Added the set_partials and get_partials functions
1318
1319 * Extensions/umn_mapserver/mf_export.py: Added MF_Symbol to import
1320 from mapfile. Added a function to create a circle object like the one
1321 from thuban if no one exists.
1322
1323 * Extensions/umn_mapserver/mf_handle.py: All colors are now set when
1324 press ok in the assosiated dialog and not at the end of the
1325 colordialog.
1326 Added the Dialog for the Scalebar.
1327 (Label_Dialog): Added the offset option
1328
1329 * Extensions/umn_mapserver/mf_import.py: Added code to import the
1330 status of the Classes.
1331 Fixed a bug with the projection. Now the to_meter parameter will be
1332 added to the Projection only if it doesn't exists.
1333
1334 2004-07-01 Jan Schüngel <[email protected]>
1335
1336 Added the functionality to handle the content thuban is not
1337 able to handle directly.
1338
1339 * Extensions/umn_mapserver/mf_handle.py: New. This module extents
1340 Thuban with the possibility to edit the mapfile content.
1341
1342 * Extensions/umn_mapserver/mf_import.py: Added the possibility
1343 to import mapfiles without any layer selected. So it is possible
1344 to edit the other settings in a mapfile.
1345 (import_mapfile): Added code to use the editing functions.
1346 Added the possibility to import the projection to a layer if one
1347 is defined.
1348 Status settings (On,Off) will now set in thuban (visible, invisible).
1349 fixed a bug with with classnames. If no classname is set in mapfile
1350 the value in Thuban will set to the expression.
1351
1352 * Extensions/umn_mapserver/mf_export.py(export_mapfile): Added the
1353 possibility to save a new mapfile or use the old one which is
1354 imported or new created.
1355 Added code to use the editing functions.
1356 Remove some not needed import statements
1357
1358 * Extensions/umn_mapserver/mapfile.py: Added new types which are
1359 need for the editing functions.
1360 Added needed set-functions for the editing functions.
1361 Added the possibility to export rasterimages.
1362 Added new classes (MF_Web, MF_Label, MF_Legend, MF_Symbol,
1363 MF_SymbolSet). MF_Symbol and MF_SymbolSet are not needed at the
1364 moment.
1365 (MF_Class.set_thubanstyle): Now point layers will set to a default
1366 symbol to show a circle in mapserver and not only a 1px dot.
1367 (MF_Style.__init__): Fixed a bug with the color. Color was not set
1368 correct before.
1369 (MF_Size): Removed, because it is not needed.
1370
1371 * Extensions/umn_mapserver/README: Added the hints to use the
1372 export and editing functions, too.
1373
1374 * Extensions/umn_mapserver/sample/iceland.map: Added the
1375 new parameter "UNITS METERS".
1376 Change the political layer to status OFF.
1377
1378 * Extensions/umn_mapserver/sample/README: Added some
1379 more details to setup the sample in the MapServer.
1380
1381 2004-06-26 Bernhard Reiter <[email protected]>
1382
1383 * Extensions/svgexport/test/test_svgmapwriter.py:
1384 Removed class VFile and used standard StringIO instead.
1385
1386 2004-06-23 Jan Schüngel <[email protected]>
1387
1388 Add the export function to the umn_mapserver extension.
1389
1390 * Extension/umn_mapserver/mf_export.py: New. This module extents
1391 Thuban with the possibility to export the Thuban content.
1392
1393 * Extensions/umn_mapserver/mapfile.py: Expand the classes to use
1394 with the export module. Especially added the possibility to
1395 add thuban objects directly to the map objects.
1396
1397 * Extensions/umn_mapserver/mf_import.py: Removed the wxCHANGE_DIR,
1398 because of the hint from Bernhard Herzog.
1399 Corrected the handling of absolute pathnames.
1400 Changed the Text of the Menu-Item, now the beginning is upper case.
1401
1402 * Extensions/umn_mapserver/README: Added the --with-tiff statement.
1403
1404 2004-06-16 Jan Schüngel <[email protected]>
1405
1406 Add a sample and make some changes.
1407
1408 * Extension/umn_mapserver/mf_import.py: Changed the wxPython.wx
1409 import from * to explicit used statements. Changed the
1410 Thuban.UI.mainwindow import phrase, too.
1411 (import_mapfile):Corrected a clerical mistake.
1412 Added wxCHANGE_DIR in OpenFile Dialog.
1413 Added a MultipleChoiceDialog, to select the layers to load from
1414 mapfile into thuban. Thereby the projection is only set if one layer
1415 is selected.
1416 Added the possibility to handle relative pathnames which uses
1417 up-level references.
1418 Removed some doubled code.
1419 Corrected an error with integer values used as label in thuban
1420 ClassGroup.
1421
1422 * Extensions/umn_mapserver/sample: New.
1423
1424 * Extensions/umn_mapserver/sample/README: New. Describes the
1425 usage of the sample files.
1426
1427 * Extensions/umn_mapserver/sample/iceland.map: New. This is
1428 a suitable .map-file for the iceland data.
1429
1430 * Extensions/umn_mapserver/sample/index.html: New. The template
1431 for the mapfile.
1432
1433 * Extensions/umn_mapserver/sample/iceland.html: New. Initialisation
1434 file for the Iceland Application on web.
1435
1436 * Extensions/umn_mapserver/README: Corrected a inaccuracy and added
1437 some details.
1438
1439 * Extensions/umn_mapserver/test/test_mapserver
1440 (mapserver_import_Test_generalClasses.test_MF_Color):
1441 Corrected the thubancolor test.
1442
1443 2004-06-15 Jan Schüngel <[email protected]>
1444
1445 * Extensions/umn_mapserver/README: New. Install instruction.
1446
1447 2004-06-14 Bernhard Reiter <[email protected]>
1448
1449 * libraries/thuban/cpl_mfile.h: Added copyright header.
1450
1451 * libraries/thuban/ cpl_mfile.cpp, cpl_mfile.h: Added non-protecting
1452 Free Software License so that it is most useful with gdalwarp
1453 and bmpdataset.
1454
1455 2004-06-14 Bernhard Herzog <[email protected]>
1456
1457 * Thuban/UI/multiplechoicedialog.py (__version__): Add missing
1458 import of wxPython.wx itself (as opposed to the contents of
1459 wxPython.wx). For some reason wxPython.wx is available as
1460 wxPython.wx.wx in at least some 2.4 releases. Fixes RT#2482
1461 wrt. wxPython 2.4.
1462
1463 2004-06-10 Jan Schüngel <[email protected]>
1464
1465 Initial version of new extension "umn_mapserver". This extension aims
1466 to manage configuration for the UMN MapServer application. This
1467 inital version just imports the .map-files and displays all, Thuban is
1468 capable of.
1469
1470 * Extensions/umn_mapserver, Extensions/umn_mapserver/test: New.
1471
1472 * Extensions/umn_mapserver/test/README: New. Describes how to run the
1473 tests.
1474
1475 * Extensions/umn_mapserver/test/test.map: New. This is a test
1476 .map-file for automated tests of the umn_mapserver extension of
1477 Thuban.
1478
1479 * Extensions/umn_mapserver/test/test_mapserver.py: New. Tests for
1480 UMN Mapserver classes.
1481
1482 * Extensions/umn_mapserver/__init__.py: New. Init to make this
1483 directory a package.
1484
1485 * Extensions/umn_mapserver/mapfile.py: New. Classes to represent
1486 '.map'-file objects.
1487
1488 * Extensions/umn_mapserver/mf_import.py: New. This module extends
1489 Thuban with the possibility to handle UMN MapServer mapfiles.
1490
1491 2004-06-03 Bernhard Herzog <[email protected]>
1492
1493 * Thuban/Model/layer.py (Layer.TreeInfo): Convert the bounding box
1494 to a tuple before using it as arguments to the % operator. This
1495 fixes the formatting issue filed in RT#2239 on 2004-01-13 and
1496 reported today on thuban-list by Jan Schüngel
1497
1498 * test/test_layer.py (TestLayerModification.setUp): Save the
1499 filename as an instance variable so we can refer to it in tests
1500 (TestLayerModification.test_tree_info): Uncomment this method
1501 again and make it work. This tests for the formatting issue
1502 filed in RT#2239 on 2004-01-13
1503
1504 2004-05-28 Bernhard Herzog <[email protected]>
1505
1506 * Thuban/UI/baserenderer.py: Fix some typos.
1507
1508 2004-05-18 Jan-Oliver Wagner <[email protected]>
1509
1510 * Extensions/gns2shp/gns2shp.py (gns2shp): Fixed a bug
1511 by increasing a field size.
1512
1513 2004-05-17 Bernhard Herzog <[email protected]>
1514
1515 Update to newest shapelib and get rid of Thuban specific
1516 extensions, i.e. use the new DBFUpdateHeader instead of our
1517 DBFCommit kludge
1518
1519 * libraries/shapelib/shpopen.c: Update to version from current
1520 shapelib CVS.
1521
1522 * libraries/shapelib/shapefil.h: Update to version from current
1523 shapelib CVS.
1524
1525 * libraries/shapelib/dbfopen.c: Update to version from current
1526 shapelib CVS.
1527 (DBFCommit): Effectively removed since shapelib itself has
1528 DBFUpdateHeader now which is better for what DBFCommit wanted to
1529 achieve.
1530 We're now using an unmodified version of dbfopen.
1531
1532 * setup.py (extensions): Add the HAVE_UPDATE_HEADER macro with
1533 value '1' to the Lib.dbflibc extension. This simply reflects the
1534 shapelib and pyshapelib updates
1535
1536 2004-05-16 Jan-Oliver Wagner <[email protected]>
1537
1538 Finished introduction of Menu.FindOrInsertMenu.
1539
1540 * Extensions/drawshape/drawshape.py: Add the command
1541 to the experimental menu additionally to the toolbar.
1542
1543 * Extensions/svgexport/svgsaver.py: Use FindOrInsertMenu() instead of
1544 finding menu on its own.
1545
1546 * Doc/manual/thuban-manual.xml: updated sample file
1547 to use FindOrInsertMenu().
1548
1549 * Examples/simple_extensions/hello_world.py: Use FindOrInsertMenu()
1550 instead of finding menu on its own.
1551
1552 2004-05-11 Jan-Oliver Wagner <[email protected]>
1553
1554 * test/test_menu.py (MenuTest.test): Added testing
1555 of method Menu.FindOrInsertMenu.
1556
1557 2004-05-10 Jan-Oliver Wagner <[email protected]>
1558
1559 Introduce and use Menu.FindOrInsertMenu.
1560
1561 * Thuban/UI/menu.py (Menu.FindOrInsertMenu): New. Find a
1562 given menu or, if not found, insert it.
1563
1564 * Extensions/bboxdump/bboxdump.py, /Extensions/gns2shp/gns2shp.py,
1565 /Extensions/importAPR/importAPR.py, Extensions/profiling/profiling.py,
1566 /Extensions/wms/wms.py: Use FindOrInsertMenu() instead of finding
1567 menu on its own.
1568
1569 2004-05-06 Jan-Oliver Wagner <[email protected]>
1570
1571 Introduce a abstract ColorDialog class and remove
1572 and outdated file.
1573
1574 * Thuban/UI/proj4dialog.py: Removed. It is has been
1575 replaced by projdialog for quite a while and is not used
1576 anymore.
1577
1578 * Thuban/UI/colordialog.py: New. Abstraction for color selection
1579 dialog(s).
1580
1581 * Thuban/UI/classifier.py (SelectPropertiesDialog.__GetColor):
1582 Now calls the abstract ColorDialog instead of wxColourDialog.
1583 This also removed the dependency to Color class conversion
1584 from this function.
1585
1586 2004-05-04 Frank Koormann <[email protected]>
1587
1588 * Extensions/bboxdump/__init__.py: Fixed string left over from
1589 copying.
1590
1591 * Extensions/bboxdump/bboxdump.py (bboxdump):
1592 Use layer.ShapeStore().AllShapes() to loop over shapes instead of
1593 xrange(layer.NumShapes()). Compile the bboxmessage from a list
1594 of formatted outputs (string.join) instead of appending to the
1595 message. Two progress bar dialogs to report progress on the sometimes
1596 lenghty processing.
1597
1598 2004-04-22 Frank Koormann <[email protected]>
1599
1600 New Extension to dump bounding boxes of all shapes of the selected
1601 layer. An optional column can be specified to group the objects,
1602 in this case the bounding box is a union of the separate boxes.
1603 Dump can be displayed in a ScrolledMessageDialog or written to file.
1604 The Extension is simply a combination of available and well tested
1605 Thuban functionality.
1606
1607 * Extensions/bboxdump/__init__.py: New: Init to make this
1608 directory a package.
1609
1610 * Extensions/bboxdump/bboxdump.py: New: Dump bounding boxes of
1611 all shapes of the selected layer.
1612
1613 2004-04-22 Jan-Oliver Wagner <[email protected]>
1614
1615 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Fixed two
1616 strings to be i18n now.
1617
1618 2004-04-18 Jan-Oliver Wagner <[email protected]>
1619
1620 Changing popup menu of legend from direct building
1621 to using the Menu construction as used for the mainwindow.
1622
1623 * Thuban/UI/mainwindow.py: New method commands: layer_to_top,
1624 layer_to_bottom, layer_visibility
1625 (MainWindow.LayerToTop): New. Put current layer to the top.
1626 (MainWindow.LayerToBottom): New. Put current layer to bottom.
1627 (MainWindow.HideLayer, MainWindow.ShowLayer, _has_visible_map):
1628 Replace 1,0 by True, False.
1629 (MainWindow.ToggleLayerVisibility): New. Toggle visibility of
1630 current layer.
1631 (MainWindow.LayerShowTable): Removed raising of dialog.
1632 (_has_selected_layer_visible): New. Support function.
1633
1634 * Thuban/UI/legend.py: ID_POP_xxx: removed.
1635 (LegendPanel.__init__): Removed EVT_MENU bindings.
1636 (LegendTree._OnRightClick): Replace direct creation of
1637 menu via wx Classes by applying the menu definition
1638 as of Menu class of menu.py.
1639
1640 2004-04-16 Jan-Oliver Wagner <[email protected]>
1641
1642 * Thuban/UI/exceptiondialog.py (ExceptionDialog.dialog_layout): Improved
1643 button string to stronger clearify that Thuban will be closed when hitting
1644 the button.
1645
1646 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Added docstring.
1647 Now for layers without a ShapeStore a corresponding message is given
1648 to the user, that this layer has no table to show.
1649
1650 2004-04-15 Martin Schulze <[email protected]>
1651
1652 * Extensions/wms/layer.py (WMSLayer.setWMSFormat): Need to
1653 recalculate the format for the internal render engine as well.
1654
1655 * Extensions/wms/properties.py (wmsProperties): First start for a
1656 properties dialog. It's functional for a first selection of
1657 layers, but still has some weired wxWidgets/GTK problems but
1658 beautification can be done later.
1659
1660 * Extensions/wms/layer.py: Added more documentation
1661 (WMSLayer.getFormats): New: Return list of supported image formats
1662 by the WMS server
1663 (WMSLayer.getLayers): New: Return the list of layer names
1664 supported by the WMS server
1665 (WMSLayer.getLayerTitle): New: Return the title of the named layer
1666 (WMSLayer.getWMSFormat): New: Return the image format that is used
1667 for WMS GetMap requests
1668 (WMSLayer.setWMSFormat): New: Set the image format that is used
1669 for WMS GetMap requests
1670 (WMSLayer.__init__): Move away from using only one layer to using
1671 a list of layers (unsorted at the moment, though).
1672 (WMSLayer.getVisibleLayers): New: Return the list of names for all
1673 visible layers
1674 (WMSLayer.setVisibleLayers): New: Set the list of names for all
1675 visible layers
1676
1677 * Extensions/wms/wms.py: Moved the WMS layer into layer.py in
1678 order to establish a clean structure.
1679
1680 * Extensions/wms/layer.py: Moved the WMS layer into a file on its
1681 own in order to establish a clean structure.
1682
1683 2004-04-13 Martin Schulze <[email protected]>
1684
1685 * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Added
1686 support for oldstyle (WMS 1.0 apparently) image format
1687 specification.
1688
1689 * Extensions/wms/wms.py (WMSLayer.calcFormat): Reduce the list of
1690 supported graphic formats back to JPEG and BMP, PNG and others are
1691 too *cough* experimental... Sorry, I meant to filter this out
1692 before I committed this part. This should make the WMS extension
1693 run from CVS again.
1694 (wms_dialog): Reset an empty URL to None so that the subsequent
1695 program can depend on this, since the dialog will indeed return an
1696 empty URL, causing another declaration of love by Python.
1697
1698 * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerBBox):
1699 Whenever a native BoundingBox request cannot be fulfilled, check
1700 whether the requested SRS is EPSG:3426, in which case return the
1701 LatLonBoundingBox values.
1702
1703 * Extensions/wms/test/test_parser.py
1704 (TestWMSCapabilitiesParser.test_LayerSRS): Added a test for
1705 ignoring AUTO:* SRS.
1706 (TestWMSCapabilitiesParser.test_LatLonBoundingBoxes_as_bboxes):
1707 Added another test method to test whether the LatLonBoundingBox
1708 values will be returned if BoundingBox values are requested with
1709 SRS set to EPSG:3426.
1710
1711 * Extensions/wms/parser.py (WMSCapabilitiesParser.peekLayers):
1712 Added rudimentary support for non-EPSG SRS, i.e. ignore them for
1713 the moment by placing them into a variable which is currently
1714 unused. Also test whether the EPSG SRS is numerical as it should
1715 be and add an error message if it is not.
1716
1717 * Extensions/wms/test/sample.xml: Added AUTO:* SRS since they
1718 appear in the real world as well. Since we cannot handle them yet
1719 (OGCLib can't either), we will ignore them for the moment.
1720
1721 * Extensions/wms/parser.py: Use a variable for denoting the sample
1722 filename
1723 (WMSCapabilitiesParser.peekLayers): Added support for error
1724 messages during grok(). They will be aggregated in an array and
1725 may be displayed later. We may have to add a classification
1726 "Warning" and "Error" to this. That requires more experience,
1727 though, since not every error may be lethal.
1728
1729 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Raise the
1730 ShowTable() dialog/frame when the user attempts to display it
1731 while it has been opened before already and not closed again.
1732
1733 2004-04-11 Martin Schulze <[email protected]>
1734
1735 * Extensions/wms/infodialog.py: Adjusted the class documentation
1736
1737 * Extensions/wms/wms.py (WMSLayer.__init__, WMSLayer.GetMapImg):
1738 Switch to using Thuban{Begin,End}BusyCursor instead of the pure
1739 wxWidgets variants.
1740 (WMSLayer.__init__): The epsg_id variable is named top_srs now.
1741
1742 * Extensions/wms/infodialog.py: Added an information dialog that
1743 will display various information about the WMS current resource,
1744 so that additional information such as the title, the abstract,
1745 fees and access constraints can be displayed for the user if they
1746 are documented in the WMS XML.
1747
1748 2004-04-10 Martin Schulze <[email protected]>
1749
1750 * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Adjusted
1751 string handling. It's "foo".lower() and not lower(foo) without
1752 lower imported from strings or something.
1753
1754 * Extensions/wms/wms.py (WMSLayer): Incorporated WMSCapabilities
1755 from capabilities.py and parser.py. Implement priority list for
1756 supported graphics formats, take care of wbmp != bmp. PNG, TIFF
1757 and GIF are supported here, but not yet by main Thuban. Hence,
1758 support for them may be removed later. Special contribution to
1759 usability: get wxWidgets to change the cursor when we're waiting
1760 for data from the network so the user won't start to worry. This
1761 causes a redrawing error/warning, though.
1762
1763 * Extensions/wms/parser.py (WMSCapabilitiesParser.grok): Unlink
1764 the DOM object.
1765
1766 2004-04-01 Martin Schulze <[email protected]>
1767
1768 * Extensions/wms/capabilities.py: Adjusted documentation
1769 (WMSCapabilities.__init__): Improved documentation, fixed syntax
1770 (WMSCapabilities.saveCapabilities): Only catch IOError when
1771 handling files
1772 (WMSCapabilities.loadCapabilities): Only catch IOError when
1773 handling files
1774 __main__: corrected variable naming
1775 (WMSCapabilities.fetchCapabilities,loadCapabilities): Make this
1776 class a specialisation of WMSCapabilitiesParser as well. Also
1777 execute grok() after loading or fetching capabilities, if that
1778 went well, so that subsequent calls can already access the data.
1779 (WMSCapabilities.getVersion): Export the used version of the
1780 GetCapabilities request, so we can use it for subsequent calls,
1781 i.e. for GetMap requests.
1782 (WMSCapabilities.fetchCapabilities): Added proper error handling
1783 when the GetCapabilities request failed, so that the surrounding
1784 program can act accordingly.
1785
1786 2004-03-30 Martin Schulze <[email protected]>
1787
1788 * Extensions/wms/parser.py (WMSCapabilitiesParser.getLayerSRS):
1789 Adjusted the getLayerSRS method to return the list of SRSes
1790 extracted from <SRS> elements instead of <BoundingBox> elements.
1791 Added a bit of documentation as well.
1792 (WMSCapabilitiesParser.checkLayerSRS): Removed integrity test
1793 since it was only implemented due to a misunderstanding.
1794
1795 * Extensions/wms/test/test_parser.py
1796 (TestWMSCapabilitiesParser.test_LayerSRS): Adjust the tests to
1797 reflect the corrected interpretation of the standard: i.e. a layer
1798 does not have to define a BoundingBox for all SRSes it supports.
1799 Hence the <SRS></SRS> specification is authoritative, not the list
1800 of BoundingBoxes.
1801 (TestWMSCapabilitiesParser.test_BoundingBoxes): Added a new test
1802 to ensure None is returned for a non-existing SRS.
1803 (TestWMSCapabilitiesParser.test_grok): Removed test_grok method
1804 since it is not applicable anymore. Listing more SRSes in <SRS>
1805 elements is valid according to the specs.
1806
1807 2004-03-26 Bernhard Reiter <[email protected]>
1808
1809 * README: Nicer formatting of text. Improved descriptions.
1810 Reflected wxWidgets name change.
1811
1812 * Thuban/UI/about.py: Extended copyright to 2004 and added
1813 information about the thuban-devel mailinglist.
1814
1815 2004-03-24 Martin Schulze <[email protected]>
1816
1817 * Extensions/wms/capabilities.py: Renamed the class to contain
1818 'WMS', also added a linebreak where required
1819
1820 * Extensions/wms/parser.py: Finally added the XML parser for the
1821 GetCapabilities response.
1822
1823 * Extensions/wms/test/sample.xml: Adjusted the sample file so that
1824 <SRS> elements match the <BoundingBox> elements, except for the
1825 layer 'beschriftung'.
1826
1827 * Extensions/wms/test/test_parser.py: Encode non-ascii strings
1828 since Python uses unicode strings internally, otherwise
1829 comparisons will fail. Removed tests for getLayerBBoxSRS() since
1830 the SRS will be calculated anyway and this method is obsoleted by
1831 getLayerSRS(). Denote SRS as strings and not as cardinal numbers.
1832 Move loading the sample file into the setUp method. Added a test
1833 for finding the integrity problem in the sample response.
1834 Improved formatting.
1835
1836 * Extensions/wms/domutils.py: Added convenience routines for
1837 handling of Document Object Model (DOM) nodes.
1838
1839 * Extensions/wms/test/test_domutils.py: Added a test for the
1840 domutils module
1841
1842 2004-03-19 Martin Schulze <[email protected]>
1843
1844 * Extensions/wms/test/test_parser.py (TestWMSCapabilitiesParser):
1845 Moved path detection and adding into a module of its own,
1846 adjustpath, which exports thubandir as main Thuban directory.
1847
1848 * Extensions/wms/test/test_ogclib.py (TestWMSLib): Moved path
1849 detection and adding into a module of its own, adjustpath, which
1850 exports thubandir as main Thuban directory. Reorganised the
1851 module in order to support the SkipTest feature for Thuban test
1852 cases.
1853
1854 * Extensions/wms/test/adjustpath.py: Moved path detection and
1855 adding into a module of its own.
1856
1857 2004-03-18 Martin Schulze <[email protected]>
1858
1859 * Extensions/wms/test/test_parser.py: Added another test for
1860 checking whether the WMS XML parser (to be implemented) returns
1861 the information we expect. This requires a sample WMS WML file
1862 (sample.xml) which has been extracted from the frida server and
1863 "improved" manually.
1864
1865 * Extensions/wms/test/test_ogclib.py: Added legacy code to add the
1866 main Thuban directory to the path in order to be able to import
1867 random modules. Adjusted the PyOGCLib detection to reuse the
1868 information gathered. Also added a note about the PYTHONPATH
1869 environment variable.
1870
1871 * Extensions/wms/test/test_ogclib.py: The format specification is
1872 a mime-type, not a graphic format, hence image/jpeg wou ld be the
1873 proper format and not JPEG. We'll also have to take care of the
1874 encoding of / as %2F.
1875
1876 2004-03-16 Martin Schulze <[email protected]>
1877
1878 * Extensions/wms/test/test_ogclib.py: Added a (hopefully)
1879 comprehensive test for the getMapURL method, built compare URLs
1880 according to the documentation in OGC 01-068r3
1881
1882 * Extensions/wms/capabilities.py (WMSCapabilities): Added the
1883 class WMSCapabilities to manage capabilites, will incorporate
1884 parsing the capabilities response and provide details for other
1885 classes.
1886
1887 2004-03-12 Bernhard Herzog <[email protected]>
1888
1889 Support views in addition to normal tables in the postgis
1890 shapestore
1891
1892 * Thuban/Model/postgisdb.py
1893 (PostGISShapeStore._fetch_table_information): Add a fallback for
1894 the case where the table name is not in the geometry_columns
1895 table. This is usually the case for views. Also, set
1896 self.shapestore here.
1897 (PostGISShapeStore.ShapeType): No need to query the database all
1898 the time. The shape type is now determined in
1899 _fetch_table_information
1900
1901 * test/postgissupport.py (PostgreSQLServer.new_postgis_db)
1902 (PostgreSQLServer.get_static_data_db, PostGISDatabase.__init__):
1903 New parameter to specify views.
1904 (PostGISDatabase.has_data): Also compare the views. New views
1905 parameter
1906 (PostGISDatabase.initdb): Create the views.
1907 (PostgreSQLServer.get_default_static_data_db): Add the v_landmarks
1908 view
1909
1910 * test/test_postgis_db.py
1911 (TestPostGISShapestorePointFromViews): New. Test a
1912 PostGISShapeStore with a view
1913 (TestPostGISShapestorePointOIDAsGIDColumn.setUp): Pass the name of
1914 the geometry_column explicitly to test whether that works
1915
1916 2004-03-12 Bernhard Herzog <[email protected]>
1917
1918 Final step for explicit id/geometry columns: Loading and saving
1919
1920 * Resources/XML/thuban-1.1.dtd: New. Derived from thuban-1.0.dtd
1921 with the following changes:
1922 (dbshapesource): Two new attributes id_column and geometry_column
1923
1924 * Thuban/Model/save.py (SessionSaver.write): Use the new dtd
1925 (SessionSaver.write_session): Use the new namespace
1926 (SessionSaver.write_data_containers): Write the new dbshapesource
1927 parameters
1928
1929 * Thuban/Model/load.py (SessionLoader.__init__): New namespace for
1930 the new file format version
1931 (SessionLoader.start_dbshapesource): Handle the new db parameters
1932
1933 * test/test_save.py: Update to the new dtd and namespace
1934 (SaveSessionTest.test_save_postgis): Update the NonConnectionStore
1935 mock object to provide a working IDColumn method.
1936
1937 * test/test_load_1_0.py: New. Copy of the test_load.py before
1938 today's changes but with the round-trip tests removed.
1939
1940 * test/test_load_0_9.py: Update doc-string.
1941
1942 * test/test_load.py: Update all .thuban files to the new dtd and
1943 namespace.
1944 (TestPostGISLayer.file_contents): Add the new dbshapesource
1945 paramters
1946
1947 2004-03-11 Bernhard Herzog <[email protected]>
1948
1949 Next step for explicit id/geometry columns: User interaction
1950
1951 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Rework how
1952 the dialog is constructed. Add combo boxes to select id and
1953 geometry column. Rename some instance variables.
1954 (ChooseDBTableDialog.GetTable): Return id and geometry column
1955 names
1956 (ChooseDBTableDialog.OnTableSelect): New. Event handler for
1957 selections in the table list
1958
1959 * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Use id_column
1960 and geometry_column
1961
1962 * Thuban/Model/session.py (Session.OpenDBShapeStore): Add the new
1963 parameters for id_column and geometry column of PostGISShapeStore
1964 here as well.
1965
1966 * Thuban/Model/postgisdb.py (type_map): Add ROWID psycog type.
1967 (_raw_type_map): New. Map raw PostgreSQL type ints to thuban types
1968 (PostGISConnection.GeometryTables): Use a better query to
1969 determine which relations in the database might be usable for
1970 shapestores. Now supports views as well but is more PostgreSQL
1971 specific
1972 (PostGISConnection.table_columns): New. Somewhat experimental
1973 method to let the db dialogs provide lists of columns to users so
1974 that they can select id and geometry columns.
1975 (PostGISTable.__init__): The default value of the id_column
1976 parameter is now None it still means "gid" effectively, though.
1977 (PostGISTable.IDColumn): New introspection method to return a
1978 column object for the id column
1979 (PostGISShapeStore.GeometryColumn): New introspection method to
1980 return a column object for the geometry column
1981
1982 * test/test_postgis_db.py
1983 (TestPostGISConnection.test_gis_tables_non_empty):
1984 Removed. Subsumed by the new:
1985 (TestPostGISConnection.test_gis_tables_with_views_and_tables):
1986 New. Tes the GeometryTables and table_columns methods with actual
1987 tables and views.
1988 (PointTests.test_id_column, PointTests.test_geometry_column):
1989 New. tests for the new methods.
1990 (TestPostGISShapestorePoint.setUp)
1991 (TestPostGISShapestorePointSRID.setUp)
1992 (TestPostGISShapestorePointExplicitGIDColumn.setUp): Fill the
1993 instance variables needed by the new tests
1994
1995 2004-03-11 Bernhard Herzog <[email protected]>
1996
1997 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): The row
1998 numbers given to ReadValue are ordinals.
1999
2000 2004-03-11 Bernhard Herzog <[email protected]>
2001
2002 Elimiate the requirement for PostGIS tables to have a column
2003 called "gid".
2004
2005 * Thuban/Model/postgisdb.py (PostGISTable.__init__): New parameter
2006 id_column to specify which column to use to identify rows. Also
2007 new instance variables id_column and quoted_id_column
2008 (PostGISTable.RowIdToOrdinal, PostGISTable.RowOrdinalToId)
2009 (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue)
2010 (PostGISTable.SimpleQuery): Use the id column name provided to the
2011 constructor instead of "gid"
2012 (PostGISShapeStore.__init__): New parameter id_column analogously
2013 to PostGISTable.__init__. This parameter is simply passed through
2014 to the base class constructor
2015 (PostGISShapeStore._create_col_from_description): Fix typo in
2016 doc-string
2017 (PostGISShapeStore.Shape, PostGISShapeStore.AllShapes)
2018 (PostGISShapeStore.ShapesInRegion): Use the id column name
2019 provided to the constructor instead of "gid"
2020
2021 * test/postgissupport.py
2022 (PostgreSQLServer.get_default_static_data_db): New static table
2023 landmarks_point_id with an id column != "gid. Update the comments
2024 a bit.
2025 (skip_if_addgeometrycolumn_does_not_use_quote_ident): Fix typo in
2026 doc-
2027 (upload_shapefile): New parameter gid_column to use a name other
2028 than "gid" for the column to store the shape ids
2029
2030 * test/test_postgis_db.py (TableTests): New. Mixin-class
2031 containing all tests previously in TestPostGISTable. The actual
2032 tests are the same but the code is a bit more configurable to
2033 allow for different id columns etc.
2034 (TestPostGISTable): Derive from TableTests now for the actual
2035 tests.
2036 (TestPostGISTableExplicitGIDColumn): New. Like TestPostGISTable
2037 except that it the landmarks_point_id table to test the id_column
2038 parameter
2039 (PointTests): Extend the doc-string
2040 (TestPostGISShapestorePointExplicitGIDColumn)
2041 (TestPostGISShapestorePointOIDAsGIDColumn): New classes derived
2042 from PointTests to test the explicit id_column parameter. One
2043 tests with the name of the column holding the shape ids, the other
2044 uses PostgreSQL's OID column. For the latter a number of methods
2045 have to be overwritten to make them independent of the actual id
2046 values.
2047
2048 2004-03-08 Silke Reimer <[email protected]>
2049
2050 Update debian directory:
2051
2052 * debian/changelog: Added new version.
2053 * deiban/rules: Updated management of patches (with cbds)
2054 * debian/control: Added cbds to dependencies
2055 * debian/patches/*: New. Adds better support for patches of thuban in
2056 debian
2057 * debian/menu: Syntax of menu changed slightly
2058 * debian/setup.py.patch: removed because it has been moved to
2059 debian/patechs/setup.py.patch
2060
2061
2062 2004-02-26 Bernhard Herzog <[email protected]>
2063
2064 Create the Doc/technotes directory for text files with information
2065 for developers
2066
2067 * Doc/technotes/README: New. README for the technotes
2068
2069 * Doc/technotes/coding_guidelines.txt: New. Coding guidelines for
2070 Thuban
2071
2072 * Doc/technotes/release_process.txt: New. Used to be
2073 HOWTO-Release. Now slightly adapted to technote formatting style.
2074
2075 * HOWTO-Release: Removed. It's contents are now in
2076 Doc/technotes/release_process.txt
2077
2078 2004-02-25 Bernhard Herzog <[email protected]>
2079
2080 * libraries/thuban/wxproj.cpp (get_wx_version): New. Return the
2081 version of wxWindows the module was compiled with so we can check
2082 that against the wxPython version.
2083
2084 * Thuban/version.py (thuban_branch, thuban_release): New variables
2085 controlling which and how Thuban versions are shown. See the
2086 comments for details.
2087 (verify_versions): Also check that the wx version that wxproj is
2088 compiled against matches that of the wxPython we use at runtime
2089
2090 2004-02-20 Bernhard Herzog <[email protected]>
2091
2092 * Extensions/wms/wms.py (epsg_code_to_projection): Use
2093 get_system_proj_file to read the epsg projections. The old way
2094 depended on the current directory being the top Thuban directory.
2095
2096 2004-02-20 Bernhard Herzog <[email protected]>
2097
2098 * Extensions/svgexport/test/test_svgmapwriter.py
2099 (TestVirtualDC.test_clippath): Remove a debug print
2100
2101 2004-02-20 Bernhard Herzog <[email protected]>
2102
2103 * Extensions/svgexport/__init__.py: New. Turn
2104 Extensions/svgexport into a package.
2105
2106 * Extensions/svgexport/svgmapwriter.py: Reorder the imports and
2107 doc-string a bit. The doc-string must come first, otherwise it's
2108 not a doc-string. The __future__ import must be the first thing
2109 after the doc-string. Use only double quotes in doc-strings.
2110 Single quotes trip up emacs syntax highlighting if the text
2111 contains apostrophes.
2112
2113 2004-02-20 Bernhard Herzog <[email protected]>
2114
2115 * Extensions/svgexport/test/__init__.py,
2116 Extensions/svgexport/test/test_svgmapwriter.py: New. Initial test
2117 suite for svgexport
2118
2119 * test/runtests.py (find_test_modules): New. Function with the
2120 module finding code from main.
2121 (main): Use find_test_modules to figure out the default test
2122 modules and take modules from Extensions.svgexport.test too.
2123
2124 2004-02-19 Bernhard Herzog <[email protected]>
2125
2126 * Thuban/UI/application.py (ThubanApplication.OnInit): Make sure
2127 the mainwindow has a reference to the map of the initial session.
2128 This fixes a bug introduced with the fix for RT#2245
2129
2130 2004-02-19 Bernhard Herzog <[email protected]>
2131
2132 * Extensions/svgexport/svgsaver.py,
2133 Extensions/svgexport/svgmapwriter.py,
2134 Extensions/svgexport/maplegend.py: Added again. This time in the
2135 correct place.
2136
2137 2004-02-17 Bernhard Herzog <[email protected]>
2138
2139 Fix for RT#2245
2140
2141 * Thuban/UI/application.py (ThubanApplication.OnInit): Initialize
2142 instance variables before trying to create any windows. Creating
2143 windows can start an event loop if e.g. message boxes are popped
2144 up for some reason, and event handlers, especially EVT_UPDATE_UI
2145 may want to access things from the application.
2146 (ThubanApplication.maps_changed): The mainwindow may not have been
2147 created yet, so check whether it has been created before calling
2148 its methods
2149
2150 * Thuban/UI/view.py (MapCanvas.OnIdle): Only try to redraw if we
2151 have a map
2152
2153 2004-02-17 Bernhard Herzog <[email protected]>
2154
2155 * test/test_svgmapwriter.py, Extensions/svgsaver.py,
2156 Extensions/svgmapwriter.py, Extensions/maplegend.py,
2157 extensions/svgexport/svgsaver.py,
2158 extensions/svgexport/svgmapwriter.py,
2159 extensions/svgexport/maplegend.py: Removed. These files were in
2160 the wrong places or didn't work at all.
2161
2162 2004-02-16 Bernhard Herzog <[email protected]>
2163
2164 * Thuban/UI/view.py (MapCanvas.Export): Remove accidentally added
2165 line
2166
2167 2004-02-16 Bernhard Herzog <[email protected]>
2168
2169 * Thuban/UI/view.py (MapCanvas.Export): Avoid UnboundLocalError.
2170
2171 2004-02-15 Markus Rechtien <[email protected]>
2172
2173 * Extensions/svgexport/svgmapwriter.py: New. Adds the capability
2174 to write a session to a file in SVG format.
2175 * Extensions/svgexport/svgsaver.py: New. Uses svgmapwriter.py
2176 to write a SVG map of a session.
2177 * Extensions/svgexport/maplegend: New. Writes a basic maplegend
2178 in SVG format for the current session.
2179
2180 2004-02-13 Bernhard Herzog <[email protected]>
2181
2182 * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): When the layer
2183 can't be created, return immediately after displaying the error
2184 message.
2185
2186 2004-02-11 Bernhard Herzog <[email protected]>
2187
2188 Handle postgis tables with more than one geometry column.
2189
2190 * Thuban/Model/postgisdb.py
2191 (PostGISTable._fetch_table_information): Delegate the creation of
2192 column objects to a different method so that we can extend that in
2193 derived classes
2194 (PostGISTable._create_col_from_description): New. Column object
2195 creation part of _fetch_table_information
2196 (PostGISShapeStore._create_col_from_description): New. Extend
2197 inherited method to handle geometry columns
2198 (PostGISShapeStore.__init__): New parameter geometry_column to
2199 specify which geometry column to use. Optional but mandatory for
2200 tables with more than one geometry column
2201 (PostGISShapeStore._fetch_table_information): Also use the name of
2202 the geometry column when looking for the srid
2203 (PostGISShapeStore.ShapeType): Also use the name of the geometry
2204 column when looking for the shape type
2205
2206 * test/test_save.py (SaveSessionTest.test_save_postgis): Adapt
2207 NonConnectionStore to changes in the PostGISShapeStore
2208
2209 * test/test_postgis_db.py
2210 (TestPostGISSpecialCases.test_shapestore_two_geom_cols): Test
2211 PostGISShapeStore with tables having two geometry columns.
2212
2213 2004-02-10 Bernhard Herzog <[email protected]>
2214
2215 Fix some postgis problems. What remains to be done is real
2216 handling of SRIDs as they affect how reprojection is done
2217
2218 * Thuban/Model/postgisdb.py (quote_identifier): Fix typo in
2219 doc-string
2220 (PostGISShapeStore._fetch_table_information): New. Extend
2221 inherited method to retrieve srid
2222 (PostGISShapeStore.BoundingBox): Handle tables without data.
2223 extent yields NULL for those
2224 (PostGISShapeStore.ShapesInRegion): Use the srid of the table.
2225
2226 * test/test_postgis_db.py
2227 (TestPostGISSpecialCases.test_shapestore_empty_table): New test
2228 for the special case of a table without any data
2229 (TestPostGISShapestorePointSRID): New class with tests for a table
2230 that uses srids
2231 (PolygonTests): Fix a doc-string typo
2232
2233 * test/postgissupport.py (PostGISDatabase.__init__): New parameter
2234 reference_systems with a specification of spacial reference
2235 systems to create in the new db.
2236 (PostgreSQLServer.new_postgis_db)
2237 (PostgreSQLServer.get_static_data_db): New parameter
2238 reference_systems to be passed through ultimately to
2239 PostGISDatabase. In new_postgis_db also check whether an existing
2240 db already has the right srids
2241 (PostgreSQLServer.get_default_static_data_db): Add srids and a
2242 table that uses srids
2243 (PostGISDatabase.initdb): Create the entries for the reference
2244 systems
2245 (PostGISDatabase.has_data): Add reference_systems parameter to
2246 check for those too
2247 (upload_shapefile): New parameter srid to create tables with a
2248 specific srid
2249
2250 2004-02-06 Frank Koormann <[email protected]>
2251
2252 * po/pt_BR.po: Fixed charset
2253
2254 2004-02-05 Frank Koormann <[email protected]>
2255
2256 * po/pt_BR.po: Fixed format string for error message, missing %s
2257 added (Thuban/UI/application.py:273)
2258
2259 2004-02-03 Frank Koormann <[email protected]>
2260
2261 First version of Portuguese (Brazilian) translation
2262
2263 * po/pt_BR.po: New, translation of pot (2004-01-15 16:07+0300) for
2264 Brazilian Portuguese by Eduardo Patto Kanegae.
2265
2266 * Thuban/UI/about.py (About.__init.py__): Added Eduardo to the list of
2267 translators.
2268
2269
2270 2004-01-22 Frank Koormann <[email protected]>
2271
2272 * Doc/manual/thuban-manual.xml: Added section on installation of
2273 Thuban under Win32 systems. Fixed image path references in the postgis
2274 section. Some minor source formattings.
2275
2276 2004-01-21 Frank Koormann <[email protected]>
2277
2278 Make Thuban remember path selections (at least for one application run).
2279
2280 * Thuban/UI/application.py (Application.OnInit): Initialize path as a
2281 attribute of application object. Path is a dictionary of
2282 strings, currently with the items "data" and "projection".
2283 (Application.SetPath): New, stores path for the specified item.
2284 (Application.Path): New, return path for the specified item.
2285
2286 * Thuban/UI/mainwindow.py
2287 (MainWindow.OpenSession, MainWindow.SaveSessionAs,
2288 MainWindow.AddLayer, MainWindow.AddRasterLayer,
2289 MainWindow.TableOpen): Access "data" path information of the
2290 application.
2291
2292 * Thuban/UI/projdialog.py (ProjFrame._OnImport, ProjFrame._OnExport):
2293 Access "projection" path information of the application.
2294
2295 2004-01-05 Bernhard Herzog <[email protected]>
2296
2297 * po/ru.po: Updated translations from Alex Shevlakov
2298
2299 2004-01-05 Bernhard Herzog <[email protected]>
2300
2301 * po/Makefile, po/README: Move the description of how to generate
2302 the translation statistics to the README.
2303
2304 2003-12-23 Bernhard Herzog <[email protected]>
2305
2306 * NEWS: Update for 1.0.0
2307
2308 * po/it.po: Another update from Maurizio Napolitano
2309
2310 2003-12-23 Bernhard Herzog <[email protected]>
2311
2312 * po/it.po: Updated translation from Maurizio Napolitano
2313
2314 2003-12-23 Bernhard Herzog <[email protected]>
2315
2316 * Thuban/UI/join.py (JoinDialog.__init__): Mark one more string
2317 for translation
2318
2319 * Thuban/UI/mainwindow.py (MainWindow.TableRename)
2320 (MainWindow.RenameMap, MainWindow.RenameLayer): Mark some more
2321 strings for translation
2322
2323 * po/de.po: Update with the newly marked strings.
2324
2325 2003-12-22 Bernhard Herzog <[email protected]>
2326
2327 * HOWTO-Release: Fix the places where version numbers have to be
2328 updated
2329
2330 2003-12-22 Bernhard Herzog <[email protected]>
2331
2332 * setup.py (setup call): 1.0.0, yeah!
2333
2334 * Thuban/version.py (longversion): 1.0.0, yeah!
2335
2336 * Thuban/Model/load.py (SessionLoader.__init__): Accept the
2337 1.0.0 namespace too
2338
2339 * Thuban/Model/save.py (SessionSaver.write_session): Save with
2340 1.0.0 namespace
2341
2342 * test/test_load.py (LoadSessionTest.dtd)
2343 (TestSingleLayer.file_contents)
2344 (TestNonAsciiColumnName.file_contents)
2345 (TestLayerVisibility.file_contents)
2346 (TestClassification.file_contents, TestLabels.file_contents)
2347 (TestLayerProjection.file_contents)
2348 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2349 (TestLabelLayer.file_contents, TestPostGISLayer.file_contents)
2350 (TestPostGISLayerPassword.file_contents)
2351 (TestLoadError.file_contents, TestLoadError.test): Update for
2352 1.0.0 namespace
2353
2354 * test/test_save.py (SaveSessionTest.dtd)
2355 (SaveSessionTest.testEmptySession)
2356 (SaveSessionTest.testSingleLayer)
2357 (SaveSessionTest.testLayerProjection)
2358 (SaveSessionTest.testRasterLayer)
2359 (SaveSessionTest.testClassifiedLayer)
2360 (SaveSessionTest.test_dbf_table)
2361 (SaveSessionTest.test_joined_table)
2362 (SaveSessionTest.test_save_postgis): Update for 1.0.0 namespace
2363
2364 2003-12-22 Bernhard Herzog <[email protected]>
2365
2366 * Thuban/Model/load.py (SessionLoader.start_label): Make sure the
2367 alignment flags are byte strings not unicode and that they have
2368 valid values
2369
2370 * test/test_load.py (TestLabelLayer): New. Test loading (and
2371 indirectly saving) of maps with labels.
2372
2373 2003-12-22 Bernhard Herzog <[email protected]>
2374
2375 * Thuban/UI/tableview.py (TableGrid.OnDestroy)
2376 (TableGrid.__init__): Handle EVT_WINDOW_DESTROY in the grid to
2377 unsubscribe all subscribers.
2378 (LayerTableFrame.OnDestroy): Do not unsubscribe any messages from
2379 self.grid since it may already have been destroyed.
2380 Fixes RT #2256
2381
2382 2003-12-19 Bernhard Herzog <[email protected]>
2383
2384 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
2385
2386 2003-12-16 Bernhard Herzog <[email protected]>
2387
2388 * debian/bitmappath.patch, debian/setup.py.patch:
2389 added to ensure compliance with FHS for debian
2390 * debian/rules, debian/changelog:
2391 added patches in rules to ensure compliance with FHS for debian
2392
2393 2003-12-16 Bernhard Herzog <[email protected]>
2394
2395 * po/Makefile (mo): Make the output a bit nicer so that it prints
2396 statistics about the translations. Add a comment how produce even
2397 nicer statistics with sed.
2398
2399 2003-12-09 Frank Koormann <[email protected]>
2400
2401 * Resources/Projections/defaults.proj:
2402 French projection sample with correct accents (UNICODE).
2403
2404 2003-12-05 Bernhard Herzog <[email protected]>
2405
2406 * MANIFEST.in: Add the devtools directory
2407
2408 * setup.py (setup call): Use license instead of licence. This
2409 silences a deprecation warning on Python 2.3
2410
2411 2003-12-05 Frank Koormann <[email protected]>
2412
2413 Documentation synced with 1.0rc1
2414
2415 * Doc/manual/thuban-manual.xml:
2416 Minor formatting changes and references to database layers .
2417 Introduction.Internationalization: New section on i18n.
2418 MapManagement.AddingandRemovingLayers: Added item on database layers.
2419 MapManagement.TheLegend: Added section and screenshot on popup menu.
2420 ProjectionManagement: Updated screenshot and sentence on EPSG.
2421 Appendix.SupportedDataSources: Added PostGIS.
2422 Appendix.WorkingwithPostGIS: New section.
2423
2424 * Doc/manual/images/6_projection.png: Updated screenshot including
2425 EPSG checkboxes.
2426
2427 * Doc/manual/images/3_5_popup_menu.png: New, popup menu screenshot.
2428
2429 * Doc/manual/images/app_postgis_add_layer.png,
2430 Doc/manual/images/app_postgis_db_add.png,
2431 Doc/manual/images/app_postgis_db_management.png:
2432 New screenshots focussing on database layers
2433
2434 2003-12-05 Frank Koormann <[email protected]>
2435
2436 * Thuban/UI/projdialog.py (load_user_proj): If user.proj is missing
2437 write warning to stderr instead of rising a warning dialog
2438
2439 2003-12-03 Bernhard Herzog <[email protected]>
2440
2441 Fix for RT #2243
2442
2443 * Thuban/UI/mainwindow.py (MainWindow.has_selected_shape_layer):
2444 New. Like has_selected_layer but for shape layers only
2445 (_has_selected_shape_layer): New. Like _has_selected_layer but for
2446 shape layers only
2447 (layer_show_table command, layer_jointable command): Use these
2448 commands should only be available for shape layers
2449
2450 2003-12-03 Bernhard Herzog <[email protected]>
2451
2452 * Thuban/UI/mainwindow.py (MainWindow.Unsubscribe): Deal with
2453 publishers that are wx objects and may have been destroyed by wx
2454 already. Fixes RT #2242.
2455
2456 2003-12-03 Bernhard Herzog <[email protected]>
2457
2458 * po/ru.po: Updates from Alex Shevlakov
2459
2460 2003-12-03 Silke Reimer <silkeintevation.de>
2461
2462 * debian/control, debian/changelog: Added gdal-support to
2463 debian package, updated to new thuban version
2464
2465
2466 2003-12-03 Bernhard Herzog <[email protected]>
2467
2468 * Thuban/Lib/version.py: New. Module for version number
2469 manipulations. The version of make_tuple here also deals better
2470 with more unusual version number strings, such as e.g.
2471 "1.2+cvs20031111"
2472
2473 * Thuban/version.py (make_tuple): Removed. It's now in
2474 Thuban.Lib.version. Use that implementation instead.
2475
2476 * test/test_lib_version.py: New. Tests for Thuban/Lib/version.py
2477
2478 2003-12-02 Bernhard Herzog <[email protected]>
2479
2480 * MANIFEST.in: Add debian files
2481
2482 * setup.py (setup call): Add packages for the Extensions so that
2483 they're installed too
2484 (data_files): Add READMEs and sample data from some Extensions
2485
2486 * NEWS: Add note about the extensions in binary packages
2487
2488 2003-12-02 Bernhard Herzog <[email protected]>
2489
2490 * Thuban/Model/save.py (SessionSaver.write_session): Save files
2491 with the thuban-1.0rc1
2492
2493 * Thuban/Model/load.py (SessionLoader.__init__): Recognize the
2494 thuban-1.0rc1 namespace too
2495
2496 * test/test_save.py (SaveSessionTest.dtd)
2497 (SaveSessionTest.testEmptySession)
2498 (SaveSessionTest.testSingleLayer)
2499 (SaveSessionTest.testLayerProjection)
2500 (SaveSessionTest.testRasterLayer)
2501 (SaveSessionTest.testClassifiedLayer)
2502 (SaveSessionTest.test_dbf_table)
2503 (SaveSessionTest.test_joined_table)
2504 (SaveSessionTest.test_save_postgis): Update to thuban-1.0rc1
2505 namespace
2506
2507 * test/test_load.py (LoadSessionTest.dtd): Update to thuban-1.0rc1
2508 namespace
2509 (TestSingleLayer.file_contents)
2510 (TestNonAsciiColumnName.file_contents)
2511 (TestLayerVisibility.file_contents)
2512 (TestClassification.file_contents, TestLabels.file_contents)
2513 (TestLayerProjection.file_contents)
2514 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
2515 (TestPostGISLayer.file_contents)
2516 (TestPostGISLayerPassword.file_contents)
2517 (TestLoadError.file_contents, TestLoadError.test): Update to
2518 thuban-1.0rc1 namespace
2519
2520 2003-12-01 Bernhard Herzog <[email protected]>
2521
2522 * setup.py (proj4_prefix, wx_prefix, gdal_prefix): Fix these for
2523 nt to better match Intevation's current w32 setup
2524
2525 * HOWTO-Release: Add note about updating MANIFEST.in
2526
2527 * MANIFEST.in: Add the Extensions
2528
2529 * NEWS: Update for 1.0rc1
2530
2531 2003-12-01 Bernhard Herzog <[email protected]>
2532
2533 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Change the wild
2534 cards for the dialog so that shapefiles ending in all uppercase
2535 SHP are listed too
2536
2537 2003-11-28 Bernhard Herzog <[email protected]>
2538
2539 * Thuban/version.py (longversion): Update to 1.0rc1
2540
2541 * setup.py (setup call): Update version to 1.0rc1. Use the
2542 [email protected] email address as author email instead of my
2543 personal one.
2544
2545 2003-11-28 Bernhard Herzog <[email protected]>
2546
2547 * po/de.po: Update german translation.
2548
2549 2003-11-28 Bernhard Herzog <[email protected]>
2550
2551 Unify the filenames stored in .thuban files so that the .thuban
2552 files are more platform independend
2553
2554 * Thuban/Model/save.py (unify_filename): New. Unify filenames so
2555 that they can be used on both windows and unix
2556 (SessionSaver.prepare_filename): New. Handle all filename
2557 transformations for filenames stored in the thuban file
2558 (SessionSaver.write_data_containers, SessionSaver.write_layer):
2559 Use prepare_filename
2560
2561 * test/test_save.py (SaveSessionTest.testSingleLayer)
2562 (SaveSessionTest.testLayerProjection)
2563 (SaveSessionTest.testRasterLayer)
2564 (SaveSessionTest.testClassifiedLayer)
2565 (SaveSessionTest.test_dbf_table)
2566 (SaveSessionTest.test_joined_table): Filenames are always stored
2567 with slashes on all currently supported platforms so adapt all
2568 tests to this
2569
2570 * test/test_load.py (LoadSessionTest.filenames): With the new
2571 filename scheme the filenames in the tests should be
2572 understandable on all currently supported platforms so we turn
2573 this into an empty list because we don't have to normalize them
2574 anymore
2575
2576 2003-11-28 Bernhard Herzog <[email protected]>
2577
2578 * test/test_layer.py (TestLayer.test_arc_layer_with_projection):
2579 Add the ellipsoid to the projection since some Proj versions
2580 complain if it's missing.
2581
2582 2003-11-27 Bernhard Herzog <[email protected]>
2583
2584 Corect some bounding box projection problems
2585
2586 * Thuban/Model/proj.py (Projection.InverseBBox): New. Inverse
2587 version of ForwardBBox
2588 (Projection._transform_bbox): New. common implementation of
2589 ForwardBBox and InverseBBox
2590 (Projection.ForwardBBox): Use _transform_bbox.
2591
2592 * test/test_proj.py (TestProjection.test): Add test for
2593 InverseBBox
2594
2595 * Thuban/Model/layer.py (Layer.LatLongBoundingBox)
2596 (Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
2597 new InverseBBox method to determine the unprojected bounding box
2598 (Layer.ShapesInRegion): Use the ForwardBBox method to project the
2599 bbox.
2600
2601 * test/test_layer.py (TestLayer.test_point_layer_with_projection):
2602 Removed.
2603 (TestLayer.test_arc_layer_with_projection): New. This test is
2604 better able to test whether bounding boxes are projected correctly
2605 than test_point_layer_with_projection
2606
2607 * Thuban/UI/viewport.py (ViewPort.map_projection_changed): Use
2608 InverseBBox to unproject bboxes
2609
2610 2003-11-25 Bernhard Herzog <[email protected]>
2611
2612 * Thuban/UI/about.py (About.__init__): Make sure we have ASCII
2613 source code.
2614
2615 2003-11-25 Bernhard Herzog <[email protected]>
2616
2617 * Thuban/Model/layer.py (Layer.__getattr__): Removed. It was only
2618 there for backwards compatibility and all code relying on that
2619 should have been updated by now.
2620
2621 2003-11-25 Bernhard Herzog <[email protected]>
2622
2623 * test/test_load.py (TestClassification.test): Add the missing
2624 round trip test.
2625 (TestClassification.file_contents): Update to the newest file
2626 format
2627
2628 2003-11-25 Bernhard Herzog <[email protected]>
2629
2630 Add very experimental (and possibly dangerous) extension to draw
2631 polygons:
2632
2633 * Extensions/drawshape/README: New. Brief installation
2634 instructions
2635
2636 * Extensions/drawshape/drawshape.py: New. Implementation of the
2637 drawshape extensions
2638
2639 * Extensions/drawshape/patch.diff: Patch to apply before the
2640 extension can be used.
2641
2642 2003-11-24 Bernhard Herzog <[email protected]>
2643
2644 * Thuban/Model/data.py (ShapefileStore._open_shapefile)
2645 (ShapefileStore.__init__): Factor opening the shapefile into a
2646 separate method (the new _open_shapefile). This makes the code a
2647 bit more readable but the real reason is that it makes some evil
2648 hacks easier. :-)
2649
2650 2003-11-24 Bernhard Herzog <[email protected]>
2651
2652 * Thuban/Model/load.py (SessionLoader.check_attrs): If no
2653 converter is specified for an attribute assume it's a string
2654 containing only Latin1 characters. Update doc-string accordingly.
2655 This change should fix many places where unicode objects might
2656 accidentally enter Thuban.
2657
2658 * test/test_load.py (TestNonAsciiColumnName): New test to check
2659 what happens with column names in DBF files that contain non-ascii
2660 characters
2661
2662 2003-11-21 Bernhard Herzog <[email protected]>
2663
2664 Enable the experimental attribute editing again and introduce a
2665 command line switch to actually activate it
2666
2667 * Thuban/UI/main.py (options): New. Container for options set on
2668 the commmand line
2669 (main): Add the --enable-attribute-editing flag.
2670
2671 * Thuban/UI/identifyview.py (IdentifyView.__init__): If attribute
2672 editing is enabled use the grid ctrl which allows editing of the
2673 values
2674
2675 * Thuban/Model/transientdb.py (AutoTransientTable.write_record):
2676 New. Just delegate this to the underlying table.
2677
2678 2003-11-20 Bernhard Herzog <[email protected]>
2679
2680 * test/test_proj.py (ProjFileReadTests.test_read_unreadable_file):
2681 Skip this test if run under non-posix systems since it only works
2682 there
2683
2684 2003-11-19 Bernhard Herzog <[email protected]>
2685
2686 * Thuban/Model/resource.py: Rework the way gdal support is
2687 determined so that we can give a reason in the about why gdal is
2688 not supported.
2689 (gdal_support_status): New. Variable holding a string with the
2690 reason for no gdal support
2691
2692 * Thuban/UI/about.py (About.__init__): Add the reason why gdal is
2693 not supported to the message
2694
2695 2003-11-19 Bernhard Herzog <[email protected]>
2696
2697 Remove the old table interface and its test cases
2698
2699 * Thuban/Model/table.py (OldTableInterfaceMixin): Removed.
2700 (DBFTable, MemoryTable): Do not derive from OldTableInterfaceMixin
2701 anymore
2702
2703 * Thuban/Model/transientdb.py (TransientTableBase)
2704 (AutoTransientTable): Do not derive from OldTableInterfaceMixin
2705 anymore
2706
2707 * test/test_table.py: Removed since the old interface it tests is
2708 gone.
2709
2710 * test/runtests.py (main): The old table interface is gone and
2711 with it the deprecation warnings so remove the code that turns
2712 these warnings into errors
2713
2714 2003-11-19 Bernhard Herzog <[email protected]>
2715
2716 * test/test_table.py: Revert to revision 1.5 again. Changing the
2717 tests to use the new table interface is completely wrong since the
2718 whole purpose of the tests in this module is to test the old
2719 interface.
2720
2721 2003-11-18 Bernhard Herzog <[email protected]>
2722
2723 * Thuban/Model/postgisdb.py (PostGISConnection.MatchesParameters):
2724 New. Test whether the connection matches a set of connection
2725 parameters
2726
2727 * Thuban/UI/dbdialog.py (DBFrame.conns_changed): Fix doc-string
2728 (DBFrame.OnAdd): Use the new MatchesParameters method when looking
2729 for existing connections with the same parameters and break out of
2730 the loop correctly.
2731
2732 * test/test_postgis_db.py (TestBriefDescription)
2733 (TestPostGISSimple.test_brief_description): Rename
2734 TestBriefDescription to TestPostGISSimple and the test method to
2735 test_brief_description so that we can add more test methods.
2736 (TestPostGISSimple.test_matches_parameters): New. Test the new
2737 MatchesParameters method
2738
2739 2003-11-18 Bernhard Herzog <[email protected]>
2740
2741 * Thuban/Lib/connector.py (Publisher): Introduce a new flag,
2742 _was_destroyed, to indicate whether an publisher instance has
2743 already been destroyed.
2744 (Publisher.Unsubscribe): Only disconnect if the publisher has not
2745 been destroyed yet.
2746 (Publisher.Destroy): Set the _was_destroyed flag to true.
2747
2748 * test/test_connector.py
2749 (TestPublisher.test_unsubscribe_after_destroy): New. Test that
2750 calling Unsubscribe after Destroy doesn't raise an exception
2751
2752 2003-11-14 Bernhard Herzog <[email protected]>
2753
2754 * Thuban/UI/identifyview.py (IdentifyView.selected_shape): Fix
2755 typo in doc-string
2756
2757 2003-11-13 Bernhard Herzog <[email protected]>
2758
2759 Quote table and column names properly for postgis.
2760
2761 * Thuban/Model/postgisdb.py (quote_identifier): New. Function to
2762 quote an identifier for use in an sql statement
2763 (PostGISColumn.__init__): Add the quoted_name attribute
2764 (PostGISTable.__init__): New instance variable quoted_tablename
2765 (PostGISTable._fetch_table_information): Use the quoted table
2766 name. New isntance variable quoted_geo_col with a quoted version
2767 of geometry_column
2768 (PostGISTable.NumRows, PostGISTable.RowIdToOrdinal)
2769 (PostGISTable.RowOrdinalToId): Use the quoted table name
2770 (PostGISTable.ReadValue, PostGISTable.ValueRange)
2771 (PostGISTable.UniqueValues, PostGISTable.SimpleQuery)
2772 (PostGISShapeStore.BoundingBox, PostGISShapeStore.Shape)
2773 (PostGISShapeStore.AllShapes, PostGISShapeStore.ShapesInRegion):
2774 Use quoted table and column names
2775
2776 * test/test_postgis_db.py (TestPostGISSpecialCases)
2777 (TestPostGISIgnoredColumns): Rename the class to
2778 TestPostGISSpecialCases because that better describes the new
2779 cases
2780 (TestPostGISSpecialCases.test_unsupported_types)
2781 (TestPostGISSpecialCases.test): Rename the method to
2782 test_unsupported_types because we need a more descriptive name now
2783 that there are more methods
2784 (TestPostGISSpecialCases.test_table_name_quoting)
2785 (TestPostGISSpecialCases.test_column_name_quoting)
2786 (TestPostGISSpecialCases.test_shapestore_name_quoting): New test
2787 cases to test quoting of table and column names in PostGISTable
2788 and PostGISShapeStore
2789
2790 * test/postgissupport.py
2791 (skip_if_addgeometrycolumn_does_not_use_quote_ident): New. Skip if
2792 AddGeometryColumn desn't support table or column names with sapces
2793 or double quotes
2794
2795 2003-11-12 Jan-Oliver Wagner <[email protected]>
2796
2797 * Extensions/wms/__init__.py: New: Init to make this
2798 directory a package.
2799
2800 * Extensions/wms/wms.py: New: Provide layers via OGC WMS.
2801
2802 2003-11-11 Bernhard Herzog <[email protected]>
2803
2804 * Thuban/Model/resource.py (EPSG_DEPRECATED_PROJ_FILE): New.
2805 Constant for the file woth deprecated epsg projections
2806 (get_system_proj_file): Update doc-string
2807
2808 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Add a space
2809 above the EPS widgets, introduce a check box for the deprecated
2810 eps projections and a label for the epsg widgets
2811 (ProjFrame._OnShowEPSG): Handle the deprecated EPSG projections
2812 too
2813
2814 2003-11-11 Bernhard Herzog <[email protected]>
2815
2816 Avoid warnings when run under Python 2.3
2817
2818 * Thuban/UI/baserenderer.py (BaseRenderer.draw_point_shape)
2819 (BaseRenderer.draw_label_layer): Coordinates must be ints.
2820
2821 * Thuban/UI/renderer.py (MapRenderer.make_point): Turn this into a
2822 real method so that we can convert to int.
2823 (MapRenderer.label_font): The font size mist be an int.
2824
2825 * Thuban/UI/common.py (Color2wxColour): The color values must be
2826 ints. Also, remove the unnecessary asserts.
2827
2828 * test/test_load_0_8.py (TestUnicodeStrings.file_contents)
2829 (TestUnicodeStrings.test): Python source code should not contain
2830 non-ascii characters unless an encoding is specified in the file.
2831 Therefore use \x escapes in the string literals for non-ascii
2832 characters.
2833
2834 2003-11-11 Bernhard Herzog <[email protected]>
2835
2836 * Thuban/Model/resource.py (get_system_proj_file): Add a filename
2837 parameter so that this function can be used for all proj files in
2838 Resource/Projections
2839 (DEFAULT_PROJ_FILE, EPSG_PROJ_FILE): New. Predefined filenames for
2840 get_system_proj_file
2841
2842 * Thuban/UI/projdialog.py (ProjFrame.__init__): Instead of one
2843 ProjFile self.__sysProjFile use a dictionary of system ProjFile
2844 objects self._sys_proj_files
2845 (ProjFrame.build_dialog): Adapt to the new changes in the
2846 ProjectionList constructor. Add a check button to toggle whether
2847 EPSG projections are shown
2848 (ProjFrame._OnShowEPSG): New. Handler for the epsg check button
2849 events.
2850 (ProjFrame.load_user_proj, ProjFrame.load_system_proj): Only show
2851 the busy cursor if the files have not yet been loaded by the
2852 dialog.
2853 (ProjFrame.load_system_proj): Add a parameter for the name of the
2854 proj file. Maintain the dictionary of system projections
2855 self._sys_proj_files
2856
2857 * Thuban/UI/projlist.py (ProjectionList): Merge the system_projs,
2858 user_projs parameters into one parameter proj_files which is a
2859 list of proj files.
2860 (ProjectionList._subscribe_proj_files)
2861 (ProjectionList._unsubscribe_proj_files): New. Move
2862 subscription/unsubscription of projfile messages to separate
2863 methods
2864 (ProjectionList.Destroy): The unsubscribe is now done in
2865 _unsubscribe_proj_files
2866 (ProjectionList.update_projections): We now have a list of proj
2867 file objects
2868 (ProjectionList.SetProjFiles): New method to set a new list of
2869 proj file objects
2870
2871 * test/test_proj.py (ProjFileReadTests.test_get_system_proj_file):
2872 Specify explicitly which system proj file to load.
2873
2874 2003-11-11 Bernhard Herzog <[email protected]>
2875
2876 * Thuban/Model/load.py (SessionLoader.Destroy): New. Clear all
2877 instance variables to cut cyclic references. The GC would have
2878 collected the loader eventually but it can happen that it doesn't
2879 run at all until thuban is closed (2.3 but not 2.2 tries a bit
2880 harder and forces a collection when the interpreter terminates)
2881 (load_session): Call the handler's Destroy method to make sure
2882 that it gets garbage collected early. Otherwise it will be
2883 collected very late if at all and it holds some references to e.g.
2884 shapestores and the session which can lead to leaks (of e.g. the
2885 temporary files)
2886
2887 * test/test_load.py (TestSingleLayer.test_leak): New. test for the
2888 resource leak in load_session
2889
2890 2003-11-10 Bernhard Herzog <[email protected]>
2891
2892 * Thuban/UI/baserenderer.py: Add a way to specify how layers in
2893 extensions are to be rendered.
2894 (_renderer_extensions): New. List with renderer for layers in
2895 extensions
2896 (add_renderer_extension): New. Add a renderer extension
2897 (init_renderer_extensions): New. Init the renderer extensions
2898 (BaseRenderer.render_map_incrementally): Search
2899 _renderer_extensions for how to draw unknown layer types
2900 (BaseRenderer.draw_raster_data): Add format parameter so that
2901 formats other than BMP can be drawn
2902 (BaseRenderer.draw_raster_layer): Pass an explicit format to
2903 draw_raster_data
2904
2905 * Thuban/UI/renderer.py (raster_format_map): New. Mapping form the
2906 strings of the format parameter of draw_raster_data method to wx
2907 constants
2908 (MapRenderer.draw_raster_data): Add the format parameter and use
2909 raster_format_map to map it to the right wxwindows constant for
2910 wxImageFromStream
2911
2912 * test/test_baserenderer.py (SimpleRenderer.draw_raster_data): Add
2913 the format parameter and record it
2914 (TestBaseRenderer.test_raster_no_projection): check the format
2915 paramter of the draw_raster_data method
2916 (TestBaseRenderer.test_renderer_extension): New. Test the renderer
2917 extension facility
2918
2919 2003-11-07 Bernhard Herzog <[email protected]>
2920
2921 Tweak the usage of the sqlite database to make common use cases
2922 more responsive. In most cases copying the data to the sqlite
2923 database takes so long that using sqlite doesn't have enough
2924 advantages.
2925
2926 * Thuban/Model/transientdb.py (TransientTableBase.ValueRange): Add
2927 comments about performance and query the min and max in separate
2928 statements because only that way will indexes be used.
2929 (TransientTableBase.UniqueValues): Add some comments about
2930 performance.
2931 (AutoTransientTable.ValueRange, AutoTransientTable.UniqueValues):
2932 Do not copy the data to the transient DB but use the transient
2933 copy if it exists. See the new comments for the performance trade
2934 offs
2935
2936 * test/test_transientdb.py
2937 (TestTransientTable.test_auto_transient_table): Make sure that the
2938 data is copied to the transient database at some point.
2939
2940 2003-11-03 Bernhard Herzog <[email protected]>
2941
2942 * Thuban/Model/data.py (ShapefileStore.ShapesInRegion): Bind some
2943 globals to locals so that it's a bit faster
2944
2945 2003-11-03 Bernhard Herzog <[email protected]>
2946
2947 * Thuban/UI/baserenderer.py
2948 (BaseRenderer.draw_shape_layer_incrementally): Use the ReadValue
2949 method. ReadValue is faster than ReadRowAsDict since it only reads
2950 one cell especially now that the dbf file objects actually
2951 implement it.
2952
2953 * Thuban/Model/table.py (DBFTable.ReadValue): Use the new
2954 read_attribute method of the dbf objects
2955
2956 2003-11-03 Bernhard Herzog <[email protected]>
2957
2958 * Extensions/profiling/profiling.py (popup_dialog_box): New config
2959 variable to indicate whether the result should be shown in a
2960 dialog box
2961 (profile_screen_renderer, time_screen_renderer): Only show a
2962 dialog box if popup_dialog_box is true.
2963 (profile_screen_renderer): Flush stdout after the printing the
2964 first part of the "profiling..." message
2965
2966 * Thuban/UI/baserenderer.py
2967 (BaseRenderer.draw_shape_layer_incrementally): Cache the pens and
2968 brushes for the groups so that they're not created over and over
2969 again
2970
2971 * Thuban/Model/classification.py (Classification.__getattr__)
2972 (Classification._compile_classification)
2973 (Classification._clear_compiled_classification): New. Methods to
2974 manage a 'compiled' representation of the classification groups
2975 which is created on demand
2976 (Classification.InsertGroup, Classification.RemoveGroup)
2977 (Classification.ReplaceGroup): reset the compiled representation
2978 (Classification.FindGroup): Use the compiled representation to
2979 find the matching group
2980 (ClassGroupRange.GetRangeTuple): New. Return the range as a tuple
2981
2982 2003-10-31 Bernhard Herzog <[email protected]>
2983
2984 * Thuban/Model/classification.py (Classification.SetDefaultGroup):
2985 Send a CLASS_CHANGED message
2986 (Classification.RemoveGroup): Send a CLASS_CHANGED message and do
2987 not return the removed group since it wasn't used.
2988
2989 * test/test_classification.py
2990 (TestClassification.test_set_default_group): New. Test the
2991 SetDefaultGroup method
2992 (TestClassification.test_insert_group): New. Test the InsertGroup
2993 method
2994 (TestClassification.test_remove_group): New. Test the RemoveGroup
2995 method
2996 (TestClassification.test_replace_group): New. Test the
2997 ReplaceGroup method
2998
2999 2003-10-31 Bernhard Herzog <[email protected]>
3000
3001 * test/test_classification.py (TestClassification.setUp):
3002 Subscribe to the CLASS_CHANGED messages
3003 (TestClassification.tearDown): New. Destroy the classification
3004 properly
3005 (TestClassification.test_defaults): Add tests for the default line
3006 width and whether no messages were sent yet
3007 (TestClassification.test_set_default_properties): Add tests for
3008 messages and setting the default line width
3009 (TestClassification.test_add_singleton)
3010 (TestClassification.test_add_range)
3011 (TestClassification.test_multiple_groups): Add tests for messages
3012
3013 2003-10-31 Bernhard Herzog <[email protected]>
3014
3015 Some more refactoring in preparation for new tests:
3016
3017 * test/test_classification.py (TestClassification.setUp): New.
3018 Instantiate the classification here. Update the test methods
3019 accordingly.
3020 (TestClassification.test_multiple_groups): Make sure that the two
3021 singletons matching 1 are considered different.
3022
3023 2003-10-31 Bernhard Herzog <[email protected]>
3024
3025 * test/test_classification.py (red, green, blue): New. These
3026 constants were used in several cases. Update the relevant methods.
3027 (TestClassification.test_defaults)
3028 (TestClassification.test_set_default_properties)
3029 (TestClassification.test_add_singleton)
3030 (TestClassification.test_add_range)
3031 (TestClassification.test_multiple_groups)
3032 (TestClassification.test_deepcopy): New. These were formerly all
3033 part of the single method test.
3034 (TestClassification.test_deepcopy): Removed.
3035 (TestClassIterator): Removed. The test case is now a method of
3036 TestClassification since it tests part of the public interface of
3037 Classification
3038 (TestClassification.test_iterator): New. Used to be
3039 TestClassIterator effectively
3040
3041 2003-10-31 Jan-Oliver Wagner <[email protected]>
3042
3043 GUIfied the functions of the profiling extension.
3044
3045 * /Extensions/profiling/__init__.py: New: Init to make this
3046 directory a package.
3047
3048 * Extensions/profiling/profiling.py: Moved menu entries to
3049 the Extensions menu. Applied _() for strings.
3050 (profile_screen_renderer): Catch the detailed printout and present
3051 it in a dialog.
3052 (time_screen_renderer): Raise a dialog to present the result instead
3053 of printing it to stdout.
3054
3055 2003-10-31 Bernhard Herzog <[email protected]>
3056
3057 * test/test_classification.py (TestClassGroupProperties)
3058 (TestClassGroup, TestClassGroupDefault, TestClassGroupRange)
3059 (TestClassGroupSingleton, TestClassIterator, TestClassification):
3060 Split TestClassification into several classes, one for each class
3061 being tested. TestClassification itself now only tests
3062 Classification. This split makes changes to the tests a bit easier
3063
3064 2003-10-31 Bernhard Herzog <[email protected]>
3065
3066 * Extensions/profiling/profiling.py: New. Extension to measure
3067 Thuban performance
3068
3069 2003-10-31 Frank Koormann <[email protected]>
3070
3071 Added two items to legend popup menu: Remove Layer and Show Layer Table
3072
3073 * Thuban/UI/legend.py (LegendPanel._OnRemoveLayer,
3074 LegendPanel._OnShowTable): New event handlers, call the corresponding
3075 mainwindow methods.
3076 (LegendTree._OnRightClick): Added items to popup menu.
3077
3078 2003-10-30 Bernhard Herzog <[email protected]>
3079
3080 * Thuban/UI/dialogs.py (ThubanFrame.__init__): Handle
3081 EVT_WINDOW_DESTROY
3082 (ThubanFrame.OnDestroy): New. Handler for EVT_WINDOW_DESTROY. Does
3083 nothing but is convenient for the derived classes.
3084
3085 * Thuban/UI/tableview.py
3086 (TableFrame.OnDestroy, LayerTableFrame.OnDestroy): New.
3087 Unsubscribe the messages here not in OnClose because that might
3088 get called multiple times. Fixes RT #2196
3089 (TableFrame.OnClose, LayerTableFrame.OnClose): Removed. Not needed
3090 anymore.
3091
3092 * README: Update the minimum requirement for wxPython. Since we
3093 now use the EVT_WINDOW_DESTROY event, we need at least 2.4.0.4,
3094 the version in which that was introduced for all platforms
3095
3096 2003-10-30 Frank Koormann <[email protected]>
3097
3098 * Thuban/UI/join.py (JoinDialog.OnJoin): Wrapped the major parts of
3099 the join process in a ThubanBeginBusyCursor, ThubanEndBusyCursor
3100 frame.
3101
3102 2003-10-30 Jan-Oliver Wagner <[email protected]>
3103
3104 Improved APR import extension, added further EPSG definitions
3105 and some cleanup regarding string class.
3106
3107 * test/test_proj.py (TestProjection.test_get_projection_units_geo):
3108 Added test for alias 'longlat'.
3109
3110 * Resources/Projections/epsg-deprecated.proj: New. Contains
3111 deprecated EPSG definitions.
3112
3113 * Extensions/importAPR/odb.py (ODBBaseObject.TreeInfo): Added
3114 the variable names for objects.
3115
3116 * Extensions/importAPR/apr.py (APR_BLnSym, APR_BMkSym, APR_BShSym): New.
3117 Copied from importAPR and provided with documentation.
3118
3119 * Extensions/importAPR/importAPR.py (APR_BLnSym, APR_BMkSym, APR_BShSym):
3120 Moved to apr.py.
3121 (APR_View): Added object ref 'ITheme'.
3122
3123 * Thuban/Lib/fileutil.py, Thuban/UI/proj4dialog.py: Replaced string
3124 split function by corresponding use of the string class method.
3125
3126 * Thuban/Model/xmlwriter.py: Replaced string replace function by
3127 corresponding string method.
3128
3129 2003-10-29 Bernhard Herzog <[email protected]>
3130
3131 * Thuban/UI/baserenderer.py
3132 (BaseRenderer.draw_shape_layer_incrementally): Speed up the
3133 special case of a classification that only has the default group
3134
3135 2003-10-27 Bernhard Herzog <[email protected]>
3136
3137 * po/fr.po, po/es.po: Updated translations from Daniel Calvelo
3138
3139 * po/de.po: Update.
3140
3141 * Thuban/UI/application.py
3142 (ThubanApplication.ShowExceptionDialog): Handle translation of the
3143 dialog message properly
3144
3145 2003-10-27 Bernhard Herzog <[email protected]>
3146
3147 Rework how localization works so that we use wx's translation
3148 functions when running Thuban as a normal application but not when
3149 we don't need any UI, such as in the test suite. See the comment
3150 in Thuban/__init__.py for details
3151
3152 * Thuban/__init__.py (_): Add one level of indirection to make the
3153 translation handling more flexible and to make it possible to use
3154 either wx's translation services or not.
3155 (gettext_identity, translation_function_installed)
3156 (install_translation_function): New function to help with this
3157
3158 * Thuban/UI/__init__.py: Install the wx specific translation
3159 function if it's OK to do that
3160
3161 * test/support.py (initthuban): Install a dummy translation
3162 function so that importing Thuban.UI doesn't install a wx specific
3163 one for which would need to import wxPython
3164
3165 2003-10-27 Bernhard Herzog <[email protected]>
3166
3167 * HOWTO-Release: Source archives should be created first and the
3168 binary packages should be created from the source archives.
3169 There's an official debian package now so there's no need to test
3170 the rpm on debian anymore
3171
3172 2003-10-27 Bernhard Herzog <[email protected]>
3173
3174 Several rendering changes:
3175
3176 - Render the selection into a separate bitmap so that only that
3177 bitmap needs to be redrawn when the selection changes
3178
3179 - Render incrementally showing previews and allowing interaction
3180 before rendering is complete
3181
3182 - Update the renderer interface a bit. Most parameters of
3183 RenderMap are now parameters of the constructor
3184
3185 * Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
3186 and the update region as parameters. Update the doc-string
3187 (BaseRenderer.render_map_incrementally): New. Generator function
3188 to renders the map incrementally
3189 (BaseRenderer.render_map): Remove the map argument (it's now in
3190 the constructor) and simply iterate over the
3191 render_map_incrementally generator to draw the map.
3192 (BaseRenderer.draw_shape_layer_incrementally)
3193 (BaseRenderer.draw_shape_layer): Renamed to
3194 draw_shape_layer_incrementally and changed into a generator that
3195 yields True every 500 shapes. Used by render_map_incrementally to
3196 render shape layers incrementally
3197
3198 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
3199 map and region parameters which are now in the constructor
3200 (ScreenRenderer.RenderMapIncrementally): New. Public frontend for
3201 the inherited render_map_incrementally.
3202 (BaseRenderer.draw_shape_layer): Removed.
3203 (ScreenRenderer.draw_selection_incrementally): New. The selection
3204 drawing part of the removed draw_shape_layer as a generator
3205 (ScreenRenderer.layer_shapes): Update because of the region
3206 parameter change
3207 (ExportRenderer.__init__): New. Extend the inherited constructor
3208 with the destination region for the drawing
3209 (ExportRenderer.RenderMap): Removed the map and region parameters
3210 which are now in the constructor
3211
3212 * Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
3213 bitmap suitable for a preview in a tool
3214 (CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
3215 bitmap
3216 (MapPrintout.draw_on_dc): Adapt to new renderer interface
3217 (MapCanvas.OnPaint): Handle drawing the selection bitmap if it
3218 exists
3219 (MapCanvas.OnIdle): Update the logic to deal with incremental
3220 rendering and the selection bitmap
3221 (MapCanvas._do_redraw): Handle the instantiation of the render
3222 iterator and the redraws during rendering
3223 (MapCanvas._render_iterator): New. Generator to incrementally
3224 redraw both bitmaps
3225 (MapCanvas.Export): Adapt to new renderer interface.
3226 (MapCanvas.full_redraw): Reset the selection bitmap and the
3227 renderer iterator too
3228 (MapCanvas.redraw_selection): New. Force a redraw of the selection
3229 bitmap
3230 (MapCanvas.shape_selected): Only redraw the selection bitmap
3231
3232 * test/test_baserenderer.py
3233 (TestBaseRenderer.test_polygon_no_projection)
3234 (TestBaseRenderer.test_raster_no_projection)
3235 (TestBaseRenderer.test_point_map_projection)
3236 (TestBaseRenderer.test_point_layer_and_map_projection)
3237 (TestBaseRenderer.test_point_layer_projection)
3238 (TestBaseRenderer.test_point_with_classification): Adapt to new
3239 renderer interface
3240
3241 2003-10-24 Bernhard Herzog <[email protected]>
3242
3243 * libraries/thuban/wxproj.cpp (draw_polygon_shape)
3244 (point_in_polygon_shape, shape_centroid): Raise an exception if
3245 the shape can't be read. Previously invalid shape ids would lead
3246 to a segfault.
3247
3248 * test/test_wxproj.py (TestShapeCentroid.test_invalid_shape_id):
3249 New. test whether an exception is raised for invalid shape ids
3250
3251 2003-10-24 Jan-Oliver Wagner <[email protected]>
3252
3253 * Thuban/Model/proj.py (Projection.GetProjectedUnits): Added 'longlat'
3254 as alias for 'latlong'.
3255
3256 * Thuban/UI/projdialog.py (ProjFrame.__init__): Added 'longlat'
3257 as alias for 'latlong'.
3258
3259 2003-10-24 Jan-Oliver Wagner <[email protected]>
3260
3261 * Thuban/UI/projdialog.py (ProjFrame.proj_selection_changed): Set
3262 the projection even for the UnknownPanel.
3263 (UnknownProjPanel.__init__): Define the text and create the textctrl
3264 widget.
3265 (UnknownProjPanel._DoLayout): Replaced static text widget by the
3266 textctrl created in __init__.
3267 (UnknownProjPanel.SetProjection): Set the text for the text ctrl
3268 including the parameters of the projection.
3269
3270 2003-10-24 Jan-Oliver Wagner <[email protected]>
3271
3272 * Resources/Projections/epsg.proj: New. This is a list of
3273 EPSG codes with parameters for proj. The list has been
3274 generated using devtools/create_epsg.py based on the
3275 file nad/epsg of the proj 4.4.7 package. Four projection
3276 definitions have been deleted as they are not accepted by proj:
3277 "CH1903+ / LV95", "Bern 1898 (Bern) / LV03C", "CH1903 / LV03"
3278 and "HD72 / EOV".
3279
3280 2003-10-22 Bernhard Herzog <[email protected]>
3281
3282 Some more tweaks to the projection dialog which should fix RT
3283 #1886.
3284
3285 * Thuban/UI/projlist.py (ProjectionList.Destroy): Unsubscribe from
3286 the ProjFile's messages and call the base class methods correctly
3287 (ProjectionList.SelectProjection): Set the wxLIST_STATE_FOCUSED
3288 flag on the newly selected item too. Otherwise some other item is
3289 focused and the first time the focus is moved with the keyboard
3290 the selection moves in unexpected ways.
3291
3292 * Thuban/UI/projdialog.py (ProjFrame.__init__): Do not set the
3293 focus on the OK button, only on the projection list. That way the
3294 list really has the focus initially
3295 (ProjFrame.OnClose): Call the projection list's Destroy method to
3296 make it unsubscribe all messages
3297
3298 2003-10-21 Bernhard Herzog <[email protected]>
3299
3300 Rework the projection dialog to fix a few bugs, including RT 2166
3301 and most of 2168
3302
3303 * Thuban/UI/projlist.py: New. The class ProjectionList is a
3304 special wxListCtrl to show a list of projections in a more MVC
3305 fashion
3306
3307 * Thuban/UI/projdialog.py (ProjFrame): Substantial changes
3308 throughout the class. The main change is to use the ProjectionList
3309 class instead of a normal wxListBox. Also, add an explicit
3310 "Unknown" projection to the projection choice control.
3311 (ProjPanel.__init__): Add an "unknown" ellipsoid
3312 (TMPanel.__init__, LCCPanel.__init__): Tweak the order of
3313 instantiation of the panel's controls to make the tab-order more
3314 natural
3315
3316 2003-10-21 Bernhard Herzog <[email protected]>
3317
3318 * test/test_load.py (TestSingleLayer.file_contents)
3319 (TestSingleLayer.test): Add non-ascii characters to the titles of
3320 session, map and layer. This is effectively a port of the
3321 TestUnicodeStrings test in test_load_0_8.py which for some reason
3322 was only added there.
3323
3324 * test/test_load_0_9.py (TestSingleLayer.file_contents)
3325 (TestSingleLayer.test): Same as in test_load.py: add non-ascii
3326 characters to the titles of session, map and layer,.
3327
3328 2003-10-21 Bernhard Herzog <[email protected]>
3329
3330 Add EPSG projection handling to .thuban files
3331
3332 * test/test_save.py (SaveSessionTest.dtd)
3333 (SaveSessionTest.testEmptySession)
3334 (SaveSessionTest.testLayerProjection)
3335 (SaveSessionTest.testRasterLayer)
3336 (SaveSessionTest.testClassifiedLayer)
3337 (SaveSessionTest.test_dbf_table)
3338 (SaveSessionTest.test_joined_table)
3339 (SaveSessionTest.test_save_postgis): Update to 1.0-dev namespace
3340 (SaveSessionTest.testSingleLayer): Update to 1.0-dev namespace and
3341 use a and epsg projection to test saving them
3342
3343 * test/test_load.py (LoadSessionTest.dtd): Update to 1.0-dev
3344 namespace
3345 (TestLayerVisibility.file_contents, TestLabels.file_contents)
3346 (TestLayerProjection.file_contents)
3347 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
3348 (TestPostGISLayer.file_contents)
3349 (TestPostGISLayerPassword.file_contents)
3350 (TestLoadError.file_contents, TestLoadError.test): Update to use
3351 1.0-dev namespace
3352 (TestSingleLayer.file_contents, TestSingleLayer.test): Update to
3353 use 1.0-dev namespace and use an EPSG projection to test whether
3354 loading it works
3355
3356 * test/test_load_0_9.py: New. Effectively a copy of test_load.py
3357 as of Thuban 0.9. These are now tests to determine whether Thuban
3358 can still read files generated by Thuban 0.9
3359
3360 * Thuban/Model/save.py (SessionSaver.write)
3361 (SessionSaver.write_session): Use the 1.0 dtd and 1.0-dev
3362 namespace
3363 (SessionSaver.write_projection): Write the projection's epsg
3364 attribute
3365
3366 * Thuban/Model/load.py (SessionLoader.__init__): Also accept the
3367 thuban-1.0-dev.dtd namespace
3368 (SessionLoader.check_attrs): Allow a callable object as conversion
3369 too
3370 (SessionLoader.start_projection, SessionLoader.end_projection)
3371 (SessionLoader.start_parameter): Handle the epsg attribute and
3372 rename a few instance variables to lower case
3373
3374 * Resources/XML/thuban-1.0.dtd: New. Only difference to
3375 thuban-0.9.dtd is the epsg attribute for projections.
3376
3377 2003-10-21 Bernhard Herzog <[email protected]>
3378
3379 * test/runtests.py (main): Let the user specify which tests to run
3380 on the command line
3381
3382 * test/support.py (ThubanTestResult.getDescription): Override to
3383 give a better short description. The description can be used as a
3384 parameter to run_tests to run that particular test in isolation.
3385
3386 2003-10-21 Frank Koormann <[email protected]>
3387
3388 Popup menu for legend. Scheduled for the 1.2 release this was too
3389 simple to implement: The popup menu is bound to the legend tree, while
3390 the events are hanlded by its anchestor, the legend panel. This
3391 allows reuse of all the event handlers already implemented for the
3392 legend toolbar buttons.
3393
3394 * Thuban/UI/legend.py (LegendPanel.__init__): EVT_MENU macros
3395 to add handlers for the events issued by the popup menu.
3396 (LegendPanel._OnToggleVisibility): Handler for toggling layer
3397 visibility event
3398 (LegendPanel._OnProjection): Handler for layer projection event.
3399 (LegendTree.__init__): Added EVT_TREE_ITEM_RIGHT_CLICK
3400 (LegendTree._OnRightClick): Event handler for right click, select item
3401 and pop up menu.
3402 (LegendTree.ToggleVisibility): Toggle layer visibility
3403 (LegendTree.LayerProjection): Raise layer projection dialog for
3404 current layer.
3405
3406 2003-10-21 Bernhard Herzog <[email protected]>
3407
3408 * Resources/Projections/defaults.proj: Use correct DOCTYPE
3409 declaration. The top-level element is projectionlist not projfile
3410
3411 2003-10-20 Bernhard Herzog <[email protected]>
3412
3413 * Thuban/UI/projdialog.py (ProjFrame.write_proj_file): New. helper
3414 method to write a projfile and display a busy cursor and error
3415 dialogs.
3416 (ProjFrame._OnSave, ProjFrame._OnAddToList, ProjFrame._OnImport)
3417 (ProjFrame._OnExport, ProjFrame._OnRemove): Use write_proj_file
3418 (ProjFrame.__FillAvailList): Translate "<None>" too and display a
3419 busy cursor while loading the user and system prj files.
3420
3421 2003-10-16 Bernhard Herzog <[email protected]>
3422
3423 * Thuban/Model/resource.py (projfile_cache): Introduce a cache for
3424 ProjFile objects
3425 (clear_proj_file_cache): New function to clear the cache. Mainly
3426 useful for use by the test suite
3427 (read_proj_file): Use the cache.
3428
3429 * test/test_proj.py (TestProjFile): Clarify the doc-string
3430 (ProjFileReadTests): Update doc-string
3431 (ProjFileReadTests.test_get_system_proj_file): Check whether the
3432 system proj files is cached.
3433 (ProjFileLoadTestCase): New base class for the proj file tests
3434 derived from support.FileLoadTestCase to provide some common
3435 behavior.
3436 (TestLoadingProjFile)
3437 (TestLoadingProjFileWithEmptyProjectionlist.file_contents)
3438 (TestProjFileWithInvalidParameters.file_contents): Derive from
3439 ProjFileLoadTestCase
3440 (TestLoadingProjFile.test_caching): New. Test whether the cache
3441 works
3442
3443 2003-10-16 Silke Reimer <[email protected]>
3444
3445 * debian/*: New directory with configuration files for building a thuban
3446 deb-package.
3447
3448 2003-10-14 Bernhard Herzog <[email protected]>
3449
3450 * test/test_proj.py: Execute support.run_tests when run as
3451 __main__ so that missing unsubscribes are detected
3452 (TestProjFile.tearDown): Destroy the proj_file properly
3453
3454 2003-10-14 Bernhard Herzog <[email protected]>
3455
3456 * Thuban/Model/messages.py (PROJECTION_ADDED)
3457 (PROJECTION_REPLACED, PROJECTION_REMOVED): New message types for
3458 the ProjFile objects
3459
3460 * Thuban/Model/proj.py (ProjFile): Derive from Publisher so we can
3461 easily send messages when the projections change
3462 (ProjFile.Add, ProjFile.Remove, ProjFile.Replace): Issue messages
3463 when the change was successful
3464
3465 * test/test_proj.py (TestProjFile.setUp): Subscribe to some of the
3466 proj file messages
3467 (TestProjFile.test_add_remove)
3468 (TestProjFile.test_remove_non_existing)
3469 (TestProjFile.test_replace)
3470 (TestProjFile.test_replace_non_existing): Test whether the right
3471 messages are sent
3472
3473 2003-10-14 Bernhard Herzog <[email protected]>
3474
3475 * test/test_proj.py (TestProjFile.test): Refactor into several
3476 tests
3477 (TestProjFile.test_add_remove)
3478 (TestProjFile.test_remove_non_existing)
3479 (TestProjFile.test_replace)
3480 (TestProjFile.test_replace_non_existing): Some of the new
3481 individual test cases
3482 (TestProjFileSimple): New class for the rest of the test cases
3483 that came out of the refactoring
3484 (ProjFileTest): Derive from xmlsupport.ValidationTest so that the
3485 derived classes don't have to
3486
3487 2003-10-13 Bernhard Herzog <[email protected]>
3488
3489 Add an optional EPSG code to the projection objects and extend the
3490 .proj file format accordingly.
3491
3492 * Resources/XML/projfile.dtd (element projection): Add epsg
3493 attribute
3494
3495 * Thuban/Model/proj.py (Projection.__init__): New parameter and
3496 instance variable epsg. Update doc-string
3497 (Projection.EPSGCode, Projection.Label): New methods to provide
3498 access to EPSG code and a label for use in dialogs
3499
3500 * Thuban/Model/resource.py (ProjFileReader.start_projection)
3501 (ProjFileReader.end_projection, ProjFileSaver.write_projfile):
3502 Handle the epsg code attribute when reading or writing proj files
3503
3504 * Thuban/UI/projdialog.py (ProjFrame._OnSave)
3505 (ProjFrame._OnAddToList, ProjFrame.__DoOnProjAvail)
3506 (ProjFrame.__FillAvailList): Use the projection's Label method to
3507 get the string for the list box
3508
3509 * test/test_proj.py (TestProjection.test_label)
3510 (TestProjection.test_label_epsg)
3511 (TestProjection.test_epsgcode_for_non_epsg_projection)
3512 (TestProjection.test_epsgcode_for_real_epsg_projection): New tests
3513 for the label and EPSGCode methods
3514 (WriteProjFileTests.doTestWrite, WriteProjFileTests.test_write)
3515 (WriteProjFileTests.test_write_empty_file): Create the ProjFile
3516 objects in the test cases and put the expected contents into the
3517 test case methods too. Update doTestWrite accordingly
3518 (TestLoadingProjFile)
3519 (TestLoadingProjFileWithEmptyProjectionlist): New classes with the
3520 read tests from TestProjFile.
3521 (TestProjFile.doTestRead, TestProjFile.testRead): Removed. These
3522 tests are now in the new classes.
3523 (sample_projfile, sample_projfile_data)
3524 (sample_projfile2, sample_projfile_data2): Removed. Not used
3525 anymore.
3526 (TestProjFile.test_read_unreadable_file): No need to reset the
3527 permissions at the end anymore since we use a unique filename
3528
3529 2003-10-13 Bernhard Herzog <[email protected]>
3530
3531 * test/test_proj.py: Some more refactoring of the test cases
3532 (ProjFileTest): New base class for the proj file tests.
3533 (TestProjFile): Derive from ProjFileTest
3534 (TestProjFile.test_read_unreadable_file)
3535 (TestProjFile.test_read_empty_file, TestProjFile.doTestRead): Use
3536 the new filename method to get a unique filename
3537 (TestProjFile.doTestWrite, TestProjFile.testWrite): Removed.
3538 (WriteProjFileTests): New class for proj file write tests.
3539 Contains the write test that were in TestProjFile originally.
3540
3541 2003-10-13 Bernhard Herzog <[email protected]>
3542
3543 * test/test_proj.py (TestProjFile.testRead)
3544 (TestProjFile.test_read_non_existing_file)
3545 (TestProjFile.test_read_unreadable_file)
3546 (TestProjFile.test_read_empty_file): Split into several methods.
3547
3548 2003-10-10 Bernhard Herzog <[email protected]>
3549
3550 * Thuban/UI/sizers.py: New file with custom sizers.
3551
3552 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): Instantiate
3553 all projection type specific panels and put them into a
3554 NotebookLikeSizer. This way the dialog doesn't change its size
3555 when a different projection is selected
3556 (ProjFrame.__init__): Rename projection_panels
3557 projection_panel_defs and reuse projection_panels for a list of
3558 the instantiated panels.
3559 (ProjFrame._show_proj_panel, ProjFrame.__DoOnProjAvail)
3560 (ProjFrame.__DoOnProjChoice): Changes due to the new handling of
3561 the panels
3562 (UnknownProjPanel._DoLayout): Place the newlines in the message
3563 differently to make the panel narrower.
3564 (TMPanel._DoLayout): Layout the parameters in one column.
3565
3566 2003-10-10 Bernhard Herzog <[email protected]>
3567
3568 * Thuban/UI/projdialog.py (ProjFrame.build_dialog): New method
3569 that contains all the setup for the dialog's widgets, layout and
3570 event handling.
3571 (__): Call build_dialog to build the dialog.
3572 (ProjFrame.__set_properties, ProjFrame.__do_layout): Removed.
3573 Their functionality is now in build_dialog
3574 (ProjFrame.__VerifyButtons, ProjFrame.__VerifyButtons)
3575 (ProjFrame.__DoOnProjAvail, ProjFrame.__DoOnProjAvail)
3576 (ProjFrame.__DoOnProjChoice): Small updates due to slightly
3577 different widget names and hierarchy introduced with build_dialog.
3578
3579 2003-10-10 Bernhard Herzog <[email protected]>
3580
3581 * README: Fix typo.
3582
3583 2003-10-09 Bernhard Herzog <[email protected]>
3584
3585 * Thuban/Model/proj.py (ProjFile.Add): Do not check whether the
3586 projection is already in the list. This is *a lot* faster when
3587 loading files with hundreds of projections since it saves a linear
3588 search. OTOH this will allow adding the same projection to the
3589 user.proj file multiple times in the projection dialog but we'll
3590 deal with that later
3591
3592 2003-10-09 Jan-Oliver Wagner <[email protected]>
3593
3594 * devtools: New. Directory for developer tools that are not intended
3595 for the regular user.
3596
3597 * devtools/create_epsg.py: New. Convert the epsg file of proj into
3598 a python .proj file.
3599
3600 2003-10-09 Bernhard Herzog <[email protected]>
3601
3602 * test/test_proj.py
3603 (TestProjection.test_get_parameter_without_equals_sign): New. Test
3604 whether GetParameter handles parameters without "=" sign correctly
3605
3606 * Thuban/Model/proj.py (Projection.GetParameter): Handle
3607 parameters that do not contain a "=". Update the doc-string
3608
3609 2003-10-08 Bernhard Herzog <[email protected]>
3610
3611 * Thuban/UI/projdialog.py (ProjFrame.__set_properties): Remove the
3612 length limit on the projname text control
3613
3614 2003-10-08 Bernhard Herzog <[email protected]>
3615
3616 * test/test_proj.py (TestProjection.test_get_projection_units_geo)
3617 (TestProjection.test_get_projection_units_normal): New. Tests for
3618 the Projection.GetProjectedUnits method
3619
3620 2003-10-08 Jan-Oliver Wagner <[email protected]>
3621
3622 * Thuban/Model/resource.py (get_user_proj_file): small bug-fix:
3623 Added missing 'val' parameter.
3624
3625 2003-10-08 Bernhard Herzog <[email protected]>
3626
3627 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): When the
3628 projection type of the currently selected projection is not known,
3629 i.e. there's no panel for it, use the UnknownProjPanel
3630 (ProjFrame.__DoOnProjChoice, ProjFrame._show_proj_panel): Split
3631 the actual replacing of the proj panel into the new method
3632 _show_proj_panel.
3633 (UnknownProjPanel): Add doc-string.
3634 (UnknownProjPanel._DoLayout): Insert a newline into the text so
3635 that the panel is not so wide.
3636
3637 2003-10-08 Bernhard Herzog <[email protected]>
3638
3639 * Thuban/Model/resource.py (read_proj_file): Return the warnings
3640 too. Update the doc-string
3641 (get_proj_files): Removed. It wasn't used anywhere
3642 (get_system_proj_files, get_system_proj_file): Rename to
3643 get_system_proj_file and return the ProjFile object and not a list
3644 of ProjFile objects. Update the callers.
3645 (get_user_proj_files, get_user_proj_file): Rename to
3646 get_user_proj_file return the ProjFile object and not a list of
3647 ProjFile objects. Update the callers.
3648 (ProjFileReader.__init__): New instance variable for the warnings.
3649 Rename the __pf ivar to projfile. Update the methods referring to
3650 __pf
3651 (ProjFileReader.end_projection): Catch any errors raised when
3652 instantiating the projection and record that as an error. The
3653 projection will not be in the final ProjFile object.
3654 (ProjFileReader.GetWarnings): New method to return the warnings.
3655
3656 * Thuban/UI/projdialog.py (ProjFrame.show_warnings): New method to
3657 show the warnings from the projfile reader
3658 (ProjFrame._OnImport): Deal with any warnings returned by
3659 read_proj_file
3660 (ProjFrame.__FillAvailList): Deal with any warnings returned by
3661 get_system_proj_file or get_user_proj_file.
3662
3663 * test/test_proj.py (TestProjFile.doTestRead): Check the warnings.
3664 (TestProjFileWithInvalidParameters.file_contents): New test cases
3665 to test whether read_proj_file handles invalid projection
3666 parameters correctly
3667 (TestProjFile.test_get_system_proj_file): New. Simple test for
3668 resource.get_system_proj_file
3669
3670 2003-10-07 Bernhard Herzog <[email protected]>
3671
3672 * test/test_derivedshapestore.py
3673 (TestDerivedShapeStoreExceptions.tearDown): Clear the session
3674 properly so that the temporary directories get deleted correctly
3675
3676 2003-10-06 Bernhard Herzog <[email protected]>
3677
3678 Handle the title changes in a proper MVC way.
3679
3680 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
3681 canvas' TITLE_CHANGED messages
3682 (MainWindow.update_title): New. Update the main window's title
3683 (MainWindow.__SetTitle): Removed. Use update_title instead.
3684 (MainWindow.SetMap): Use update_title instead of __SetTitle
3685 (MainWindow.RenameMap): Do change the window title explicitly
3686 here. That's handled in a proper MVC way now.
3687 (MainWindow.title_changed): New. Subscriber for the TITLE_CHANGED
3688 messages
3689
3690 * Thuban/Lib/connector.py (Conduit): New class to help classes
3691 that forward messages
3692
3693 * Thuban/UI/viewport.py: Forward the map's TITLE_CHANGED messages
3694 (ViewPort): Derive from Conduit instead of Publisher
3695 (ViewPort.Subscribe, ViewPort.Unsubscribe): Use the new base class
3696 when calling the inherited versions
3697 (ViewPort._subscribe_map, ViewPort._unsubscribe_map): New helper
3698 methods to subscribe and unsubscribe map messages
3699 (ViewPort.SetMap, ViewPort.Destroy): Use the new helper methods to
3700 handle the map subscriptions
3701 (ViewPort.Map, ViewPort.map_projection_changed)
3702 (ViewPort.layer_projection_changed): Add or update doc-strings
3703
3704 * test/test_connector.py (TestPublisher.test_issue_simple): Fix
3705 typo
3706 (MyConduit): Helper class for the Conduit test.
3707 (TestConduit): Test cases for Conduit
3708
3709 * test/test_connector.py: Use support.run_tests as main.
3710
3711 * test/test_viewport.py (ViewPortTest.setUp): Also subscribe to
3712 the TITLE_CHANGED messages
3713 (ViewPortTest.test_forwarding_title_changed): New test to check
3714 whether the viewport forwards the map's TITLE_CHANGED messages
3715 (TestViewportWithPostGIS.tearDown): Call the map's Destroy method
3716 after the port's because the latter may require a still functional
3717 map.
3718
3719 2003-10-06 Bernhard Herzog <[email protected]>
3720
3721 * Thuban/UI/application.py (ThubanApplication.maps_changed): Add
3722 doc-string
3723
3724 2003-10-06 Bernhard Herzog <[email protected]>
3725
3726 * test/test_viewport.py (ViewPortTest.setUp)
3727 (SimpleViewPortTest.test_init_with_size): Move the test for the
3728 initial size as a constructor parameter from ViewPortTest.setUp
3729 method to a new separate test in SimpleViewPortTest.
3730
3731 2003-10-06 Bernhard Herzog <[email protected]>
3732
3733 * test/test_viewport.py (MockView): New class derived from
3734 ViewPort with a mock implementation of GetTextExtent to be used in
3735 the test cases
3736 (ViewPortTest.setUp): Use MockView instead of ViewPort
3737
3738 * Thuban/UI/viewport.py (ViewPort.GetTextExtent): Turn this method
3739 into what would be a "pure virtual function" in C++: always raise
3740 NotImplementedError. Mock implementations for test cases don't
3741 belong into the real code
3742
3743 2003-10-02 Bernhard Herzog <[email protected]>
3744
3745 * test/test_layer.py (TestLayer.test_empty_layer): Explicitly
3746 close the dbf file we create so that it's contents have been
3747 written properly.
3748
3749 * libraries/shapelib/shptree.c, libraries/shapelib/shpopen.c,
3750 libraries/shapelib/shapefil.h, libraries/shapelib/dbfopen.c:
3751 Update to shapelib 1.2.10
3752
3753 2003-10-01 Jan-Oliver Wagner <[email protected]>
3754
3755 * Thuban/UI/tree.py, Thuban/UI/main.py: Remove the #! line as
3756 it annoys lintian which warns about these files not being
3757 executable. The #! isn't necessary here since if you absolutely
3758 must execute them you can always say "python <filename>".
3759
3760 2003-09-26 Bernhard Herzog <[email protected]>
3761
3762 * Thuban/Model/classgen.py (GenQuantiles0): Removed since it's
3763 only used in GREAT-ER but not used in Thuban itself. When GREAT-ER
3764 is ported to a newer the import will fail, so it should be noticed
3765 immediately that this function is gone.
3766 Fixes RT#1919
3767
3768 2003-09-26 Bernhard Herzog <[email protected]>
3769
3770 Add a DTD for the projection files and make thuban write valid
3771 projection files
3772
3773 * Resources/XML/projfile.dtd: New. DTD for thuban's projection
3774 files
3775
3776 * Thuban/Model/resource.py (ProjFileSaver.write): Use
3777 'projectionlist' as the name in the document type declaration so
3778 that it matches the element type of the root element.
3779
3780 * test/test_proj.py (sample_projfile, sample_projfile2): Use
3781 'projectionlist' as the name in the document type declaration just
3782 as it is done now in the files thuban would write
3783 (sample_projfile, sample_projfile_data): Fix spelling of
3784 "Mercator"
3785 (TestProjFile.doTestWrite): Validate the written and the expected
3786 XML data
3787 (TestProjFile): Derive from ValidationTest so that we can run xml
3788 validation tests
3789
3790 2003-09-24 Bernhard Herzog <[email protected]>
3791
3792 * Thuban/UI/renderer.py (ExportRenderer.render_legend): Do not
3793 modify the list returned by map.Layers() in place since it is the
3794 actual list of layers used by the map.
3795
3796 2003-09-23 Jan-Oliver Wagner <[email protected]>
3797
3798 * Doc/manual/thuban-manual.xml: Added subsection to chapter
3799 Extensions to describe the extensions coming with the Thuban
3800 standard package (gns2shp and importAPR).
3801
3802 2003-09-23 Bernhard Herzog <[email protected]>
3803
3804 * libraries/thuban/wxproj.cpp (project_point): if there's an
3805 inverse but no forward projection, convert to degrees after
3806 applying the inverse projection. Fixes RT#2096
3807
3808 * test/test_wxproj.py: New. Test cases for wxproj.so. One test
3809 implicitly tests for the fix to RT#2096
3810
3811 * test/support.py (FloatComparisonMixin.assertFloatSeqEqual):
3812 Check that the sequences have the same lengths
3813
3814 * Resources/Projections/defaults.proj (Geographic projection): Use
3815 a much more precise value for the to_meter attribute.
3816
3817 2003-09-22 Bernhard Herzog <[email protected]>
3818
3819 * test/support.py (initthuban): Make sure to unset the LANG env.
3820 var. so that tests that compare translated strings work. Solves RT
3821 #2094
3822
3823 2003-09-22 Jan-Oliver Wagner <[email protected]>
3824
3825 Small improvement of APR import.
3826
3827 * Extensions/importAPR/test/test_apr.py (aprTest.test_LClass):
3828 Added tests for text-ranges.
3829
3830 * Extensions/importAPR/apr.py (APR_LClass.GetThubanRange): Now
3831 returns a string object if the range is based on text.
3832
3833 * Extensions/importAPR/importAPR.py (import_apr_dialog): Unified
3834 range retrieval.
3835
3836 2003-09-22 Jan-Oliver Wagner <[email protected]>
3837
3838 Initial version of the importAPR extension which is in
3839 experimental state.
3840
3841 * /Extensions/importAPR/, /Extensions/importAPR/samples/,
3842 /Extensions/importAPR/test/: New directories.
3843
3844 * /Extensions/importAPR/samples/README: New: Howto load the samples.
3845
3846 * /Extensions/importAPR/samples/iceland.apr: New: A sample APR
3847 file which refers to the Thuban Iceland demo data.
3848
3849 * /Extensions/importAPR/test/README: New: Howto execute the tests.
3850
3851 * /Extensions/importAPR/test/test_apr.py: New: Tests for APR classes.
3852
3853 * /Extensions/importAPR/apr.py: New: Classes for ArcView Objects
3854 as in '.apr'-files.
3855
3856 * /Extensions/importAPR/odb.py: New: Classes for generic ArcView
3857 ODB Objects as in '.apr', '.avl' and other files.
3858
3859 * /Extensions/importAPR/__init__.py: New: Init to make this
3860 directory a package.
3861
3862 * /Extensions/importAPR/importAPR.py: New: Import a ArcView
3863 project file (.apr) and convert it to Thuban.
3864
3865 2003-09-22 Jan-Oliver Wagner <[email protected]>
3866
3867 * Extensions/gns2shp.gns2shp.py: The main module of gns2shp.
3868
3869 2003-09-19 Jan-Oliver Wagner <[email protected]>
3870
3871 * Doc/manual/thuban-manual.xml: Extended section 'Installation'
3872 with description on RPM installation and RPM binary package
3873 creation.
3874
3875 2003-09-18 Bernhard Herzog <[email protected]>
3876
3877 * setup.py (data_files): Only add the mo files if the Locales
3878 directory actually exists, so that setup.py works with a fresh CVS
3879 checkout
3880
3881 2003-09-12 Jan-Oliver Wagner <[email protected]>
3882
3883 * Examples/simple_extensions/simple_tool.py: bugfix: Tool is now
3884 in viewport, not anymore in view
3885
3886 2003-09-04 Jan-Oliver Wagner <[email protected]>
3887
3888 Introducing first Extension (gns2shp).
3889
3890 * Extensions, Extensions/gns2shp, Extensions/gns2shp/test: New.
3891
3892 * Extensions/__init__.py: New. init to make this dir a package.
3893
3894 * Extensions/gns2shp/__init__.py: New. init to make this dir a package.
3895
3896 * Extensions/gns2shp/test/README: New. some info on this test directory.
3897
3898 * Extensions/gns2shp/test/ls.txt: New. test data set (Liechtenstein).
3899
3900 * Extensions/gns2shp/test/test_gns2shp.py: New. Test for correct creation
3901 of Shapefile from GNS text file format
3902
3903 2003-09-03 Jan-Oliver Wagner <[email protected]>
3904
3905 Fix/workaround for bug #2019:
3906 https://intevation.de/rt/webrt?serial_num=2019
3907
3908 * Thuban/UI/identifyview.py (IdentifyView.ID_STOP): New.
3909 (IdentifyView.__init__): Added another button that allows to
3910 stop the identify mode.
3911 (IdentifyView.OnStop): New. Stops the identify mode.
3912
3913 2003-09-03 Jan-Oliver Wagner <[email protected]>
3914
3915 Introducing a new exception dialog that allows to exit the
3916 application immediately.
3917 This fixes bug #2060: https://intevation.de/rt/webrt?serial_num=2060
3918
3919 * Thuban/UI/exceptiondialog.py: New. A special exception dialog.
3920
3921 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
3922 Made strings available to translations. Exchanged the simple
3923 ScrolledMessageDialog by the new ExceptionDialog.
3924
3925 2003-09-01 Bernhard Herzog <[email protected]>
3926
3927 * NEWS: New. Summary of changes and release notes.
3928
3929 * MANIFEST.in: Add NEWS
3930
3931 2003-09-01 Bernhard Herzog <[email protected]>
3932
3933 * MANIFEST.in: Correct the include statement for the mo-files and
3934 include the documentation too.
3935
3936 * setup.py (data_files): Add the .mo files
3937 (setup call): Up to version 0.9.0
3938
3939 2003-09-01 Bernhard Herzog <[email protected]>
3940
3941 * Thuban/UI/dbdialog.py (ChooseDBTableDialog.__init__): Change the
3942 parameter list to just parent and session
3943 (ChooseDBTableDialog.__set_properties): Removed. Setting the
3944 selection of empty list boxes is not allowed (and produces C++
3945 assertion errors) and the rest of the setup is better done in
3946 __init__ anyway.
3947 (ChooseDBTableDialog.OnCancel, ChooseDBTableDialog.OnOK)
3948 (ChooseDBTableDialog.OnLBDClick, DBDialog.OnOK): Use the Python
3949 builtins True/False for booleans to avoid warnings from wxPython
3950
3951 * Thuban/UI/mainwindow.py (MainWindow.AddDBLayer): Adapt to new
3952 ChooseDBTableDialog constructor parameters.
3953
3954 2003-09-01 Bernhard Herzog <[email protected]>
3955
3956 * Thuban/Model/postgisdb.py
3957 (PostGISTable): Extend doc-string
3958 (PostGISTable._fetch_table_information): Set the column index
3959 correctly, pretending ignored columns don't exist.
3960
3961 * test/test_postgis_db.py (TestPostGISIgnoredColumns): New tests
3962 for postgis tables with data types not yet supported by thuban.
3963
3964 2003-08-29 Bernhard Herzog <[email protected]>
3965
3966 * HOWTO-Release: Tweak item about running the tests.
3967
3968 2003-08-29 Jan-Oliver Wagner <[email protected]>
3969
3970 * /Doc/manual/thuban-manual.xml: updated to version 1.0pre2.
3971
3972 2003-08-29 Bernhard Herzog <[email protected]>
3973
3974 Add some missing parameters to projections. Proj complains about
3975 them on windows but for some reason not on Linux.
3976
3977 * test/test_save.py (SaveSessionTest.testLayerProjection): Add
3978 missing required projection parameters
3979
3980 * test/test_proj.py (TestProjFile.test): Add missing required
3981 projection parameters
3982
3983 * test/test_load_0_8.py (TestLayerProjection.file_contents)
3984 (TestLayerProjection.test): Add missing required projection
3985 parameters and tests for them
3986
3987 * test/test_load.py (TestLayerProjection.file_contents)
3988 (TestLayerProjection.test): Add missing required projection
3989 parameters and tests for them
3990
3991 * test/test_layer.py (TestLayer.test_base_layer): Add missing
3992 required projection parameters
3993
3994 2003-08-29 Bernhard Herzog <[email protected]>
3995
3996 * libraries/pyprojection/Projection.i: Use pj_get_errno_ref to
3997 access the pj_errno because directly accessing pj_errno doesn't
3998 work on windows if the proj library is in a DLL
3999
4000 * libraries/pyprojection/Projection_wrap.c: Update from Projection.i
4001
4002 2003-08-28 Bernhard Herzog <[email protected]>
4003
4004 * test/test_proj.py: Import things from Thuban after calling
4005 initthuban
4006
4007 * test/test_load.py (LoadSessionTest.filenames): New class
4008 variable with the filename attributes to normalize
4009 (LoadSessionTest.check_format): Pass self.filenames to
4010 sax_eventlist to normalize the filename attributes
4011
4012 * test/xmlsupport.py: Add cvs keywords
4013 (SaxEventLister.__init__): New parameter filenames which indicates
4014 attributes that contain filenames
4015 (SaxEventLister.startElementNS): Normalize the filename attributes
4016 with os.path.normpath
4017 (sax_eventlist): New parameter filenames to pass through to
4018 SaxEventLister
4019
4020 * test/test_derivedshapestore.py: Make this file callable as a
4021 program to execute the tests
4022 (TestDerivedShapeStoreExceptions.test_table_with_wrong_size): Bind
4023 the session to self.session so that it gets destroyed properly
4024
4025 * test/test_layer.py (TestLayer.tearDown): Call the session's
4026 Destroy method
4027
4028 * test/test_map.py (TestMapBase.tearDown): Destroy self.session
4029 too if it exists
4030 (TestMapAddLayer.test_add_layer): Bind the session to self.session
4031 so that it gets destroyed properly
4032
4033 * test/postgissupport.py (reason_for_not_running_tests): Add a
4034 test for the existence of popen2.Popen4.
4035
4036 * test/test_save.py (SaveSessionTest.tearDown): New. Provide a
4037 reliable way to destroy the sessions created in the test cases
4038 (SaveSessionTest.test_dbf_table): Bind the session to self.session
4039 so that it gets destroyed properly
4040 (SaveSessionTest.testLayerProjection): Bind the session to
4041 self.session so that it gets destroyed properly
4042
4043 * test/test_session.py (UnreferencedTablesTests.tearDown): Make
4044 sure that the session is destroyed properly
4045
4046 * test/test_shapefilestore.py: Make this callable as a program to
4047 execute the tests
4048
4049 * test/test_scalebar.py: Remove unnecessary import of _ from
4050 Thuban
4051
4052 * test/support.py (print_garbage_information): Call initthuban
4053 here because it may be called indirectly from test cases that test
4054 test support modules which do not use anything from thuban itself
4055 (ThubanTestProgram.runTests): Remove unnecessary debug print
4056
4057 2003-08-28 Bernhard Herzog <[email protected]>
4058
4059 * Thuban/version.py (longversion): Update to 0.9
4060
4061 * Thuban/UI/mainwindow.py: Remove some unused imports
4062
4063 * README: Add section about required additional software. Add date
4064 and revision CVS keywords
4065
4066 * HOWTO-Release: Add item about the translations. Add date and
4067 revision CVs keywords and change formatting to match README a bit
4068 better
4069
4070 * po/de.po: Update for 0.9
4071
4072 * test/README: Tweak the wording a little because many tests are
4073 not really unittest.
4074
4075 2003-08-27 Bernhard Herzog <[email protected]>
4076
4077 As preparation for the 0.9 release, switch thuban files to a
4078 non-dev namespace
4079
4080 * Thuban/Model/save.py (SessionSaver.write_session): Write files
4081 with the http://thuban.intevation.org/dtds/thuban-0.9.dtd
4082 namespace
4083
4084 * Thuban/Model/load.py (SessionLoader.__init__): Accept the
4085 http://thuban.intevation.org/dtds/thuban-0.9.dtd namespace too
4086
4087 * test/test_save.py (SaveSessionTest.dtd)
4088 (SaveSessionTest.testEmptySession)
4089 (SaveSessionTest.testSingleLayer)
4090 (SaveSessionTest.testLayerProjection)
4091 (SaveSessionTest.testRasterLayer)
4092 (SaveSessionTest.testClassifiedLayer)
4093 (SaveSessionTest.test_dbf_table)
4094 (SaveSessionTest.test_joined_table)
4095 (SaveSessionTest.test_save_postgis): Update for new namespace
4096
4097 * test/test_load.py (LoadSessionTest.dtd, TestSingleLayer)
4098 (TestLayerVisibility.file_contents, TestLabels.file_contents)
4099 (TestLayerProjection.file_contents)
4100 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
4101 (TestPostGISLayer.file_contents)
4102 (TestPostGISLayerPassword.file_contents)
4103 (TestLoadError.file_contents, TestLoadError.test): Update for new
4104 namespace
4105
4106 2003-08-27 Bernhard Herzog <[email protected]>
4107
4108 Make the table interface distinguish between row ids (an integer
4109 that uniquely identifies a row) and row ordinals (a simple row
4110 count from 0 to NumRows() - 1)
4111
4112 * Thuban/Model/postgisdb.py (PostGISTable.RowIdToOrdinal)
4113 (PostGISTable.RowOrdinalToId): New methods to conver between row
4114 ids and row ordinals
4115 (PostGISTable.ReadRowAsDict, PostGISTable.ReadValue): New keyword
4116 parameter row_is_ordinal to indicate whether the row parameter is
4117 the row id or the ordinal
4118
4119 * Thuban/Model/transientdb.py (TransientTableBase.RowIdToOrdinal)
4120 (TransientTableBase.RowOrdinalToId)
4121 (AutoTransientTable.RowIdToOrdinal)
4122 (AutoTransientTable.RowOrdinalToId): Same new methods as in
4123 PostGISTable.
4124 (TransientTableBase.ReadRowAsDict, TransientTableBase.ReadValue)
4125 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ReadValue):
4126 Same new parameter as in PostGISTable.
4127
4128 * Thuban/Model/table.py (DBFTable.RowIdToOrdinal)
4129 (DBFTable.RowOrdinalToId, MemoryTable.RowIdToOrdinal)
4130 (MemoryTable.RowOrdinalToId): Same new methods as in PostGISTable.
4131 (DBFTable.ReadValue, DBFTable.ReadRowAsDict)
4132 (MemoryTable.ReadValue, MemoryTable.ReadRowAsDict): Same new
4133 parameter as in PostGISTable.
4134
4135 * Thuban/UI/tableview.py (DataTable.RowIdToOrdinal)
4136 (DataTable.RowOrdinalToId): New methods to convert between row ids
4137 and row ordinals.
4138 (TableGrid.SelectRowById): New method to select a row based on its
4139 ID as opposed to its ordinal
4140 (DataTable.GetValue, TableGrid.OnRangeSelect)
4141 (TableGrid.OnSelectCell, LayerTableGrid.select_shapes)
4142 (QueryTableFrame.OnQuery, QueryTableFrame.get_selected)
4143 (LayerTableFrame.__init__): Convert between row ids and row
4144 ordinals as appropriate
4145
4146 * test/postgissupport.py (PostGISDatabase.__init__): Add
4147 doc-string.
4148 (PostGISDatabase.initdb): The optional third item in a tuple in
4149 tables is now a (key, value) list with additional arguments to
4150 pass to upload_shapefile
4151 (upload_shapefile): New parameter gid_offset to allow gids that
4152 are not the same as the shapeids in the shapefile
4153 (PostgreSQLServer.get_default_static_data_db): Use the new
4154 gid_offset to make the gids in landmarks 1000 higher than the
4155 shapeids in the shapefile
4156
4157 * test/test_viewport.py
4158 (TestViewportWithPostGIS.test_find_shape_at_point): Adapt to the
4159 new shapeids in the landmarks table
4160
4161 * test/test_transientdb.py
4162 (TestTransientTable.run_iceland_political_tests)
4163 (TestTransientTable.test_transient_joined_table): Add tests for
4164 the new table methods and new keywords arguments.
4165
4166 * test/test_postgis_db.py
4167 (TestPostGISTable.test_read_row_as_dict_row_count_mode)
4168 (TestPostGISTable.test_read_value_row_count_mode)
4169 (TestPostGISTable.test_row_id_to_ordinal)
4170 (TestPostGISTable.test_row_oridnal_to_id): New test for the new
4171 table methods and the new arguments
4172 (TestPostGISShapestorePoint.test_shapes_in_region)
4173 (TestPostGISShapestorePoint.test_shape_raw_data)
4174 (TestPostGISShapestorePoint.test_shape_points)
4175 (TestPostGISShapestorePoint.test_shape_shapeid)
4176 (TestPostGISShapestorePoint.test_all_shapes)
4177 (TestPostGISTable.test_simple_query)
4178 (TestPostGISTable.test_simple_query)
4179 (TestPostGISTable.test_simple_query)
4180 (TestPostGISTable.test_read_value)
4181 (TestPostGISTable.test_read_row_as_dict): Adapt to the new
4182 shapeids in the landmarks table
4183
4184 * test/test_memory_table.py
4185 (TestMemoryTable.test_read_row_as_dict_row_count_mode)
4186 (TestMemoryTable.test_read_value_row_count_mode)
4187 (TestMemoryTable.test_row_id_to_ordinal)
4188 (TestMemoryTable.test_row_oridnal_to_id): New test for the new
4189 table methods and the new arguments
4190
4191 * test/test_dbf_table.py
4192 (TestDBFTable.test_read_row_as_dict_row_count_mode)
4193 (TestDBFTable.test_read_value_row_count_mode)
4194 (TestDBFTable.test_row_id_to_ordinal)
4195 (TestDBFTable.test_row_oridnal_to_id): New test for the new table
4196 methods and the new arguments
4197
4198 2003-08-26 Bernhard Herzog <[email protected]>
4199
4200 * Thuban/Model/postgisdb.py (PostGISShapeStore.BoundingBox): Use a
4201 more postgis specific but much faster method to get the bounding
4202 box
4203
4204 2003-08-26 Bernhard Herzog <[email protected]>
4205
4206 * Thuban/Model/postgisdb.py (PostGISTable.Title)
4207 (PostGISShapeStore.AllShapes): Add these missing methods.
4208 (PostGISShapeStore.ShapesInRegion): No need to raise
4209 StopIteration. We can simply return
4210
4211 * test/test_postgis_db.py (TestPostGISTable.test_title)
4212 (TestPostGISShapestorePoint.test_all_shapes): New tests for the
4213 new methods
4214
4215 2003-08-25 Bernhard Herzog <[email protected]>
4216
4217 * Thuban/Model/postgisdb.py (shapetype_map): Add MUTLIPOLYGON.
4218
4219 * test/test_postgis_db.py (PolygonTests): New class containing
4220 those tests from TestPostGISShapestorePolygon that can also be
4221 used to test MUTLIPOLYGON tables
4222 (TestPostGISShapestorePolygon): Most tests are now in PolygonTests
4223 so derive from that
4224 (TestPostGISShapestoreMultiPolygon): New class with tests for
4225 MUTLIPOLYGON tables
4226
4227 * test/postgissupport.py (PostGISDatabase.initdb): Allow the
4228 tables argument to have tuples with three items to override the
4229 WKT type used.
4230 (PostgreSQLServer.get_default_static_data_db): Use the above to
4231 create a polygon table with MUTLIPOLYGONs
4232 (point_to_wkt, coords_to_point, polygon_to_wkt, coords_to_polygon)
4233 (arc_to_wkt, coords_to_multilinestring): Rename from *_to_wkt to
4234 coords_to*
4235 (coords_to_multipolygon): New. Convert to MUTLIPOLYGON
4236 (wkt_converter): New. Map WKT types to converters
4237 (upload_shapefile): New parameter force_wkt_type to use a
4238 different WKT type than the default
4239
4240 2003-08-25 Bernhard Herzog <[email protected]>
4241
4242 * Thuban/UI/application.py
4243 (ThubanApplication.run_db_param_dialog): New. Suitable as a
4244 db_connection_callback. Main difference is that the dialog run
4245 from this method doesn't have a parent so it can be used even when
4246 there is no main window
4247 (ThubanApplication.OpenSession): Use self.run_db_param_dialog if
4248 no db_connection_callback was given. This way the dialog pops up
4249 even when the .thuban file was given as a command line parameter.
4250
4251 2003-08-25 Bernhard Herzog <[email protected]>
4252
4253 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Release the the mouse
4254 before calling MouseLeftUp. MouseLeftUp may pop up modal dialogs
4255 which leads to an effectively frozen X session because the user
4256 can only interact with the dialog but the mouse is still grabbed
4257 by the canvas.
4258 Also, call the tool's Hide method before MouseLeftUp because
4259 MouseLeftUp may change the tool's coordinates.
4260
4261 2003-08-25 Bernhard Herzog <[email protected]>
4262
4263 * Thuban/UI/application.py (ThubanApplication.OpenSession): Catch
4264 LoadCancelled exceptions and handle them by returning immediately.
4265
4266 2003-08-25 Bernhard Herzog <[email protected]>
4267
4268 GUI part of loading sessions with postgis connections which may
4269 require user interaction to get passwords or updated parameters
4270
4271 * Thuban/UI/dbdialog.py (DBDialog): Reimplement to make it look a
4272 bit nucer and be more generic.
4273 (DBFrame.OnAdd): Adapt to new DBDialog interface
4274
4275 * Thuban/UI/application.py (ThubanApplication.OpenSession): New
4276 optional parameter db_connection_callback which is passed to
4277 load_session.
4278
4279 * Thuban/UI/mainwindow.py (MainWindow.run_db_param_dialog): New.
4280 Suitable as a db_connection_callback
4281 (MainWindow.OpenSession): Use self.run_db_param_dialog as the
4282 db_connection_callback of the application's OpenSession method
4283
4284
4285 2003-08-25 Bernhard Herzog <[email protected]>
4286
4287 Basic loading of sessions containing postgis connections:
4288
4289 * Thuban/Model/load.py (LoadError): Add doc-string
4290 (LoadCancelled): New exception class to indicate a cancelled load
4291 (SessionLoader.__init__): Add the db_connection_callback parameter
4292 which will be used by the loader to get updated parameters and a
4293 password for a database connection
4294 (SessionLoader.__init__): Add the new XML elements to the
4295 dispatchers dictionary
4296 (SessionLoader.check_attrs): Two new conversions, ascii to convert
4297 to a byte-string object and idref as a generic id reference
4298 (SessionLoader.start_dbconnection)
4299 (SessionLoader.start_dbshapesource): New. Handlers for the new XML
4300 elements
4301 (load_session): Add the db_connection_callback to pass through the
4302 SessionLoader
4303
4304 * test/test_load.py (TestPostGISLayer, TestPostGISLayerPassword):
4305 New classes to test loading of sessions with postgis database
4306 connections.
4307
4308 2003-08-25 Bernhard Herzog <[email protected]>
4309
4310 * Thuban/UI/mainwindow.py (__ThubanVersion__): Remove this and
4311 replace it and the comment with __BuildDate__ by the Source: and
4312 Id: cvs keywords as used in the other files.
4313
4314 2003-08-25 Bernhard Herzog <[email protected]>
4315
4316 * Thuban/Model/load.py (SessionLoader.check_attrs): Raise a
4317 LoadError when a required attribute is missing. The code used to
4318 be commented out for some reason, but probably should have been
4319 active.
4320
4321 * test/test_load.py (TestLoadError.test): Test the message in the
4322 LoadError too to make sure it really is about the missing
4323 attribute
4324
4325 2003-08-22 Bernhard Herzog <[email protected]>
4326
4327 * test/test_save.py (SaveSessionTest.test_dbf_table)
4328 (SaveSessionTest.test_joined_table): Add XML validation tests.
4329
4330 2003-08-22 Bernhard Herzog <[email protected]>
4331
4332 Implement saving a session with a postgis connection
4333
4334 * Resources/XML/thuban-0.9.dtd (dbconnection, dbshapesource) New
4335 elements for database connections and shapestores using db
4336 connections
4337 (session): Add the dbconnections to the content model
4338
4339 * Thuban/Model/save.py (SessionSaver.write_db_connections): New.
4340 Write the db connections
4341 (SessionSaver.write_session): Call write_db_connections to write
4342 the connection before the data sources
4343 (SessionSaver.write_data_containers): Handle postgis shapestores
4344
4345 * test/test_save.py (SaveSessionTest.thubanids)
4346 (SaveSessionTest.thubanidrefs): Update for new DTD
4347 (SaveSessionTest.test_save_postgis): New. Test saving a session
4348 with postgis connections
4349
4350 * Thuban/Model/postgisdb.py (PostGISTable.DBConnection)
4351 (PostGISTable.TableName): New accessor methods for the connection
4352 and table name
4353
4354 * test/test_postgis_db.py (TestPostGISTable.test_dbconn)
4355 (TestPostGISTable.test_dbname): New methods to test the new
4356 PostGISConnection methods
4357
4358 2003-08-22 Bernhard Herzog <[email protected]>
4359
4360 * Thuban/Model/postgisdb.py (ConnectionError): New exception class
4361 for exceptions occurring when establishing a Database connection
4362 (PostGISConnection.connect): Catch psycopg.OperationalError during
4363 connects and raise ConnectionError.
4364
4365 * test/test_postgis_db.py (TestPostgisDBExceptions): New class for
4366 tests for database exceptions
4367
4368 2003-08-22 Bernhard Herzog <[email protected]>
4369
4370 Prepare the test suite for tests with required authentication
4371
4372 * test/postgissupport.py (PostgreSQLServer.__init__): Add instance
4373 variables with two predefined users/passwords, one for the admin
4374 and one for a non-privileged user.
4375 (PostgreSQLServer.createdb): Pass the admin name to initdb and add
4376 the non-privileged user to the database and set the admin password
4377 (PostgreSQLServer.wait_for_postmaster): Use the admin user name.
4378 Better error reporting
4379 (PostgreSQLServer.connection_params)
4380 (PostgreSQLServer.connection_string): New methods to return
4381 information about how to connect to the server
4382 (PostgreSQLServer.execute_sql): New. Convenience method to execute
4383 SQL statements
4384 (PostgreSQLServer.require_authentication): Toggle whether the
4385 server requires authentication
4386 (PostgreSQLServer.create_user, PostgreSQLServer.alter_user): New.
4387 Add or alter users
4388 (PostGISDatabase.initdb): Pass the admin name one the
4389 subprocesses' command lines. Grant select rights on
4390 geometry_columns to everybody.
4391 (upload_shapefile): Use the admin name and password when
4392 connecting. Grant select rights on the new table to everybody.
4393
4394 * test/test_viewport.py (TestViewportWithPostGIS.setUp): Use the
4395 server's new methods to get the connection parameters.
4396
4397 * test/test_postgis_session.py (TestSessionWithPostGIS.setUp)
4398 (TestSessionWithPostGIS.test_remove_dbconn_exception): Use the
4399 server's new methods to get the connection parameters.
4400
4401 * test/test_postgis_db.py
4402 (TestPostGISConnection.test_gis_tables_empty)
4403 (TestPostGISConnection.test_gis_tables_non_empty)
4404 (PostGISStaticTests.setUp): Use the server's new methods to get
4405 the connection parameters.
4406
4407 2003-08-22 Bernhard Herzog <[email protected]>
4408
4409 * Thuban/UI/about.py (About.__init__): Add the psycopg version.
4410
4411 * Thuban/version.py: Add psycopg version
4412
4413 * Thuban/Model/postgisdb.py (psycopg_version): New. Return the
4414 version of the psycopg module
4415
4416 2003-08-22 Bernhard Herzog <[email protected]>
4417
4418 * Thuban/UI/dbdialog.py (DBPwdDlg): Removed because it's not used.
4419 (DBFrame.OnEdit): Removed because it's not used and wouldn't work
4420 at the moment. The functionality should probably be implemented
4421 some time, though.
4422 (DBFrame.OnRemove): Display a message if the connection can't be
4423 removed because it's still in use.
4424
4425 2003-08-22 Jan-Oliver Wagner <[email protected]>
4426
4427 * Thuban/UI/about.py (About.__init__): split up the huge about
4428 text into elements/lists for easier translation. This fixes bug
4429 https://intevation.de/rt/webrt?serial_num=2058
4430 Also, made some forgotten string available for the i18n.
4431
4432 2003-08-21 Bernhard Herzog <[email protected]>
4433
4434 Make postgis support really optional including insensitive menu
4435 items.
4436
4437 * Thuban/Model/postgisdb.py (has_postgis_support): New. Return
4438 whether the postgis is supported.
4439
4440 * Thuban/UI/dbdialog.py: Put the psycopg import into try..except
4441 to make postgis support optional
4442
4443 * Thuban/UI/mainwindow.py (_has_postgis_support): New. Context
4444 version of Thuban.Model.postgisdb.has_postgis_support
4445 (database_management command): Make it only sensitive if postgis
4446 is supported.
4447
4448 2003-08-21 Jan-Oliver Wagner <[email protected]>
4449
4450 * Doc/manual/thuban-manual.xml: Added CVS revision for rev-history.
4451 (section Adding and Removing Layers): Added text and described
4452 multi-selection.
4453 (chapter Extensions): New.
4454
4455 2003-08-21 Jan-Oliver Wagner <[email protected]>
4456
4457 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Changed dialog
4458 settings to allow multiple files to load into the map.
4459 Also reduced selection to *.shp as a default.
4460
4461 2003-08-20 Bernhard Herzog <[email protected]>
4462
4463 Add dialogs and commands to open database connections and add
4464 database layers.
4465
4466 * Thuban/UI/mainwindow.py (MainWindow.DatabaseManagement): New
4467 method to open the database connection management dialog
4468 (MainWindow.AddDBLayer): New method to add a layer from a database
4469 (_has_dbconnections): New helper function to use for sensitivity
4470 (database_management command, layer_add_db command): New commands
4471 that call the above new methods.
4472 (main_menu): Add the new commands to the menu.
4473
4474 * Thuban/Model/postgisdb.py (PostGISConnection.__init__)
4475 (PostGISConnection.connect): Establish the actual connection in a
4476 separate method and call it in __init__. This makes it easier to
4477 override the behavior in test cases
4478 (PostGISConnection.BriefDescription): New method to return a brief
4479 description for use in dialogs.
4480
4481 * test/test_postgis_db.py (NonConnection): DB connection that
4482 doesn't actually connect
4483 (TestBriefDescription): New class with tests for the new
4484 BriefDescription method
4485
4486 2003-08-19 Jan-Oliver Wagner <[email protected]>
4487
4488 Moved anything from extensions to libraries.
4489
4490 * libraries: New.
4491
4492 * libraries/ pyprojection, pyshapelib, shapelib, thuban: New.
4493
4494 * libraries/pyprojection/ LICENSE, MANIFEST.in, Projection.i,
4495 Projection.py, Projection_wrap.c, setup.py, swighelp.txt: These files have
4496 been moved here from thuban/extensions/pyprojection/
4497 See there in the Attic for the older history.
4498
4499 * libraries/pyshapelib/ COPYING, ChangeLog, NEWS, README, dbflib.i,
4500 dbflib.py, dbflib_wrap.c, pyshapelib_api.h, pytest.py, setup.py,
4501 shapelib.i, shapelib.py, shapelib_wrap.c, shptreemodule.c: These files
4502 have been moved here from thuban/extensions/pyshapelib/
4503 See there in the Attic for the older history.
4504
4505 * libraries/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c: These
4506 files have been moved here from thuban/extensions/shapelib/
4507 See there in the Attic for the older history.
4508
4509 * libraries/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
4510 gdalwarp.cpp, wxproj.cpp: These files have been moved here from
4511 thuban/extensions/thuban/
4512 See there in the Attic for the older history.
4513
4514 * MANIFEST.in, setup.cfg, setup.py: renamed extensions to libraries.
4515
4516 * extensions/thuban/ bmpdataset.cpp, cpl_mfile.cpp, cpl_mfile.h,
4517 gdalwarp.cpp, wxproj.cpp: Moved to libraries/thuban.
4518
4519 * extensions/shapelib/ dbfopen.c, shapefil.h, shpopen.c, shptree.c:
4520 Moved to libraries/shapelib.
4521
4522 * extensions/pyshapelib/ COPYING, NEWS, dbflib.py, pytest.py,
4523 shapelib.py, README, dbflib_wrap.c, setup.py, shapelib_wrap.c,
4524 ChangeLog, dbflib.i, pyshapelib_api.h, shapelib.i, shptreemodule.c:
4525 Moved to libraries/pyshapelib.
4526
4527 * extensions/pyprojection/ MANIFEST.in, Projection.py, setup.py,
4528 LICENSE, Projection.i, Projection_wrap.c, swighelp.txt:
4529 Moved to libraries/pyprojection.
4530
4531 * extensions/ pyprojection, pyshapelib, shapelib, thuban: Removed.
4532
4533 * extensions: Removed.
4534
4535 2003-08-19 Bernhard Herzog <[email protected]>
4536
4537 * test/test_viewport.py (ViewPortTest): We don't use the
4538 facilities of FileTestMixin so don't derive from it.
4539 (TestViewportWithPostGIS): New class with tests for using a
4540 viewport on a map with postgis layers.
4541
4542 2003-08-19 Bernhard Herzog <[email protected]>
4543
4544 Add the db connection management to the session.
4545
4546 * Thuban/Model/session.py (Session.__init__): New instance
4547 variable db_connections
4548 (Session.AddDBConnection, Session.DBConnections)
4549 (Session.HasDBConnections, Session.CanRemoveDBConnection)
4550 (Session.RemoveDBConnection): New methods to manage and query the
4551 db connections managed by the session
4552 (Session.OpenDBShapeStore): New method to open a shapestore from a
4553 db connection
4554
4555 * Thuban/Model/messages.py (DBCONN_REMOVED, DBCONN_ADDED): New
4556 messages for the db connection handling in the session
4557
4558 * test/test_postgis_session.py: New. test cases for the session's
4559 db connection handling with postgis connections
4560
4561 2003-08-19 Bernhard Herzog <[email protected]>
4562
4563 Add very basic postgis database support and the corresponding test
4564 cases. The test cases require a PostgreSQL + postgis installation
4565 but no existing database. The database will be created
4566 automatically by the test cases
4567
4568 * test/README: Add note about skipped tests and the requirements
4569 of the postgis tests.
4570
4571 * Thuban/Model/postgisdb.py: New. Basic postgis database support.
4572
4573 * test/test_postgis_db.py: New. Test cases for the postgis
4574 support.
4575
4576 * Thuban/Model/wellknowntext.py: New. Parser for well-known-text
4577 format
4578
4579 * test/test_wellknowntext.py: New. Test cases for the
4580 wellknowntext parser
4581
4582 * test/postgissupport.py: New. Support module for tests involving
4583 a postgis database.
4584
4585 * test/support.py (execute_as_testsuite): Shut down the postmaster
4586 if it's still running after the tests
4587
4588 * Thuban/Model/data.py (RAW_WKT): New constant for raw data in
4589 well known text format
4590
4591 2003-08-19 Jan-Oliver Wagner <[email protected]>
4592
4593 * Examples/simple_extensions/hello_world.py: New. Raises a Hello World
4594 message dialog.
4595
4596 2003-08-18 Bernhard Herzog <[email protected]>
4597
4598 * test/support.py (ThubanTestResult.printErrors): Indent the
4599 reason for the skips in the output to make it a bit more readable.
4600 (execute_as_testsuite): New helper function to run a test suite
4601 and print some more information.
4602 (run_tests): Use execute_as_testsuite to run the tests
4603
4604 * test/runtests.py (main): Use execute_as_testsuite to run the
4605 tests
4606
4607 2003-08-18 Bernhard Herzog <[email protected]>
4608
4609 Fix some bugs in Thuban and the test suite that were uncovered by
4610 changes introduced in Python 2.3:
4611
4612 * Thuban/Model/table.py (DBFTable.__init__): Make sure the
4613 filename is an absolute name
4614
4615 * Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
4616 filename is an absolute name
4617
4618 * test/test_save.py (SaveSessionTest.testRasterLayer): Use a
4619 unique filename to save to and use the correct relative filename
4620 in the expected output.
4621 (SaveSessionTest.test_dbf_table): Use the correct relative
4622 filename in the expected output.
4623
4624 * test/test_layer.py (TestLayer.test_raster_layer): Update the
4625 test to check whether the filename is absolute.
4626
4627 2003-08-18 Jan-Oliver Wagner <[email protected]>
4628
4629 * Thuban/UI/about.py (About.__init__): Added Silke Reimer.
4630
4631 2003-08-15 Bernhard Herzog <[email protected]>
4632
4633 Change the way shapes are returned by a shape store. The
4634 ShapesInRegion method returns an iterator over actual shape
4635 objects instead of a list of shape ids.
4636
4637 * Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
4638 id.
4639 (ShapefileStore.ShapesInRegion): Return an iterator over the
4640 shapes which yields shape objects instead of returning a list of
4641 shape ids
4642 (ShapefileStore.AllShapes): New. Return an iterator over all
4643 shapes in the shape store
4644 (DerivedShapeStore.AllShapes): New. Like in ShapefileStore
4645
4646 * Thuban/Model/layer.py (Layer.ShapesInRegion): Update
4647 doc-string.
4648
4649 * Thuban/UI/baserenderer.py
4650 (BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
4651 layer_shapes and make it return an iterator containg shapes
4652 instead of a list of ids.
4653 (BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
4654 layer_shapes() change
4655
4656 * Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
4657 (ScreenRenderer.layer_shapes): Rename as in BaseRenderer
4658
4659 * Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
4660 changes in the ShapesInRegion return value.
4661 (ViewPort._get_hit_tester): Remove commented out code
4662
4663 * test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
4664 new return value.
4665 (SimpleShapeStore.AllShapes): New. Implement this method too.
4666
4667 * test/test_layer.py (TestLayer.test_arc_layer)
4668 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
4669 (TestLayer.test_point_layer_with_projection)
4670 (TestLayer.test_derived_store): Adapt to changes in the
4671 ShapesInRegion return value.
4672
4673 * test/test_shapefilestore.py
4674 (TestShapefileStoreArc.test_shapes_in_region)
4675 (TestShapefileStorePolygon.test_shapes_in_region)
4676 (TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
4677 in the ShapesInRegion return value.
4678 (TestShapefileStorePoint.test_all_shapes)
4679 (TestShapefileStoreArc.test_shape_shapeid): New tests for the new
4680 methods
4681
4682 * test/test_derivedshapestore.py
4683 (TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
4684 the ShapesInRegion return value.
4685 (TestDerivedShapeStore.test_all_shapes)
4686 (TestDerivedShapeStore.test_shape_shapeid): New tests for the new
4687 methods
4688
4689 2003-08-15 Bernhard Herzog <[email protected]>
4690
4691 Make the renderers deal correctly with raw vs. python level
4692 representation of shape geometries
4693
4694 * Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
4695 Return a flag useraw in addition to the callable and the parameter
4696 to indicate whether the callable can deal with the raw shape data
4697 or uses the higher level python lists of coordinates. The callable
4698 now should accept either the raw data or the return value of the
4699 shape's Points() method.
4700 (BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
4701 change
4702 (BaseRenderer.projected_points): Instead of the shape id use the
4703 points list as parameter.
4704 (BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
4705 (BaseRenderer.draw_point_shape): Adapt to projected_points()
4706 change and accept the points list as parameter instead of the
4707 shape id.
4708
4709 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
4710 the useraw flag as required by the BaseRenderer
4711 (ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
4712 changes.
4713
4714 * test/test_baserenderer.py
4715 (TestBaseRenderer.test_point_with_classification): New test for
4716 rendering a map with classifications.
4717
4718 2003-08-15 Bernhard Herzog <[email protected]>
4719
4720 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
4721 (ViewPort._find_shape_in_layer, ViewPort._find_shape_in_layer)
4722 (ViewPort._get_hit_tester, ViewPort.projected_points)
4723 (ViewPort._hit_point, ViewPort._hit_arc, ViewPort._hit_polygon)
4724 (ViewPort._find_label_at): Split the find_shape_at method into
4725 several new methods and use the functions in the hit-test module.
4726
4727 * Thuban/UI/hittest.py: New module with Python-level hit-testing
4728 functions
4729
4730 * test/test_hittest.py: New. Test for the new hittest module
4731
4732 2003-08-15 Bernhard Herzog <[email protected]>
4733
4734 * Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
4735 projection to all corners of the bounding box to get a better
4736 approximation of the projected bounding box
4737
4738 * test/test_layer.py (TestLayer.test_point_layer_with_projection):
4739 New. Test coordinate handling of a layer with a projection.
4740 Catches the bug fixed in Layer.ShapesInRegion
4741
4742 2003-08-15 Bernhard Herzog <[email protected]>
4743
4744 Move some of the mock objects in test_baserenderer into their own
4745 module so they can easily be used from other tests
4746
4747 * test/mockgeo.py: New test helper module with some mock objects
4748 for geometry related things like shapes, shapestores and
4749 projections.
4750
4751 * test/test_mockgeo.py: New. Tests for the new helper module
4752
4753 * test/test_baserenderer.py: Some of the mock-objects are in
4754 mockgeo now.
4755
4756 2003-08-12 Jan-Oliver Wagner <[email protected]>
4757
4758 * Thuban/UI/about.py (About.__init__): Added Björn Broscheit.
4759
4760 2003-08-12 Bernhard Herzog <[email protected]>
4761
4762 * po/de.po: New. German translations by Bjoern Broscheit
4763
4764 2003-08-12 Bernhard Herzog <[email protected]>
4765
4766 * Thuban/UI/projdialog.py (UnknownProjPanel._DoLayout): Translated
4767 strings have to be one string literal.
4768
4769 2003-08-11 Bernhard Herzog <[email protected]>
4770
4771 * test/support.py (FloatComparisonMixin.assertPointListEquals):
4772 New. This method was used in various derived classes, but it's
4773 better to have it here.
4774
4775 * test/test_shapefilestore.py
4776 (ShapefileStoreTests.assertPointListEquals): Removed. It's now in
4777 FloatComparisonMixin
4778
4779 * test/test_layer.py (TestLayer.assertPointListEquals): Removed.
4780 It's now in FloatComparisonMixin
4781
4782 * test/test_derivedshapestore.py
4783 (TestDerivedShapeStore.assertPointListEquals): Removed. It's now
4784 in FloatComparisonMixin
4785
4786 2003-08-11 Bernhard Herzog <[email protected]>
4787
4788 * Thuban/UI/join.py (JoinDialog.OnJoin): Add missing space to
4789 error message
4790
4791 2003-08-08 Jan-Oliver Wagner <[email protected]>
4792
4793 * Doc/manual/thuban-manual.xml: Now use authorgroup. Added revhistory
4794 with version number.
4795 Changed title to reflect version number of Thuban.
4796
4797 2003-08-08 Jan-Oliver Wagner <[email protected]>
4798
4799 * Thuban/UI/about.py (About.__init__): Reworked the hall of fame. Now
4800 the list corresponds to the "About" web page.
4801
4802 2003-08-08 Bernhard Herzog <[email protected]>
4803
4804 * Thuban/UI/projdialog.py (UTMProposeZoneDialog.dialogLayout):
4805 Make sure translated strings are recognized as one string literal.
4806
4807 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog.dialogLayout):
4808 Make sure translated strings are recognized as one string literal.
4809
4810 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Make sure
4811 translated strings are recognized as one string literal.
4812
4813 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
4814 sure translated strings are recognized as one string literal.
4815
4816 2003-08-07 Bernhard Herzog <[email protected]>
4817
4818 * Thuban/Model/data.py (DerivedShapeStore.RawShapeFormat): New.
4819 Simply delegates to the original shapestore.
4820
4821 * test/test_derivedshapestore.py
4822 (TestDerivedShapeStore.test_raw_format): New. Test case for
4823 DerivedShapeStore.RawShapeFormat
4824
4825 2003-08-07 Bernhard Herzog <[email protected]>
4826
4827 Add raw data interface to shape objects.
4828
4829 * Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape
4830 class to ShapefileShape which now holds shapefile specific
4831 information.
4832 (ShapefileShape.compute_bbox): Simplified to not cache any
4833 information. The way this method is used that shouldn't matter
4834 performance wise.
4835 (ShapefileShape.RawData): New. Return the shapeid which is the raw
4836 data format for shapes from shapefiles.
4837 (ShapefileStore.RawShapeFormat): New. Return the raw datatype used
4838 in the shape objects returned by a shapestore. For a
4839 ShapefileStore this is always RAW_SHAPEFILE.
4840 (RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat
4841 method.
4842
4843 * test/test_shapefilestore.py
4844 (TestShapefileStore.test_raw_format): New test to test the raw
4845 format feature of shapes.
4846
4847 * Thuban/Model/layer.py: Remove the unused import of Shape from
4848 data. It was only there for interface compatibility but it's not
4849 used inside of Thuban and the generic Shape class has gone away.
4850
4851 * Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check
4852 the raw data format and only use an optimized version of its a
4853 shapefile.
4854
4855 2003-08-07 Bernhard Herzog <[email protected]>
4856
4857 * test/test_baserenderer.py (SimpleShape): Shape class for the
4858 tests.
4859 (SimpleShapeStore.Shape): Use SimpleShape instead of
4860 Thuban.Model.data.Shape to make the tests independed of the coming
4861 changes.
4862
4863 2003-08-07 Bernhard Herzog <[email protected]>
4864
4865 * test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner)
4866 (ThubanTestProgram): New classes that extend the respective
4867 classes from unittest. These new version support skipping tests
4868 under certain expected conditions. In the Thuban test suite we
4869 uses this for tests that require the optional gdal support.
4870 (run_tests): Use ThubanTestProgram instead of the unittest.main()
4871
4872 * test/runtests.py (main): Use the new ThubanTestRunner instead of
4873 the normal one from unittest
4874
4875 * test/test_layer.py (TestLayer.test_raster_layer): If this test
4876 is not run because gdal support isn't available report this to the
4877 runner.
4878
4879 * test/test_baserenderer.py
4880 (TestBaseRenderer.test_raster_no_projection): Do not run this test
4881 if gdal support isn't available and report this to the runner.
4882
4883 2003-08-06 Bernhard Herzog <[email protected]>
4884
4885 Rearrange the renderers a bit, partly in preparation for changes
4886 required for the postgis merge, partly to make it more testable.
4887 Also make the representation of coordinates in Shapes more
4888 consistent.
4889
4890 * Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
4891 this class is now in BaseRenderer. This class is now practically
4892 only a specialization of BaseRenderer for rendering to an actual
4893 wx DC.
4894 (ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
4895 to get the shapetype specific rendering functions.
4896
4897 * Thuban/UI/baserenderer.py: New file with the basic rendering
4898 logic. The code in this file is completely independend of wx.
4899 (BaseRenderer): Class with the basic rendering logic
4900
4901 * test/test_baserenderer.py: New. Test cases for BaseRenderer
4902
4903 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
4904 error_on_redraw to guard agains endless loops and stack overflows
4905 when there's a bug in the rendering code that raises exceptions.
4906 (MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
4907 rendering into a separate method _do_redraw so that error handling
4908 is a bit easier. When an exception occurs, set error_on_redraw to
4909 true. When it's true on entry to OnIdle do nothing and return
4910 immediately.
4911
4912 * Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a
4913 Shape object will always have the coordinates as a list of list of
4914 coordinate pairs (tuples).
4915 (Shape.compute_bbox): Adapt to new representation.
4916
4917 * Thuban/UI/viewport.py (ViewPort.find_shape_at)
4918 (ViewPort.LabelShapeAt): Adapt to new coordinate representation in
4919 Shape objects.
4920
4921 * test/test_shapefilestore.py
4922 (ShapefileStoreTests.assertFloatTuplesEqual)
4923 (ShapefileStoreTests.assertPointListEquals): Rename to
4924 assertPointListEquals and change purpose to checking equality of
4925 the lists returned by Shape.Points().
4926 (TestShapefileStoreArc.test_shape)
4927 (TestShapefileStorePolygon.test_shape)
4928 (TestShapefileStorePoint.test_shape): Use the new
4929 assertPointListEquals instead of assertFloatTuplesEqual
4930
4931 * test/test_layer.py (TestLayer.assertFloatTuplesEqual)
4932 (TestLayer.assertPointListEquals): Rename to assertPointListEquals
4933 and change purpose to checking equality of the lists returned by
4934 Shape.Points().
4935 (TestLayer.test_arc_layer, TestLayer.test_arc_layer)
4936 (TestLayer.test_polygon_layer, TestLayer.test_point_layer)
4937 (TestLayer.test_derived_store): Use the new assertPointListEquals
4938 instead of assertFloatTuplesEqual
4939
4940 * test/test_derivedshapestore.py
4941 (TestDerivedShapeStore.assertFloatTuplesEqual)
4942 (TestDerivedShapeStore.assertPointListEquals): Rename to
4943 assertPointListEquals and change purpose to checking equality of
4944 the lists returned by Shape.Points().
4945 (TestDerivedShapeStore.test_shape): Use the new
4946 assertPointListEquals instead of assertFloatTuplesEqual
4947
4948 2003-08-06 Jan-Oliver Wagner <[email protected]>
4949
4950 * Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for
4951 a bounding box. A dialog is raised in case, no bounding box
4952 is found. This fixes bug #2043:
4953 https://intevation.de/rt/webrt?serial_num=2043
4954
4955 2003-08-05 Bernhard Herzog <[email protected]>
4956
4957 * Thuban/Model/color.py (Color.__repr__): Make the repr of a color
4958 object look like a Color instantiation. Formerly it looked like a
4959 tuple.
4960
4961 * test/test_color.py (TestColor.test_repr)
4962 (TestColor.test_equality, TestColor.test_inequality): New. test
4963 some more apects of the Color class
4964 (TestTransparent.test_repr, TestTransparent.test_hex)
4965 (TestTransparent.test_equality): New. Test cases for the
4966 Transparent object.
4967
4968 2003-08-04 Jan-Oliver Wagner <[email protected]>
4969
4970 * Doc/manual/thuban-manual.xml: a number of small improvements.
4971 The resulting file is the version submitted for GREAT-ER II.
4972
4973 2003-08-01 Bernhard Herzog <[email protected]>
4974
4975 * Thuban/UI/resource.py, Thuban/UI/projdialog.py,
4976 Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py,
4977 Thuban/Model/resource.py: Insert cvs keywords and doc-strings.
4978
4979 * Thuban/UI/common.py: Insert cvs keywords and doc-strings.
4980 (Color2wxColour, wxColour2Color, ThubanBeginBusyCursor)
4981 (ThubanEndBusyCursor): Add doc-strings
4982
4983 2003-08-01 Bernhard Herzog <[email protected]>
4984
4985 First step towards PostGIS integration. More abstraction by movin
4986 more code from the layer to the shapestore. More methods of the
4987 layer are now simply delegated to the equivalent method of the
4988 shapestore. The SHAPETYPE_* constants are now in data not in
4989 layer.
4990
4991 * Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
4992 (SHAPETYPE_POINT, Shape): Move these constants and classes from
4993 layer.py to data.py
4994 (ShapefileStore.__init__): More Initialization for the new methods
4995 and functionality.
4996 (ShapefileStore.ShapeType, ShapefileStore.NumShapes)
4997 (ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
4998 (ShapefileStore.Shape): New methods that were formerly implemented
4999 in the layer.
5000 (DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
5001 (DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
5002 (DerivedShapeStore.BoundingBox): New. DerivedShapeStore
5003 equivalents of the new shape methods. These versions are simply
5004 delegated to the original shapstore.
5005
5006 * Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
5007 (SHAPETYPE_POINT, Shape): Removed. They're now in data.py
5008 (Layer.SetShapeStore): Removed the initializatin of instance
5009 variables that were needed for the stuff that's now in
5010 ShapefileStore
5011 (Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
5012 (Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
5013 shapestore.
5014
5015 * Thuban/UI/classifier.py, Thuban/UI/renderer.py,
5016 Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data
5017 instead of layer.
5018
5019 * test/test_shapefilestore.py: New. Tests for ShapefileStore.
5020
5021 * test/test_derivedshapestore.py: New. Tests for DerivedShapeStore.
5022
5023 * test/test_layer.py: Import the SHAPETYPE_* constants from data
5024 instead of layer.
5025 (TestLayer.test_derived_store): Remove the test for the exception
5026 when instantiating the DerivedShapeStore with an incompatible
5027 table which is now in test_derivedshapestore.py. Add some more
5028 tests of the layer methods to determine whether they work for a
5029 DerivedShapeStore as well.
5030
5031 2003-07-31 Jonathan Coles <[email protected]>
5032
5033 * Doc/manual/thuban-manual.xml: Fix the list of required packages
5034 by just listing the name and where they can be found.
5035
5036 2003-07-31 Frank Koormann <[email protected]>
5037
5038 * Doc/manual/thuban-manual.xml:
5039 Changed the screenshot elements to figure.
5040 Changed some variablelist elements to itemizedlist.
5041 Added section on GDAL formats.
5042
5043 2003-07-31 Jonathan Coles <[email protected]>
5044
5045 * Doc/manual/thuban-manual.xml: Added a few sentences about
5046 the Fix Border Color option when generating classes.
5047
5048 2003-07-30 Jonathan Coles <[email protected]>
5049
5050 * Thuban/Model/classgen.py: Add docstrings. Rename specific
5051 Ramp instances to use lower_case_style.
5052
5053 * Thuban/UI/classgen.py: Use renamed Ramp instances.
5054
5055 * Thuban/UI/classifier.py: Add docstrings.
5056
5057 * Thuban/UI/dock.py: Add docstrings.
5058
5059 * test/test_classgen.py: Use renamed Ramp instances.
5060
5061 2003-07-30 Bernhard Herzog <[email protected]>
5062
5063 * Thuban/Lib/connector.py (QueueingPublisher): Removed. This class
5064 was never used in Thuban.
5065
5066 2003-07-30 Bernhard Herzog <[email protected]>
5067
5068 * Thuban/UI/join.py (JoinDialog.__init__): Use the table's Title()
5069 method directly instead of going through the transient_table
5070 method. This faster because transient_table may force the copy of
5071 a DBF file into the transient database and setting a table's title
5072 doesnm't affect the title of the associated transient table, so
5073 this fixes RT #2042
5074
5075 * Thuban/UI/main.py (__version__): Don't import the already
5076 removed show_exception_dialog.
5077
5078 2003-07-29 Jonathan Coles <[email protected]>
5079
5080 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
5081 Put back this method and remove the equivalent function since we
5082 are setting the exception hook from within this class (OnInit).
5083
5084 2003-07-29 Jonathan Coles <[email protected]>
5085
5086 * Doc/manual/images/5_2_custom_ramp.png,
5087 Doc/manual/images/5_2_quantiles.png,
5088 Doc/manual/images/5_2_uniform_dist.png,
5089 Doc/manual/images/5_2_unique_values.png,
5090 Doc/manual/images/8_int_error.png: New screen shots.
5091
5092 * Doc/manual/thuban-manual.xml: Fixed typos and wording, clarified
5093 some points, and added more screen shots.
5094
5095 2003-07-29 Bernhard Herzog <[email protected]>
5096
5097 * Thuban/Model/data.py: Remove the now unused import of warnings
5098
5099 2003-07-29 Bernhard Herzog <[email protected]>
5100
5101 * Thuban/Model/data.py (SimpleStore): Removed. This class has been
5102 deprecated since before the 0.8 release and isn't used in Thuban
5103 itself anymore.
5104
5105 * Thuban/Model/transientdb.py: Remove some unnecessary imports
5106
5107 2003-07-29 Jonathan Coles <[email protected]>
5108
5109 * Thuban/UI/application.py (ThubanApplication.OnInit): set the
5110 python exception hook here so that we are sure to catch any
5111 Thuban exception that happen during initialization.
5112
5113 * Thuban/UI/main.py (main): Don't set the exception hook here,
5114 it will get set in ThubanApplication.OnInit.
5115
5116 2003-07-29 Jonathan Coles <[email protected]>
5117
5118 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
5119 Removed and called it show_exception_dialog() so that the exception
5120 handler can be set before the class is created.
5121
5122 * Thuban/UI/main.py (main): Install the exception handler before
5123 a ThubanApplication is created.
5124
5125 2003-07-29 Bernhard Herzog <[email protected]>
5126
5127 * po/it.po: New. Italian translation by Maurizio Napolitano
5128
5129 * po/ru.po: New. Russian translation by Alex Shevlakov
5130
5131 2003-07-29 Frank Koormann <[email protected]>
5132
5133 * Doc/manual/thuban-manual.xml: Extended section on supported
5134 projections.
5135
5136 2003-07-29 Frank Koormann <[email protected]>
5137
5138 * Doc/manual/thuban-manual.xml: gaspell-checked.
5139
5140 2003-07-29 Jonathan Coles <[email protected]>
5141
5142 * Doc/manual/images/3_5_legend.png: Added border to improve look
5143 on white background.
5144
5145 2003-07-29 Jonathan Coles <[email protected]>
5146
5147 * Doc/manual/thuban-manual.xml: Fixed grammar and typos. Added
5148 descriptions for the legend toolbar.
5149
5150 * Doc/manual/images/4_2_raster_layer_properties.png: Removed
5151 cursor from dialog box.
5152
5153 2003-07-28 Jonathan Coles <[email protected]>
5154
5155 * Doc/manual/thuban-manual.xml: More screenshots and more chapters.
5156
5157 * Doc/manual/images/2_4_session_tree.png,
5158 Doc/manual/images/3_5_legend.png, Doc/manual/images/3_rename_map.png,
5159 Doc/manual/images/4_2_layer_properties.png,
5160 Doc/manual/images/4_2_raster_layer_properties.png,
5161 Doc/manual/images/5_3_genclass.png,
5162 Doc/manual/images/5_classification.png,
5163 Doc/manual/images/6_projection.png,
5164 Doc/manual/images/7_1_table_view.png,
5165 Doc/manual/images/7_2_5_join.png: New screenshots.
5166
5167 2003-07-24 Jonathan Coles <[email protected]>
5168
5169 * Doc/manual/thuban-manual.xml: Chapter on Projection Management.
5170
5171 2003-07-24 Jonathan Coles <[email protected]>
5172
5173 * Doc/manual/thuban-manual.xml: Added EPS images and wrote
5174 chapter on Layer Management.
5175
5176 * Doc/manual/Makefile: New. Makefile to generate all formats for the
5177 manual and images.
5178
5179 2003-07-24 Bernhard Herzog <[email protected]>
5180
5181 * Thuban/Model/range.py, Thuban/version.py: Remove the #! line as
5182 it annoys lintian which warns about these files not being
5183 executable. The #! isn't necessary here since if you absolutely
5184 must execute them you can always say "python <filename>".
5185
5186 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Remove
5187 superfluous code to set brush and pen for point shapes
5188
5189 * Thuban/UI/viewport.py: Remove commented out code that wouldn't
5190 belong in viewport anyway
5191
5192 2003-07-24 Frank Koormann <[email protected]>
5193
5194 * Doc/manual/thuban-manual.xml: Added section on table management.
5195
5196 2003-07-24 Bernhard Herzog <[email protected]>
5197
5198 * test/runtests.py (main): Recognize the long "verbose" option
5199 correctly.
5200
5201 2003-07-22 Jonathan Coles <[email protected]>
5202
5203 * Doc/manual/thuban-manual.xml: Continue to write first revision
5204 of the manual.
5205
5206 * Thuban/UI/renderer.py (MapRenderer.render_map): Wrap method
5207 with Begin/EndDrawing() calls to ensure we aren't doing to
5208 many updates to the dc during rendering.
5209 (ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
5210 a pen and brush argument so they need to be passed to the function.
5211
5212 * Thuban/UI/viewport.py (ViewPort.calc_min_max_scales): New.
5213 Calculates the minimum and maximum scale values. Factored out
5214 of set_view_transform so that it could be used to zoom all the
5215 way into a single point.
5216 (ViewPort.set_view_transform): Call calc_min_max_scales().
5217 (ViewPort.FitSelectedToWindow): Zoom to the maximum scale
5218 if only a single point is selected.
5219
5220 * Doc/manual/images/1_2_legend_close.png,
5221 Doc/manual/images/1_2_legend_dock.png,
5222 Doc/manual/images/1_2_mainwindow.png,
5223 Doc/manual/images/1_2_mainwindow.ps,
5224 Doc/manual/images/1_2_mainwindow.sk,
5225 Doc/manual/images/3_2_fullextent.png,
5226 Doc/manual/images/3_2_fulllayerextent.png,
5227 Doc/manual/images/3_2_fullshapeextent.png,
5228 Doc/manual/images/3_2_pan.png,
5229 Doc/manual/images/3_2_zoomin.png,
5230 Doc/manual/images/3_2_zoomout.png,
5231 Doc/manual/images/3_3_identify.png,
5232 Doc/manual/images/3_3_label.png,
5233 Doc/manual/images/3_5_invisible.png,
5234 Doc/manual/images/3_5_movedown.png,
5235 Doc/manual/images/3_5_moveup.png,
5236 Doc/manual/images/3_5_props.png,
5237 Doc/manual/images/3_5_tobottom.png,
5238 Doc/manual/images/3_5_totop.png,
5239 Doc/manual/images/3_5_visible.png: New. Images for the documentation.
5240
5241 2003-07-18 Bernhard Herzog <[email protected]>
5242
5243 * Thuban/UI/messages.py (MAP_REPLACED): New message.
5244
5245 * Thuban/UI/viewport.py (ViewPort.SetMap): Issue MAP_REPLACED
5246 after the new map has been assigned
5247
5248 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages):
5249 Delegate MAP_REPLACED to the canvas too
5250 (MainWindow.prepare_new_session): Removed. Thanks to the new
5251 MAP_REPLACED message it's no longer needed
5252 (MainWindow.OpenSession, MainWindow.NewSession):
5253 prepare_new_session has been removed.
5254
5255 * Thuban/UI/classifier.py (Classifier.__init__): Subscribe to
5256 MAP_REPLACED so that we can close the dialog if a new map is set.
5257 (Classifier.unsubscribe_messages): Unsubscribe from MAP_REPLACED
5258 (Classifier.map_replaced): Handle MAP_REPLACED by closing the
5259 dialog
5260
5261 * test/test_viewport.py (SimpleViewPortTest)
5262 (SimpleViewPortTest.test_default_size): Add doc-strings
5263 (ViewPortTest.setUp): Bind map to self.map so we can use it in
5264 tests. Subscribe to MAP_REPLACED messages too.
5265 (ViewPortTest.tearDown): No need to explicitly unsubscribe
5266 (ViewPortTest.test_set_map): New test for the SetMap method.
5267
5268 2003-07-18 Bernhard Herzog <[email protected]>
5269
5270 * test/test_viewport.py (SimpleViewPortTest.test_default_size):
5271 Move this test from ViewPortTest.setUp to this new separate test
5272 case. setUp is not the place for the actual tests.
5273 (ViewPortTest.test_inital_settings, ViewPortTest.setUp): Move some
5274 more of the test from setUp to the new test test_inital_settings.
5275 (ViewPortTest.test_win_to_proj, ViewPortTest.test_proj_to_win)
5276 (ViewPortTest.test_proj_conv): Split test_proj_conv into
5277 test_win_to_proj and test_proj_to_win and make the tests easier to
5278 understand
5279 (ViewPortTest.testFitRectToWindow, ViewPortTest.testZoomFactor)
5280 (ViewPortTest.testZoomOutToRect, ViewPortTest.testTranslate)
5281 (ViewPortTest.test_unprojected_rect_around_point)
5282 (ViewPortTest.test_find_shape_at, ViewPortTest.testTools):
5283 Reformat to increase readability.
5284
5285 2003-07-18 Bernhard Herzog <[email protected]>
5286
5287 * Thuban/UI/view.py (MapCanvas.OnLeftDown): Capture the mouse.
5288
5289 2003-07-18 Bernhard Herzog <[email protected]>
5290
5291 * test/runtests.py: The test suite can now be run without an X
5292 connection. To make sure this remains true, remove the DISPLAY
5293 environment variable so that an error occurs if the wxGTK is
5294 imported accidentally
5295
5296 2003-07-18 Bernhard Herzog <[email protected]>
5297
5298 * Thuban/UI/viewport.py: Remove unused imports
5299
5300 * Thuban/UI/view.py: Remove unused imports
5301
5302 2003-07-18 Bernhard Herzog <[email protected]>
5303
5304 * test/test_export.py Remove unused imports. The OutputTransform
5305 function is now in viewport.py and is called output_transform
5306 (TestScalebar.test_output_transform)
5307 (TestScalebar.test_OutputTransform): Renamed to
5308 test_output_transform and updated to use output_transform instead
5309 of OutputTransform
5310
5311 * Thuban/UI/view.py (OutputTransform): Moved to viewport.py and
5312 renamed.
5313 (MapCanvas.Export, MapPrintout.draw_on_dc): OutputTransform was
5314 renamed to output_transform
5315
5316 * Thuban/UI/viewport.py (OutputTransform, output_transform):
5317 Rename to output_transform
5318
5319 2003-07-18 Bernhard Herzog <[email protected]>
5320
5321 * Thuban/Model/layer.py (Layer.__init__): Rename
5322 classificationField to classificatin_column and init it here so
5323 that it can be used in SetClassificationColumn
5324 (Layer.GetClassificationColumn, Layer.GetClassificationField):
5325 Rename to GetClassificationColumn.
5326 (Layer.SetClassificationColumn, Layer.SetClassificationField):
5327 Rename to SetClassificationColumn and issue a LAYER_CHANGED
5328 message if the column changes.
5329 (Layer._classification_changed, Layer.ClassChanged): Rename to
5330 _classification_changed. Update the callers.
5331 (Layer.SetShapeStore): Further field->column renames.
5332
5333 * Thuban/Model/load.py (SessionLoader.start_classification)
5334 (SessionLoader.start_clpoint): Updates because of
5335 field->column method name changes in the Layer class
5336
5337 * Thuban/Model/save.py (SessionSaver.write_classification): Updates
5338 because of field->column method name changes in the Layer class
5339
5340 * Thuban/UI/classifier.py (Classifier.__init__)
5341 (Classifier._OnTry, Classifier._OnRevert): Updates because of
5342 field->column method name changes in the Layer class
5343
5344 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
5345 because of field->column method name changes in the Layer class
5346
5347 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
5348 of field->column method name changes in the Layer class
5349
5350 * test/test_save.py (SaveSessionTest.testClassifiedLayer)
5351 (SaveSessionTest.testClassifiedLayer): Update because of
5352 field->column method name changes in the Layer class
5353
5354 * test/test_layer.py (SetShapeStoreTests.setUp)
5355 (SetShapeStoreTests.test_sanity): Update because of field->column
5356 method name changes in the Layer class
5357 (TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
5358 (TestLayerModification.test_sanity)
5359 (TestLayerModification.test_initial_settings): remove unsued code
5360 and rename to test_sanity.
5361 (TestLayerModification.test_set_classification): New test for
5362 SetClassification and SetClassificationField.
5363
5364 2003-07-18 Bernhard Herzog <[email protected]>
5365
5366 * test/test_classgen.py (TestFixedRamp.test): Extend test to check
5367 the non-fixed values as well. The old test would have accepted a
5368 fixed ramp that only returnes the fixed properties
5369
5370 2003-07-17 Jonathan Coles <[email protected]>
5371
5372 * Doc/manual/mainwindow.png, Doc/manual/mainwindow.xcf: Screen
5373 shots for the manual. The XCF file is the source image and
5374 has additional layers to support changes.
5375
5376 * Doc/manual/thuban-manual.xml: Wrote an initial Introduction.
5377
5378 * Thuban/UI/classifier.py (Classifier.__BuildClassification):
5379 Return both the new class and the field name.
5380
5381 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Don't
5382 fit the map to the window as this changes any zoom level that
5383 the user may have set.
5384
5385 2003-07-16 Jonathan Coles <[email protected]>
5386
5387 * Thuban/Model/classgen.py (generate_singletons,
5388 generate_uniform_distribution, generate_quantiles): Remove
5389 fixes parameter, but maintain the same functionality by having
5390 the calling function pass a FixedRamp object for the ramp.
5391 (FixedRamp): New. Adapts a ramp to have fixed property values.
5392
5393 * Thuban/Model/classification.py: Use new CLASS_CHANGED message.
5394 (Classification): Inherit from Publisher.
5395 (Classification.__init__): Remove the layer parameter.
5396 Classifications no longer need to have a parent layer.
5397 (Classification.GetField, Classification.GetFieldType,
5398 Classification.SetFieldInfo): Removed. The field name is stored
5399 in the layer, and the type can be retreived by calling
5400 Layer.GetFieldType().
5401 (Classification._set_layer, Classification.GetLayer): Removed.
5402 Classifications no longer have a parent layer.
5403
5404 * Thuban/Model/layer.py (Layer.Destroy): Unsubscribe from the
5405 classification.
5406 (Layer.SetShapeStore): Reset the classification first while
5407 we still have the old shape store to work with.
5408 (Layer.GetClassificationField, Layer.SetClassificationField):
5409 New. Method for getting/setting the field to classify on.
5410 (Layer.SetClassification): Simplified now that the layer
5411 simply has to hold a reference to the classification and not
5412 tell the classification who owns it.
5413 Fixes RTbug #2023.
5414
5415 * Thuban/Model/load.py (SessionLoader.start_classification):
5416 Set the field name on the layer, not the classification.
5417
5418 * Thuban/Model/messages.py: Add CLASS_CHANGED for when a
5419 classification is modified.
5420
5421 * Thuban/Model/save.py (SessionSaver.write_classification):
5422 Get the field name and type from the layer.
5423
5424 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Renamed
5425 parameter records to rows and add docstring. Fixes RTbug #1997.
5426
5427 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Use a fixed
5428 ramp when we need to fix certain values of a ramp rather than
5429 using the old fixes parameter. Fixes RTbug #2024.
5430
5431 * Thuban/UI/classifier.py (ClassGrid.CreateTable): Add fieldType
5432 parameter.
5433 (ClassTable.Reset): Add fieldType parameter and use it, rather
5434 than asking the classification.
5435 (Classifier.__init__): Remember the original class's field
5436 and ask the layer for the field type, rather than the classification.
5437 (Classifier.__SetGridTable): Retrieve the field and field type
5438 for the table because they are not in the classification.
5439 (Classifier._OnTry, Classifier._OnRevert): Set the classification
5440 field on the layer in addition to the classification itself.
5441
5442 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Get the
5443 classification field from layer.
5444
5445 * Thuban/UI/viewport.py (ViewPort.find_shape_at): Get the
5446 classification field from layer. Split up tests and remove
5447 *-imports. Fixes RTbug #1992.
5448
5449 * test/test_classgen.py (TestFixedRamp): Test for the FixedRamp class.
5450
5451 * test/test_classification.py
5452 (TestClassification.test_classification): Remove tests for methods
5453 that no longer exist.
5454
5455 * test/test_layer.py (SetShapeStoreTests.setUp): Classification
5456 __init__ no longer has a field parameter, use SetClassificationField.
5457 (SetShapeStoreTests.test_sanity): Use layer object to get class
5458 field info.
5459
5460 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Use
5461 SetClassificationField on layer to set class field info.
5462
5463 * test/test_viewport.py: Renamed from test/test_view.py.
5464
5465 2003-07-16 Jan-Oliver Wagner <[email protected]>
5466
5467 * Doc/manual/thuban-manual.xml: Added authors and an initial
5468 coarse structure.
5469
5470 2003-07-15 Bernhard Herzog <[email protected]>
5471
5472 * test/support.py (FloatComparisonMixin): This is a mix-in class
5473 and therefore should not be derived from any other class.
5474
5475 * test/test_range.py (RangeTest): FloatComparisonMixin is a
5476 mix-in, so derive from TestCase as well.
5477
5478 2003-07-15 Bernhard Herzog <[email protected]>
5479
5480 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Rework the
5481 draw_func handling a bit to remove one layer of indirection. This
5482 makes the renderer about 10% faster in the non-classifying case
5483 and the code a bit cleaner
5484 (MapRenderer.draw_point_shape): Add the pen and brush parameters
5485 and set them in the dc. Now the draw_point_shape method and
5486 wxproj's draw_polygon_shape function have basically the same
5487 signature so that both can be directly used as draw_func
5488
5489 2003-07-15 Bernhard Herzog <[email protected]>
5490
5491 * Thuban/Model/save.py (SessionSaver.write_classification): Encode
5492 string values (in addition to the labels) as UTF 8
5493
5494 * Thuban/Model/load.py (SessionLoader.start_clpoint): Decode the
5495 values if the field type is string
5496
5497 * test/test_save.py (SaveSessionTest.testClassifiedLayer): Test
5498 saving a session with non-ascii string classification values.
5499
5500 * test/test_load.py (TestClassification.file_contents)
5501 (TestClassification.test): Check for non-ascii values in string
5502 classifications
5503
5504 2003-07-14 Jonathan Coles <[email protected]>
5505
5506 * test/test_view.py: New. Tests for ViewPort.
5507
5508 2003-07-14 Frank Koormann <[email protected]>
5509
5510 * Thuban/Model/load.py (SessionLoader.start_map): Encode map
5511 title to latin1. Fixes https://intevation.de/rt/webrt?serial_num=2013
5512
5513 * test/test_load_0_8.py (TestUnicodeStrings): New, test load of
5514 unicode strings from session file: session title, map title and
5515 projection name.
5516
5517 2003-07-10 Jonathan Coles <[email protected]>
5518
5519 * Thuban/UI/viewport.py (Tool.MouseUp): Should have called
5520 drag_stop, not drag_move when the mouse is released.
5521
5522 2003-07-10 Jonathan Coles <[email protected]>
5523
5524 The most important part of this is the seperation of view.py into
5525 two pieces. viewport.py now has a class called ViewPort which
5526 contains all the non-wx parts of view.py and can therefore be
5527 tested. view.py contains only the wx-specific parts and is fairly
5528 simple.
5529
5530 * Thuban/UI/view.py: Stripped out all non-wx functionality. Fixes
5531 RTTbug #1992.
5532 * Thuban/UI/viewport.py: New. Contains non-wx view functionality.
5533 RTTbug #1992.
5534
5535 * Thuban/Model/classgen.py (generate_singletons,
5536 generate_uniform_distribution, generate_quantiles):
5537 Added 'fixes' parameter so that property attributes can
5538 be held constant over the generated classification groups.
5539 (CustomRamp.GetProperties): Remove unused variables.
5540
5541 * Thuban/Model/map.py (Map.SetProjection): Send the old
5542 projection as an argument to listeners of the MAP_PROJECTION_CHANGED
5543 event.
5544
5545 * Thuban/Model/table.py (table_to_dbf, table_to_csv): Added 'records'
5546 parameter which is a list of records that restricts which
5547 records are saved. Fixes RTbug #1997.
5548
5549 * Thuban/UI/application.py (ThubanApplication.ShowExceptionDialog):
5550 Port exception dialog from GREAT-ER. Fixes RTbug #1993.
5551
5552 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Add controls
5553 to allow the user to fix line color/width on generated groups.
5554 (ClassGenDialog.OnOK): Use new 'fixes' parameter of the generate_*
5555 functions to optionally fix group properties.
5556
5557 * Thuban/UI/main.py (main): Set exception hook to the
5558 ShowExceptionDialog. Fixes RTbug #1993.
5559
5560 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): Raise
5561 the table window when it is selectd to be shown.
5562
5563 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Add an
5564 Export Selection button and move the export buttons underneath
5565 the table.
5566 (QueryTableFrame.UpdateStatusText): Added event argument so
5567 that it can respond to grid selection events. The status text
5568 is now updated even when the table is not associated with a
5569 layer as was previously assumed.
5570 (QueryTableFrame.OnGridSelectRange, OnGridSelectCell): Removed.
5571 UpdateStatusText responds to these events.
5572 (QueryTableFrame.OnSaveAs): Renamed to doExport.
5573 (QueryTableFrame.doExport): Helper function that saves the
5574 entire table, or selected rows, to a file.
5575 (QueryTableFrame.OnExport, QueryTableFrame.OnExportSel): New.
5576 Respond to export button events and call doExport.
5577
5578 * extensions/thuban/gdalwarp.cpp (ProjectRasterFile): Make sure
5579 the function doesn't return NULL without first setting a Python
5580 Error.
5581
5582 * test/runtests.py (main): Only print "Unknown option" for
5583 unsupported options.
5584
5585 * test/support.py (FloatComparisonMixin.assertFloatEqual): Take
5586 optional epsilon argument to specify floating point accuracy.
5587 (FloatComparisonMixin.assertFloatSeqEqual): Call assertFloatEqual
5588 for each item test.
5589
5590 * test/test_csv_table.py (TestCSVTable.test_table_to_cvs): Add
5591 tests for saving selected records.
5592
5593 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
5594 tests for saving selected records.
5595
5596 * test/test_map.py (TestMapWithContents.test_set_projection):
5597 MAP_PROJECTION_CHANGED events send the old projection.
5598
5599 * test/test_session.py
5600 (TestSessionWithContent.test_forward_map_projection):
5601 MAP_PROJECTION_CHANGED events send the old projection.
5602
5603 * test/test_table.py (TableTest): Update tests to use non-deprecated
5604 functions.
5605
5606 2003-07-08 Bernhard Herzog <[email protected]>
5607
5608 * Thuban/Model/transientdb.py (TransientTableBase.Width): The type
5609 constants in the column objects are the standard ones defined in
5610 the table module.
5611
5612 * test/test_transientdb.py
5613 (TestTransientTable.test_transienttable_to_dbf): New. Test whether
5614 exporting transient tables as DBF works. This should catch the bug
5615 just fixed in TransientTableBase.Width.
5616
5617 2003-07-08 Bernhard Herzog <[email protected]>
5618
5619 * Thuban/Model/classgen.py (CustomRamp.GetProperties): Compute the
5620 interpolated colors correctly.
5621
5622 * test/test_classgen.py (TestCustomRamp.test_color_interpolation):
5623 New. Test case for the fix in classgen.py
5624
5625 2003-07-08 Bernhard Herzog <[email protected]>
5626
5627 * test/runtests.py (main): Make the default output less verbose
5628 and add a verbosity option (-v) to get the old output
5629
5630 2003-07-08 Bernhard Herzog <[email protected]>
5631
5632 * Resources/XML/thuban-0.9.dtd: New. This will become the DTD for
5633 0.9.
5634
5635 * Thuban/Model/transientdb.py (TransientJoinedTable.JoinType):
5636 New. Return the join type
5637
5638 * Thuban/Model/save.py (SessionSaver.write_session): Use new 0.9
5639 DTD
5640 (SessionSaver.write_data_containers): Save the join type for
5641 joined tables
5642
5643 * Thuban/Model/load.py (SessionLoader.__init__): Add the new 0.9
5644 namespace
5645 (SessionLoader.start_jointable): Handle the jointype attribute
5646
5647 * test/test_load_0_8.py: New. Effectively a copy of test_load.py
5648 as of Thuban 0.8. These are now tests to determine whether Thuban
5649 can still read files generated by Thuban 0.8
5650
5651 * test/test_load.py (LoadSessionTest.dtd)
5652 (TestSingleLayer.file_contents)
5653 (TestLayerVisibility.file_contents, TestLabels.file_contents)
5654 (TestLayerProjection.file_contents)
5655 (TestRasterLayer.file_contents, TestJoinedTable.file_contents)
5656 (TestJoinedTable.file_contents)
5657 (TestLoadError.file_contents): Update for new DTD
5658 (TestJoinedTable.file_contents, TestJoinedTable.setUp): Add test
5659 for new join type attribute
5660
5661 * test/test_save.py (SaveSessionTest.dtd)
5662 (SaveSessionTest.testEmptySession)
5663 (SaveSessionTest.testSingleLayer)
5664 (SaveSessionTest.testLayerProjection)
5665 (SaveSessionTest.testRasterLayer)
5666 (SaveSessionTest.testClassifiedLayer)
5667 (SaveSessionTest.test_dbf_table)
5668 (SaveSessionTest.test_joined_table): Update for new DTD
5669 (SaveSessionTest.test_joined_table): Add test for new join type
5670 attribute
5671
5672 2003-07-04 Bernhard Herzog <[email protected]>
5673
5674 * Thuban/Model/table.py (_find_dbf_column_names): New. Helper
5675 function for table_to_dbf
5676 (table_to_dbf): Deal with names longer than the 10 character limit
5677
5678 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): Add
5679 doc-string
5680 (TestTableToDBF.test_table_to_dbf_long_col_names): New test for
5681 long column names
5682
5683 2003-07-03 Bernhard Herzog <[email protected]>
5684
5685 * Doc/manual/thuban-manual.xml: Fix the CVS Revision Tag syntax
5686
5687 2003-07-03 Bernhard Herzog <[email protected]>
5688
5689 * Doc/manual/thuban-manual.xml, Doc/manual/README: New. Skeleton
5690 for the Thuban manual and README with some basic information about
5691 the manual
5692
5693 2003-07-03 Bernhard Herzog <[email protected]>
5694
5695 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
5696 Update doc-string
5697 (TransientJoinedTable.create): Do not modify the column objects of
5698 the input tables in place and copy all columns of the input tables
5699 into the joined table after all.
5700
5701 * test/test_transientdb.py
5702 (TestTransientTable.test_transient_joined_table_same_column_name):
5703 Update to reflect the new behavior
5704 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
5705 Update to reflect the new behavior
5706 (TestTransientTable.test_transient_joined_table_name_collisions_dont_modify_in_place):
5707 New test case for a bug which modified the column objects in place
5708
5709 2003-07-02 Jonathan Coles <[email protected]>
5710
5711 * Thuban/Model/classgen.py (generate_singletons,
5712 generate_uniform_distribution, generate_quantiles,
5713 GenQuantiles0): Make sure maxValue isn't less than
5714 one, otherwise we could divide by zero.
5715
5716 * test/test_classgen.py (ClassGenTest.doClassRangeTest,
5717 ClassGenTest.doClassSingleTest): Call doBoundsTest to
5718 check the end classification groups against the
5719 proper property values.
5720 (ClassGenTest.doBoundsTest): New. Checks the first and
5721 last classification groups to make sure their properties
5722 are the correct upper and lower bounds for a color ramp.
5723
5724 2003-07-02 Jonathan Coles <[email protected]>
5725
5726 * Thuban/Model/classgen.py (generate_singletons,
5727 generate_uniform_distribution, generate_quantiles,
5728 GenQuantiles0): The denominator was one to high when
5729 calculating the index for the ramp causing the index
5730 to never to reach one.
5731
5732 2003-07-02 Jonathan Coles <[email protected]>
5733
5734 Changed the singature of ClassGroupRange.__init__ and
5735 ClassGroupRange.SetRange() so that the min/max values are
5736 passed as a tuple. This makes a better calling scheme for
5737 when a Range object is passed instead.
5738
5739 * Thuban/Model/classgen.py: Fixed parameters to
5740 ClassGroupRange constructor.
5741
5742 * Thuban/Model/classification.py (ClassGroupRange.__init__):
5743 Consolidate the min/max parameters into a single _range which
5744 can either be a tuple or a Range object.
5745 (ClassGroupRange.SetRange): Consolidate the min/max parameters
5746 into a single _range which can either be a tuple or a Range object.
5747
5748 * Thuban/Model/load.py (SessionLoader.start_clrange): Fix
5749 call to ClassGroupRange constructor to use a tuple.
5750
5751 * Thuban/Model/layer.py (Layer.SetClassification): Switch
5752 the classification instance variable to the new class
5753 before calling _set_layer otherwise subscribers to a
5754 LAYER_CHANGED event will not see any difference.
5755
5756 * test/test_classification.py: Fix tests of ClassGroupRange
5757 so that they use the new signature.
5758
5759 * test/test_load.py: Fix use of ClassGroupRange so that it
5760 uses the new signature.
5761
5762 * test/test_load_0_2.py: Fix use of ClassGroupRange so that it
5763 uses the new signature.
5764
5765 * test/test_save.py: Fix use of ClassGroupRange so that it
5766 uses the new signature.
5767
5768
5769 2003-07-01 Jonathan Coles <[email protected]>
5770
5771 * Thuban/Model/classgen.py: Fixes RTbug #1972, 1971.
5772 Import used objects/class from color.
5773 (generate_singletons): We don't
5774 need the numGroups parameter anymore because we are using
5775 the new ramps with GetProperties().
5776 (generate_uniform_distribution): Use new ramp method
5777 GetProperties().
5778 (generate_quantiles, GenQuantiles0): Use new ramp method
5779 GetProperties().
5780 (CustomRamp.SetNumGroups): Removed. The ramps now map
5781 a value from 0 to 1 to class properties so the number
5782 of groups is not needed ahead of time.
5783 (CustomRamp.next): Removed. CustomRamp does not support
5784 interation anymore.
5785 (CustomRamp.GetProperties): Returns a ClassGroupProperties
5786 object based on the index value from 0 to 1 that is
5787 passed to it.
5788 (GreyRamp, RedRamp, GreenRamp, BlueRamp, GreenToRedRamp):
5789 Made into instances of Monochromatic class instread of
5790 deriving from it.
5791 (HotToCold.SetNumGroups): Removed. See CustomRamp.
5792 (HotToCold.next): Removed. See CustomRamp.
5793
5794 * Thuban/Model/classification.py: Fixes RTbug #1973, 1971.
5795 (Classification.SetField, Classification.SetFieldType):
5796 Replaced with SetFieldInfo.
5797 (Classification.SetFieldInfo): New. Does a better job of
5798 what SetField and SetFieldType used to do by combining
5799 their function since they should really always be done
5800 at the same time.
5801 (Classification.SetLayer): Renamed to _set_layer.
5802 (Classification._set_layer): Should only be called from
5803 Layer's SetClassification. This does not cause a recursive
5804 call as SetLayer did because we know that Layer knows about
5805 the classification.
5806
5807 * Thuban/Model/color.py: Fixes RTbug #1971.
5808 (_Transparent): Renamed from Transparent so it doesn't
5809 conflict with the module variable.
5810 (Transparent, Black): Renamed from Color.Transparent,
5811 Color.Black so they are not class variables.
5812
5813 * Thuban/Model/layer.py: Fixes RTbug #1971, 1973.
5814 (Layer.Destroy): We don't need to call SetClassification
5815 anymore to clear out the back reference in the classifcation
5816 to the layer. It's better to set it to None using _set_layer,
5817 and we won't be creating another clas object too.
5818 (Layer.SetClassification): Classification._set_layer is not
5819 recursive so remove all the locking variables. Also clean
5820 up the code so that it remains unchanged if something fails.
5821
5822 * Thuban/Model/load.py: Fixes RTbug #1971.
5823 (SessionLoader.start_classification): Call
5824 Classification.SetFieldInfo().
5825
5826 * Thuban/Model/save.py: Removed import of Color which wasn't
5827 being used.
5828
5829 * Thuban/UI/classgen.py: Fixes RTbug #1972.
5830 (ClassGenDialog.__init__): Color ramps are now instances
5831 already so we don't need to create any new objects.
5832 (ClassGenDialog.OnOK): Check for numGroups is no longer
5833 necessary because we never use it.
5834
5835 * Thuban/UI/classifier.py: Fixes RTbug #1971.
5836 (Classifier.__BuildClassification, Classifier.__SetGridTable):
5837 Call Classification.SetFieldInfo() instead of SetFieldType.
5838
5839 * Thuban/UI/renderer.py: Fixes RTbug #1971.
5840
5841 * Thuban/UI/view.py: Fixes RTbug #1974, 1971.
5842 (MapCanvas.__init__): Subscribe to the idle time event. Set
5843 background color to white.
5844 (MapCanvas.OnPaint): Set a flag indicating that we should
5845 render the map during idle time. If we already have a bitmap
5846 just draw it now.
5847 (MapCanvas.OnIdle): New. Render the map only during idle time.
5848 This also fixes a problem with the busy cursor under gtk.
5849
5850 * test/test_classgen.py (ClassGenTest.test_generate_singletons):
5851 Fix calls to generate_singletons because the signature changed.
5852
5853 * test/test_classification.py: Fix color references and
5854 change calls to Classification.[SetField|SetFieldType] to
5855 SetFieldInfo.
5856
5857 * test/test_load.py: Fix color references.
5858
5859 * test/test_load_0_2.py: Fix color references.
5860
5861 * test/test_save.py (SaveSessionTest.testClassifiedLayer):
5862 Change calls to Classification.[SetField|SetFieldType] to
5863 SetFieldInfo.
5864
5865 2003-07-01 Frank Koormann <[email protected]>
5866
5867 MERGE from the greater-ms3 branch.
5868
5869 * test/test_transientdb.py
5870 (TestTransientTable.test_transient_joined_table_with_equal_column_names):
5871 New. Test join of two tables with partly equal column names.
5872
5873 * Thuban/Model/transientdb.py (TransientJoinedTable.create):
5874 If duplicates in left and right tables column names are found,
5875 append '_' (underscores) to the name until it is unique.
5876 Create always new internal names for the resulting table and reference
5877 columns in the join statement with <table>.<column>
5878
5879 2003-07-01 Bernhard Herzog <[email protected]>
5880
5881 * test/test_transientdb.py
5882 (TestTransientTable.test_transient_joined_table_same_column_name):
5883 New. Test whether joining on columns with the same names in both
5884 tables works.
5885
5886 * Thuban/Model/transientdb.py (TransientJoinedTable.create): Make
5887 sure to use the right internal names even when joining on field
5888 with the same names in both tables. Also, detect duplicate names
5889 in the joined table correctly.
5890
5891 2003-07-01 Frank Koormann <[email protected]>
5892
5893 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
5894 Reverse List of layers to render in same order as in desktop legend.
5895
5896 2003-06-30 Jonathan Coles <[email protected]>
5897
5898 * Thuban/version.py (make_tuple): Takes a version string
5899 and splits it into a tuple of at most three integers.
5900 Used make_tuple() to make tuple versions of the version
5901 numbers.
5902
5903 * Thuban/UI/about.py: Add Thuban email addresses.
5904
5905 2003-06-30 Jonathan Coles <[email protected]>
5906
5907 * Thuban/version.py: SQLite/PySQLite version dependencies
5908 were too high.
5909
5910 2003-06-30 Jonathan Coles <[email protected]>
5911
5912 * Thuban/version.py: Update version to 0.8.1
5913
5914 * MANIFEST.in: Added Projections so that default.proj is
5915 included.
5916
5917 2003-06-26 Jonathan Coles <[email protected]>
5918
5919 New About box with lots more information including library
5920 versions and credits. More/better version checking before
5921 Thuban starts.
5922
5923 * Thuban/UI/about.py: New. New About box that displays
5924 library version information and credits.
5925
5926 * Thuban/version.py: Added new 'versions' dictionary which
5927 contains the verions of various libraries which are checked
5928 when the module loads.
5929 (verify_versions): Check all version numbers and returns
5930 a list of errors.
5931
5932 * Thuban/UI/classifier.py (Classifier.__EnableButtons):
5933 Reset the status of the buttons as the situation warrants,
5934 but in a better more reliable way by not relying on the
5935 current status to determine what needs to change.
5936
5937 * Thuban/UI/main.py (wxCHECK_VERSION): Removed. Not needed.
5938 (verify_versions): Remove most of the code since it is
5939 now in Thuban.version.verify_versions.o
5940
5941 * Thuban/UI/mainwindow.py (MainWindow.About): Call new
5942 About box in Thuban.UI.about.
5943
5944 * extensions/thuban/gdalwarp.cpp (get_gdal_version): New.
5945 Returns the version of gdal library being used as a string.
5946
5947 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
5948 Removed.
5949 (get_proj_version): Return the version of PROJ that the file
5950 was compiled with.
5951 (get_gtk_version): Return th version of GTK that the file
5952 was compiled with.
5953
5954 2003-06-25 Jonathan Coles <[email protected]>
5955
5956 * Thuban/UI/classifier.py (Classifier.EditSymbol): The parent
5957 of the SelectPropertiesDialog should be self so the window
5958 appears on top.
5959 (ClassGroupPropertiesCtrl.DoEdit): The parent
5960 of the SelectPropertiesDialog should be self so the window
5961 appears on top.
5962
5963 * Thuban/UI/resource.py: Cleaned up how we determine file
5964 extensions.
5965 (GetImageResource): Return an wxImage from our Resources.
5966
5967 2003-06-24 Jonathan Coles <[email protected]>
5968
5969 * Thuban/UI/renderer.py (ExportRenderer.render_legend):
5970 Check that a layer has a classification before trying
5971 to get it. Raster layers don't have classifications.
5972
5973 2003-06-23 Jonathan Coles <[email protected]>
5974
5975 * setup.py: Add Resources/XML to resource list.
5976
5977 2003-06-23 Jonathan Coles <[email protected]>
5978
5979 * setup.cfg: Fix copyright dates
5980
5981 2003-06-23 Jonathan Coles <[email protected]>
5982
5983 * MANIFEST.in: Update with Resources/XML
5984
5985 * setup.py: Don't include Locale resources yet as we don't
5986 have any and it causes problems building the distribution
5987 for Windows. Update version to 0.8.0.
5988
5989 * Doc/thuban.dtd: Removed since it is now in Resources/XML.
5990
5991 * Thuban/UI/mainwindow.py: Add blank line at the end because
5992 file was not being read correctly building the Windows
5993 distribution.
5994
5995 2003-06-23 Jonathan Coles <[email protected]>
5996
5997 * Thuban/UI/mainwindow.py (MainWindow.About): Fix text.
5998
5999 * Thuban/version.py: Temporarily update longversion for
6000 the 0.8 release so that it doesn't have the cvs revision.
6001
6002 2003-06-23 Jonathan Coles <[email protected]>
6003
6004 * Thuban/UI/common.py (ThubanBeginBusyCursor): Call wxSafeYield
6005 to make sure that we don't create reentrant possibilities with
6006 wxYield.
6007
6008 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxBeginBusyCursor()
6009 directly to avoid the wxSafeYield() call which generates an
6010 OnPaint event causing infinite recursion. Don't try to catch
6011 exception anymore. This was for before there were limits on map
6012 scaling.
6013
6014 2003-06-23 Bernhard Herzog <[email protected]>
6015
6016 Bug fix for RT #1961:
6017
6018 * Thuban/Model/load.py (SessionLoader.start_derivedshapesource):
6019 Register DerivedShapestores with the session
6020
6021 * Thuban/Model/session.py (Session.Tables): Make sure each table
6022 is only listed once.
6023
6024 * test/test_load.py (TestJoinedTable.test): Add check_format call.
6025 Update file contents to match the one written out.
6026
6027 2003-06-20 Bernhard Herzog <[email protected]>
6028
6029 * test/xmlsupport.py (SaxEventLister.startElementNS)
6030 (SaxEventLister.endElementNS): Do not include the qname. Python
6031 2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it
6032 is (presumably incorrectly) None, whereas it's a string with the
6033 element name in the later versions.
6034
6035 * test/test_xmlsupport.py (TestEventList.test_even_list_simple)
6036 (TestEventList.test_even_list_namespace): Update tests to reflect
6037 the new behaviour
6038 (TestEventList.test_even_list_id_normalization): Fix doc-string
6039
6040 2003-06-20 Jonathan Coles <[email protected]>
6041
6042 * Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden
6043 by deriving classes to determine if that layer supports shapes.
6044 (Layer): Override HasShapes and return true.
6045
6046 * Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor()
6047 instead of a direct call to wx[Begin|End]CusyCursor().
6048 (GenUniquePanel._OnRetrieve): Set busy cursor while retrieving
6049 table data.
6050
6051 * Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor):
6052 New. Wrappers around the wxWindows functions that allow us to
6053 make additional calls such as wxYield which gives the native
6054 system a chance to update the cursor correctly.
6055
6056 * Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor()
6057 instead of a direct call to wx[Begin|End]CusyCursor().
6058
6059 * Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor()
6060 instead of a direct call to wx[Begin|End]CusyCursor().
6061 (MapCanvas.find_shape_at): Check if the current search layer
6062 support shapes, otherwise go on to the next layer.
6063
6064 * test/test_layer.py: Add tests in each type of layer for
6065 HasClassification() and HasShapes()
6066
6067 2003-06-20 Jonathan Coles <[email protected]>
6068
6069 * Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after
6070 turning on the busy cursor to allow the system to change the
6071 cursor before we begin painting. This fixes a problem that
6072 was occuring only under GTK. Fixes RTbug #1840.
6073
6074 2003-06-20 Bernhard Herzog <[email protected]>
6075
6076 * Resources/XML/thuban-0.8.dtd: New DTD for the new file format
6077 version.
6078
6079 * Thuban/Model/save.py (sort_data_stores): New. Make topological
6080 sort of the data sources so they can be written with sources that
6081 data sources that depend on other data sources come after the
6082 sources they depend on.
6083 (SessionSaver.__init__): Add idmap instance variable to map from
6084 objects to the ids used in the file.
6085 (SessionSaver.get_id, SessionSaver.define_id)
6086 (SessionSaver.has_id): New. Methods to manage the idmap
6087 (SessionSaver.write): Use thuban-0.8.dtd
6088 (SessionSaver.write_session): Add a namespace on the session and
6089 write out the data sources before the maps.
6090 (SessionSaver.write_data_containers): New. Write the data
6091 containers.
6092 (SessionSaver.write_layer): Layer elements now refer to a
6093 shapestore and don't contain filenames anymore.
6094
6095 * Thuban/Model/load.py (LoadError): Exception class to raise when
6096 errors in the files are discovered
6097 (SessionLoader.__init__): Define dispatchers for elements with a
6098 thuban-0.8 namespace too.
6099 (SessionLoader.check_attrs): New helper method to check and
6100 convert attributes
6101 (AttrDesc): New. Helper class for SessionLoader.check_attrs
6102 (SessionLoader.start_fileshapesource)
6103 (SessionLoader.start_derivedshapesource)
6104 (SessionLoader.start_filetable, SessionLoader.start_jointable):
6105 Handlers for the new elements in the new fileformat
6106 (SessionLoader.start_layer): Handle the shapestore attribute in
6107 addition to filename.
6108 (SessionLoader.start_table, SessionLoader.end_table): Removed.
6109 They were never used in the old formats and aren't needed for the
6110 new.
6111
6112 * Thuban/Model/session.py (Session.DataContainers): New method to
6113 return all "data containers", i.e. shapestores and tables
6114
6115 * test/xmlsupport.py (SaxEventLister.__init__)
6116 (SaxEventLister.startElementNS, sax_eventlist): Add support to
6117 normalize IDs.
6118
6119 * test/test_xmlsupport.py
6120 (TestEventList.test_even_list_id_normalization): New test case for
6121 id normalization
6122
6123 * test/test_load.py (LoadSessionTest.check_format): Use ID
6124 normalization
6125 (LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New
6126 class atrributes used for ID normalization
6127 (TestSingleLayer, TestLayerVisibility, TestLabels.test)
6128 (TestLayerProjection.test, TestRasterLayer.test): Adapt to new
6129 file format
6130 (TestJoinedTable): New test for loading sessions with joined
6131 tables.
6132 (TestLoadError): New. Test whether missing required attributes
6133 cause a LoadError.
6134
6135 * test/test_save.py (SaveSessionTest.thubanids)
6136 (SaveSessionTest.thubanidrefs): New class attributes for ID
6137 normalization in .thuban files.
6138 (SaveSessionTest.compare_xml): Use id-normalization.
6139 (SaveSessionTest.testEmptySession)
6140 (SaveSessionTest.testLayerProjection)
6141 (SaveSessionTest.testRasterLayer)
6142 (SaveSessionTest.testClassifiedLayer): Adapt to new file format.
6143 (SaveSessionTest.testLayerProjection): The filename used was the
6144 same as for testSingleLayer. Use a different one.
6145 (SaveSessionTest.test_dbf_table)
6146 (SaveSessionTest.test_joined_table): New test cases for saving the
6147 new data sources structures.
6148 (TestStoreSort, MockDataStore): Classes to test the sorting of the
6149 data stores for writing.
6150
6151 * test/runtests.py: Add CVS keywords
6152
6153 2003-06-20 Jonathan Coles <[email protected]>
6154
6155 * test/test_session.py
6156 (UnreferencedTablesTests.test_unreferenced_tables_with_joins):
6157 Use the cultural_landmark-point.dbf file for the store so that
6158 the table rows and shape count match.
6159
6160 2003-06-20 Jonathan Coles <[email protected]>
6161
6162 * Thuban/Model/data.py (DerivedShapeStore.__init__): Raise
6163 an exception if the number of shapes is different from the
6164 number of rows in the table. Address RTbug #1933.
6165
6166 * test/test_layer.py (TestLayer.test_derived_store): Add
6167 a test for the new exception in DerivedShapeStore.__init__.
6168
6169 * test/support.py (FloatTestCase): Removed since there is
6170 already FloatComparisonMixin. Fixes RTbug #1954.
6171 (FloatComparisonMixin.assertFloatEqual): Include test for
6172 infinity that was part of FloatTestCase.
6173
6174 * test/test_range.py (RangeTest): Inherit from
6175 support.FloatComparisonMixin now that we don't have
6176 support.FloatTestCase.
6177
6178 2003-06-20 Bernhard Herzog <[email protected]>
6179
6180 * test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use
6181 the implementation in xmlsupport instead.
6182 (SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport
6183
6184 * test/test_proj.py: Import sax_eventlist from xmlsupport instead
6185 of test_save
6186
6187 2003-06-20 Bernhard Herzog <[email protected]>
6188
6189 * test/test_load.py (LoadSessionTest.check_format): New helper
6190 method to make sure the test files we load might have been written
6191 by the current thuban version.
6192 (ClassificationTest.TestLayers, TestSingleLayer.test)
6193 (TestLayerVisibility.test, TestClassification.test)
6194 (TestLabels.test, TestLayerProjection.test, TestRasterLayer.test):
6195 Add check_format() calls and fix the thuban data to match the data
6196 that would be written by saving the session loaded from it.
6197
6198 * test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of
6199 the same class and function in test_save.
6200
6201 * test/test_xmlsupport.py (TestEventList): New. test cases for
6202 sax_eventlist
6203
6204 2003-06-20 Bernhard Herzog <[email protected]>
6205
6206 * Resources/XML/thuban.dtd: Add comment about which versions of
6207 Thuban are covered by this DTD
6208 (map): Fix content model for layers and raster layers. There can
6209 be any number or layers and raster layers in any order.
6210
6211 2003-06-20 Jonathan Coles <[email protected]>
6212
6213 This is mainly about fixing RTbug #1949.
6214
6215 * Thuban/Model/classification.py: Remove "from __future__"
6216 import statement since python 2.2 is the earliest supported
6217 version.
6218
6219 * Thuban/Model/proj.py (Projection.GetProjectedUnits): New.
6220 Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES
6221 depending on the units this projection *forwards* into.
6222
6223 * Thuban/Model/save.py (SessionSaver.write_classification):
6224 Remove unnecessary use of lambdas and nested functions.
6225
6226 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale
6227 adjustment here if the map projection uses degrees.
6228
6229 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove
6230 scale adjust code since it is now done before calling
6231 this method. Don't do anything if the map projection
6232 is None.
6233
6234 2003-06-19 Bernhard Herzog <[email protected]>
6235
6236 Move version specific load tests to their own file.
6237
6238 * test/test_load.py: Expand the doc-string to explain a bit how to
6239 handle file format changes.
6240 (TestClassification.test): Update the docstring as this test is
6241 not about Thuban 0.2 anymore.
6242
6243 * test/test_load_0_2.py: New file with the load tests for thuban
6244 files created with Thuban 0.2 and earlier.
6245
6246 2003-06-19 Bernhard Herzog <[email protected]>
6247
6248 Add XML validation to some of the tests. Validation will only be
6249 done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html).
6250 To make the DTD available to the test cases it's moved into
6251 Resources/XML
6252
6253 * Resources/XML/thuban.dtd: New. This is now the real Thuban DTD
6254 for versions up to and including 0.2. Two slight changes: added an
6255 encoding specification and fixed the comment which refered to
6256 GRASS, not Thuban
6257
6258 * test/xmlsupport.py: New support module for tests involving XML.
6259 Currently there's a mix-in class for XML validation.
6260
6261 * test/test_xmlsupport.py: New. Tests for the xmlsupport module
6262
6263 * test/test_save.py (SaveSessionTest): Derive from ValidationTest
6264 so that we can validate the
6265 (SaveSessionTest.testEmptySession)
6266 (SaveSessionTest.testSingleLayer)
6267 (SaveSessionTest.testSingleLayer)
6268 (SaveSessionTest.testLayerProjection)
6269 (SaveSessionTest.testRasterLayer)
6270 (SaveSessionTest.testClassifiedLayer): Validate the generated XML
6271
6272 * test/runtests.py (main): Call print_additional_summary instead
6273 of print_garbage_information
6274
6275 * test/support.py (resource_dir): New function to return the
6276 "Resource" subdirectory
6277 (print_additional_summary): New function to combine several
6278 summary functions
6279 (run_tests): Use print_additional_summary instead of calling
6280 print_garbage_information directly
6281
6282 2003-06-19 Bernhard Herzog <[email protected]>
6283
6284 * Doc/thuban.dtd (classification): Correct the content model of
6285 the classification element.
6286 (projection): Add the "name" attribute
6287
6288 2003-06-19 Frank Koormann <[email protected]>
6289
6290 MERGE from the greater-ms3 branch.
6291
6292 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to
6293 scale if projection is latlong to get better estimate.
6294
6295 Fix problem of hidden properties dialog under windows after double
6296 click on layer tree:
6297 The tree control always gets an Expanded / Collapsed event after
6298 the ItemActivated on double click, which raises the main window again.
6299 We add a second ItemActivated event to the queue, which simply
6300 raises the already displayed window.
6301
6302 * Thuban/UI/legend.py (LegendTree.__init__): Instance variable
6303 raiseProperties initialized to prevent endless loops
6304 (LegendTree._OnItemActivated): Depending on self.raiseProperties
6305 simply raise the properties or open the dialog and issue a second
6306 event.
6307
6308 2003-06-18 Jonathan Coles <[email protected]>
6309
6310 * setup.py: Fix a few problems that occured under Windows.
6311
6312 2003-06-18 Jonathan Coles <[email protected]>
6313
6314 When Thuban loaded the map was redrawn twice because the
6315 legend was being opened after the mainwindow was created
6316 and not during its creation. This meant the map was drawn
6317 initially and then had to be redrawn when the legend
6318 caused the display to change. Now the legend is opened
6319 in the mainwindow constructor which resolves this issue.
6320
6321 Also, although we were checking for the existence of
6322 gdal and gdalwarp modules, the gdalwarp extension was
6323 still being compiled (which may fail if the system doesn't
6324 have gdal installed). the build_ext command to setup.py
6325 now accepts the flags --with-gdal and --without-gdal.
6326 If --without-gdal is specified setup.py will try to
6327 use the gdal parameters specified by gdal-config. Under
6328 windows, those parameters have to be set in setup.py
6329 as with proj4 an wxWindows.
6330
6331 * setup.py: Use a list instead of seperate variables for
6332 extension parameters so we can create a generic function
6333 that runs an appropriate *-config script.
6334 (run_cs_script): Renamed from run_wx_script and modified
6335 to accept a second argument which is a list of lists to
6336 be filled in by the values returned from running the command.
6337 (thuban_build_ext): New. Extends the build_ext command and
6338 provides the options --with-gdal/--without-gdal which then
6339 optionally includes the gdalwarp extension.
6340
6341 * Thuban/Model/resource.py: First check if we can import
6342 the gdalwarp Thuban extension before checking for gdal.
6343 Also added some comments.
6344
6345 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if
6346 the map is None which may be the case if none has been loaded
6347 yet.
6348
6349 * Thuban/UI/main.py (main): Remove call to ShowLegend.
6350
6351 * Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend().
6352
6353 * Thuban/UI/renderer.py: Check for gdal support before importing
6354 gdalwarp.
6355 (MapRenderer.render_map): Only try to optimize if we have gdal
6356 support otherwise nothing will get drawn.
6357
6358 * Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called
6359 during startup before a map has been created. Check if map is None
6360 before using it and do nothing if it is.
6361
6362 2003-06-17 Jonathan Coles <[email protected]>
6363
6364 Fix the problem with raster layers under Windows that caused
6365 Thuban to crash. The view should respond to layer projection
6366 changed events to update the display. Changes to a projection
6367 should not cause the map to be set to full extent.
6368
6369 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
6370 current_map_proj to remember the current map projection so that
6371 when the projection changes we know what the previous projection
6372 was.
6373 (MapCanvas.SetMap): Unsubscribe and subscribe to
6374 LAYER_PROJECTION_CHANGED events.
6375 (MapCanvas.projection_changed): Split into two methods that respond
6376 to map and layer projection changes.
6377 (MapCanvas.map_projection_changed): New. Takes the current view and
6378 projects it using the new projection. This does not cause the
6379 map to be redrawn at full extent.
6380 (MapCanvas.layer_projection_changed): New. Cause a redraw which
6381 will draw each layer in its new projection.
6382
6383 * extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call
6384 VSIFClose() not VSIFCloseL() to close the file. Fixes a crash
6385 under Windows.
6386
6387 * extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be
6388 to twice sizeof(void*) because there are two digits for each
6389 hex byte.
6390
6391 2003-06-16 Bernhard Herzog <[email protected]>
6392
6393 Update to the layer interface: Direct access to the table,
6394 shapetable, shapefile and filename attributes is now actively
6395 deprecated by issuing deprecation warnings for all places where
6396 this happens.
6397
6398 * Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
6399 to the instance variables table, shapetable, shapefile and
6400 filename via __getattr__ so that we can issue a deprecation
6401 warning.
6402 (Layer.SetShapeStore): Don't set the deprecated instance variables
6403 any more
6404 (Layer.SetShapeStore): Don't use deprecated layer instance
6405 variables
6406 (Layer.Destroy): No need to explicitly remove the instance
6407 variables any more
6408 (Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
6409 instance variables
6410
6411 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
6412 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
6413 (GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
6414 use deprecated layer instance variables
6415
6416 * Thuban/UI/classifier.py (Classifier.__init__): Don't use
6417 deprecated layer instance variables
6418
6419 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
6420 (IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
6421 instance variables
6422
6423 * Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
6424 deprecated layer instance variables
6425
6426 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
6427 deprecated layer instance variables
6428
6429 * Thuban/Model/save.py (SessionSaver.write_layer): Don't use
6430 deprecated layer instance variables
6431
6432 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
6433 (MapRenderer.polygon_render_param): Don't use deprecated layer instance
6434 variables
6435
6436 * test/runtests.py (main): Turn Thuban's deprecation warnings into
6437 errors so that they're cought by the tests
6438
6439 * test/test_load.py (TestSingleLayer.test): Don't use deprecated
6440 layer instance variables
6441
6442 2003-06-16 Jonathan Coles <[email protected]>
6443
6444 Fix a problem under Windows whereby if the user double-clicks on a
6445 layer in the legend that tree item will expand or collapse as well
6446 as open the layer properties dialog. The state of the tree item
6447 should not be affected.
6448
6449 * Thuban/UI/legend.py (LegendTree.__init__): Add instance variable
6450 preventExpandCollapse and subscribe to expanding and collapsing
6451 events.
6452 (LegendTree.OnItemExpandCollapse): New. Responds to expanding and
6453 collapsing events and will veto the event if it has been triggered
6454 by the user double clicking on a layer.
6455 (LegendTree._OnItemActivated): Set preventExpandCollapse to indicate
6456 that an expanding/collapsing event should be vetoed.
6457
6458 2003-06-13 Bernhard Herzog <[email protected]>
6459
6460 * Thuban/UI/classifier.py (Classifier.OnClose)
6461 (Classifier.map_layers_removed)
6462 (Classifier.layer_shapestore_replaced): Unsubscribe the messages
6463 in OnClose and not in map_layers_removed or
6464 layer_shapestore_replaced to make sure it always happens when the
6465 dialog is closed
6466
6467 2003-06-13 Jonathan Coles <[email protected]>
6468
6469 This puts back a fix for Windows where a panel is needed so that
6470 the background of the table view appears correctly.
6471
6472 * Thuban/UI/tableview.py (TableFrame.__init__): Add a panel
6473 object that can be used by derived classes to place any
6474 controls (including the grid) onto.
6475 (QueryTableFrame.__init__): Use the panel as the parent window
6476 for all the controls. Reparent the grid so that the panel is
6477 the parent. Call UpdateStatusText() to correctly initialize
6478 the status bar.
6479
6480 2003-06-13 Jonathan Coles <[email protected]>
6481
6482 * Thuban/UI/dialogs.py (ThubanFrame): New: a class that inherits
6483 from wxFrame (as opposed to wxDialog like the other classes)
6484 but otherwise behaves like the other classes. This is needed
6485 for the TableView which isn't really a dialog and needs to
6486 have a status bar and control buttons.
6487
6488 * Thuban/UI/tableview.py (TableGrid.__init__): Create an
6489 instance variable to keep track of how many rows are selected.
6490 Subscribe once to the the events we are interested in.
6491 (ThubanGrid.OnRangeSelect): Only handle event if event handling
6492 hasn't been turned off.
6493 (ThubanGrid.OnSelectCell): Only handle event if event handling
6494 hasn't been turned off.
6495 (ThubanGrid.ToggleEventListeners): Rather than subscribe None
6496 as an event listener (which changes the event handler stack)
6497 simply set an instance variable to False. This is checked in
6498 the event handlers.
6499 (ThubanGrid.GetNumberSelected): Return the number of currently
6500 selected rows.
6501 (TableFrame): Inherit from ThubanFrame so we can have a
6502 status bar and control buttons.
6503 (QueryTableFrame.__init__): Create a status bar. Fixes RTbug #1942.
6504 Explicitly set which items are selected in the operator choice and
6505 action choice so there is always a valid selection. Fixes RTbug #1941.
6506 Subscribe to grid cell selection events so we can update the
6507 status bar.
6508 (QueryTableFrame.UpdateStatusText): Update the status bar with
6509 how many rows are in the grid, how many columns, and how many
6510 rows are selected.
6511 (QueryTableFrame.OnGridSelectRange, QueryTableFrame.OnGridSelectCell):
6512 Call UpdateStatusText when cells are (de)selected.
6513 (QueryTableFrame.OnQuery): Use the string value in the value
6514 combo if either the selected item index is 0 or if the string
6515 cannot be found in the predefined list (this happens if the
6516 user changes the text). Fixes RTbug #1940.
6517 Only turn off the grid event listeners if there a query comes
6518 back with a none empty list of ids. in the case that the list
6519 is empty this causes a grid.ClearSelection() call to actually
6520 clear the grid selection which causes the selected items in
6521 the map to be deselected. Fixes RTbug #1939.
6522
6523 * test/test_save.py (XMLWriterTest.Encode): Check return values.
6524 Fixes RTbug #1851.
6525
6526 2003-06-13 Bernhard Herzog <[email protected]>
6527
6528 * Thuban/UI/identifyview.py (IdentifyView.__init__): Call
6529 self.selected_shape with the current selection to make sure the
6530 contents of the dialog are up to date when it's shown for the
6531 first time.
6532 The dialog used to work without this by luck. The recent fix to
6533 the connector module 'broke' a 'feature' the identify view was
6534 relying on, i.e that subscribing to a message in response to
6535 receiving a message of that type would mean that the new
6536 subscriber would also be called for the same message.
6537
6538 2003-06-12 Jonathan Coles <[email protected]>
6539
6540 * extensions/thuban/gdalwarp.cpp: Removed debug printing as
6541 the image is rendered. Fixes RTbug #1937.
6542
6543 2003-06-12 Jonathan Coles <[email protected]>
6544
6545 * Thuban/Lib/fileutil.py: As is done under Windows, create the
6546 user directory if it doesn't exist on a posix system.
6547 Fixes RTbug #1815.
6548
6549 * Thuban/Model/resource.py (get_user_proj_files): Moved the
6550 called to get_application_dir here, so that the directory
6551 will only be called if this method is invoked.
6552
6553 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Clear
6554 the projfilepath if no projection is selected.
6555
6556 2003-06-12 Jonathan Coles <[email protected]>
6557
6558 * Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Don't draw
6559 the scalebar if the current map has no projection set.
6560
6561 * Thuban/UI/projdialog.py (ProjFrame.__DoOnProjAvail): Set the
6562 projfilepath label to just the basename of the projection file
6563 rather than include the entire path.
6564
6565 * Thuban/Model/resource.py: Fix missed proj functions that
6566 needed to be renamed.
6567
6568 2003-06-12 Jonathan Coles <[email protected]>
6569
6570 * Thuban/Model/classification.py: Removed assert statements that
6571 tested if the variable was an instance of Color.
6572
6573 * Thuban/Model/color.py (Color): Remove commented code that isn't
6574 used.
6575 (Transparent): Renamed from NoColor. Doesn't inherit from Color.
6576 Fixes RTbug #1835.
6577 (Transparent.__eq__, Transparent.__ne, Transparent.__repr): New.
6578 Needed now that the class doesn't inherit from Color.
6579
6580 2003-06-12 Jonathan Coles <[email protected]>
6581
6582 * test/test_save.py (XMLWriterTest.testEncode): Explicitly
6583 check unicode strings.
6584
6585 * test/test_layer.py: Check for existence of gdal.
6586
6587 2003-06-12 Jonathan Coles <[email protected]>
6588
6589 * Thuban/Model/xmlreader.py: New. Contains the XMLReader class
6590 that was in load.py
6591
6592 * Thuban/Model/xmlwriter.py: New. Contains the XMLWriter class
6593 that was in save.py
6594
6595 2003-06-12 Jonathan Coles <[email protected]>
6596
6597 This is largely a collection of bug fixes. We also handle the
6598 case where gdal is not on the system. The XMLReader and XMLWriter
6599 classes were moved into there own files to resolve some circular
6600 import references and because they shouldn't really be in the
6601 file that is dediciated to reading/writing session files since
6602 they are also used elsewhere.
6603
6604 * Thuban/Model/classgen.py: Renamed functions to follow the
6605 function_names_with_underscores style. Fixes RTbug #1903.
6606 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
6607
6608 * Thuban/Model/layer.py: Import gdal only if it available.
6609 (RasterLayer): Handle the case where the gdal library is unavailable.
6610 Addresses RTbug #1877.
6611
6612 * Thuban/Model/load.py (XMLReader): Moved into seperate file
6613 xmlreader.py.
6614
6615 2003-06-12 Jonathan Coles <[email protected]>
6616
6617 This is largely a collection of bug fixes. We also handle the
6618 case where gdal is not on the system. The XMLReader and XMLWriter
6619 classes were moved into there own files to resolve some circular
6620 import references and because they shouldn't really be in the
6621 file that is dediciated to reading/writing session files since
6622 they are also used elsewhere.
6623
6624 * Thuban/Model/classgen.py: Renamed functions to follow the
6625 function_names_with_underscores style. Fixes RTbug #1903.
6626 (calculate_quantiles): Raise ValueError if 'percents' is invalid.
6627
6628 * Thuban/Model/layer.py: Import gdal only if it available.
6629 (RasterLayer): Handle the case where the gdal library is unavailable.
6630 Addresses RTbug #1877.
6631
6632 * Thuban/Model/load.py (XMLReader): Moved into seperate file
6633 xmlreader.py.
6634
6635 * Thuban/Model/save.py (escape, XMLWriter): Moved into seperate
6636 file xmlwriter.py.
6637
6638 * Thuban/Model/resource.py: Renamed functions to following the
6639 function_names_with_underscores style.
6640 (has_gdal_support): New function that returns true if the gdal
6641 library is available. Addresses RTbug #1877.
6642
6643 * Thuban/UI/application.py (ThubanApplication.OpenSession):
6644 Display a message box if the gdal library is not available, but
6645 only if there are any layers that would use it. Addresses RTbug #1877.
6646
6647 * Thuban/UI/classgen.py: Use renamed projection resource functions.
6648 (GenUniformPanel.__CalcStepping): Fix a slight discrepency
6649 when using integers versus floats.
6650
6651 * Thuban/UI/mainwindow.py (_has_gdal_support): New. Used to
6652 determine if the "Add Image Layer" menu option should be
6653 greyed out or not. Addresses RTbug #1877.
6654
6655 * Thuban/UI/projdialog.py: Use renamed projection resource functions.
6656
6657 * Thuban/UI/renderer.py (MapRenderer.render_map): Only try to
6658 optimize if a raster layer is visible. Fixes RTbug #1931.
6659 Only draw the raster layer if the gdal library is available.
6660 Addresses RTbug #1877.
6661
6662 * test/test_classgen.py: Add tests for generate_singletons,
6663 generate_uniform_distribution, generate_quantiles. Fixes RTbug #1903.
6664 (test_calculate_quantiles): Fix some tests to catch the new
6665 ValueError that is raised.
6666
6667 * test/test_proj.py: Use renamed projection resource functions.
6668
6669 * test/test_save.py (SaveSessionTest.testClassifiedLayer): New
6670 test for saving classified layers. Fixes RTbug #1902.
6671 (XMLWriterTest): New. Tests the XMLWriter class. Fixes RTbug #1851.
6672
6673 2003-06-12 Jan-Oliver Wagner <[email protected]>
6674
6675 Fix for http://intevation.de/rt/webrt?serial_num=1900.
6676
6677 * Thuban/UI/multiplechoicedialog.py: New. A multiple choice dialog.
6678
6679 * Thuban/UI/mainwindow.py: import wxMultipleChoiceDialog from
6680 multiplechoicedialog.py rather than from the wxPython library.
6681
6682 2003-06-11 Frank Koormann <[email protected]>
6683
6684 * Thuban/Lib/fileutil.py (get_application_dir): Minor stability
6685 update.
6686
6687 2003-06-11 Frank Koormann <[email protected]>
6688
6689 * Thuban/Lib/fileutil.py (get_application_dir): New function to
6690 determine the absolute .thuban/thuban directory under
6691 "posix" (os.expanduser) and "nt" (read AppData registry key).
6692
6693 * Thuban/Model/resource.py: Use get_application_dir
6694
6695 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
6696 Use get_application_dir.
6697
6698 2003-06-10 Bernhard Herzog <[email protected]>
6699
6700 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Subscribe to
6701 the messages MAP_LAYERS_REMOVED messages
6702 (LayerTableFrame.OnClose): Unsubscribe from it.
6703 (LayerTableFrame.map_layers_removed): New. Receiver for
6704 MAP_LAYERS_REMOVED. Close the dialog when the layer whose the
6705 dialog is showing is removed.
6706
6707 2003-06-10 Bernhard Herzog <[email protected]>
6708
6709 * Thuban/Lib/connector.py (Connector.Issue): Iterate over a copy
6710 of the receivers list so that unsubscribing in a receiver doesn't
6711 modify it while iterating over it.
6712
6713 * test/test_connector.py
6714 (ConnectorTest.test_disconnect_in_receiver): New. Test whether
6715 unsubscribing in a receiver works correctly. See docstring for
6716 details
6717
6718 2003-06-10 Bernhard Herzog <[email protected]>
6719
6720 * Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
6721 message.
6722
6723 * Thuban/Model/layer.py (Layer.SetShapeStore): Send
6724 LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
6725 LAYER_CHANGED will still be sent if the classification changes.
6726
6727 * Thuban/UI/classifier.py (Classifier.__init__): Add the map as
6728 parameter so we can subscribe to some of its messages
6729 (Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
6730 and the layer's LAYER_SHAPESTORE_REPLACED
6731 (Classifier.unsubscribe_messages): New. Unsubscribe from message
6732 subscribed to in __init__
6733 (Classifier.map_layers_removed)
6734 (Classifier.layer_shapestore_replaced): receivers for the messages
6735 subscribed to in __init__. Unsubscribe and close the dialog
6736
6737 * Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
6738 the map to the Classifier dialog
6739
6740 * test/test_layer.py (SetShapeStoreTests): Derive from
6741 SubscriberMixin as well so we can test messages
6742 (SetShapeStoreTests.setUp): Subscribe to some of the layer's
6743 messages
6744 (SetShapeStoreTests.tearDown): Clear the messages again
6745 (SetShapeStoreTests.test_sanity): Expand the doc-string and check
6746 for the modified flag too
6747 (SetShapeStoreTests.test_set_shape_store_modified_flag): New test
6748 to check whether SetShapeStore sets the modified flag
6749 (SetShapeStoreTests.test_set_shape_store_different_field_name)
6750 (SetShapeStoreTests.test_set_shape_store_same_field)
6751 (SetShapeStoreTests.test_set_shape_store_same_field_different_type):
6752 Add tests for the messages. This checks both the new
6753 LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED
6754
6755 2003-06-06 Jan-Oliver Wagner <[email protected]>
6756
6757 * Thuban/UI/mainwindow.py: Improved and partly added help texts for
6758 the menu items.
6759
6760 2003-06-05 Frank Koormann <[email protected]>
6761
6762 * Thuban/UI/identifyview.py (IdentifyView.__init__):
6763 Layout reimplemented without panel. Make life easier to fit the list
6764 in the dialog.
6765
6766 2003-06-05 Frank Koormann <[email protected]>
6767
6768 * Thuban/UI/projdialog.py (ProjFrame.__init__): Fill the projchoice
6769 once on initialisation (Former implementation resulted in multiple
6770 entries for each projection).
6771 (ProjFrame.__FillAvailList): selectProj as second optional parameter,
6772 if set, select the projection found under the specified name. This
6773 overwrites any other selection estimate.
6774 Removed projchoice filling from this method.
6775 (ProjFrame._OnSave, ProjFrame._OnAddToList):
6776 Updated call of ProjFrame.__FillAvailList
6777 (LCCPanel._DoLayout): Moved parameter controls in more common order.
6778
6779 * Resources/Projections/defaults.proj: Extended defaults representing
6780 various common European projections.
6781
6782 2003-06-05 Frank Koormann <[email protected]>
6783
6784 * Thuban/UI/identifyview.py (IdentifyView.__init__):
6785 Use ListCtrl instead of GridCtrl
6786
6787 * Thuban/Model/resource.py:
6788 Guess location of .thuban directory from tempdir parent directory.
6789
6790 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
6791 Guess location of .thuban directory from tempdir parent directory.
6792
6793 2003-06-04 Bernhard Herzog <[email protected]>
6794
6795 Do not cache the values returned by the tree widget's
6796 GetFirstChild and GetNextChild methods because it led to lots of
6797 segfaults. The new way requires more brute force but is more
6798 reliable.
6799
6800 * Thuban/UI/legend.py (LegendTree.__init__): Remove instance
6801 variable layer2id
6802 (LegendTree.find_layer): New method to do with brute force what
6803 layer2id tried to accomplish
6804 (LegendTree._OnMsgLayerChanged)
6805 (LegendTree._OnMsgLayerTitleChanged, LegendTree.__ShowHideLayer):
6806 Use find_layer instead of layer2id
6807 (LegendTree.__RemoveLayer, LegendTree.__AddLayer): No need to
6808 update layer2id anymore
6809 (LegendTree._OnMsgMapLayersRemoved)
6810 (LegendTree._OnMsgMapLayersAdded): Get by without layer2id.
6811
6812 2003-06-03 Thomas Koester <[email protected]>
6813
6814 * Thuban/Model/classgen.py (GenQuantiles0): New function.
6815
6816 2003-06-02 Bernhard Herzog <[email protected]>
6817
6818 * Thuban/UI/mainwindow.py (layer_rename command, table_rename command):
6819 New commands.
6820 (main_menu): Add the new commands.
6821 (MainWindow.TableRename): New. Implementation of the table_rename
6822 command.
6823 (MainWindow.RenameLayer): New. Implementation of the layer_rename
6824 command.
6825
6826 * Thuban/Model/session.py (Session.AddTable): call self.changed to
6827 set the modified flag
6828
6829 * test/test_session.py (TestSessionSimple.test_add_table): Test
6830 whether the modified flag is set properly
6831
6832 * Thuban/Model/base.py (TitledObject.SetTitle): Call changed
6833 instead of issue so that the modified flags get updated.
6834
6835 * test/test_base.py (SomeTitledObject): Derive from Modifiable
6836 instead of Publisher to reflect reality better and to accomodate
6837 the fact that SetTitle now calls changed instead of issue
6838
6839 2003-06-02 Bernhard Herzog <[email protected]>
6840
6841 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Resource
6842 acquisition has to happen before the try in a try-finally.
6843
6844 2003-06-02 Bernhard Herzog <[email protected]>
6845
6846 * Thuban/UI/legend.py (LegendTree._OnMsgMapLayersRemoved): It's
6847 possible that a layer is removed that is not currently selected in
6848 the legend so don't check for this.
6849
6850 2003-05-30 Bernhard Herzog <[email protected]>
6851
6852 * Thuban/Model/layer.py (Layer.Destroy): Set all instance
6853 variables to None that have direct or indirect references to
6854 shapefiles or dbf files to make sure that they do go away and the
6855 files are closed.
6856
6857 2003-05-30 Bernhard Herzog <[email protected]>
6858
6859 * Thuban/UI/legend.py (LegendTree.GetRootItem): Reset
6860 availImgListIndices when a new image list is created
6861
6862 2003-05-30 Bernhard Herzog <[email protected]>
6863
6864 * Thuban/UI/legend.py (LegendTree.__init__): New instance variable
6865 changing_selection to indicate whether the LegendTree code itself
6866 is currently changing the selection
6867 (LegendTree.normalize_selection): New method to normalize the
6868 selection by selecting the layer item even if the user clicked on
6869 the classification.
6870 (LegendTree._OnSelChanged): normalize the selection. This works
6871 around a bug in wx which doesn't keep track of the selection
6872 properly when subtrees are deleted.
6873
6874 2003-05-30 Bernhard Herzog <[email protected]>
6875
6876 * Thuban/UI/view.py (MapCanvas.set_view_transform): Limit the
6877 maximum and minimum scale factors.
6878
6879 * test/test_classgen.py (ClassGenTest.test): Update to reflect the
6880 changes in classgen.py
6881
6882 2003-05-30 Jonathan Coles <[email protected]>
6883
6884 * Thuban/Model/classgen.py: Remove ClassGenerator class but make
6885 all the methods functions. Fixes RTBug #1903.
6886
6887 * Thuban/Model/map.py (Map.TopLayer, Map.BottomLayer): Renamed
6888 to MoveLayerToTop and MoveLayerToBottom respectively. Fixes
6889 RTBug #1907.
6890
6891 * Thuban/UI/classgen.py: Use classgen functions that were part
6892 of the ClassGenerator class. Put try/finally blocks around
6893 code that uses wxBeginBusyCursor()/wxEndBusyCursor(). Fixes
6894 RTBug #1904.
6895
6896 * Thuban/UI/classifier.py: Remove unused import of ClassGenerator.
6897
6898 * Thuban/UI/legend.py: The legend was cleared and repopulated any
6899 time something changed which caused some state to be lost such
6900 as which children were expanded or collapsed. Fixes RTBug #1901.
6901 (LegendTree._OnMsgMapLayersAdded): Add only new layers.
6902 (LegendTree.__OnMsgMapLayersRemoved): Remove layers that exist in
6903 the legend but not in the map.
6904 (LegendTree.__FillTree): Move main functionality out into smaller
6905 methods that can be used by other methods.
6906 (LegendTree.__FillTreeLayer): Reuse old slots in the image list
6907 if they are available.
6908 (LegendTree.DeleteAllItems): Renamed from __DeleteAllItems so
6909 that we override the wxTreeCtrl method. Iterate over children
6910 and call __RemoveLayer.
6911 (LegendTree.__AddLayer): New. Add a new layer to the legend.
6912 (LegendTree.__RemoveLayer): Remove a layer from the legend.
6913 (LegendTree.DeleteChildren): New, overrides wxTreeCtrl method.
6914 Should only be called with the id of a layer branch.
6915 (LegendTree.GetRootItem): New, overrides wxTreeCtrl method.
6916 Returns the root item or creates one if necessary.
6917
6918 * Thuban/UI/renderer.py (MapRenderer.draw_raster_layer): Call
6919 ProjectRasterFile with tuple arguments instead of strings.
6920
6921 * Thuban/UI/tableview.py (QueryTableFrame.OnQuery): Wrap code
6922 with try/finally. Fixes RTBug #1904.
6923
6924 * Thuban/UI/view.py (MapCanvas.OnPaint): Wrap code
6925 with try/finally. Fixes RTBug #1904.
6926 (MapCanvas.FitSelectedToWindow): If a single point is selected
6927 simply center it on the display. Fixes RTBug #1849.
6928
6929 * extensions/thuban/gdalwarp.cpp: Removed code that allowed gdalwarp
6930 to be compiled as a standalone app. Now the code can only be
6931 called from Python which simplifies the parameter passing.
6932 (ProjectRasterFile): Handle Python arguments. Remove code that
6933 checks for a destination dataset. Add more clean up code.
6934
6935 * test/test_map.py (TestMapWithContents.test_raise_layer_top,
6936 TestMapWithContents.test_lower_layer_bottom):
6937 Test Map.MoveLayerToTop() and Map.MoveLayerToBottom() respectively.
6938 Fixes RTBug #1907.
6939
6940 * Thuban/UI/mainwindow.py (MainWindow.ToggleLegend): Apply a full
6941 extent to the map when the legend is toggled. Fixes RTBug #1881.
6942
6943 2003-05-29 Jan-Oliver Wagner <[email protected]>
6944
6945 * Thuban/UI/tableview.py (LayerTableFrame.OnClose): Bug-fix: Now
6946 unsubscribes all that is subcribed in __init__.
6947
6948 2003-05-28 Bernhard Herzog <[email protected]>
6949
6950 * Thuban/UI/mainwindow.py (MainWindow.DuplicateLayer)
6951 (MainWindow.CanDuplicateLayer): New methods to implement the
6952 Layer/Duplicate command.
6953 (layer_duplicate command): New.
6954 (main_menu): Add layer_duplicate to the Layer menu.
6955
6956 2003-05-28 Bernhard Herzog <[email protected]>
6957
6958 * Thuban/UI/tableview.py (NullRenderer.Draw): New. Our own
6959 renderer so that NULL/None values get displayed differently (by a
6960 gray rectangle).
6961 (TableGrid.__init__): Override the default renderers
6962
6963 2003-05-28 Bernhard Herzog <[email protected]>
6964
6965 * Thuban/Model/layer.py (Layer.SetShapeStore): Set the
6966 classification to "None" if the type of the field has changed.
6967
6968 * test/test_layer.py (SetShapeStoreTests): New. Class with a few
6969 test for the Layer.SetShapeStore method
6970
6971 2003-05-28 Jan-Oliver Wagner <[email protected]>
6972
6973 * Thuban/Model/layer.py (Layer.TreeInfo): Fixed a bug (a layer
6974 does not necessarily have a filename).
6975
6976 2003-05-28 Jan-Oliver Wagner <[email protected]>
6977
6978 * Thuban/UI/mainwindow.py (MainWindow.TableClose, MainWindow.TableShow):
6979 sort the selection list for the dialog.
6980
6981 2003-05-28 Frank Koormann <[email protected]>
6982
6983 * extensions/thuban/wxproj.cpp
6984 (project_point): Removed cast to int for projected point coordinates.
6985 (shape_centroid): Return last point if all polygon vertices fall
6986 to one point.
6987
6988 2003-05-28 Bernhard Herzog <[email protected]>
6989
6990 * Thuban/UI/mainwindow.py (_can_unjoin): Add doc-string and cope
6991 with layers that don't have shapestores, i.e. raster layers.
6992
6993 2003-05-28 Bernhard Herzog <[email protected]>
6994
6995 * Thuban/Model/table.py (DBFTable.__init__): Omit the extension
6996 when determining the title from the filename.
6997
6998 * test/test_dbf_table.py (TestDBFTable.test_title): Update to
6999 reflect changes in the way the title is derived from the filename
7000
7001 2003-05-28 Frank Koormann <[email protected]>
7002
7003 * Thuban/UI/mainwindow.py (MainWindow.TableShow):
7004 Added wxDEFAULT_DIALOG_STYLE to show table dialog styles.
7005
7006 2003-05-27 Bernhard Herzog <[email protected]>
7007
7008 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages): Also
7009 delegate SelectedLayer.
7010 (MainWindow.LayerUnjoinTable): Implement.
7011 (_can_unjoin): New. Helper function for the sensitivity of the
7012 layer/unjoin command.
7013
7014 * Thuban/Model/data.py (ShapefileStore.OrigShapeStore)
7015 (DerivedShapeStore.OrigShapeStore): New. Return the original
7016 shapestore. Used to figure out how to unjoin.
7017 (DerivedShapeStore.Shapefile): Fix a typo.
7018
7019 2003-05-27 Bernhard Herzog <[email protected]>
7020
7021 * Thuban/UI/join.py (JoinDialog): Extend to handle layer joins as
7022 well
7023 (JoinDialog.__init__): Use the layer parameter and only build the
7024 left choice when a layer is given
7025 (JoinDialog.OnJoin): Handle layer joins as well
7026 (JoinDialog.OnLeftTable, JoinDialog.OnRightTable): Handle the case
7027 that the user selects the "Select..." item. The sensitivitly
7028 updating is now in update_sensitivity
7029 (JoinDialog.y): New method to refactor the sensitivity update of
7030 the join button into its own method.
7031
7032 * Thuban/UI/mainwindow.py (MainWindow.LayerJoinTable): Implement.
7033
7034 2003-05-27 Bernhard Herzog <[email protected]>
7035
7036 * Thuban/UI/mainwindow.py (table_close command): Make it sensitive
7037 iff there are unreferenced tables in the session
7038
7039 2003-05-27 Bernhard Herzog <[email protected]>
7040
7041 * Thuban/Model/messages.py (TABLE_REMOVED): New message.
7042
7043 * Thuban/Model/session.py (Session.UnreferencedTables): New method
7044 to return tables that are not referenced by other tables or shape
7045 stores and can be removed.
7046 (Session.RemoveTable): Issue a TABLE_REMOVED message after
7047 removing the table
7048
7049 * Thuban/UI/mainwindow.py: Remove unused imports
7050 (MainWindow.TableClose): Implement.
7051
7052 * Thuban/UI/tableview.py (TableFrame.__init__): Subscribe to some
7053 messages so that the frame will be automatically closed when a new
7054 session is opened or the table is removed.
7055 (TableFrame.OnClose): Unsubscribe the Subscriptions made in
7056 __init__
7057 (TableFrame.close_on_session_replaced)
7058 (TableFrame.close_on_table_removed): New. Subscribers that close
7059 the window
7060
7061 * test/test_session.py (TestSessionMessages.test_remove_table)
7062 (TestSessionSimple.test_remove_table): Move the test to
7063 TestSessionSimple and add test for the TABLE_REMOVED message
7064 (TestSessionBase.setUp): Also subscribe to TABLE_REMOVED
7065 (TestSessionSimple.test_unreferenced_tables) New. Test for the
7066 UnreferencedTables method.
7067 (UnreferencedTablesTests): New. Class with some more sophisticated
7068 tests for UnreferencedTables.
7069
7070 2003-05-27 Frank Koormann <[email protected]>
7071
7072 * Thuban/UI/tableview.py (QueryTableFrame.__init__): The "_S_election"
7073 display has some unwanted side effects. Removed again.
7074
7075 2003-05-27 Frank Koormann <[email protected]>
7076
7077 * Resources/Bitmaps/legend_icon_layer.xpm: New, icon for legend.
7078
7079 * Thuban/UI/legend.py (LegendTree.__FillTree): Use "legend_icon_layer"
7080
7081 2003-05-27 Jan-Oliver Wagner <[email protected]>
7082
7083 * test/test_menu.py (MenuTest.test): Added test for
7084 Menu.RemoveItem().
7085
7086 * Thuban/UI/menu.py (Menu.RemoveItem): New. Remove an item from
7087 the menu.
7088
7089 2003-05-27 Frank Koormann <[email protected]>
7090
7091 Nonmodal dialogs without parent (i.e. they can fall behind the main
7092 window)
7093
7094 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Explicitly destroy
7095 all dialogs in the dialogs dictionary and the canvas.
7096
7097 * Thuban/UI/dialogs.py (NonModalNonParentDialog): New class, without
7098 parent, i.e. can fall behind other windows.
7099 (NonModalDialog.OnClose): Check is dialog is in mainwindow.dialog
7100 dictionary before removing it.
7101
7102 * Thuban/UI/classifier.py: Dialog derived from NonModalNonParentDialog
7103
7104 * Thuban/UI/projdialog.py: Dialog derived from NonModalNonParentDialog
7105 * Thuban/UI/tableview.py: Dialog derived from NonModalNonParentDialog
7106 * Thuban/UI/tree.py: Dialog derived from NonModalNonParentDialog
7107
7108 2003-05-27 Bernhard Herzog <[email protected]>
7109
7110 * Thuban/UI/mainwindow.py (MainWindow.ShowTableView): New. Open a
7111 tableview dialog
7112 (MainWindow.TableShow): Use ShowTableView to open the dialogs.
7113 Also, don't use the table's titles as the dialog names. The titles
7114 aren't guaranteed to be unique.
7115 (MainWindow.TableOpen): Open a table view dialog after opening the
7116 table
7117
7118 2003-05-27 Bernhard Herzog <[email protected]>
7119
7120 * Thuban/UI/mainwindow.py: Remove the Table/Hide menu item. Its
7121 effect can be achieved by simply closing the window showing the
7122 table.
7123 (MainWindow.TableHide): Removed.
7124 (main_menu): Removed "table_hide"
7125
7126 2003-05-27 Frank Koormann <[email protected]>
7127
7128 Fix legend tree display problems under Win32
7129
7130 * Thuban/UI/legend.py: BMP_SIZE_W = 15
7131 (LegendTree.__FillTree): Display "legend_icon_map.xpm" with layer title.
7132 (LegendTree.__FillTreeLayer): Explicitely set SelectedImage.
7133
7134 * Resources/Bitmaps/legend_icon_map.xpm: New icon for legend.
7135
7136 2003-05-27 Jan-Oliver Wagner <[email protected]>
7137
7138 * Thuban/UI/menu.py (Menu.InsertSeparator): Additional optional parameter
7139 'after' now allows to insert separators almost anywhere in the menu.
7140
7141 2003-05-27 Frank Koormann <[email protected]>
7142
7143 * Thuban/UI/tableview.py (QueryTableFrame.__init__): Underline the
7144 "S" of selection box label to hint on hot key (Alt-S). Works under
7145 Win32 but is ignored under GTK.
7146
7147 2003-05-26 Frank Koormann <[email protected]>
7148
7149 * Thuban/UI/projdialog.py (ProjFrame.__do_layout, ProjPanel._DoLayout):
7150 Center Choices.
7151
7152 2003-05-26 Bernhard Herzog <[email protected]>
7153
7154 Remove the Precision methods again. They're too DBF specific to be
7155 part of the table interface and they're only used in table_to_dbf
7156 anyway.
7157
7158 * Thuban/Model/transientdb.py (TransientTableBase.Width):Use a
7159 fixed precision of 12 for doubles.
7160 (TransientTableBase.Precision): Removed
7161 (AutoTransientTable.Width): Delegate to self.table.
7162
7163 * Thuban/Model/table.py (DBFTable.Precision)
7164 (MemoryTable.Precision): Removed.
7165 (MemoryTable.Width): Use a fixed precision of 12 for doubles.
7166 (table_to_dbf): Use a fixed precision of 12 for floats unless the
7167 column object specifies something else.
7168
7169 * test/test_dbf_table.py (TestTableToDBF.test_table_to_dbf): New.
7170 test for table_to_dbf
7171
7172 2003-05-26 Bernhard Herzog <[email protected]>
7173
7174 * test/test_transientdb.py
7175 (TestTransientTable.run_iceland_political_tests): Fix a comment.
7176
7177 2003-05-26 Bernhard Herzog <[email protected]>
7178
7179 * Thuban/UI/mainwindow.py (MainWindow.TableOpen): Real
7180 implementation. Mark parts of the file format strings for
7181 localization.
7182
7183 * Thuban/Model/session.py (Session.OpenTableFile): New. Open a dbf
7184 file and add the table to the tables managed by the session
7185
7186 * test/test_session.py (TestSessionSimple.test_open_table_file):
7187 New. test case for OpenTableFile
7188
7189 2003-05-26 Jan-Oliver Wagner <[email protected]>
7190
7191 * Thuban/UI/controls.py, Thuban/UI/identifyview.py, Thuban/UI/join.py,
7192 Thuban/UI/labeldialog.py, Thuban/UI/mainwindow.py,
7193 Thuban/UI/proj4dialog.py, Thuban/UI/tableview.py, Thuban/UI/view.py:
7194 Replace the true/false of wxWindows by True/False of Python 2.2.1.
7195
7196 2003-05-26 Jan-Oliver Wagner <[email protected]>
7197
7198 * Thuban/UI/tableview.py (LayerTableFrame.__init__): If there is
7199 already a selection present, update the grid accordingly.
7200
7201 * Thuban/UI/mainwindow.py (MainWindow.TableShow): Make the dialog
7202 resizeable and increase its initial size.
7203
7204 2003-05-26 Frank Koormann <[email protected]>
7205
7206 Table export functionality
7207
7208 * Thuban/Model/table.py (DBFTable.Width, MemoryTable.Width):
7209 Return width (in characters) for a column.
7210 (DBFTable.Precision, MemoryTable.Precision): Return decimal precision.
7211 (table_to_dbf): Write table to dbf file.
7212 (table_to_csv): Write table to csv file.
7213
7214 * Thuban/Model/transientdb.py (TransientTableBase.Width,
7215 TransientTableBase.Precision): Return column width and precision.
7216
7217 * Thuban/UI/tableview.py (QueryTableFrame.OnSaveAs): Call table_to_dbf
7218 or table_to_csv depending on file selection.
7219
7220 * test/test_dbf_table.py:
7221 Test table_to_dbf (extension of former part of test).
7222
7223 * test/test_csv_table.py:
7224 Test table_to_csv.
7225
7226 2003-05-23 Jan-Oliver Wagner <[email protected]>
7227
7228 * Thuban/UI/join.py (JoinDialog.OnJoin): Use _() for strings.
7229 Use QueryTableFrame instead of TableFrame.
7230
7231 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Prefix the
7232 table window with 'Layer Table:' instead of 'Table:'.
7233
7234 2003-05-23 Jan-Oliver Wagner <[email protected]>
7235
7236 Give all tables a title via mix-in TitledObject.LayerShowTable
7237
7238 * Thuban/Model/base.py (TitledObject.SetTitle): Call method 'issue'
7239 only if it exists.
7240
7241 * Thuban/Model/table.py (DBFTable, MemoryTable): mix-in TitledObject
7242 and call its init-method with a default title. Remove Title() method.
7243
7244 * Thuban/Model/transientdb.py (TransientTable, TransientJoinedTable,
7245 AutoTransientTable): mix-in TitledObject and call its init-method with
7246 a default title. Remove Title() method.
7247
7248 2003-05-23 Bernhard Herzog <[email protected]>
7249
7250 * Thuban/Model/session.py (Session.AddShapeStore): Define
7251 AddShapeStore analogously to AddTable.
7252
7253 * test/test_session.py (TestSessionSimple.test_add_shapestore):
7254 New. Test for AddShapeStore
7255
7256 2003-05-23 Jan-Oliver Wagner <[email protected]>
7257
7258 Introducing QueryTableFrame and a very coarse ShowTable implementation.
7259
7260 * Thuban/UI/tableview.py (LayerTableFrame, QueryTableFrame): Split the
7261 class LayerTableFrame into two classes, LayerTableFrame and QueryTableFrame.
7262 The latter implements the selection GUI without dependency on a layer.
7263 LayerTableFrame now is derived from QueryTableFrame and connects
7264 to a layer.
7265
7266 * Thuban/UI/mainwindow.py (MainWindow.TableShow): A very coarse
7267 implementation that still needs work.
7268
7269 * Thuban/Model/layer.py (Layer.TreeInfo): Added filename.
7270
7271 2003-05-22 Frank Koormann <[email protected]>
7272
7273 * Thuban/Model/transientdb.py (TransientJoinedTable.__init__):
7274 Added "outer_join = False" as optional parameter.
7275 (TransientJoinedTable.create): If outer join is true, perform a
7276 "LEFT OUTER JOIN" instead of "JOIN", which preserves all records of
7277 the left table. Records not matching are filled with 0 / None.
7278
7279 * Thuban/UI/join.py (JoinDialog.__init__): Checkbox for outer join.
7280 (JoinDialog.OnJoin): Consider outer join check box.
7281
7282 2003-05-22 Bernhard Herzog <[email protected]>
7283
7284 * Thuban/UI/join.py (JoinDialog.OnJoin): Use exc_info in a
7285 somewhat safer way. Storing the traceback in a local variable can
7286 lead to memory leaks
7287
7288 2003-05-22 Bernhard Herzog <[email protected]>
7289
7290 * Thuban/UI/join.py (JoinDialog.OnJoin): Make sure to really call
7291 the wxMessageDialog's Destroy() method.
7292
7293 2003-05-22 Frank Koormann <[email protected]>
7294
7295 * Thuban/UI/join.py (JoinDialog.__init__): Make use of
7296 TransientTable.Title()
7297
7298 2003-05-22 Frank Koormann <[email protected]>
7299
7300 Join Dialog, initial version.
7301
7302 * Thuban/UI/mainwindow.py (MainWindow.TableJoin): Removed print.
7303
7304 * Thuban/UI/join.py (JoinDialog): Functional implementation of
7305 former framework. Renamed Table1/Table2 to LeftTable/RightTable
7306 in all occurences.
7307
7308 * Thuban/Model/transientdb.py (TransientJoinedTable.__doc__):
7309 Typo fixed.
7310
7311 2003-05-22 Bernhard Herzog <[email protected]>
7312
7313 Give the tables titles so that the GUI can display more meaningful
7314 names. For now the titles are fixed but depend on e.g. filenames
7315 or the titles of the joined tables.
7316
7317 * Thuban/Model/transientdb.py (TransientTable.Title)
7318 (TransientJoinedTable.Title, AutoTransientTable.Title): New.
7319
7320 * Thuban/Model/table.py (DBFTable.Title, MemoryTable.Title): New.
7321
7322 * test/test_transientdb.py
7323 (TestTransientTable.test_auto_transient_table_title): New. Test
7324 for the Title method
7325 (TestTransientTable.test_transient_joined_table)
7326 (TestTransientTable.test_transient_table): Add test for the Title
7327 methods
7328
7329 * test/test_memory_table.py (TestMemoryTable.test_title): New.
7330 Test for the Title method
7331
7332 * test/test_dbf_table.py (TestDBFTable.test_title): New. Test for
7333 the Title method
7334
7335 2003-05-22 Bernhard Herzog <[email protected]>
7336
7337 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
7338 Provide a better way to destroy the layers
7339 (TestLayer.test_base_layer, TestLayer.test_arc_layer)
7340 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
7341 (TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
7342 the new way to destroy the layers.
7343 (TestLayer.test_derived_store): New. Test for using a layer with a
7344 DerivedShapeStore
7345
7346 * Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
7347 filename if the shape store actually has one.
7348
7349 2003-05-22 Bernhard Herzog <[email protected]>
7350
7351 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
7352 for the filename
7353
7354 * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
7355 for the FileName method
7356 (TestDBFTableWriting.test_write): Fix spelling of filename
7357
7358 2003-05-22 Thomas Koester <[email protected]>
7359
7360 * Thuban/Model/range.py, test/test_range.py: Brought over new Range
7361 from SciParam that now really is immutable.
7362
7363 2003-05-22 Frank Koormann <[email protected]>
7364
7365 Layer Top/Bottom placement added to legend.
7366
7367 * Thuban/UI/legend.py
7368 (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
7369 bound to tool events.
7370 (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
7371 New, methods binding the event methods with the map methods.
7372
7373 * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
7374 layer at top/bottom of layer stack.
7375
7376 * Resources/Bitmaps/top_layer.xpm: New button icon.
7377
7378 * Resources/Bitmaps/bottom_layer.xpm: New button icon.
7379
7380 2003-05-22 Bernhard Herzog <[email protected]>
7381
7382 * Thuban/Model/session.py (Session.RemoveTable): New method to
7383 remove tables
7384
7385 * test/test_session.py (TestSessionSimple.test_remove_table): New.
7386 Test for RemoveTable
7387
7388 2003-05-22 Thomas Koester <[email protected]>
7389
7390 * Thuban/Model/classgen.py: Added short module doc string and CVS id.
7391 (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
7392
7393 2003-05-22 Bernhard Herzog <[email protected]>
7394
7395 Implement a way to discover dependencies between tables and
7396 shapestores.
7397
7398 * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
7399 (TransientJoinedTable.Dependencies)
7400 (AutoTransientTable.SimpleQuery): New. Implement the dependencies
7401 interface
7402 (TransientJoinedTable.__init__): Keep tack of the original table
7403 objects in addition to the corresponding transient tables.
7404
7405 * Thuban/Model/table.py (DBFTable.Dependencies)
7406 (MemoryTable.Dependencies): New. Implement the dependencies
7407 interface
7408
7409 * Thuban/Model/data.py (ShapeTable): New. Helper class for
7410 ShapefileStore
7411 (ShapefileStore.__init__): Use ShapeTable instead of
7412 AutoTransientTable
7413 (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
7414 (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
7415 methods for filename and type
7416 (ShapefileStore.Dependencies): New. Implement the dependencies
7417 interface
7418 (DerivedShapeStore): New class to replace SimpleStore. The main
7419 difference to SimpleStore is that it depends not on a shapefile
7420 but another shapestore which expresses the dependencies a bit
7421 better
7422 (SimpleStore.__init__): Add deprecation warning.
7423
7424 * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
7425 Test for the Dependencies method.
7426
7427 * test/test_memory_table.py (TestMemoryTable.test_dependencies):
7428 New. Test for the Dependencies method.
7429
7430 * test/test_transientdb.py
7431 (TestTransientTable.test_auto_transient_table_dependencies): New.
7432 Test for the Dependencies method.
7433 (TestTransientTable.test_transient_joined_table): Add test for the
7434 Dependencies method.
7435
7436 * test/test_session.py (TestSessionSimple.setUp)
7437 (TestSessionSimple.tearDown): New. Implement a better way to
7438 destroy the sessions.
7439 (TestSessionSimple.test_initial_state)
7440 (TestSessionSimple.test_add_table): Bind session to self.session
7441 so that it's destroyed by tearDown
7442 (TestSessionSimple.test_open_shapefile): New. Test for
7443 OpenShapefile and the object it returns
7444
7445 2003-05-22 Bernhard Herzog <[email protected]>
7446
7447 * Thuban/Model/session.py (Session.AddTable): New method to
7448 register tables with the session.
7449 (Session.Tables): Return the tables registered with AddTable too.
7450
7451 * test/test_session.py (TestSessionSimple.test_add_table): New.
7452 Test case for the AddTable method
7453
7454 2003-05-22 Frank Koormann <[email protected]>
7455
7456 UI polishing updates: Place main buttons (OK, Cancel, etc) in the
7457 lower right corner, center labels for selections, initialize controls
7458 in reasonable order for keyboard navigation.
7459
7460 * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
7461 (ProjFrame.__DoOnProjAvail): Determine position of current projection
7462 using the wxListBox.FindString() method. Still a problem (#1886)
7463
7464 * Thuban/UI/classifier.py
7465 (Classifier.__init__, SelectPropertiesDialog.__init__)
7466
7467 * Thuban/UI/classgen.py (ClassGenDialog.__init__,
7468 (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
7469 different classification types from here to __init__.
7470 (GenUniquePanel.__init__): Set the column width of the first field
7471 in the Field ListCtrl to the full width.
7472
7473 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
7474 Button to 'Export'. Center Buttons in Selection Box, set Focus to
7475 Grid.
7476 (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
7477 changes focus to the Selection when pressing "Alt-S".
7478
7479 * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
7480 the text if not visible. The italic font sometimes exceeds the
7481 rendering area.
7482
7483 2003-05-21 Jonathan Coles <[email protected]>
7484
7485 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
7486 to OnClose so that Thuban closes correctly.
7487
7488 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
7489 DockFrame.OnClose, not DockFrame._OnClose.
7490
7491 2003-05-21 Jonathan Coles <[email protected]>
7492
7493 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
7494 references to 'inf' and use new Range __init__ to pass floats
7495 directly rather than converting them to strings first.
7496 Fixes RTBug #1876.
7497
7498 * Thuban/Model/classification.py (ClassGroupRange.SetRange):
7499 Use new Range ___init__ to pass floats.
7500
7501 * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
7502 filename is a valid image file. Throw IOError otherwise.
7503
7504 * Thuban/Model/range.py: Brought over new Range from SciParam that
7505 is immutable and has an __init__ which can accept floats.
7506
7507 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
7508 into try block. AddLayer doesn't throw any exceptions anymore.
7509 (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
7510 try block.
7511
7512 * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
7513 the first item in choices. Fixes RTBug #1882.
7514
7515 * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
7516 has gone to 0 which is a serious problem. abort.
7517 (MapRenderer.draw_raster_layer): Catch IOError seperately and
7518 print the error from GDAL.
7519
7520 * Thuban/UI/tableview.py (TableGrid.__init__): Call
7521 ToggleEventListeners to turn on listening.
7522 (TableGrid.ToggleEventListeners): New. Turns event listening on
7523 and off so as to prevent excessive messages.
7524 (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
7525 to suppress excessive messages when selecting many rows.
7526 Fixes RTBug #1880.
7527
7528 * Thuban/UI/view.py: Added checks against if scale == 0. This
7529 is a serious problem that can occur when an image without
7530 geo data is loading and causes the map projection bounds to
7531 go to infinity. Right now, the solution is to simply try
7532 to recover.
7533
7534 * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
7535 to set the MFILEReceiver attributes even if the data is NULL.
7536
7537 * extensions/thuban/gdalwarp.cpp: Improved the error handling
7538 and passed GDAL messages back up to the Python layer. Also
7539 tried to fix some memory leaks that were present in the original
7540 utility but didn't matter because the program aborted.
7541
7542 * test/test_range.py: Copied over tests from SciParam. Removed
7543 tests against importing. Fixes RTBug #1867.
7544
7545 2003-05-21 Bernhard Herzog <[email protected]>
7546
7547 * test/test_load.py: Remove unused imports and restructure the
7548 test code
7549 (LoadSessionTest): Split into one class for each test and turn
7550 LoadSessionTest itself into the base class for all such session
7551 tests.
7552 (ClassificationTest): New base class for load tests that test
7553 classifications
7554 (TestSingleLayer, TestLayerVisibility, TestClassification)
7555 (TestLabels, TestLayerProjection, TestRasterLayer): New classes
7556 for the individual tests
7557
7558 * test/support.py (FileLoadTestCase.filename): New base class for
7559 file loading tests
7560
7561 2003-05-21 Jan-Oliver Wagner <[email protected]>
7562
7563 * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
7564 Mercator' to 'UTM Zone 32' as a more convenient example.
7565 Added 'Gauss Krueger Zone 6'.
7566
7567 * Data/iceland_sample_raster.thuban: political polygon now
7568 filled transparent to have the raster image visible at once.
7569
7570 2003-05-21 Frank Koormann <[email protected]>
7571
7572 * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
7573 OnClose() to keep in sync with extensions. Internally Thuban
7574 still uses "underscored" names.
7575
7576 2003-05-20 Jonathan Coles <[email protected]>
7577
7578 This puts back Raster layer support. These layers support projections
7579 through the GDAL library. Currently, the CVS version is being used.
7580 There are no Debian packages available although this may change soon.
7581 A GDAL driver was extended to support writing to memory rather to
7582 files.
7583
7584 There is still some work that needs to be done, such as some error
7585 handling when loading invalid images or when there is a problem
7586 projecting the image. This putback simply checks in the majority
7587 of the work.
7588
7589 * setup.py: Add gdalwarp library extension.
7590
7591 * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
7592 Defaults to False, but can be overridden by subclasses if they
7593 support classification.
7594 (RasterLayer): New. Defines a new layer that represents an
7595 image.
7596
7597 * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
7598 tag handler.
7599 (SessionLoader.start_layer): Encode the filename.
7600 (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
7601 New. Supports reading a rasterlayer tag.
7602
7603 * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
7604
7605 * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
7606 get a string in Latin1. If we get such as string convert it to
7607 unicode first, otherwise leave if alone before encoding.
7608 (SessionSaver.write_layer): Add support for writing both Layers
7609 and RasterLayers.
7610
7611 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
7612 The right argument may not be a string, it could also be a Column.
7613
7614 * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
7615 Make initial window size 600x400. Fixes RTBug #1872.
7616
7617 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
7618 the dialog is constructed so that we can support layers that
7619 do not have classifications.
7620 (Classifier._OnTry): Only build a classification if the layer
7621 supports one.
7622
7623 * Thuban/UI/legend.py: Change all checks that a layer is an
7624 instance of Layer into checks against BaseLayer.
7625 (LegendTree.__FillTreeLayer): Only add children to a branch if
7626 the layer supports classification.
7627
7628 * Thuban/UI/mainwindow.py (MainWindow.NewSession,
7629 MainWindow.OpenSession): Don't proceed with an action if the
7630 user chooses Cancel when they are asked to save changes.
7631 (MainWindow.AddRasterLayer): New. Open a dialog to allow the
7632 user to select an image file. Create a new RasterLayer and add
7633 it to the map.
7634
7635 * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
7636 for rendering RasterLayer layers.
7637 (MapRenderer.draw_raster_layer): Actually method that calls
7638 the GDALWarp python wrapper and constructs an image from the
7639 data returned.
7640
7641 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
7642 Choices symbols to match those used in the table query method.
7643 Replace deprecated method calls on table with new method names.
7644
7645 * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
7646 how small the scale can get. This still needs more testing.
7647
7648 * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
7649 Provides a driver to output in .bmp format.
7650
7651 * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
7652 New. Provides IO routines which write to memory, rather than a file.
7653
7654 * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
7655 of the gdalwarp utility provided in GDAL. Added function calls
7656 that can be accessed from python.
7657
7658 * Data/iceland_sample_raster.thuban: New. Sample file that uses
7659 a raster layer.
7660
7661 * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
7662 layer image data.
7663
7664 * Doc/thuban.dtd: Added rasterlayer attribute definition.
7665
7666 * test/test_layer.py, test/test_load.py, test/test_save.py: Added
7667 tests associated with the raster layer code.
7668
7669 * test/test_transientdb.py
7670 (TestTransientTable.test_auto_transient_table_query): Added a test
7671 for using a Column object as the "right" parameter to a query.
7672
7673 2003-05-19 Frank Koormann <[email protected]>
7674
7675 * Thuban/version.py (get_changelog_date):
7676 Catch exceptions if ChangeLog does not exist.
7677
7678 * Thuban/UI/view.py (MapCanvas.Export): Bugfix
7679
7680 2003-05-19 Frank Koormann <[email protected]>
7681
7682 Extended version information for Thuban
7683
7684 * Thuban/version.py: New, version information for Thuban: Last
7685 modification date and last ChangeLog entry date.
7686
7687 * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
7688 information: Display Thuban, wxPython and Python version.
7689
7690 2003-05-16 Bernhard Herzog <[email protected]>
7691
7692 * Thuban/Model/save.py: Remove some unused imports including the
7693 __future__ import for nested_scopes as Thuban relies on Python 2.2
7694 now.
7695 (XMLWriter.encode): Remove the special case for a None argument.
7696 In the saver encode is always called with a string argument.
7697
7698 2003-05-16 Bernhard Herzog <[email protected]>
7699
7700 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
7701 in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
7702 of the bug was that e.g. float("1.2") would fail. Thuban now
7703 requires 2.4.x.
7704
7705 2003-05-16 Frank Koormann <[email protected]>
7706
7707 Printing enhancement and WMF export (under Win32)
7708
7709 * Thuban/UI/renderer.py (ExportRenderer): New, derived from
7710 ScreenRenderer. Renders Map, Legend and Scalebar for export.
7711 (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
7712 PrintRender.
7713
7714 * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
7715 to fullfil information needed for PrinterRenderer.
7716 (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
7717 (MapCanvas.Print): Adapted to new MapPrintout.
7718 (OutputTransform): General calculations to transform from canvas
7719 coordinates to export/printing devices.
7720
7721 * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
7722 new method_command to call ExportMap, with platform dependency (only
7723 __WXMSW__)
7724
7725 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
7726 of scalebar drawing area as new parameters.
7727
7728 * Thuban/Model/scalebar.py (roundInterval): round long instead of int
7729
7730 * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
7731 Update to extended scalebar.DrawScalebar header.
7732
7733 * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
7734
7735 * test/test_scalebar.py: Made test executable as standalone.
7736
7737 2003-05-16 Bernhard Herzog <[email protected]>
7738
7739 * Thuban/Model/table.py (Table): Remove this compatibility alias
7740 for DBFTable.
7741
7742 * test/test_table.py: Import DBFTable as Table because that alias
7743 doesn't exist anymore.
7744
7745 * Thuban/UI/classgen.py: Remove some unused imports
7746
7747 2003-05-14 Jonathan Coles <[email protected]>
7748
7749 * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
7750 Fix docstring.
7751 (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
7752 (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
7753 values of the supplied range to determine the beginning and end
7754 bounds of the generated classes.
7755
7756 * Thuban/Model/range.py (Range.number_re): Now accepts floats that
7757 do not have a leading 0 (.5 is now accepted as well as 0.5).
7758
7759 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
7760 call to ClassGenerator.GenUniformDistribution.
7761
7762 * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
7763 layout bug with the 'Projection' label.
7764
7765 * test/support.py (FloatTestCase): New. Needed for the Range tests.
7766
7767 * test/test_range.py: New. Imported from SciParam.
7768
7769 2003-05-12 Jonathan Coles <[email protected]>
7770
7771 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
7772 to table.UniqueValues() with calls that retrieve all the values
7773 from the table. This will need to be replaced by a method on table
7774 which can simply return the list (perhaps more efficiently).
7775
7776 2003-05-12 Jonathan Coles <[email protected]>
7777
7778 The return value of ClassGenerator.CalculateQuantiles has changed.
7779 Refer to the documentation for details.
7780
7781 * test/test_classgen.py: Modified Quantile tests to use the
7782 new return values.
7783
7784 * Thuban/Model/classgen.py
7785 (ClassGenerator.GenQuantiles): Add comments describing the parameters,
7786 use new return values from CalculateQuantiles to produce the correct
7787 range bounds in the Classification.
7788 (ClassGenerator.CalculateQuantiles): Add more comments describing
7789 the return values and parameters. Make minor adjustments to improve
7790 the legibility of the code. Fix problem with adjusted not being set
7791 in most cases.
7792
7793 2003-05-12 Frank Koormann <[email protected]>
7794
7795 * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
7796 and latin1. Fixes #1851 finally.
7797
7798 2003-05-09 Jonathan Coles <[email protected]>
7799
7800 * test/test_classgen.py: New. Tests the Quantile algorithm.
7801
7802 * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
7803 Clean up debugging statement, add comments, fix a small bug in the
7804 returned adjusted percentiles.
7805
7806 2003-05-09 Jonathan Coles <[email protected]>
7807
7808 Introduces Range class from SciParam into the ClassGroupRange class,
7809 and such ranges can now be saved and loaded from disk.
7810
7811 Quantiles are now available in the Classification Generator.
7812
7813 Initial support for building Queries on a table. Doesn't do anything
7814 but run some tests.
7815
7816 * Thuban/Model/classification.py: Explicit imports.
7817 (ClassGroupRange): Use the Range class to store the underlying
7818 range information. The interface remains the same, except for
7819 GetRange(), and you can also supply a Range object as the min
7820 parameter to SetRange or __init__.
7821
7822 * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
7823 string appropriately for use in Thuban. Fixes RTbug #1851.
7824 (SessionLoader.end_projection): Handle the context of the
7825 projection tag a bit better by looking at what objects are not
7826 None. There was an assumption that a projection tag for a map
7827 could occur before any layers.
7828 (SessionLoader.start_clrange): Provide backward compatibility for
7829 reading min/max values as well as the new range parameter.
7830
7831 * Thuban/Model/map.py: Explicit imports.
7832
7833 * Thuban/Model/resource.py: Import _.
7834 (ProjFileSaver.write): write header using projfile.dtd.
7835
7836 * Thuban/Model/save.py: Explicit imports.
7837 (XMLWriter.encode): New. Encode the given string from a format
7838 used by Thuban into UTF-8. Fixes RTbug #1851.
7839
7840 * Thuban/UI/classgen.py: Explicit imports.
7841 (ClassGenDialog.__init__): Clean up the code and add support
7842 for Quantiles.
7843 (ClassGenDialog.OnOK): Add support for Quantiles.
7844 (GenQuantilesPanel): New. Input panel for Quantiles.
7845 (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
7846 GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
7847
7848 * Thuban/Model/classgen.py: New. Contains all the classes named above.
7849
7850 * Thuban/UI/classifier.py: Explicit imports.
7851 (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
7852 ClassTable.SetValueAsCustom): Reworked to use new Range class.
7853
7854 * Thuban/UI/legend.py: Explicit imports.
7855
7856 * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
7857 a Table menu and associated method calls.
7858 (MainWindow.choose_color): Removed. No longer needed.
7859
7860 * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
7861 should be disabled if no projection is selected in the available
7862 list.
7863
7864 * Thuban/UI/renderer.py: Explicit imports.
7865
7866 * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
7867 with correctly selecting the rows and issuing the right events.
7868 Be sure to call Skip() to allow the grid to do some of its own
7869 handling which allows the rows to actually be selected.
7870 (LayerTableGrid.select_shapes): Rename from select_shape. Supports
7871 selecting multiple shapes.
7872 (LayerTableFrame): Support for building Queries.
7873 (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
7874
7875 * Thuban/UI/tree.py: Explicit imports.
7876
7877 * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
7878 table view can call it.
7879
7880 * test/test_classification.py: Explicit imports.
7881 (TestClassification.test_ClassGroupRange): Fix test for new
7882 Range class.
7883
7884 * Doc/thuban.dtd: Add range parameter for clrange.
7885
7886 * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
7887 object in ClassGroupRange, and also uesd for inputting ranges in
7888 the classifer table and elsewhere.
7889
7890 * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
7891 yet.
7892
7893 2003-05-09 Frank Koormann <[email protected]>
7894
7895 * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
7896
7897 2003-05-08 Frank Koormann <[email protected]>
7898
7899 Coding style updates
7900
7901 * test/test_scalebar.py: Replaced tab indentation by spaces.
7902
7903 * Thuban/UI/scalebar.py: Explicit imports.
7904
7905 2003-05-08 Frank Koormann <[email protected]>
7906
7907 * Thuban/UI/scalebar.py
7908 (ScaleBar.DrawScalebar): Format string bug fixed.
7909
7910 2003-05-08 Frank Koormann <[email protected]>
7911
7912 Reorganization of scalebar component (no wx in Thuban/Model)
7913
7914 * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
7915 (deriveInterval):
7916 Calculate scalebar interval and unit which fits in width for scale.
7917 (roundInterval): Round float.
7918
7919 * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
7920
7921 * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
7922
7923 * Thuban/UI/legend.py: Import Thuban.UI.scalebar
7924
7925 2003-05-08 Frank Koormann <[email protected]>
7926
7927 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
7928 Initialize ScaleBar with canvas.map
7929
7930 * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
7931 round intervals to display smarter lengths
7932 (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
7933 layer. If the maps has no projection applied grey the scalebar.
7934
7935 2003-05-07 Frank Koormann <[email protected]>
7936
7937 Basic Scalebar features added.
7938
7939 * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
7940
7941 * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
7942 (ScaleBarBitmap): New, links the scalebar bitmap with view messages
7943 and the renderer.
7944
7945 * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
7946
7947 * Thuban/UI/messages.py: SCALE_CHANGED added.
7948
7949 2003-05-07 Bernhard Herzog <[email protected]>
7950
7951 * Thuban/Model/session.py (Session.__init__): New instance
7952 variable shapestores to hold a list of all open shapestore objects
7953 (Session.ShapeStores): New. Accessor method for the shapestores
7954 list.
7955 (Session._add_shapestore, Session._clean_weak_store_refs): New.
7956 Internal methods to maintain the shapestores list.
7957 (Session.Tables): New. Return all tables open in the session.
7958 (Session.OpenShapefile): Insert the new ShapeStore into the
7959 shapestores list.
7960
7961 * test/test_session.py (TestSessionSimple.test_initial_state): Add
7962 tests for ShapeStores and Tables
7963 (TestSessionWithContent.test_shape_stores)
7964 (TestSessionWithContent.test_tables): New. Test cases for
7965 ShapeStores and Tables
7966
7967 2003-05-07 Bernhard Herzog <[email protected]>
7968
7969 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
7970 Add comments about the optimizations used.
7971 (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
7972 Implement the ReadValue table interface method.
7973
7974 * test/test_transientdb.py
7975 (TestTransientTable.run_iceland_political_tests)
7976 (TestTransientTable.test_transient_joined_table): Add tests for
7977 ReadValue
7978
7979 2003-05-07 Frank Koormann <[email protected]>
7980
7981 * Resources/Bitmaps/fulllayerextent.xpm,
7982 Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
7983 new icons.
7984
7985 2003-05-06 Bernhard Herzog <[email protected]>
7986
7987 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
7988 New. Simply delegate to the transient table's version.
7989
7990 * test/test_transientdb.py
7991 (TestTransientTable.test_auto_transient_table_query): New. Test
7992 case for AutoTransientTable's SimpleQuery
7993
7994 2003-05-06 Bernhard Herzog <[email protected]>
7995
7996 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
7997 Implement a simple query method for the query dialog
7998 (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
7999 the row index or shapeid.
8000 (TransientTable.create): Insert the right value of the row index
8001 (TransientJoinedTable.create): Copy the row index of the left
8002 table to the joined result table
8003
8004 * test/test_transientdb.py
8005 (TestTransientTable.test_transient_table_read_twice): Fix
8006 doc-string
8007 (TestTransientTable.test_transient_table_query): New. Test for the
8008 SimpleQuery method
8009
8010 2003-05-06 Bernhard Herzog <[email protected]>
8011
8012 Convert all table users to use the new table interface. This only
8013 covers Thuban itself, not GREAT-ER or other applications built on
8014 Thuban yet, so the compatibility interface stays in place for the
8015 time being but it now issues DeprecationWarnings.
8016
8017 Finally, the new Table interface has a new method, HasColumn.
8018
8019 * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
8020 issue deprecation warnings when they're. The warnings refer to the
8021 caller of the method.
8022 (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
8023 for the deprecation warnings
8024
8025 * test/test_table.py: Ignore the deprecation warnings for the old
8026 table in the tests in this module. The purpose of the tests is to
8027 test the old interface, after all.
8028
8029 * test/test_transientdb.py
8030 (TestTransientTable.run_iceland_political_tests): Use the
8031 constants for the types. Add a test for HasColumn
8032 (TestTransientTable.test_transient_joined_table): Adapt to new
8033 table interface. Add a test for HasColumn
8034 (TestTransientTable.test_transient_table_read_twice): Adapt to new
8035 table interface
8036
8037 * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
8038 Adapt to new table interface
8039
8040 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
8041 new table interface
8042
8043 * Thuban/UI/controls.py (RecordListCtrl.fill_list)
8044 (RecordTable.SetTable): Adapt to new table interface
8045
8046 * Thuban/UI/classifier.py (Classifier.__init__)
8047 (Classifier.__init__): Adapt to new table interface
8048
8049 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
8050 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
8051 to new table interface
8052
8053 * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
8054 (AutoTransientTable.HasColumn): Implement the new table interface
8055 method
8056 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
8057 (AutoTransientTable.UniqueValues): Adapt to new table interface
8058
8059 * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
8060 Adapt to new table interface
8061
8062 * test/test_layer.py (TestLayer.open_shapefile): Helper method to
8063 simplify opening shapefiles a bit easier.
8064 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
8065 (TestLayer.test_point_layer): Use the new helper method
8066 (TestLayer.test_get_field_type): New. Test for the GetFieldType
8067 method
8068
8069 * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
8070 the new table method
8071
8072 * test/test_memory_table.py (TestMemoryTable.test_has_column):
8073 Test for the new table method HasColumn
8074
8075 2003-05-06 Jonathan Coles <[email protected]>
8076
8077 Addresses the "Selection Extent" wish of RTbug #1787.
8078
8079 * Resources/Bitmaps/fulllayerextent.xpm,
8080 Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
8081 extent. These are just place holders for the real bitmaps.
8082
8083 * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
8084 calculate the bounding box once (the first time compute_bbox() is
8085 called).
8086 (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
8087 the bounding box for the shapes in lat/long coordinates.
8088
8089 * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
8090 option.
8091 (MainWindow.has_selected_shapes): New. Returns true if there are
8092 any selected shapes.
8093 (MainWindow.FullSelectionExtent): New. Calls
8094 MapCanvas.FitSelectedToWindow() when the user selects the menu option.
8095 (_has_selected_shapes): New. Returns true if there are any
8096 selected shapes.
8097
8098 * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
8099 true if there are any selected shapes.
8100
8101 * Thuban/UI/view.py (MapCanvas): Added delegated method
8102 HasSelectedShapes.
8103 (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
8104 shapes on the canvas using the map projection (if any).
8105
8106 * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
8107 for Layer.ShapesBoundingBox().
8108
8109 2003-05-06 Bernhard Herzog <[email protected]>
8110
8111 * Resources/Projections/defaults.proj: Fix spelling of Mercator
8112
8113 2003-05-05 Jonathan Coles <[email protected]>
8114
8115 Addresses the "Full Layer Extent" wish of RTbug #1787.
8116
8117 * Resources/Projections/defaults.proj: Added UK National Grid.
8118
8119 * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
8120 (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
8121 when the user selects the menu option.
8122
8123 * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
8124 scales the given layer on the canvas using the map projection.
8125
8126 2003-05-05 Bernhard Herzog <[email protected]>
8127
8128 Convert the table implementations to a new table interface. All
8129 tables use a common mixin class to provide backwards compatibility
8130 until all table users have been updated.
8131
8132 * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
8133 provide backwards compatibility for table classes implementing the
8134 new interface
8135 (DBFTable, MemoryTable): Implement the new table interface. Use
8136 OldTableInterfaceMixin as base for compatibility
8137 (DBFColumn, MemoryColumn): New. Column description for DBFTable
8138 and MemoryTable resp.
8139
8140 * test/test_dbf_table.py: New. Test cases for the DBFTable with
8141 the new table interface.
8142
8143 * test/test_memory_table.py: New. Test cases for the MemoryTable
8144 with the new table interface.
8145
8146 * test/test_table.py: Document the all tests in this file as only
8147 for backwards compatibility. The equivalent tests for the new
8148 interface are in test_memory_table.py and test_dbf_table.py
8149 (MemoryTableTest.test_read): field_info should be returning tuples
8150 with four items
8151 (MemoryTableTest.test_write): Make doc-string a more precise.
8152
8153 * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
8154 table interface. Derive from from OldTableInterfaceMixin for
8155 compatibility.
8156 (TransientTableBase.create): New intance variable column_map to
8157 map from names and indices to column objects
8158 (TransientTable.create): Use the new table interface of the input
8159 table
8160 (AutoTransientTable): Convert to new table interface. Derive from
8161 from OldTableInterfaceMixin for compatibility.
8162 (AutoTransientTable.write_record): Removed. It's not implemented
8163 yet and we still have to decide how to handle writing with the new
8164 table and data framework.
8165
8166 * test/test_transientdb.py
8167 (TestTransientTable.run_iceland_political_tests)
8168 (TestTransientTable.test_transient_joined_table): Use the new
8169 table interface
8170
8171 2003-05-05 Jonathan Coles <[email protected]>
8172
8173 This is namely a collection of UI updates to improve user interactivity.
8174 Tabbing between controls now exists and you can use ESC to close dialog
8175 boxes; ENTER will active the default button.
8176
8177 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
8178 order that the controls are created so that tabbing works correctly.
8179 (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
8180 wxDialog can handle the default button correctly.
8181 (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
8182 same reasons as for OnOK.
8183 (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
8184 when we ask the table for the maximum/minimum values of a field
8185 which could take a very long time.
8186
8187 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
8188 order that the controls are created so that tabbing works correctly.
8189 (SelectPropertiesDialog.__init__): Rearrange the order that the
8190 controls are created so that tabbing works correctly.
8191
8192 * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
8193 to derive from a wxDialog but behave like the original implementation
8194 which was derived from a wxFrame. wxDialog provides useful key
8195 handling functionality like ESC calling OnCancel and ENTER calling
8196 OnOK which is lost with wxFrame.
8197
8198 * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
8199 new dialogs.
8200
8201 * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
8202 order that the controls are created so that tabbing works correctly.
8203 (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
8204 (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
8205 (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
8206 (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
8207 can provide the "UK National Grid" as a default projection.
8208 (UTMPanel.__init__): Rearrange the order that the controls are
8209 created so that tabbing works correctly.
8210
8211 2003-05-05 Bernhard Herzog <[email protected]>
8212
8213 * extensions/thuban/wxproj.cpp: Fix some of the comments.
8214 (project_point): If a map projection but no layer projection is
8215 given, convert degrees to radians before applying the map
8216 projection.
8217
8218 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
8219 (TableGrid.allow_messages): New methods to make it possible to
8220 inhibit message sending.
8221 (TableGrid.issue): Only send the message if not inhibited.
8222 (LayerTableGrid.select_shape): Use the new methods to make sure
8223 that no ROW_SELECTED message is sent while we're updating the
8224 selected rows to match the selected shapes.
8225
8226 2003-05-02 Jan-Oliver Wagner <[email protected]>
8227
8228 Implementation of MemoryTable.
8229
8230 * Thuban/Model/table.py (MemoryTable): New. Quite simple table
8231 implementation that operates on a list of tuples. All of the data
8232 are kept in the memory.
8233
8234 * test/test_table.py (MemoryTableTest): New.
8235
8236 * test/test_transientdb.py (SimpleTable): Removed.
8237 (TestTransientTable.test_transient_joined_table,
8238 (TestTransientTable.test_transient_table_read_twice): Replaced
8239 SimpleTable by MemoryTable.
8240
8241 2003-04-30 Jonathan Coles <[email protected]>
8242
8243 * Data/iceland_sample.thuban: Now contains correct projections
8244 for each of the layers.
8245
8246 * Resources/Projections/defaults.proj: Geographic projection
8247 contains unit conversion parameter.
8248
8249 2003-04-30 Jonathan Coles <[email protected]>
8250
8251 The most important part of this putback is the projection changes.
8252 It should now be possible to specify the projection that a layer
8253 is in and then specify a different projection for the map. The
8254 projection dialog has an extra parameter for a geographic projection
8255 which lets the user select if the input is in degrees or radians.
8256
8257 * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
8258 to say that the parameter is a tuple of unprojected
8259 points (which is what the callers to this method were assuming).
8260 Also, since the points are unprojected we need to projected them.
8261
8262 * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
8263 LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
8264 groups are selected, move the layer up/down. Fixes RTbug #1833.
8265
8266 * Thuban/UI/mainwindow.py: Move menu item map_rename up.
8267
8268 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
8269 parameter in call to SetClientData.
8270 (GeoPanel): Add support for selecting the units that the
8271 source data is in (Radians or Degrees).
8272
8273 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
8274 the rendering loop by reducing the number of if's, removing the
8275 unnecessary try/except block, and checking if the old group
8276 is the same as the new one (which happens a lot if there is
8277 no classification, or lots of shapes are in the same group).
8278
8279 * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
8280 around the redraw routine to try to catch problems that the user
8281 may create by selecting invalid projections for the data set and
8282 map. Clears the display if there are any problems and prints the
8283 error.
8284 (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
8285 rectangle.
8286
8287 * extensions/thuban/wxproj.cpp (project_point): First invert the
8288 supplied point (which should be in projected coordinates) using
8289 the layer's projection and then project the point using the
8290 map's projection.
8291 (project_points): Use project_point() to project each point.
8292
8293 2003-04-30 Jan-Oliver Wagner <[email protected]>
8294
8295 * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
8296 don't set the Classification to None if the classfication field
8297 is None (ie only a DEFAULT).
8298
8299 2003-04-30 Bernhard Herzog <[email protected]>
8300
8301 * Thuban/UI/view.py: Fix some typos.
8302
8303 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
8304 not pop up the dialog if the selection becomes empty (this could
8305 happen if e.g. a new selection is opened while the identify tool
8306 is active and dialog had been closed)
8307
8308 2003-04-30 Bernhard Herzog <[email protected]>
8309
8310 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
8311 instance variable read_record_last_result
8312 (TransientTableBase.read_record): Make sure reading the same
8313 record twice works. The implementation uses the new instance
8314 variable read_record_last_result
8315
8316 * test/test_transientdb.py
8317 (TestTransientTable.test_transient_table_read_twice): New test
8318 case for the above bug-fix.
8319
8320 2003-04-29 Jonathan Coles <[email protected]>
8321
8322 * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
8323
8324 * Thuban/UI/classgen.py: Remove all uses of Str2Num.
8325
8326 * Thuban/UI/classifier.py: Remove all uses of Str2Num.
8327 (ClassTable.SetValueAsCustom): Rename keyword argument in
8328 ClassGroup* constructors to match argument name.
8329
8330 2003-04-29 Bernhard Herzog <[email protected]>
8331
8332 * Thuban/Model/session.py (Session.Destroy): Explicitly close the
8333 transient DB if it exists to make sure it doesn't leave a journal
8334 file in the temp directory.
8335
8336 * Thuban/Model/transientdb.py (TransientDatabase.close): Set
8337 self.conn to None after closing the connection to make sure it's
8338 not closed twice
8339
8340 2003-04-29 Jonathan Coles <[email protected]>
8341
8342 Add a visible parameter in the layer XML tag. The default value is
8343 "true". If anything other than "false" is specified we also assume
8344 "true". Addresses RTbug #1025.
8345
8346 * Doc/thuban.dtd: Add visible parameter to a layer.
8347
8348 * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
8349 of visible from 1 to True.
8350 (Layer.__init__): Change default value of visible from 1 to True.
8351
8352 * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
8353 parameter.
8354
8355 * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
8356 parameter.
8357
8358 * test/test_load.py: Add new test data contents_test_visible.
8359 (LoadSessionTest.setUp): save test data.
8360 (LoadSessionTest.testLayerVisibility): Test if the visible flag
8361 is loaded correctly.
8362
8363 * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
8364 for saving an invisible layer.
8365
8366 2003-04-29 Jonathan Coles <[email protected]>
8367
8368 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
8369 legend dialog box and tell it to change its map to the one
8370 supplied to SetMap(). Fixes RTbug #1770.
8371
8372 2003-04-29 Bernhard Herzog <[email protected]>
8373
8374 Next step of table implementation. Introduce a transient database
8375 using SQLite that some of the data is copied to on demand. This
8376 allows us to do joins and other operations that require an index
8377 for good performance with reasonable efficiency. Thuban now needs
8378 SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
8379 haven't tested that.
8380
8381 * Thuban/Model/transientdb.py: New. Transient database
8382 implementation.
8383
8384 * test/test_transientdb.py: New. Tests for the transient DB
8385 classes.
8386
8387 * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
8388 classes to help automatically remove temporary files and
8389 directories.
8390 (Session.__init__): New instance variables temp_dir for the
8391 temporary directory and transient_db for the SQLite database
8392 (Session.temp_directory): New. Create a temporary directory if not
8393 yet done and return its name. Use AutoRemoveDir to have it
8394 automatically deleted
8395 (Session.TransientDB): Instantiate the transient database if not
8396 done yet and return it.
8397
8398 * Thuban/Model/data.py (ShapefileStore.__init__): Use an
8399 AutoTransientTable so that data is copied to the transient DB on
8400 demand.
8401 (SimpleStore): New class that simply combines a table and a
8402 shapefile
8403
8404 * Thuban/Model/table.py (Table, DBFTable): Rename Table into
8405 DBFTable and update its doc-string to reflect the fact that this
8406 is only the table interface to a DBF file. Table is now an alias
8407 for DBFTable for temporary backwards compatibility.
8408
8409 * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
8410 the last reference to the session goes away so that the temporary
8411 files are removed properly.
8412
8413 * test/test_load.py (LoadSessionTest.tearDown): Remove the
8414 reference to the session to make sure the temporary files are
8415 removed.
8416
8417 2003-04-29 Bernhard Herzog <[email protected]>
8418
8419 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
8420 the __parser instance variable into a normal local variable in
8421 read. It's only used there and read will never be called more than
8422 once. Plus it introduces a reference cycle that keeps can keep the
8423 session object alive for a long time.
8424
8425 2003-04-29 Jonathan Coles <[email protected]>
8426
8427 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
8428 Projection an immutable item. Fixes RTbug #1825.
8429 (Projection.__init__): Initialize instance variables here.
8430 (ProjFile.Replace): New. Replace the given projection object with
8431 the new projection object. This solves the problem of needing the
8432 mutator Projection.SetProjection() in the ProjFrame class and
8433 allows a projection to change parameters without changing its
8434 location in the file.
8435
8436 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
8437 be of type wxSAVE and should verify overwriting a file.
8438
8439 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
8440 ProjFile.Replace() method instead of the mutator
8441 Projection.SetProjection(). Also requires that we reassign the
8442 client data to the new projection.
8443
8444 * test/test_proj.py (TestProjection.test): Test GetName() and
8445 GetAllParameters()
8446 (TestProjFile.test): Remove tests for Set*() methods. Add tests
8447 for Replace().
8448
8449 2003-04-25 Jonathan Coles <[email protected]>
8450
8451 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
8452 to save the name of the projection.
8453
8454 * test/test_save.py (SaveSessionTest.testLayerProjection): New
8455 test to verify layer projections are saved correctly.
8456
8457 2003-04-25 Jonathan Coles <[email protected]>
8458
8459 * Thuban/Model/proj.py (Projection.SetName): Set the name
8460 to "Unknown" if name is None.
8461 (Projection.SetAllParameters): New. Set the projection's
8462 parameter list to the one supplied.
8463 (Projection.SetProjection): New. Set the projection's
8464 properties to those of the supplied Projection.
8465
8466 * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
8467 the dialog title to include the map's title.
8468 (MainWindow.LayerProjection): Set the dialog title to include
8469 the layer's title.
8470
8471 * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
8472 error dialogs into a single method call.
8473 (ProjFrame.__VerifyButtons): Add more states to check.
8474 (ProjFrame.__GetProjection): Return the current state of an
8475 edited projection or None.
8476 (ProjFrame.__FillAvailList): Remove checks for states that
8477 shouldn't exist.
8478 (ProjFrame._OnNew): Clear all selected items and supply
8479 a projection panel if necessary.
8480
8481 * test/test_proj.py (TestProjFile.test): Add tests for
8482 ProjFile.SetAllParameters, ProjFile.SetProjection,
8483 ProjFile.SetName.
8484
8485 2003-04-25 Jonathan Coles <[email protected]>
8486
8487 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
8488 takes an optional argument to select the current projection.
8489 This does not guarantee that the item is visible due to
8490 limited wxWindows functionality. Fixes RTBug #1821.
8491
8492 2003-04-25 Jonathan Coles <[email protected]>
8493
8494 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
8495 the projection name and use it when constructing the Projection
8496 object.
8497
8498 * Thuban/Model/proj.py (Projection.__init__): Change the default
8499 value for 'name' to None and then test if name is equal to None
8500 in the body of the constructor. This way the caller doesn't have to
8501 know what the default value should be. Namely, useful in load.py
8502 where we have to pick a default value if the 'name' parameter
8503 doesn't exist in the XML file.
8504
8505 * test/test_load.py (LoadSessionTest.testLayerProjection): New.
8506 Tests a file where a layer has a projection.
8507
8508 2003-04-25 Jonathan Coles <[email protected]>
8509
8510 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
8511 tree for projection information.
8512
8513 * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
8514 XMLReader.GetFileName.
8515 (SessionLoader): Added support for loading projection tags that
8516 appear inside a layer.
8517
8518 * Thuban/Model/proj.py (ProjFile): Document the class. Move
8519 back to using a list because the order of the projections in
8520 the file is important to maintain. Fixes RTbug #1817.
8521
8522 * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
8523 to ProjFile.GetFilename.
8524
8525 * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
8526 information.
8527
8528 * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
8529 ProjFrame._OnSaveAs. Removed old dead code from previous
8530 implementation.
8531 (ProjFrame._OnExport): Add support for exporting more than one
8532 projection to a single file.
8533 (ProjFrame.__FillAvailList): use string formatting (% operator)
8534 to build strings that are (partly) translated. Fixes RTbug #1818.
8535
8536 * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
8537 class.
8538
8539 2003-04-24 Bernhard Herzog <[email protected]>
8540
8541 * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
8542
8543 * po/fr.po: New. French translation by Daniel Calvelo Aros
8544
8545 * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
8546 empty strings.
8547
8548 2003-04-24 Jonathan Coles <[email protected]>
8549
8550 * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
8551 implement the interface that the ProjFrame dialog expects.
8552
8553 * Thuban/Model/proj.py (Projection.SetName): New. Allows the
8554 name of the projection to be changed.
8555 (ProjFile): Use a dictionary instead of a list so that removing
8556 projections is easier and we are sure about uniqueness.
8557 (ProjFile.Remove): Remove the given projection object.
8558
8559 * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
8560 Return a list with only one projection file instead of searching for
8561 any projection file. This simplifies many things if the user can
8562 only have one system file and one user file.
8563
8564 * Thuban/UI/classgen.py: Change all references to
8565 genCombo to genChoice.
8566
8567 * Thuban/UI/mainwindow.py: Add a Projection option under the
8568 layer menu.
8569 (MainWindow.LayerProjection): New. Open up a projection window
8570 for a layer.
8571
8572 * Thuban/UI/projdialog.py: Large changes to how the dialog is
8573 laid out. Use three panels instead of one. One for the list of
8574 projections, one for the edit controls, and one for the buttons.
8575 Fixed resizing problems so that the dialog resizes correctly
8576 when the projection panel changes. Added import/export, save, and
8577 new buttons/functionality.
8578
8579 2003-04-24 Bernhard Herzog <[email protected]>
8580
8581 First step towards table management. Introduce a simple data
8582 abstraction so that we replace the data a layer uses more easily
8583 in the next step.
8584
8585 * Thuban/Model/data.py: New file with a simple data abstraction
8586 that bundles shapefile and dbffile into one object.
8587
8588 * Thuban/Model/session.py (Session.OpenShapefile): New method to
8589 open shapefiles and return a shape store object
8590
8591 * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
8592 object instead of a shapefile filename. This introduces a new
8593 instance variable store holding the datastore. For intermediate
8594 backwards compatibility keep the old instance variables.
8595 (open_shapefile): Removed. No longer needed with the shape store.
8596 (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
8597 get the shape store used by a layer.
8598 (Layer.Destroy): No need to explicitly destroy the shapefile or
8599 table anymore.
8600
8601 * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
8602 (MainWindow.AddLayer): Use the session's OpenShapefile method to
8603 open shapefiles
8604
8605 * Thuban/Model/load.py (ProcessSession.start_layer): Use the
8606 session's OpenShapefile method to open shapefiles
8607
8608 * test/test_classification.py
8609 (TestClassification.test_classification): Use the session's
8610 OpenShapefile method to open shapefiles and build the filename in
8611 a more platform independed way
8612
8613 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
8614 Implement to have a session to use in the tests
8615 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
8616 (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
8617 session's OpenShapefile method to open shapefiles
8618 (TestLayerLegend.setUp): Instantiate a session so that we can use
8619 it to open shapefiles.
8620 (TestLayerLegend.tearDown): Make sure that all references to
8621 layers and session are removed otherwise we may get a resource
8622 leak
8623
8624 * test/test_map.py (TestMapAddLayer.test_add_layer)
8625 (TestMapWithContents.setUp): Instantiate a session so that we can
8626 use it to open shapefiles.
8627 (TestMapWithContents.tearDown): Make sure that all references to
8628 layers, maps and sessions are removed otherwise we may get a
8629 resource leak
8630 ("__main__"): use support.run_tests() so that more info about
8631 uncollected garbage is printed
8632
8633 * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
8634 session's OpenShapefile method to open shapefiles
8635 ("__main__"): use support.run_tests() so that more info about
8636 uncollected garbage is printed
8637
8638 * test/test_selection.py (TestSelection.tearDown): Make sure that
8639 all references to the session and the selection are removed
8640 otherwise we may get a resource leak
8641 (TestSelection.get_layer): Instantiate a session so that we can
8642 use it to open shapefiles.
8643 ("__main__"): use support.run_tests() so that more info about
8644 uncollected garbage is printed
8645
8646 * test/test_session.py (TestSessionBase.tearDown)
8647 (TestSessionWithContent.tearDown): Make sure that all references
8648 to the session and layers are removed otherwise we may get a
8649 resource leak
8650 (TestSessionWithContent.setUp): Use the session's OpenShapefile
8651 method to open shapefiles
8652
8653 2003-04-24 Jonathan Coles <[email protected]>
8654
8655 * Thuban/Model/load.py (XMLReader.read): Should have been checking
8656 if the file_or_filename object had the 'read' attribute.
8657
8658 2003-04-23 Jonathan Coles <[email protected]>
8659
8660 * Thuban/Model/resource.py: Fixes RTbug #1813.
8661 (ReadProjFile): Add documentation about which exceptions are raised.
8662 Always pass the exceptions up to the caller.
8663 (GetProjFiles): If the directory can't be read return an empty list.
8664 If any of the proj files can't be read skip that file and go
8665 on to the next one.
8666
8667 * test/test_proj.py: Added test cases to handle nonexistent files,
8668 unreadable files, and files that don't parse correctly.
8669
8670 2003-04-23 Jonathan Coles <[email protected]>
8671
8672 Projection dialog. Allows the user to select from a list
8673 of projection templates and optionally edit them and save new ones.
8674
8675 * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
8676 (ProjPanel): Base class for projection specific panels.
8677 (TMPanel): Projection panel for Transverse Mercartor.
8678 (UTMPanel): Projection panel for Universal Transverse Mercartor.
8679 (LCCPanel): Projection panel for Lambert Conic Conformal.
8680 (GeoPanel): Projetion panel for Geographic Projection.
8681
8682 2003-04-23 Jonathan Coles <[email protected]>
8683
8684 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
8685 promote symmetry. There now exists XMLReader and XMLWriter.
8686 (XMLReader.read): New. Call to read the given file descriptor or
8687 filename.
8688 (XMLReader.close): New. Make sure the file is closed.
8689 (XMLReader.GetFileName): New. Return just the file name that is being
8690 read from.
8691 (XMLReader.GetDirectory): New. Return just the directory of the file
8692 that is being read.
8693 (XMLReader.AddDispatchers): New. Take a dictionary which contains
8694 the names of functions to call as the XML tree is parsed.
8695 (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
8696 (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
8697 (SessionLoader): Removed class variables start_dispatcher and
8698 end_dispatcher since this functionality is now part of a class
8699 instance. Fixes RTbug #1808.
8700 (SessionLoader.__init__): Add dispatcher functions.
8701 (load_xmlfile): Code was moved into the XMLReader.read().
8702 (load_session): Use modified SessionLoader.
8703
8704 * Thuban/Model/map.py (Map.GetProjection): New. Returns the
8705 map's projection.
8706
8707 * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
8708 GetAllParameters.
8709 (Projection.GetParameter): Returns the value for the given parameter.
8710
8711 * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
8712 (GetProjFiles): Renamed from GetProjections. Now returns a list
8713 of ProjFile objects.
8714 (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
8715 a list of ProjFile objects whose files are not user defined.
8716 (GetUserProjFiles): Renamed from GetUserProjections. Returns a
8717 list of ProjFile objects whose files are user defined.
8718 (ProjFileReader): Extend new XMLReader.
8719
8720 * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
8721 promote symmetry.
8722
8723 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
8724 control instead of a wxComboBox. wxChoice controls do not generate
8725 events as the uses highlights possible choices which fixes problems
8726 with resizing the dialog when the use selects an option.
8727
8728 * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
8729 control instead of a wxComboBox.
8730
8731 * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
8732 dialog.
8733
8734 * test/test_proj.py (TestProjection.test): New tests for GetParameter
8735 method.
8736
8737 2003-04-22 Bernhard Herzog <[email protected]>
8738
8739 * Thuban/UI/mainwindow.py: Remove some unused imports and global
8740 constants
8741
8742 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
8743 (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
8744
8745 2003-04-17 Bernhard Herzog <[email protected]>
8746
8747 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
8748 (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
8749 anymore.
8750 (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
8751 (Layer.ShapeType, Layer.Shape): No need to call
8752 self.open_shapefile since it's always called in __init__
8753
8754 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
8755 In wxPython 2.4 there's no need to extend MainLoop anymore since
8756 wxPython itself makes sure OnExit is called.
8757
8758 2003-04-16 Jonathan Coles <[email protected]>
8759
8760 Initial putback of projection management code. Includes new
8761 classes to read and write projection files. The current load
8762 and save classes were abstracted a bit so they could be reused.
8763 The Projection class was extended to provide new methods and
8764 have a name.
8765
8766 * Thuban/Model/load.py (XMLProcessor): New. Contains all the
8767 general XML reading methods that were part of ProcessSession.
8768
8769 * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
8770 name.
8771 (ProjFile): New. Represents a file that contains projection
8772 information.
8773
8774 * Thuban/Model/resource.py: New. Contains general utilities
8775 for read and writing projection files.
8776
8777 * Thuban/Model/save.py (XMLSaver): New. Contains all the
8778 general XML writing methods that were part of SessionSaver.
8779 (SessionSaver): Renamed from Saver.
8780
8781 * test/test_proj.py: New test cases for the projection
8782 file read and write functions.
8783
8784 2003-04-16 Jonathan Coles <[email protected]>
8785
8786 * Thuban/Model/classification.py: Use repr() around values
8787 in the ClassGroup*.__repr__() methods so it is clearer when
8788 a value is a string and when it is a number.
8789
8790 * test/test_load.py: Rework the classification test to test
8791 that we can load old files.
8792 (testLabels): Test a file where the groups have labels.
8793
8794 2003-04-16 Bernhard Herzog <[email protected]>
8795
8796 Safer implementation of the performance enhancements of the
8797 low-level renderer:
8798
8799 * extensions/thuban/wxproj.cpp (extract_projection)
8800 (extract_pointer): Rename extract_projection to extract_pointer
8801 and redefine its purpose to return the pointer stored in a CObject
8802 returned by the object's cobject method. Update all callers.
8803 (s_draw_info, free_draw_info, draw_polygon_init): Implement the
8804 handling of these low-level parameters so that each s_draw_info
8805 instance is handled as a CObject at python level that also
8806 contains real references to the actual python objects which
8807 contain the values in the struct. Add free_draw_info as the
8808 destructor.
8809 (draw_polygon_shape): Add the py_draw_info parameter which must a
8810 cobject containing an s_draw_info pointer.
8811
8812 * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
8813 method to instantiat the low-level render parameter
8814 (MapRenderer.draw_shape_layer): Use the new method. Remove some
8815 commented out code.
8816 (MapRenderer.draw_polygon_shape): Make the first parameter not the
8817 layer but the low-level render parameter
8818 (ScreenRenderer.draw_shape_layer): Use the low-level render
8819 parameter.
8820
8821 2003-04-15 Jonathan Coles <[email protected]>
8822
8823 * Thuban/Model/classification.py: Implemented __repr__ for
8824 the ClassGroup* classes to make debugging a bit easier.
8825 (ClassGroup.SetLabel): Check that the string is an instance
8826 of StringTypes not StringType. Accounts for Unicode strings.
8827
8828 * Thuban/Model/color.py: Implemented __repr__ to make
8829 debugging a bit easier.
8830
8831 * Thuban/Model/save.py (Saver.write_classification): Need to
8832 save the group label.
8833
8834 * test/test_load.py (testClassification): New. Loads the
8835 iceland_sample_test.thuban file and checks if it was loaded
8836 correctly.
8837
8838 2003-04-15 Jonathan Coles <[email protected]>
8839
8840 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
8841 to improve rendering performance by initializing the variables
8842 that are not change each time draw_polygon_shape() is called.
8843 The values are stored in a global struct draw_info.
8844 (draw_polygon_shape): Removed initialization code that is
8845 now in draw_polygon_init().
8846
8847 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
8848 drawing initialization call to draw_polygon_init()
8849 (MapRenderer.draw_polygon_shape): Use new signature of
8850 draw_polygon_shape.
8851
8852 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
8853 weirdness by setting the range to (1, maxint).
8854
8855 * Thuban/Model/classification.py (ClassGroupProperties): Make
8856 instance variables private and optimize comparison operator
8857 by first checking if the color references are the same.
8858 (ClassGroupSingleton): Make instance variables private.
8859 (ClassGroupRange): Make instance variables private.
8860
8861 * HOWTO-Release: Filled in missing steps for releasing packages.
8862
8863 2003-04-15 Bernhard Herzog <[email protected]>
8864
8865 First stab at internationalized messages:
8866
8867 * Thuban/__init__.py (_): Implement the translation function for
8868 real using the python gettext module.
8869
8870 * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
8871 translate empty strings.
8872
8873 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
8874 Add a missing space to a warning message
8875
8876 * po/README: New. Notes about the management of the translation
8877 files.
8878
8879 * po/Makefile: New. Makefile to help manage the translation files.
8880
8881 * po/es.po: New. Spanish translation by Daniel Calvelo Aros
8882
8883 * MANIFEST.in: Include the *.mo files in Resources/Locale and the
8884 translations and support files in po/
8885
8886 * setup.py (data_files): Add the *.mo files to the data_files too
8887
8888 * README: Add note about the translations when building from CVS
8889
8890 2003-04-14 Jonathan Coles <[email protected]>
8891
8892 * Thuban/UI/dock.py: Fixes some window resizing problems most
8893 noticable under windows. Always assume the button bitmaps will
8894 be there. Code clean up.
8895 (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
8896 images for the dock/undock button to the same images.
8897 Work around for RTbug #1801.
8898
8899 * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
8900 be allowed to grow within the sizer. Fixes a bug under Windows
8901 where the toolbar wasn't being drawn.
8902
8903 2003-04-14 Frank Koormann <[email protected]>
8904
8905 * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
8906 Updated design to try to make the button functionality more
8907 transparent.
8908
8909 2003-04-14 Jonathan Coles <[email protected]>
8910
8911 * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
8912 finalize the intialization of the panel.
8913
8914 * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
8915 creation of the panel. Should be the last thing called in the
8916 initializer of a subclass.
8917
8918 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
8919 set the current selections in the combo boxes. This is needed
8920 under Windows.
8921
8922 * Thuban/UI/classifier.py (Classifier.__init__): Add a top
8923 level panel to the dialog so that the background colors are
8924 consistent under Windows.
8925
8926 2003-04-11 Jonathan Coles <[email protected]>
8927
8928 * Thuban/UI/classgen.py: Change color ramps to start at white
8929 not black.
8930
8931 * Thuban/UI/legend.py: Enable/disable the legend buttons when
8932 the legend changes. Fixes RTbug #1793.
8933
8934 * test/test_classification.py: Added test for copying of
8935 classifications.
8936
8937 2003-04-11 Jonathan Coles <[email protected]>
8938
8939 * Thuban/UI/resource.py: New. Centralize the loading of resources
8940 such as bitmaps.
8941
8942 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
8943 added images to the move buttons, added 'reverse' button.
8944 (CustomRampPanel.__init__): Added images to the move buttons.
8945 (GreyRamp): New. Generates a ramp from white to black.
8946 (HotToColdRamp): New. Generates a ramp from cold to hot colors.
8947
8948 * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
8949 ID_PROPERTY_*.
8950 (Classifier.__init__): Minor changes to the layout.
8951 (Classifier._OnTitleChanged): Listen for when the user edits the
8952 title and update the dialog's title and the layer's title.
8953
8954 * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
8955
8956 * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
8957 (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
8958 if the layer's title changes.
8959
8960 * Thuban/UI/mainwindow.py: Added new menu item and associated code
8961 to open a dialog to rename the map.
8962 (MainWindow): Use new resource class to import bitmaps.
8963
8964 2003-04-11 Jonathan Coles <[email protected]>
8965
8966 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
8967 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
8968 Resources/Bitmaps/group_use_none.xpm,
8969 Resources/Bitmaps/group_use_not.xpm,
8970 Resources/Bitmaps/hide_layer.xpm,
8971 Resources/Bitmaps/layer_properties.xpm,
8972 Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
8973 Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
8974 New.
8975
8976 2003-04-10 Jonathan Coles <[email protected]>
8977
8978 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
8979 Should pass group to ClassGroup constructor.
8980
8981 2003-04-10 Jonathan Coles <[email protected]>
8982
8983 * Thuban/Model/classification.py: (ClassGroup): Move all the common
8984 methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
8985 here. Implement SetVisible(), IsVisible().
8986 (ClassGroup.__init__): Add group parameter which acts as a copy
8987 constructor.
8988
8989 * Thuban/UI/classifier.py (ClassTable): Add a new column for the
8990 "Visible" check boxes.
8991 (Classifier): Rename the buttons and refactor the code to match
8992 the new labels.
8993
8994 * Thuban/UI/legend.py: Classify button is now called "Properties".
8995 Refactored the code to change variable names.
8996 (LegendTree.__FillTreeLayer): Only list a group if it is visible.
8997
8998 * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
8999 MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
9000 renamed to MainWindow.LayerEditProperties.
9001 (MainWindow.ToggleLegend): Don't include map name in legend title.
9002 (MainWindow.SetMap): Added the map name to the window title.
9003 (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
9004 MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
9005 Functionality is found in the layer properties dialog.
9006
9007 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
9008 draw visible groups.
9009
9010 2003-04-09 Jonathan Coles <[email protected]>
9011
9012 * Thuban/UI/classgen.py: Modifications to allow simple
9013 addition and selection of new color schemes.
9014 (MonochromaticRamp): New. Generates a ramp between two colors.
9015 (RedRamp): New. Generates a ramp of all red.
9016 (GreenRamp): New. Generates a ramp of all green.
9017 (BlueRamp): New. Generates a ramp of all blue.
9018
9019 2003-04-09 Jonathan Coles <[email protected]>
9020
9021 * Thuban/Model/classification.py (Classification.__deepcopy__):
9022 Need to copy over field and fieldType attributes.
9023
9024 * Thuban/Model/table.py (Table.field_range): New. Retrive the
9025 maximum and minimum values over the entire table for a given
9026 field.
9027 (Table.GetUniqueValues): New. Retrieve all the unique values
9028 in the table for a given field.
9029
9030 * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
9031 (GenUniquePanel): New. Controls to allow the user to select
9032 which unique field values they would like in the classification.
9033 (CustomRampPanel): Code that was in ClassGenDialog that allows
9034 the user to select the properties for a custom ramp.
9035 (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
9036
9037 * Thuban/UI/classifier.py: Removed a lot of debugging code.
9038 (Classifier._SetClassification): Callback method so that the
9039 class generator can set the classification in the grid.
9040 (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
9041 editing of a group properties class into a wxWindows control.
9042
9043 * Thuban/UI/dock.py: It was decided that if the user closes
9044 a dockable window the window should simply hide itself. That
9045 way if the user wants to show the dock again it appears in the
9046 same place as it was when it was closed.
9047 (DockableWindow.Destroy): Call renamed method OnDockDestroy().
9048 (DockableWindow._OnButtonClose): Hide the window instead of
9049 destroying it.
9050 (DockableWindow._OnClose): Hide the window instead of
9051 destroying it.
9052
9053 * Thuban/UI/legend.py (LegendTree): Use a private method to
9054 consistently set the font and style of the text. Fixes RTbug #1786.
9055
9056 * Thuban/UI/mainwindow.py: Import just the Classifier class.
9057
9058 2003-04-07 Bernhard Herzog <[email protected]>
9059
9060 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
9061 to the map module
9062
9063 2003-04-07 Bernhard Herzog <[email protected]>
9064
9065 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
9066 favor of ToggleSessionTree
9067 (MainWindow.ToggleSessionTree): New method to toggle visibility of
9068 the session tree.
9069 (MainWindow.SessionTreeShown): New method to return whether the
9070 session tree is currently shown.
9071 (MainWindow.ToggleLegend): New method to toggle visibility of the
9072 legend
9073 (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
9074 LegendShown
9075 (MainWindow.LegendShown): New method to return whether the legend
9076 is currently shown.
9077 (_method_command): Add checked parameter so we can define check
9078 menu items
9079 (_has_tree_window_shown, _has_legend_shown): Use the appropriate
9080 mainwindow methods.
9081 (show_session_tree, show_legend commands): Removed.
9082 (toggle_session_tree, toggle_legend commands): New commands to
9083 toggle the visibility of the dialogs
9084
9085 2003-04-07 Jonathan Coles <[email protected]>
9086
9087 * Thuban/UI/classgen.py: Fix Windows problem.
9088
9089 * Thuban/UI/dock.py: Fix Windows problem.
9090
9091 * Thuban/UI/mainwindow.py: Use False instead of false.
9092 (MainWindow.ShowLegend): Remove unnecessary switch parameter.
9093
9094 2003-04-07 Jonathan Coles <[email protected]>
9095
9096 Since we now say that the order of the groups in a classification
9097 matters, it makes sense to be able to manipulate that order. Most
9098 of the changes to Thuban/Model/classification.py are to that end.
9099
9100 * Thuban/Model/classification.py (Classification.AppendGroup,
9101 Classification.InsertGroup, Classification.ReplaceGroup,
9102 Classification.RemoveGroup, Classification.GetGroup): Do as the
9103 names imply.
9104 (Classification.FindGroup): This was called GetGroup, but GetGroup
9105 takes an index, while FindGroup takes a value.
9106 (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
9107 REFERENCE. Currently there is a cyclic reference between the layer
9108 and its classification. If the classification doesn't need to know
9109 its owning layer we can change this, since it may make sense to be
9110 able to use the same classification with different layers.
9111
9112 * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
9113
9114 * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
9115 not AddGroup()
9116
9117 * Thuban/UI/classifier.py: Now that we can depend on the order in
9118 a Classification and have methods to manipulate that order we don't
9119 need to use our own data structures in the grid. We can simply make
9120 the grid/table access the information they need from a copy of
9121 the classification object.
9122 (Classifier._OnCloseBtn): Event handler for when the user clicks
9123 'Close'. This is needed so if the user applies changes and then
9124 continues to change the table the user has the option of discarding
9125 the most recent changes and keeping what they applied.
9126
9127 * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
9128 into the same group.
9129
9130 * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
9131 with a really old version of proj, PJ_VERSION won't even be defined.
9132 If it isn't defined then just compile so that the function always
9133 returns Py_False.
9134
9135 * test/test_classification.py: Fix tests to use the renamed methods.
9136 Still need to write tests for the new methods.
9137
9138 2003-04-04 Jonathan Coles <[email protected]>
9139
9140 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
9141 call to SetSelection out of the method and before the call
9142 to __SelectField in __init__. This prevents a recursion of events
9143 when _OnFieldSelect is triggered by the user.
9144
9145 2003-04-04 Jonathan Coles <[email protected]>
9146
9147 * Thuban/Model/classification.py: Rename Color.None to
9148 Color.Transparent.
9149 (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
9150 Don't bother copying the color, since Colors are immutable.
9151
9152 * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
9153 Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
9154 Thuban/UI/renderer.py, Thuban/UI/view.py:
9155 Rename Color.None to Color.Transparent.
9156
9157 * test/test_classification.py, test/test_load.py: Rename Color.None
9158 to Color.Transparent.
9159
9160 2003-04-04 Jonathan Coles <[email protected]>
9161
9162 * Thuban/Model/classification.py: Fix assert calls.
9163 (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
9164 Copy the color parameter rather than hold onto a reference.
9165
9166 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
9167 the color object.
9168 (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
9169 are sure there exists only one refernce to Color.None in the system.
9170 This allows us to use 'is' rather than the comparision functions.
9171
9172 * Thuban/Model/save.py: Fix assert calls.
9173
9174 * Thuban/UI/classifier.py: Fix assert calls.
9175 (ClassGrid._OnCellDClick): Call up to the classifier to open the
9176 dialog to edit the groups properties.
9177 (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
9178 correctly if a cell is resized.
9179 (ClassTable.SetClassification): New. Changes the classification
9180 that is in the table.
9181 (ClassTable.__SetRow): Allow groups to be prepended.
9182 (Classifier): New code for opening the EditProperties and
9183 GenerateRanges dialogs.
9184 (SelectPropertiesDialog.__GetColor): Only set the color in the
9185 color dialog if the current color is not None.
9186
9187 * Thuban/UI/dock.py: Fix assert calls.
9188
9189 * Thuban/UI/legend.py: Fix assert calls.
9190
9191 * Thuban/UI/renderer.py: Fix assert calls.
9192
9193 * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
9194 classifications.
9195 (GenRangePanel): Panel specific to range generation.
9196 (GenSingletonPanel): Panel specific to singleton generation.
9197 (ClassGenerator): Class responsible for actually generating
9198 the classification from the data gathered in the dialog box.
9199 (PropertyRamp): Generates properties whose values range from
9200 a starting property to an ending property.
9201
9202 2003-04-03 Bernhard Herzog <[email protected]>
9203
9204 * test/support.py (print_garbage_information): New function that
9205 prints information about still connected messages and memory
9206 leaks.
9207 (run_suite): Removed.
9208 (run_tests): New function for use as a replacement of
9209 unittest.main in the test_* files. This one calls
9210 print_garbage_information at the end.
9211
9212 * test/runtests.py (main): Use support.print_garbage_information
9213
9214 * test/test_layer.py: Use support.run_tests instead of
9215 unittest.main so we get memory leak information
9216 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
9217 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
9218 (TestLayerLegend.test_visibility): Call the layer's Destroy method
9219 to fix a memory leak.
9220
9221 * test/test_classification.py: Use support.run_tests instead of
9222 unittest.main so we get memory leak information
9223 (TestClassification.test_classification): Call the layer's Destroy
9224 method to fix a memory leak.
9225
9226 2003-04-02 Bernhard Herzog <[email protected]>
9227
9228 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
9229 Handle the reference counts of the return value and errors in
9230 PyArg_ParseTuple correctly.
9231
9232 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
9233 sure the filename is absolute to avoid problems when saving the
9234 session again
9235
9236 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
9237
9238 2003-04-01 Jonathan Coles <[email protected]>
9239
9240 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
9241 that there actually are points in the returned list of points
9242 before trying to index into the list. The list may be empty if
9243 the shape is a Null Shape.
9244
9245 2003-04-01 Bernhard Herzog <[email protected]>
9246
9247 * test/test_map.py: Don't use from <module> import *
9248
9249 2003-04-01 Jonathan Coles <[email protected]>
9250
9251 * Thuban/Model/session.py: Use LAYER_CHANGED instead of
9252 LAYER_LEGEND_CHANGED
9253
9254 * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
9255 self.Destroy() to close the window after yesterday's changes.
9256
9257 * test/test_map.py, test/test_session.py: Fix messages that
9258 are sent from maps and layers.
9259
9260 2003-03-31 Jonathan Coles <[email protected]>
9261
9262 * Thuban/UI/classifier.py: Commented out some debugging statements.
9263 (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
9264 RTbug #1769.
9265
9266 * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
9267 position (although position doesn't work yet under GTK).
9268 (DockableWindow.Destroy): New. Called when the window must be
9269 closed. Namely needed when the DockFrame closes and must close
9270 its children.
9271 (DockFrame): Listen for EVT_CLOSE and destroy all children.
9272
9273 * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
9274 when then window is told to close.
9275 (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
9276 comment in source for more info.
9277
9278 * Thuban/UI/main.py: Show the legend by default when Thuban starts.
9279
9280 * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
9281 symmetry with other such methods.
9282 (MainWindow.ShowLegend): Show the legend docked by default.
9283
9284 2003-03-28 Jonathan Coles <[email protected]>
9285
9286 * Thuban/UI/classifier.py: Support for highlighting a specific
9287 group within the grid when the classification dialog is opened.
9288 Also contains a lot of debugging printouts which will later
9289 be removed.
9290
9291 * Thuban/UI/dock.py: Complete rework on the dock code so that
9292 that it is fairly removed from the rest of the Thuban application.
9293 It is easy to add new docks which the rest of the program having
9294 to be aware of them.
9295
9296 * Thuban/UI/legend.py: Modifications to support selecting a
9297 specific group in the classification dialog. Changed how layers
9298 are drawn when the layer is visible/invisible.
9299
9300 * Thuban/UI/mainwindow.py: Removed legend specific code and
9301 replaced it with calls to the new dock code.
9302
9303 * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
9304 to check if scale > 0. Trying to track down a divide by zero.
9305
9306 2003-03-26 Jonathan Coles <[email protected]>
9307
9308 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
9309 (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
9310 now part of DockableWindow.
9311 (LegendPanel.DoOnSelChanged): Select the current layer in the
9312 map.
9313 (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
9314 with the selected layer and/or group.
9315
9316 2003-03-26 Jonathan Coles <[email protected]>
9317
9318 This putback contains the code for dockable windows. There is
9319 no support in wxWindows as of this date for windows that can
9320 attach themselves to other windows.
9321
9322 The current model contains a DockableWindow which has a parent
9323 window for when it is detached and a dock window that it puts
9324 its contents in when it is docked. The contents of a DockableWindow
9325 must be a DockPanel. DockPanel itself derives from wxPanel.
9326
9327 * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
9328 message, not a LAYER_LEGEND_CHANGED message.
9329
9330 * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
9331
9332 * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
9333 as one of the style properties for the fieldTypeText item to
9334 be sure that its size is correct when the text changes.
9335
9336 * Thuban/UI/dock.py: New. Classes for the DockPanel and
9337 DockableWindow.
9338
9339 * Thuban/UI/legend.py: Added some more buttons and made the
9340 LegendPanel a DockPanel.
9341
9342 * Thuban/UI/mainwindow.py: Added sash windows to the main window
9343 and supporting functions for manipulating the sashes.
9344 (MainWindow.ShowLegend): Create a DockableWindow with the
9345 LegendPanel as the contents.
9346
9347 * Thuban/UI/messages.py: Added DOCKABLE_* messages
9348
9349 * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
9350 not LAYER_LEGEND_CHANGED, messages.
9351
9352 2003-03-25 Jonathan Coles <[email protected]>
9353
9354 * setup.py: Added custom script bdist_rpm_build_script so that
9355 when the rpm is built the path to wx-config is correct.
9356
9357 * setup.cfg: Added line saying to use the custom build script
9358
9359 2003-03-20 Jonathan Coles <[email protected]>
9360
9361 Initial implementation of the Legend.
9362
9363 * Thuban/UI/legend.py: New. Creates a window that shows the map's
9364 Legend information and allows the user to add/modify classifications
9365 and how the layers are drawn on the map.
9366
9367 * setup.py: New command 'build_docs' which currently uses
9368 happydoc to generate html documentation for Thuban.
9369
9370 * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
9371 Returns a string which is appropriately describes the group.
9372
9373 * Thuban/Model/layer.py (Layer.SetClassification): Generate a
9374 LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
9375
9376 * Thuban/Model/map.py (Map): Rename messages and use new, more
9377 specific, messages.
9378
9379 * Thuban/Model/messages.py: New message to indicate that a layer's
9380 data has changed (LAYER_CHANGED). New map messages to indicate
9381 when layers have been added/removed/changed or if the stacking order
9382 of the layers has changed.
9383
9384 * Thuban/Model/session.py: Rename and use new messages.
9385
9386 * Thuban/UI/classifier.py: Remember if any changes have actually
9387 been applied so that if the dialog is cancelled without an application
9388 of changes we don't have to set a new classification.
9389 (ClassDataPreviewer): Pulled out the window specific code and put it
9390 ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
9391 symbols on any DC.
9392
9393 * Thuban/UI/mainwindow.py: New code to open the legend.
9394
9395 * Thuban/UI/view.py: Use new message names.
9396
9397 2003-03-19 Jonathan Coles <[email protected]>
9398
9399 * Thuban/UI/main.py (verify_versions): New. Checks the versions
9400 of Python, wxPython, and some other libraries.
9401
9402 * extensions/thuban/wxproj.cpp (check_version): Checks the given
9403 version against what wxproj was compiled with.
9404 (check_version_gtk): If wxproj was compiled with gtk then check
9405 the given version against the version of the gtk library
9406 currently being used.
9407
9408 2003-03-14 Bernhard Herzog <[email protected]>
9409
9410 * test/test_command.py: Run the tests when the module is run as a
9411 script
9412
9413 2003-03-14 Bernhard Herzog <[email protected]>
9414
9415 Implement selection of multiple selected shapes in the same layer:
9416
9417 - Introduce a new class to hold the selection. This basically
9418 replaces the interactor which was nothing more than the
9419 selection anyway. A major difference is of course that the new
9420 selection class supports multiple selected shapes in one layer
9421
9422 - Move the object that represents the selection from the
9423 application to the canvas. The canvas is a better place than the
9424 application because the selection represents which shapes and
9425 layer of the map displayed by the canvas are selected and
9426 affects how the map is drawn.
9427
9428 - Make the selection and its messages publicly available through
9429 the mainwindow.
9430
9431 - The non-modal dialogs do not get a reference to the interactor
9432 anymore as they can simply refer to their parent, the
9433 mainwindow, for the what the interactor had to offer.
9434
9435 * Thuban/UI/selection.py: New module with a class to represent the
9436 selection.
9437
9438 * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
9439 these unused messages
9440
9441 * Thuban/UI/application.py (ThubanApplication.OnInit)
9442 (ThubanApplication.OnExit, ThubanApplication.SetSession): The
9443 interactor is gone now.
9444 (ThubanApplication.CreateMainWindow): There is no interactor
9445 anymore so we pass None as the interactor argument for now for
9446 compatibility.
9447
9448 * Thuban/UI/view.py (MapCanvas.delegated_messages)
9449 (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
9450 Unsubscribe, delegate messages according to the delegated_messages
9451 class variable.
9452 (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
9453 attributes from instance variables as described with the
9454 delegated_methods class variable.
9455 (MapCanvas.__init__): New instance variable selection holding the
9456 current selection
9457 (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
9458 pass them on to the renderer
9459 (MapCanvas.SetMap): Clear the selection when a different map is
9460 selected.
9461 (MapCanvas.shape_selected): Simple force a complete redraw. The
9462 selection class now takes care of only issueing SHAPES_SELECTED
9463 messages when the set of selected shapes actually does change.
9464 (MapCanvas.SelectShapeAt): The selection is now managed in
9465 self.selection
9466
9467 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
9468 (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
9469 Unsubscribe, delegate messages according to the delegated_messages
9470 class variable.
9471 (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
9472 attributes from instance variables as described with the
9473 delegated_methods class variable.
9474 (MainWindow.__init__): The interactor as ivar is gone. The
9475 parameter is still there for compatibility. The selection messages
9476 now come from the canvas.
9477 (MainWindow.current_layer, MainWindow.has_selected_layer):
9478 Delegate to the the canvas.
9479 (MainWindow.LayerShowTable, MainWindow.Classify)
9480 (MainWindow.identify_view_on_demand): The dialogs don't need the
9481 interactor parameter anymore.
9482
9483 * Thuban/UI/tableview.py (TableFrame.__init__)
9484 (LayerTableFrame.__init__, LayerTableFrame.OnClose)
9485 (LayerTableFrame.row_selected): The interactor is gone. It's job
9486 from the dialog's point of view is now done by the mainwindow,
9487 i.e. the parent. Subscribe to SHAPES_SELECTED instead
9488 of SELECTED_SHAPE
9489
9490 * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
9491 is gone. It's job from the dialog's point of view is now done by
9492 the mainwindow, i.e. the parent.
9493
9494 * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
9495 gone. It's job from the dialog's point of view is now done by the
9496 mainwindow, i.e. the parent.
9497
9498 * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
9499 gone. It's job from the dialog's point of view is now done by the
9500 mainwindow, i.e. the parent.
9501 (SessionTreeCtrl.__init__): New parameter mainwindow which is
9502 stored as self.mainwindow. The mainwindow is need so that the tree
9503 can still subscribe to the selection messages.
9504 (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
9505 (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
9506 selection is now accessible through the mainwindow. Subscribe to
9507 SHAPES_SELECTED instead of SELECTED_SHAPE
9508
9509 * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
9510 SHAPES_SELECTED message now.
9511 (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
9512 so deal with multiple shapes
9513 (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
9514 gone. It's job from the dialog's point of view is now done by the
9515 mainwindow, i.e. the parent.
9516
9517 * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
9518 parameter is now a list of shape ids.
9519 (RecordTable.SetTable): The second parameter is now a list of
9520 indices.
9521
9522 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
9523 selected_shape parameter and ivar to selected_shapes. It's now a
9524 list of shape ids.
9525 (MapRenderer.draw_label_layer): Deal with multiple selected
9526 shapes. Rearrange the code a bit so that the setup and shape type
9527 distinctions are only executed once.
9528
9529 * test/test_selection.py: Test cases for the selection class
9530
9531 2003-03-11 Jonathan Coles <[email protected]>
9532
9533 * Thuban/Model/load.py: Temporary fix so that the xml reader
9534 doesn't cause Thuban to crash.
9535
9536 * Thuban/Model/layer.py: Handle the cyclic references between
9537 a layer and its classification better, and be sure to disconnect
9538 the classification from the layer when the layer is destroyed
9539 so that we don't maintain a cyclic reference that may not be
9540 garbage collected.
9541
9542 * Thuban/Model/classification.py: See comment for layer.py.
9543
9544 2003-03-12 Jan-Oliver Wagner <[email protected]>
9545
9546 * HOWTO-Release: New. Information on the steps for releasing
9547 a new version of Thuban.
9548
9549 2003-03-11 Jonathan Coles <[email protected]>
9550
9551 * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
9552 Use True instead of true.
9553 (Classifier): Should have a single panel in which all the controls lie.
9554
9555 * Thuban/UI/proj4dialog.py: Add normal border.
9556
9557 * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
9558
9559 * Thuban/UI/mainwindow.py: Use True instead of true.
9560
9561 * setup.py: Update some definitions to use wxWindows2.4 files
9562
9563 * Data/iceland_sample_class.thuban: Fixed file so that the
9564 field_type information is present.
9565
9566 2003-03-10 Jonathan Coles <[email protected]>
9567
9568 * Thuban/UI/classifier.py (Classifier.__init__): Make the
9569 field type label grow so that when the text changes the
9570 size is updated correctly. This may be a wxWindows bug.
9571
9572 2003-03-10 Jonathan Coles <[email protected]>
9573
9574 * Thuban/UI/application.py: Changed SESSION_CHANGED to
9575 SESSION_REPLACED.
9576
9577 * Thuban/UI/classifier.py: Wrap text with _().
9578 (ClassGrid.CreateTable): Set dimensions and size hints here,
9579 instead of in Reset, so we only set the size once.
9580
9581 * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
9582
9583 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
9584 Call Close() instead of Shutdown().
9585
9586 * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
9587
9588 * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
9589 Go back to using OnClose() instead of Shutdown().
9590
9591 2003-03-10 Jonathan Coles <[email protected]>
9592
9593 * Thuban/UI/classifier.py (Classifier): SelectField() needed
9594 to know the old field index as well as the new one.
9595
9596 2003-03-10 Jonathan Coles <[email protected]>
9597
9598 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
9599 to correctly set the table information and call this from
9600 __init__ and from _OnFieldSelect so that all the information
9601 is up to date when the dialog opens and when a field is changed.
9602
9603 2003-03-10 Jonathan Coles <[email protected]>
9604
9605 * Thuban/Model/classification.py (Classification): Don't use
9606 layer's message function directly, use the ClassChanged() method
9607 when then classification changes. SetField/SetFieldType/SetLayer
9608 must keep the information about field name and field type in
9609 sync when an owning layer is set or removed.
9610
9611 * Thuban/Model/layer.py: Added ClassChanged() so that the
9612 classification can tell the layer when its data has changed.
9613 (Layer.SetClassification): Accepts None as an arguement to
9614 remove the current classification and correctly handles
9615 adding a new classification.
9616
9617 * Thuban/Model/load.py: Comment out print statement
9618
9619 * test/test_classification.py, test/test_save.py: New and
9620 improved tests.
9621
9622 2003-03-07 Jonathan Coles <[email protected]>
9623
9624 * Thuban/Model/classification.py: Implemented __copy__ and
9625 __deepcopy__ for ClassGroup* and ClassGroupProperites so
9626 they can easily be copied by the classifier dialog.
9627 (ClassGroupProperites.__init__): The default line color should
9628 have been Color.Black.
9629
9630 * Thuban/UI/classifier.py: Setting and Getting table values now
9631 uses a consistent set of functions.
9632 (Classifier): Now non-modal. Has field type label which changes
9633 as the field changes. Keep track of buttons in a list so that
9634 we can enable/disable the buttons when the None field is selected.
9635 (SelectPropertiesDialog): Add buttons to make the colors transparent.
9636
9637 * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
9638 does what OnClose did, but can be called by the application to
9639 close a window. Needed when a session changes, and we have to
9640 close the classifier windows.
9641
9642 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
9643 Shuts down open dialogs. Used when a new session is created
9644 or a session is opened.
9645 (MainWindow.SaveSession): Should only call application.SaveSession()
9646 if we don't call SaveSessionAs first.
9647 (MainWindow.Classify): Allow different classifier dialogs for
9648 different layers.
9649
9650 * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
9651 the parent class handle it. Add Shutdown() to unsubscibe from
9652 event notification and call the parent Shutdown(). This was
9653 necessary so the application can close the tree window.
9654
9655 2003-03-06 Jonathan Coles <[email protected]>
9656
9657 * Thuban/Model/classification.py: Minor documentation changes,
9658 Addition of __eq__ and __ne__ methods.
9659 (Classification.SetLayer): prevent recursion between this method
9660 and Layer.SetClassification().
9661
9662 * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
9663
9664 * Thuban/Model/layer.py (SetClassification): prevent recursion
9665 between this method and Classification.SetLayer().
9666
9667 * test/test_classification.py, test/test_load.py,
9668 test/test_session.py: Fixed and added tests for the classification
9669 classes.
9670
9671 2003-03-06 Bernhard Herzog <[email protected]>
9672
9673 * Thuban/UI/classifier.py (ClassGrid.__init__)
9674 (ClassGrid.CreateTable): Move the SetSelectionMode call to
9675 CreateTable because otherwise it triggers an assertion in
9676 wxPython/wxGTK 2.4.
9677
9678 2003-03-05 Jonathan Coles <[email protected]>
9679
9680 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
9681
9682 * Thuban/Model/load.py: import FIELDTYPE constants from table.
9683
9684 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
9685
9686 * Thuban/Model/table.py: Put FIELDTYPE constants back.
9687
9688 2003-03-05 Jonathan Coles <[email protected]>
9689
9690 * Thuban/UI/classifier.py: Added class documentation.
9691 Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
9692 Store just the groups in the table and generate the other
9693 column information when it is requested. Add "None" field
9694 to pull-down to select no classification.
9695
9696 * Thuban/common.py: Moved FIELDTYPE constants from table.py
9697 (Str2Num): Only catch ValueError exceptions.
9698
9699 * Thuban/Model/classification.py: Class documentation. Renaming
9700 of methods with Stroke to Line. Groups are stored in a single
9701 list with the default as the first element. Groups are searched
9702 in the order they appear in the list.
9703
9704 * Thuban/Model/color.py: Documentation.
9705
9706 * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
9707 the kind of data represented by a field.
9708
9709 * Thuban/Model/load.py (ProcessSession): Use proper string
9710 conversion function; fixes RTbug #1713.
9711
9712 * Thuban/Model/save.py (Saver): Store field type information.
9713
9714 * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
9715 (Table): Add field_info_by_name() to retrieve field information
9716 by specifying the field name, not the number.
9717
9718 * Thuban/UI/mainwindow.py: Function name changes.
9719
9720 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
9721 get the layer classification once. Don't try to classify
9722 values when the field is None: just use the default properties.
9723
9724 * Thuban/UI/view.py: Function name changes.
9725
9726 * Doc/thuban.dtd: Add field_type attribute to a classification.
9727
9728 2003-03-04 Bernhard Herzog <[email protected]>
9729
9730 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
9731 the fill and stroke layer attributes optional with suitable
9732 default values. Add the stroke_width layer attribute. Use correct
9733 syntax for empty elements. Make the attribute list for labels
9734 refer to the label element.
9735
9736 2003-03-04 Bernhard Herzog <[email protected]>
9737
9738 * setup.py (thuban_build_py.build): Add a comment about distutils in
9739 Python 2.3 containing some of the functionality we implement in
9740 setup.py ourselves.
9741
9742 * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
9743 before the selection mode. Doing it the other way round triggers
9744 an assertion in wxWindows.
9745
9746 * Thuban/Model/save.py (escape): Fix typo in doc-string
9747
9748 * Thuban/Model/classification.py: Remove unnecessary wxPython
9749 import
9750
9751 2003-03-04 Jonathan Coles <[email protected]>
9752
9753 * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
9754 Parameter 'value' should default to None.
9755
9756 * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
9757 the class attribute __classification is now private.
9758
9759 * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
9760 Classifier to ClassGrid. Added support for removing selected rows,
9761 which including code for keeping track of when cells are selected,
9762 and deselected.
9763 (ClassTable): Support for added/removing rows. Fixed a problem
9764 with __ParseInput whereby it would not allow strings (only numbers)
9765 to be entered.
9766 (Classifier): Added button and supporting code for removing
9767 selected rows.
9768
9769 2003-02-27 Jonathan Coles <[email protected]>
9770
9771 * Thuban/common.py: Moved color conversion functions into
9772 Thuban/UI/common.py.
9773 (Str2Num): Now converts the float (not the string) to a long/int
9774 so that an exception isn't thrown.
9775
9776 * Thuban/UI/common.py: Common functions used in several UI modules
9777
9778 * Thuban/Model/classification.py: Changed the class hierarchy
9779 so that a Classification consists of Groups which return
9780 Properties when a value matches a Group.
9781
9782 * Thuban/Model/layer.py: Fixed name resolution problem.
9783
9784 * Thuban/Model/load.py: Use new Classification and Group functions.
9785
9786 * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
9787 failure.
9788 (Saver.write_classification): Use new Classification and Group
9789 functions.
9790
9791 * Thuban/UI/classifier.py: Changes to use new Classification and Group
9792 functions. Fix to create a tuple with a single value instead of
9793 simply returning the value.
9794
9795 * Thuban/UI/renderer.py: Use new Classification and Group functions.
9796 Use common.py functions.
9797
9798 * Thuban/UI/tree.py: Use common.py functions.
9799
9800 * test/test_classification.py: Use new Classification and Group
9801 classes.
9802
9803 2003-02-24 Jonathan Coles <[email protected]>
9804
9805 * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
9806 functions from Thuban color objects to wxWindow colour objects.
9807
9808 * Thuban/Model/classification.py (Classification): Renamed
9809 GetProperties() to GetClassData(). Used the new iterator
9810 in TreeInfo().
9811 (ClassIterator): Iterator implementation to iterate over the
9812 ClassData objects in a classification object.
9813
9814 * Thuban/Model/save.py (Saver.write_classificaton): Uses
9815 the new iterator to save the classification information.
9816
9817 * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
9818 for changing the stroke and fill colors and previewing the
9819 changes.
9820
9821 * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
9822 MainWindow.SaveSessionAs): Text string changes so the dialogs
9823 have more meaningful titles.
9824
9825 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
9826 Classification method name from GetProperties to GetClassData.
9827
9828 * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
9829 instead of accessing now non-existent class variables.
9830
9831 2003-02-24 Bernhard Herzog <[email protected]>
9832
9833 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
9834 unneeded Shape() call. Rendering is substantially faster without
9835 it and it avoids some problems with broken shape files.
9836
9837 2003-02-20 Frank Koormann <[email protected]>
9838
9839 Force minimal size of identify and label dialogs. The autosizing
9840 looked too ugly.
9841
9842 * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
9843 * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
9844 Set size of listctrl.
9845 * Thuban/UI/identifyview.py (IdentifyView.__init__):
9846 Set size of dialog.
9847
9848 2003-02-19 Jonathan Coles <[email protected]>
9849
9850 * test/test_classification.py, test/test_layer.py,
9851 test/test_load.py, test/test_map.py, test/test_session.py:
9852 Updated the tests to use the new functions that are in the
9853 respective classes.
9854
9855 * Thuban/Model/classification.py (Classification):
9856 Uses the new ClassData* classes. Modification messages are
9857 passed up to the parent layer (if it exists).
9858 (ClassData): New class to encapsulate the common data in each
9859 classification property.
9860 (ClassDataDefault): Represents the Default class. data.
9861 (ClassDataPoint): Represents a single class. data point
9862 (ClassDataRange): Represents a class. range
9863 (ClassDataMap): Represents a class. map (unused).
9864
9865 * Thuban/Model/color.py: Added Color.None to represent something
9866 with no color. Color.Black represents the color black.
9867 (NoColor): Helper class derived from Color to represent something
9868 with no color.
9869
9870 * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
9871 stroke_width attributes. Made the 'classification' attribute private.
9872 New methods for setting/getting the classification.
9873
9874 * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
9875 to get the classifcation and use the new ClassData* classes to
9876 hold the classification data. Use Str2Num to convert numbers
9877 properly.
9878
9879 * Thuban/Model/save.py (Saver): Use new Color and Classification
9880 methods
9881
9882 * Thuban/UI/classifier.py (ClassGrid): New class to represent a
9883 custom grid.
9884 (ClassTable): Support for editing Values and Labels and for
9885 changing what type (point or range) of data is stored in each
9886 property based on how the user enters the data.
9887 (Classifier): Support for saving the new classifications and
9888 launching the dialog to edit a property.
9889 (SelectPropertiesDialog): New class for editing the visual
9890 properties of a classification (stroke color, width, and fill color)
9891 (ClassPreviewer): Took the Draw method from ClassRenderer and
9892 made most of it into this new class. Intend to use this class in
9893 the SelectPropertiesDialog for previewing changes.
9894
9895 * Thuban/UI/renderer.py: Use new Color and Classification methods.
9896
9897 * Thuban/UI/tree.py: Formatting changes.
9898
9899 * Doc/thuban.dtd: Add 'label' element
9900
9901 * Thuban/common.py: New. Contains common routines used throughout
9902 the code.
9903 (Str2Num): Takes a string and converts it to the "best" type of
9904 number.
9905
9906 2003-02-14 Bernhard Herzog <[email protected]>
9907
9908 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
9909 dragging flag is always set to 0 even when the tool implementation
9910 raises an exception
9911
9912 2003-02-11 Bernhard Herzog <[email protected]>
9913
9914 * Thuban/UI/application.py (ThubanApplication.splash_screen): New
9915 method to create a splash screen.
9916 (ThubanApplication.ShowMainWindow): New. Show the main window.
9917 Needed so the splash screen can display the mainwindow
9918 (ThubanApplication.OnInit): Call the
9919 new splash_screen method to determine whether the application
9920 should display a splash screen. If it displays a splash screen do
9921 not immediately show the main window.
9922
9923 2003-02-11 Jonathan Coles <[email protected]>
9924
9925 * Thuban/Model/classification.py: Added import line to fix
9926 feature conflicts between running on python2.2 and python2.1.
9927
9928 * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
9929 onto the clinfo parameter, so removed the deepcopy().
9930
9931 2003-02-10 Jonathan Coles <[email protected]>
9932
9933 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
9934 Added element_open variable to track opening and closing of tags
9935 so that tags that don't span more than one line are closed with
9936 /> instead of </tag_name>. Use the GetDefault*() methods of
9937 the Classification class.
9938
9939 * Thuban/Model/classification.py (Classificaton): Added set and
9940 get methods for the default data. The class also takes a layer
9941 reference so that modification messages can be sent. Fixed the
9942 methods to use the new ClassData class.
9943 (ClassData): New class to encapsulate the classification data
9944
9945 * Thuban/Model/layer.py (Layer): Remove the
9946 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
9947 SetDefault*() methods on the layer's classification object.
9948 (Layer.__init__): Use the new SetDefault*() methods in the
9949 Classification class.
9950
9951 * Thuban/Model/load.py (ProcessSession): Use the new ClassData
9952 object instead of a dictionary.
9953
9954 * Thuban/UI/classifier.py (ClassRenderer): New class to
9955 draw the classifications in the dialog box's table.
9956 (Classifier): Modified to use the ClassRenderer class.
9957
9958 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
9959 methods of the Classification class.
9960
9961 * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
9962 of the ClassData class.
9963
9964 * test/test_classification.py, test/test_layer.py,
9965 test/test_map.py, test/test_session.py: Fix the tests to work
9966 with the above code changes.
9967
9968 2003-02-03 Jonathan Coles <[email protected]>
9969
9970 * Thuban/Model/classification.py (Classification): Added getNull()
9971 to return the NullData reference
9972
9973 * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
9974 Layer.SetStrokeWidth): Modified these functions to change the
9975 null data in the classification rather than keep these values
9976 directly in the Layer class. Menu options to change these values
9977 work again.
9978
9979 2003-01-28 Jonathan Coles <[email protected]>
9980
9981 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
9982 Fixed crashing problem on some systems. Dialog box shows
9983 classification data.
9984
9985 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
9986 Colors in the tree view.
9987
9988 * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
9989 the tree info for classifications. Commented out unnecessary lines.
9990
9991 * Thuban/Model/classification.py (Classification.TreeInfo): New
9992 function to add information about the classification into the
9993 tree view.
9994
9995 2003-01-27 Jan-Oliver Wagner <[email protected]>
9996
9997 * Thuban/__init__.py (_): New.
9998
9999 * Thuban/Model/classification.py, Thuban/Model/extension.py,
10000 Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
10001 Thuban/Model/session.py, Thuban/UI/application.py,
10002 Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
10003 Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
10004 Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
10005 Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
10006 Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
10007
10008 2003-01-27 Jonathan Coles <[email protected]>
10009
10010 * Thuban/Model/layer.py: Classification initialization calls.
10011
10012 * Thuban/Model/classification.py: Created class to encapsulate
10013 a layer classification. Supports specific data points and
10014 ranges.
10015
10016 * Thuban/Model/load.py: Added support for loading classification
10017 information.
10018
10019 * Thuban/Model/save.py: Added support for saving classification
10020 information.
10021
10022 * Thuban/UI/classifier.py: Initial class for a dialog box for
10023 specifying classification information.
10024
10025 * Thuban/UI/mainwindows.py: Support for opening the classifier
10026 dialog.
10027
10028 * Thuban/UI/renderer.py: Support for drawing a layer with the
10029 classification information.
10030
10031 * Data/iceland_sample_class.thuban: iceland_sample with
10032 classification data.
10033
10034 * test/test_classification: Tests for the Classification class.
10035
10036 2002-12-09 Bernhard Herzog <[email protected]>
10037
10038 * test/test_command.py: New. Tests for the command classes.
10039
10040 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
10041 (Command.IsTool): New method to distinguish between command
10042 switching tools and other commands.
10043
10044 * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
10045 the tool to avoid direct assignments to instance variables
10046 (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
10047 (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
10048 change the tool
10049
10050 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
10051 active tool's command turns insensitive, disable the tool.
10052 (_tool_command): Use the new ToolCommand class
10053
10054 * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
10055 SelectTool method to change the tool
10056 (iconfile): Use the ToolCommand class
10057
10058 2002-12-03 Bernhard Herzog <[email protected]>
10059
10060 * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
10061 the case of selected items that are not children of Layers or Maps
10062 properly. Previously this bug would trigger an assertion in
10063 wxWindows.
10064
10065 2002-11-06 Frank Koormann <[email protected]>
10066
10067 * Thuban/UI/mainwindow.py: Altered the order of tools in the
10068 toolbar: First now are all navigation tools (Zoom In/Out, Pan,
10069 Full Extent).
10070
10071 2002-10-23 Bernhard Herzog <[email protected]>
10072
10073 * setup.py (setup call): version now 0.1.3
10074
10075 * MANIFEST.in: Add the files in test/
10076
10077 * test/README: Add note about tests requiring the iceland data
10078
10079 * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
10080 copyright notice.
10081
10082 2002-10-18 Bernhard Herzog <[email protected]>
10083
10084 * test/test_map.py
10085 (TestMapWithContents.test_projected_bounding_box): Use an explicit
10086 epsilon.
10087
10088 * test/support.py (FloatComparisonMixin.assertFloatEqual)
10089 (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
10090 message if the assertion fails and don't return the return value
10091 of self.assert_. In assertFloatSeqEqual the return meant that not
10092 all items of the sequence were compared.
10093
10094 2002-09-20 Bernhard Herzog <[email protected]>
10095
10096 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
10097
10098 * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
10099
10100 * test/test_map.py (TestMapWithContents.test_tree_info): Create
10101 the string with the bounding box on the fly because of platform
10102 differences in the way %g is handled.
10103
10104 * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
10105 DBFfile too because Thuban layers can't yet cope missing DBF
10106 files.
10107
10108 2002-09-20 Bernhard Herzog <[email protected]>
10109
10110 * test/test_menu.py: Use initthuban instead of
10111 add_thuban_dir_to_path to initialize Thuban.
10112
10113 * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
10114 Mixin class for float comparisons
10115 (SubscriberMixin): New. Mixin class to test messages sent through
10116 the Connector class
10117
10118 * test/README: Fix a typo and add the -v flag to the command for
10119 individual tests
10120
10121 * test/test_session.py: New. Test cases for Thuban.Model.session
10122
10123 * test/test_proj.py: New. Test cases for Thuban.Model.proj
10124
10125 * test/test_map.py: New. Test cases for Thuban.Model.map
10126
10127 * test/test_layer.py: New. Test cases for Thuban.Model.layer
10128
10129 * test/test_label.py: New. Test cases for Thuban.Model.label
10130
10131 * test/test_connector.py: New. Test cases for Thuban.Lib.connector
10132
10133 * test/test_color.py: New. Test cases for Thuban.Model.color
10134
10135 * test/test_base.py: New. Test cases for Thuban.Model.base
10136
10137 2002-09-13 Bernhard Herzog <[email protected]>
10138
10139 * Thuban/Model/session.py (Session.forwarded_channels): Forward
10140 the CHANGED channel too.
10141
10142 * Thuban/Model/map.py (Map.forwarded_channels): Forward the
10143 CHANGED channel too.
10144 (Map.__init__): Call the Modifiable constructor as well.
10145
10146 * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
10147 event if the modified flag changes.
10148 (Modifiable.changed): Tweak the doc-string.
10149
10150 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
10151 (MainWindow.set_position_text): Put the code that puts the text
10152 with the mouse position into the status bar into the new method
10153 set_position_text so that it can overwritten in derived classes.
10154
10155 2002-09-12 Bernhard Herzog <[email protected]>
10156
10157 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
10158 message box on the main window.
10159
10160 2002-09-11 Bernhard Herzog <[email protected]>
10161
10162 * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
10163 the 'E' because it's less likely to interfere with other menu
10164 entries.
10165 (MainWindow.build_menu): remove an incorrect comment.
10166
10167 2002-09-10 Bernhard Herzog <[email protected]>
10168
10169 * Thuban/UI/mainwindow.py (MainWindow.Map): New.
10170 (_tool_command): Add sensitive parameter
10171 (_has_visible_map): Sensitivity callback to tools and other
10172 commands that require a visible map. Use it in map_zoom_in_tool,
10173 map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
10174 and map_full_extent
10175
10176 2002-09-06 Bernhard Herzog <[email protected]>
10177
10178 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
10179 VIEW_POSITION
10180
10181 2002-09-04 Frank Koormann <[email protected]>
10182
10183 * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
10184
10185 2002-09-02 Bernhard Herzog <[email protected]>
10186
10187 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
10188 wxWindows already and our implementation doesn't work correctly
10189 with wxGTK 2.3:
10190 (MapCanvas.__init__): Remove the instance variable
10191 (MapCanvas.OnPaint): Always call do_redraw when there's a map to
10192 be drawin
10193 (MapCanvas.OnIdle): Removed.
10194
10195 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
10196 a parameter to determine the size of the rectangle.
10197 (MapCanvas.find_shape_at): Create the box around the point on a
10198 layer by layer basis and make the size depend on the shape type.
10199 This solves a problem with the selection of point shapes at the
10200 border of the layer's bounding box
10201
10202 2002-08-30 Bernhard Herzog <[email protected]>
10203
10204 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
10205 for the sensitivity of remove layer.
10206 (_can_remove_layer): New. Sensitivity callback for remove layer
10207 (Command layer_remove): Use _can_remove_layer
10208
10209 * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
10210 determine whether a given layer can be deleted.
10211
10212 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
10213 (MapCanvas.do_redraw): Get rid of the unused update_region
10214 instance variable
10215
10216 * Thuban/UI/view.py: Add/update some doc-strings.
10217
10218 * test/: new subdirectory with a bunch of unit tests.
10219
10220 * test/README, test/test_table.py, test/test_save.py,
10221 test/test_menu.py, test/test_load.py: Initial set of tests and
10222 brief instructions on how to run them
10223
10224 2002-08-29 Bernhard Herzog <[email protected]>
10225
10226 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
10227 arcs with multiple parts.
10228
10229 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
10230 Handle degenrate rectangles.
10231
10232 * Thuban/Model/table.py: Make writing records work correctly:
10233 (Table.__init__): Keep track of whether the DBF is open for
10234 writing
10235 (Table.write_record): Open the DBF file for writing when necessary
10236
10237 2002-08-27 Bernhard Herzog <[email protected]>
10238
10239 * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
10240 dbf files only for reading by default. Use a new writable dbf
10241 object for writing.
10242
10243 2002-08-26 Bernhard Herzog <[email protected]>
10244
10245 * Thuban/UI/mainwindow.py: Refactor the context creation:
10246 (MainWindow.Context): New method to return a context
10247 (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
10248 new method
10249
10250 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
10251 layer table specific code from TableGrid into LayerTableGrid
10252 (TableFrame, LayerTableFrame): Split the layer table specific code
10253 from TableFrame into LayerTableFrame
10254 (LayerTableGrid.select_shape): Remove a debug print
10255
10256 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
10257 LayerTableFrame
10258
10259 2002-08-23 Bernhard Herzog <[email protected]>
10260
10261 * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
10262 absolute filename.
10263
10264 2002-08-22 Bernhard Herzog <[email protected]>
10265
10266 * Thuban/Model/table.py (Table.write_record): New method to write
10267 records.
10268 (Table.__init__): Open the DBF file for writing too.
10269
10270 * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
10271 into the underlying table.
10272
10273 * extensions/shapelib/shapefil.h (DBFCommit),
10274 extensions/shapelib/dbfopen.c (DBFCommit): New API function to
10275 commit any changes made to the DBF file.
10276
10277 * Thuban/UI/mainwindow.py (make_check_current_tool)
10278 (_tool_command): Put the code that generates the "checked"
10279 callback into a separate function so that we can reuse it
10280 elsewhere
10281
10282 * Thuban/Model/save.py (Saver): New class to handle serializing a
10283 session into an XML file. The main reason to introduce a class is
10284 that applications built on Thuban can derive from it so that they
10285 can save additional information in a session file.
10286 (save_session): Delegate almost all the work to the Saver class.
10287 Rename the filename argument to file because it may be a file like
10288 object now.
10289
10290 * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
10291 code. Remove the little test code which would be executed when the
10292 module is run as a script which didn't work anymore since it can't
10293 import the other Thuban modules.
10294 (ProcessSession, load_session): Refactor the ProcessSession to
10295 have one method for each element start and end tag so that derived
10296 classes can easily override the processing of individual tags.
10297 Also, always parse with namespaces enabled because applications
10298 built on top of Thuban will likely use namespaces if they extend
10299 the session file format.
10300
10301 2002-08-21 Bernhard Herzog <[email protected]>
10302
10303 * setup.py (ThubanInstall.run): Don't repr install_lib_orig
10304 because thubaninit_contents will do it for us.
10305
10306 2002-08-16 Jan-Oliver Wagner <[email protected]>
10307
10308 * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
10309 tree window already open
10310
10311 2002-08-15 Bernhard Herzog <[email protected]>
10312
10313 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
10314 with self.
10315
10316 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
10317 when we have actually captured it.
10318
10319 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
10320 shapefile and destroy the table.
10321
10322 * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
10323
10324 2002-08-14 Bernhard Herzog <[email protected]>
10325
10326 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
10327 instance variable columns
10328 (RecordTable.GetTypeName): row and col may be negative in some
10329 cases.
10330
10331 * setup.py (InstallLocal.initialize_options)
10332 (InstallLocal.finalize_options, InstallLocal.user_options): New
10333 option create-init-file to build a thubaninit.py when running
10334 install_local
10335 (InstallLocal.run): Create the thubaninit.py module when requested
10336 (thubaninit_contents): Split the template into several parts and
10337 create a new function thubaninit_contents that creates the
10338 contents of a thubaninit module.
10339 (ThubanInstall.run): Use the new function to create the thubaninit
10340 module.
10341
10342 2002-07-30 Bernhard Herzog <[email protected]>
10343
10344 * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
10345 cleanup.
10346 (ThubanApplication.MainLoop): Extend to automatically call OnExit.
10347
10348 * Thuban/Model/session.py (Session.Destroy): Don't bypass the
10349 direct base class' Destroy method.
10350
10351 * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
10352 layers.
10353 (Map.Destroy): Destroy the label_layer as well and call the
10354 inherited Desatroymethod first so that no more messages are
10355 issued.
10356 (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
10357 message if the stacking order actually has changed. Add
10358 doc-strings.
10359 (Map.BoundingBox): Correct the doc-string.
10360 (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
10361 (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
10362
10363 * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
10364 all labels.
10365
10366 2002-07-29 Bernhard Herzog <[email protected]>
10367
10368 * Thuban/Model/map.py (Map.subscribe_layer_channels)
10369 (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
10370 to a layer's channels into separate methods.
10371 (Map.RemoveLayer, Map.AddLayer): Call the new methods
10372 (Map.Destroy): Unsubscribe from a layer's channels before
10373 destroying it.
10374
10375 * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
10376 selected_layer parameter to searched_layer which is the layer to
10377 search in.
10378 (MapCanvas.SelectShapeAt): New parameter layer to restrict the
10379 search to that layer. Return the selected layer and shape.
10380
10381 * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
10382 typo
10383
10384 2002-07-24 Bernhard Herzog <[email protected]>
10385
10386 * Thuban/UI/application.py (ThubanApplication.create_session):
10387 Extend the doc string.
10388 (ThubanApplication.subscribe_session)
10389 (ThubanApplication.unsubscribe_session): New methods to
10390 subscribe/unsubscribe to/from session channels.
10391 (ThubanApplication.SetSession): Call the new methods here.
10392 (ThubanApplication.maps_changed, ThubanApplication.set_map):
10393 Renamed set_map to maps_changed. Its now a subscriber for
10394 MAPS_CHANGED.
10395
10396 * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
10397 x-coordinate in case of simple clicks
10398
10399 * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
10400 don't pass it as a parameter
10401
10402 * Thuban/Model/session.py (Session.RemoveMap): New
10403
10404 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
10405 window size into a parameter.
10406
10407 2002-07-23 Bernhard Herzog <[email protected]>
10408
10409 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
10410 just commands.
10411
10412 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
10413 parameter list a bit to allow setting the window title and the
10414 initial message in the status bar. Update the callers.
10415
10416 * Thuban/UI/application.py (ThubanApplication.OnInit)
10417 (ThubanApplication.CreateMainWindow): Put the mainwindow
10418 instantiation into a separate method so that it can be overridden
10419 by a subclass.
10420
10421 2002-07-19 Bernhard Herzog <[email protected]>
10422
10423 * Thuban/Model/session.py: Issue a CHANGED message every time
10424 another changed message is issued to make it easier to get
10425 notified of changes.
10426 (Session): Update the doc string
10427 (Session.forward): Issue changed-events as CHANGED as well.
10428 (Session.changed): Overwrite the inherited version to issue
10429 CHANGED events as well.
10430
10431 * Thuban/UI/tree.py: We can now simply subscribe to the session's
10432 CHANGED channel to be informed of changes.
10433 (SessionTreeCtrl.session_channels): Not needed any longer.
10434 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
10435 Only have to (un)subscribe CHANGED
10436
10437 * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
10438
10439 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
10440 for the wxPython locale bug to __init__.py so that it's
10441 automatically executed by anybody using UI code from Thuban.
10442
10443 2002-07-18 Bernhard Herzog <[email protected]>
10444
10445 * Thuban/UI/main.py (main): app no longer needs to be global
10446
10447 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
10448 as parameter and store it in an instance variable
10449 (MainWindow.invoke_command, MainWindow.update_command_ui)
10450 (MainWindow.save_modified_session, MainWindow.NewSession)
10451 (MainWindow.OpenSession, MainWindow.SaveSession)
10452 (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
10453 application object.
10454
10455 * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
10456 the main window with self.
10457
10458 * Thuban/UI/context.py: New module with the context class
10459
10460 * Thuban/UI/command.py (Command): Update doc string.
10461
10462 * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
10463 MainWindow.update_command_ui): Pass an instance of the context
10464 class to the command's methods
10465 (check_current_tool, call_method): Handle the new context
10466 implementation
10467
10468 * Examples/simple_extensions/simple_tool.py (simple_tool,
10469 check_simple_tool): Handle the new context implementation
10470
10471 * Examples/simple_extensions/simple_command.py (simple_command):
10472 Handle the new context implementation. Update the comments about
10473 the context.
10474
10475 * Thuban/UI/application.py (ThubanApplication.SetSession): Add
10476 doc-string
10477 (ThubanApplication.Session): New method to return the session
10478 object
10479
10480 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
10481 interactor's selected_layer may not be a layer of the current
10482 session when the tree is updated while a new session is being set.
10483
10484 2002-07-17 Bernhard Herzog <[email protected]>
10485
10486 * Thuban/UI/tree.py (color_string): Removed. No longer used.
10487 (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
10488 update_tree into update_tree and add_items. The tree now uses a
10489 more generic way to display the contents of the tree.
10490 (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
10491
10492 * Thuban/Model/layer.py (Layer.TreeInfo),
10493 Thuban/Model/extension.py (Extension.TreeInfo),
10494 Thuban/Model/map.py (Map.TreeInfo),
10495 Thuban/Model/session.py (Session.TreeInfo):
10496 Add TreeInfo methods to implement the new tree view update scheme
10497
10498 2002-07-16 Bernhard Herzog <[email protected]>
10499
10500 * Thuban/UI/application.py: Don't use "import from" for the
10501 MainWindow. It can't always be resolved.
10502 (ThubanApplication.OnInit): change reference to MainWindow
10503 accordingly.
10504
10505 * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
10506 completely
10507
10508 2002-07-10 Bernhard Herzog <[email protected]>
10509
10510 * setup.py (create_init_module): New configurable variable whose
10511 default depends on the platform we're running on.
10512 (ThubanInstall.initialize_options): Initialize
10513 self.create_init_module from the global create_init_module
10514 (ThubanInstall.user_options): indictate that the options
10515 create-init-module and init-module-dir have arguments.
10516
10517 * setup.py: In the setup call change the version number to include
10518 cvs.
10519
10520 * MANIFEST.in: Add the files in Examples
10521
10522 2002-07-09 Bernhard Herzog <[email protected]>
10523
10524 * setup.py: In the setup call, use the thuban homepage as the
10525 value of the url parameter.
10526
10527 * Examples: New subdirectory for examples.
10528
10529 * Examples/simple_extensions/simple_tool.xpm,
10530 Examples/simple_extensions/simple_tool.py,
10531 Examples/simple_extensions/simple_command.py,
10532 Examples/simple_extensions/README: Simple examples showing how to
10533 add new commands and tools.
10534
10535 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
10536 bdist_rpm that we also have an install script.
10537 (bdist_inno): Add 2002 to the copyright notice.
10538
10539 * setup.py: Create a file in python's site-packages directory to
10540 make installation of Thuban as a library easier.
10541 (ThubanInstall.user_options): Add two new options,
10542 create-init-module and init-module-dir
10543 (ThubanInstall.expand_with_pure_python_dirs): New method to expand
10544 filenames for installation in the default directories.
10545 (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
10546 the inherited methods to capture some filenames before they're
10547 transformed too much by distutils.
10548 (ThubanInstall.run): Create the init module if requested.
10549 (ThubanInstall.thuban_init_filename): New method to return the
10550 full name of the init module.
10551 (ThubanInstall.get_outputs): Append the filename of the init
10552 module.
10553
10554 2002-07-08 Bernhard Herzog <[email protected]>
10555
10556 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
10557 handle the prefix properly which means that the default for the
10558 installation prefix should be /usr for RPMs and /usr/local when
10559 doing a normal source install.
10560 (bdist_rpm_install_script): Script to override the default install
10561 commands in the specfile generated by the bdist_rpm command.
10562 (thuban_bdist_rpm.user_options): Add a prefix option
10563 (thuban_bdist_rpm.initialize_options): Init the prefix option.
10564 Create the script files for the spec files as empty files here
10565 (thuban_bdist_rpm._make_spec_file): Override the inherited method
10566 to fill the script files with content.
10567
10568 * Thuban/Model/save.py (relative_filename): Wrapper around
10569 Thuban.Lib.fileutil.relative_filename that accepts an empty dir
10570 argument. save_session now automatically uses this version,
10571 solving a problem when saving to a relative filename.
10572
10573 * setup.py: In the setup call, make sure that the library
10574 directories are under $prefix/lib not directly under $prefix.
10575
10576 2002-06-20 Jan-Oliver Wagner <[email protected]>
10577
10578 * Thuban/Model/extension.py: new module to handle extension objects.
10579 * Thuban/Model/messages.py: new messages for extensions.
10580 * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
10581 Session.AddExtension): new for handling extensions.
10582 Also some other minor changes to round up extension handling.
10583 * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
10584 of Extension titles and title and names of its objects.
10585
10586 2002-05-29 Bernhard Herzog <[email protected]>
10587
10588 * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
10589 the events for a command.
10590 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
10591 Call bind_command_events to bind the events. add_toolbar_command
10592 can now bind events too so that it's possible to have commands
10593 that are only available through the toolbar.
10594 (MainWindow.init_ids): New instance variable events_bound to keep
10595 track of for which commands events have been bound.
10596
10597 2002-05-28 Bernhard Herzog <[email protected]>
10598
10599 * Thuban/UI/menu.py: New module to build and manage menus.
10600
10601 * Thuban/UI/mainwindow.py: Remove some unused imports.
10602 (MainWindow.__init__, main_menu): move the definition of the main
10603 menu from __init__ to the Menu instance main_menu.
10604 (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
10605 build the menu bar and sub-menus from a menu description.
10606
10607 * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
10608 startup file
10609 (ThubanApplication.read_startup_files): New method to run
10610 ~/.thuban/thubanstart.py
10611
10612 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
10613 Move the toolbar definition to the Menu instance main_toolbar.
10614 (MainWindow.build_toolbar): New method to build the toolbar
10615 similar to the build_menu methods
10616
10617 2002-05-23 Bernhard Herzog <[email protected]>
10618
10619 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
10620 layer_outline_color. Fix it in the definition of the command too.
10621
10622 * Thuban/UI/command.py (Command): Fix typo in doc string
10623
10624 2002-05-22 Bernhard Herzog <[email protected]>
10625
10626 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
10627 in the docstring
10628
10629 2002-05-15 Bernhard Herzog <[email protected]>
10630
10631 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
10632 when the shapefile is empty.
10633 (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
10634 now return None for empty shapefiles. Update doc-strings.
10635
10636 * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
10637 the layer's bbox being None.
10638
10639 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
10640 layer's bbox being None.
10641
10642 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
10643 necessary.
10644 (MapCanvas.__init__): New instance variables, last_selected_layer
10645 and last_selected_shape to determine how the selection has
10646 changed.
10647
10648 * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
10649 AutoSizeColumns because it will cause a traversal of the entire
10650 table which for large .dbf files will take a very long time.
10651
10652 2002-05-14 Bernhard Herzog <[email protected]>
10653
10654 * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
10655 maximum depth for the tree than shapelib does by default.
10656
10657 2002-05-10 Bernhard Herzog <[email protected]>
10658
10659 * setup.py (py_modules): The shptree modules doesn't have a
10660 wrapper, so don't include it in the py_modules
10661
10662 2002-05-08 Bernhard Herzog <[email protected]>
10663
10664 * extensions/shapelib/shptree.c (compare_ints): Make arguments
10665 const void * as in the qsort prototype
10666 (SHPTreeFindLikelyShapes): Remove some unused variables.
10667
10668 * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
10669 maintains to redraw the window during a drag.
10670 (MapCanvas.unprojected_rect_around_point): New method to determine
10671 a small region around a point for hit-testing.
10672 (MapCanvas.find_shape_at): Only test the shapes in a small region
10673 around the point.
10674
10675 * setup.py: Increment the version to 0.1.2
10676
10677 * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
10678 debug print and set session to None after unsubscribing
10679
10680 2002-05-07 Bernhard Herzog <[email protected]>
10681
10682 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
10683 the file to have a .thuban extension.
10684
10685 * Thuban/UI/tree.py (session_channels): New class constant with
10686 all the session channels to subscribe to to update the tree
10687 (SessionTreeCtrl.session_changed): Remember the session so that we
10688 can unsubscribe properly. Use the new class constant to
10689 unsubscribe from the old session and subscribe to the new one.
10690 (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
10691 subscriptions of the SessionTreeCtrl.
10692 (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
10693
10694 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
10695 Session Tree" command to the file menu.
10696
10697 * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
10698 as update_region to the renderer.
10699
10700 * Thuban/UI/renderer.py
10701 (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
10702 update box is now directly a tuple, not a wxRect anymore.
10703
10704 * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
10705 prints.
10706
10707 2002-05-07 Bernhard Herzog <[email protected]>
10708
10709 * setup.py: Add the shptree extension module. See
10710 extensions/pyshapelib/ChangeLog for more details.
10711
10712 * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
10713 extensions/shapelib/dbfopen.c: Really update to the versions of
10714 shapelib 1.2.9. For some reason it wasn't really done on
10715 2002-04-11.
10716
10717 * extensions/shapelib/shptree.c: Modified version of shptree.c of
10718 shapelib 1.2.9. The only real difference is the use of qsort
10719 instead of a bubble sort implementation
10720
10721 * Thuban/Model/layer.py (Layer.__init__): New instance variable
10722 shapetree to hold the shapelib quadtree for the shapefile
10723 (Layer.open_shapefile): Create the quad tree.
10724 (Layer.ShapesInRegion): New method to return the ids of shapes in
10725 a given region using the quad tree.
10726
10727 * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
10728 comment
10729 (draw_polygon_shape): Accept both arcs and polygons.
10730 (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
10731 the api.
10732
10733 * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
10734 return the shape ids to be rendered in a given layer.
10735 (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
10736 ids. Use draw_polygon_shape to draw arc shapes as well.
10737 (ScreenRenderer.RenderMap): New parameter for the rectangle that
10738 has to be updated
10739 (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
10740 calling it's ShapesInRegion method.
10741
10742 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
10743 update_region for the update region.
10744 (MapCanvas.OnPaint): Maintain the update region
10745 (MapCanvas.do_redraw): Pass the bounding box of the update_region
10746 to the renderer when drawing the bitmap. Reset the update_region.
10747
10748 2002-05-03 Bernhard Herzog <[email protected]>
10749
10750 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
10751 MainWindow.OpenSession): Change the file extension of the session
10752 files to .thuban
10753
10754 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
10755 Move the map channels to be forwarded by the session into the
10756 class constant with forwarded_channels. Also add
10757 LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
10758 forwarded_channels
10759
10760 * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
10761 typo and some rewording).
10762
10763 2002-05-02 Bernhard Herzog <[email protected]>
10764
10765 * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
10766 around to speed up most redraws:
10767 (MapCanvas.__init__): New instance variable bitmap which holds the
10768 bitmap
10769 (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
10770 self.bitmap to draw.
10771 (MapCanvas.full_redraw): New method to force a full redraw
10772 including the bitmap
10773 (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
10774 make sure the bitmap is redrawn.
10775 (MapCanvas.projection_changed, MapCanvas.set_view_transform,
10776 MapCanvas.shape_selected): Call full_redraw instead of readraw to
10777 make sure the bitmap is redrawn.
10778 (MapCanvas.OnSize): New method to handle size events so that the
10779 bitmap can be redrawn.
10780
10781 2002-04-29 Bernhard Herzog <[email protected]>
10782
10783 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
10784 canvas' VIEW_POSITION event
10785 (MainWindow.view_position_changed): Handler for VIEW_POSITION.
10786 Update the text in the status-bar accordingly.
10787
10788 * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
10789 (MapCanvas.__del__): Implement because Publisher.__del__ has to be
10790 called.
10791 (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
10792 current_position
10793 (MapCanvas.set_current_position): New method to set
10794 current_position. Issue a VIEW_POSITION event
10795 (MapCanvas.CurrentPosition): New public method to return the value
10796 of current_position. Should be called when the VIEW_POSITION event
10797 is processed.
10798 (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
10799 Update the position.
10800 (MapCanvas.OnLeaveWindow): Set the position to None.
10801
10802 * Thuban/UI/messages.py (VIEW_POSITION): New message for the
10803 position in the statusbar
10804
10805 2002-04-26 Frank Koormann <[email protected]>
10806
10807 * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
10808
10809 2002-04-24 Frank Koormann <[email protected]>
10810
10811 * Resources/Bitmaps/identify.xpm: shadow added
10812
10813 * Resources/Bitmaps/fullextent.xpm: new
10814
10815 2002-04-22 Jan-Oliver Wagner <[email protected]>
10816
10817 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
10818 box
10819
10820 2002-04-21 Jan-Oliver Wagner <[email protected]>
10821
10822 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
10823
10824 * Thuban/UI/tree.py (update_tree): added added map extent
10825
10826 * Thuban/UI/mainwindow.py (_method_command): extended by parameter
10827 icon; added map_full_extend as tool
10828
10829 2002-04-19 Jan-Oliver Wagner <[email protected]>
10830
10831 * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
10832 saving _new_ sessions
10833
10834 * Thuban/Model/session.py (create_empty_session): new session
10835 don't have a filename (set to None)
10836
10837 * Thuban/UI/tree.py (update_tree): added filename and modified flag
10838
10839 * Thuban/Model/load.py (ProcessSession): convert projection
10840 parameters from unicode to regular string
10841
10842 * Data/iceland_sample.session: Added UTM Zone 26 projection.
10843
10844 2002-04-11 Bernhard Herzog <[email protected]>
10845
10846 * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
10847 extensions/shapelib/dbfopen.c: Update to the versions of shapelib
10848 1.2.9
10849
10850 * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
10851 the pyshapelib directoy into the list of include dirs, so that
10852 pyshapelib_api.h can be found.
10853
10854 * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
10855 holds the pyshapelib C-API
10856 (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
10857 pyshapelib_api to access the shapelib functions.
10858 (initwxproj): Import the c_api from the shapelib module and
10859 initialize pyshapelib_api.
10860
10861 2002-04-04 Bernhard Herzog <[email protected]>
10862
10863 * setup.py (thuban_bdist_rpm.initialize_options): Use
10864 initialize_options to create the scripts for the rpm.
10865
10866 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
10867
10868 2002-04-03 Bernhard Herzog <[email protected]>
10869
10870 * setup.py: Increment version to 0.1.1
10871
10872 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
10873 Layer" and "Remove Layer" commands from the layer menu to the map
10874 menu
10875
10876 2002-02-15 Bernhard Herzog <[email protected]>
10877
10878 * Thuban/Model/layer.py (Layer.Shape): list append only takes one
10879 argument (python <= 1.5.2 erroneously accepted multiuple
10880 arguments)
10881
10882 2002-02-04 Bernhard Herzog <[email protected]>
10883
10884 * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
10885 RecordGrid in the identifyview.
10886 (IdentifyView.__init__): Use IdentifyGridCtrl instead of
10887 IdentifyListCtrl. The grid allows editing of the values.
10888
10889 * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
10890 implementing a grid for a single row of a thuban table.
10891
10892 * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
10893 layers by default. Easier to use than the previous default of only
10894 searching through the select layer which meant that if no layer
10895 was selected, you couldn't select a shape.
10896
10897 * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
10898
10899 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
10900 stroke_width attribute
10901
10902 * Thuban/Model/save.py (save_session): Write the new stroke_width
10903 attribute
10904
10905 * Thuban/Model/load.py (ProcessSession.startElement): Read the
10906 stroke_width attribute
10907
10908 * Thuban/Model/layer.py (Layer.__init__): New parameter and
10909 instance variable stroke_width
10910 (Layer.SetStrokeWidth): Set the stroke_width.
10911
10912 2002-02-01 Bernhard Herzog <[email protected]>
10913
10914 * extensions/thuban/wxproj.cpp (project_points): Fix two
10915 off-by-one errors in the last loop that joins the various parts
10916 together.
10917
10918 2002-01-14 Bernhard Herzog <[email protected]>
10919
10920 * setup.py (data_dist.make_distribution): Fix some typos
10921
10922 2001-09-18 Bernhard Herzog <[email protected]>
10923
10924 * README: Slight tweaking in preparation for the 0.1 release
10925
10926 * setup.cfg: Add section for sdist to create both tgz and zip
10927 archives
10928
10929 * setup.py: increase version number to 0.1
10930 (data_dist): New command class for data distribution
10931
10932 2001-09-14 Bernhard Herzog <[email protected]>
10933
10934 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
10935 Handle the case of no layer (i.e. layer is None) properly.
10936
10937 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
10938 Set the initial selection of the combo boxes to reflect the
10939 projection we're starting with in a way that works on windows,
10940 too.
10941
10942 * Thuban/Lib/connector.py (Connector.print_connections): Print the
10943 puiblisher's ids in hex to make it easier to compare them to the
10944 standard repr of python methods
10945
10946 * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
10947 messages
10948
10949 2001-09-13 Bernhard Herzog <[email protected]>
10950
10951 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
10952 deselect the layer if no layer is selected
10953
10954 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
10955 idle time when there actually is something to draw. If there's
10956 nothing to draw simply clear the window
10957 (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
10958 (MapCanvas.SetMap): force a redraw in all cases because
10959 FitMapToWindow doesn't always do it.
10960 (MapCanvas.ZoomFactor): Add an optional parameter, center, to
10961 specify the point to move into the center of the window
10962 (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
10963 dragged, zoon in/out by a factor of 2
10964 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
10965 index, i.e. reversed drawing order) so that objects appearing to
10966 be in from of others are selected first. This is probably mostly
10967 relevant for point shapes where the symbols used may overlap
10968
10969 * Thuban/Model/session.py (create_empty_session): Unset the
10970 modified bit before returning it
10971
10972 * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
10973 create_empty_session session to create the new, empty session.
10974
10975 * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
10976 the tool bitmaps.
10977 (MainWindow.OnClose, MainWindow.save_modified_session): Separate
10978 the code that asks whether the session should be saved into the
10979 new method save_modified_session.
10980 (MainWindow.OpenSession, MainWindow.NewSession): Use the new
10981 method to save modified session here too.
10982
10983 2001-09-11 Bernhard Herzog <[email protected]>
10984
10985 * setup.py (InnoIconItem): fix typo
10986
10987 (thuban_bdist_inno.run):
10988 (bdist_inno.run): Move the decision not to create symlinks on
10989 non-nt platforms to thuban_bdist_inno and do it unconditinally
10990 since we never want to create the symlinks here
10991
10992 2001-09-10 Bernhard Herzog <[email protected]>
10993
10994 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
10995 identify view immediately
10996
10997 * Thuban/UI/controls.py: New file with two classes RecordListCtrl
10998 and SelectableRecordListCtrl that implement the code shared by the
10999 identify view and the label dialog
11000
11001 * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
11002 new class RecordListCtrl
11003
11004 * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
11005 return value of GetValue is None instead of using it as a boolean
11006 directly so that Zero numbers are handled properly.
11007 (LabelListCtrl): Derive from the new class
11008 SelectableRecordListCtrl
11009
11010 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
11011 (Proj4Dialog.dialogLayout): Make the window resizable and set the
11012 size of the text control explicitly to make the sizers work on
11013 both Windows and X.
11014
11015 2001-09-07 Bernhard Herzog <[email protected]>
11016
11017 * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
11018 that can limit the search to the currently selected layer.
11019 (MapCanvas.SelectShapeAt): Make sure that the currently selected
11020 layer stays selected even when no shape is found
11021 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
11022 height do nothing (avoids zero division errors)
11023
11024 2001-09-06 Bernhard Herzog <[email protected]>
11025
11026 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
11027 Correct the spelling of SessionTreeCtrl. dabbrev is too damn
11028 convenient :-)
11029 (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
11030 a new instvar layer_to_item to map layers to tree items
11031 (SessionTreeCtrl.layer_selected): Select the appropriate tree item
11032 to match the current selection in the interactor
11033
11034 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
11035 (Interactor.HasSelectedLayer): New methods to query the current
11036 selection
11037
11038 * Thuban/UI/mainwindow.py (MainWindow.current_layer):
11039 (MainWindow.has_selected_layer): Simply call the appropriate
11040 interactor method
11041
11042 * Thuban/UI/mainwindow.py (MainWindow.__init__):
11043 (MainWindow.LayerShowTable):
11044 (MainWindow.identify_view_on_demand): Store the interactor in an
11045 instvar and use that reference instead of going through main.app
11046
11047 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
11048 * Thuban/UI/application.py (ThubanApplication.OnInit):
11049 * Thuban/UI/main.py (main): Create the session tree view in main
11050 with the new mainwindow method ShowSessionTree and not directly
11051 the application's OnInit method
11052
11053 * Thuban/UI/tree.py (myTreeCtrlPanel):
11054 (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
11055 TreeCtrl isntead of a panel. This affects most method since we now
11056 refer to self instead of self.tree
11057 (SessionTreeView): New class implementing a non-modal dialog
11058 showing the session tree.
11059
11060 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
11061 layer to the tableview dialog.
11062
11063 * Thuban/UI/tableview.py: Add some doc-strings
11064 (TableGrid):
11065 (TableGrid.OnRangeSelect):
11066 (TableGrid.OnSelectCell):
11067 (TableFrame.__init__):
11068 (TableFrame.row_selected):
11069 Selecting rows in the grid view now updates the selected shapes
11070 through the TableFrame. To achieve this we derive TableGrid from
11071 Publisher and introduce the message type ROW_SELECTED which the
11072 TableFrame subscribes to and which is issued by OnRangeSelect and
11073 OnSelectCell
11074
11075 (DataTable.SelectRow): Removed because it's no longer needed in
11076 the row/shape selection scheme
11077
11078 * Thuban/UI/dialogs.py: New file implementing common classes for
11079 dialogs
11080
11081 * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
11082 the SELECTED_SHAPE message anymore. This is now handled by the
11083 parent.
11084 (TableGrid.select_shape): Only update the selection if the shape
11085 is not None.
11086 (TableFrame): Inherit from the new NonModalDialog class.
11087 (TableFrame.__init__, TableFrame.select_shape): Handle the
11088 SELECT_SHAPE message.
11089 (TableFrame.OnClose): Extend the inherited method to unsubscribe
11090 SELECT_SHAPE
11091
11092 * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
11093 (MainWindow.add_dialog):
11094 (MainWindow.dialog_open):
11095 (MainWindow.remove_dialog):
11096 (MainWindow.get_open_dialog): New methods to maintain a dictionary
11097 of opened non-modal dialogs.
11098
11099 (MainWindow.__init__): Initialize the new non-modal dictionary
11100 management code
11101 (MainWindow.LayerShowTable): maintain separate dialogs for each
11102 table using the non-modal dialog management code to only open a
11103 view once for each table.
11104
11105 (MainWindow.IdentifyTool):
11106 (MainWindow.__init__):
11107 (MainWindow.identify_view_on_demand): Don't open the identify view
11108 in IdentifyTool anymore. This will be done automatically by the
11109 new method identify_view_on_demand which handles the
11110 SELECTED_SHAPE message so that the identify view will be opened on
11111 demand
11112
11113 * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
11114 the interactor argument. The SELECTED_SHAPE message is now handled
11115 by the parent.
11116 (IdentifyView.__init__): Add the interactor argument so that we
11117 can handle the SELECTED_SHAPE message here
11118 (IdentifyView.selected_shape): New method to handle the
11119 SELECTED_SHAPE messages
11120
11121 * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
11122 NonModalDialog class
11123 (IdentifyView.OnClose): Extend the inherited version to
11124 unsubscribe SELECT_SHAPE
11125
11126 * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
11127
11128 2001-09-05 Bernhard Herzog <[email protected]>
11129
11130 * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
11131
11132 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
11133 interactor to pass through to the MapCanvas
11134
11135 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
11136 argument to the MainWindow constructor to get rid of the ugly hack
11137 that made main.app available early just so that the mapcanvas
11138 could access the interactor object.
11139
11140 2001-09-04 Bernhard Herzog <[email protected]>
11141
11142 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
11143 that runs a modal message box
11144 (MainWindow.OnClose): Use the new method
11145 (MainWindow.RemoveLayer): Just do nothing in case no layer is
11146 selected. The command should be grayed out anyway, so there's no
11147 need to pop up a message box.
11148 (MainWindow.AddLayer): Pop up a message box with an error message
11149 if the shape file can't be opened
11150
11151 * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
11152 immediately. This will cause an exception in case the file can't
11153 be opened and we can display an appropriate message.
11154
11155 * MANIFEST.in: Add extensions/pyprojection/LICENSE
11156
11157 * setup.py (thuban_bdist_rpm): New class implementing a Thuban
11158 specific bdist_rpm command.
11159
11160 * Thuban/UI/main.py: Catch ImportError exceptions when importing
11161 the locale module because it may not be available on some
11162 installations.
11163
11164 * extensions/pyprojection/LICENSE: Copy of the license text in
11165 Projection.i. Having it in a separate file makes it easier to
11166 refer to license text in e.g. RPMs
11167
11168 2001-09-03 Bernhard Herzog <[email protected]>
11169
11170 * setup.py: use wx-config instead of wxgtk-config because it's
11171 more generic
11172
11173 * setup.py (ThubanInstall.get_outputs): Add the symlink in
11174 <prefix>/bin to the outputs
11175 (ThubanInstall.link_file): New method to link files. We need this
11176 because the standard copy_files refuses to link non-existing
11177 files.
11178 (ThubanInstall.run): Remove the leading install root from the
11179 script filename if an install root was specified and use the new
11180 link_file method
11181
11182 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
11183 the window when the first layer is added to the map.
11184
11185 * setup.py (ThubanInstall.run): Honor the build root (self.root)
11186 when linking thuban.py to <prefix>/bin
11187
11188 2001-08-31 Bernhard Herzog <[email protected]>
11189
11190 * setup.py: In the setup call, the install parameters shouldn't
11191 have trailing slashes because distutils on non-posix platforms
11192 doesn't like that. The same applies to other directories like
11193 "Resources/Bitmaps"
11194
11195 In the configuration section for nt, move the wxWindows directory
11196 optins into the part clearly marked as editable.
11197
11198 (InstallLocal.initialize_options):
11199 (InstallLocal.user_options): remove the currently unused debug
11200 flag
11201 (thuban_build_py.find_all_modules): Add this method so that it
11202 works for our case of having packages and modules in one
11203 distribution as well.
11204 (ThubanInstall.initialize_options):
11205 (ThubanInstall.finalize_options):
11206 (ThubanInstall.user_options):
11207 (ThubanInstall.boolean_options): Add new options, do-symlink and
11208 extra files. Since these are the first ThubanInstall specific
11209 options, override user_options and boolean_options
11210 (ThubanInstall.run): Honor the new do-symlink and extra-files
11211 options.
11212 (ThubanInstall.get_outputs): Add to override the base-class's
11213 version and add the extra-files to the outputs
11214 (bdist_inno): New class for windows distributions with Inno Setup
11215 (InnoIconItem): Helper class for bdist_inno
11216 (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
11217 this together with the appropriate parameters, to the setup call.
11218
11219 * setup.cfg (bdist_inno): added new section for the inno setup
11220 installer
11221
11222 * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
11223 changing_selection to avoid recursive selection events when
11224 modifying the selection in response to a selection event.
11225 (myTreeCtrlPanel.normalize_selection): Set the new inst var when
11226 changing the tree's selection.
11227 (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
11228 we're not being called indirectly from normalize_selection.
11229
11230 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
11231 event.Check only if the command is actuall checkable.
11232 (MainWindow.__init__): Call the toolbar's Realize method to make
11233 sure that the items are actually shown
11234
11235 2001-08-28 Bernhard Herzog <[email protected]>
11236
11237 * setup.py: Fix some doc strings
11238
11239 * ChangeLog: started
11240

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26