/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/UI/renderer.py
ViewVC logotype

Log of /branches/WIP-pyshapelib-bramz/Thuban/UI/renderer.py

Parent Directory Parent Directory | Revision Log Revision Log


Sticky Revision:
(Current path doesn't exist after revision 2835)

Revision 2734 - (view) (annotate) - [select for diffs]
Modified Thu Mar 1 12:42:59 2007 UTC (18 years ago) by bramz
File length: 17123 byte(s)
Diff to previous 2712 , to selected 605
made a copy

Revision 2712 - (view) (annotate) - [select for diffs]
Modified Sun Oct 15 23:27:05 2006 UTC (18 years, 4 months ago) by bernhard
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 17123 byte(s)
Diff to previous 2700 , to selected 605
* Thuban/UI/renderer.py: Added module variable verbose and
added verbose output before doing a raster projection.
Minor: Added (c) year 2006.

* test/test_baserenderer.py: Added new function
test_projected_raster_decimalcommalocale()
Added new author Bernhard Reiter and new copyright year 2006.

* libraries/thuban/gdalwarp.cpp(ProjectRasterFile): Adding
switching to LC_NUMERIC "C" and back before calling GDAL functions -
only #if python >=2.4 .


Revision 2700 - (view) (annotate) - [select for diffs]
Modified Mon Sep 18 14:27:02 2006 UTC (18 years, 5 months ago) by dpinte
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 16780 byte(s)
Diff to previous 2668 , to selected 605
2006-09-18 Didrik Pinte <dpinte@itae.be>
    
        * wxPython 2.6 update : wx 2.4 syntax has been updated to 2.6



Revision 2668 - (view) (annotate) - [select for diffs]
Modified Thu Aug 18 21:54:25 2005 UTC (19 years, 6 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 17104 byte(s)
Diff to previous 2639 , to selected 605
(ScreenRenderer.draw_selection_incrementally): Call the right method
for the default size.


Revision 2639 - (view) (annotate) - [select for diffs]
Modified Thu Jun 30 16:15:03 2005 UTC (19 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 17077 byte(s)
Diff to previous 2635 , to selected 605
(ScreenRenderer.draw_selection_incrementally):
untabify.


Revision 2635 - (view) (annotate) - [select for diffs]
Modified Tue Jun 28 06:48:45 2005 UTC (19 years, 8 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 17067 byte(s)
Diff to previous 2618 , to selected 605
(ScreenRenderer.draw_selection_incrementally):
Use the default size for rendering selected items of default type.
Fixes part 2 of https://intevation.de/rt/webrt?serial_num=3149


Revision 2618 - (view) (annotate) - [select for diffs]
Modified Fri May 6 14:18:31 2005 UTC (19 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 16981 byte(s)
Diff to previous 2602 , to selected 605
(MapRenderer.draw_raster_data): Fixed signature to match that in BaseRenderer.
Use the new opacity argument in place of calling layer.Opacity(). In the case
where the format is not 'RAW', alpha_data is None and the loaded image has
alpha information, use the file's alpha information. This is still subject to
the layer's opacity setting.


Revision 2602 - (view) (annotate) - [select for diffs]
Modified Mon Apr 25 15:01:48 2005 UTC (19 years, 10 months ago) by joey
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 16934 byte(s)
Diff to previous 2601 , to selected 605
Added a description according to the CVS log message


Revision 2601 - (view) (annotate) - [select for diffs]
Modified Sat Apr 23 16:40:33 2005 UTC (19 years, 10 months ago) by joey
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 16748 byte(s)
Diff to previous 2587 , to selected 605
Added a missing import


Revision 2587 - (view) (annotate) - [select for diffs]
Modified Wed Mar 23 15:30:27 2005 UTC (19 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 16730 byte(s)
Diff to previous 2571 , to selected 605
Add support for adjusting the opacity of a raster layer.


Revision 2571 - (view) (annotate) - [select for diffs]
Modified Fri Feb 18 14:54:17 2005 UTC (20 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 16053 byte(s)
Diff to previous 2562 , to selected 605
Refactored baserenderer.py and renderer.py to remove baserenderer.py's
dependencies on wxPython. Added a new method projected_raster_layer()
that returns a raster layer image in projected space. This must be
implemented in classes derived from BaseRenderer. This also eliminates
the dependency on gdal in baserenderer.py.


Revision 2562 - (view) (annotate) - [select for diffs]
Modified Wed Feb 16 21:14:47 2005 UTC (20 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 15011 byte(s)
Diff to previous 2552 , to selected 605
Further wxPython 2.5 changes using patches from Daniel Calvelo Aros
so that that wxproj doesn't crash. Added GUI support for selecting
alpha channel (opacity can't be selected yet).


Revision 2552 - (view) (annotate) - [select for diffs]
Modified Fri Jan 28 15:54:00 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 14414 byte(s)
Diff to previous 2551 , to selected 605
Make layer's use_mask flag default to true. Support a bit array describing
the mask to use. Improve error handling in ProjectRasterFile (also addresses
RT #2947).


Revision 2551 - (view) (annotate) - [select for diffs]
Modified Thu Jan 27 14:19:41 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 14749 byte(s)
Diff to previous 2537 , to selected 605
Add a new dialog box for raster layers. The dialog box allows
the user to toggle a mask that is generated by ProjectRasterFile
and is used to only draw the real parts of the projected image.


Revision 2537 - (view) (annotate) - [select for diffs]
Modified Fri Jan 21 14:01:25 2005 UTC (20 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 14399 byte(s)
Diff to previous 2514 , to selected 605
Improved rendering raster layers by changing the return format of
the ProjectRasterFile function.


Revision 2514 - (view) (annotate) - [select for diffs]
Modified Mon Jan 3 16:21:17 2005 UTC (20 years, 2 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 13704 byte(s)
Diff to previous 2454 , to selected 605
Thuban/UI/renderer.py (ScreenRendererdraw_selection_incrementally):
    BugFix 2883: Former implementation only worked on classified point layers:
    KeyError was raised, now use the default size if field is None.


Revision 2454 - (view) (annotate) - [select for diffs]
Modified Mon Dec 13 18:26:11 2004 UTC (20 years, 2 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 13682 byte(s)
Diff to previous 2431 , to selected 605
* Thuban/UI/view.py (MapPrintout.draw_on_dc): The region for the
renderer has to be at the same position as the mapregion

* Thuban/UI/renderer.py (ExportRenderer.RenderMap): self.region
has to be moved by (self.shiftx, self.shifty) too.


Revision 2431 - (view) (annotate) - [select for diffs]
Modified Sun Dec 5 15:05:02 2004 UTC (20 years, 3 months ago) by joey
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 13611 byte(s)
Diff to previous 2394 , to selected 605
Added PNG, TIFF and GIF as supported bitmap image formats (helpful
for the WMS extension)


Revision 2394 - (view) (annotate) - [select for diffs]
Modified Wed Nov 17 22:02:29 2004 UTC (20 years, 3 months ago) by jan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 13457 byte(s)
Diff to previous 1937 , to selected 605
(ScreenRenderer.draw_selection_incrementally):
Added consideration of the specific size of point symbols.
The property for each point symbol is retrieved and the size applied
for the rendering method.
Added doc-string.


Revision 1937 - (view) (annotate) - [select for diffs]
Modified Tue Nov 11 18:16:42 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 12216 byte(s)
Diff to previous 1927 , to selected 605
Avoid warnings when run under Python 2.3

(MapRenderer.make_point): Turn this into a
real method so that we can convert to int.
(MapRenderer.label_font): The font size mist be an int.


Revision 1927 - (view) (annotate) - [select for diffs]
Modified Mon Nov 10 16:57:35 2003 UTC (21 years, 3 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 12122 byte(s)
Diff to previous 1866 , to selected 605
(raster_format_map): New. Mapping form the
strings of the format parameter of draw_raster_data method to wx
constants
(MapRenderer.draw_raster_data): Add the format parameter and use
raster_format_map to map it to the right wxwindows constant for
wxImageFromStream


Revision 1866 - (view) (annotate) - [select for diffs]
Modified Mon Oct 27 13:01:58 2003 UTC (21 years, 4 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11866 byte(s)
Diff to previous 1750 , to selected 605
Several rendering changes:

 - Render the selection into a separate bitmap so that only that
   bitmap needs to be redrawn when the selection changes

 - Render incrementally showing previews and allowing interaction
   before rendering is complete

 - Update the renderer interface a bit. Most parameters of
   RenderMap are now parameters of the constructor

* Thuban/UI/baserenderer.py (BaseRenderer.__init__): Add the map
and the update region as parameters. Update the doc-string
(BaseRenderer.render_map_incrementally): New. Generator function
to renders the map incrementally
(BaseRenderer.render_map): Remove the map argument (it's now in
the constructor) and simply iterate over the
render_map_incrementally generator to draw the map.
(BaseRenderer.draw_shape_layer_incrementally)
(BaseRenderer.draw_shape_layer): Renamed to
draw_shape_layer_incrementally and changed into a generator that
yields True every 500 shapes. Used by render_map_incrementally to
render shape layers incrementally

* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Removed the
map and region parameters which are now in the constructor
(ScreenRenderer.RenderMapIncrementally): New. Public frontend for
the inherited render_map_incrementally.
(BaseRenderer.draw_shape_layer): Removed.
(ScreenRenderer.draw_selection_incrementally): New. The selection
drawing part of the removed draw_shape_layer as a generator
(ScreenRenderer.layer_shapes): Update because of the region
parameter change
(ExportRenderer.__init__): New. Extend the inherited constructor
with the destination region for the drawing
(ExportRenderer.RenderMap): Removed the map and region parameters
which are now in the constructor

* Thuban/UI/view.py (MapCanvas.PreviewBitmap): New. Return a
bitmap suitable for a preview in a tool
(CanvasPanTool.MouseMove): Use the PreviewBitmap method to get the
bitmap
(MapPrintout.draw_on_dc): Adapt to new renderer interface
(MapCanvas.OnPaint): Handle drawing the selection bitmap if it
exists
(MapCanvas.OnIdle): Update the logic to deal with incremental
rendering and the selection bitmap
(MapCanvas._do_redraw): Handle the instantiation of the render
iterator and the redraws during rendering
(MapCanvas._render_iterator): New. Generator to incrementally
redraw both bitmaps
(MapCanvas.Export): Adapt to new renderer interface.
(MapCanvas.full_redraw): Reset the selection bitmap and the
renderer iterator too
(MapCanvas.redraw_selection): New. Force a redraw of the selection
bitmap
(MapCanvas.shape_selected): Only redraw the selection bitmap


Revision 1750 - (view) (annotate) - [select for diffs]
Modified Wed Sep 24 15:46:27 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11108 byte(s)
Diff to previous 1593 , to selected 605
(ExportRenderer.render_legend): Do not
modify the list returned by map.Layers() in place since it is the
actual list of layers used by the map.


Revision 1593 - (view) (annotate) - [select for diffs]
Modified Fri Aug 15 14:10:27 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11105 byte(s)
Diff to previous 1591 , to selected 605
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 1591 - (view) (annotate) - [select for diffs]
Modified Fri Aug 15 14:00:53 2003 UTC (21 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11102 byte(s)
Diff to previous 1562 , to selected 605
Make the renderers deal correctly with raw vs. python level
representation of shape geometries

* Thuban/UI/baserenderer.py (BaseRenderer.low_level_renderer):
Return a flag useraw in addition to the callable and the parameter
to indicate whether the callable can deal with the raw shape data
or uses the higher level python lists of coordinates. The callable
now should accept either the raw data or the return value of the
shape's Points() method.
(BaseRenderer.draw_shape_layer): Adapt to the low_level_renderer
change
(BaseRenderer.projected_points): Instead of the shape id use the
points list as parameter.
(BaseRenderer.draw_polygon_shape, BaseRenderer.draw_arc_shape)
(BaseRenderer.draw_point_shape): Adapt to projected_points()
change and accept the points list as parameter instead of the
shape id.

* Thuban/UI/renderer.py (MapRenderer.low_level_renderer): Return
the useraw flag as required by the BaseRenderer
(ScreenRenderer.draw_shape_layer): Adapt to low-level renderer
changes.

* test/test_baserenderer.py
(TestBaseRenderer.test_point_with_classification): New test for
rendering a map with classifications.


Revision 1562 - (view) (annotate) - [select for diffs]
Modified Thu Aug 7 17:53:37 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10912 byte(s)
Diff to previous 1552 , to selected 605
(MapRenderer.low_level_renderer): Check
the raw data format and only use an optimized version of its a
shapefile.


Revision 1552 - (view) (annotate) - [select for diffs]
Modified Wed Aug 6 17:21:32 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10818 byte(s)
Diff to previous 1539 , to selected 605
* Thuban/UI/renderer.py (MapRenderer): Most of the code/methods in
this class is now in BaseRenderer. This class is now practically
only a specialization of BaseRenderer for rendering to an actual
wx DC.
(ScreenRenderer.draw_shape_layer): Use self.low_level_renderer()
to get the shapetype specific rendering functions.

* test/test_baserenderer.py: New. Test cases for BaseRenderer

* Thuban/UI/view.py (MapCanvas.__init__): New instance variable
error_on_redraw to guard agains endless loops and stack overflows
when there's a bug in the rendering code that raises exceptions.
(MapCanvas.OnIdle, MapCanvas._do_redraw): Split the actual
rendering into a separate method _do_redraw so that error handling
is a bit easier. When an exception occurs, set error_on_redraw to
true. When it's true on entry to OnIdle do nothing and return
immediately.


Revision 1539 - (view) (annotate) - [select for diffs]
Modified Fri Aug 1 14:27:57 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19037 byte(s)
Diff to previous 1481 , to selected 605
Import the SHAPETYPE_* constants from data
instead of layer.


Revision 1481 - (view) (annotate) - [select for diffs]
Modified Thu Jul 24 17:52:59 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19015 byte(s)
Diff to previous 1467 , to selected 605
(ScreenRenderer.draw_shape_layer): Remove
superfluous code to set brush and pen for point shapes


Revision 1467 - (view) (annotate) - [select for diffs]
Modified Tue Jul 22 14:02:57 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19091 byte(s)
Diff to previous 1452 , to selected 605
(MapRenderer.render_map): Wrap method
        with Begin/EndDrawing() calls to ensure we aren't doing to
        many updates to the dc during rendering.
(ScreenRenderer.draw_shape_layer): self.draw_point_shape takes
        a pen and brush argument so they need to be passed to the function.


Revision 1452 - (view) (annotate) - [select for diffs]
Modified Fri Jul 18 12:57:59 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19143 byte(s)
Diff to previous 1434 , to selected 605
* 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 1434 - (view) (annotate) - [select for diffs]
Modified Wed Jul 16 13:24:39 2003 UTC (21 years, 7 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19142 byte(s)
Diff to previous 1419 , to selected 605
(MapRenderer.draw_shape_layer): Get the classification field from layer.


Revision 1419 - (view) (annotate) - [select for diffs]
Modified Tue Jul 15 09:29:18 2003 UTC (21 years, 7 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19125 byte(s)
Diff to previous 1343 , to selected 605
(MapRenderer.draw_shape_layer): Rework the
draw_func handling a bit to remove one layer of indirection. This
makes the renderer about 10% faster in the non-classifying case
and the code a bit cleaner
(MapRenderer.draw_point_shape): Add the pen and brush parameters
and set them in the dc. Now the draw_point_shape method and
wxproj's draw_polygon_shape function have basically the same
signature so that both can be directly used as draw_func


Revision 1343 - (view) (annotate) - [select for diffs]
Modified Tue Jul 1 16:11:08 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19295 byte(s)
Diff to previous 1324 , to selected 605
Fixes RTbug #1971.


Revision 1324 - (view) (annotate) - [select for diffs]
Modified Tue Jul 1 09:28:47 2003 UTC (21 years, 8 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19307 byte(s)
Diff to previous 1298 , to selected 605
Reverse List of layers to render in same order as in desktop legend.


Revision 1298 - (view) (annotate) - [select for diffs]
Modified Tue Jun 24 18:00:26 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19250 byte(s)
Diff to previous 1234 , to selected 605
(ExportRenderer.render_legend):
        Check that a layer has a classification before trying
        to get it. Raster layers don't have classifications.


Revision 1234 - (view) (annotate) - [select for diffs]
Modified Wed Jun 18 14:47:38 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 19116 byte(s)
Diff to previous 1219 , to selected 605
Check for gdal support before importing gdalwarp.
(MapRenderer.render_map): Only try to optimize if we have gdal
        support otherwise nothing will get drawn.
(MapCanvas.FitMapToWindow): This may be called during startup
        before a map has been created. Check if map is None before
        using it and do nothing if it is.


Revision 1219 - (view) (annotate) - [select for diffs]
Modified Mon Jun 16 17:42:54 2003 UTC (21 years, 8 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 18997 byte(s)
Diff to previous 1165 , to selected 605
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 1165 - (view) (annotate) - [select for diffs]
Modified Thu Jun 12 12:42:10 2003 UTC (21 years, 8 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 18957 byte(s)
Diff to previous 1103 , to selected 605
(MapRenderer.render_map): Only try to
        optimize if a raster layer is visible. Fixes RTbug #1931.
        Only draw the raster layer if the gdal library is available.
        Addresses RTbug #1877.


Revision 1103 - (view) (annotate) - [select for diffs]
Modified Fri May 30 06:29:25 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 18679 byte(s)
Diff to previous 965 , to selected 605
(MapRenderer.draw_raster_layer): Call
        ProjectRasterFile with tuple arguments instead of strings.


Revision 965 - (view) (annotate) - [select for diffs]
Modified Wed May 21 17:24:22 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 18706 byte(s)
Diff to previous 938 , to selected 605
(MapRenderer.render_map): Check if scale
        has gone to 0 which is a serious problem. abort.
(MapRenderer.draw_raster_layer): Catch IOError seperately and
        print the error from GDAL.


Revision 938 - (view) (annotate) - [select for diffs]
Modified Tue May 20 15:25:10 2003 UTC (21 years, 9 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 18676 byte(s)
Diff to previous 909 , to selected 605
(MapRenderer.render_map): Add support for rendering RasterLayer layers.
(MapRenderer.draw_raster_layer): Actually method that calls
        the GDALWarp python wrapper and constructs an image from the
        data returned.


Revision 909 - (view) (annotate) - [select for diffs]
Modified Fri May 16 16:23:12 2003 UTC (21 years, 9 months ago) by frank
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 16554 byte(s)
Diff to previous 882 , to selected 605
ExportRenderer): New, derived from ScreenRenderer. Renders
	Map, Legend and Scalebar for export.
(PrinterRenderer): New, derived from ExportRenderer. Replaces the old
	PrintRender.


Revision 882 - (view) (annotate) - [select for diffs]
Modified Fri May 9 16:34:28 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11112 byte(s)
Diff to previous 837 , to selected 605
Explicit imports.


Revision 837 - (view) (annotate) - [select for diffs]
Modified Tue May 6 15:53:20 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11098 byte(s)
Diff to previous 798 , to selected 605
(MapRenderer.draw_shape_layer): Adapt to
new table interface


Revision 798 - (view) (annotate) - [select for diffs]
Modified Wed Apr 30 17:02:04 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11096 byte(s)
Diff to previous 686 , to selected 605
(MapRenderer.draw_shape_layer): Optimize
        the rendering loop by reducing the number of if's, removing the
        unnecessary try/except block, and checking if the old group
        is the same as the new one (which happens a lot if there is
        no classification, or lots of shapes are in the same group).


Revision 686 - (view) (annotate) - [select for diffs]
Modified Wed Apr 16 13:22:25 2003 UTC (21 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 11121 byte(s)
Diff to previous 676 , to selected 605
Safer implementation of the performance enhancements of the
low-level renderer:

* extensions/thuban/wxproj.cpp (extract_projection)
(extract_pointer): Rename extract_projection to extract_pointer
and redefine its purpose to return the pointer stored in a CObject
returned by the object's cobject method. Update all callers.
(s_draw_info, free_draw_info, draw_polygon_init): Implement the
handling of these low-level parameters so that each s_draw_info
instance is handled as a CObject at python level that also
contains real references to the actual python objects which
contain the values in the struct. Add free_draw_info as the
destructor.
(draw_polygon_shape): Add the py_draw_info parameter which must a
cobject containing an s_draw_info pointer.

* Thuban/UI/renderer.py (MapRenderer.polygon_render_param): New
method to instantiat the low-level render parameter
(MapRenderer.draw_shape_layer): Use the new method. Remove some
commented out code.
(MapRenderer.draw_polygon_shape): Make the first parameter not the
layer but the low-level render parameter
(ScreenRenderer.draw_shape_layer): Use the low-level render
parameter.


Revision 676 - (view) (annotate) - [select for diffs]
Modified Tue Apr 15 19:20:40 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10901 byte(s)
Diff to previous 642 , to selected 605
(MapRenderer.draw_shape_layer): Make drawing initialization call to
        draw_polygon_init()
(MapRenderer.draw_polygon_shape): Use new signature of draw_polygon_shape.


Revision 642 - (view) (annotate) - [select for diffs]
Modified Thu Apr 10 14:41:50 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10577 byte(s)
Diff to previous 641 , to selected 605
fixed bug where if there was no classification and the default was hidden,
the default was still being drawn.


Revision 641 - (view) (annotate) - [select for diffs]
Modified Thu Apr 10 14:36:19 2003 UTC (21 years, 10 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10639 byte(s)
Diff to previous 610 , to selected 605
(MapRenderer.draw_shape_layer): Only draw visible groups.


Revision 610 - (view) (annotate) - [select for diffs]
Modified Fri Apr 4 13:56:59 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10476 byte(s)
Diff to previous 605
Rename Color.None to Color.Transparent.


Revision 605 - (view) (annotate) - [selected]
Modified Fri Apr 4 12:16:13 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10455 byte(s)
Diff to previous 588
Fix assert calls.


Revision 588 - (view) (annotate) - [select for diffs]
Modified Tue Apr 1 15:58:02 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10456 byte(s)
Diff to previous 574 , to selected 605
(MapRenderer.draw_point_shape): Check
        that there actually are points in the returned list of points
        before trying to index into the list. The list may be empty if
        the shape is a Null Shape.


Revision 574 - (view) (annotate) - [select for diffs]
Modified Fri Mar 28 17:07:26 2003 UTC (21 years, 11 months ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10364 byte(s)
Diff to previous 535 , to selected 605
(MapRenderer.__init__): Added assert
        to check if scale > 0. Trying to track down a divide by zero.


Revision 535 - (view) (annotate) - [select for diffs]
Modified Fri Mar 14 20:42:18 2003 UTC (21 years, 11 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10336 byte(s)
Diff to previous 468 , to selected 605
Implement multiple selected shapes

* Thuban/UI/selection.py: New module with a class to represent the
selection.

* Thuban/UI/messages.py (SELECTED_TABLE, SELECTED_MAP): Remove
these unused messages

* Thuban/UI/application.py (ThubanApplication.OnInit)
(ThubanApplication.OnExit, ThubanApplication.SetSession): The
interactor is gone now.
(ThubanApplication.CreateMainWindow): There is no interactor
anymore so we pass None as the interactor argument for now for
compatibility.

* Thuban/UI/view.py (MapCanvas.delegated_messages)
(MapCanvas.Subscribe, MapCanvas.Unsubscribe): In Subscribe and
Unsubscribe, delegate messages according to the delegated_messages
class variable.
(MapCanvas.__getattr__, MapCanvas.delegated_methods): Get some
attributes from instance variables as described with the
delegated_methods class variable.
(MapCanvas.__init__): New instance variable selection holding the
current selection
(MapCanvas.do_redraw): Deal with multiple selected shapes. Simply
pass them on to the renderer
(MapCanvas.SetMap): Clear the selection when a different map is
selected.
(MapCanvas.shape_selected): Simple force a complete redraw. The
selection class now takes care of only issueing SHAPES_SELECTED
messages when the set of selected shapes actually does change.
(MapCanvas.SelectShapeAt): The selection is now managed in
self.selection

* Thuban/UI/mainwindow.py (MainWindow.delegated_messages)
(MainWindow.Subscribe, MainWindow.Unsubscribe): In Subscribe and
Unsubscribe, delegate messages according to the delegated_messages
class variable.
(MainWindow.delegated_methods, MainWindow.__getattr__): Get some
attributes from instance variables as described with the
delegated_methods class variable.
(MainWindow.__init__): The interactor as ivar is gone. The
parameter is still there for compatibility. The selection messages
now come from the canvas.
(MainWindow.current_layer, MainWindow.has_selected_layer):
Delegate to the the canvas.
(MainWindow.LayerShowTable, MainWindow.Classify)
(MainWindow.identify_view_on_demand): The dialogs don't need the
interactor parameter anymore.

* Thuban/UI/tableview.py (TableFrame.__init__)
(LayerTableFrame.__init__, LayerTableFrame.OnClose)
(LayerTableFrame.row_selected): The interactor is gone. It's job
from the dialog's point of view is now done by the mainwindow,
i.e. the parent. Subscribe to SHAPES_SELECTED instead
of SELECTED_SHAPE

* Thuban/UI/dialogs.py (NonModalDialog.__init__): The interactor
is gone. It's job from the dialog's point of view is now done by
the mainwindow, i.e. the parent.

* Thuban/UI/classifier.py (Classifier.__init__): The interactor is
gone. It's job from the dialog's point of view is now done by the
mainwindow, i.e. the parent.

* Thuban/UI/tree.py (SessionTreeView.__init__): The interactor is
gone. It's job from the dialog's point of view is now done by the
mainwindow, i.e. the parent.
(SessionTreeCtrl.__init__): New parameter mainwindow which is
stored as self.mainwindow. The mainwindow is need so that the tree
can still subscribe to the selection messages.
(SessionTreeCtrl.__init__, SessionTreeCtrl.unsubscribe_all)
(SessionTreeCtrl.update_tree, SessionTreeCtrl.OnSelChanged): The
selection is now accessible through the mainwindow. Subscribe to
SHAPES_SELECTED instead of SELECTED_SHAPE

* Thuban/UI/identifyview.py (IdentifyView.__init__): Use the
SHAPES_SELECTED message now.
(IdentifyView.selected_shape): Now subscribed to SHAPES_SELECTED,
so deal with multiple shapes
(IdentifyView.__init__, IdentifyView.OnClose): The interactor is
gone. It's job from the dialog's point of view is now done by the
mainwindow, i.e. the parent.

* Thuban/UI/renderer.py (ScreenRenderer.RenderMap): Rename the
selected_shape parameter and ivar to selected_shapes. It's now a
list of shape ids.
(MapRenderer.draw_label_layer): Deal with multiple selected
shapes. Rearrange the code a bit so that the setup and shape type
distinctions are only executed once.


Revision 468 - (view) (annotate) - [select for diffs]
Modified Wed Mar 5 18:19:13 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10263 byte(s)
Diff to previous 442 , to selected 605
(MapRenderer.draw_shape_layer): Only get the layer classification once.
Don't try to classify values when the field is None: just use the default
properties.


Revision 442 - (view) (annotate) - [select for diffs]
Modified Thu Feb 27 15:55:25 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10043 byte(s)
Diff to previous 432 , to selected 605
Use new Classification and Group functions.  Use common.py functions.


Revision 432 - (view) (annotate) - [select for diffs]
Modified Mon Feb 24 18:47:36 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10178 byte(s)
Diff to previous 424 , to selected 605
(MapRenderer.draw_shape_layer): Change
        Classification method name from GetProperties to GetClassData.


Revision 424 - (view) (annotate) - [select for diffs]
Modified Mon Feb 24 14:17:07 2003 UTC (22 years ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10179 byte(s)
Diff to previous 416 , to selected 605
(MapRenderer.draw_shape_layer): Remove
unneeded Shape() call. Rendering is substantially faster without
it and it avoids some problems with broken shape files.


Revision 416 - (view) (annotate) - [select for diffs]
Modified Wed Feb 19 16:53:08 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10208 byte(s)
Diff to previous 394 , to selected 605
Use new Color and Classification methods.


Revision 394 - (view) (annotate) - [select for diffs]
Modified Mon Feb 10 15:27:13 2003 UTC (22 years ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10106 byte(s)
Diff to previous 374 , to selected 605
* Thuban/UI/renderer.py (MapRenderer): Use the Get*() methods
        of the ClassData class.


Revision 374 - (view) (annotate) - [select for diffs]
Modified Mon Jan 27 14:20:02 2003 UTC (22 years, 1 month ago) by jan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10043 byte(s)
Diff to previous 362 , to selected 605
Replace user string by _() for i18n.


Revision 362 - (view) (annotate) - [select for diffs]
Modified Mon Jan 27 11:39:03 2003 UTC (22 years, 1 month ago) by jonathan
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 10018 byte(s)
Diff to previous 290 , to selected 605
added support for drawing classifications


Revision 290 - (view) (annotate) - [select for diffs]
Modified Thu Aug 29 14:11:28 2002 UTC (22 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 9406 byte(s)
Diff to previous 148 , to selected 605
(ScreenRenderer.draw_shape_layer): Handle
arcs with multiple parts.


Revision 148 - (view) (annotate) - [select for diffs]
Modified Tue May 7 16:40:29 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 9314 byte(s)
Diff to previous 144 , to selected 605
	* Thuban/UI/renderer.py
	(ScreenRenderer.layer_ids, ScreenRenderer.draw_shape_layer): The
	update box is now directly a tuple, not a wxRect anymore.


Revision 144 - (view) (annotate) - [select for diffs]
Modified Tue May 7 14:54:02 2002 UTC (22 years, 10 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 9284 byte(s)
Diff to previous 76 , to selected 605
	* Thuban/UI/renderer.py (MapRenderer.layer_ids): New method to
	return the shape ids to be rendered in a given layer.
	(MapRenderer.draw_shape_layer): Call layer_ids to get the list of
	ids.
	(ScreenRenderer.RenderMap): New parameter
	for the rectangle that has to be updated
	(ScreenRenderer.layer_ids): Make use of the layer's quadtree by
	calling it's ShapesInRegion method.


Revision 76 - (view) (annotate) - [select for diffs]
Modified Mon Feb 4 19:23:30 2002 UTC (23 years, 1 month ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 7303 byte(s)
Diff to previous 6 , to selected 605
	* Thuban/UI/renderer.py (MapRenderer.draw_shape_layer): Honour the
	stroke_width attribute


Revision 6 - (view) (annotate) - [select for diffs]
Added Tue Aug 28 15:41:52 2001 UTC (23 years, 6 months ago) by bh
Original Path: trunk/thuban/Thuban/UI/renderer.py
File length: 7244 byte(s)
Diff to selected 605
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