/[thuban]
ViewVC logotype

Revision 1593


Jump to revision: Previous Next
Author: bh
Date: Fri Aug 15 14:10:27 2003 UTC (21 years, 6 months ago)
Changed paths: 9
Log Message:
Change the way shapes are returned by a shape store. The
ShapesInRegion method returns an iterator over actual shape
objects instead of a list of shape ids.

* Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
id.
(ShapefileStore.ShapesInRegion): Return an iterator over the
shapes which yields shape objects instead of returning a list of
shape ids
(ShapefileStore.AllShapes): New. Return an iterator over all
shapes in the shape store
(DerivedShapeStore.AllShapes): New. Like in ShapefileStore

* Thuban/Model/layer.py (Layer.ShapesInRegion): Update
doc-string.

* Thuban/UI/baserenderer.py
(BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
layer_shapes and make it return an iterator containg shapes
instead of a list of ids.
(BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
layer_shapes() change

* Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
(ScreenRenderer.layer_shapes): Rename as in BaseRenderer

* Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
changes in the ShapesInRegion return value.
(ViewPort._get_hit_tester): Remove commented out code

* test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
new return value.
(SimpleShapeStore.AllShapes): New. Implement this method too.

* test/test_layer.py (TestLayer.test_arc_layer)
(TestLayer.test_polygon_layer, TestLayer.test_point_layer)
(TestLayer.test_point_layer_with_projection)
(TestLayer.test_derived_store): Adapt to changes in the
ShapesInRegion return value.

* test/test_shapefilestore.py
(TestShapefileStoreArc.test_shapes_in_region)
(TestShapefileStorePolygon.test_shapes_in_region)
(TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
in the ShapesInRegion return value.
(TestShapefileStorePoint.test_all_shapes)
(TestShapefileStoreArc.test_shape_shapeid): New tests for the new
methods

* test/test_derivedshapestore.py
(TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
the ShapesInRegion return value.
(TestDerivedShapeStore.test_all_shapes)
(TestDerivedShapeStore.test_shape_shapeid): New tests for the new
methods


Changed paths

Path Details
Directorytrunk/thuban/Thuban/Model/data.py modified , text changed
Directorytrunk/thuban/Thuban/Model/layer.py modified , text changed
Directorytrunk/thuban/Thuban/UI/baserenderer.py modified , text changed
Directorytrunk/thuban/Thuban/UI/renderer.py modified , text changed
Directorytrunk/thuban/Thuban/UI/viewport.py modified , text changed
Directorytrunk/thuban/test/mockgeo.py modified , text changed
Directorytrunk/thuban/test/test_derivedshapestore.py modified , text changed
Directorytrunk/thuban/test/test_layer.py modified , text changed
Directorytrunk/thuban/test/test_shapefilestore.py modified , text changed

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26