1 |
|
2003-04-30 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
* Data/iceland_sample.thuban: Now contains correct projections |
4 |
|
for each of the layers. |
5 |
|
|
6 |
|
* Resources/Projections/defaults.proj: Geographic projection |
7 |
|
contains unit conversion parameter. |
8 |
|
|
9 |
|
2003-04-30 Jonathan Coles <[email protected]> |
10 |
|
|
11 |
|
The most important part of this putback is the projection changes. |
12 |
|
It should now be possible to specify the projection that a layer |
13 |
|
is in and then specify a different projection for the map. The |
14 |
|
projection dialog has an extra parameter for a geographic projection |
15 |
|
which lets the user select if the input is in degrees or radians. |
16 |
|
|
17 |
|
* Thuban/Model/layer.py (Layer.ShapesInRegion): Fix docstring |
18 |
|
to say that the parameter is a tuple of unprojected |
19 |
|
points (which is what the callers to this method were assuming). |
20 |
|
Also, since the points are unprojected we need to projected them. |
21 |
|
|
22 |
|
* Thuban/UI/legend.py (LegendTree.MoveCurrentItemUp, |
23 |
|
LegendTree.MoveCurrentItemDown): If the layer or any of the layer's |
24 |
|
groups are selected, move the layer up/down. Fixes RTbug #1833. |
25 |
|
|
26 |
|
* Thuban/UI/mainwindow.py: Move menu item map_rename up. |
27 |
|
|
28 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Add missing |
29 |
|
parameter in call to SetClientData. |
30 |
|
(GeoPanel): Add support for selecting the units that the |
31 |
|
source data is in (Radians or Degrees). |
32 |
|
|
33 |
|
* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Optimize |
34 |
|
the rendering loop by reducing the number of if's, removing the |
35 |
|
unnecessary try/except block, and checking if the old group |
36 |
|
is the same as the new one (which happens a lot if there is |
37 |
|
no classification, or lots of shapes are in the same group). |
38 |
|
|
39 |
|
* Thuban/UI/view.py (MapCanvas.OnPaint): Add a try/except block |
40 |
|
around the redraw routine to try to catch problems that the user |
41 |
|
may create by selecting invalid projections for the data set and |
42 |
|
map. Clears the display if there are any problems and prints the |
43 |
|
error. |
44 |
|
(MapCanvas.do_redraw): Use DC.Clear() instead of drawing a filled |
45 |
|
rectangle. |
46 |
|
|
47 |
|
* extensions/thuban/wxproj.cpp (project_point): First invert the |
48 |
|
supplied point (which should be in projected coordinates) using |
49 |
|
the layer's projection and then project the point using the |
50 |
|
map's projection. |
51 |
|
(project_points): Use project_point() to project each point. |
52 |
|
|
53 |
|
2003-04-30 Jan-Oliver Wagner <[email protected]> |
54 |
|
|
55 |
|
* Thuban/Model/layer.py (Layer.SetShapeStore): Fixed a bug: |
56 |
|
don't set the Classification to None if the classfication field |
57 |
|
is None (ie only a DEFAULT). |
58 |
|
|
59 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
60 |
|
|
61 |
|
* Thuban/UI/view.py: Fix some typos. |
62 |
|
|
63 |
|
* Thuban/UI/mainwindow.py (MainWindow.identify_view_on_demand): Do |
64 |
|
not pop up the dialog if the selection becomes empty (this could |
65 |
|
happen if e.g. a new selection is opened while the identify tool |
66 |
|
is active and dialog had been closed) |
67 |
|
|
68 |
|
2003-04-30 Bernhard Herzog <[email protected]> |
69 |
|
|
70 |
|
* Thuban/Model/transientdb.py (TransientTableBase.__init__): New |
71 |
|
instance variable read_record_last_result |
72 |
|
(TransientTableBase.read_record): Make sure reading the same |
73 |
|
record twice works. The implementation uses the new instance |
74 |
|
variable read_record_last_result |
75 |
|
|
76 |
|
* test/test_transientdb.py |
77 |
|
(TestTransientTable.test_transient_table_read_twice): New test |
78 |
|
case for the above bug-fix. |
79 |
|
|
80 |
|
2003-04-29 Jonathan Coles <[email protected]> |
81 |
|
|
82 |
|
* Thuban/common.py: Removed. No longer needed Str2Num. RTbug #1832. |
83 |
|
|
84 |
|
* Thuban/UI/classgen.py: Remove all uses of Str2Num. |
85 |
|
|
86 |
|
* Thuban/UI/classifier.py: Remove all uses of Str2Num. |
87 |
|
(ClassTable.SetValueAsCustom): Rename keyword argument in |
88 |
|
ClassGroup* constructors to match argument name. |
89 |
|
|
90 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
91 |
|
|
92 |
|
* Thuban/Model/session.py (Session.Destroy): Explicitly close the |
93 |
|
transient DB if it exists to make sure it doesn't leave a journal |
94 |
|
file in the temp directory. |
95 |
|
|
96 |
|
* Thuban/Model/transientdb.py (TransientDatabase.close): Set |
97 |
|
self.conn to None after closing the connection to make sure it's |
98 |
|
not closed twice |
99 |
|
|
100 |
|
2003-04-29 Jonathan Coles <[email protected]> |
101 |
|
|
102 |
|
Add a visible parameter in the layer XML tag. The default value is |
103 |
|
"true". If anything other than "false" is specified we also assume |
104 |
|
"true". Addresses RTbug #1025. |
105 |
|
|
106 |
|
* Doc/thuban.dtd: Add visible parameter to a layer. |
107 |
|
|
108 |
|
* Thuban/Model/layer.py (BaseLayer.__init__): Change default value |
109 |
|
of visible from 1 to True. |
110 |
|
(Layer.__init__): Change default value of visible from 1 to True. |
111 |
|
|
112 |
|
* Thuban/Model/load.py (SessionLoader.start_layer): Read visible |
113 |
|
parameter. |
114 |
|
|
115 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save visible |
116 |
|
parameter. |
117 |
|
|
118 |
|
* test/test_load.py: Add new test data contents_test_visible. |
119 |
|
(LoadSessionTest.setUp): save test data. |
120 |
|
(LoadSessionTest.testLayerVisibility): Test if the visible flag |
121 |
|
is loaded correctly. |
122 |
|
|
123 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Add test |
124 |
|
for saving an invisible layer. |
125 |
|
|
126 |
|
2003-04-29 Jonathan Coles <[email protected]> |
127 |
|
|
128 |
|
* Thuban/UI/mainwindow.py (MainWindow.SetMap): Look up the |
129 |
|
legend dialog box and tell it to change its map to the one |
130 |
|
supplied to SetMap(). Fixes RTbug #1770. |
131 |
|
|
132 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
133 |
|
|
134 |
|
Next step of table implementation. Introduce a transient database |
135 |
|
using SQLite that some of the data is copied to on demand. This |
136 |
|
allows us to do joins and other operations that require an index |
137 |
|
for good performance with reasonable efficiency. Thuban now needs |
138 |
|
SQLite 2.8.0 and pysqlite 0.4.1. Older versions may work but I |
139 |
|
haven't tested that. |
140 |
|
|
141 |
|
* Thuban/Model/transientdb.py: New. Transient database |
142 |
|
implementation. |
143 |
|
|
144 |
|
* test/test_transientdb.py: New. Tests for the transient DB |
145 |
|
classes. |
146 |
|
|
147 |
|
* Thuban/Model/session.py (AutoRemoveFile, AutoRemoveDir): New |
148 |
|
classes to help automatically remove temporary files and |
149 |
|
directories. |
150 |
|
(Session.__init__): New instance variables temp_dir for the |
151 |
|
temporary directory and transient_db for the SQLite database |
152 |
|
(Session.temp_directory): New. Create a temporary directory if not |
153 |
|
yet done and return its name. Use AutoRemoveDir to have it |
154 |
|
automatically deleted |
155 |
|
(Session.TransientDB): Instantiate the transient database if not |
156 |
|
done yet and return it. |
157 |
|
|
158 |
|
* Thuban/Model/data.py (ShapefileStore.__init__): Use an |
159 |
|
AutoTransientTable so that data is copied to the transient DB on |
160 |
|
demand. |
161 |
|
(SimpleStore): New class that simply combines a table and a |
162 |
|
shapefile |
163 |
|
|
164 |
|
* Thuban/Model/table.py (Table, DBFTable): Rename Table into |
165 |
|
DBFTable and update its doc-string to reflect the fact that this |
166 |
|
is only the table interface to a DBF file. Table is now an alias |
167 |
|
for DBFTable for temporary backwards compatibility. |
168 |
|
|
169 |
|
* Thuban/UI/application.py (ThubanApplication.OnExit): Make sure |
170 |
|
the last reference to the session goes away so that the temporary |
171 |
|
files are removed properly. |
172 |
|
|
173 |
|
* test/test_load.py (LoadSessionTest.tearDown): Remove the |
174 |
|
reference to the session to make sure the temporary files are |
175 |
|
removed. |
176 |
|
|
177 |
|
2003-04-29 Bernhard Herzog <[email protected]> |
178 |
|
|
179 |
|
* Thuban/Model/load.py (XMLReader.__init__, XMLReader.read): Turn |
180 |
|
the __parser instance variable into a normal local variable in |
181 |
|
read. It's only used there and read will never be called more than |
182 |
|
once. Plus it introduces a reference cycle that keeps can keep the |
183 |
|
session object alive for a long time. |
184 |
|
|
185 |
|
2003-04-29 Jonathan Coles <[email protected]> |
186 |
|
|
187 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
188 |
|
Projection an immutable item. Fixes RTbug #1825. |
189 |
|
(Projection.__init__): Initialize instance variables here. |
190 |
|
(ProjFile.Replace): New. Replace the given projection object with |
191 |
|
the new projection object. This solves the problem of needing the |
192 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
193 |
|
allows a projection to change parameters without changing its |
194 |
|
location in the file. |
195 |
|
|
196 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
197 |
|
be of type wxSAVE and should verify overwriting a file. |
198 |
|
|
199 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
200 |
|
ProjFile.Replace() method instead of the mutator |
201 |
|
Projection.SetProjection(). Also requires that we reassign the |
202 |
|
client data to the new projection. |
203 |
|
|
204 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
205 |
|
GetAllParameters() |
206 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
207 |
|
for Replace(). |
208 |
|
|
209 |
|
2003-04-25 Jonathan Coles <[email protected]> |
210 |
|
|
211 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
212 |
|
to save the name of the projection. |
213 |
|
|
214 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
215 |
|
test to verify layer projections are saved correctly. |
216 |
|
|
217 |
|
2003-04-25 Jonathan Coles <[email protected]> |
218 |
|
|
219 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
220 |
|
to "Unknown" if name is None. |
221 |
|
(Projection.SetAllParameters): New. Set the projection's |
222 |
|
parameter list to the one supplied. |
223 |
|
(Projection.SetProjection): New. Set the projection's |
224 |
|
properties to those of the supplied Projection. |
225 |
|
|
226 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
227 |
|
the dialog title to include the map's title. |
228 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
229 |
|
the layer's title. |
230 |
|
|
231 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
232 |
|
error dialogs into a single method call. |
233 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
234 |
|
(ProjFrame.__GetProjection): Return the current state of an |
235 |
|
edited projection or None. |
236 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
237 |
|
shouldn't exist. |
238 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
239 |
|
a projection panel if necessary. |
240 |
|
|
241 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
242 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
243 |
|
ProjFile.SetName. |
244 |
|
|
245 |
2003-04-25 Jonathan Coles <[email protected]> |
2003-04-25 Jonathan Coles <[email protected]> |
246 |
|
|
247 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
248 |
|
takes an optional argument to select the current projection. |
249 |
|
This does not guarantee that the item is visible due to |
250 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
251 |
|
|
252 |
|
2003-04-25 Jonathan Coles <[email protected]> |
253 |
|
|
254 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
255 |
|
the projection name and use it when constructing the Projection |
256 |
|
object. |
257 |
|
|
258 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
259 |
|
value for 'name' to None and then test if name is equal to None |
260 |
|
in the body of the constructor. This way the caller doesn't have to |
261 |
|
know what the default value should be. Namely, useful in load.py |
262 |
|
where we have to pick a default value if the 'name' parameter |
263 |
|
doesn't exist in the XML file. |
264 |
|
|
265 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
266 |
|
Tests a file where a layer has a projection. |
267 |
|
|
268 |
|
2003-04-25 Jonathan Coles <[email protected]> |
269 |
|
|
270 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
271 |
|
tree for projection information. |
272 |
|
|
273 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
274 |
|
XMLReader.GetFileName. |
275 |
|
(SessionLoader): Added support for loading projection tags that |
276 |
|
appear inside a layer. |
277 |
|
|
278 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
279 |
|
back to using a list because the order of the projections in |
280 |
|
the file is important to maintain. Fixes RTbug #1817. |
281 |
|
|
282 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
283 |
|
to ProjFile.GetFilename. |
284 |
|
|
285 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
286 |
|
information. |
287 |
|
|
288 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
289 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
290 |
|
implementation. |
291 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
292 |
|
projection to a single file. |
293 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
294 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
295 |
|
|
296 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
297 |
|
class. |
298 |
|
|
299 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
300 |
|
|
301 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
302 |
|
|
303 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
304 |
|
|
305 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
306 |
|
empty strings. |
307 |
|
|
308 |
|
2003-04-24 Jonathan Coles <[email protected]> |
309 |
|
|
310 |
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
311 |
implement the interface that the ProjFrame dialog expects. |
implement the interface that the ProjFrame dialog expects. |
312 |
|
|