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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2255 - (show annotations)
Wed Jun 23 12:42:54 2004 UTC (20 years, 8 months ago) by jschuengel
Original Path: trunk/thuban/ChangeLog
File size: 379088 byte(s)
Add the export function to the umn_mapserver extension.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26