1 |
|
2003-06-20 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/classification.py: Remove "from __future__" |
4 |
|
import statement since python 2.2 is the earliest supported |
5 |
|
version. |
6 |
|
|
7 |
|
* Thuban/Model/proj.py (Projection.GetProjectedUnits): New. |
8 |
|
Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES |
9 |
|
depending on the units this projection *forwards* into. |
10 |
|
|
11 |
|
* Thuban/Model/save.py (SessionSaver.write_classification): |
12 |
|
Remove unnecessary use of lambdas and nested functions. |
13 |
|
|
14 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale |
15 |
|
adjustment here if the map projection uses degrees. |
16 |
|
|
17 |
|
* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove |
18 |
|
scale adjust code since it is now done before calling |
19 |
|
this method. Don't do anything if the map projection |
20 |
|
is None. |
21 |
|
|
22 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
23 |
|
|
24 |
|
Move version specific load tests to their own file. |
25 |
|
|
26 |
|
* test/test_load.py: Expand the doc-string to explain a bit how to |
27 |
|
handle file format changes. |
28 |
|
(TestClassification.test): Update the docstring as this test is |
29 |
|
not about Thuban 0.2 anymore. |
30 |
|
|
31 |
|
* test/test_load_0_2.py: New file with the load tests for thuban |
32 |
|
files created with Thuban 0.2 and earlier. |
33 |
|
|
34 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
35 |
|
|
36 |
|
Add XML validation to some of the tests. Validation will only be |
37 |
|
done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html). |
38 |
|
To make the DTD available to the test cases it's moved into |
39 |
|
Resources/XML |
40 |
|
|
41 |
|
* Resources/XML/thuban.dtd: New. This is now the real Thuban DTD |
42 |
|
for versions up to and including 0.2. Two slight changes: added an |
43 |
|
encoding specification and fixed the comment which refered to |
44 |
|
GRASS, not Thuban |
45 |
|
|
46 |
|
* test/xmlsupport.py: New support module for tests involving XML. |
47 |
|
Currently there's a mix-in class for XML validation. |
48 |
|
|
49 |
|
* test/test_xmlsupport.py: New. Tests for the xmlsupport module |
50 |
|
|
51 |
|
* test/test_save.py (SaveSessionTest): Derive from ValidationTest |
52 |
|
so that we can validate the |
53 |
|
(SaveSessionTest.testEmptySession) |
54 |
|
(SaveSessionTest.testSingleLayer) |
55 |
|
(SaveSessionTest.testSingleLayer) |
56 |
|
(SaveSessionTest.testLayerProjection) |
57 |
|
(SaveSessionTest.testRasterLayer) |
58 |
|
(SaveSessionTest.testClassifiedLayer): Validate the generated XML |
59 |
|
|
60 |
|
* test/runtests.py (main): Call print_additional_summary instead |
61 |
|
of print_garbage_information |
62 |
|
|
63 |
|
* test/support.py (resource_dir): New function to return the |
64 |
|
"Resource" subdirectory |
65 |
|
(print_additional_summary): New function to combine several |
66 |
|
summary functions |
67 |
|
(run_tests): Use print_additional_summary instead of calling |
68 |
|
print_garbage_information directly |
69 |
|
|
70 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
71 |
|
|
72 |
|
* Doc/thuban.dtd (classification): Correct the content model of |
73 |
|
the classification element. |
74 |
|
(projection): Add the "name" attribute |
75 |
|
|
76 |
|
2003-06-19 Frank Koormann <[email protected]> |
77 |
|
|
78 |
|
MERGE from the greater-ms3 branch. |
79 |
|
|
80 |
|
* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to |
81 |
|
scale if projection is latlong to get better estimate. |
82 |
|
|
83 |
|
Fix problem of hidden properties dialog under windows after double |
84 |
|
click on layer tree: |
85 |
|
The tree control always gets an Expanded / Collapsed event after |
86 |
|
the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply |
87 |
|
raises the already displayed window. |
88 |
|
|
89 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Instance variable |
90 |
|
raiseProperties initialized to prevent endless loops |
91 |
|
(LegendTree._OnItemActivated): Depending on self.raiseProperties |
92 |
|
simply raise the properties or open the dialog and issue a second |
93 |
|
event. |
94 |
|
|
95 |
|
2003-06-18 Jonathan Coles <[email protected]> |
96 |
|
|
97 |
|
* setup.py: Fix a few problems that occured under Windows. |
98 |
|
|
99 |
|
2003-06-18 Jonathan Coles <[email protected]> |
100 |
|
|
101 |
|
When Thuban loaded the map was redrawn twice because the |
102 |
|
legend was being opened after the mainwindow was created |
103 |
|
and not during its creation. This meant the map was drawn |
104 |
|
initially and then had to be redrawn when the legend |
105 |
|
caused the display to change. Now the legend is opened |
106 |
|
in the mainwindow constructor which resolves this issue. |
107 |
|
|
108 |
|
Also, although we were checking for the existence of |
109 |
|
gdal and gdalwarp modules, the gdalwarp extension was |
110 |
|
still being compiled (which may fail if the system doesn't |
111 |
|
have gdal installed). the build_ext command to setup.py |
112 |
|
now accepts the flags --with-gdal and --without-gdal. |
113 |
|
If --without-gdal is specified setup.py will try to |
114 |
|
use the gdal parameters specified by gdal-config. Under |
115 |
|
windows, those parameters have to be set in setup.py |
116 |
|
as with proj4 an wxWindows. |
117 |
|
|
118 |
|
* setup.py: Use a list instead of seperate variables for |
119 |
|
extension parameters so we can create a generic function |
120 |
|
that runs an appropriate *-config script. |
121 |
|
(run_cs_script): Renamed from run_wx_script and modified |
122 |
|
to accept a second argument which is a list of lists to |
123 |
|
be filled in by the values returned from running the command. |
124 |
|
(thuban_build_ext): New. Extends the build_ext command and |
125 |
|
provides the options --with-gdal/--without-gdal which then |
126 |
|
optionally includes the gdalwarp extension. |
127 |
|
|
128 |
|
* Thuban/Model/resource.py: First check if we can import |
129 |
|
the gdalwarp Thuban extension before checking for gdal. |
130 |
|
Also added some comments. |
131 |
|
|
132 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Check if |
133 |
|
the map is None which may be the case if none has been loaded |
134 |
|
yet. |
135 |
|
|
136 |
|
* Thuban/UI/main.py (main): Remove call to ShowLegend. |
137 |
|
|
138 |
|
* Thuban/UI/mainwindow.py (MainWindow.__init__): Call ShowLegend(). |
139 |
|
|
140 |
|
* Thuban/UI/renderer.py: Check for gdal support before importing |
141 |
|
gdalwarp. |
142 |
|
(MapRenderer.render_map): Only try to optimize if we have gdal |
143 |
|
support otherwise nothing will get drawn. |
144 |
|
|
145 |
|
* Thuban/UI/view.py (MapCanvas.FitMapToWindow): This may be called |
146 |
|
during startup before a map has been created. Check if map is None |
147 |
|
before using it and do nothing if it is. |
148 |
|
|
149 |
|
2003-06-17 Jonathan Coles <[email protected]> |
150 |
|
|
151 |
|
Fix the problem with raster layers under Windows that caused |
152 |
|
Thuban to crash. The view should respond to layer projection |
153 |
|
changed events to update the display. Changes to a projection |
154 |
|
should not cause the map to be set to full extent. |
155 |
|
|
156 |
|
* Thuban/UI/view.py (MapCanvas.__init__): New instance variable |
157 |
|
current_map_proj to remember the current map projection so that |
158 |
|
when the projection changes we know what the previous projection |
159 |
|
was. |
160 |
|
(MapCanvas.SetMap): Unsubscribe and subscribe to |
161 |
|
LAYER_PROJECTION_CHANGED events. |
162 |
|
(MapCanvas.projection_changed): Split into two methods that respond |
163 |
|
to map and layer projection changes. |
164 |
|
(MapCanvas.map_projection_changed): New. Takes the current view and |
165 |
|
projects it using the new projection. This does not cause the |
166 |
|
map to be redrawn at full extent. |
167 |
|
(MapCanvas.layer_projection_changed): New. Cause a redraw which |
168 |
|
will draw each layer in its new projection. |
169 |
|
|
170 |
|
* extensions/thuban/bmpdataset.cpp (BMPDataset::Open): Call |
171 |
|
VSIFClose() not VSIFCloseL() to close the file. Fixes a crash |
172 |
|
under Windows. |
173 |
|
|
174 |
|
* extensions/thuban/gdalwarp.cpp (MFILENAME): Padding should be |
175 |
|
to twice sizeof(void*) because there are two digits for each |
176 |
|
hex byte. |
177 |
|
|
178 |
|
2003-06-16 Bernhard Herzog <[email protected]> |
179 |
|
|
180 |
|
Update to the layer interface: Direct access to the table, |
181 |
|
shapetable, shapefile and filename attributes is now actively |
182 |
|
deprecated by issuing deprecation warnings for all places where |
183 |
|
this happens. |
184 |
|
|
185 |
|
* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access |
186 |
|
to the instance variables table, shapetable, shapefile and |
187 |
|
filename via __getattr__ so that we can issue a deprecation |
188 |
|
warning. |
189 |
|
(Layer.SetShapeStore): Don't set the deprecated instance variables |
190 |
|
any more |
191 |
|
(Layer.SetShapeStore): Don't use deprecated layer instance |
192 |
|
variables |
193 |
|
(Layer.Destroy): No need to explicitly remove the instance |
194 |
|
variables any more |
195 |
|
(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer |
196 |
|
instance variables |
197 |
|
|
198 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__) |
199 |
|
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve) |
200 |
|
(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't |
201 |
|
use deprecated layer instance variables |
202 |
|
|
203 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Don't use |
204 |
|
deprecated layer instance variables |
205 |
|
|
206 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
207 |
|
(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer |
208 |
|
instance variables |
209 |
|
|
210 |
|
* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use |
211 |
|
deprecated layer instance variables |
212 |
|
|
213 |
|
* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use |
214 |
|
deprecated layer instance variables |
215 |
|
|
216 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Don't use |
217 |
|
deprecated layer instance variables |
218 |
|
|
219 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer) |
220 |
|
(MapRenderer.polygon_render_param): Don't use deprecated layer instance |
221 |
|
variables |
222 |
|
|
223 |
|
* test/runtests.py (main): Turn Thuban's deprecation warnings into |
224 |
|
errors so that they're cought by the tests |
225 |
|
|
226 |
|
* test/test_load.py (TestSingleLayer.test): Don't use deprecated |
227 |
|
layer instance variables |
228 |
|
|
229 |
|
2003-06-16 Jonathan Coles <[email protected]> |
230 |
|
|
231 |
|
Fix a problem under Windows whereby if the user double-clicks on a |
232 |
|
layer in the legend that tree item will expand or collapse as well |
233 |
|
as open the layer properties dialog. The state of the tree item |
234 |
|
should not be affected. |
235 |
|
|
236 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Add instance variable |
237 |
|
preventExpandCollapse and subscribe to expanding and collapsing |
238 |
|
events. |
239 |
|
(LegendTree.OnItemExpandCollapse): New. Responds to expanding and |
240 |
|
collapsing events and will veto the event if it has been triggered |
241 |
|
by the user double clicking on a layer. |
242 |
|
(LegendTree._OnItemActivated): Set preventExpandCollapse to indicate |
243 |
|
that an expanding/collapsing event should be vetoed. |
244 |
|
|
245 |
2003-06-13 Bernhard Herzog <[email protected]> |
2003-06-13 Bernhard Herzog <[email protected]> |
246 |
|
|
247 |
* Thuban/UI/classifier.py (Classifier.OnClose) |
* Thuban/UI/classifier.py (Classifier.OnClose) |