1 |
|
2003-08-07 Bernhard Herzog <[email protected]> |
2 |
|
|
3 |
|
Add raw data interface to shape objects. |
4 |
|
|
5 |
|
* Thuban/Model/data.py (ShapefileShape, Shape): Rname the shape |
6 |
|
class to ShapefileShape which now holds shapefile specific |
7 |
|
information. |
8 |
|
(ShapefileShape.compute_bbox): Simplified to not cache any |
9 |
|
information. The way this method is used that shouldn't matter |
10 |
|
performance wise. |
11 |
|
(ShapefileShape.RawData): New. Return the shapeid which is the raw |
12 |
|
data format for shapes from shapefiles. |
13 |
|
(ShapefileStore.RawShapeFormat): New. Return the raw datatype used |
14 |
|
in the shape objects returned by a shapestore. For a |
15 |
|
ShapefileStore this is always RAW_SHAPEFILE. |
16 |
|
(RAW_PYTHON, RAW_SHAPEFILE): Constants for the RawShapeFormat |
17 |
|
method. |
18 |
|
|
19 |
|
* test/test_shapefilestore.py |
20 |
|
(TestShapefileStore.test_raw_format): New test to test the raw |
21 |
|
format feature of shapes. |
22 |
|
|
23 |
|
* Thuban/Model/layer.py: Remove the unused import of Shape from |
24 |
|
data. It was only there for interface compatibility but it's not |
25 |
|
used inside of Thuban and the generic Shape class has gone away. |
26 |
|
|
27 |
|
* Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Check |
28 |
|
the raw data format and only use an optimized version of its a |
29 |
|
shapefile. |
30 |
|
|
31 |
|
2003-08-07 Bernhard Herzog <[email protected]> |
32 |
|
|
33 |
|
* test/test_baserenderer.py (SimpleShape): Shape class for the |
34 |
|
tests. |
35 |
|
(SimpleShapeStore.Shape): Use SimpleShape instead of |
36 |
|
Thuban.Model.data.Shape to make the tests independed of the coming |
37 |
|
changes. |
38 |
|
|
39 |
|
2003-08-07 Bernhard Herzog <[email protected]> |
40 |
|
|
41 |
|
* test/support.py (SkipTest, ThubanTestResult, ThubanTestRunner) |
42 |
|
(ThubanTestProgram): New classes that extend the respective |
43 |
|
classes from unittest. These new version support skipping tests |
44 |
|
under certain expected conditions. In the Thuban test suite we |
45 |
|
uses this for tests that require the optional gdal support. |
46 |
|
(run_tests): Use ThubanTestProgram instead of the unittest.main() |
47 |
|
|
48 |
|
* test/runtests.py (main): Use the new ThubanTestRunner instead of |
49 |
|
the normal one from unittest |
50 |
|
|
51 |
|
* test/test_layer.py (TestLayer.test_raster_layer): If this test |
52 |
|
is not run because gdal support isn't available report this to the |
53 |
|
runner. |
54 |
|
|
55 |
|
* test/test_baserenderer.py |
56 |
|
(TestBaseRenderer.test_raster_no_projection): Do not run this test |
57 |
|
if gdal support isn't available and report this to the runner. |
58 |
|
|
59 |
|
2003-08-06 Bernhard Herzog <[email protected]> |
60 |
|
|
61 |
|
Rearrange the renderers a bit, partly in preparation for changes |
62 |
|
required for the postgis merge, partly to make it more testable. |
63 |
|
Also make the representation of coordinates in Shapes more |
64 |
|
consistent. |
65 |
|
|
66 |
|
* Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in |
67 |
|
this class is now in BaseRenderer. This class is now practically |
68 |
|
only a specialization of BaseRenderer for rendering to an actual |
69 |
|
wx DC. |
70 |
|
(ScreenRenderer.draw_shape_layer): Use self.low_level_renderer() |
71 |
|
to get the shapetype specific rendering functions. |
72 |
|
|
73 |
|
* Thuban/UI/baserenderer.py: New file with the basic rendering |
74 |
|
logic. The code in this file is completely independend of wx. |
75 |
|
(BaseRenderer): Class with the basic rendering logic |
76 |
|
|
77 |
|
* test/test_baserenderer.py: New. Test cases for BaseRenderer |
78 |
|
|
79 |
|
* Thuban/UI/view.py (MapCanvas.__init__): New instance variable |
80 |
|
error_on_redraw to guard agains endless loops and stack overflows |
81 |
|
when there's a bug in the rendering code that raises exceptions. |
82 |
|
(MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual |
83 |
|
rendering into a separate method _do_redraw so that error handling |
84 |
|
is a bit easier. When an exception occurs, set error_on_redraw to |
85 |
|
true. When it's true on entry to OnIdle do nothing and return |
86 |
|
immediately. |
87 |
|
|
88 |
|
* Thuban/Model/data.py (ShapefileStore.Shape): For consistency, a |
89 |
|
Shape object will always have the coordinates as a list of list of |
90 |
|
coordinate pairs (tuples). |
91 |
|
(Shape.compute_bbox): Adapt to new representation. |
92 |
|
|
93 |
|
* Thuban/UI/viewport.py (ViewPort.find_shape_at) |
94 |
|
(ViewPort.LabelShapeAt): Adapt to new coordinate representation in |
95 |
|
Shape objects. |
96 |
|
|
97 |
|
* test/test_shapefilestore.py |
98 |
|
(ShapefileStoreTests.assertFloatTuplesEqual) |
99 |
|
(ShapefileStoreTests.assertPointListEquals): Rename to |
100 |
|
assertPointListEquals and change purpose to checking equality of |
101 |
|
the lists returned by Shape.Points(). |
102 |
|
(TestShapefileStoreArc.test_shape) |
103 |
|
(TestShapefileStorePolygon.test_shape) |
104 |
|
(TestShapefileStorePoint.test_shape): Use the new |
105 |
|
assertPointListEquals instead of assertFloatTuplesEqual |
106 |
|
|
107 |
|
* test/test_layer.py (TestLayer.assertFloatTuplesEqual) |
108 |
|
(TestLayer.assertPointListEquals): Rename to assertPointListEquals |
109 |
|
and change purpose to checking equality of the lists returned by |
110 |
|
Shape.Points(). |
111 |
|
(TestLayer.test_arc_layer, TestLayer.test_arc_layer) |
112 |
|
(TestLayer.test_polygon_layer, TestLayer.test_point_layer) |
113 |
|
(TestLayer.test_derived_store): Use the new assertPointListEquals |
114 |
|
instead of assertFloatTuplesEqual |
115 |
|
|
116 |
|
* test/test_derivedshapestore.py |
117 |
|
(TestDerivedShapeStore.assertFloatTuplesEqual) |
118 |
|
(TestDerivedShapeStore.assertPointListEquals): Rename to |
119 |
|
assertPointListEquals and change purpose to checking equality of |
120 |
|
the lists returned by Shape.Points(). |
121 |
|
(TestDerivedShapeStore.test_shape): Use the new |
122 |
|
assertPointListEquals instead of assertFloatTuplesEqual |
123 |
|
|
124 |
|
2003-08-06 Jan-Oliver Wagner <[email protected]> |
125 |
|
|
126 |
|
* Thuban/UI/projdialog.py (UTMPanel._OnPropose): Added test for |
127 |
|
a bounding box. A dialog is raised in case, no bounding box |
128 |
|
is found. This fixes bug #2043: |
129 |
|
https://intevation.de/rt/webrt?serial_num=2043 |
130 |
|
|
131 |
|
2003-08-05 Bernhard Herzog <[email protected]> |
132 |
|
|
133 |
|
* Thuban/Model/color.py (Color.__repr__): Make the repr of a color |
134 |
|
object look like a Color instantiation. Formerly it looked like a |
135 |
|
tuple. |
136 |
|
|
137 |
|
* test/test_color.py (TestColor.test_repr) |
138 |
|
(TestColor.test_equality, TestColor.test_inequality): New. test |
139 |
|
some more apects of the Color class |
140 |
|
(TestTransparent.test_repr, TestTransparent.test_hex) |
141 |
|
(TestTransparent.test_equality): New. Test cases for the |
142 |
|
Transparent object. |
143 |
|
|
144 |
|
2003-08-04 Jan-Oliver Wagner <[email protected]> |
145 |
|
|
146 |
|
* Doc/manual/thuban-manual.xml: a number of small improvements. |
147 |
|
The resulting file is the version submitted for GREAT-ER II. |
148 |
|
|
149 |
|
2003-08-01 Bernhard Herzog <[email protected]> |
150 |
|
|
151 |
|
* Thuban/UI/resource.py, Thuban/UI/projdialog.py, |
152 |
|
Thuban/UI/join.py, Thuban/UI/classgen.py, Thuban/UI/about.py, |
153 |
|
Thuban/Model/resource.py: Insert cvs keywords and doc-strings. |
154 |
|
|
155 |
|
* Thuban/UI/common.py: Insert cvs keywords and doc-strings. |
156 |
|
(Color2wxColour, wxColour2Color, ThubanBeginBusyCursor) |
157 |
|
(ThubanEndBusyCursor): Add doc-strings |
158 |
|
|
159 |
|
2003-08-01 Bernhard Herzog <[email protected]> |
160 |
|
|
161 |
|
First step towards PostGIS integration. More abstraction by movin |
162 |
|
more code from the layer to the shapestore. More methods of the |
163 |
|
layer are now simply delegated to the equivalent method of the |
164 |
|
shapestore. The SHAPETYPE_* constants are now in data not in |
165 |
|
layer. |
166 |
|
|
167 |
|
* Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC) |
168 |
|
(SHAPETYPE_POINT, Shape): Move these constants and classes from |
169 |
|
layer.py to data.py |
170 |
|
(ShapefileStore.__init__): More Initialization for the new methods |
171 |
|
and functionality. |
172 |
|
(ShapefileStore.ShapeType, ShapefileStore.NumShapes) |
173 |
|
(ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion) |
174 |
|
(ShapefileStore.Shape): New methods that were formerly implemented |
175 |
|
in the layer. |
176 |
|
(DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion) |
177 |
|
(DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes) |
178 |
|
(DerivedShapeStore.BoundingBox): New. DerivedShapeStore |
179 |
|
equivalents of the new shape methods. These versions are simply |
180 |
|
delegated to the original shapstore. |
181 |
|
|
182 |
|
* Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC) |
183 |
|
(SHAPETYPE_POINT, Shape): Removed. They're now in data.py |
184 |
|
(Layer.SetShapeStore): Removed the initializatin of instance |
185 |
|
variables that were needed for the stuff that's now in |
186 |
|
ShapefileStore |
187 |
|
(Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType) |
188 |
|
(Layer.Shape, Layer.ShapesInRegion): Simply delegate to the |
189 |
|
shapestore. |
190 |
|
|
191 |
|
* Thuban/UI/classifier.py, Thuban/UI/renderer.py, |
192 |
|
Thuban/UI/viewport.py: Import the SHAPETYPE_* constants from data |
193 |
|
instead of layer. |
194 |
|
|
195 |
|
* test/test_shapefilestore.py: New. Tests for ShapefileStore. |
196 |
|
|
197 |
|
* test/test_derivedshapestore.py: New. Tests for DerivedShapeStore. |
198 |
|
|
199 |
|
* test/test_layer.py: Import the SHAPETYPE_* constants from data |
200 |
|
instead of layer. |
201 |
|
(TestLayer.test_derived_store): Remove the test for the exception |
202 |
|
when instantiating the DerivedShapeStore with an incompatible |
203 |
|
table which is now in test_derivedshapestore.py. Add some more |
204 |
|
tests of the layer methods to determine whether they work for a |
205 |
|
DerivedShapeStore as well. |
206 |
|
|
207 |
|
2003-07-31 Jonathan Coles <[email protected]> |
208 |
|
|
209 |
|
* Doc/manual/thuban-manual.xml: Fix the list of required packages |
210 |
|
by just listing the name and where they can be found. |
211 |
|
|
212 |
|
2003-07-31 Frank Koormann <[email protected]> |
213 |
|
|
214 |
|
* Doc/manual/thuban-manual.xml: |
215 |
|
Changed the screenshot elements to figure. |
216 |
|
Changed some variablelist elements to itemizedlist. |
217 |
|
Added section on GDAL formats. |
218 |
|
|
219 |
2003-07-31 Jonathan Coles <[email protected]> |
2003-07-31 Jonathan Coles <[email protected]> |
220 |
|
|
221 |
* Doc/manual/thuban-manual.xml: Added a few sentences about |
* Doc/manual/thuban-manual.xml: Added a few sentences about |