1 |
|
2003-06-23 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
Bug fix for RT #1961: |
4 |
|
|
5 |
|
* Thuban/Model/load.py (SessionLoader.start_derivedshapesource): |
6 |
|
Register DerivedShapestores with the session |
7 |
|
|
8 |
|
* Thuban/Model/session.py (Session.Tables): Make sure each table |
9 |
|
is only listed once. |
10 |
|
|
11 |
|
* test/test_load.py (TestJoinedTable.test): Add check_format call. |
12 |
|
Update file contents to match the one written out. |
13 |
|
|
14 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
15 |
|
|
16 |
|
* test/xmlsupport.py (SaxEventLister.startElementNS) |
17 |
|
(SaxEventLister.endElementNS): Do not include the qname. Python |
18 |
|
2.2.1 and 2.2.2 and 2.2.3 differ in this regard. In 2.2.1 qname it |
19 |
|
is (presumably incorrectly) None, whereas it's a string with the |
20 |
|
element name in the later versions. |
21 |
|
|
22 |
|
* test/test_xmlsupport.py (TestEventList.test_even_list_simple) |
23 |
|
(TestEventList.test_even_list_namespace): Update tests to reflect |
24 |
|
the new behaviour |
25 |
|
(TestEventList.test_even_list_id_normalization): Fix doc-string |
26 |
|
|
27 |
|
2003-06-20 Jonathan Coles <[email protected]> |
28 |
|
|
29 |
|
* Thuban/Model/layer.py (BaseLayer.HasShapes): New. Overridden |
30 |
|
by deriving classes to determine if that layer supports shapes. |
31 |
|
(Layer): Override HasShapes and return true. |
32 |
|
|
33 |
|
* Thuban/UI/classgen.py: Use Thuban[Begin|End]BusyCursor() |
34 |
|
instead of a direct call to wx[Begin|End]CusyCursor(). |
35 |
|
(GenUniquePanel._OnRetrieve): Set busy cursor while retrieving |
36 |
|
table data. |
37 |
|
|
38 |
|
* Thuban/UI/common.py (ThubanBeginBusyCursor, ThubanEndBusyCursor): |
39 |
|
New. Wrappers around the wxWindows functions that allow us to |
40 |
|
make additional calls such as wxYield which gives the native |
41 |
|
system a chance to update the cursor correctly. |
42 |
|
|
43 |
|
* Thuban/UI/tableview.py: Use Thuban[Begin|End]BusyCursor() |
44 |
|
instead of a direct call to wx[Begin|End]CusyCursor(). |
45 |
|
|
46 |
|
* Thuban/UI/view.py: Use Thuban[Begin|End]BusyCursor() |
47 |
|
instead of a direct call to wx[Begin|End]CusyCursor(). |
48 |
|
(MapCanvas.find_shape_at): Check if the current search layer |
49 |
|
support shapes, otherwise go on to the next layer. |
50 |
|
|
51 |
|
* test/test_layer.py: Add tests in each type of layer for |
52 |
|
HasClassification() and HasShapes() |
53 |
|
|
54 |
|
2003-06-20 Jonathan Coles <[email protected]> |
55 |
|
|
56 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Call wxYield after |
57 |
|
turning on the busy cursor to allow the system to change the |
58 |
|
cursor before we begin painting. This fixes a problem that |
59 |
|
was occuring only under GTK. Fixes RTbug #1840. |
60 |
|
|
61 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
62 |
|
|
63 |
|
* Resources/XML/thuban-0.8.dtd: New DTD for the new file format |
64 |
|
version. |
65 |
|
|
66 |
|
* Thuban/Model/save.py (sort_data_stores): New. Make topological |
67 |
|
sort of the data sources so they can be written with sources that |
68 |
|
data sources that depend on other data sources come after the |
69 |
|
sources they depend on. |
70 |
|
(SessionSaver.__init__): Add idmap instance variable to map from |
71 |
|
objects to the ids used in the file. |
72 |
|
(SessionSaver.get_id, SessionSaver.define_id) |
73 |
|
(SessionSaver.has_id): New. Methods to manage the idmap |
74 |
|
(SessionSaver.write): Use thuban-0.8.dtd |
75 |
|
(SessionSaver.write_session): Add a namespace on the session and |
76 |
|
write out the data sources before the maps. |
77 |
|
(SessionSaver.write_data_containers): New. Write the data |
78 |
|
containers. |
79 |
|
(SessionSaver.write_layer): Layer elements now refer to a |
80 |
|
shapestore and don't contain filenames anymore. |
81 |
|
|
82 |
|
* Thuban/Model/load.py (LoadError): Exception class to raise when |
83 |
|
errors in the files are discovered |
84 |
|
(SessionLoader.__init__): Define dispatchers for elements with a |
85 |
|
thuban-0.8 namespace too. |
86 |
|
(SessionLoader.check_attrs): New helper method to check and |
87 |
|
convert attributes |
88 |
|
(AttrDesc): New. Helper class for SessionLoader.check_attrs |
89 |
|
(SessionLoader.start_fileshapesource) |
90 |
|
(SessionLoader.start_derivedshapesource) |
91 |
|
(SessionLoader.start_filetable, SessionLoader.start_jointable): |
92 |
|
Handlers for the new elements in the new fileformat |
93 |
|
(SessionLoader.start_layer): Handle the shapestore attribute in |
94 |
|
addition to filename. |
95 |
|
(SessionLoader.start_table, SessionLoader.end_table): Removed. |
96 |
|
They were never used in the old formats and aren't needed for the |
97 |
|
new. |
98 |
|
|
99 |
|
* Thuban/Model/session.py (Session.DataContainers): New method to |
100 |
|
return all "data containers", i.e. shapestores and tables |
101 |
|
|
102 |
|
* test/xmlsupport.py (SaxEventLister.__init__) |
103 |
|
(SaxEventLister.startElementNS, sax_eventlist): Add support to |
104 |
|
normalize IDs. |
105 |
|
|
106 |
|
* test/test_xmlsupport.py |
107 |
|
(TestEventList.test_even_list_id_normalization): New test case for |
108 |
|
id normalization |
109 |
|
|
110 |
|
* test/test_load.py (LoadSessionTest.check_format): Use ID |
111 |
|
normalization |
112 |
|
(LoadSessionTest.thubanids, LoadSessionTest.thubanidrefs): New |
113 |
|
class atrributes used for ID normalization |
114 |
|
(TestSingleLayer, TestLayerVisibility, TestLabels.test) |
115 |
|
(TestLayerProjection.test, TestRasterLayer.test): Adapt to new |
116 |
|
file format |
117 |
|
(TestJoinedTable): New test for loading sessions with joined |
118 |
|
tables. |
119 |
|
(TestLoadError): New. Test whether missing required attributes |
120 |
|
cause a LoadError. |
121 |
|
|
122 |
|
* test/test_save.py (SaveSessionTest.thubanids) |
123 |
|
(SaveSessionTest.thubanidrefs): New class attributes for ID |
124 |
|
normalization in .thuban files. |
125 |
|
(SaveSessionTest.compare_xml): Use id-normalization. |
126 |
|
(SaveSessionTest.testEmptySession) |
127 |
|
(SaveSessionTest.testLayerProjection) |
128 |
|
(SaveSessionTest.testRasterLayer) |
129 |
|
(SaveSessionTest.testClassifiedLayer): Adapt to new file format. |
130 |
|
(SaveSessionTest.testLayerProjection): The filename used was the |
131 |
|
same as for testSingleLayer. Use a different one. |
132 |
|
(SaveSessionTest.test_dbf_table) |
133 |
|
(SaveSessionTest.test_joined_table): New test cases for saving the |
134 |
|
new data sources structures. |
135 |
|
(TestStoreSort, MockDataStore): Classes to test the sorting of the |
136 |
|
data stores for writing. |
137 |
|
|
138 |
|
* test/runtests.py: Add CVS keywords |
139 |
|
|
140 |
|
2003-06-20 Jonathan Coles <[email protected]> |
141 |
|
|
142 |
|
* test/test_session.py |
143 |
|
(UnreferencedTablesTests.test_unreferenced_tables_with_joins): |
144 |
|
Use the cultural_landmark-point.dbf file for the store so that |
145 |
|
the table rows and shape count match. |
146 |
|
|
147 |
|
2003-06-20 Jonathan Coles <[email protected]> |
148 |
|
|
149 |
|
* Thuban/Model/data.py (DerivedShapeStore.__init__): Raise |
150 |
|
an exception if the number of shapes is different from the |
151 |
|
number of rows in the table. Address RTbug #1933. |
152 |
|
|
153 |
|
* test/test_layer.py (TestLayer.test_derived_store): Add |
154 |
|
a test for the new exception in DerivedShapeStore.__init__. |
155 |
|
|
156 |
|
* test/support.py (FloatTestCase): Removed since there is |
157 |
|
already FloatComparisonMixin. Fixes RTbug #1954. |
158 |
|
(FloatComparisonMixin.assertFloatEqual): Include test for |
159 |
|
infinity that was part of FloatTestCase. |
160 |
|
|
161 |
|
* test/test_range.py (RangeTest): Inherit from |
162 |
|
support.FloatComparisonMixin now that we don't have |
163 |
|
support.FloatTestCase. |
164 |
|
|
165 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
166 |
|
|
167 |
|
* test/test_save.py (SaxEventLister, sax_eventlist): Removed. Use |
168 |
|
the implementation in xmlsupport instead. |
169 |
|
(SaveSessionTest.compare_xml): sax_eventlist is now in xmlsupport |
170 |
|
|
171 |
|
* test/test_proj.py: Import sax_eventlist from xmlsupport instead |
172 |
|
of test_save |
173 |
|
|
174 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
175 |
|
|
176 |
|
* test/test_load.py (LoadSessionTest.check_format): New helper |
177 |
|
method to make sure the test files we load might have been written |
178 |
|
by the current thuban version. |
179 |
|
(ClassificationTest.TestLayers, TestSingleLayer.test) |
180 |
|
(TestLayerVisibility.test, TestClassification.test) |
181 |
|
(TestLabels.test, TestLayerProjection.test, TestRasterLayer.test): |
182 |
|
Add check_format() calls and fix the thuban data to match the data |
183 |
|
that would be written by saving the session loaded from it. |
184 |
|
|
185 |
|
* test/xmlsupport.py (SaxEventLister, sax_eventlist): Copies of |
186 |
|
the same class and function in test_save. |
187 |
|
|
188 |
|
* test/test_xmlsupport.py (TestEventList): New. test cases for |
189 |
|
sax_eventlist |
190 |
|
|
191 |
|
2003-06-20 Bernhard Herzog <[email protected]> |
192 |
|
|
193 |
|
* Resources/XML/thuban.dtd: Add comment about which versions of |
194 |
|
Thuban are covered by this DTD |
195 |
|
(map): Fix content model for layers and raster layers. There can |
196 |
|
be any number or layers and raster layers in any order. |
197 |
|
|
198 |
|
2003-06-20 Jonathan Coles <[email protected]> |
199 |
|
|
200 |
|
This is mainly about fixing RTbug #1949. |
201 |
|
|
202 |
|
* Thuban/Model/classification.py: Remove "from __future__" |
203 |
|
import statement since python 2.2 is the earliest supported |
204 |
|
version. |
205 |
|
|
206 |
|
* Thuban/Model/proj.py (Projection.GetProjectedUnits): New. |
207 |
|
Currently returns PROJ_UNITS_METERS or PROJ_UNITS_DEGREES |
208 |
|
depending on the units this projection *forwards* into. |
209 |
|
|
210 |
|
* Thuban/Model/save.py (SessionSaver.write_classification): |
211 |
|
Remove unnecessary use of lambdas and nested functions. |
212 |
|
|
213 |
|
* Thuban/UI/legend.py (ScaleBarBitmap.__SetScale): Do scale |
214 |
|
adjustment here if the map projection uses degrees. |
215 |
|
|
216 |
|
* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Remove |
217 |
|
scale adjust code since it is now done before calling |
218 |
|
this method. Don't do anything if the map projection |
219 |
|
is None. |
220 |
|
|
221 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
222 |
|
|
223 |
|
Move version specific load tests to their own file. |
224 |
|
|
225 |
|
* test/test_load.py: Expand the doc-string to explain a bit how to |
226 |
|
handle file format changes. |
227 |
|
(TestClassification.test): Update the docstring as this test is |
228 |
|
not about Thuban 0.2 anymore. |
229 |
|
|
230 |
|
* test/test_load_0_2.py: New file with the load tests for thuban |
231 |
|
files created with Thuban 0.2 and earlier. |
232 |
|
|
233 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
234 |
|
|
235 |
|
Add XML validation to some of the tests. Validation will only be |
236 |
|
done if pyRXP is installed (http://reportlab.com/xml/pyrxp.html). |
237 |
|
To make the DTD available to the test cases it's moved into |
238 |
|
Resources/XML |
239 |
|
|
240 |
|
* Resources/XML/thuban.dtd: New. This is now the real Thuban DTD |
241 |
|
for versions up to and including 0.2. Two slight changes: added an |
242 |
|
encoding specification and fixed the comment which refered to |
243 |
|
GRASS, not Thuban |
244 |
|
|
245 |
|
* test/xmlsupport.py: New support module for tests involving XML. |
246 |
|
Currently there's a mix-in class for XML validation. |
247 |
|
|
248 |
|
* test/test_xmlsupport.py: New. Tests for the xmlsupport module |
249 |
|
|
250 |
|
* test/test_save.py (SaveSessionTest): Derive from ValidationTest |
251 |
|
so that we can validate the |
252 |
|
(SaveSessionTest.testEmptySession) |
253 |
|
(SaveSessionTest.testSingleLayer) |
254 |
|
(SaveSessionTest.testSingleLayer) |
255 |
|
(SaveSessionTest.testLayerProjection) |
256 |
|
(SaveSessionTest.testRasterLayer) |
257 |
|
(SaveSessionTest.testClassifiedLayer): Validate the generated XML |
258 |
|
|
259 |
|
* test/runtests.py (main): Call print_additional_summary instead |
260 |
|
of print_garbage_information |
261 |
|
|
262 |
|
* test/support.py (resource_dir): New function to return the |
263 |
|
"Resource" subdirectory |
264 |
|
(print_additional_summary): New function to combine several |
265 |
|
summary functions |
266 |
|
(run_tests): Use print_additional_summary instead of calling |
267 |
|
print_garbage_information directly |
268 |
|
|
269 |
|
2003-06-19 Bernhard Herzog <[email protected]> |
270 |
|
|
271 |
|
* Doc/thuban.dtd (classification): Correct the content model of |
272 |
|
the classification element. |
273 |
|
(projection): Add the "name" attribute |
274 |
|
|
275 |
|
2003-06-19 Frank Koormann <[email protected]> |
276 |
|
|
277 |
|
MERGE from the greater-ms3 branch. |
278 |
|
|
279 |
|
* Thuban/UI/scalebar.py (ScaleBar.DrawScaleBar): Apply conversion to |
280 |
|
scale if projection is latlong to get better estimate. |
281 |
|
|
282 |
|
Fix problem of hidden properties dialog under windows after double |
283 |
|
click on layer tree: |
284 |
|
The tree control always gets an Expanded / Collapsed event after |
285 |
|
the ItemActivated on double click, which raises the main window again. We add a second ItemActivated event to the queue, which simply |
286 |
|
raises the already displayed window. |
287 |
|
|
288 |
|
* Thuban/UI/legend.py (LegendTree.__init__): Instance variable |
289 |
|
raiseProperties initialized to prevent endless loops |
290 |
|
(LegendTree._OnItemActivated): Depending on self.raiseProperties |
291 |
|
simply raise the properties or open the dialog and issue a second |
292 |
|
event. |
293 |
|
|
294 |
|
2003-06-18 Jonathan Coles <[email protected]> |
295 |
|
|
296 |
|
* setup.py: Fix a few problems that occured under Windows. |
297 |
|
|
298 |
2003-06-18 Jonathan Coles <[email protected]> |
2003-06-18 Jonathan Coles <[email protected]> |
299 |
|
|
300 |
When Thuban loaded the map was redrawn twice because the |
When Thuban loaded the map was redrawn twice because the |