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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 995 - (show annotations)
Thu May 22 18:05:25 2003 UTC (21 years, 9 months ago) by bh
Original Path: trunk/thuban/ChangeLog
File size: 150820 byte(s)
update ChangeLog

1 2003-05-22 Bernhard Herzog <[email protected]>
2
3 * Thuban/Model/table.py (DBFTable.FileName): New. Accessor method
4 for the filename
5
6 * test/test_dbf_table.py (TestDBFTable.test_filename): New. Test
7 for the FileName method
8 (TestDBFTableWriting.test_write): Fix spelling of filename
9
10 2003-05-22 Thomas Koester <[email protected]>
11
12 * Thuban/Model/range.py, test/test_range.py: Brought over new Range
13 from SciParam that now really is immutable.
14
15 2003-05-22 Frank Koormann <[email protected]>
16
17 Layer Top/Bottom placement added to legend.
18
19 * Thuban/UI/legend.py
20 (LegendPanel._OnMoveTop(), LayerPanel._OnMoveBottom): New, methods
21 bound to tool events.
22 (LegendTree.MoveCurrentItemTop(), LegendTree.MoveCurrentItemBottom):
23 New, methods binding the event methods with the map methods.
24
25 * Thuban/Model/map.py (Map.TopLayer(), Map.BottomLayer()): New, place
26 layer at top/bottom of layer stack.
27
28 * Resources/Bitmaps/top_layer.xpm: New button icon.
29
30 * Resources/Bitmaps/bottom_layer.xpm: New button icon.
31
32 2003-05-22 Bernhard Herzog <[email protected]>
33
34 * Thuban/Model/session.py (Session.RemoveTable): New method to
35 remove tables
36
37 * test/test_session.py (TestSessionSimple.test_remove_table): New.
38 Test for RemoveTable
39
40 2003-05-22 Thomas Koester <[email protected]>
41
42 * Thuban/Model/classgen.py: Added short module doc string and CVS id.
43 (ClassGenerator.GenUniformDistribution): Use new Range __init__, too.
44
45 2003-05-22 Bernhard Herzog <[email protected]>
46
47 Implement a way to discover dependencies between tables and
48 shapestores.
49
50 * Thuban/Model/transientdb.py (TransientTableBase.Dependencies)
51 (TransientJoinedTable.Dependencies)
52 (AutoTransientTable.SimpleQuery): New. Implement the dependencies
53 interface
54 (TransientJoinedTable.__init__): Keep tack of the original table
55 objects in addition to the corresponding transient tables.
56
57 * Thuban/Model/table.py (DBFTable.Dependencies)
58 (MemoryTable.Dependencies): New. Implement the dependencies
59 interface
60
61 * Thuban/Model/data.py (ShapeTable): New. Helper class for
62 ShapefileStore
63 (ShapefileStore.__init__): Use ShapeTable instead of
64 AutoTransientTable
65 (ShapefileStore.Table, ShapefileStore.Shapefile): Add doc-strings
66 (ShapefileStore.FileName, ShapefileStore.FileType): New. Accessor
67 methods for filename and type
68 (ShapefileStore.Dependencies): New. Implement the dependencies
69 interface
70 (DerivedShapeStore): New class to replace SimpleStore. The main
71 difference to SimpleStore is that it depends not on a shapefile
72 but another shapestore which expresses the dependencies a bit
73 better
74 (SimpleStore.__init__): Add deprecation warning.
75
76 * test/test_dbf_table.py (TestDBFTable.test_dependencies): New.
77 Test for the Dependencies method.
78
79 * test/test_memory_table.py (TestMemoryTable.test_dependencies):
80 New. Test for the Dependencies method.
81
82 * test/test_transientdb.py
83 (TestTransientTable.test_auto_transient_table_dependencies): New.
84 Test for the Dependencies method.
85 (TestTransientTable.test_transient_joined_table): Add test for the
86 Dependencies method.
87
88 * test/test_session.py (TestSessionSimple.setUp)
89 (TestSessionSimple.tearDown): New. Implement a better way to
90 destroy the sessions.
91 (TestSessionSimple.test_initial_state)
92 (TestSessionSimple.test_add_table): Bind session to self.session
93 so that it's destroyed by tearDown
94 (TestSessionSimple.test_open_shapefile): New. Test for
95 OpenShapefile and the object it returns
96
97 2003-05-22 Bernhard Herzog <[email protected]>
98
99 * Thuban/Model/session.py (Session.AddTable): New method to
100 register tables with the session.
101 (Session.Tables): Return the tables registered with AddTable too.
102
103 * test/test_session.py (TestSessionSimple.test_add_table): New.
104 Test case for the AddTable method
105
106 2003-05-22 Frank Koormann <[email protected]>
107
108 UI polishing updates: Place main buttons (OK, Cancel, etc) in the
109 lower right corner, center labels for selections, initialize controls
110 in reasonable order for keyboard navigation.
111
112 * Thuban/UI/projdialog.py (ProjFrame.__init__, ProjFrame.__doLayout)
113 (ProjFrame.__DoOnProjAvail): Determine position of current projection
114 using the wxListBox.FindString() method. Still a problem (#1886)
115
116 * Thuban/UI/classifier.py
117 (Classifier.__init__, SelectPropertiesDialog.__init__)
118
119 * Thuban/UI/classgen.py (ClassGenDialog.__init__,
120 (ClassGenDialog.__DoOnGenTypeSelect): Moved initialization of the
121 different classification types from here to __init__.
122 (GenUniquePanel.__init__): Set the column width of the first field
123 in the Field ListCtrl to the full width.
124
125 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Rename 'Save As'
126 Button to 'Export'. Center Buttons in Selection Box, set Focus to
127 Grid.
128 (LayerTableFrame.OnKeyDown()): New, bound to the grid with EVT_KEY_DOWN,
129 changes focus to the Selection when pressing "Alt-S".
130
131 * Thuban/UI/legend.py (LegendTree.__SetVisibilityStyle): Only gray out
132 the text if not visible. The italic font sometimes exceeds the
133 rendering area.
134
135 2003-05-21 Jonathan Coles <[email protected]>
136
137 * Thuban/UI/dock.py (DockFrame): Rename references to _OnClose
138 to OnClose so that Thuban closes correctly.
139
140 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Call
141 DockFrame.OnClose, not DockFrame._OnClose.
142
143 2003-05-21 Jonathan Coles <[email protected]>
144
145 * Thuban/Model/classgen.py (ClassGenerator.GenQuantiles): Remove
146 references to 'inf' and use new Range __init__ to pass floats
147 directly rather than converting them to strings first.
148 Fixes RTBug #1876.
149
150 * Thuban/Model/classification.py (ClassGroupRange.SetRange):
151 Use new Range ___init__ to pass floats.
152
153 * Thuban/Model/layer.py (RasterLayer.__init__): Test if the
154 filename is a valid image file. Throw IOError otherwise.
155
156 * Thuban/Model/range.py: Brought over new Range from SciParam that
157 is immutable and has an __init__ which can accept floats.
158
159 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Move OpenShapefile
160 into try block. AddLayer doesn't throw any exceptions anymore.
161 (MainWindow.AddRasterLayer): Move constructor of RasterLayer into
162 try block.
163
164 * Thuban/UI/projdialog.py (GeoPanel.__init__): Put Degrees as
165 the first item in choices. Fixes RTBug #1882.
166
167 * Thuban/UI/renderer.py (MapRenderer.render_map): Check if scale
168 has gone to 0 which is a serious problem. abort.
169 (MapRenderer.draw_raster_layer): Catch IOError seperately and
170 print the error from GDAL.
171
172 * Thuban/UI/tableview.py (TableGrid.__init__): Call
173 ToggleEventListeners to turn on listening.
174 (TableGrid.ToggleEventListeners): New. Turns event listening on
175 and off so as to prevent excessive messages.
176 (LayerTableFrame.OnQuery): Use TableGrid.ToggleEventListeners
177 to suppress excessive messages when selecting many rows.
178 Fixes RTBug #1880.
179
180 * Thuban/UI/view.py: Added checks against if scale == 0. This
181 is a serious problem that can occur when an image without
182 geo data is loading and causes the map projection bounds to
183 go to infinity. Right now, the solution is to simply try
184 to recover.
185
186 * extensions/thuban/cpl_mfile.cpp (MFILEClose): Make sure
187 to set the MFILEReceiver attributes even if the data is NULL.
188
189 * extensions/thuban/gdalwarp.cpp: Improved the error handling
190 and passed GDAL messages back up to the Python layer. Also
191 tried to fix some memory leaks that were present in the original
192 utility but didn't matter because the program aborted.
193
194 * test/test_range.py: Copied over tests from SciParam. Removed
195 tests against importing. Fixes RTBug #1867.
196
197 2003-05-21 Bernhard Herzog <[email protected]>
198
199 * test/test_load.py: Remove unused imports and restructure the
200 test code
201 (LoadSessionTest): Split into one class for each test and turn
202 LoadSessionTest itself into the base class for all such session
203 tests.
204 (ClassificationTest): New base class for load tests that test
205 classifications
206 (TestSingleLayer, TestLayerVisibility, TestClassification)
207 (TestLabels, TestLayerProjection, TestRasterLayer): New classes
208 for the individual tests
209
210 * test/support.py (FileLoadTestCase.filename): New base class for
211 file loading tests
212
213 2003-05-21 Jan-Oliver Wagner <[email protected]>
214
215 * Resources/Projections/defaults.proj: Renamed 'Universal Transverse
216 Mercator' to 'UTM Zone 32' as a more convenient example.
217 Added 'Gauss Krueger Zone 6'.
218
219 * Data/iceland_sample_raster.thuban: political polygon now
220 filled transparent to have the raster image visible at once.
221
222 2003-05-21 Frank Koormann <[email protected]>
223
224 * Thuban/UI/mainwindow.py (MainWindow): Renamed _OnClose() back to
225 OnClose() to keep in sync with extensions. Internally Thuban
226 still uses "underscored" names.
227
228 2003-05-20 Jonathan Coles <[email protected]>
229
230 This puts back Raster layer support. These layers support projections
231 through the GDAL library. Currently, the CVS version is being used.
232 There are no Debian packages available although this may change soon.
233 A GDAL driver was extended to support writing to memory rather to
234 files.
235
236 There is still some work that needs to be done, such as some error
237 handling when loading invalid images or when there is a problem
238 projecting the image. This putback simply checks in the majority
239 of the work.
240
241 * setup.py: Add gdalwarp library extension.
242
243 * Thuban/Model/layer.py (BaseLayer.HasClassification): New.
244 Defaults to False, but can be overridden by subclasses if they
245 support classification.
246 (RasterLayer): New. Defines a new layer that represents an
247 image.
248
249 * Thuban/Model/load.py (SessionLoader.__init__): Add rasterlayer
250 tag handler.
251 (SessionLoader.start_layer): Encode the filename.
252 (SessionLoader.start_rasterlayer, SessionLoader.end_rasterlayer):
253 New. Supports reading a rasterlayer tag.
254
255 * Thuban/Model/map.py (Map.BoundingBox): Fix typo in comment.
256
257 * Thuban/Model/save.py (XMLWriter.encode): Don't assume that we
258 get a string in Latin1. If we get such as string convert it to
259 unicode first, otherwise leave if alone before encoding.
260 (SessionSaver.write_layer): Add support for writing both Layers
261 and RasterLayers.
262
263 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
264 The right argument may not be a string, it could also be a Column.
265
266 * Thuban/UI/application.py (ThubanApplication.CreateMainWindow):
267 Make initial window size 600x400. Fixes RTBug #1872.
268
269 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange how
270 the dialog is constructed so that we can support layers that
271 do not have classifications.
272 (Classifier._OnTry): Only build a classification if the layer
273 supports one.
274
275 * Thuban/UI/legend.py: Change all checks that a layer is an
276 instance of Layer into checks against BaseLayer.
277 (LegendTree.__FillTreeLayer): Only add children to a branch if
278 the layer supports classification.
279
280 * Thuban/UI/mainwindow.py (MainWindow.NewSession,
281 MainWindow.OpenSession): Don't proceed with an action if the
282 user chooses Cancel when they are asked to save changes.
283 (MainWindow.AddRasterLayer): New. Open a dialog to allow the
284 user to select an image file. Create a new RasterLayer and add
285 it to the map.
286
287 * Thuban/UI/renderer.py (MapRenderer.render_map): Add support
288 for rendering RasterLayer layers.
289 (MapRenderer.draw_raster_layer): Actually method that calls
290 the GDALWarp python wrapper and constructs an image from the
291 data returned.
292
293 * Thuban/UI/tableview.py (LayerTableFrame.__init__): Change the
294 Choices symbols to match those used in the table query method.
295 Replace deprecated method calls on table with new method names.
296
297 * Thuban/UI/view.py (MapCanvas.set_view_transform): Try to limit
298 how small the scale can get. This still needs more testing.
299
300 * extensions/thuban/bmpdataset.cpp: New, but copied from GDAL.
301 Provides a driver to output in .bmp format.
302
303 * extensions/thuban/cpl_mfile.cpp, extensions/thuban/cpl_mfile.h:
304 New. Provides IO routines which write to memory, rather than a file.
305
306 * extensions/thuban/gdalwarp.cpp: New, but basically a direct copy
307 of the gdalwarp utility provided in GDAL. Added function calls
308 that can be accessed from python.
309
310 * Data/iceland_sample_raster.thuban: New. Sample file that uses
311 a raster layer.
312
313 * Data/iceland/island.tfw, Data/iceland/island.tif: New. Raster
314 layer image data.
315
316 * Doc/thuban.dtd: Added rasterlayer attribute definition.
317
318 * test/test_layer.py, test/test_load.py, test/test_save.py: Added
319 tests associated with the raster layer code.
320
321 * test/test_transientdb.py
322 (TestTransientTable.test_auto_transient_table_query): Added a test
323 for using a Column object as the "right" parameter to a query.
324
325 2003-05-19 Frank Koormann <[email protected]>
326
327 * Thuban/version.py (get_changelog_date):
328 Catch exceptions if ChangeLog does not exist.
329
330 * Thuban/UI/view.py (MapCanvas.Export): Bugfix
331
332 2003-05-19 Frank Koormann <[email protected]>
333
334 Extended version information for Thuban
335
336 * Thuban/version.py: New, version information for Thuban: Last
337 modification date and last ChangeLog entry date.
338
339 * Thuban/UI/mainwindow.py (MainWindow.About()): Extended version
340 information: Display Thuban, wxPython and Python version.
341
342 2003-05-16 Bernhard Herzog <[email protected]>
343
344 * Thuban/Model/save.py: Remove some unused imports including the
345 __future__ import for nested_scopes as Thuban relies on Python 2.2
346 now.
347 (XMLWriter.encode): Remove the special case for a None argument.
348 In the saver encode is always called with a string argument.
349
350 2003-05-16 Bernhard Herzog <[email protected]>
351
352 * Thuban/UI/__init__.py: Remove the work-around for the locale bug
353 in wxPython (at least when usinvg wxGTK) prior to 2.4. The symptom
354 of the bug was that e.g. float("1.2") would fail. Thuban now
355 requires 2.4.x.
356
357 2003-05-16 Frank Koormann <[email protected]>
358
359 Printing enhancement and WMF export (under Win32)
360
361 * Thuban/UI/renderer.py (ExportRenderer): New, derived from
362 ScreenRenderer. Renders Map, Legend and Scalebar for export.
363 (PrinterRenderer): New, derived from ExportRenderer. Replaces the old
364 PrintRender.
365
366 * Thuban/UI/view.py (MapPrintout.__init__): Enhanced parameter set
367 to fullfil information needed for PrinterRenderer.
368 (MapCanvas.Export): New. Export Map (currently only to WMF on Win32).
369 (MapCanvas.Print): Adapted to new MapPrintout.
370 (OutputTransform): General calculations to transform from canvas
371 coordinates to export/printing devices.
372
373 * Thuban/UI/mainwindow.py (MainWindow.ExportMap()): New. Added also
374 new method_command to call ExportMap, with platform dependency (only
375 __WXMSW__)
376
377 * Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Position and Size
378 of scalebar drawing area as new parameters.
379
380 * Thuban/Model/scalebar.py (roundInterval): round long instead of int
381
382 * Thuban/UI/legend.py (ScalebarBitmap.__SetScale):
383 Update to extended scalebar.DrawScalebar header.
384
385 * test/test_export.py: New, test Thuban.UI.view.OutputTransform()
386
387 * test/test_scalebar.py: Made test executable as standalone.
388
389 2003-05-16 Bernhard Herzog <[email protected]>
390
391 * Thuban/Model/table.py (Table): Remove this compatibility alias
392 for DBFTable.
393
394 * test/test_table.py: Import DBFTable as Table because that alias
395 doesn't exist anymore.
396
397 * Thuban/UI/classgen.py: Remove some unused imports
398
399 2003-05-14 Jonathan Coles <[email protected]>
400
401 * Thuban/Model/classgen.py (ClassGenerator.GenSingletonsFromList):
402 Fix docstring.
403 (ClassGenerator.GenUniformDistribution): Fix spelling of method name.
404 (ClassGenerator.GenQuantiles): Use the left/right brackets and min/max
405 values of the supplied range to determine the beginning and end
406 bounds of the generated classes.
407
408 * Thuban/Model/range.py (Range.number_re): Now accepts floats that
409 do not have a leading 0 (.5 is now accepted as well as 0.5).
410
411 * Thuban/UI/classgen.py (ClassGenDialog.OnOK): Fix name of method
412 call to ClassGenerator.GenUniformDistribution.
413
414 * Thuban/UI/projdialog.py (ProjFrame.__do_layout): Fix Windows
415 layout bug with the 'Projection' label.
416
417 * test/support.py (FloatTestCase): New. Needed for the Range tests.
418
419 * test/test_range.py: New. Imported from SciParam.
420
421 2003-05-12 Jonathan Coles <[email protected]>
422
423 * Thuban/UI/classgen.py (GenQuantilesPanel.GetList): Replace call
424 to table.UniqueValues() with calls that retrieve all the values
425 from the table. This will need to be replaced by a method on table
426 which can simply return the list (perhaps more efficiently).
427
428 2003-05-12 Jonathan Coles <[email protected]>
429
430 The return value of ClassGenerator.CalculateQuantiles has changed.
431 Refer to the documentation for details.
432
433 * test/test_classgen.py: Modified Quantile tests to use the
434 new return values.
435
436 * Thuban/Model/classgen.py
437 (ClassGenerator.GenQuantiles): Add comments describing the parameters,
438 use new return values from CalculateQuantiles to produce the correct
439 range bounds in the Classification.
440 (ClassGenerator.CalculateQuantiles): Add more comments describing
441 the return values and parameters. Make minor adjustments to improve
442 the legibility of the code. Fix problem with adjusted not being set
443 in most cases.
444
445 2003-05-12 Frank Koormann <[email protected]>
446
447 * Thuban/Model/save.py (XMLWriter.encode()): Explicite call to unicode
448 and latin1. Fixes #1851 finally.
449
450 2003-05-09 Jonathan Coles <[email protected]>
451
452 * test/test_classgen.py: New. Tests the Quantile algorithm.
453
454 * Thuban/Model/classgen.py (ClassGenerator.CalculateQuantiles):
455 Clean up debugging statement, add comments, fix a small bug in the
456 returned adjusted percentiles.
457
458 2003-05-09 Jonathan Coles <[email protected]>
459
460 Introduces Range class from SciParam into the ClassGroupRange class,
461 and such ranges can now be saved and loaded from disk.
462
463 Quantiles are now available in the Classification Generator.
464
465 Initial support for building Queries on a table. Doesn't do anything
466 but run some tests.
467
468 * Thuban/Model/classification.py: Explicit imports.
469 (ClassGroupRange): Use the Range class to store the underlying
470 range information. The interface remains the same, except for
471 GetRange(), and you can also supply a Range object as the min
472 parameter to SetRange or __init__.
473
474 * Thuban/Model/load.py (XMLReader.encode): New. Encodes the given
475 string appropriately for use in Thuban. Fixes RTbug #1851.
476 (SessionLoader.end_projection): Handle the context of the
477 projection tag a bit better by looking at what objects are not
478 None. There was an assumption that a projection tag for a map
479 could occur before any layers.
480 (SessionLoader.start_clrange): Provide backward compatibility for
481 reading min/max values as well as the new range parameter.
482
483 * Thuban/Model/map.py: Explicit imports.
484
485 * Thuban/Model/resource.py: Import _.
486 (ProjFileSaver.write): write header using projfile.dtd.
487
488 * Thuban/Model/save.py: Explicit imports.
489 (XMLWriter.encode): New. Encode the given string from a format
490 used by Thuban into UTF-8. Fixes RTbug #1851.
491
492 * Thuban/UI/classgen.py: Explicit imports.
493 (ClassGenDialog.__init__): Clean up the code and add support
494 for Quantiles.
495 (ClassGenDialog.OnOK): Add support for Quantiles.
496 (GenQuantilesPanel): New. Input panel for Quantiles.
497 (ClassGenerator, CustomRamp, MonochromaticRamp, GreyRamp, RedRamp,
498 GreenRamp, BlueRamp, HotToColdRamp): Move to Thuban/Model/classgen.py
499
500 * Thuban/Model/classgen.py: New. Contains all the classes named above.
501
502 * Thuban/UI/classifier.py: Explicit imports.
503 (ClassTable.GetValueAsCust, ClassTable.__ParseInput,
504 ClassTable.SetValueAsCustom): Reworked to use new Range class.
505
506 * Thuban/UI/legend.py: Explicit imports.
507
508 * Thuban/UI/mainwindow.py: Add support for the Join Dialog. Added
509 a Table menu and associated method calls.
510 (MainWindow.choose_color): Removed. No longer needed.
511
512 * Thuban/UI/projdialog.py (ProjFrame.__VerifyButtons): Save button
513 should be disabled if no projection is selected in the available
514 list.
515
516 * Thuban/UI/renderer.py: Explicit imports.
517
518 * Thuban/UI/tableview.py (TableGrid.OnRangeSelect): Fix some issues
519 with correctly selecting the rows and issuing the right events.
520 Be sure to call Skip() to allow the grid to do some of its own
521 handling which allows the rows to actually be selected.
522 (LayerTableGrid.select_shapes): Rename from select_shape. Supports
523 selecting multiple shapes.
524 (LayerTableFrame): Support for building Queries.
525 (LayerTableFrame.select_shapes): Allow multiple shapes to be selected.
526
527 * Thuban/UI/tree.py: Explicit imports.
528
529 * Thuban/UI/view.py (MapCanvas): Delegate "SelectedShapes" so the
530 table view can call it.
531
532 * test/test_classification.py: Explicit imports.
533 (TestClassification.test_ClassGroupRange): Fix test for new
534 Range class.
535
536 * Doc/thuban.dtd: Add range parameter for clrange.
537
538 * Thuban/Model/range.py: Taken from SciParam. Used as the underlying
539 object in ClassGroupRange, and also uesd for inputting ranges in
540 the classifer table and elsewhere.
541
542 * Thuban/UI/join.py: New. Initial Join dialog. No real functionality
543 yet.
544
545 2003-05-09 Frank Koormann <[email protected]>
546
547 * Thuban/UI/scalebar.py (DrawScaleBar): Draw only if interval > 0.0.
548
549 2003-05-08 Frank Koormann <[email protected]>
550
551 Coding style updates
552
553 * test/test_scalebar.py: Replaced tab indentation by spaces.
554
555 * Thuban/UI/scalebar.py: Explicit imports.
556
557 2003-05-08 Frank Koormann <[email protected]>
558
559 * Thuban/UI/scalebar.py
560 (ScaleBar.DrawScalebar): Format string bug fixed.
561
562 2003-05-08 Frank Koormann <[email protected]>
563
564 Reorganization of scalebar component (no wx in Thuban/Model)
565
566 * Thuban/Model/scalebar.py: Rendering moved to Thuban/UI/scalebar.py
567 (deriveInterval):
568 Calculate scalebar interval and unit which fits in width for scale.
569 (roundInterval): Round float.
570
571 * Thuban/UI/scalebar.py (ScaleBar): Scalebar rendering
572
573 * test/test_scalebar.py: Test for Thuban/Model/scalebar.py methods.
574
575 * Thuban/UI/legend.py: Import Thuban.UI.scalebar
576
577 2003-05-08 Frank Koormann <[email protected]>
578
579 * Thuban/UI/legend.py (ScalebarBitmap.SetCanvas):
580 Initialize ScaleBar with canvas.map
581
582 * Thuban/Model/scalebar.py (ScaleBar.roundInterval()): New,
583 round intervals to display smarter lengths
584 (ScaleBar.DrawScalebar): Draw Scalebar only if the map contains a
585 layer. If the maps has no projection applied grey the scalebar.
586
587 2003-05-07 Frank Koormann <[email protected]>
588
589 Basic Scalebar features added.
590
591 * Thuban/Model/scalebar.py (ScaleBar): New, scalebar rendering.
592
593 * Thuban/UI/legend.py (LegendPanel): Added scalebar bitmap
594 (ScaleBarBitmap): New, links the scalebar bitmap with view messages
595 and the renderer.
596
597 * Thuban/UI/view.py (MapCanvas.set_view_transform): Issue SCALE_CHANGED.
598
599 * Thuban/UI/messages.py: SCALE_CHANGED added.
600
601 2003-05-07 Bernhard Herzog <[email protected]>
602
603 * Thuban/Model/session.py (Session.__init__): New instance
604 variable shapestores to hold a list of all open shapestore objects
605 (Session.ShapeStores): New. Accessor method for the shapestores
606 list.
607 (Session._add_shapestore, Session._clean_weak_store_refs): New.
608 Internal methods to maintain the shapestores list.
609 (Session.Tables): New. Return all tables open in the session.
610 (Session.OpenShapefile): Insert the new ShapeStore into the
611 shapestores list.
612
613 * test/test_session.py (TestSessionSimple.test_initial_state): Add
614 tests for ShapeStores and Tables
615 (TestSessionWithContent.test_shape_stores)
616 (TestSessionWithContent.test_tables): New. Test cases for
617 ShapeStores and Tables
618
619 2003-05-07 Bernhard Herzog <[email protected]>
620
621 * Thuban/Model/transientdb.py (TransientTableBase.ReadRowAsDict):
622 Add comments about the optimizations used.
623 (AutoTransientTable.ReadValue, TransientTableBase.ReadValue): New.
624 Implement the ReadValue table interface method.
625
626 * test/test_transientdb.py
627 (TestTransientTable.run_iceland_political_tests)
628 (TestTransientTable.test_transient_joined_table): Add tests for
629 ReadValue
630
631 2003-05-07 Frank Koormann <[email protected]>
632
633 * Resources/Bitmaps/fulllayerextent.xpm,
634 Resources/Bitmaps/fullselextent.xpm: Replaced the place holders with
635 new icons.
636
637 2003-05-06 Bernhard Herzog <[email protected]>
638
639 * Thuban/Model/transientdb.py (AutoTransientTable.SimpleQuery):
640 New. Simply delegate to the transient table's version.
641
642 * test/test_transientdb.py
643 (TestTransientTable.test_auto_transient_table_query): New. Test
644 case for AutoTransientTable's SimpleQuery
645
646 2003-05-06 Bernhard Herzog <[email protected]>
647
648 * Thuban/Model/transientdb.py (TransientTableBase.SimpleQuery):
649 Implement a simple query method for the query dialog
650 (TransientTableBase.create): Add an INTEGER PRIMARY KEY that holds
651 the row index or shapeid.
652 (TransientTable.create): Insert the right value of the row index
653 (TransientJoinedTable.create): Copy the row index of the left
654 table to the joined result table
655
656 * test/test_transientdb.py
657 (TestTransientTable.test_transient_table_read_twice): Fix
658 doc-string
659 (TestTransientTable.test_transient_table_query): New. Test for the
660 SimpleQuery method
661
662 2003-05-06 Bernhard Herzog <[email protected]>
663
664 Convert all table users to use the new table interface. This only
665 covers Thuban itself, not GREAT-ER or other applications built on
666 Thuban yet, so the compatibility interface stays in place for the
667 time being but it now issues DeprecationWarnings.
668
669 Finally, the new Table interface has a new method, HasColumn.
670
671 * Thuban/Model/table.py (OldTableInterfaceMixin): All methods
672 issue deprecation warnings when they're. The warnings refer to the
673 caller of the method.
674 (OldTableInterfaceMixin.__deprecation_warning): New. Helper method
675 for the deprecation warnings
676
677 * test/test_table.py: Ignore the deprecation warnings for the old
678 table in the tests in this module. The purpose of the tests is to
679 test the old interface, after all.
680
681 * test/test_transientdb.py
682 (TestTransientTable.run_iceland_political_tests): Use the
683 constants for the types. Add a test for HasColumn
684 (TestTransientTable.test_transient_joined_table): Adapt to new
685 table interface. Add a test for HasColumn
686 (TestTransientTable.test_transient_table_read_twice): Adapt to new
687 table interface
688
689 * Thuban/UI/tableview.py (DataTable.SetTable, DataTable.GetValue):
690 Adapt to new table interface
691
692 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Adapt to
693 new table interface
694
695 * Thuban/UI/controls.py (RecordListCtrl.fill_list)
696 (RecordTable.SetTable): Adapt to new table interface
697
698 * Thuban/UI/classifier.py (Classifier.__init__)
699 (Classifier.__init__): Adapt to new table interface
700
701 * Thuban/UI/classgen.py (ClassGenDialog.__init__)
702 (GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve): Adapt
703 to new table interface
704
705 * Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
706 (AutoTransientTable.HasColumn): Implement the new table interface
707 method
708 (AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
709 (AutoTransientTable.UniqueValues): Adapt to new table interface
710
711 * Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
712 Adapt to new table interface
713
714 * test/test_layer.py (TestLayer.open_shapefile): Helper method to
715 simplify opening shapefiles a bit easier.
716 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
717 (TestLayer.test_point_layer): Use the new helper method
718 (TestLayer.test_get_field_type): New. Test for the GetFieldType
719 method
720
721 * test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
722 the new table method
723
724 * test/test_memory_table.py (TestMemoryTable.test_has_column):
725 Test for the new table method HasColumn
726
727 2003-05-06 Jonathan Coles <[email protected]>
728
729 Addresses the "Selection Extent" wish of RTbug #1787.
730
731 * Resources/Bitmaps/fulllayerextent.xpm,
732 Resources/Bitmaps/fullselextent.xpm: Bitmaps for layer and selection
733 extent. These are just place holders for the real bitmaps.
734
735 * Thuban/Model/layer.py (Shape): Since a Shape is immutable only
736 calculate the bounding box once (the first time compute_bbox() is
737 called).
738 (Layer.ShapesBoundingBox): New. Given a list of shape ids, return
739 the bounding box for the shapes in lat/long coordinates.
740
741 * Thuban/UI/mainwindow.py: Added new "Full selection extent" menu
742 option.
743 (MainWindow.has_selected_shapes): New. Returns true if there are
744 any selected shapes.
745 (MainWindow.FullSelectionExtent): New. Calls
746 MapCanvas.FitSelectedToWindow() when the user selects the menu option.
747 (_has_selected_shapes): New. Returns true if there are any
748 selected shapes.
749
750 * Thuban/UI/selection.py (Selection.HasSelectedShapes): New. Returns
751 true if there are any selected shapes.
752
753 * Thuban/UI/view.py (MapCanvas): Added delegated method
754 HasSelectedShapes.
755 (MapCanvas.FitSelectedToWindow): New. Centers and scales any selected
756 shapes on the canvas using the map projection (if any).
757
758 * test/test_layer.py (TestLayer.test_arc_layer): Add some tests
759 for Layer.ShapesBoundingBox().
760
761 2003-05-06 Bernhard Herzog <[email protected]>
762
763 * Resources/Projections/defaults.proj: Fix spelling of Mercator
764
765 2003-05-05 Jonathan Coles <[email protected]>
766
767 Addresses the "Full Layer Extent" wish of RTbug #1787.
768
769 * Resources/Projections/defaults.proj: Added UK National Grid.
770
771 * Thuban/UI/mainwindow.py: Added new "Full layer extent" menu option.
772 (MainWindow.FullLayerExtent): New. Calls MapCanvas.FitLayerToWindow()
773 when the user selects the menu option.
774
775 * Thuban/UI/view.py (MapCanvas.FitLayerToWindow): New. Centers and
776 scales the given layer on the canvas using the map projection.
777
778 2003-05-05 Bernhard Herzog <[email protected]>
779
780 Convert the table implementations to a new table interface. All
781 tables use a common mixin class to provide backwards compatibility
782 until all table users have been updated.
783
784 * Thuban/Model/table.py (OldTableInterfaceMixin): Mixin class to
785 provide backwards compatibility for table classes implementing the
786 new interface
787 (DBFTable, MemoryTable): Implement the new table interface. Use
788 OldTableInterfaceMixin as base for compatibility
789 (DBFColumn, MemoryColumn): New. Column description for DBFTable
790 and MemoryTable resp.
791
792 * test/test_dbf_table.py: New. Test cases for the DBFTable with
793 the new table interface.
794
795 * test/test_memory_table.py: New. Test cases for the MemoryTable
796 with the new table interface.
797
798 * test/test_table.py: Document the all tests in this file as only
799 for backwards compatibility. The equivalent tests for the new
800 interface are in test_memory_table.py and test_dbf_table.py
801 (MemoryTableTest.test_read): field_info should be returning tuples
802 with four items
803 (MemoryTableTest.test_write): Make doc-string a more precise.
804
805 * Thuban/Model/transientdb.py (TransientTableBase): Convert to new
806 table interface. Derive from from OldTableInterfaceMixin for
807 compatibility.
808 (TransientTableBase.create): New intance variable column_map to
809 map from names and indices to column objects
810 (TransientTable.create): Use the new table interface of the input
811 table
812 (AutoTransientTable): Convert to new table interface. Derive from
813 from OldTableInterfaceMixin for compatibility.
814 (AutoTransientTable.write_record): Removed. It's not implemented
815 yet and we still have to decide how to handle writing with the new
816 table and data framework.
817
818 * test/test_transientdb.py
819 (TestTransientTable.run_iceland_political_tests)
820 (TestTransientTable.test_transient_joined_table): Use the new
821 table interface
822
823 2003-05-05 Jonathan Coles <[email protected]>
824
825 This is namely a collection of UI updates to improve user interactivity.
826 Tabbing between controls now exists and you can use ESC to close dialog
827 boxes; ENTER will active the default button.
828
829 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Rearrange the
830 order that the controls are created so that tabbing works correctly.
831 (ClassGenDialog.OnOK): Renamed from _OnGenerate() so that the
832 wxDialog can handle the default button correctly.
833 (ClassGenDialog.OnCancel): Renamed from _OnCloseBtn() for the
834 same reasons as for OnOK.
835 (GenUniformPanel._OnRetrieve): Call wxBeginBusyCursor/wxEndBusyCursor
836 when we ask the table for the maximum/minimum values of a field
837 which could take a very long time.
838
839 * Thuban/UI/classifier.py (Classifier.__init__): Rearrange the
840 order that the controls are created so that tabbing works correctly.
841 (SelectPropertiesDialog.__init__): Rearrange the order that the
842 controls are created so that tabbing works correctly.
843
844 * Thuban/UI/dialogs.py: Copied NonModalDialog box and changed it
845 to derive from a wxDialog but behave like the original implementation
846 which was derived from a wxFrame. wxDialog provides useful key
847 handling functionality like ESC calling OnCancel and ENTER calling
848 OnOK which is lost with wxFrame.
849
850 * Thuban/UI/mainwindow.py: Add "..." to menu items that will open
851 new dialogs.
852
853 * Thuban/UI/projdialog.py (ProjFrame.__init__): Rearrange the
854 order that the controls are created so that tabbing works correctly.
855 (ProjFrame.OnApply): Renamed from _OnTry() to use wxDialog behaviour.
856 (ProjFrame.OnOK): Renamed from _OnOK() to use wxDialog behaviour.
857 (ProjFrame.OnCancel): Renamed from _OnClose() to use wxDialog behaviour.
858 (ProjPanel.__init__): Add "Airy" to the list of ellipsoids so we
859 can provide the "UK National Grid" as a default projection.
860 (UTMPanel.__init__): Rearrange the order that the controls are
861 created so that tabbing works correctly.
862
863 2003-05-05 Bernhard Herzog <[email protected]>
864
865 * extensions/thuban/wxproj.cpp: Fix some of the comments.
866 (project_point): If a map projection but no layer projection is
867 given, convert degrees to radians before applying the map
868 projection.
869
870 * Thuban/UI/tableview.py (TableGrid.disallow_messages)
871 (TableGrid.allow_messages): New methods to make it possible to
872 inhibit message sending.
873 (TableGrid.issue): Only send the message if not inhibited.
874 (LayerTableGrid.select_shape): Use the new methods to make sure
875 that no ROW_SELECTED message is sent while we're updating the
876 selected rows to match the selected shapes.
877
878 2003-05-02 Jan-Oliver Wagner <[email protected]>
879
880 Implementation of MemoryTable.
881
882 * Thuban/Model/table.py (MemoryTable): New. Quite simple table
883 implementation that operates on a list of tuples. All of the data
884 are kept in the memory.
885
886 * test/test_table.py (MemoryTableTest): New.
887
888 * test/test_transientdb.py (SimpleTable): Removed.
889 (TestTransientTable.test_transient_joined_table,
890 (TestTransientTable.test_transient_table_read_twice): Replaced
891 SimpleTable by MemoryTable.
892
893 2003-04-30 Jonathan Coles <[email protected]>
894
895 * Data/iceland_sample.thuban: Now contains correct projections
896 for each of the layers.
897
898 * Resources/Projections/defaults.proj: Geographic projection
899 contains unit conversion parameter.
900
901 2003-04-30 Jonathan Coles <[email protected]>
902
903 The most important part of this putback is the projection changes.
904 It should now be possible to specify the projection that a layer
905 is in and then specify a different projection for the map. The
906 projection dialog has an extra parameter for a geographic projection
907 which lets the user select if the input is in degrees or radians.
908
909 * Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring
910 to say that the parameter is a tuple of unprojected
911 points (which is what the callers to this method were assuming).
912 Also, since the points are unprojected we need to projected them.
913
914 * Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp,
915 LegendTree.MoveCurrentItemDown): If the layer or any of the layer's
916 groups are selected, move the layer up/down. Fixes RTbug #1833.
917
918 * Thuban/UI/mainwindow.py: Move menu item map_rename up.
919
920 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing
921 parameter in call to SetClientData.
922 (GeoPanel): Add support for selecting the units that the
923 source data is in (Radians or Degrees).
924
925 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize
926 the rendering loop by reducing the number of if's, removing the
927 unnecessary try/except block, and checking if the old group
928 is the same as the new one (which happens a lot if there is
929 no classification, or lots of shapes are in the same group).
930
931 * Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block
932 around the redraw routine to try to catch problems that the user
933 may create by selecting invalid projections for the data set and
934 map. Clears the display if there are any problems and prints the
935 error.
936 (MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled
937 rectangle.
938
939 * extensions/thuban/wxproj.cpp (project_point): First invert the
940 supplied point (which should be in projected coordinates) using
941 the layer's projection and then project the point using the
942 map's projection.
943 (project_points): Use project_point() to project each point.
944
945 2003-04-30 Jan-Oliver Wagner <[email protected]>
946
947 * Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug:
948 don't set the Classification to None if the classfication field
949 is None (ie only a DEFAULT).
950
951 2003-04-30 Bernhard Herzog <[email protected]>
952
953 * Thuban/UI/view.py: Fix some typos.
954
955 * Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do
956 not pop up the dialog if the selection becomes empty (this could
957 happen if e.g. a new selection is opened while the identify tool
958 is active and dialog had been closed)
959
960 2003-04-30 Bernhard Herzog <[email protected]>
961
962 * Thuban/Model/transientdb.py (TransientTableBase.__init__): New
963 instance variable read_record_last_result
964 (TransientTableBase.read_record): Make sure reading the same
965 record twice works. The implementation uses the new instance
966 variable read_record_last_result
967
968 * test/test_transientdb.py
969 (TestTransientTable.test_transient_table_read_twice): New test
970 case for the above bug-fix.
971
972 2003-04-29 Jonathan Coles <[email protected]>
973
974 * Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832.
975
976 * Thuban/UI/classgen.py: Remove all uses of Str2Num.
977
978 * Thuban/UI/classifier.py: Remove all uses of Str2Num.
979 (ClassTable.SetValueAsCustom): Rename keyword argument in
980 ClassGroup* constructors to match argument name.
981
982 2003-04-29 Bernhard Herzog <[email protected]>
983
984 * Thuban/Model/session.py (Session.Destroy): Explicitly close the
985 transient DB if it exists to make sure it doesn't leave a journal
986 file in the temp directory.
987
988 * Thuban/Model/transientdb.py (TransientDatabase.close): Set
989 self.conn to None after closing the connection to make sure it's
990 not closed twice
991
992 2003-04-29 Jonathan Coles <[email protected]>
993
994 Add a visible parameter in the layer XML tag. The default value is
995 "true". If anything other than "false" is specified we also assume
996 "true". Addresses RTbug #1025.
997
998 * Doc/thuban.dtd: Add visible parameter to a layer.
999
1000 * Thuban/Model/layer.py (BaseLayer.__init__): Change default value
1001 of visible from 1 to True.
1002 (Layer.__init__): Change default value of visible from 1 to True.
1003
1004 * Thuban/Model/load.py (SessionLoader.start_layer): Read visible
1005 parameter.
1006
1007 * Thuban/Model/save.py (SessionSaver.write_layer): Save visible
1008 parameter.
1009
1010 * test/test_load.py: Add new test data contents_test_visible.
1011 (LoadSessionTest.setUp): save test data.
1012 (LoadSessionTest.testLayerVisibility): Test if the visible flag
1013 is loaded correctly.
1014
1015 * test/test_save.py (SaveSessionTest.testSingleLayer): Add test
1016 for saving an invisible layer.
1017
1018 2003-04-29 Jonathan Coles <[email protected]>
1019
1020 * Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the
1021 legend dialog box and tell it to change its map to the one
1022 supplied to SetMap(). Fixes RTbug #1770.
1023
1024 2003-04-29 Bernhard Herzog <[email protected]>
1025
1026 Next step of table implementation. Introduce a transient database
1027 using SQLite that some of the data is copied to on demand. This
1028 allows us to do joins and other operations that require an index
1029 for good performance with reasonable efficiency. Thuban now needs
1030 SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I
1031 haven't tested that.
1032
1033 * Thuban/Model/transientdb.py: New. Transient database
1034 implementation.
1035
1036 * test/test_transientdb.py: New. Tests for the transient DB
1037 classes.
1038
1039 * Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New
1040 classes to help automatically remove temporary files and
1041 directories.
1042 (Session.__init__): New instance variables temp_dir for the
1043 temporary directory and transient_db for the SQLite database
1044 (Session.temp_directory): New. Create a temporary directory if not
1045 yet done and return its name. Use AutoRemoveDir to have it
1046 automatically deleted
1047 (Session.TransientDB): Instantiate the transient database if not
1048 done yet and return it.
1049
1050 * Thuban/Model/data.py (ShapefileStore.__init__): Use an
1051 AutoTransientTable so that data is copied to the transient DB on
1052 demand.
1053 (SimpleStore): New class that simply combines a table and a
1054 shapefile
1055
1056 * Thuban/Model/table.py (Table, DBFTable): Rename Table into
1057 DBFTable and update its doc-string to reflect the fact that this
1058 is only the table interface to a DBF file. Table is now an alias
1059 for DBFTable for temporary backwards compatibility.
1060
1061 * Thuban/UI/application.py (ThubanApplication.OnExit): Make sure
1062 the last reference to the session goes away so that the temporary
1063 files are removed properly.
1064
1065 * test/test_load.py (LoadSessionTest.tearDown): Remove the
1066 reference to the session to make sure the temporary files are
1067 removed.
1068
1069 2003-04-29 Bernhard Herzog <[email protected]>
1070
1071 * Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn
1072 the __parser instance variable into a normal local variable in
1073 read. It's only used there and read will never be called more than
1074 once. Plus it introduces a reference cycle that keeps can keep the
1075 session object alive for a long time.
1076
1077 2003-04-29 Jonathan Coles <[email protected]>
1078
1079 * Thuban/Model/proj.py (Projection): Removed Set*() methods to make
1080 Projection an immutable item. Fixes RTbug #1825.
1081 (Projection.__init__): Initialize instance variables here.
1082 (ProjFile.Replace): New. Replace the given projection object with
1083 the new projection object. This solves the problem of needing the
1084 mutator Projection.SetProjection() in the ProjFrame class and
1085 allows a projection to change parameters without changing its
1086 location in the file.
1087
1088 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should
1089 be of type wxSAVE and should verify overwriting a file.
1090
1091 * Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new
1092 ProjFile.Replace() method instead of the mutator
1093 Projection.SetProjection(). Also requires that we reassign the
1094 client data to the new projection.
1095
1096 * test/test_proj.py (TestProjection.test): Test GetName() and
1097 GetAllParameters()
1098 (TestProjFile.test): Remove tests for Set*() methods. Add tests
1099 for Replace().
1100
1101 2003-04-25 Jonathan Coles <[email protected]>
1102
1103 * Thuban/Model/save.py (SessionSaver.write_projection): Make sure
1104 to save the name of the projection.
1105
1106 * test/test_save.py (SaveSessionTest.testLayerProjection): New
1107 test to verify layer projections are saved correctly.
1108
1109 2003-04-25 Jonathan Coles <[email protected]>
1110
1111 * Thuban/Model/proj.py (Projection.SetName): Set the name
1112 to "Unknown" if name is None.
1113 (Projection.SetAllParameters): New. Set the projection's
1114 parameter list to the one supplied.
1115 (Projection.SetProjection): New. Set the projection's
1116 properties to those of the supplied Projection.
1117
1118 * Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set
1119 the dialog title to include the map's title.
1120 (MainWindow.LayerProjection): Set the dialog title to include
1121 the layer's title.
1122
1123 * Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate
1124 error dialogs into a single method call.
1125 (ProjFrame.__VerifyButtons): Add more states to check.
1126 (ProjFrame.__GetProjection): Return the current state of an
1127 edited projection or None.
1128 (ProjFrame.__FillAvailList): Remove checks for states that
1129 shouldn't exist.
1130 (ProjFrame._OnNew): Clear all selected items and supply
1131 a projection panel if necessary.
1132
1133 * test/test_proj.py (TestProjFile.test): Add tests for
1134 ProjFile.SetAllParameters, ProjFile.SetProjection,
1135 ProjFile.SetName.
1136
1137 2003-04-25 Jonathan Coles <[email protected]>
1138
1139 * Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now
1140 takes an optional argument to select the current projection.
1141 This does not guarantee that the item is visible due to
1142 limited wxWindows functionality. Fixes RTBug #1821.
1143
1144 2003-04-25 Jonathan Coles <[email protected]>
1145
1146 * Thuban/Model/load.py (SessionLoader.start_projection): Remember
1147 the projection name and use it when constructing the Projection
1148 object.
1149
1150 * Thuban/Model/proj.py (Projection.__init__): Change the default
1151 value for 'name' to None and then test if name is equal to None
1152 in the body of the constructor. This way the caller doesn't have to
1153 know what the default value should be. Namely, useful in load.py
1154 where we have to pick a default value if the 'name' parameter
1155 doesn't exist in the XML file.
1156
1157 * test/test_load.py (LoadSessionTest.testLayerProjection): New.
1158 Tests a file where a layer has a projection.
1159
1160 2003-04-25 Jonathan Coles <[email protected]>
1161
1162 * Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the
1163 tree for projection information.
1164
1165 * Thuban/Model/load.py (XMLReader.GetFilename): Renamed from
1166 XMLReader.GetFileName.
1167 (SessionLoader): Added support for loading projection tags that
1168 appear inside a layer.
1169
1170 * Thuban/Model/proj.py (ProjFile): Document the class. Move
1171 back to using a list because the order of the projections in
1172 the file is important to maintain. Fixes RTbug #1817.
1173
1174 * Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName
1175 to ProjFile.GetFilename.
1176
1177 * Thuban/Model/save.py (SessionSaver.write_layer): Save projection
1178 information.
1179
1180 * Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from
1181 ProjFrame._OnSaveAs. Removed old dead code from previous
1182 implementation.
1183 (ProjFrame._OnExport): Add support for exporting more than one
1184 projection to a single file.
1185 (ProjFrame.__FillAvailList): use string formatting (% operator)
1186 to build strings that are (partly) translated. Fixes RTbug #1818.
1187
1188 * test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile
1189 class.
1190
1191 2003-04-24 Bernhard Herzog <[email protected]>
1192
1193 * po/es.po: Updated Spanish translation by Daniel Calvelo Aros
1194
1195 * po/fr.po: New. French translation by Daniel Calvelo Aros
1196
1197 * Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate
1198 empty strings.
1199
1200 2003-04-24 Jonathan Coles <[email protected]>
1201
1202 * Thuban/Model/layer.py (Layer.GetProjection): New. Needed to
1203 implement the interface that the ProjFrame dialog expects.
1204
1205 * Thuban/Model/proj.py (Projection.SetName): New. Allows the
1206 name of the projection to be changed.
1207 (ProjFile): Use a dictionary instead of a list so that removing
1208 projections is easier and we are sure about uniqueness.
1209 (ProjFile.Remove): Remove the given projection object.
1210
1211 * Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles):
1212 Return a list with only one projection file instead of searching for
1213 any projection file. This simplifies many things if the user can
1214 only have one system file and one user file.
1215
1216 * Thuban/UI/classgen.py: Change all references to
1217 genCombo to genChoice.
1218
1219 * Thuban/UI/mainwindow.py: Add a Projection option under the
1220 layer menu.
1221 (MainWindow.LayerProjection): New. Open up a projection window
1222 for a layer.
1223
1224 * Thuban/UI/projdialog.py: Large changes to how the dialog is
1225 laid out. Use three panels instead of one. One for the list of
1226 projections, one for the edit controls, and one for the buttons.
1227 Fixed resizing problems so that the dialog resizes correctly
1228 when the projection panel changes. Added import/export, save, and
1229 new buttons/functionality.
1230
1231 2003-04-24 Bernhard Herzog <[email protected]>
1232
1233 First step towards table management. Introduce a simple data
1234 abstraction so that we replace the data a layer uses more easily
1235 in the next step.
1236
1237 * Thuban/Model/data.py: New file with a simple data abstraction
1238 that bundles shapefile and dbffile into one object.
1239
1240 * Thuban/Model/session.py (Session.OpenShapefile): New method to
1241 open shapefiles and return a shape store object
1242
1243 * Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
1244 object instead of a shapefile filename. This introduces a new
1245 instance variable store holding the datastore. For intermediate
1246 backwards compatibility keep the old instance variables.
1247 (open_shapefile): Removed. No longer needed with the shape store.
1248 (Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
1249 get the shape store used by a layer.
1250 (Layer.Destroy): No need to explicitly destroy the shapefile or
1251 table anymore.
1252
1253 * Thuban/UI/mainwindow.py (MainWindow.AddLayer)
1254 (MainWindow.AddLayer): Use the session's OpenShapefile method to
1255 open shapefiles
1256
1257 * Thuban/Model/load.py (ProcessSession.start_layer): Use the
1258 session's OpenShapefile method to open shapefiles
1259
1260 * test/test_classification.py
1261 (TestClassification.test_classification): Use the session's
1262 OpenShapefile method to open shapefiles and build the filename in
1263 a more platform independed way
1264
1265 * test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
1266 Implement to have a session to use in the tests
1267 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1268 (TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
1269 session's OpenShapefile method to open shapefiles
1270 (TestLayerLegend.setUp): Instantiate a session so that we can use
1271 it to open shapefiles.
1272 (TestLayerLegend.tearDown): Make sure that all references to
1273 layers and session are removed otherwise we may get a resource
1274 leak
1275
1276 * test/test_map.py (TestMapAddLayer.test_add_layer)
1277 (TestMapWithContents.setUp): Instantiate a session so that we can
1278 use it to open shapefiles.
1279 (TestMapWithContents.tearDown): Make sure that all references to
1280 layers, maps and sessions are removed otherwise we may get a
1281 resource leak
1282 ("__main__"): use support.run_tests() so that more info about
1283 uncollected garbage is printed
1284
1285 * test/test_save.py (SaveSessionTest.testSingleLayer): Use the
1286 session's OpenShapefile method to open shapefiles
1287 ("__main__"): use support.run_tests() so that more info about
1288 uncollected garbage is printed
1289
1290 * test/test_selection.py (TestSelection.tearDown): Make sure that
1291 all references to the session and the selection are removed
1292 otherwise we may get a resource leak
1293 (TestSelection.get_layer): Instantiate a session so that we can
1294 use it to open shapefiles.
1295 ("__main__"): use support.run_tests() so that more info about
1296 uncollected garbage is printed
1297
1298 * test/test_session.py (TestSessionBase.tearDown)
1299 (TestSessionWithContent.tearDown): Make sure that all references
1300 to the session and layers are removed otherwise we may get a
1301 resource leak
1302 (TestSessionWithContent.setUp): Use the session's OpenShapefile
1303 method to open shapefiles
1304
1305 2003-04-24 Jonathan Coles <[email protected]>
1306
1307 * Thuban/Model/load.py (XMLReader.read): Should have been checking
1308 if the file_or_filename object had the 'read' attribute.
1309
1310 2003-04-23 Jonathan Coles <[email protected]>
1311
1312 * Thuban/Model/resource.py: Fixes RTbug #1813.
1313 (ReadProjFile): Add documentation about which exceptions are raised.
1314 Always pass the exceptions up to the caller.
1315 (GetProjFiles): If the directory can't be read return an empty list.
1316 If any of the proj files can't be read skip that file and go
1317 on to the next one.
1318
1319 * test/test_proj.py: Added test cases to handle nonexistent files,
1320 unreadable files, and files that don't parse correctly.
1321
1322 2003-04-23 Jonathan Coles <[email protected]>
1323
1324 Projection dialog. Allows the user to select from a list
1325 of projection templates and optionally edit them and save new ones.
1326
1327 * Thuban/UI/projdialog.py (ProjFrame): New. Main dialog.
1328 (ProjPanel): Base class for projection specific panels.
1329 (TMPanel): Projection panel for Transverse Mercartor.
1330 (UTMPanel): Projection panel for Universal Transverse Mercartor.
1331 (LCCPanel): Projection panel for Lambert Conic Conformal.
1332 (GeoPanel): Projetion panel for Geographic Projection.
1333
1334 2003-04-23 Jonathan Coles <[email protected]>
1335
1336 * Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to
1337 promote symmetry. There now exists XMLReader and XMLWriter.
1338 (XMLReader.read): New. Call to read the given file descriptor or
1339 filename.
1340 (XMLReader.close): New. Make sure the file is closed.
1341 (XMLReader.GetFileName): New. Return just the file name that is being
1342 read from.
1343 (XMLReader.GetDirectory): New. Return just the directory of the file
1344 that is being read.
1345 (XMLReader.AddDispatchers): New. Take a dictionary which contains
1346 the names of functions to call as the XML tree is parsed.
1347 (XMLReader.startElementNS): Updated to use new dispatcher dictionary.
1348 (XMLReader.endElementNS): Updated to use new dispatcher dictionary.
1349 (SessionLoader): Removed class variables start_dispatcher and
1350 end_dispatcher since this functionality is now part of a class
1351 instance. Fixes RTbug #1808.
1352 (SessionLoader.__init__): Add dispatcher functions.
1353 (load_xmlfile): Code was moved into the XMLReader.read().
1354 (load_session): Use modified SessionLoader.
1355
1356 * Thuban/Model/map.py (Map.GetProjection): New. Returns the
1357 map's projection.
1358
1359 * Thuban/Model/proj.py (Projection.GetParameters): Renamed to
1360 GetAllParameters.
1361 (Projection.GetParameter): Returns the value for the given parameter.
1362
1363 * Thuban/Model/resource.py: Use XMLReader and XMLWriter.
1364 (GetProjFiles): Renamed from GetProjections. Now returns a list
1365 of ProjFile objects.
1366 (GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns
1367 a list of ProjFile objects whose files are not user defined.
1368 (GetUserProjFiles): Renamed from GetUserProjections. Returns a
1369 list of ProjFile objects whose files are user defined.
1370 (ProjFileReader): Extend new XMLReader.
1371
1372 * Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to
1373 promote symmetry.
1374
1375 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice
1376 control instead of a wxComboBox. wxChoice controls do not generate
1377 events as the uses highlights possible choices which fixes problems
1378 with resizing the dialog when the use selects an option.
1379
1380 * Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice
1381 control instead of a wxComboBox.
1382
1383 * Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection
1384 dialog.
1385
1386 * test/test_proj.py (TestProjection.test): New tests for GetParameter
1387 method.
1388
1389 2003-04-22 Bernhard Herzog <[email protected]>
1390
1391 * Thuban/UI/mainwindow.py: Remove some unused imports and global
1392 constants
1393
1394 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
1395 (IdentifyGridCtrl.selected_shape): Use table, not shapetable.
1396
1397 2003-04-17 Bernhard Herzog <[email protected]>
1398
1399 * Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED.
1400 (Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
1401 anymore.
1402 (Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
1403 (Layer.ShapeType, Layer.Shape): No need to call
1404 self.open_shapefile since it's always called in __init__
1405
1406 * Thuban/UI/application.py (ThubanApplication.MainLoop): Removed.
1407 In wxPython 2.4 there's no need to extend MainLoop anymore since
1408 wxPython itself makes sure OnExit is called.
1409
1410 2003-04-16 Jonathan Coles <[email protected]>
1411
1412 Initial putback of projection management code. Includes new
1413 classes to read and write projection files. The current load
1414 and save classes were abstracted a bit so they could be reused.
1415 The Projection class was extended to provide new methods and
1416 have a name.
1417
1418 * Thuban/Model/load.py (XMLProcessor): New. Contains all the
1419 general XML reading methods that were part of ProcessSession.
1420
1421 * Thuban/Model/proj.py (Projection.__init__): Accepts an optional
1422 name.
1423 (ProjFile): New. Represents a file that contains projection
1424 information.
1425
1426 * Thuban/Model/resource.py: New. Contains general utilities
1427 for read and writing projection files.
1428
1429 * Thuban/Model/save.py (XMLSaver): New. Contains all the
1430 general XML writing methods that were part of SessionSaver.
1431 (SessionSaver): Renamed from Saver.
1432
1433 * test/test_proj.py: New test cases for the projection
1434 file read and write functions.
1435
1436 2003-04-16 Jonathan Coles <[email protected]>
1437
1438 * Thuban/Model/classification.py: Use repr() around values
1439 in the ClassGroup*.__repr__() methods so it is clearer when
1440 a value is a string and when it is a number.
1441
1442 * test/test_load.py: Rework the classification test to test
1443 that we can load old files.
1444 (testLabels): Test a file where the groups have labels.
1445
1446 2003-04-16 Bernhard Herzog <[email protected]>
1447
1448 Safer implementation of the performance enhancements of the
1449 low-level renderer:
1450
1451 * extensions/thuban/wxproj.cpp (extract_projection)
1452 (extract_pointer): Rename extract_projection to extract_pointer
1453 and redefine its purpose to return the pointer stored in a CObject
1454 returned by the object's cobject method. Update all callers.
1455 (s_draw_info, free_draw_info, draw_polygon_init): Implement the
1456 handling of these low-level parameters so that each s_draw_info
1457 instance is handled as a CObject at python level that also
1458 contains real references to the actual python objects which
1459 contain the values in the struct. Add free_draw_info as the
1460 destructor.
1461 (draw_polygon_shape): Add the py_draw_info parameter which must a
1462 cobject containing an s_draw_info pointer.
1463
1464 * Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
1465 method to instantiat the low-level render parameter
1466 (MapRenderer.draw_shape_layer): Use the new method. Remove some
1467 commented out code.
1468 (MapRenderer.draw_polygon_shape): Make the first parameter not the
1469 layer but the low-level render parameter
1470 (ScreenRenderer.draw_shape_layer): Use the low-level render
1471 parameter.
1472
1473 2003-04-15 Jonathan Coles <[email protected]>
1474
1475 * Thuban/Model/classification.py: Implemented __repr__ for
1476 the ClassGroup* classes to make debugging a bit easier.
1477 (ClassGroup.SetLabel): Check that the string is an instance
1478 of StringTypes not StringType. Accounts for Unicode strings.
1479
1480 * Thuban/Model/color.py: Implemented __repr__ to make
1481 debugging a bit easier.
1482
1483 * Thuban/Model/save.py (Saver.write_classification): Need to
1484 save the group label.
1485
1486 * test/test_load.py (testClassification): New. Loads the
1487 iceland_sample_test.thuban file and checks if it was loaded
1488 correctly.
1489
1490 2003-04-15 Jonathan Coles <[email protected]>
1491
1492 * extensions/thuban/wxproj.cpp (draw_polygon_init): New. Used
1493 to improve rendering performance by initializing the variables
1494 that are not change each time draw_polygon_shape() is called.
1495 The values are stored in a global struct draw_info.
1496 (draw_polygon_shape): Removed initialization code that is
1497 now in draw_polygon_init().
1498
1499 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Make
1500 drawing initialization call to draw_polygon_init()
1501 (MapRenderer.draw_polygon_shape): Use new signature of
1502 draw_polygon_shape.
1503
1504 * Thuban/UI/classgen.py (GenUniformPanel): Fix spin control
1505 weirdness by setting the range to (1, maxint).
1506
1507 * Thuban/Model/classification.py (ClassGroupProperties): Make
1508 instance variables private and optimize comparison operator
1509 by first checking if the color references are the same.
1510 (ClassGroupSingleton): Make instance variables private.
1511 (ClassGroupRange): Make instance variables private.
1512
1513 * HOWTO-Release: Filled in missing steps for releasing packages.
1514
1515 2003-04-15 Bernhard Herzog <[email protected]>
1516
1517 First stab at internationalized messages:
1518
1519 * Thuban/__init__.py (_): Implement the translation function for
1520 real using the python gettext module.
1521
1522 * Thuban/UI/classifier.py (ClassTable.GetRowLabelValue): Don't
1523 translate empty strings.
1524
1525 * Thuban/UI/application.py (ThubanApplication.read_startup_files):
1526 Add a missing space to a warning message
1527
1528 * po/README: New. Notes about the management of the translation
1529 files.
1530
1531 * po/Makefile: New. Makefile to help manage the translation files.
1532
1533 * po/es.po: New. Spanish translation by Daniel Calvelo Aros
1534
1535 * MANIFEST.in: Include the *.mo files in Resources/Locale and the
1536 translations and support files in po/
1537
1538 * setup.py (data_files): Add the *.mo files to the data_files too
1539
1540 * README: Add note about the translations when building from CVS
1541
1542 2003-04-14 Jonathan Coles <[email protected]>
1543
1544 * Thuban/UI/dock.py: Fixes some window resizing problems most
1545 noticable under windows. Always assume the button bitmaps will
1546 be there. Code clean up.
1547 (DockabelWindow.Dock, DockableWindow.UnDock): Force all the
1548 images for the dock/undock button to the same images.
1549 Work around for RTbug #1801.
1550
1551 * Thuban/UI/legend.py (LegendPanel.__init__): The toolbar should
1552 be allowed to grow within the sizer. Fixes a bug under Windows
1553 where the toolbar wasn't being drawn.
1554
1555 2003-04-14 Frank Koormann <[email protected]>
1556
1557 * Resources/Bitmaps/dock_12.xpm, Resources/Bitmaps/undock_12.xpm:
1558 Updated design to try to make the button functionality more
1559 transparent.
1560
1561 2003-04-14 Jonathan Coles <[email protected]>
1562
1563 * Thuban/UI/legend.py (LegendPanel.__init__): Call Create() to
1564 finalize the intialization of the panel.
1565
1566 * Thuban/UI/dock.py (DockPanel.Create): New. Finalizes the
1567 creation of the panel. Should be the last thing called in the
1568 initializer of a subclass.
1569
1570 * Thuban/UI/classgen.py (ClassGenDialog.__init__): Actively
1571 set the current selections in the combo boxes. This is needed
1572 under Windows.
1573
1574 * Thuban/UI/classifier.py (Classifier.__init__): Add a top
1575 level panel to the dialog so that the background colors are
1576 consistent under Windows.
1577
1578 2003-04-11 Jonathan Coles <[email protected]>
1579
1580 * Thuban/UI/classgen.py: Change color ramps to start at white
1581 not black.
1582
1583 * Thuban/UI/legend.py: Enable/disable the legend buttons when
1584 the legend changes. Fixes RTbug #1793.
1585
1586 * test/test_classification.py: Added test for copying of
1587 classifications.
1588
1589 2003-04-11 Jonathan Coles <[email protected]>
1590
1591 * Thuban/UI/resource.py: New. Centralize the loading of resources
1592 such as bitmaps.
1593
1594 * Thuban/UI/classgen.py (GenUniquePanel.__init__): Reordered buttons,
1595 added images to the move buttons, added 'reverse' button.
1596 (CustomRampPanel.__init__): Added images to the move buttons.
1597 (GreyRamp): New. Generates a ramp from white to black.
1598 (HotToColdRamp): New. Generates a ramp from cold to hot colors.
1599
1600 * Thuban/UI/classifier.py: Refactored ID's from ID_CLASSIFY_* to
1601 ID_PROPERTY_*.
1602 (Classifier.__init__): Minor changes to the layout.
1603 (Classifier._OnTitleChanged): Listen for when the user edits the
1604 title and update the dialog's title and the layer's title.
1605
1606 * Thuban/UI/dock.py: Use new bitmaps for the control buttons.
1607
1608 * Thuban/UI/legend.py: Use new bitmaps for the control buttons.
1609 (LegendTree._OnMsgLayerTitleChanged): Change the displayed title
1610 if the layer's title changes.
1611
1612 * Thuban/UI/mainwindow.py: Added new menu item and associated code
1613 to open a dialog to rename the map.
1614 (MainWindow): Use new resource class to import bitmaps.
1615
1616 2003-04-11 Jonathan Coles <[email protected]>
1617
1618 * Resources/Bitmaps/close_12.xpm, Resources/Bitmaps/dock_12.xpm,
1619 Resources/Bitmaps/group_use.xpm, Resources/Bitmaps/group_use_all.xpm,
1620 Resources/Bitmaps/group_use_none.xpm,
1621 Resources/Bitmaps/group_use_not.xpm,
1622 Resources/Bitmaps/hide_layer.xpm,
1623 Resources/Bitmaps/layer_properties.xpm,
1624 Resources/Bitmaps/lower_layer.xpm, Resources/Bitmaps/raise_layer.xpm,
1625 Resources/Bitmaps/show_layer.xpm, Resources/Bitmaps/undock_12.xpm:
1626 New.
1627
1628 2003-04-10 Jonathan Coles <[email protected]>
1629
1630 * Thuban/Model/classification.py: (ClassGroupRange.__init__):
1631 Should pass group to ClassGroup constructor.
1632
1633 2003-04-10 Jonathan Coles <[email protected]>
1634
1635 * Thuban/Model/classification.py: (ClassGroup): Move all the common
1636 methods of the derived classes ([Set|Get]Properties(), __eq__, __ne__)
1637 here. Implement SetVisible(), IsVisible().
1638 (ClassGroup.__init__): Add group parameter which acts as a copy
1639 constructor.
1640
1641 * Thuban/UI/classifier.py (ClassTable): Add a new column for the
1642 "Visible" check boxes.
1643 (Classifier): Rename the buttons and refactor the code to match
1644 the new labels.
1645
1646 * Thuban/UI/legend.py: Classify button is now called "Properties".
1647 Refactored the code to change variable names.
1648 (LegendTree.__FillTreeLayer): Only list a group if it is visible.
1649
1650 * Thuban/UI/mainwindow.py: MainWindow.OpenClassifier renamed to
1651 MainWindow.OpenLayerProperties. MainWindow.LayerEditProperties
1652 renamed to MainWindow.LayerEditProperties.
1653 (MainWindow.ToggleLegend): Don't include map name in legend title.
1654 (MainWindow.SetMap): Added the map name to the window title.
1655 (MainWindow.LayerFillColor, MainWindow.LayerTransparentFill,
1656 MainWindow.LayerOutlineColor, MainWindow.LayerNoOutline): Removed.
1657 Functionality is found in the layer properties dialog.
1658
1659 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
1660 draw visible groups.
1661
1662 2003-04-09 Jonathan Coles <[email protected]>
1663
1664 * Thuban/UI/classgen.py: Modifications to allow simple
1665 addition and selection of new color schemes.
1666 (MonochromaticRamp): New. Generates a ramp between two colors.
1667 (RedRamp): New. Generates a ramp of all red.
1668 (GreenRamp): New. Generates a ramp of all green.
1669 (BlueRamp): New. Generates a ramp of all blue.
1670
1671 2003-04-09 Jonathan Coles <[email protected]>
1672
1673 * Thuban/Model/classification.py (Classification.__deepcopy__):
1674 Need to copy over field and fieldType attributes.
1675
1676 * Thuban/Model/table.py (Table.field_range): New. Retrive the
1677 maximum and minimum values over the entire table for a given
1678 field.
1679 (Table.GetUniqueValues): New. Retrieve all the unique values
1680 in the table for a given field.
1681
1682 * Thuban/UI/classgen.py: Renamed GenRangePanel to GenUniformPanel.
1683 (GenUniquePanel): New. Controls to allow the user to select
1684 which unique field values they would like in the classification.
1685 (CustomRampPanel): Code that was in ClassGenDialog that allows
1686 the user to select the properties for a custom ramp.
1687 (ClassGenerator.GenUniformDistribution): Was called GenerateRanges.
1688
1689 * Thuban/UI/classifier.py: Removed a lot of debugging code.
1690 (Classifier._SetClassification): Callback method so that the
1691 class generator can set the classification in the grid.
1692 (ClassGroupPropertiesCtrl): New. Encapsulates the drawing and
1693 editing of a group properties class into a wxWindows control.
1694
1695 * Thuban/UI/dock.py: It was decided that if the user closes
1696 a dockable window the window should simply hide itself. That
1697 way if the user wants to show the dock again it appears in the
1698 same place as it was when it was closed.
1699 (DockableWindow.Destroy): Call renamed method OnDockDestroy().
1700 (DockableWindow._OnButtonClose): Hide the window instead of
1701 destroying it.
1702 (DockableWindow._OnClose): Hide the window instead of
1703 destroying it.
1704
1705 * Thuban/UI/legend.py (LegendTree): Use a private method to
1706 consistently set the font and style of the text. Fixes RTbug #1786.
1707
1708 * Thuban/UI/mainwindow.py: Import just the Classifier class.
1709
1710 2003-04-07 Bernhard Herzog <[email protected]>
1711
1712 * Thuban/UI/mainwindow.py (main_menu): Move the toggle_legend item
1713 to the map module
1714
1715 2003-04-07 Bernhard Herzog <[email protected]>
1716
1717 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree): Removed in
1718 favor of ToggleSessionTree
1719 (MainWindow.ToggleSessionTree): New method to toggle visibility of
1720 the session tree.
1721 (MainWindow.SessionTreeShown): New method to return whether the
1722 session tree is currently shown.
1723 (MainWindow.ToggleLegend): New method to toggle visibility of the
1724 legend
1725 (MainWindow.ShowLegend): Implement in terms of ToggleLegend and
1726 LegendShown
1727 (MainWindow.LegendShown): New method to return whether the legend
1728 is currently shown.
1729 (_method_command): Add checked parameter so we can define check
1730 menu items
1731 (_has_tree_window_shown, _has_legend_shown): Use the appropriate
1732 mainwindow methods.
1733 (show_session_tree, show_legend commands): Removed.
1734 (toggle_session_tree, toggle_legend commands): New commands to
1735 toggle the visibility of the dialogs
1736
1737 2003-04-07 Jonathan Coles <[email protected]>
1738
1739 * Thuban/UI/classgen.py: Fix Windows problem.
1740
1741 * Thuban/UI/dock.py: Fix Windows problem.
1742
1743 * Thuban/UI/mainwindow.py: Use False instead of false.
1744 (MainWindow.ShowLegend): Remove unnecessary switch parameter.
1745
1746 2003-04-07 Jonathan Coles <[email protected]>
1747
1748 Since we now say that the order of the groups in a classification
1749 matters, it makes sense to be able to manipulate that order. Most
1750 of the changes to Thuban/Model/classification.py are to that end.
1751
1752 * Thuban/Model/classification.py (Classification.AppendGroup,
1753 Classification.InsertGroup, Classification.ReplaceGroup,
1754 Classification.RemoveGroup, Classification.GetGroup): Do as the
1755 names imply.
1756 (Classification.FindGroup): This was called GetGroup, but GetGroup
1757 takes an index, while FindGroup takes a value.
1758 (Classification.__deepcopy__): Copy all the groups, BUT NOT THE LAYER
1759 REFERENCE. Currently there is a cyclic reference between the layer
1760 and its classification. If the classification doesn't need to know
1761 its owning layer we can change this, since it may make sense to be
1762 able to use the same classification with different layers.
1763
1764 * Thuban/Model/load.py: Use Classification.AppendGroup(), not AddGroup()
1765
1766 * Thuban/UI/classgen.py: Use Classification.AppendGroup(),
1767 not AddGroup()
1768
1769 * Thuban/UI/classifier.py: Now that we can depend on the order in
1770 a Classification and have methods to manipulate that order we don't
1771 need to use our own data structures in the grid. We can simply make
1772 the grid/table access the information they need from a copy of
1773 the classification object.
1774 (Classifier._OnCloseBtn): Event handler for when the user clicks
1775 'Close'. This is needed so if the user applies changes and then
1776 continues to change the table the user has the option of discarding
1777 the most recent changes and keeping what they applied.
1778
1779 * Thuban/UI/mainwindow.py: Put "Show Legend" and "Show Session Tree"
1780 into the same group.
1781
1782 * extensions/thuban/wxproj.cpp (check_version): If Thuban is compiled
1783 with a really old version of proj, PJ_VERSION won't even be defined.
1784 If it isn't defined then just compile so that the function always
1785 returns Py_False.
1786
1787 * test/test_classification.py: Fix tests to use the renamed methods.
1788 Still need to write tests for the new methods.
1789
1790 2003-04-04 Jonathan Coles <[email protected]>
1791
1792 * Thuban/UI/classifier.py (Classifier.__SelectField): Move the
1793 call to SetSelection out of the method and before the call
1794 to __SelectField in __init__. This prevents a recursion of events
1795 when _OnFieldSelect is triggered by the user.
1796
1797 2003-04-04 Jonathan Coles <[email protected]>
1798
1799 * Thuban/Model/classification.py: Rename Color.None to
1800 Color.Transparent.
1801 (ClassGroupProperties.SetLineColori, ClassGroupProperties.SetFill):
1802 Don't bother copying the color, since Colors are immutable.
1803
1804 * Thuban/Model/color.py, Thuban/Model/layer.py, Thuban/Model/load.py,
1805 Thuban/UI/classifier.py, Thuban/UI/mainwindow.py,
1806 Thuban/UI/renderer.py, Thuban/UI/view.py:
1807 Rename Color.None to Color.Transparent.
1808
1809 * test/test_classification.py, test/test_load.py: Rename Color.None
1810 to Color.Transparent.
1811
1812 2003-04-04 Jonathan Coles <[email protected]>
1813
1814 * Thuban/Model/classification.py: Fix assert calls.
1815 (ClassGroupProperties.SetLineColor, ClassGroupProperties.SetFill):
1816 Copy the color parameter rather than hold onto a reference.
1817
1818 * Thuban/Model/color.py (Color.__copy__, Color.__deepcopy): Copy
1819 the color object.
1820 (NoColor.__copy__, NoColor.__deepcopy): Return 'self' so that we
1821 are sure there exists only one refernce to Color.None in the system.
1822 This allows us to use 'is' rather than the comparision functions.
1823
1824 * Thuban/Model/save.py: Fix assert calls.
1825
1826 * Thuban/UI/classifier.py: Fix assert calls.
1827 (ClassGrid._OnCellDClick): Call up to the classifier to open the
1828 dialog to edit the groups properties.
1829 (ClassGrid._OnCellResize): Make sure that the scollbars are drawn
1830 correctly if a cell is resized.
1831 (ClassTable.SetClassification): New. Changes the classification
1832 that is in the table.
1833 (ClassTable.__SetRow): Allow groups to be prepended.
1834 (Classifier): New code for opening the EditProperties and
1835 GenerateRanges dialogs.
1836 (SelectPropertiesDialog.__GetColor): Only set the color in the
1837 color dialog if the current color is not None.
1838
1839 * Thuban/UI/dock.py: Fix assert calls.
1840
1841 * Thuban/UI/legend.py: Fix assert calls.
1842
1843 * Thuban/UI/renderer.py: Fix assert calls.
1844
1845 * Thuban/UI/classgen.py (ClassGenDialog): Dialog for generating
1846 classifications.
1847 (GenRangePanel): Panel specific to range generation.
1848 (GenSingletonPanel): Panel specific to singleton generation.
1849 (ClassGenerator): Class responsible for actually generating
1850 the classification from the data gathered in the dialog box.
1851 (PropertyRamp): Generates properties whose values range from
1852 a starting property to an ending property.
1853
1854 2003-04-03 Bernhard Herzog <[email protected]>
1855
1856 * test/support.py (print_garbage_information): New function that
1857 prints information about still connected messages and memory
1858 leaks.
1859 (run_suite): Removed.
1860 (run_tests): New function for use as a replacement of
1861 unittest.main in the test_* files. This one calls
1862 print_garbage_information at the end.
1863
1864 * test/runtests.py (main): Use support.print_garbage_information
1865
1866 * test/test_layer.py: Use support.run_tests instead of
1867 unittest.main so we get memory leak information
1868 (TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
1869 (TestLayer.test_point_layer, TestLayer.test_empty_layer)
1870 (TestLayerLegend.test_visibility): Call the layer's Destroy method
1871 to fix a memory leak.
1872
1873 * test/test_classification.py: Use support.run_tests instead of
1874 unittest.main so we get memory leak information
1875 (TestClassification.test_classification): Call the layer's Destroy
1876 method to fix a memory leak.
1877
1878 2003-04-02 Bernhard Herzog <[email protected]>
1879
1880 * extensions/thuban/wxproj.cpp (check_version, check_version_gtk):
1881 Handle the reference counts of the return value and errors in
1882 PyArg_ParseTuple correctly.
1883
1884 * Thuban/UI/application.py (ThubanApplication.OpenSession): Make
1885 sure the filename is absolute to avoid problems when saving the
1886 session again
1887
1888 * Thuban/Model/table.py: Remove unnecessary import. Fix a typo.
1889
1890 2003-04-01 Jonathan Coles <[email protected]>
1891
1892 * Thuban/UI/renderer.py (MapRenderer.draw_point_shape): Check
1893 that there actually are points in the returned list of points
1894 before trying to index into the list. The list may be empty if
1895 the shape is a Null Shape.
1896
1897 2003-04-01 Bernhard Herzog <[email protected]>
1898
1899 * test/test_map.py: Don't use from <module> import *
1900
1901 2003-04-01 Jonathan Coles <[email protected]>
1902
1903 * Thuban/Model/session.py: Use LAYER_CHANGED instead of
1904 LAYER_LEGEND_CHANGED
1905
1906 * Thuban/UI/dock.py (DockableWindow._OnButtonClose): Call
1907 self.Destroy() to close the window after yesterday's changes.
1908
1909 * test/test_map.py, test/test_session.py: Fix messages that
1910 are sent from maps and layers.
1911
1912 2003-03-31 Jonathan Coles <[email protected]>
1913
1914 * Thuban/UI/classifier.py: Commented out some debugging statements.
1915 (ClassDataPreviewer.Draw): Draw rectangles for polygon layers per
1916 RTbug #1769.
1917
1918 * Thuban/UI/dock.py (DockableWindow.UnDock): Restore size and
1919 position (although position doesn't work yet under GTK).
1920 (DockableWindow.Destroy): New. Called when the window must be
1921 closed. Namely needed when the DockFrame closes and must close
1922 its children.
1923 (DockFrame): Listen for EVT_CLOSE and destroy all children.
1924
1925 * Thuban/UI/legend.py (LegendPanel.Destroy): New. Cleans up
1926 when then window is told to close.
1927 (LegendTree._OnMsgLayerChanged): Fixes a seg fault bug. See
1928 comment in source for more info.
1929
1930 * Thuban/UI/main.py: Show the legend by default when Thuban starts.
1931
1932 * Thuban/UI/mainwindow.py: Renamed OnClose to _OnClose for
1933 symmetry with other such methods.
1934 (MainWindow.ShowLegend): Show the legend docked by default.
1935
1936 2003-03-28 Jonathan Coles <[email protected]>
1937
1938 * Thuban/UI/classifier.py: Support for highlighting a specific
1939 group within the grid when the classification dialog is opened.
1940 Also contains a lot of debugging printouts which will later
1941 be removed.
1942
1943 * Thuban/UI/dock.py: Complete rework on the dock code so that
1944 that it is fairly removed from the rest of the Thuban application.
1945 It is easy to add new docks which the rest of the program having
1946 to be aware of them.
1947
1948 * Thuban/UI/legend.py: Modifications to support selecting a
1949 specific group in the classification dialog. Changed how layers
1950 are drawn when the layer is visible/invisible.
1951
1952 * Thuban/UI/mainwindow.py: Removed legend specific code and
1953 replaced it with calls to the new dock code.
1954
1955 * Thuban/UI/renderer.py (MapRenderer.__init__): Added assert
1956 to check if scale > 0. Trying to track down a divide by zero.
1957
1958 2003-03-26 Jonathan Coles <[email protected]>
1959
1960 * Thuban/UI/legend.py: Removed unnecessary LegendDialog class.
1961 (LegendPanel): Removed _OnDock()/_OnUnDock() methods which are
1962 now part of DockableWindow.
1963 (LegendPanel.DoOnSelChanged): Select the current layer in the
1964 map.
1965 (LegendTree._OnSelChanged): Call LegendPanel.DoOnSelChanged()
1966 with the selected layer and/or group.
1967
1968 2003-03-26 Jonathan Coles <[email protected]>
1969
1970 This putback contains the code for dockable windows. There is
1971 no support in wxWindows as of this date for windows that can
1972 attach themselves to other windows.
1973
1974 The current model contains a DockableWindow which has a parent
1975 window for when it is detached and a dock window that it puts
1976 its contents in when it is docked. The contents of a DockableWindow
1977 must be a DockPanel. DockPanel itself derives from wxPanel.
1978
1979 * Thuban/Model/layer.py (Layer.ClassChanged): Send a LAYER_CHANGED
1980 message, not a LAYER_LEGEND_CHANGED message.
1981
1982 * Thuban/Model/map.py (Map): Forward LAYER_CHANGED messages.
1983
1984 * Thuban/UI/classifier.py (Classifier.__init__): Use wxADJUST_MINSIZE
1985 as one of the style properties for the fieldTypeText item to
1986 be sure that its size is correct when the text changes.
1987
1988 * Thuban/UI/dock.py: New. Classes for the DockPanel and
1989 DockableWindow.
1990
1991 * Thuban/UI/legend.py: Added some more buttons and made the
1992 LegendPanel a DockPanel.
1993
1994 * Thuban/UI/mainwindow.py: Added sash windows to the main window
1995 and supporting functions for manipulating the sashes.
1996 (MainWindow.ShowLegend): Create a DockableWindow with the
1997 LegendPanel as the contents.
1998
1999 * Thuban/UI/messages.py: Added DOCKABLE_* messages
2000
2001 * Thuban/UI/view.py (MapCanves.SetMap): Listen for LAYER_CHANGED,
2002 not LAYER_LEGEND_CHANGED, messages.
2003
2004 2003-03-25 Jonathan Coles <[email protected]>
2005
2006 * setup.py: Added custom script bdist_rpm_build_script so that
2007 when the rpm is built the path to wx-config is correct.
2008
2009 * setup.cfg: Added line saying to use the custom build script
2010
2011 2003-03-20 Jonathan Coles <[email protected]>
2012
2013 Initial implementation of the Legend.
2014
2015 * Thuban/UI/legend.py: New. Creates a window that shows the map's
2016 Legend information and allows the user to add/modify classifications
2017 and how the layers are drawn on the map.
2018
2019 * setup.py: New command 'build_docs' which currently uses
2020 happydoc to generate html documentation for Thuban.
2021
2022 * Thuban/Model/classification.py (ClassGroup.GetDisplayText): New.
2023 Returns a string which is appropriately describes the group.
2024
2025 * Thuban/Model/layer.py (Layer.SetClassification): Generate a
2026 LAYER_CHANGED event instead of a LAYER_LEGEND_CHANGED event.
2027
2028 * Thuban/Model/map.py (Map): Rename messages and use new, more
2029 specific, messages.
2030
2031 * Thuban/Model/messages.py: New message to indicate that a layer's
2032 data has changed (LAYER_CHANGED). New map messages to indicate
2033 when layers have been added/removed/changed or if the stacking order
2034 of the layers has changed.
2035
2036 * Thuban/Model/session.py: Rename and use new messages.
2037
2038 * Thuban/UI/classifier.py: Remember if any changes have actually
2039 been applied so that if the dialog is cancelled without an application
2040 of changes we don't have to set a new classification.
2041 (ClassDataPreviewer): Pulled out the window specific code and put it
2042 ClassDataPreviewWindow. ClassDataPreviewer can then be used to draw
2043 symbols on any DC.
2044
2045 * Thuban/UI/mainwindow.py: New code to open the legend.
2046
2047 * Thuban/UI/view.py: Use new message names.
2048
2049 2003-03-19 Jonathan Coles <[email protected]>
2050
2051 * Thuban/UI/main.py (verify_versions): New. Checks the versions
2052 of Python, wxPython, and some other libraries.
2053
2054 * extensions/thuban/wxproj.cpp (check_version): Checks the given
2055 version against what wxproj was compiled with.
2056 (check_version_gtk): If wxproj was compiled with gtk then check
2057 the given version against the version of the gtk library
2058 currently being used.
2059
2060 2003-03-14 Bernhard Herzog <[email protected]>
2061
2062 * test/test_command.py: Run the tests when the module is run as a
2063 script
2064
2065 2003-03-14 Bernhard Herzog <[email protected]>
2066
2067 Implement selection of multiple selected shapes in the same layer:
2068
2069 - Introduce a new class to hold the selection. This basically
2070 replaces the interactor which was nothing more than the
2071 selection anyway. A major difference is of course that the new
2072 selection class supports multiple selected shapes in one layer
2073
2074 - Move the object that represents the selection from the
2075 application to the canvas. The canvas is a better place than the
2076 application because the selection represents which shapes and
2077 layer of the map displayed by the canvas are selected and
2078 affects how the map is drawn.
2079
2080 - Make the selection and its messages publicly available through
2081 the mainwindow.
2082
2083 - The non-modal dialogs do not get a reference to the interactor
2084 anymore as they can simply refer to their parent, the
2085 mainwindow, for the what the interactor had to offer.
2086
2087 * Thuban/UI/selection.py: New module with a class to represent the
2088 selection.
2089
2090 * Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
2091 these unused messages
2092
2093 * Thuban/UI/application.py (ThubanApplication.OnInit)
2094 (ThubanApplication.OnExit, ThubanApplication.SetSession): The
2095 interactor is gone now.
2096 (ThubanApplication.CreateMainWindow): There is no interactor
2097 anymore so we pass None as the interactor argument for now for
2098 compatibility.
2099
2100 * Thuban/UI/view.py (MapCanvas.delegated_messages)
2101 (MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
2102 Unsubscribe, delegate messages according to the delegated_messages
2103 class variable.
2104 (MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
2105 attributes from instance variables as described with the
2106 delegated_methods class variable.
2107 (MapCanvas.__init__): New instance variable selection holding the
2108 current selection
2109 (MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
2110 pass them on to the renderer
2111 (MapCanvas.SetMap): Clear the selection when a different map is
2112 selected.
2113 (MapCanvas.shape_selected): Simple force a complete redraw. The
2114 selection class now takes care of only issueing SHAPES_SELECTED
2115 messages when the set of selected shapes actually does change.
2116 (MapCanvas.SelectShapeAt): The selection is now managed in
2117 self.selection
2118
2119 * Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
2120 (MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
2121 Unsubscribe, delegate messages according to the delegated_messages
2122 class variable.
2123 (MainWindow.delegated_methods, MainWindow.__getattr__): Get some
2124 attributes from instance variables as described with the
2125 delegated_methods class variable.
2126 (MainWindow.__init__): The interactor as ivar is gone. The
2127 parameter is still there for compatibility. The selection messages
2128 now come from the canvas.
2129 (MainWindow.current_layer, MainWindow.has_selected_layer):
2130 Delegate to the the canvas.
2131 (MainWindow.LayerShowTable, MainWindow.Classify)
2132 (MainWindow.identify_view_on_demand): The dialogs don't need the
2133 interactor parameter anymore.
2134
2135 * Thuban/UI/tableview.py (TableFrame.__init__)
2136 (LayerTableFrame.__init__, LayerTableFrame.OnClose)
2137 (LayerTableFrame.row_selected): The interactor is gone. It's job
2138 from the dialog's point of view is now done by the mainwindow,
2139 i.e. the parent. Subscribe to SHAPES_SELECTED instead
2140 of SELECTED_SHAPE
2141
2142 * Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
2143 is gone. It's job from the dialog's point of view is now done by
2144 the mainwindow, i.e. the parent.
2145
2146 * Thuban/UI/classifier.py (Classifier.__init__): The interactor is
2147 gone. It's job from the dialog's point of view is now done by the
2148 mainwindow, i.e. the parent.
2149
2150 * Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
2151 gone. It's job from the dialog's point of view is now done by the
2152 mainwindow, i.e. the parent.
2153 (SessionTreeCtrl.__init__): New parameter mainwindow which is
2154 stored as self.mainwindow. The mainwindow is need so that the tree
2155 can still subscribe to the selection messages.
2156 (SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
2157 (SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
2158 selection is now accessible through the mainwindow. Subscribe to
2159 SHAPES_SELECTED instead of SELECTED_SHAPE
2160
2161 * Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
2162 SHAPES_SELECTED message now.
2163 (IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
2164 so deal with multiple shapes
2165 (IdentifyView.__init__, IdentifyView.OnClose): The interactor is
2166 gone. It's job from the dialog's point of view is now done by the
2167 mainwindow, i.e. the parent.
2168
2169 * Thuban/UI/controls.py (RecordListCtrl.fill_list): The second
2170 parameter is now a list of shape ids.
2171 (RecordTable.SetTable): The second parameter is now a list of
2172 indices.
2173
2174 * Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
2175 selected_shape parameter and ivar to selected_shapes. It's now a
2176 list of shape ids.
2177 (MapRenderer.draw_label_layer): Deal with multiple selected
2178 shapes. Rearrange the code a bit so that the setup and shape type
2179 distinctions are only executed once.
2180
2181 * test/test_selection.py: Test cases for the selection class
2182
2183 2003-03-11 Jonathan Coles <[email protected]>
2184
2185 * Thuban/Model/load.py: Temporary fix so that the xml reader
2186 doesn't cause Thuban to crash.
2187
2188 * Thuban/Model/layer.py: Handle the cyclic references between
2189 a layer and its classification better, and be sure to disconnect
2190 the classification from the layer when the layer is destroyed
2191 so that we don't maintain a cyclic reference that may not be
2192 garbage collected.
2193
2194 * Thuban/Model/classification.py: See comment for layer.py.
2195
2196 2003-03-12 Jan-Oliver Wagner <[email protected]>
2197
2198 * HOWTO-Release: New. Information on the steps for releasing
2199 a new version of Thuban.
2200
2201 2003-03-11 Jonathan Coles <[email protected]>
2202
2203 * Thuban/UI/classifier.py: Add normal border to SelectPropertiesDialog.
2204 Use True instead of true.
2205 (Classifier): Should have a single panel in which all the controls lie.
2206
2207 * Thuban/UI/proj4dialog.py: Add normal border.
2208
2209 * Thuban/UI/tree.py: Fixed problem with bad item images under Windows.
2210
2211 * Thuban/UI/mainwindow.py: Use True instead of true.
2212
2213 * setup.py: Update some definitions to use wxWindows2.4 files
2214
2215 * Data/iceland_sample_class.thuban: Fixed file so that the
2216 field_type information is present.
2217
2218 2003-03-10 Jonathan Coles <[email protected]>
2219
2220 * Thuban/UI/classifier.py (Classifier.__init__): Make the
2221 field type label grow so that when the text changes the
2222 size is updated correctly. This may be a wxWindows bug.
2223
2224 2003-03-10 Jonathan Coles <[email protected]>
2225
2226 * Thuban/UI/application.py: Changed SESSION_CHANGED to
2227 SESSION_REPLACED.
2228
2229 * Thuban/UI/classifier.py: Wrap text with _().
2230 (ClassGrid.CreateTable): Set dimensions and size hints here,
2231 instead of in Reset, so we only set the size once.
2232
2233 * Thuban/UI/dialogs.py: Don't need Shutdown(); just use Close()!
2234
2235 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2236 Call Close() instead of Shutdown().
2237
2238 * Thuban/UI/messages.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2239
2240 * Thuban/UI/tree.py: Changed SESSION_CHANGED to SESSION_REPLACED.
2241 Go back to using OnClose() instead of Shutdown().
2242
2243 2003-03-10 Jonathan Coles <[email protected]>
2244
2245 * Thuban/UI/classifier.py (Classifier): SelectField() needed
2246 to know the old field index as well as the new one.
2247
2248 2003-03-10 Jonathan Coles <[email protected]>
2249
2250 * Thuban/UI/classifier.py (Classifier): Use __SelectField()
2251 to correctly set the table information and call this from
2252 __init__ and from _OnFieldSelect so that all the information
2253 is up to date when the dialog opens and when a field is changed.
2254
2255 2003-03-10 Jonathan Coles <[email protected]>
2256
2257 * Thuban/Model/classification.py (Classification): Don't use
2258 layer's message function directly, use the ClassChanged() method
2259 when then classification changes. SetField/SetFieldType/SetLayer
2260 must keep the information about field name and field type in
2261 sync when an owning layer is set or removed.
2262
2263 * Thuban/Model/layer.py: Added ClassChanged() so that the
2264 classification can tell the layer when its data has changed.
2265 (Layer.SetClassification): Accepts None as an arguement to
2266 remove the current classification and correctly handles
2267 adding a new classification.
2268
2269 * Thuban/Model/load.py: Comment out print statement
2270
2271 * test/test_classification.py, test/test_save.py: New and
2272 improved tests.
2273
2274 2003-03-07 Jonathan Coles <[email protected]>
2275
2276 * Thuban/Model/classification.py: Implemented __copy__ and
2277 __deepcopy__ for ClassGroup* and ClassGroupProperites so
2278 they can easily be copied by the classifier dialog.
2279 (ClassGroupProperites.__init__): The default line color should
2280 have been Color.Black.
2281
2282 * Thuban/UI/classifier.py: Setting and Getting table values now
2283 uses a consistent set of functions.
2284 (Classifier): Now non-modal. Has field type label which changes
2285 as the field changes. Keep track of buttons in a list so that
2286 we can enable/disable the buttons when the None field is selected.
2287 (SelectPropertiesDialog): Add buttons to make the colors transparent.
2288
2289 * Thuban/UI/dialogs.py (NonModalDialog.Shutdown): New method which
2290 does what OnClose did, but can be called by the application to
2291 close a window. Needed when a session changes, and we have to
2292 close the classifier windows.
2293
2294 * Thuban/UI/mainwindow.py (MainWindow.prepare_new_session):
2295 Shuts down open dialogs. Used when a new session is created
2296 or a session is opened.
2297 (MainWindow.SaveSession): Should only call application.SaveSession()
2298 if we don't call SaveSessionAs first.
2299 (MainWindow.Classify): Allow different classifier dialogs for
2300 different layers.
2301
2302 * Thuban/UI/tree.py (SessionTreeView): Remove OnClose and let
2303 the parent class handle it. Add Shutdown() to unsubscibe from
2304 event notification and call the parent Shutdown(). This was
2305 necessary so the application can close the tree window.
2306
2307 2003-03-06 Jonathan Coles <[email protected]>
2308
2309 * Thuban/Model/classification.py: Minor documentation changes,
2310 Addition of __eq__ and __ne__ methods.
2311 (Classification.SetLayer): prevent recursion between this method
2312 and Layer.SetClassification().
2313
2314 * Thuban/Model/color.py: Addition of __eq__ and __ne__ methods.
2315
2316 * Thuban/Model/layer.py (SetClassification): prevent recursion
2317 between this method and Classification.SetLayer().
2318
2319 * test/test_classification.py, test/test_load.py,
2320 test/test_session.py: Fixed and added tests for the classification
2321 classes.
2322
2323 2003-03-06 Bernhard Herzog <[email protected]>
2324
2325 * Thuban/UI/classifier.py (ClassGrid.__init__)
2326 (ClassGrid.CreateTable): Move the SetSelectionMode call to
2327 CreateTable because otherwise it triggers an assertion in
2328 wxPython/wxGTK 2.4.
2329
2330 2003-03-05 Jonathan Coles <[email protected]>
2331
2332 * Thuban/common.py: Move FIELDTYPE constants back to table.py.
2333
2334 * Thuban/Model/load.py: import FIELDTYPE constants from table.
2335
2336 * Thuban/UI/classifier.py: import FIELDTYPE constants from table.
2337
2338 * Thuban/Model/table.py: Put FIELDTYPE constants back.
2339
2340 2003-03-05 Jonathan Coles <[email protected]>
2341
2342 * Thuban/UI/classifier.py: Added class documentation.
2343 Fixed RTbug #1713, #1714. Added Move[Up|Down] buttons.
2344 Store just the groups in the table and generate the other
2345 column information when it is requested. Add "None" field
2346 to pull-down to select no classification.
2347
2348 * Thuban/common.py: Moved FIELDTYPE constants from table.py
2349 (Str2Num): Only catch ValueError exceptions.
2350
2351 * Thuban/Model/classification.py: Class documentation. Renaming
2352 of methods with Stroke to Line. Groups are stored in a single
2353 list with the default as the first element. Groups are searched
2354 in the order they appear in the list.
2355
2356 * Thuban/Model/color.py: Documentation.
2357
2358 * Thuban/Model/layer.py (Layer): Add GetFieldType to retreive
2359 the kind of data represented by a field.
2360
2361 * Thuban/Model/load.py (ProcessSession): Use proper string
2362 conversion function; fixes RTbug #1713.
2363
2364 * Thuban/Model/save.py (Saver): Store field type information.
2365
2366 * Thuban/Model/table.py: Put FIELDTYPE constants in common.py.
2367 (Table): Add field_info_by_name() to retrieve field information
2368 by specifying the field name, not the number.
2369
2370 * Thuban/UI/mainwindow.py: Function name changes.
2371
2372 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Only
2373 get the layer classification once. Don't try to classify
2374 values when the field is None: just use the default properties.
2375
2376 * Thuban/UI/view.py: Function name changes.
2377
2378 * Doc/thuban.dtd: Add field_type attribute to a classification.
2379
2380 2003-03-04 Bernhard Herzog <[email protected]>
2381
2382 * Doc/thuban.dtd: Use correct syntax for optional attributes. Make
2383 the fill and stroke layer attributes optional with suitable
2384 default values. Add the stroke_width layer attribute. Use correct
2385 syntax for empty elements. Make the attribute list for labels
2386 refer to the label element.
2387
2388 2003-03-04 Bernhard Herzog <[email protected]>
2389
2390 * setup.py (thuban_build_py.build): Add a comment about distutils in
2391 Python 2.3 containing some of the functionality we implement in
2392 setup.py ourselves.
2393
2394 * Thuban/UI/classifier.py (ClassGrid.__init__): Set the table
2395 before the selection mode. Doing it the other way round triggers
2396 an assertion in wxWindows.
2397
2398 * Thuban/Model/save.py (escape): Fix typo in doc-string
2399
2400 * Thuban/Model/classification.py: Remove unnecessary wxPython
2401 import
2402
2403 2003-03-04 Jonathan Coles <[email protected]>
2404
2405 * Thuban/Model/classification.py (ClassGroupRange.GetProperties):
2406 Parameter 'value' should default to None.
2407
2408 * Thuban/UI/mainwindow.py: Use Layer.GetClassification() since
2409 the class attribute __classification is now private.
2410
2411 * Thuban/UI/classifier.py (ClassGrid): Moved OnCellDClick() from
2412 Classifier to ClassGrid. Added support for removing selected rows,
2413 which including code for keeping track of when cells are selected,
2414 and deselected.
2415 (ClassTable): Support for added/removing rows. Fixed a problem
2416 with __ParseInput whereby it would not allow strings (only numbers)
2417 to be entered.
2418 (Classifier): Added button and supporting code for removing
2419 selected rows.
2420
2421 2003-02-27 Jonathan Coles <[email protected]>
2422
2423 * Thuban/common.py: Moved color conversion functions into
2424 Thuban/UI/common.py.
2425 (Str2Num): Now converts the float (not the string) to a long/int
2426 so that an exception isn't thrown.
2427
2428 * Thuban/UI/common.py: Common functions used in several UI modules
2429
2430 * Thuban/Model/classification.py: Changed the class hierarchy
2431 so that a Classification consists of Groups which return
2432 Properties when a value matches a Group.
2433
2434 * Thuban/Model/layer.py: Fixed name resolution problem.
2435
2436 * Thuban/Model/load.py: Use new Classification and Group functions.
2437
2438 * Thuban/Model/save.py (Saver.write_attribs): Fixes a test case
2439 failure.
2440 (Saver.write_classification): Use new Classification and Group
2441 functions.
2442
2443 * Thuban/UI/classifier.py: Changes to use new Classification and Group
2444 functions. Fix to create a tuple with a single value instead of
2445 simply returning the value.
2446
2447 * Thuban/UI/renderer.py: Use new Classification and Group functions.
2448 Use common.py functions.
2449
2450 * Thuban/UI/tree.py: Use common.py functions.
2451
2452 * test/test_classification.py: Use new Classification and Group
2453 classes.
2454
2455 2003-02-24 Jonathan Coles <[email protected]>
2456
2457 * Thuban/common.py (Color2wxColour, wxColour2Color): Conversion
2458 functions from Thuban color objects to wxWindow colour objects.
2459
2460 * Thuban/Model/classification.py (Classification): Renamed
2461 GetProperties() to GetClassData(). Used the new iterator
2462 in TreeInfo().
2463 (ClassIterator): Iterator implementation to iterate over the
2464 ClassData objects in a classification object.
2465
2466 * Thuban/Model/save.py (Saver.write_classificaton): Uses
2467 the new iterator to save the classification information.
2468
2469 * Thuban/UI/classifier.py (SelectPropertiesDialog): Support
2470 for changing the stroke and fill colors and previewing the
2471 changes.
2472
2473 * Thuban/UI/mainwindow.py (MainWindow.OpenSession,
2474 MainWindow.SaveSessionAs): Text string changes so the dialogs
2475 have more meaningful titles.
2476
2477 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Change
2478 Classification method name from GetProperties to GetClassData.
2479
2480 * Thuban/UI/view.py (MapCanvas.find_shape_at): Use method calls
2481 instead of accessing now non-existent class variables.
2482
2483 2003-02-24 Bernhard Herzog <[email protected]>
2484
2485 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Remove
2486 unneeded Shape() call. Rendering is substantially faster without
2487 it and it avoids some problems with broken shape files.
2488
2489 2003-02-20 Frank Koormann <[email protected]>
2490
2491 Force minimal size of identify and label dialogs. The autosizing
2492 looked too ugly.
2493
2494 * Thuban/UI/controls.py (RecordListCtrl): Set minimal width for columns.
2495 * Thuban/UI/labeldialog.py (LabelDialog.dialog_layout):
2496 Set size of listctrl.
2497 * Thuban/UI/identifyview.py (IdentifyView.__init__):
2498 Set size of dialog.
2499
2500 2003-02-19 Jonathan Coles <[email protected]>
2501
2502 * test/test_classification.py, test/test_layer.py,
2503 test/test_load.py, test/test_map.py, test/test_session.py:
2504 Updated the tests to use the new functions that are in the
2505 respective classes.
2506
2507 * Thuban/Model/classification.py (Classification):
2508 Uses the new ClassData* classes. Modification messages are
2509 passed up to the parent layer (if it exists).
2510 (ClassData): New class to encapsulate the common data in each
2511 classification property.
2512 (ClassDataDefault): Represents the Default class. data.
2513 (ClassDataPoint): Represents a single class. data point
2514 (ClassDataRange): Represents a class. range
2515 (ClassDataMap): Represents a class. map (unused).
2516
2517 * Thuban/Model/color.py: Added Color.None to represent something
2518 with no color. Color.Black represents the color black.
2519 (NoColor): Helper class derived from Color to represent something
2520 with no color.
2521
2522 * Thuban/Model/layer.py (Layer): Removed references to fill, stroke,
2523 stroke_width attributes. Made the 'classification' attribute private.
2524 New methods for setting/getting the classification.
2525
2526 * Thuban/Model/load.py (ProcessSession): Use new methods on Layer
2527 to get the classifcation and use the new ClassData* classes to
2528 hold the classification data. Use Str2Num to convert numbers
2529 properly.
2530
2531 * Thuban/Model/save.py (Saver): Use new Color and Classification
2532 methods
2533
2534 * Thuban/UI/classifier.py (ClassGrid): New class to represent a
2535 custom grid.
2536 (ClassTable): Support for editing Values and Labels and for
2537 changing what type (point or range) of data is stored in each
2538 property based on how the user enters the data.
2539 (Classifier): Support for saving the new classifications and
2540 launching the dialog to edit a property.
2541 (SelectPropertiesDialog): New class for editing the visual
2542 properties of a classification (stroke color, width, and fill color)
2543 (ClassPreviewer): Took the Draw method from ClassRenderer and
2544 made most of it into this new class. Intend to use this class in
2545 the SelectPropertiesDialog for previewing changes.
2546
2547 * Thuban/UI/renderer.py: Use new Color and Classification methods.
2548
2549 * Thuban/UI/tree.py: Formatting changes.
2550
2551 * Doc/thuban.dtd: Add 'label' element
2552
2553 * Thuban/common.py: New. Contains common routines used throughout
2554 the code.
2555 (Str2Num): Takes a string and converts it to the "best" type of
2556 number.
2557
2558 2003-02-14 Bernhard Herzog <[email protected]>
2559
2560 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Make sure that the
2561 dragging flag is always set to 0 even when the tool implementation
2562 raises an exception
2563
2564 2003-02-11 Bernhard Herzog <[email protected]>
2565
2566 * Thuban/UI/application.py (ThubanApplication.splash_screen): New
2567 method to create a splash screen.
2568 (ThubanApplication.ShowMainWindow): New. Show the main window.
2569 Needed so the splash screen can display the mainwindow
2570 (ThubanApplication.OnInit): Call the
2571 new splash_screen method to determine whether the application
2572 should display a splash screen. If it displays a splash screen do
2573 not immediately show the main window.
2574
2575 2003-02-11 Jonathan Coles <[email protected]>
2576
2577 * Thuban/Model/classification.py: Added import line to fix
2578 feature conflicts between running on python2.2 and python2.1.
2579
2580 * Thuban/UI/classifier.py (ClassTable): Didn't need to hang
2581 onto the clinfo parameter, so removed the deepcopy().
2582
2583 2003-02-10 Jonathan Coles <[email protected]>
2584
2585 * Thuban/Model/save.py (Saver.open_element, Saver.close_element):
2586 Added element_open variable to track opening and closing of tags
2587 so that tags that don't span more than one line are closed with
2588 /> instead of </tag_name>. Use the GetDefault*() methods of
2589 the Classification class.
2590
2591 * Thuban/Model/classification.py (Classificaton): Added set and
2592 get methods for the default data. The class also takes a layer
2593 reference so that modification messages can be sent. Fixed the
2594 methods to use the new ClassData class.
2595 (ClassData): New class to encapsulate the classification data
2596
2597 * Thuban/Model/layer.py (Layer): Remove the
2598 Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
2599 SetDefault*() methods on the layer's classification object.
2600 (Layer.__init__): Use the new SetDefault*() methods in the
2601 Classification class.
2602
2603 * Thuban/Model/load.py (ProcessSession): Use the new ClassData
2604 object instead of a dictionary.
2605
2606 * Thuban/UI/classifier.py (ClassRenderer): New class to
2607 draw the classifications in the dialog box's table.
2608 (Classifier): Modified to use the ClassRenderer class.
2609
2610 * Thuban/UI/mainwindow.py (MainWindow): Use the SetDefault*()
2611 methods of the Classification class.
2612
2613 * Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
2614 of the ClassData class.
2615
2616 * test/test_classification.py, test/test_layer.py,
2617 test/test_map.py, test/test_session.py: Fix the tests to work
2618 with the above code changes.
2619
2620 2003-02-03 Jonathan Coles <[email protected]>
2621
2622 * Thuban/Model/classification.py (Classification): Added getNull()
2623 to return the NullData reference
2624
2625 * Thuban/Model/layer.py (Layer.SetFill, Layer.SetStroke,
2626 Layer.SetStrokeWidth): Modified these functions to change the
2627 null data in the classification rather than keep these values
2628 directly in the Layer class. Menu options to change these values
2629 work again.
2630
2631 2003-01-28 Jonathan Coles <[email protected]>
2632
2633 * Thuban/UI/classifier.py (Classifier): Resolved merging conflicts.
2634 Fixed crashing problem on some systems. Dialog box shows
2635 classification data.
2636
2637 * Thuban/UI/tree.py (SessionTreeCtrl.add_items): Handle drawing
2638 Colors in the tree view.
2639
2640 * Thuban/Model/layer.py (Layer.TreeInfo): Added a call to build
2641 the tree info for classifications. Commented out unnecessary lines.
2642
2643 * Thuban/Model/classification.py (Classification.TreeInfo): New
2644 function to add information about the classification into the
2645 tree view.
2646
2647 2003-01-27 Jan-Oliver Wagner <[email protected]>
2648
2649 * Thuban/__init__.py (_): New.
2650
2651 * Thuban/Model/classification.py, Thuban/Model/extension.py,
2652 Thuban/Model/layer.py, Thuban/Model/load.py, Thuban/Model/map.py,
2653 Thuban/Model/session.py, Thuban/UI/application.py,
2654 Thuban/UI/classifier.py, Thuban/UI/context.py, Thuban/UI/controls.py,
2655 Thuban/UI/identifyview.py, Thuban/UI/labeldialog.py,
2656 Thuban/UI/mainwindow.py, Thuban/UI/menu.py, Thuban/UI/proj4dialog.py,
2657 Thuban/UI/renderer.py, Thuban/UI/tree.py, Thuban/Lib/connector.py,
2658 Thuban/Lib/fileutil.py: Replace user string by _() for i18n.
2659
2660 2003-01-27 Jonathan Coles <[email protected]>
2661
2662 * Thuban/Model/layer.py: Classification initialization calls.
2663
2664 * Thuban/Model/classification.py: Created class to encapsulate
2665 a layer classification. Supports specific data points and
2666 ranges.
2667
2668 * Thuban/Model/load.py: Added support for loading classification
2669 information.
2670
2671 * Thuban/Model/save.py: Added support for saving classification
2672 information.
2673
2674 * Thuban/UI/classifier.py: Initial class for a dialog box for
2675 specifying classification information.
2676
2677 * Thuban/UI/mainwindows.py: Support for opening the classifier
2678 dialog.
2679
2680 * Thuban/UI/renderer.py: Support for drawing a layer with the
2681 classification information.
2682
2683 * Data/iceland_sample_class.thuban: iceland_sample with
2684 classification data.
2685
2686 * test/test_classification: Tests for the Classification class.
2687
2688 2002-12-09 Bernhard Herzog <[email protected]>
2689
2690 * test/test_command.py: New. Tests for the command classes.
2691
2692 * Thuban/UI/command.py (ToolCommand): New class for tool commands.
2693 (Command.IsTool): New method to distinguish between command
2694 switching tools and other commands.
2695
2696 * Thuban/UI/view.py (MapCanvas.SelectTool): New method to select
2697 the tool to avoid direct assignments to instance variables
2698 (MapCanvas.ZoomInTool, MapCanvas.ZoomOutTool, MapCanvas.PanTool)
2699 (MapCanvas.IdentifyTool, MapCanvas.LabelTool): Use SelectTool to
2700 change the tool
2701
2702 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): If an
2703 active tool's command turns insensitive, disable the tool.
2704 (_tool_command): Use the new ToolCommand class
2705
2706 * Examples/simple_extensions/simple_tool.py (simple_tool): Use the
2707 SelectTool method to change the tool
2708 (iconfile): Use the ToolCommand class
2709
2710 2002-12-03 Bernhard Herzog <[email protected]>
2711
2712 * Thuban/UI/tree.py (SessionTreeCtrl.normalize_selection): Handle
2713 the case of selected items that are not children of Layers or Maps
2714 properly. Previously this bug would trigger an assertion in
2715 wxWindows.
2716
2717 2002-11-06 Frank Koormann <[email protected]>
2718
2719 * Thuban/UI/mainwindow.py: Altered the order of tools in the
2720 toolbar: First now are all navigation tools (Zoom In/Out, Pan,
2721 Full Extent).
2722
2723 2002-10-23 Bernhard Herzog <[email protected]>
2724
2725 * setup.py (setup call): version now 0.1.3
2726
2727 * MANIFEST.in: Add the files in test/
2728
2729 * test/README: Add note about tests requiring the iceland data
2730
2731 * Thuban/UI/mainwindow.py (MainWindow.About): Add 2002 to
2732 copyright notice.
2733
2734 2002-10-18 Bernhard Herzog <[email protected]>
2735
2736 * test/test_map.py
2737 (TestMapWithContents.test_projected_bounding_box): Use an explicit
2738 epsilon.
2739
2740 * test/support.py (FloatComparisonMixin.assertFloatEqual)
2741 (FloatComparisonMixin.assertFloatSeqEqual): give a more useful
2742 message if the assertion fails and don't return the return value
2743 of self.assert_. In assertFloatSeqEqual the return meant that not
2744 all items of the sequence were compared.
2745
2746 2002-09-20 Bernhard Herzog <[email protected]>
2747
2748 * test/test_fileutil.py: New. Test cases for Thuban.Lib.fileutil
2749
2750 * Thuban/Lib/fileutil.py: Fixup some whitespace and typos
2751
2752 * test/test_map.py (TestMapWithContents.test_tree_info): Create
2753 the string with the bounding box on the fly because of platform
2754 differences in the way %g is handled.
2755
2756 * test/test_layer.py (TestLayer.test_empty_layer): Create an empty
2757 DBFfile too because Thuban layers can't yet cope missing DBF
2758 files.
2759
2760 2002-09-20 Bernhard Herzog <[email protected]>
2761
2762 * test/test_menu.py: Use initthuban instead of
2763 add_thuban_dir_to_path to initialize Thuban.
2764
2765 * test/support.py (FloatComparisonMixin.assertFloatEqual): New.
2766 Mixin class for float comparisons
2767 (SubscriberMixin): New. Mixin class to test messages sent through
2768 the Connector class
2769
2770 * test/README: Fix a typo and add the -v flag to the command for
2771 individual tests
2772
2773 * test/test_session.py: New. Test cases for Thuban.Model.session
2774
2775 * test/test_proj.py: New. Test cases for Thuban.Model.proj
2776
2777 * test/test_map.py: New. Test cases for Thuban.Model.map
2778
2779 * test/test_layer.py: New. Test cases for Thuban.Model.layer
2780
2781 * test/test_label.py: New. Test cases for Thuban.Model.label
2782
2783 * test/test_connector.py: New. Test cases for Thuban.Lib.connector
2784
2785 * test/test_color.py: New. Test cases for Thuban.Model.color
2786
2787 * test/test_base.py: New. Test cases for Thuban.Model.base
2788
2789 2002-09-13 Bernhard Herzog <[email protected]>
2790
2791 * Thuban/Model/session.py (Session.forwarded_channels): Forward
2792 the CHANGED channel too.
2793
2794 * Thuban/Model/map.py (Map.forwarded_channels): Forward the
2795 CHANGED channel too.
2796 (Map.__init__): Call the Modifiable constructor as well.
2797
2798 * Thuban/Model/base.py (Modifiable.UnsetModified): Issue a CHANGED
2799 event if the modified flag changes.
2800 (Modifiable.changed): Tweak the doc-string.
2801
2802 * Thuban/UI/mainwindow.py (MainWindow.view_position_changed)
2803 (MainWindow.set_position_text): Put the code that puts the text
2804 with the mouse position into the status bar into the new method
2805 set_position_text so that it can overwritten in derived classes.
2806
2807 2002-09-12 Bernhard Herzog <[email protected]>
2808
2809 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Center the
2810 message box on the main window.
2811
2812 2002-09-11 Bernhard Herzog <[email protected]>
2813
2814 * Thuban/UI/mainwindow.py: Underline the 'x' in "Exit" instead of
2815 the 'E' because it's less likely to interfere with other menu
2816 entries.
2817 (MainWindow.build_menu): remove an incorrect comment.
2818
2819 2002-09-10 Bernhard Herzog <[email protected]>
2820
2821 * Thuban/UI/mainwindow.py (MainWindow.Map): New.
2822 (_tool_command): Add sensitive parameter
2823 (_has_visible_map): Sensitivity callback to tools and other
2824 commands that require a visible map. Use it in map_zoom_in_tool,
2825 map_zoom_out_tool, map_pan_tool, map_identify_tool, map_label_tool
2826 and map_full_extent
2827
2828 2002-09-06 Bernhard Herzog <[email protected]>
2829
2830 * Thuban/UI/mainwindow.py (MainWindow.OnClose): Unsubscribe
2831 VIEW_POSITION
2832
2833 2002-09-04 Frank Koormann <[email protected]>
2834
2835 * Resources/Bitmaps/fullextent.xpm: Updated Icon (removed "potatoe")
2836
2837 2002-09-02 Bernhard Herzog <[email protected]>
2838
2839 * Thuban/UI/view.py: Get rid of the idle redraw. This is done by
2840 wxWindows already and our implementation doesn't work correctly
2841 with wxGTK 2.3:
2842 (MapCanvas.__init__): Remove the instance variable
2843 (MapCanvas.OnPaint): Always call do_redraw when there's a map to
2844 be drawin
2845 (MapCanvas.OnIdle): Removed.
2846
2847 * Thuban/UI/view.py (MapCanvas.unprojected_rect_around_point): Add
2848 a parameter to determine the size of the rectangle.
2849 (MapCanvas.find_shape_at): Create the box around the point on a
2850 layer by layer basis and make the size depend on the shape type.
2851 This solves a problem with the selection of point shapes at the
2852 border of the layer's bounding box
2853
2854 2002-08-30 Bernhard Herzog <[email protected]>
2855
2856 * Thuban/UI/mainwindow.py (MainWindow.CanRemoveLayer): New method
2857 for the sensitivity of remove layer.
2858 (_can_remove_layer): New. Sensitivity callback for remove layer
2859 (Command layer_remove): Use _can_remove_layer
2860
2861 * Thuban/Model/map.py (Map.CanRemoveLayer): New method to
2862 determine whether a given layer can be deleted.
2863
2864 * Thuban/UI/view.py (MapCanvas.__init__, MapCanvas.OnPaint)
2865 (MapCanvas.do_redraw): Get rid of the unused update_region
2866 instance variable
2867
2868 * Thuban/UI/view.py: Add/update some doc-strings.
2869
2870 * test/: new subdirectory with a bunch of unit tests.
2871
2872 * test/README, test/test_table.py, test/test_save.py,
2873 test/test_menu.py, test/test_load.py: Initial set of tests and
2874 brief instructions on how to run them
2875
2876 2002-08-29 Bernhard Herzog <[email protected]>
2877
2878 * Thuban/UI/renderer.py (ScreenRenderer.draw_shape_layer): Handle
2879 arcs with multiple parts.
2880
2881 * Thuban/UI/view.py (ZoomInTool.MouseUp, ZoomOutTool.MouseUp):
2882 Handle degenrate rectangles.
2883
2884 * Thuban/Model/table.py: Make writing records work correctly:
2885 (Table.__init__): Keep track of whether the DBF is open for
2886 writing
2887 (Table.write_record): Open the DBF file for writing when necessary
2888
2889 2002-08-27 Bernhard Herzog <[email protected]>
2890
2891 * Thuban/Model/table.py (Table.write_record, Table.__init__): Open
2892 dbf files only for reading by default. Use a new writable dbf
2893 object for writing.
2894
2895 2002-08-26 Bernhard Herzog <[email protected]>
2896
2897 * Thuban/UI/mainwindow.py: Refactor the context creation:
2898 (MainWindow.Context): New method to return a context
2899 (MainWindow.invoke_command, MainWindow.update_command_ui): Use the
2900 new method
2901
2902 * Thuban/UI/tableview.py (TableGrid, LayerTableGrid): Split the
2903 layer table specific code from TableGrid into LayerTableGrid
2904 (TableFrame, LayerTableFrame): Split the layer table specific code
2905 from TableFrame into LayerTableFrame
2906 (LayerTableGrid.select_shape): Remove a debug print
2907
2908 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Use the
2909 LayerTableFrame
2910
2911 2002-08-23 Bernhard Herzog <[email protected]>
2912
2913 * Thuban/Model/layer.py (Layer.__init__): Make sure we have an
2914 absolute filename.
2915
2916 2002-08-22 Bernhard Herzog <[email protected]>
2917
2918 * Thuban/Model/table.py (Table.write_record): New method to write
2919 records.
2920 (Table.__init__): Open the DBF file for writing too.
2921
2922 * Thuban/UI/controls.py (RecordTable.SetValue): Write the value
2923 into the underlying table.
2924
2925 * extensions/shapelib/shapefil.h (DBFCommit),
2926 extensions/shapelib/dbfopen.c (DBFCommit): New API function to
2927 commit any changes made to the DBF file.
2928
2929 * Thuban/UI/mainwindow.py (make_check_current_tool)
2930 (_tool_command): Put the code that generates the "checked"
2931 callback into a separate function so that we can reuse it
2932 elsewhere
2933
2934 * Thuban/Model/save.py (Saver): New class to handle serializing a
2935 session into an XML file. The main reason to introduce a class is
2936 that applications built on Thuban can derive from it so that they
2937 can save additional information in a session file.
2938 (save_session): Delegate almost all the work to the Saver class.
2939 Rename the filename argument to file because it may be a file like
2940 object now.
2941
2942 * Thuban/Model/load.py: Get rid of the Python 1.5.2 compatibility
2943 code. Remove the little test code which would be executed when the
2944 module is run as a script which didn't work anymore since it can't
2945 import the other Thuban modules.
2946 (ProcessSession, load_session): Refactor the ProcessSession to
2947 have one method for each element start and end tag so that derived
2948 classes can easily override the processing of individual tags.
2949 Also, always parse with namespaces enabled because applications
2950 built on top of Thuban will likely use namespaces if they extend
2951 the session file format.
2952
2953 2002-08-21 Bernhard Herzog <[email protected]>
2954
2955 * setup.py (ThubanInstall.run): Don't repr install_lib_orig
2956 because thubaninit_contents will do it for us.
2957
2958 2002-08-16 Jan-Oliver Wagner <[email protected]>
2959
2960 * Thuban/UI/mainwindow.py: menu item 'show session tree' now disable if
2961 tree window already open
2962
2963 2002-08-15 Bernhard Herzog <[email protected]>
2964
2965 * Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
2966 with self.
2967
2968 * Thuban/UI/view.py (MapCanvas.OnLeftUp): Only release the mouse
2969 when we have actually captured it.
2970
2971 * Thuban/Model/layer.py (Layer.Destroy): New. Explicitly close the
2972 shapefile and destroy the table.
2973
2974 * Thuban/Model/table.py (Table.Destroy): New. Close the DBF file.
2975
2976 2002-08-14 Bernhard Herzog <[email protected]>
2977
2978 * Thuban/UI/controls.py (RecordTable.__init__): Remove the unused
2979 instance variable columns
2980 (RecordTable.GetTypeName): row and col may be negative in some
2981 cases.
2982
2983 * setup.py (InstallLocal.initialize_options)
2984 (InstallLocal.finalize_options, InstallLocal.user_options): New
2985 option create-init-file to build a thubaninit.py when running
2986 install_local
2987 (InstallLocal.run): Create the thubaninit.py module when requested
2988 (thubaninit_contents): Split the template into several parts and
2989 create a new function thubaninit_contents that creates the
2990 contents of a thubaninit module.
2991 (ThubanInstall.run): Use the new function to create the thubaninit
2992 module.
2993
2994 2002-07-30 Bernhard Herzog <[email protected]>
2995
2996 * Thuban/UI/application.py (ThubanApplication.OnExit): Do some
2997 cleanup.
2998 (ThubanApplication.MainLoop): Extend to automatically call OnExit.
2999
3000 * Thuban/Model/session.py (Session.Destroy): Don't bypass the
3001 direct base class' Destroy method.
3002
3003 * Thuban/Model/map.py (Map.ClearLayers): New method to delete all
3004 layers.
3005 (Map.Destroy): Destroy the label_layer as well and call the
3006 inherited Desatroymethod first so that no more messages are
3007 issued.
3008 (Map.RaiseLayer, Map.LowerLayer): Only issue LAYERS_CHANGED
3009 message if the stacking order actually has changed. Add
3010 doc-strings.
3011 (Map.BoundingBox): Correct the doc-string.
3012 (Map.AddLayer, Map.RemoveLayer, Map.Layers, Map.HasLayers)
3013 (Map.ProjectedBoundingBox, Map.SetProjection): Add doc-strings.
3014
3015 * Thuban/Model/label.py (LabelLayer.ClearLabels): New to delete
3016 all labels.
3017
3018 2002-07-29 Bernhard Herzog <[email protected]>
3019
3020 * Thuban/Model/map.py (Map.subscribe_layer_channels)
3021 (Map.unsubscribe_layer_channels): Put the code that (un)subscribes
3022 to a layer's channels into separate methods.
3023 (Map.RemoveLayer, Map.AddLayer): Call the new methods
3024 (Map.Destroy): Unsubscribe from a layer's channels before
3025 destroying it.
3026
3027 * Thuban/UI/view.py (MapCanvas.find_shape_at): Change the
3028 selected_layer parameter to searched_layer which is the layer to
3029 search in.
3030 (MapCanvas.SelectShapeAt): New parameter layer to restrict the
3031 search to that layer. Return the selected layer and shape.
3032
3033 * Examples/simple_extensions/simple_tool.py (simple_tool): Fix a
3034 typo
3035
3036 2002-07-24 Bernhard Herzog <[email protected]>
3037
3038 * Thuban/UI/application.py (ThubanApplication.create_session):
3039 Extend the doc string.
3040 (ThubanApplication.subscribe_session)
3041 (ThubanApplication.unsubscribe_session): New methods to
3042 subscribe/unsubscribe to/from session channels.
3043 (ThubanApplication.SetSession): Call the new methods here.
3044 (ThubanApplication.maps_changed, ThubanApplication.set_map):
3045 Renamed set_map to maps_changed. Its now a subscriber for
3046 MAPS_CHANGED.
3047
3048 * Thuban/UI/view.py (ZoomOutTool.MouseUp): Use the correct
3049 x-coordinate in case of simple clicks
3050
3051 * Thuban/Model/base.py (Modifiable.changed): Apply the args tuple,
3052 don't pass it as a parameter
3053
3054 * Thuban/Model/session.py (Session.RemoveMap): New
3055
3056 * Thuban/UI/mainwindow.py (MainWindow.__init__): Turn the initial
3057 window size into a parameter.
3058
3059 2002-07-23 Bernhard Herzog <[email protected]>
3060
3061 * Thuban/UI/menu.py (Menu.item_index): Also search for menus not
3062 just commands.
3063
3064 * Thuban/UI/mainwindow.py (MainWindow.__init__): Change the
3065 parameter list a bit to allow setting the window title and the
3066 initial message in the status bar. Update the callers.
3067
3068 * Thuban/UI/application.py (ThubanApplication.OnInit)
3069 (ThubanApplication.CreateMainWindow): Put the mainwindow
3070 instantiation into a separate method so that it can be overridden
3071 by a subclass.
3072
3073 2002-07-19 Bernhard Herzog <[email protected]>
3074
3075 * Thuban/Model/session.py: Issue a CHANGED message every time
3076 another changed message is issued to make it easier to get
3077 notified of changes.
3078 (Session): Update the doc string
3079 (Session.forward): Issue changed-events as CHANGED as well.
3080 (Session.changed): Overwrite the inherited version to issue
3081 CHANGED events as well.
3082
3083 * Thuban/UI/tree.py: We can now simply subscribe to the session's
3084 CHANGED channel to be informed of changes.
3085 (SessionTreeCtrl.session_channels): Not needed any longer.
3086 (SessionTreeCtrl.unsubscribe_all, SessionTreeCtrl.session_changed):
3087 Only have to (un)subscribe CHANGED
3088
3089 * Thuban/Model/map.py (Map.TreeInfo): Deal better with empty maps.
3090
3091 * Thuban/UI/main.py, Thuban/UI/__init__.py: Move the work-around
3092 for the wxPython locale bug to __init__.py so that it's
3093 automatically executed by anybody using UI code from Thuban.
3094
3095 2002-07-18 Bernhard Herzog <[email protected]>
3096
3097 * Thuban/UI/main.py (main): app no longer needs to be global
3098
3099 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add application
3100 as parameter and store it in an instance variable
3101 (MainWindow.invoke_command, MainWindow.update_command_ui)
3102 (MainWindow.save_modified_session, MainWindow.NewSession)
3103 (MainWindow.OpenSession, MainWindow.SaveSession)
3104 (MainWindow.SaveSessionAs, MainWindow.ShowSessionTree): Use self's
3105 application object.
3106
3107 * Thuban/UI/application.py (ThubanApplication.OnInit): Instantiate
3108 the main window with self.
3109
3110 * Thuban/UI/context.py: New module with the context class
3111
3112 * Thuban/UI/command.py (Command): Update doc string.
3113
3114 * Thuban/UI/mainwindow.py (MainWindow.invoke_command,
3115 MainWindow.update_command_ui): Pass an instance of the context
3116 class to the command's methods
3117 (check_current_tool, call_method): Handle the new context
3118 implementation
3119
3120 * Examples/simple_extensions/simple_tool.py (simple_tool,
3121 check_simple_tool): Handle the new context implementation
3122
3123 * Examples/simple_extensions/simple_command.py (simple_command):
3124 Handle the new context implementation. Update the comments about
3125 the context.
3126
3127 * Thuban/UI/application.py (ThubanApplication.SetSession): Add
3128 doc-string
3129 (ThubanApplication.Session): New method to return the session
3130 object
3131
3132 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): The
3133 interactor's selected_layer may not be a layer of the current
3134 session when the tree is updated while a new session is being set.
3135
3136 2002-07-17 Bernhard Herzog <[email protected]>
3137
3138 * Thuban/UI/tree.py (color_string): Removed. No longer used.
3139 (SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
3140 update_tree into update_tree and add_items. The tree now uses a
3141 more generic way to display the contents of the tree.
3142 (SessionTreeCtrl): Add a doc string explaining the TreeInfo method
3143
3144 * Thuban/Model/layer.py (Layer.TreeInfo),
3145 Thuban/Model/extension.py (Extension.TreeInfo),
3146 Thuban/Model/map.py (Map.TreeInfo),
3147 Thuban/Model/session.py (Session.TreeInfo):
3148 Add TreeInfo methods to implement the new tree view update scheme
3149
3150 2002-07-16 Bernhard Herzog <[email protected]>
3151
3152 * Thuban/UI/application.py: Don't use "import from" for the
3153 MainWindow. It can't always be resolved.
3154 (ThubanApplication.OnInit): change reference to MainWindow
3155 accordingly.
3156
3157 * Thuban/UI/menu.py (Menu.SetItems): New method to replace a menu
3158 completely
3159
3160 2002-07-10 Bernhard Herzog <[email protected]>
3161
3162 * setup.py (create_init_module): New configurable variable whose
3163 default depends on the platform we're running on.
3164 (ThubanInstall.initialize_options): Initialize
3165 self.create_init_module from the global create_init_module
3166 (ThubanInstall.user_options): indictate that the options
3167 create-init-module and init-module-dir have arguments.
3168
3169 * setup.py: In the setup call change the version number to include
3170 cvs.
3171
3172 * MANIFEST.in: Add the files in Examples
3173
3174 2002-07-09 Bernhard Herzog <[email protected]>
3175
3176 * setup.py: In the setup call, use the thuban homepage as the
3177 value of the url parameter.
3178
3179 * Examples: New subdirectory for examples.
3180
3181 * Examples/simple_extensions/simple_tool.xpm,
3182 Examples/simple_extensions/simple_tool.py,
3183 Examples/simple_extensions/simple_command.py,
3184 Examples/simple_extensions/README: Simple examples showing how to
3185 add new commands and tools.
3186
3187 * setup.cfg (bdist_rpm): Add the default value for prefix and tell
3188 bdist_rpm that we also have an install script.
3189 (bdist_inno): Add 2002 to the copyright notice.
3190
3191 * setup.py: Create a file in python's site-packages directory to
3192 make installation of Thuban as a library easier.
3193 (ThubanInstall.user_options): Add two new options,
3194 create-init-module and init-module-dir
3195 (ThubanInstall.expand_with_pure_python_dirs): New method to expand
3196 filenames for installation in the default directories.
3197 (ThubanInstall.select_scheme, ThubanInstall.convert_paths): Extend
3198 the inherited methods to capture some filenames before they're
3199 transformed too much by distutils.
3200 (ThubanInstall.run): Create the init module if requested.
3201 (ThubanInstall.thuban_init_filename): New method to return the
3202 full name of the init module.
3203 (ThubanInstall.get_outputs): Append the filename of the init
3204 module.
3205
3206 2002-07-08 Bernhard Herzog <[email protected]>
3207
3208 * setup.py (thuban_bdist_rpm): Extend this version of bdist_rpm to
3209 handle the prefix properly which means that the default for the
3210 installation prefix should be /usr for RPMs and /usr/local when
3211 doing a normal source install.
3212 (bdist_rpm_install_script): Script to override the default install
3213 commands in the specfile generated by the bdist_rpm command.
3214 (thuban_bdist_rpm.user_options): Add a prefix option
3215 (thuban_bdist_rpm.initialize_options): Init the prefix option.
3216 Create the script files for the spec files as empty files here
3217 (thuban_bdist_rpm._make_spec_file): Override the inherited method
3218 to fill the script files with content.
3219
3220 * Thuban/Model/save.py (relative_filename): Wrapper around
3221 Thuban.Lib.fileutil.relative_filename that accepts an empty dir
3222 argument. save_session now automatically uses this version,
3223 solving a problem when saving to a relative filename.
3224
3225 * setup.py: In the setup call, make sure that the library
3226 directories are under $prefix/lib not directly under $prefix.
3227
3228 2002-06-20 Jan-Oliver Wagner <[email protected]>
3229
3230 * Thuban/Model/extension.py: new module to handle extension objects.
3231 * Thuban/Model/messages.py: new messages for extensions.
3232 * Thuban/Model/session.py (Session.Extensions, Session.HasExtensions,
3233 Session.AddExtension): new for handling extensions.
3234 Also some other minor changes to round up extension handling.
3235 * Thuban/UI/tree.py (SessionTreeCrtl:update_tree): Added visualization
3236 of Extension titles and title and names of its objects.
3237
3238 2002-05-29 Bernhard Herzog <[email protected]>
3239
3240 * Thuban/UI/mainwindow.py (MainWindow.bind_command_events): Bind
3241 the events for a command.
3242 (MainWindow.add_toolbar_command, MainWindow.add_menu_command):
3243 Call bind_command_events to bind the events. add_toolbar_command
3244 can now bind events too so that it's possible to have commands
3245 that are only available through the toolbar.
3246 (MainWindow.init_ids): New instance variable events_bound to keep
3247 track of for which commands events have been bound.
3248
3249 2002-05-28 Bernhard Herzog <[email protected]>
3250
3251 * Thuban/UI/menu.py: New module to build and manage menus.
3252
3253 * Thuban/UI/mainwindow.py: Remove some unused imports.
3254 (MainWindow.__init__, main_menu): move the definition of the main
3255 menu from __init__ to the Menu instance main_menu.
3256 (MainWindow.build_menu_bar, MainWindow.build_menu): New methods to
3257 build the menu bar and sub-menus from a menu description.
3258
3259 * Thuban/UI/application.py (ThubanApplication.OnInit): Read the
3260 startup file
3261 (ThubanApplication.read_startup_files): New method to run
3262 ~/.thuban/thubanstart.py
3263
3264 * Thuban/UI/mainwindow.py (MainWindow.__init__, main_toolbar):
3265 Move the toolbar definition to the Menu instance main_toolbar.
3266 (MainWindow.build_toolbar): New method to build the toolbar
3267 similar to the build_menu methods
3268
3269 2002-05-23 Bernhard Herzog <[email protected]>
3270
3271 * Thuban/UI/mainwindow.py (MainWindow.__init__): Fix spelling of
3272 layer_outline_color. Fix it in the definition of the command too.
3273
3274 * Thuban/UI/command.py (Command): Fix typo in doc string
3275
3276 2002-05-22 Bernhard Herzog <[email protected]>
3277
3278 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): Fix a typo
3279 in the docstring
3280
3281 2002-05-15 Bernhard Herzog <[email protected]>
3282
3283 * Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
3284 when the shapefile is empty.
3285 (Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
3286 now return None for empty shapefiles. Update doc-strings.
3287
3288 * Thuban/Model/map.py (Map.BoundingBox): Add doc-string. Deal with
3289 the layer's bbox being None.
3290
3291 * Thuban/UI/tree.py (SessionTreeCtrl.update_tree): Deal with the
3292 layer's bbox being None.
3293
3294 * Thuban/UI/view.py (MapCanvas.shape_selected): Only redraw when
3295 necessary.
3296 (MapCanvas.__init__): New instance variables, last_selected_layer
3297 and last_selected_shape to determine how the selection has
3298 changed.
3299
3300 * Thuban/UI/tableview.py (TableGrid.__init__): Do not call
3301 AutoSizeColumns because it will cause a traversal of the entire
3302 table which for large .dbf files will take a very long time.
3303
3304 2002-05-14 Bernhard Herzog <[email protected]>
3305
3306 * Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
3307 maximum depth for the tree than shapelib does by default.
3308
3309 2002-05-10 Bernhard Herzog <[email protected]>
3310
3311 * setup.py (py_modules): The shptree modules doesn't have a
3312 wrapper, so don't include it in the py_modules
3313
3314 2002-05-08 Bernhard Herzog <[email protected]>
3315
3316 * extensions/shapelib/shptree.c (compare_ints): Make arguments
3317 const void * as in the qsort prototype
3318 (SHPTreeFindLikelyShapes): Remove some unused variables.
3319
3320 * Thuban/UI/view.py (PanTool.MouseMove): Use the bitmap the view
3321 maintains to redraw the window during a drag.
3322 (MapCanvas.unprojected_rect_around_point): New method to determine
3323 a small region around a point for hit-testing.
3324 (MapCanvas.find_shape_at): Only test the shapes in a small region
3325 around the point.
3326
3327 * setup.py: Increment the version to 0.1.2
3328
3329 * Thuban/UI/tree.py (SessionTreeCtrl.unsubscribe_all): Remove a
3330 debug print and set session to None after unsubscribing
3331
3332 2002-05-07 Bernhard Herzog <[email protected]>
3333
3334 * Data/iceland_sample.session, Data/iceland_sample.thuban: Rename
3335 the file to have a .thuban extension.
3336
3337 * Thuban/UI/tree.py (session_channels): New class constant with
3338 all the session channels to subscribe to to update the tree
3339 (SessionTreeCtrl.session_changed): Remember the session so that we
3340 can unsubscribe properly. Use the new class constant to
3341 unsubscribe from the old session and subscribe to the new one.
3342 (SessionTreeCtrl.unsubscribe_all): New method to unsubscribe all
3343 subscriptions of the SessionTreeCtrl.
3344 (SessionTreeView.OnClose): Call the tree's unsubscribe_all method.
3345
3346 * Thuban/UI/mainwindow.py (MainWindow.__init__): Add the "Show
3347 Session Tree" command to the file menu.
3348
3349 * Thuban/UI/view.py (MapCanvas.do_redraw): Pass the entire bitmap
3350 as update_region to the renderer.
3351
3352 * Thuban/UI/renderer.py
3353 (ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
3354 update box is now directly a tuple, not a wxRect anymore.
3355
3356 * Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
3357 prints.
3358
3359 2002-05-07 Bernhard Herzog <[email protected]>
3360
3361 * setup.py: Add the shptree extension module. See
3362 extensions/pyshapelib/ChangeLog for more details.
3363
3364 * extensions/shapelib/shpopen.c, extensions/shapelib/shapefil.h,
3365 extensions/shapelib/dbfopen.c: Really update to the versions of
3366 shapelib 1.2.9. For some reason it wasn't really done on
3367 2002-04-11.
3368
3369 * extensions/shapelib/shptree.c: Modified version of shptree.c of
3370 shapelib 1.2.9. The only real difference is the use of qsort
3371 instead of a bubble sort implementation
3372
3373 * Thuban/Model/layer.py (Layer.__init__): New instance variable
3374 shapetree to hold the shapelib quadtree for the shapefile
3375 (Layer.open_shapefile): Create the quad tree.
3376 (Layer.ShapesInRegion): New method to return the ids of shapes in
3377 a given region using the quad tree.
3378
3379 * extensions/thuban/wxproj.cpp (project_points): Fix some typos in
3380 comment
3381 (draw_polygon_shape): Accept both arcs and polygons.
3382 (initwxproj): Use the new PYSHAPELIB_IMPORT_API macro to import
3383 the api.
3384
3385 * Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
3386 return the shape ids to be rendered in a given layer.
3387 (MapRenderer.draw_shape_layer): Call layer_ids to get the list of
3388 ids. Use draw_polygon_shape to draw arc shapes as well.
3389 (ScreenRenderer.RenderMap): New parameter for the rectangle that
3390 has to be updated
3391 (ScreenRenderer.layer_ids): Make use of the layer's quadtree by
3392 calling it's ShapesInRegion method.
3393
3394 * Thuban/UI/view.py (MapCanvas.__init__): New instance variable
3395 update_region for the update region.
3396 (MapCanvas.OnPaint): Maintain the update region
3397 (MapCanvas.do_redraw): Pass the bounding box of the update_region
3398 to the renderer when drawing the bitmap. Reset the update_region.
3399
3400 2002-05-03 Bernhard Herzog <[email protected]>
3401
3402 * Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs,
3403 MainWindow.OpenSession): Change the file extension of the session
3404 files to .thuban
3405
3406 * Thuban/Model/session.py (Session.AddMap, forwarded_channels):
3407 Move the map channels to be forwarded by the session into the
3408 class constant with forwarded_channels. Also add
3409 LAYER_PROJECTION_CHANGED and LAYER_VISIBILITY_CHANGED to
3410 forwarded_channels
3411
3412 * Thuban/Model/base.py (Modifiable.changed): Fix doc-string (a
3413 typo and some rewording).
3414
3415 2002-05-02 Bernhard Herzog <[email protected]>
3416
3417 * Thuban/UI/view.py: Keep the temporary bitmap used during drawing
3418 around to speed up most redraws:
3419 (MapCanvas.__init__): New instance variable bitmap which holds the
3420 bitmap
3421 (MapCanvas.do_redraw): Redraw self.bitmap if necessary. Use
3422 self.bitmap to draw.
3423 (MapCanvas.full_redraw): New method to force a full redraw
3424 including the bitmap
3425 (MapCanvas.SetMap): Subscribe full_redraw instead of redraw to
3426 make sure the bitmap is redrawn.
3427 (MapCanvas.projection_changed, MapCanvas.set_view_transform,
3428 MapCanvas.shape_selected): Call full_redraw instead of readraw to
3429 make sure the bitmap is redrawn.
3430 (MapCanvas.OnSize): New method to handle size events so that the
3431 bitmap can be redrawn.
3432
3433 2002-04-29 Bernhard Herzog <[email protected]>
3434
3435 * Thuban/UI/mainwindow.py (MainWindow.__init__): Subscribe to the
3436 canvas' VIEW_POSITION event
3437 (MainWindow.view_position_changed): Handler for VIEW_POSITION.
3438 Update the text in the status-bar accordingly.
3439
3440 * Thuban/UI/view.py (MapCanvas): Derive from Publisher as well
3441 (MapCanvas.__del__): Implement because Publisher.__del__ has to be
3442 called.
3443 (MapCanvas.__init__): Bind EVT_LEAVE_WINDOW too. Initialize
3444 current_position
3445 (MapCanvas.set_current_position): New method to set
3446 current_position. Issue a VIEW_POSITION event
3447 (MapCanvas.CurrentPosition): New public method to return the value
3448 of current_position. Should be called when the VIEW_POSITION event
3449 is processed.
3450 (MapCanvas.OnLeftDown, MapCanvas.OnLeftUp, MapCanvas.OnMotion):
3451 Update the position.
3452 (MapCanvas.OnLeaveWindow): Set the position to None.
3453
3454 * Thuban/UI/messages.py (VIEW_POSITION): New message for the
3455 position in the statusbar
3456
3457 2002-04-26 Frank Koormann <[email protected]>
3458
3459 * Thuban/UI/mainwindow.py: AddLayer, Dialog title s/session/data
3460
3461 2002-04-24 Frank Koormann <[email protected]>
3462
3463 * Resources/Bitmaps/identify.xpm: shadow added
3464
3465 * Resources/Bitmaps/fullextent.xpm: new
3466
3467 2002-04-22 Jan-Oliver Wagner <[email protected]>
3468
3469 * Thuban/UI/tree.py (update_tree): added test for None on map bounding
3470 box
3471
3472 2002-04-21 Jan-Oliver Wagner <[email protected]>
3473
3474 * Thuban/UI/proj4dialog.py (UTMProposeZoneDialog): new
3475
3476 * Thuban/UI/tree.py (update_tree): added added map extent
3477
3478 * Thuban/UI/mainwindow.py (_method_command): extended by parameter
3479 icon; added map_full_extend as tool
3480
3481 2002-04-19 Jan-Oliver Wagner <[email protected]>
3482
3483 * Thuban/UI/mainwindow.py (SaveSession): launch save as dialog for
3484 saving _new_ sessions
3485
3486 * Thuban/Model/session.py (create_empty_session): new session
3487 don't have a filename (set to None)
3488
3489 * Thuban/UI/tree.py (update_tree): added filename and modified flag
3490
3491 * Thuban/Model/load.py (ProcessSession): convert projection
3492 parameters from unicode to regular string
3493
3494 * Data/iceland_sample.session: Added UTM Zone 26 projection.
3495
3496 2002-04-11 Bernhard Herzog <[email protected]>
3497
3498 * extensions/shapelib/shapefil.h, extensions/shapelib/shpopen.c,
3499 extensions/shapelib/dbfopen.c: Update to the versions of shapelib
3500 1.2.9
3501
3502 * setup.py (Lib.wxproj extension): Don't link shpopen.c and put
3503 the pyshapelib directoy into the list of include dirs, so that
3504 pyshapelib_api.h can be found.
3505
3506 * extensions/thuban/wxproj.cpp (pyshapelib_api): New variable that
3507 holds the pyshapelib C-API
3508 (draw_polygon_shape, point_in_polygon_shape, shape_centroid): Use
3509 pyshapelib_api to access the shapelib functions.
3510 (initwxproj): Import the c_api from the shapelib module and
3511 initialize pyshapelib_api.
3512
3513 2002-04-04 Bernhard Herzog <[email protected]>
3514
3515 * setup.py (thuban_bdist_rpm.initialize_options): Use
3516 initialize_options to create the scripts for the rpm.
3517
3518 * extensions/pyprojection/setup.py (PROJ4_PREFIX): Just use /
3519
3520 2002-04-03 Bernhard Herzog <[email protected]>
3521
3522 * setup.py: Increment version to 0.1.1
3523
3524 * Thuban/UI/mainwindow.py (MainWindow.__init__): Move the "Add
3525 Layer" and "Remove Layer" commands from the layer menu to the map
3526 menu
3527
3528 2002-02-15 Bernhard Herzog <[email protected]>
3529
3530 * Thuban/Model/layer.py (Layer.Shape): list append only takes one
3531 argument (python <= 1.5.2 erroneously accepted multiuple
3532 arguments)
3533
3534 2002-02-04 Bernhard Herzog <[email protected]>
3535
3536 * Thuban/UI/identifyview.py (IdentifyGridCtrl): New class to use a
3537 RecordGrid in the identifyview.
3538 (IdentifyView.__init__): Use IdentifyGridCtrl instead of
3539 IdentifyListCtrl. The grid allows editing of the values.
3540
3541 * Thuban/UI/controls.py (RecordTable, RecordGridCtrl): New classes
3542 implementing a grid for a single row of a thuban table.
3543
3544 * Thuban/UI/view.py (MapCanvas.SelectShapeAt): Search through all
3545 layers by default. Easier to use than the previous default of only
3546 searching through the select layer which meant that if no layer
3547 was selected, you couldn't select a shape.
3548
3549 * Thuban/UI/tableview.py (TableGrid.__init__): Fix typo
3550
3551 * Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
3552 stroke_width attribute
3553
3554 * Thuban/Model/save.py (save_session): Write the new stroke_width
3555 attribute
3556
3557 * Thuban/Model/load.py (ProcessSession.startElement): Read the
3558 stroke_width attribute
3559
3560 * Thuban/Model/layer.py (Layer.__init__): New parameter and
3561 instance variable stroke_width
3562 (Layer.SetStrokeWidth): Set the stroke_width.
3563
3564 2002-02-01 Bernhard Herzog <[email protected]>
3565
3566 * extensions/thuban/wxproj.cpp (project_points): Fix two
3567 off-by-one errors in the last loop that joins the various parts
3568 together.
3569
3570 2002-01-14 Bernhard Herzog <[email protected]>
3571
3572 * setup.py (data_dist.make_distribution): Fix some typos
3573
3574 2001-09-18 Bernhard Herzog <[email protected]>
3575
3576 * README: Slight tweaking in preparation for the 0.1 release
3577
3578 * setup.cfg: Add section for sdist to create both tgz and zip
3579 archives
3580
3581 * setup.py: increase version number to 0.1
3582 (data_dist): New command class for data distribution
3583
3584 2001-09-14 Bernhard Herzog <[email protected]>
3585
3586 * Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape):
3587 Handle the case of no layer (i.e. layer is None) properly.
3588
3589 * Thuban/UI/proj4dialog.py (UTMDialog.__init__, Proj4Dialog.__init__):
3590 Set the initial selection of the combo boxes to reflect the
3591 projection we're starting with in a way that works on windows,
3592 too.
3593
3594 * Thuban/Lib/connector.py (Connector.print_connections): Print the
3595 puiblisher's ids in hex to make it easier to compare them to the
3596 standard repr of python methods
3597
3598 * Thuban/Model/map.py (Map.Destroy): Unsubscribe the label_layer
3599 messages
3600
3601 2001-09-13 Bernhard Herzog <[email protected]>
3602
3603 * Thuban/UI/tree.py (SessionTreeCtrl.OnSelChanged): Make sure to
3604 deselect the layer if no layer is selected
3605
3606 * Thuban/UI/view.py (MapCanvas.OnPaint): Only delay drawing to
3607 idle time when there actually is something to draw. If there's
3608 nothing to draw simply clear the window
3609 (MapCanvas.do_redraw): Call dc.EndDrawing and add some comments.
3610 (MapCanvas.SetMap): force a redraw in all cases because
3611 FitMapToWindow doesn't always do it.
3612 (MapCanvas.ZoomFactor): Add an optional parameter, center, to
3613 specify the point to move into the center of the window
3614 (ZoomOutTool.MouseUp, ZoomInTool.MouseUp): If the mouse wasn't
3615 dragged, zoon in/out by a factor of 2
3616 (MapCanvas.find_shape_at): Iterate backwards (i.e. with decreasing
3617 index, i.e. reversed drawing order) so that objects appearing to
3618 be in from of others are selected first. This is probably mostly
3619 relevant for point shapes where the symbols used may overlap
3620
3621 * Thuban/Model/session.py (create_empty_session): Unset the
3622 modified bit before returning it
3623
3624 * Thuban/UI/mainwindow.py (MainWindow.NewSession): Use
3625 create_empty_session session to create the new, empty session.
3626
3627 * Thuban/UI/mainwindow.py (MainWindow.__init__): Set the size of
3628 the tool bitmaps.
3629 (MainWindow.OnClose, MainWindow.save_modified_session): Separate
3630 the code that asks whether the session should be saved into the
3631 new method save_modified_session.
3632 (MainWindow.OpenSession, MainWindow.NewSession): Use the new
3633 method to save modified session here too.
3634
3635 2001-09-11 Bernhard Herzog <[email protected]>
3636
3637 * setup.py (InnoIconItem): fix typo
3638
3639 (thuban_bdist_inno.run):
3640 (bdist_inno.run): Move the decision not to create symlinks on
3641 non-nt platforms to thuban_bdist_inno and do it unconditinally
3642 since we never want to create the symlinks here
3643
3644 2001-09-10 Bernhard Herzog <[email protected]>
3645
3646 * Thuban/UI/mainwindow.py (MainWindow.IdentifyTool): Popup the
3647 identify view immediately
3648
3649 * Thuban/UI/controls.py: New file with two classes RecordListCtrl
3650 and SelectableRecordListCtrl that implement the code shared by the
3651 identify view and the label dialog
3652
3653 * Thuban/UI/identifyview.py (IdentifyListCtrl): Derive from the
3654 new class RecordListCtrl
3655
3656 * Thuban/UI/labeldialog.py (LabelDialog.OnOK): Check whether the
3657 return value of GetValue is None instead of using it as a boolean
3658 directly so that Zero numbers are handled properly.
3659 (LabelListCtrl): Derive from the new class
3660 SelectableRecordListCtrl
3661
3662 * Thuban/UI/proj4dialog.py (Proj4Dialog.__init__):
3663 (Proj4Dialog.dialogLayout): Make the window resizable and set the
3664 size of the text control explicitly to make the sizers work on
3665 both Windows and X.
3666
3667 2001-09-07 Bernhard Herzog <[email protected]>
3668
3669 * Thuban/UI/view.py (MapCanvas.find_shape_at):Add a new parameter
3670 that can limit the search to the currently selected layer.
3671 (MapCanvas.SelectShapeAt): Make sure that the currently selected
3672 layer stays selected even when no shape is found
3673 (MapCanvas.FitRectToWindow): If the rect has zero with or zero
3674 height do nothing (avoids zero division errors)
3675
3676 2001-09-06 Bernhard Herzog <[email protected]>
3677
3678 * Thuban/UI/tree.py (SessionTreeCtrl, SessionTreeView.__init__):
3679 Correct the spelling of SessionTreeCtrl. dabbrev is too damn
3680 convenient :-)
3681 (SessionTreeCtrl.__init__, SessionTreeCtrl.update_tree): Introduce
3682 a new instvar layer_to_item to map layers to tree items
3683 (SessionTreeCtrl.layer_selected): Select the appropriate tree item
3684 to match the current selection in the interactor
3685
3686 * Thuban/UI/interactor.py (Interactor.SelectedLayer):
3687 (Interactor.HasSelectedLayer): New methods to query the current
3688 selection
3689
3690 * Thuban/UI/mainwindow.py (MainWindow.current_layer):
3691 (MainWindow.has_selected_layer): Simply call the appropriate
3692 interactor method
3693
3694 * Thuban/UI/mainwindow.py (MainWindow.__init__):
3695 (MainWindow.LayerShowTable):
3696 (MainWindow.identify_view_on_demand): Store the interactor in an
3697 instvar and use that reference instead of going through main.app
3698
3699 * Thuban/UI/mainwindow.py (MainWindow.ShowSessionTree):
3700 * Thuban/UI/application.py (ThubanApplication.OnInit):
3701 * Thuban/UI/main.py (main): Create the session tree view in main
3702 with the new mainwindow method ShowSessionTree and not directly
3703 the application's OnInit method
3704
3705 * Thuban/UI/tree.py (myTreeCtrlPanel):
3706 (SessioinTreeCtrl): Rename to SessioinTreeCtrl and turn it into a
3707 TreeCtrl isntead of a panel. This affects most method since we now
3708 refer to self instead of self.tree
3709 (SessionTreeView): New class implementing a non-modal dialog
3710 showing the session tree.
3711
3712 * Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Pass the
3713 layer to the tableview dialog.
3714
3715 * Thuban/UI/tableview.py: Add some doc-strings
3716 (TableGrid):
3717 (TableGrid.OnRangeSelect):
3718 (TableGrid.OnSelectCell):
3719 (TableFrame.__init__):
3720 (TableFrame.row_selected):
3721 Selecting rows in the grid view now updates the selected shapes
3722 through the TableFrame. To achieve this we derive TableGrid from
3723 Publisher and introduce the message type ROW_SELECTED which the
3724 TableFrame subscribes to and which is issued by OnRangeSelect and
3725 OnSelectCell
3726
3727 (DataTable.SelectRow): Removed because it's no longer needed in
3728 the row/shape selection scheme
3729
3730 * Thuban/UI/dialogs.py: New file implementing common classes for
3731 dialogs
3732
3733 * Thuban/UI/tableview.py (TableGrid.__init__): Don't subscribe to
3734 the SELECTED_SHAPE message anymore. This is now handled by the
3735 parent.
3736 (TableGrid.select_shape): Only update the selection if the shape
3737 is not None.
3738 (TableFrame): Inherit from the new NonModalDialog class.
3739 (TableFrame.__init__, TableFrame.select_shape): Handle the
3740 SELECT_SHAPE message.
3741 (TableFrame.OnClose): Extend the inherited method to unsubscribe
3742 SELECT_SHAPE
3743
3744 * Thuban/UI/mainwindow.py (MainWindow.init_dialogs):
3745 (MainWindow.add_dialog):
3746 (MainWindow.dialog_open):
3747 (MainWindow.remove_dialog):
3748 (MainWindow.get_open_dialog): New methods to maintain a dictionary
3749 of opened non-modal dialogs.
3750
3751 (MainWindow.__init__): Initialize the new non-modal dictionary
3752 management code
3753 (MainWindow.LayerShowTable): maintain separate dialogs for each
3754 table using the non-modal dialog management code to only open a
3755 view once for each table.
3756
3757 (MainWindow.IdentifyTool):
3758 (MainWindow.__init__):
3759 (MainWindow.identify_view_on_demand): Don't open the identify view
3760 in IdentifyTool anymore. This will be done automatically by the
3761 new method identify_view_on_demand which handles the
3762 SELECTED_SHAPE message so that the identify view will be opened on
3763 demand
3764
3765 * Thuban/UI/identifyview.py (IdentifyListCtrl.__init__): Remove
3766 the interactor argument. The SELECTED_SHAPE message is now handled
3767 by the parent.
3768 (IdentifyView.__init__): Add the interactor argument so that we
3769 can handle the SELECTED_SHAPE message here
3770 (IdentifyView.selected_shape): New method to handle the
3771 SELECTED_SHAPE messages
3772
3773 * Thuban/UI/identifyview.py (IdentifyView): Derive from the new
3774 NonModalDialog class
3775 (IdentifyView.OnClose): Extend the inherited version to
3776 unsubscribe SELECT_SHAPE
3777
3778 * Thuban/Model/session.py (Session.UnsetModified): Remove debug prints
3779
3780 2001-09-05 Bernhard Herzog <[email protected]>
3781
3782 * Thuban/UI/view.py (MapCanvas.__init__): New argument, interactor.
3783
3784 * Thuban/UI/mainwindow.py (MainWindow.__init__): New argument
3785 interactor to pass through to the MapCanvas
3786
3787 * Thuban/UI/application.py (ThubanApplication.OnInit): Use the new
3788 argument to the MainWindow constructor to get rid of the ugly hack
3789 that made main.app available early just so that the mapcanvas
3790 could access the interactor object.
3791
3792 2001-09-04 Bernhard Herzog <[email protected]>
3793
3794 * Thuban/UI/mainwindow.py (MainWindow.RunMessageBox): New method
3795 that runs a modal message box
3796 (MainWindow.OnClose): Use the new method
3797 (MainWindow.RemoveLayer): Just do nothing in case no layer is
3798 selected. The command should be grayed out anyway, so there's no
3799 need to pop up a message box.
3800 (MainWindow.AddLayer): Pop up a message box with an error message
3801 if the shape file can't be opened
3802
3803 * Thuban/Model/layer.py (Layer.__init__): Open the shapefile
3804 immediately. This will cause an exception in case the file can't
3805 be opened and we can display an appropriate message.
3806
3807 * MANIFEST.in: Add extensions/pyprojection/LICENSE
3808
3809 * setup.py (thuban_bdist_rpm): New class implementing a Thuban
3810 specific bdist_rpm command.
3811
3812 * Thuban/UI/main.py: Catch ImportError exceptions when importing
3813 the locale module because it may not be available on some
3814 installations.
3815
3816 * extensions/pyprojection/LICENSE: Copy of the license text in
3817 Projection.i. Having it in a separate file makes it easier to
3818 refer to license text in e.g. RPMs
3819
3820 2001-09-03 Bernhard Herzog <[email protected]>
3821
3822 * setup.py: use wx-config instead of wxgtk-config because it's
3823 more generic
3824
3825 * setup.py (ThubanInstall.get_outputs): Add the symlink in
3826 <prefix>/bin to the outputs
3827 (ThubanInstall.link_file): New method to link files. We need this
3828 because the standard copy_files refuses to link non-existing
3829 files.
3830 (ThubanInstall.run): Remove the leading install root from the
3831 script filename if an install root was specified and use the new
3832 link_file method
3833
3834 * Thuban/UI/mainwindow.py (MainWindow.AddLayer): Fit the map to
3835 the window when the first layer is added to the map.
3836
3837 * setup.py (ThubanInstall.run): Honor the build root (self.root)
3838 when linking thuban.py to <prefix>/bin
3839
3840 2001-08-31 Bernhard Herzog <[email protected]>
3841
3842 * setup.py: In the setup call, the install parameters shouldn't
3843 have trailing slashes because distutils on non-posix platforms
3844 doesn't like that. The same applies to other directories like
3845 "Resources/Bitmaps"
3846
3847 In the configuration section for nt, move the wxWindows directory
3848 optins into the part clearly marked as editable.
3849
3850 (InstallLocal.initialize_options):
3851 (InstallLocal.user_options): remove the currently unused debug
3852 flag
3853 (thuban_build_py.find_all_modules): Add this method so that it
3854 works for our case of having packages and modules in one
3855 distribution as well.
3856 (ThubanInstall.initialize_options):
3857 (ThubanInstall.finalize_options):
3858 (ThubanInstall.user_options):
3859 (ThubanInstall.boolean_options): Add new options, do-symlink and
3860 extra files. Since these are the first ThubanInstall specific
3861 options, override user_options and boolean_options
3862 (ThubanInstall.run): Honor the new do-symlink and extra-files
3863 options.
3864 (ThubanInstall.get_outputs): Add to override the base-class's
3865 version and add the extra-files to the outputs
3866 (bdist_inno): New class for windows distributions with Inno Setup
3867 (InnoIconItem): Helper class for bdist_inno
3868 (thuban_bdist_inno): Thuban specific version of bdist_inno. Added
3869 this together with the appropriate parameters, to the setup call.
3870
3871 * setup.cfg (bdist_inno): added new section for the inno setup
3872 installer
3873
3874 * Thuban/UI/tree.py (myTreeCtrlPanel.__init__): New inst var
3875 changing_selection to avoid recursive selection events when
3876 modifying the selection in response to a selection event.
3877 (myTreeCtrlPanel.normalize_selection): Set the new inst var when
3878 changing the tree's selection.
3879 (myTreeCtrlPanel.OnSelChanged): Only normalize the selection when
3880 we're not being called indirectly from normalize_selection.
3881
3882 * Thuban/UI/mainwindow.py (MainWindow.update_command_ui): Call
3883 event.Check only if the command is actuall checkable.
3884 (MainWindow.__init__): Call the toolbar's Realize method to make
3885 sure that the items are actually shown
3886
3887 2001-08-28 Bernhard Herzog <[email protected]>
3888
3889 * setup.py: Fix some doc strings
3890
3891 * ChangeLog: started
3892

Properties

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26