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