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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2204 - (show annotations)
Tue May 11 22:36:03 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 373140 byte(s)
Introduce and use Menu.FindOrInsertMenu.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26