/[thuban]/trunk/thuban/Thuban/Model/layer.py
ViewVC logotype

Log of /trunk/thuban/Thuban/Model/layer.py

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 2228 - (view) (annotate) - [select for diffs]
Modified Thu Jun 3 15:17:54 2004 UTC (20 years, 9 months ago) by bh
File length: 13316 byte(s)
Diff to previous 1983 , to selected 1599
(Layer.TreeInfo): Convert the bounding box
to a tuple before using it as arguments to the % operator.  This
fixes the formatting issue filed in RT#2239 on 2004-01-13 and
reported today on thuban-list by Jan Schüngel


Revision 1983 - (view) (annotate) - [select for diffs]
Modified Thu Nov 27 15:57:23 2003 UTC (21 years, 3 months ago) by bh
File length: 13303 byte(s)
Diff to previous 1978 , to selected 1599
* Thuban/Model/layer.py (Layer.LatLongBoundingBox)
(Layer.ShapesBoundingBox, RasterLayer.LatLongBoundingBox): Use the
new InverseBBox method to determine the unprojected bounding box
(Layer.ShapesInRegion): Use the ForwardBBox method to project the
bbox.

* test/test_layer.py (TestLayer.test_point_layer_with_projection):
Removed.
(TestLayer.test_arc_layer_with_projection): New. This test is
better able to test whether bounding boxes are projected correctly
than test_point_layer_with_projection


Revision 1978 - (view) (annotate) - [select for diffs]
Modified Tue Nov 25 14:30:34 2003 UTC (21 years, 3 months ago) by bh
File length: 14086 byte(s)
Diff to previous 1599
(Layer.__getattr__): Removed. It was only
there for backwards compatibility and all code relying on that
should have been updated by now.


Revision 1599 - (view) (annotate) - [selected]
Modified Mon Aug 18 12:45:28 2003 UTC (21 years, 6 months ago) by bh
File length: 14933 byte(s)
Diff to previous 1593
Fix some bugs in Thuban and the test suite that were uncovered by
changes introduced in Python 2.3:

* Thuban/Model/table.py (DBFTable.__init__): Make sure the
filename is an absolute name

* Thuban/Model/layer.py (RasterLayer.__init__): Make sure the
filename is an absolute name

* test/test_save.py (SaveSessionTest.testRasterLayer): Use a
unique filename to save to and use the correct relative filename
in the expected output.
(SaveSessionTest.test_dbf_table): Use the correct relative
filename in the expected output.

* test/test_layer.py (TestLayer.test_raster_layer): Update the
test to check whether the filename is absolute.


Revision 1593 - (view) (annotate) - [select for diffs]
Modified Fri Aug 15 14:10:27 2003 UTC (21 years, 6 months ago) by bh
File length: 14906 byte(s)
Diff to previous 1587 , to selected 1599
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


Revision 1587 - (view) (annotate) - [select for diffs]
Modified Fri Aug 15 10:31:07 2003 UTC (21 years, 6 months ago) by bh
File length: 14831 byte(s)
Diff to previous 1558 , to selected 1599
* Thuban/Model/layer.py (Layer.ShapesInRegion): Apply the layer
projection to all corners of the bounding box to get a better
approximation of the projected bounding box

* test/test_layer.py (TestLayer.test_point_layer_with_projection):
New. Test coordinate handling of a layer with a projection.
Catches the bug fixed in Layer.ShapesInRegion


Revision 1558 - (view) (annotate) - [select for diffs]
Modified Thu Aug 7 17:31:54 2003 UTC (21 years, 7 months ago) by bh
File length: 14671 byte(s)
Diff to previous 1535 , to selected 1599
Remove the unused import of Shape from
data. It was only there for interface compatibility but it's not
used inside of Thuban and the generic Shape class will go away
soon anyway.


Revision 1535 - (view) (annotate) - [select for diffs]
Modified Fri Aug 1 14:27:13 2003 UTC (21 years, 7 months ago) by bh
File length: 14678 byte(s)
Diff to previous 1452 , to selected 1599
* Thuban/Model/data.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
(SHAPETYPE_POINT, Shape): Move these constants and classes from
layer.py to data.py
(ShapefileStore.__init__): More Initialization for the new methods
and functionality.
(ShapefileStore.ShapeType, ShapefileStore.NumShapes)
(ShapefileStore.BoundingBox, ShapefileStore.ShapesInRegion)
(ShapefileStore.Shape): New methods that were formerly implemented
in the layer.
(DerivedShapeStore.Shape, DerivedShapeStore.ShapesInRegion)
(DerivedShapeStore.ShapeType, DerivedShapeStore.NumShapes)
(DerivedShapeStore.BoundingBox): New. DerivedShapeStore
equivalents of the new shape methods. These versions are simply
delegated to the original shapstore.

* Thuban/Model/layer.py (SHAPETYPE_POLYGON, SHAPETYPE_ARC)
(SHAPETYPE_POINT, Shape): Removed. They're now in data.py
(Layer.SetShapeStore): Removed the initializatin of instance
variables that were needed for the stuff that's now in
ShapefileStore
(Layer.BoundingBox, Layer.NumShapes, Layer.ShapeType)
(Layer.Shape, Layer.ShapesInRegion): Simply delegate to the
shapestore.


Revision 1452 - (view) (annotate) - [select for diffs]
Modified Fri Jul 18 12:57:59 2003 UTC (21 years, 7 months ago) by bh
File length: 16755 byte(s)
Diff to previous 1427 , to selected 1599
* Thuban/Model/layer.py (Layer.__init__): Rename
classificationField to classificatin_column and init it here so
that it can be used in SetClassificationColumn
(Layer.GetClassificationColumn, Layer.GetClassificationField):
Rename to GetClassificationColumn.
(Layer.SetClassificationColumn, Layer.SetClassificationField):
Rename to SetClassificationColumn and issue a LAYER_CHANGED
message if the column changes.
(Layer._classification_changed, Layer.ClassChanged): Rename to
_classification_changed. Update the callers.
(Layer.SetShapeStore): Further field->column renames.

* Thuban/Model/load.py (SessionLoader.start_classification)
(SessionLoader.start_clpoint): Updates because of
field->column method name changes in the Layer class

* Thuban/Model/save.py (SessionSaver.write_classification): Updates
because of field->column method name changes in the Layer class

* Thuban/UI/classifier.py (Classifier.__init__)
(Classifier._OnTry, Classifier._OnRevert): Updates because of
field->column method name changes in the Layer class

* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Updates
because of field->column method name changes in the Layer class

* Thuban/UI/viewport.py (ViewPort.find_shape_at): Updates because
of field->column method name changes in the Layer class

* test/test_save.py (SaveSessionTest.testClassifiedLayer)
(SaveSessionTest.testClassifiedLayer): Update because of
field->column method name changes in the Layer class

* test/test_layer.py (SetShapeStoreTests.setUp)
(SetShapeStoreTests.test_sanity): Update because of field->column
method name changes in the Layer class
(TestLayerModification.setUp): Subscribe to LAYER_CHANGED as well
(TestLayerModification.test_sanity)
(TestLayerModification.test_initial_settings): remove unsued code
and rename to test_sanity.
(TestLayerModification.test_set_classification): New test for
SetClassification and SetClassificationField.


Revision 1427 - (view) (annotate) - [select for diffs]
Modified Wed Jul 16 13:22:48 2003 UTC (21 years, 7 months ago) by jonathan
File length: 16380 byte(s)
Diff to previous 1355 , to selected 1599
(Layer.Destroy): Unsubscribe from the classification.
(Layer.SetShapeStore): Reset the classification first while
        we still have the old shape store to work with.
(Layer.GetClassificationField, Layer.SetClassificationField):
        New. Method for getting/setting the field to classify on.
(Layer.SetClassification): Simplified now that the layer
        simply has to hold a reference to the classification and not
        tell the classification who owns it.


Revision 1355 - (view) (annotate) - [select for diffs]
Modified Wed Jul 2 09:37:23 2003 UTC (21 years, 8 months ago) by jonathan
File length: 16318 byte(s)
Diff to previous 1338 , to selected 1599
(Layer.SetClassification): Switch
        the classification instance variable to the new class
        before calling _set_layer otherwise subscribers to a
        LAYER_CHANGED event will not see any difference.


Revision 1338 - (view) (annotate) - [select for diffs]
Modified Tue Jul 1 16:10:00 2003 UTC (21 years, 8 months ago) by jonathan
File length: 16272 byte(s)
Diff to previous 1273 , to selected 1599
Fixes RTbug #1971, 1973.
(Layer.Destroy): We don't need to call SetClassification
        anymore to clear out the back reference in the classifcation
        to the layer. It's better to set it to None using _set_layer,
        and we won't be creating another clas object too.
(Layer.SetClassification): Classification._set_layer is not
        recursive so remove all the locking variables. Also clean
        up the code so that it remains unchanged if something fails.


Revision 1273 - (view) (annotate) - [select for diffs]
Modified Fri Jun 20 17:45:49 2003 UTC (21 years, 8 months ago) by jonathan
File length: 16135 byte(s)
Diff to previous 1219 , to selected 1599
(BaseLayer.HasShapes): New. Overridden
        by deriving classes to determine if that layer supports shapes.
(Layer): Override HasShapes and return true.


Revision 1219 - (view) (annotate) - [select for diffs]
Modified Mon Jun 16 17:42:54 2003 UTC (21 years, 8 months ago) by bh
File length: 15987 byte(s)
Diff to previous 1158 , to selected 1599
Update to the layer interface: Direct access to the table,
shapetable, shapefile and filename attributes is now actively
deprecated by issuing deprecation warnings for all places where
this happens.

* Thuban/Model/layer.py (Layer.__getattr__): New. Implement access
to the instance variables table, shapetable, shapefile and
filename via __getattr__ so that we can issue a deprecation
warning.
(Layer.SetShapeStore): Don't set the deprecated instance variables
any more
(Layer.SetShapeStore): Don't use deprecated layer instance
variables
(Layer.Destroy): No need to explicitly remove the instance
variables any more
(Layer.GetFieldType, Layer.Shape): Don't use deprecated layer
instance variables

* Thuban/UI/classgen.py (ClassGenDialog.__init__)
(GenUniformPanel._OnRetrieve, GenUniquePanel._OnRetrieve)
(GenQuantilesPanel.GetList, GenQuantilesPanel.OnRetrieve): Don't
use deprecated layer instance variables

* Thuban/UI/classifier.py (Classifier.__init__): Don't use
deprecated layer instance variables

* Thuban/UI/identifyview.py (IdentifyListCtrl.selected_shape)
(IdentifyGridCtrl.selected_shape): Don't set the deprecated layer
instance variables

* Thuban/UI/tableview.py (LayerTableGrid.select_shapes): Don't use
deprecated layer instance variables

* Thuban/UI/mainwindow.py (MainWindow.LayerShowTable): Don't use
deprecated layer instance variables

* Thuban/Model/save.py (SessionSaver.write_layer): Don't use
deprecated layer instance variables

* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer)
(MapRenderer.polygon_render_param): Don't use deprecated layer instance
variables

* test/runtests.py (main): Turn Thuban's deprecation warnings into
errors so that they're cought by the tests

* test/test_load.py (TestSingleLayer.test): Don't use deprecated
layer instance variables


Revision 1158 - (view) (annotate) - [select for diffs]
Modified Thu Jun 12 12:40:11 2003 UTC (21 years, 8 months ago) by jonathan
File length: 15387 byte(s)
Diff to previous 1142 , to selected 1599
Import gdal only if it available.
(RasterLayer): Handle the case where the gdal library is unavailable.
        Addresses RTbug #1877.


Revision 1142 - (view) (annotate) - [select for diffs]
Modified Tue Jun 10 09:41:57 2003 UTC (21 years, 8 months ago) by bh
File length: 15199 byte(s)
Diff to previous 1117 , to selected 1599
* Thuban/Model/messages.py (LAYER_SHAPESTORE_REPLACED): New
message.

* Thuban/Model/layer.py (Layer.SetShapeStore): Send
LAYER_SHAPESTORE_REPLACED when the shapestore changes. A
LAYER_CHANGED will still be sent if the classification changes.

* Thuban/UI/classifier.py (Classifier.__init__): Add the map as
parameter so we can subscribe to some of its messages
(Classifier.__init__): Subscribe to the map's MAP_LAYERS_REMOVED
and the layer's LAYER_SHAPESTORE_REPLACED
(Classifier.unsubscribe_messages): New. Unsubscribe from message
subscribed to in __init__
(Classifier.map_layers_removed)
(Classifier.layer_shapestore_replaced): receivers for the messages
subscribed to in __init__. Unsubscribe and close the dialog

* Thuban/UI/mainwindow.py (MainWindow.OpenLayerProperties): Pass
the map to the Classifier dialog

* test/test_layer.py (SetShapeStoreTests): Derive from
SubscriberMixin as well so we can test messages
(SetShapeStoreTests.setUp): Subscribe to some of the layer's
messages
(SetShapeStoreTests.tearDown): Clear the messages again
(SetShapeStoreTests.test_sanity): Expand the doc-string and check
for the modified flag too
(SetShapeStoreTests.test_set_shape_store_modified_flag): New test
to check whether SetShapeStore sets the modified flag
(SetShapeStoreTests.test_set_shape_store_different_field_name)
(SetShapeStoreTests.test_set_shape_store_same_field)
(SetShapeStoreTests.test_set_shape_store_same_field_different_type):
Add tests for the messages. This checks both the new
LAYER_SHAPESTORE_REPLACED and the older LAYER_CHANGED


Revision 1117 - (view) (annotate) - [select for diffs]
Modified Fri May 30 18:31:19 2003 UTC (21 years, 9 months ago) by bh
File length: 15160 byte(s)
Diff to previous 1088 , to selected 1599
(Layer.Destroy): Set all instance
variables to None that have direct or indirect references to
shapefiles or dbf files to make sure that they do go away and the
files are closed.


Revision 1088 - (view) (annotate) - [select for diffs]
Modified Wed May 28 12:42:23 2003 UTC (21 years, 9 months ago) by bh
File length: 15056 byte(s)
Diff to previous 1086 , to selected 1599
* Thuban/Model/layer.py (Layer.SetShapeStore): Set the
classification to "None" if the type of the field has changed.

* test/test_layer.py (SetShapeStoreTests): New. Class with a few
test for the Layer.SetShapeStore method


Revision 1086 - (view) (annotate) - [select for diffs]
Modified Wed May 28 11:36:05 2003 UTC (21 years, 9 months ago) by jan
File length: 14560 byte(s)
Diff to previous 1012 , to selected 1599
(Layer.TreeInfo): Fixed a bug (a layer does not necessarily have a filename).


Revision 1012 - (view) (annotate) - [select for diffs]
Modified Fri May 23 09:13:58 2003 UTC (21 years, 9 months ago) by jan
File length: 14518 byte(s)
Diff to previous 996 , to selected 1599
(Layer.TreeInfo): Added filename.


Revision 996 - (view) (annotate) - [select for diffs]
Modified Thu May 22 18:21:10 2003 UTC (21 years, 9 months ago) by bh
File length: 14461 byte(s)
Diff to previous 961 , to selected 1599
* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
Provide a better way to destroy the layers
(TestLayer.test_base_layer, TestLayer.test_arc_layer)
(TestLayer.test_point_layer, TestLayer.test_empty_layer)
(TestLayer.test_polygon_layer, TestLayer.test_get_field_type): Use
the new way to destroy the layers.
(TestLayer.test_derived_store): New. Test for using a layer with a
DerivedShapeStore

* Thuban/Model/layer.py (Layer.SetShapeStore): Only set the
filename if the shape store actually has one.


Revision 961 - (view) (annotate) - [select for diffs]
Modified Wed May 21 17:23:25 2003 UTC (21 years, 9 months ago) by jonathan
File length: 14411 byte(s)
Diff to previous 929 , to selected 1599
(RasterLayer.__init__): Test if the filename is a valid image file.
        Throw IOError otherwise.


Revision 929 - (view) (annotate) - [select for diffs]
Modified Tue May 20 15:22:42 2003 UTC (21 years, 9 months ago) by jonathan
File length: 13801 byte(s)
Diff to previous 839 , to selected 1599
(BaseLayer.HasClassification): New.
        Defaults to False, but can be overridden by subclasses if they
        support classification.
(RasterLayer): New. Defines a new layer that represents an image.


Revision 839 - (view) (annotate) - [select for diffs]
Modified Tue May 6 15:54:18 2003 UTC (21 years, 10 months ago) by bh
File length: 10770 byte(s)
Diff to previous 828 , to selected 1599
Convert all table users to use the new table interface. This only
covers Thuban itself, not GREAT-ER or other applications built on
Thuban yet, so the compatibility interface stays in place for the
time being but it now issues DeprecationWarnings.

Finally, the new Table interface has a new method, HasColumn.

* Thuban/Model/table.py (OldTableInterfaceMixin): All methods
issue deprecation warnings when they're. The warnings refer to the
caller of the method.
(OldTableInterfaceMixin.__deprecation_warning): New. Helper method
for the deprecation warnings

* test/test_table.py: Ignore the deprecation warnings for the old
table in the tests in this module. The purpose of the tests is to
test the old interface, after all.

* test/test_transientdb.py
(TestTransientTable.run_iceland_political_tests): Use the
constants for the types. Add a test for HasColumn
(TestTransientTable.test_transient_joined_table): Adapt to new
table interface. Add a test for HasColumn
(TestTransientTable.test_transient_table_read_twice): Adapt to new
table interface

* Thuban/Model/transientdb.py (TransientTableBase.HasColumn)
(AutoTransientTable.HasColumn): Implement the new table interface
method
(AutoTransientTable.ReadRowAsDict, AutoTransientTable.ValueRange)
(AutoTransientTable.UniqueValues): Adapt to new table interface

* Thuban/Model/layer.py (Layer.SetShapeStore, Layer.GetFieldType):
Adapt to new table interface

* test/test_layer.py (TestLayer.open_shapefile): Helper method to
simplify opening shapefiles a bit easier.
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
(TestLayer.test_point_layer): Use the new helper method
(TestLayer.test_get_field_type): New. Test for the GetFieldType
method

* test/test_dbf_table.py (TestDBFTable.test_has_column): Test for
the new table method

* test/test_memory_table.py (TestMemoryTable.test_has_column):
Test for the new table method HasColumn


Revision 828 - (view) (annotate) - [select for diffs]
Modified Tue May 6 12:06:12 2003 UTC (21 years, 10 months ago) by jonathan
File length: 10812 byte(s)
Diff to previous 794 , to selected 1599
(Shape): Since a Shape is immutable only
        calculate the bounding box once (the first time compute_bbox() is
        called).
(Layer.ShapesBoundingBox): New. Given a list of shape ids, return
        the bounding box for the shapes in lat/long coordinates.


Revision 794 - (view) (annotate) - [select for diffs]
Modified Wed Apr 30 17:00:52 2003 UTC (21 years, 10 months ago) by jonathan
File length: 9773 byte(s)
Diff to previous 791 , to selected 1599
(Layer.ShapesInRegion): Fix docstring
        to say that the parameter is a tuple of unprojected
        points (which is what the callers to this method were assuming).
        Also, since the points are unprojected we need to projected them.


Revision 791 - (view) (annotate) - [select for diffs]
Modified Wed Apr 30 12:26:33 2003 UTC (21 years, 10 months ago) by jan
File length: 9637 byte(s)
Diff to previous 771 , to selected 1599
(Layer.SetShapeStore): Fixed a bug: don't set the Classification to
None if the classfication field is None (ie only a DEFAULT).


Revision 771 - (view) (annotate) - [select for diffs]
Modified Tue Apr 29 14:34:02 2003 UTC (21 years, 10 months ago) by jonathan
File length: 9594 byte(s)
Diff to previous 736 , to selected 1599
(BaseLayer.__init__): Change default value of visible from 1 to True.
(Layer.__init__): Change default value of visible from 1 to True.


Revision 736 - (view) (annotate) - [select for diffs]
Modified Fri Apr 25 09:11:57 2003 UTC (21 years, 10 months ago) by jonathan
File length: 9588 byte(s)
Diff to previous 725 , to selected 1599
(Layer.TreeInfo): Add an item to the tree for projection information.


Revision 725 - (view) (annotate) - [select for diffs]
Modified Thu Apr 24 16:05:36 2003 UTC (21 years, 10 months ago) by jonathan
File length: 9404 byte(s)
Diff to previous 723 , to selected 1599
(Layer.GetProjection): New. Needed to implement the interface that the
        ProjFrame dialog expects.


Revision 723 - (view) (annotate) - [select for diffs]
Modified Thu Apr 24 15:31:53 2003 UTC (21 years, 10 months ago) by bh
File length: 9343 byte(s)
Diff to previous 701 , to selected 1599
First step towards table management. Introduce a simple data
abstraction so that we replace the data a layer uses more easily
in the next step.

* Thuban/Model/data.py: New file with a simple data abstraction
that bundles shapefile and dbffile into one object.

* Thuban/Model/session.py (Session.OpenShapefile): New method to
open shapefiles and return a shape store object

* Thuban/Model/layer.py (Layer.__init__): Pass the data as a store
object instead of a shapefile filename. This introduces a new
instance variable store holding the datastore. For intermediate
backwards compatibility keep the old instance variables.
(open_shapefile): Removed. No longer needed with the shape store.
(Layer.SetShapeStore, Layer.ShapeStore): New methods to set and
get the shape store used by a layer.
(Layer.Destroy): No need to explicitly destroy the shapefile or
table anymore.

* Thuban/UI/mainwindow.py (MainWindow.AddLayer)
(MainWindow.AddLayer): Use the session's OpenShapefile method to
open shapefiles

* Thuban/Model/load.py (ProcessSession.start_layer): Use the
session's OpenShapefile method to open shapefiles

* test/test_classification.py
(TestClassification.test_classification): Use the session's
OpenShapefile method to open shapefiles and build the filename in
a more platform independed way

* test/test_layer.py (TestLayer.setUp, TestLayer.tearDown):
Implement to have a session to use in the tests
(TestLayer.test_arc_layer, TestLayer.test_polygon_layer)
(TestLayer.test_point_layer, TestLayer.test_empty_layer): Use the
session's OpenShapefile method to open shapefiles
(TestLayerLegend.setUp): Instantiate a session so that we can use
it to open shapefiles.
(TestLayerLegend.tearDown): Make sure that all references to
layers and session are removed otherwise we may get a resource
leak

* test/test_map.py (TestMapAddLayer.test_add_layer)
(TestMapWithContents.setUp): Instantiate a session so that we can
use it to open shapefiles.
(TestMapWithContents.tearDown): Make sure that all references to
layers, maps and sessions are removed otherwise we may get a
resource leak
("__main__"): use support.run_tests() so that more info about
uncollected garbage is printed

* test/test_save.py (SaveSessionTest.testSingleLayer): Use the
session's OpenShapefile method to open shapefiles
("__main__"): use support.run_tests() so that more info about
uncollected garbage is printed

* test/test_selection.py (TestSelection.tearDown): Make sure that
all references to the session and the selection are removed
otherwise we may get a resource leak
(TestSelection.get_layer): Instantiate a session so that we can
use it to open shapefiles.
("__main__"): use support.run_tests() so that more info about
uncollected garbage is printed

* test/test_session.py (TestSessionBase.tearDown)
(TestSessionWithContent.tearDown): Make sure that all references
to the session and layers are removed otherwise we may get a
resource leak
(TestSessionWithContent.setUp): Use the session's OpenShapefile
method to open shapefiles


Revision 701 - (view) (annotate) - [select for diffs]
Modified Thu Apr 17 16:18:48 2003 UTC (21 years, 10 months ago) by bh
File length: 9769 byte(s)
Diff to previous 610 , to selected 1599
Don't import LAYER_LEGEND_CHANGED.
(Layer): Update doc-string since LAYER_LEGEND_CHANGED is not used
anymore.
(Layer.BoundingBox, Layer.GetFieldType, Layer.NumShapes)
(Layer.ShapeType, Layer.Shape): No need to call
self.open_shapefile since it's always called in __init__


Revision 610 - (view) (annotate) - [select for diffs]
Modified Fri Apr 4 13:56:59 2003 UTC (21 years, 11 months ago) by jonathan
File length: 10095 byte(s)
Diff to previous 558 , to selected 1599
Rename Color.None to Color.Transparent.


Revision 558 - (view) (annotate) - [select for diffs]
Modified Wed Mar 26 11:05:20 2003 UTC (21 years, 11 months ago) by jonathan
File length: 10040 byte(s)
Diff to previous 545 , to selected 1599
(Layer.ClassChanged): Send a LAYER_CHANGED message, not a
LAYER_LEGEND_CHANGED message.


Revision 545 - (view) (annotate) - [select for diffs]
Modified Thu Mar 20 09:44:04 2003 UTC (21 years, 11 months ago) by jonathan
File length: 10047 byte(s)
Diff to previous 529 , to selected 1599
(Layer.SetClassification): Generate a LAYER_CHANGED event instead of a
LAYER_LEGEND_CHANGED event.


Revision 529 - (view) (annotate) - [select for diffs]
Modified Wed Mar 12 19:55:24 2003 UTC (21 years, 11 months ago) by jonathan
File length: 10039 byte(s)
Diff to previous 492 , to selected 1599
Handle the cyclic references between
        a layer and its classification better, and be sure to disconnect
        the classification from the layer when the layer is destroyed
        so that we don't maintain a cyclic reference that may not be
        garbage collected.


Revision 492 - (view) (annotate) - [select for diffs]
Modified Mon Mar 10 10:44:57 2003 UTC (21 years, 11 months ago) by jonathan
File length: 9698 byte(s)
Diff to previous 481 , to selected 1599
 Added ClassChanged() so that the
        classification can tell the layer when its data has changed.
        (Layer.SetClassification): Accepts None as an arguement to
        remove the current classification and correctly handles
        adding a new classification.


Revision 481 - (view) (annotate) - [select for diffs]
Modified Thu Mar 6 16:46:36 2003 UTC (22 years ago) by jonathan
File length: 9278 byte(s)
Diff to previous 464 , to selected 1599
(SetClassification): prevent recursion between this method and
Classification.SetLayer().


Revision 464 - (view) (annotate) - [select for diffs]
Modified Wed Mar 5 18:17:47 2003 UTC (22 years ago) by jonathan
File length: 8912 byte(s)
Diff to previous 437 , to selected 1599
(Layer): Add GetFieldType to retreive the kind of data represented by a field.


Revision 437 - (view) (annotate) - [select for diffs]
Modified Thu Feb 27 15:53:21 2003 UTC (22 years ago) by jonathan
File length: 8685 byte(s)
Diff to previous 412 , to selected 1599
Fixed name resolution problem.


Revision 412 - (view) (annotate) - [select for diffs]
Modified Wed Feb 19 16:51:50 2003 UTC (22 years ago) by jonathan
File length: 8690 byte(s)
Diff to previous 389 , to selected 1599
(Layer): Removed references to fill, stroke,
        stroke_width attributes. Made the 'classification' attribute private.
        New methods for setting/getting the classification.


Revision 389 - (view) (annotate) - [select for diffs]
Modified Mon Feb 10 15:25:30 2003 UTC (22 years ago) by jonathan
File length: 8950 byte(s)
Diff to previous 386 , to selected 1599
* Thuban/Model/layer.py (Layer): Remove the
        Set[Fill|Stroke|StrokeWidth]() methods. Code should call the
        SetDefault*() methods on the layer's classification object.
        (Layer.__init__): Use the new SetDefault*() methods in the
        Classification class.


Revision 386 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 11:44:27 2003 UTC (22 years, 1 month ago) by jonathan
File length: 9681 byte(s)
Diff to previous 382 , to selected 1599
Modified these functions to change the null data in the classification rather
than keep these values directly in the Layer class. Menu options to change
these values work again.


Revision 382 - (view) (annotate) - [select for diffs]
Modified Tue Jan 28 18:37:35 2003 UTC (22 years, 1 month ago) by jonathan
File length: 9411 byte(s)
Diff to previous 374 , to selected 1599
Added a call to build the tree info for classifications. Commented out
unnecessary lines.


Revision 374 - (view) (annotate) - [select for diffs]
Modified Mon Jan 27 14:20:02 2003 UTC (22 years, 1 month ago) by jan
File length: 9250 byte(s)
Diff to previous 364 , to selected 1599
Replace user string by _() for i18n.


Revision 364 - (view) (annotate) - [select for diffs]
Modified Mon Jan 27 11:47:12 2003 UTC (22 years, 1 month ago) by jonathan
File length: 9201 byte(s)
Diff to previous 276 , to selected 1599
added classification initializations


Revision 276 - (view) (annotate) - [select for diffs]
Modified Fri Aug 23 15:25:07 2002 UTC (22 years, 6 months ago) by bh
File length: 8999 byte(s)
Diff to previous 260 , to selected 1599
(Layer.__init__): Make sure we have an
absolute filename.


Revision 260 - (view) (annotate) - [select for diffs]
Modified Thu Aug 15 17:43:59 2002 UTC (22 years, 6 months ago) by bh
File length: 8741 byte(s)
Diff to previous 258 , to selected 1599
* Thuban/Model/layer.py (Layer.Destroy): Call the unboundd method
with self.


Revision 258 - (view) (annotate) - [select for diffs]
Modified Thu Aug 15 12:48:03 2002 UTC (22 years, 6 months ago) by bh
File length: 8737 byte(s)
Diff to previous 217 , to selected 1599
(Layer.Destroy): New. Explicitly close the
shapefile and destroy the table.


Revision 217 - (view) (annotate) - [select for diffs]
Modified Wed Jul 17 10:50:40 2002 UTC (22 years, 7 months ago) by bh
File length: 8514 byte(s)
Diff to previous 179 , to selected 1599
* Thuban/UI/tree.py (color_string): Removed. No longer used.
(SessionTreeCtrl.update_tree, SessionTreeCtrl.add_items): Split
update_tree into update_tree and add_items. The tree now uses a
more generic way to display the contents of the tree.
(SessionTreeCtrl): Add a doc string explaining the TreeInfo method

* Thuban/Model/layer.py (Layer.TreeInfo),
Thuban/Model/extension.py (Extension.TreeInfo),
Thuban/Model/map.py (Map.TreeInfo),
Thuban/Model/session.py (Session.TreeInfo):
Add TreeInfo methods to implement the new tree view update scheme


Revision 179 - (view) (annotate) - [select for diffs]
Modified Wed May 15 14:02:49 2002 UTC (22 years, 9 months ago) by bh
File length: 7685 byte(s)
Diff to previous 171 , to selected 1599
	* Thuban/Model/layer.py (Layer.open_shapefile): Set bbox to None
	when the shapefile is empty.
	(Layer.BoundingBox, Layer.LatLongBoundingBox): Both methods may
	now return None for empty shapefiles. Update doc-strings.


Revision 171 - (view) (annotate) - [select for diffs]
Modified Tue May 14 14:16:24 2002 UTC (22 years, 9 months ago) by bh
File length: 7196 byte(s)
Diff to previous 147 , to selected 1599
	* Thuban/Model/layer.py (Layer.open_shapefile): Choose a better
	maximum depth for the tree than shapelib does by default.


Revision 147 - (view) (annotate) - [select for diffs]
Modified Tue May 7 16:39:52 2002 UTC (22 years, 10 months ago) by bh
File length: 6824 byte(s)
Diff to previous 143 , to selected 1599
	* Thuban/Model/layer.py (Layer.ShapesInRegion): Remove some debug
	prints.


Revision 143 - (view) (annotate) - [select for diffs]
Modified Tue May 7 14:17:20 2002 UTC (22 years, 10 months ago) by bh
File length: 6942 byte(s)
Diff to previous 82 , to selected 1599
	* Thuban/Model/layer.py (Layer.__init__): New instance variable
	shapetree to hold the shapelib quadtree for the shapefile
	(Layer.open_shapefile): Create the quad tree.
	(Layer.ShapesInRegion): New method to return the ids of shapes in
	a given region using the quad tree.


Revision 82 - (view) (annotate) - [select for diffs]
Modified Fri Feb 15 17:11:04 2002 UTC (23 years ago) by bh
File length: 6285 byte(s)
Diff to previous 73 , to selected 1599
	* Thuban/Model/layer.py (Layer.Shape): list append only takes one
	argument (python <= 1.5.2 erroneously accepted multiuple
	arguments)


Revision 73 - (view) (annotate) - [select for diffs]
Modified Mon Feb 4 19:19:25 2002 UTC (23 years, 1 month ago) by bh
File length: 6283 byte(s)
Diff to previous 21 , to selected 1599
	* Thuban/Model/layer.py (Layer.__init__): New parameter and
	instance variable stroke_width
	(Layer.SetStrokeWidth): Set the stroke_width.


Revision 21 - (view) (annotate) - [select for diffs]
Modified Tue Sep 4 16:45:28 2001 UTC (23 years, 6 months ago) by bh
File length: 6053 byte(s)
Diff to previous 6 , to selected 1599
Open the shapefile immediately. This will cause an exception in case the
file can't be opened and we can display an appropriate message.


Revision 6 - (view) (annotate) - [select for diffs]
Added Tue Aug 28 15:41:52 2001 UTC (23 years, 6 months ago) by bh
File length: 6023 byte(s)
Diff to selected 1599
import all the source files


This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26