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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2211 - (show annotations)
Sun May 16 09:50:09 2004 UTC (20 years, 10 months ago) by jan
Original Path: trunk/thuban/ChangeLog
File size: 373776 byte(s)
Finished introduction of Menu.FindOrInsertMenu.

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

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26