1 |
|
2003-04-25 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/proj.py (Projection): Removed Set*() methods to make |
4 |
|
Projection an immutable item. Fixes RTbug #1825. |
5 |
|
(Projection.__init__): Initialize instance variables here. |
6 |
|
(ProjFile.Replace): New. Replace the given projection object with |
7 |
|
the new projection object. This solves the problem of needing the |
8 |
|
mutator Projection.SetProjection() in the ProjFrame class and |
9 |
|
allows a projection to change parameters without changing its |
10 |
|
location in the file. |
11 |
|
|
12 |
|
* Thuban/UI/mainwindow.py (MainWindow.SaveSessionAs): Dialog should |
13 |
|
be of type wxSAVE and should verify overwriting a file. |
14 |
|
|
15 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSave): Use the new |
16 |
|
ProjFile.Replace() method instead of the mutator |
17 |
|
Projection.SetProjection(). Also requires that we reassign the |
18 |
|
client data to the new projection. |
19 |
|
|
20 |
|
* test/test_proj.py (TestProjection.test): Test GetName() and |
21 |
|
GetAllParameters() |
22 |
|
(TestProjFile.test): Remove tests for Set*() methods. Add tests |
23 |
|
for Replace(). |
24 |
|
|
25 |
|
2003-04-25 Jonathan Coles <[email protected]> |
26 |
|
|
27 |
|
* Thuban/Model/save.py (SessionSaver.write_projection): Make sure |
28 |
|
to save the name of the projection. |
29 |
|
|
30 |
|
* test/test_save.py (SaveSessionTest.testLayerProjection): New |
31 |
|
test to verify layer projections are saved correctly. |
32 |
|
|
33 |
|
2003-04-25 Jonathan Coles <[email protected]> |
34 |
|
|
35 |
|
* Thuban/Model/proj.py (Projection.SetName): Set the name |
36 |
|
to "Unknown" if name is None. |
37 |
|
(Projection.SetAllParameters): New. Set the projection's |
38 |
|
parameter list to the one supplied. |
39 |
|
(Projection.SetProjection): New. Set the projection's |
40 |
|
properties to those of the supplied Projection. |
41 |
|
|
42 |
|
* Thuban/UI/mainwindow.py (MainWindow.MapProjection): Set |
43 |
|
the dialog title to include the map's title. |
44 |
|
(MainWindow.LayerProjection): Set the dialog title to include |
45 |
|
the layer's title. |
46 |
|
|
47 |
|
* Thuban/UI/projdialog.py (ProjFrame.__ShowError): Consolidate |
48 |
|
error dialogs into a single method call. |
49 |
|
(ProjFrame.__VerifyButtons): Add more states to check. |
50 |
|
(ProjFrame.__GetProjection): Return the current state of an |
51 |
|
edited projection or None. |
52 |
|
(ProjFrame.__FillAvailList): Remove checks for states that |
53 |
|
shouldn't exist. |
54 |
|
(ProjFrame._OnNew): Clear all selected items and supply |
55 |
|
a projection panel if necessary. |
56 |
|
|
57 |
|
* test/test_proj.py (TestProjFile.test): Add tests for |
58 |
|
ProjFile.SetAllParameters, ProjFile.SetProjection, |
59 |
|
ProjFile.SetName. |
60 |
|
|
61 |
|
2003-04-25 Jonathan Coles <[email protected]> |
62 |
|
|
63 |
|
* Thuban/UI/projdialog.py (ProjFrame.__FillAvailList): Now |
64 |
|
takes an optional argument to select the current projection. |
65 |
|
This does not guarantee that the item is visible due to |
66 |
|
limited wxWindows functionality. Fixes RTBug #1821. |
67 |
|
|
68 |
|
2003-04-25 Jonathan Coles <[email protected]> |
69 |
|
|
70 |
|
* Thuban/Model/load.py (SessionLoader.start_projection): Remember |
71 |
|
the projection name and use it when constructing the Projection |
72 |
|
object. |
73 |
|
|
74 |
|
* Thuban/Model/proj.py (Projection.__init__): Change the default |
75 |
|
value for 'name' to None and then test if name is equal to None |
76 |
|
in the body of the constructor. This way the caller doesn't have to |
77 |
|
know what the default value should be. Namely, useful in load.py |
78 |
|
where we have to pick a default value if the 'name' parameter |
79 |
|
doesn't exist in the XML file. |
80 |
|
|
81 |
|
* test/test_load.py (LoadSessionTest.testLayerProjection): New. |
82 |
|
Tests a file where a layer has a projection. |
83 |
|
|
84 |
|
2003-04-25 Jonathan Coles <[email protected]> |
85 |
|
|
86 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
87 |
|
tree for projection information. |
88 |
|
|
89 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
90 |
|
XMLReader.GetFileName. |
91 |
|
(SessionLoader): Added support for loading projection tags that |
92 |
|
appear inside a layer. |
93 |
|
|
94 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
95 |
|
back to using a list because the order of the projections in |
96 |
|
the file is important to maintain. Fixes RTbug #1817. |
97 |
|
|
98 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
99 |
|
to ProjFile.GetFilename. |
100 |
|
|
101 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
102 |
|
information. |
103 |
|
|
104 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
105 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
106 |
|
implementation. |
107 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
108 |
|
projection to a single file. |
109 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
110 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
111 |
|
|
112 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
113 |
|
class. |
114 |
|
|
115 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
116 |
|
|
117 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
118 |
|
|
119 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
120 |
|
|
121 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
122 |
|
empty strings. |
123 |
|
|
124 |
|
2003-04-24 Jonathan Coles <[email protected]> |
125 |
|
|
126 |
|
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
127 |
|
implement the interface that the ProjFrame dialog expects. |
128 |
|
|
129 |
|
* Thuban/Model/proj.py (Projection.SetName): New. Allows the |
130 |
|
name of the projection to be changed. |
131 |
|
(ProjFile): Use a dictionary instead of a list so that removing |
132 |
|
projections is easier and we are sure about uniqueness. |
133 |
|
(ProjFile.Remove): Remove the given projection object. |
134 |
|
|
135 |
|
* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): |
136 |
|
Return a list with only one projection file instead of searching for |
137 |
|
any projection file. This simplifies many things if the user can |
138 |
|
only have one system file and one user file. |
139 |
|
|
140 |
|
* Thuban/UI/classgen.py: Change all references to |
141 |
|
genCombo to genChoice. |
142 |
|
|
143 |
|
* Thuban/UI/mainwindow.py: Add a Projection option under the |
144 |
|
layer menu. |
145 |
|
(MainWindow.LayerProjection): New. Open up a projection window |
146 |
|
for a layer. |
147 |
|
|
148 |
|
* Thuban/UI/projdialog.py: Large changes to how the dialog is |
149 |
|
laid out. Use three panels instead of one. One for the list of |
150 |
|
projections, one for the edit controls, and one for the buttons. |
151 |
|
Fixed resizing problems so that the dialog resizes correctly |
152 |
|
when the projection panel changes. Added import/export, save, and |
153 |
|
new buttons/functionality. |
154 |
|
|
155 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
156 |
|
|
157 |
|
First step towards table management. Introduce a simple data |
158 |
|
abstraction so that we replace the data a layer uses more easily |
159 |
|
in the next step. |
160 |
|
|
161 |
|
* Thuban/Model/data.py: New file with a simple data abstraction |
162 |
|
that bundles shapefile and dbffile into one object. |
163 |
|
|
164 |
|
* Thuban/Model/session.py (Session.OpenShapefile): New method to |
165 |
|
open shapefiles and return a shape store object |
166 |
|
|
167 |
|
* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store |
168 |
|
object instead of a shapefile filename. This introduces a new |
169 |
|
instance variable store holding the datastore. For intermediate |
170 |
|
backwards compatibility keep the old instance variables. |
171 |
|
(open_shapefile): Removed. No longer needed with the shape store. |
172 |
|
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and |
173 |
|
get the shape store used by a layer. |
174 |
|
(Layer.Destroy): No need to explicitly destroy the shapefile or |
175 |
|
table anymore. |
176 |
|
|
177 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer) |
178 |
|
(MainWindow.AddLayer): Use the session's OpenShapefile method to |
179 |
|
open shapefiles |
180 |
|
|
181 |
|
* Thuban/Model/load.py (ProcessSession.start_layer): Use the |
182 |
|
session's OpenShapefile method to open shapefiles |
183 |
|
|
184 |
|
* test/test_classification.py |
185 |
|
(TestClassification.test_classification): Use the session's |
186 |
|
OpenShapefile method to open shapefiles and build the filename in |
187 |
|
a more platform independed way |
188 |
|
|
189 |
|
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): |
190 |
|
Implement to have a session to use in the tests |
191 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
192 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the |
193 |
|
session's OpenShapefile method to open shapefiles |
194 |
|
(TestLayerLegend.setUp): Instantiate a session so that we can use |
195 |
|
it to open shapefiles. |
196 |
|
(TestLayerLegend.tearDown): Make sure that all references to |
197 |
|
layers and session are removed otherwise we may get a resource |
198 |
|
leak |
199 |
|
|
200 |
|
* test/test_map.py (TestMapAddLayer.test_add_layer) |
201 |
|
(TestMapWithContents.setUp): Instantiate a session so that we can |
202 |
|
use it to open shapefiles. |
203 |
|
(TestMapWithContents.tearDown): Make sure that all references to |
204 |
|
layers, maps and sessions are removed otherwise we may get a |
205 |
|
resource leak |
206 |
|
("__main__"): use support.run_tests() so that more info about |
207 |
|
uncollected garbage is printed |
208 |
|
|
209 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Use the |
210 |
|
session's OpenShapefile method to open shapefiles |
211 |
|
("__main__"): use support.run_tests() so that more info about |
212 |
|
uncollected garbage is printed |
213 |
|
|
214 |
|
* test/test_selection.py (TestSelection.tearDown): Make sure that |
215 |
|
all references to the session and the selection are removed |
216 |
|
otherwise we may get a resource leak |
217 |
|
(TestSelection.get_layer): Instantiate a session so that we can |
218 |
|
use it to open shapefiles. |
219 |
|
("__main__"): use support.run_tests() so that more info about |
220 |
|
uncollected garbage is printed |
221 |
|
|
222 |
|
* test/test_session.py (TestSessionBase.tearDown) |
223 |
|
(TestSessionWithContent.tearDown): Make sure that all references |
224 |
|
to the session and layers are removed otherwise we may get a |
225 |
|
resource leak |
226 |
|
(TestSessionWithContent.setUp): Use the session's OpenShapefile |
227 |
|
method to open shapefiles |
228 |
|
|
229 |
|
2003-04-24 Jonathan Coles <[email protected]> |
230 |
|
|
231 |
|
* Thuban/Model/load.py (XMLReader.read): Should have been checking |
232 |
|
if the file_or_filename object had the 'read' attribute. |
233 |
|
|
234 |
2003-04-23 Jonathan Coles <[email protected]> |
2003-04-23 Jonathan Coles <[email protected]> |
235 |
|
|
236 |
* Thuban/Model/resource.py: Fixes RTbug #1813. |
* Thuban/Model/resource.py: Fixes RTbug #1813. |