Hi,

I'm wondering if there is an easy way to put the (mostly colors) of a 
Point-layer upon another Polygon layer.
(I recall Andreas also wrote about this?)

Usecase: having a layer with a lot of measuring points on it, rule-based styled 
on value.
Creating a Voronoi-layer from it, and being able to use the (point) rules on 
that polygons (having the same value)..

I'm able to 'do this' by saving as qml and then hand editing some properties:

class="SimpleMarker"
to
class="SimpleFill"

<symbol name="0" clip_to_extent="1" force_rhr="0" alpha="1" type="marker">
to
<symbol name="0" clip_to_extent="1" force_rhr="0" alpha="1" type="fill">

<layerGeometryType>o</layerGeometryType>
to
<layerGeometryType>2</layerGeometryType>


But I wondered if there is/should be a 'cleaner' way.

Tried [0]:
renderer = layer1.rendererV2()
layer2.setRenderer(renderer)
but that crashes QGIS if you try to open/change a symbol.

Is there a way to do this easier then:
- walk over the rules
- create a QgsSymbolV2.defaultSymbol(layer.geometryType())'s
- copy over some properties...

I'm aware that off course there is a big difference between the point and 
polygon styles/renderers, but I also think it would be nice to be able to (in 
QGIS itself) to 'copy' the point style to a polygon style and only take with it 
whatever 'fits'?

Anybody some info/idea's?

Regards,

Richard Duivenvoorde


[0] 
https://snorfalorpagus.net/blog/2014/03/04/symbology-of-vector-layers-in-qgis-python-plugins/
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to