1 |
|
2003-04-25 Jonathan Coles <[email protected]> |
2 |
|
|
3 |
|
* Thuban/Model/layer.py (Layer.TreeInfo): Add an item to the |
4 |
|
tree for projection information. |
5 |
|
|
6 |
|
* Thuban/Model/load.py (XMLReader.GetFilename): Renamed from |
7 |
|
XMLReader.GetFileName. |
8 |
|
(SessionLoader): Added support for loading projection tags that |
9 |
|
appear inside a layer. |
10 |
|
|
11 |
|
* Thuban/Model/proj.py (ProjFile): Document the class. Move |
12 |
|
back to using a list because the order of the projections in |
13 |
|
the file is important to maintain. Fixes RTbug #1817. |
14 |
|
|
15 |
|
* Thuban/Model/resource.py: Rename calls to ProjFile.GetFileName |
16 |
|
to ProjFile.GetFilename. |
17 |
|
|
18 |
|
* Thuban/Model/save.py (SessionSaver.write_layer): Save projection |
19 |
|
information. |
20 |
|
|
21 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnAddToList): Renamed from |
22 |
|
ProjFrame._OnSaveAs. Removed old dead code from previous |
23 |
|
implementation. |
24 |
|
(ProjFrame._OnExport): Add support for exporting more than one |
25 |
|
projection to a single file. |
26 |
|
(ProjFrame.__FillAvailList): use string formatting (% operator) |
27 |
|
to build strings that are (partly) translated. Fixes RTbug #1818. |
28 |
|
|
29 |
|
* test/test_proj.py (TestProjFile.test): New. Tests the base ProjFile |
30 |
|
class. |
31 |
|
|
32 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
33 |
|
|
34 |
|
* po/es.po: Updated Spanish translation by Daniel Calvelo Aros |
35 |
|
|
36 |
|
* po/fr.po: New. French translation by Daniel Calvelo Aros |
37 |
|
|
38 |
|
* Thuban/UI/projdialog.py (ProjFrame._OnSaveAs): Don't translate |
39 |
|
empty strings. |
40 |
|
|
41 |
|
2003-04-24 Jonathan Coles <[email protected]> |
42 |
|
|
43 |
|
* Thuban/Model/layer.py (Layer.GetProjection): New. Needed to |
44 |
|
implement the interface that the ProjFrame dialog expects. |
45 |
|
|
46 |
|
* Thuban/Model/proj.py (Projection.SetName): New. Allows the |
47 |
|
name of the projection to be changed. |
48 |
|
(ProjFile): Use a dictionary instead of a list so that removing |
49 |
|
projections is easier and we are sure about uniqueness. |
50 |
|
(ProjFile.Remove): Remove the given projection object. |
51 |
|
|
52 |
|
* Thuban/Model/resource.py (GetSystemProjFiles, GetUserProjFiles): |
53 |
|
Return a list with only one projection file instead of searching for |
54 |
|
any projection file. This simplifies many things if the user can |
55 |
|
only have one system file and one user file. |
56 |
|
|
57 |
|
* Thuban/UI/classgen.py: Change all references to |
58 |
|
genCombo to genChoice. |
59 |
|
|
60 |
|
* Thuban/UI/mainwindow.py: Add a Projection option under the |
61 |
|
layer menu. |
62 |
|
(MainWindow.LayerProjection): New. Open up a projection window |
63 |
|
for a layer. |
64 |
|
|
65 |
|
* Thuban/UI/projdialog.py: Large changes to how the dialog is |
66 |
|
laid out. Use three panels instead of one. One for the list of |
67 |
|
projections, one for the edit controls, and one for the buttons. |
68 |
|
Fixed resizing problems so that the dialog resizes correctly |
69 |
|
when the projection panel changes. Added import/export, save, and |
70 |
|
new buttons/functionality. |
71 |
|
|
72 |
|
2003-04-24 Bernhard Herzog <[email protected]> |
73 |
|
|
74 |
|
First step towards table management. Introduce a simple data |
75 |
|
abstraction so that we replace the data a layer uses more easily |
76 |
|
in the next step. |
77 |
|
|
78 |
|
* Thuban/Model/data.py: New file with a simple data abstraction |
79 |
|
that bundles shapefile and dbffile into one object. |
80 |
|
|
81 |
|
* Thuban/Model/session.py (Session.OpenShapefile): New method to |
82 |
|
open shapefiles and return a shape store object |
83 |
|
|
84 |
|
* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store |
85 |
|
object instead of a shapefile filename. This introduces a new |
86 |
|
instance variable store holding the datastore. For intermediate |
87 |
|
backwards compatibility keep the old instance variables. |
88 |
|
(open_shapefile): Removed. No longer needed with the shape store. |
89 |
|
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and |
90 |
|
get the shape store used by a layer. |
91 |
|
(Layer.Destroy): No need to explicitly destroy the shapefile or |
92 |
|
table anymore. |
93 |
|
|
94 |
|
* Thuban/UI/mainwindow.py (MainWindow.AddLayer) |
95 |
|
(MainWindow.AddLayer): Use the session's OpenShapefile method to |
96 |
|
open shapefiles |
97 |
|
|
98 |
|
* Thuban/Model/load.py (ProcessSession.start_layer): Use the |
99 |
|
session's OpenShapefile method to open shapefiles |
100 |
|
|
101 |
|
* test/test_classification.py |
102 |
|
(TestClassification.test_classification): Use the session's |
103 |
|
OpenShapefile method to open shapefiles and build the filename in |
104 |
|
a more platform independed way |
105 |
|
|
106 |
|
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown): |
107 |
|
Implement to have a session to use in the tests |
108 |
|
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer) |
109 |
|
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the |
110 |
|
session's OpenShapefile method to open shapefiles |
111 |
|
(TestLayerLegend.setUp): Instantiate a session so that we can use |
112 |
|
it to open shapefiles. |
113 |
|
(TestLayerLegend.tearDown): Make sure that all references to |
114 |
|
layers and session are removed otherwise we may get a resource |
115 |
|
leak |
116 |
|
|
117 |
|
* test/test_map.py (TestMapAddLayer.test_add_layer) |
118 |
|
(TestMapWithContents.setUp): Instantiate a session so that we can |
119 |
|
use it to open shapefiles. |
120 |
|
(TestMapWithContents.tearDown): Make sure that all references to |
121 |
|
layers, maps and sessions are removed otherwise we may get a |
122 |
|
resource leak |
123 |
|
("__main__"): use support.run_tests() so that more info about |
124 |
|
uncollected garbage is printed |
125 |
|
|
126 |
|
* test/test_save.py (SaveSessionTest.testSingleLayer): Use the |
127 |
|
session's OpenShapefile method to open shapefiles |
128 |
|
("__main__"): use support.run_tests() so that more info about |
129 |
|
uncollected garbage is printed |
130 |
|
|
131 |
|
* test/test_selection.py (TestSelection.tearDown): Make sure that |
132 |
|
all references to the session and the selection are removed |
133 |
|
otherwise we may get a resource leak |
134 |
|
(TestSelection.get_layer): Instantiate a session so that we can |
135 |
|
use it to open shapefiles. |
136 |
|
("__main__"): use support.run_tests() so that more info about |
137 |
|
uncollected garbage is printed |
138 |
|
|
139 |
|
* test/test_session.py (TestSessionBase.tearDown) |
140 |
|
(TestSessionWithContent.tearDown): Make sure that all references |
141 |
|
to the session and layers are removed otherwise we may get a |
142 |
|
resource leak |
143 |
|
(TestSessionWithContent.setUp): Use the session's OpenShapefile |
144 |
|
method to open shapefiles |
145 |
|
|
146 |
|
2003-04-24 Jonathan Coles <[email protected]> |
147 |
|
|
148 |
|
* Thuban/Model/load.py (XMLReader.read): Should have been checking |
149 |
|
if the file_or_filename object had the 'read' attribute. |
150 |
|
|
151 |
|
2003-04-23 Jonathan Coles <[email protected]> |
152 |
|
|
153 |
|
* Thuban/Model/resource.py: Fixes RTbug #1813. |
154 |
|
(ReadProjFile): Add documentation about which exceptions are raised. |
155 |
|
Always pass the exceptions up to the caller. |
156 |
|
(GetProjFiles): If the directory can't be read return an empty list. |
157 |
|
If any of the proj files can't be read skip that file and go |
158 |
|
on to the next one. |
159 |
|
|
160 |
|
* test/test_proj.py: Added test cases to handle nonexistent files, |
161 |
|
unreadable files, and files that don't parse correctly. |
162 |
|
|
163 |
|
2003-04-23 Jonathan Coles <[email protected]> |
164 |
|
|
165 |
|
Projection dialog. Allows the user to select from a list |
166 |
|
of projection templates and optionally edit them and save new ones. |
167 |
|
|
168 |
|
* Thuban/UI/projdialog.py (ProjFrame): New. Main dialog. |
169 |
|
(ProjPanel): Base class for projection specific panels. |
170 |
|
(TMPanel): Projection panel for Transverse Mercartor. |
171 |
|
(UTMPanel): Projection panel for Universal Transverse Mercartor. |
172 |
|
(LCCPanel): Projection panel for Lambert Conic Conformal. |
173 |
|
(GeoPanel): Projetion panel for Geographic Projection. |
174 |
|
|
175 |
|
2003-04-23 Jonathan Coles <[email protected]> |
176 |
|
|
177 |
|
* Thuban/Model/load.py (XMLReader): Renamed from XMLProcessor to |
178 |
|
promote symmetry. There now exists XMLReader and XMLWriter. |
179 |
|
(XMLReader.read): New. Call to read the given file descriptor or |
180 |
|
filename. |
181 |
|
(XMLReader.close): New. Make sure the file is closed. |
182 |
|
(XMLReader.GetFileName): New. Return just the file name that is being |
183 |
|
read from. |
184 |
|
(XMLReader.GetDirectory): New. Return just the directory of the file |
185 |
|
that is being read. |
186 |
|
(XMLReader.AddDispatchers): New. Take a dictionary which contains |
187 |
|
the names of functions to call as the XML tree is parsed. |
188 |
|
(XMLReader.startElementNS): Updated to use new dispatcher dictionary. |
189 |
|
(XMLReader.endElementNS): Updated to use new dispatcher dictionary. |
190 |
|
(SessionLoader): Removed class variables start_dispatcher and |
191 |
|
end_dispatcher since this functionality is now part of a class |
192 |
|
instance. Fixes RTbug #1808. |
193 |
|
(SessionLoader.__init__): Add dispatcher functions. |
194 |
|
(load_xmlfile): Code was moved into the XMLReader.read(). |
195 |
|
(load_session): Use modified SessionLoader. |
196 |
|
|
197 |
|
* Thuban/Model/map.py (Map.GetProjection): New. Returns the |
198 |
|
map's projection. |
199 |
|
|
200 |
|
* Thuban/Model/proj.py (Projection.GetParameters): Renamed to |
201 |
|
GetAllParameters. |
202 |
|
(Projection.GetParameter): Returns the value for the given parameter. |
203 |
|
|
204 |
|
* Thuban/Model/resource.py: Use XMLReader and XMLWriter. |
205 |
|
(GetProjFiles): Renamed from GetProjections. Now returns a list |
206 |
|
of ProjFile objects. |
207 |
|
(GetSystemProjFiles): Renamed from GetSuppliedProjections. Returns |
208 |
|
a list of ProjFile objects whose files are not user defined. |
209 |
|
(GetUserProjFiles): Renamed from GetUserProjections. Returns a |
210 |
|
list of ProjFile objects whose files are user defined. |
211 |
|
(ProjFileReader): Extend new XMLReader. |
212 |
|
|
213 |
|
* Thuban/Model/save.py (XMLWriter): Renamed from XMLSaver to |
214 |
|
promote symmetry. |
215 |
|
|
216 |
|
* Thuban/UI/classgen.py (ClassGenDialog.__init__): Use a wxChoice |
217 |
|
control instead of a wxComboBox. wxChoice controls do not generate |
218 |
|
events as the uses highlights possible choices which fixes problems |
219 |
|
with resizing the dialog when the use selects an option. |
220 |
|
|
221 |
|
* Thuban/UI/classifier.py (Classifier.__init__): Use a wxChoice |
222 |
|
control instead of a wxComboBox. |
223 |
|
|
224 |
|
* Thuban/UI/mainwindow.py (MainWindow.Projection): Use new projection |
225 |
|
dialog. |
226 |
|
|
227 |
|
* test/test_proj.py (TestProjection.test): New tests for GetParameter |
228 |
|
method. |
229 |
|
|
230 |
|
2003-04-22 Bernhard Herzog <[email protected]> |
231 |
|
|
232 |
|
* Thuban/UI/mainwindow.py: Remove some unused imports and global |
233 |
|
constants |
234 |
|
|
235 |
|
* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape) |
236 |
|
(IdentifyGridCtrl.selected_shape): Use table, not shapetable. |
237 |
|
|
238 |
2003-04-17 Bernhard Herzog <[email protected]> |
2003-04-17 Bernhard Herzog <[email protected]> |
239 |
|
|
240 |
|
* Thuban/Model/layer.py: Don't import LAYER_LEGEND_CHANGED. |
241 |
|
(Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used |
242 |
|
anymore. |
243 |
|
(Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes) |
244 |
|
(Layer.ShapeType, Layer.Shape): No need to call |
245 |
|
self.open_shapefile since it's always called in __init__ |
246 |
|
|
247 |
* Thuban/UI/application.py (ThubanApplication.MainLoop): Removed. |
* Thuban/UI/application.py (ThubanApplication.MainLoop): Removed. |
248 |
In wxPython 2.4 there's no need to extend MainLoop anymore since |
In wxPython 2.4 there's no need to extend MainLoop anymore since |
249 |
wxPython itself makes sure OnExit is called. |
wxPython itself makes sure OnExit is called. |