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