QGIS 0.9.2rc1, loading symbology style issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

QGIS 0.9.2rc1, loading symbology style issue

Michael Hove
QGIS 0.9.2rc1, loading symbology style issue

If a Symbology style is saved from one layer and then loaded into a new
layer, the layer is renamed with the name of the layer from which the  
style
was generated. Should not the <id> and <layername> of the layer into  
which
the style is being loaded be preserved, rather than replaced from the  
loaded
style?

 From qml file before loading style:
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="0.9.2rc1-Ganymede" >
   <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0"
geometry="Polygon" type="vector" >
     <id>soils_Brown_AWC20080203131757664</id>

<datasource>/Users/rcline/GIS/soils/brown/soil_sd013/spatial/
soils_Brown_AWC
.shp</datasource>
     <layername>soils_Brown_AWC</layername>


 From qml file after loading styel from other layer:
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="0.9.2rc1-Ganymede" >
   <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0"
geometry="Polygon" type="vector" >
     <id>soils_Dickey_AWC20080201151406028</id>

<datasource>/Users/rcline/GIS/soils/brown/soil_sd013/spatial/
soils_Brown_AWC
.shp</datasource>
     <layername>soils_Dickey_AWC</layername>
     <srs>

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS 0.9.2rc1, loading symbology style issue

Tim Sutton
Hi

We did discuss this a bit, but its problematic to do this in that part
of the 'style' may be to set a more user friendly name. Also applying
a default style from one layer to another could cause problems if they
have different attributes etc. At the moment I dont have a good
solution for these issues - though I can see why people might want to
copy and paste a qml for multiple layer to speed up symbolisation in
these cases....

Regards

Tim

2008/2/7, Michael Hove <[hidden email]>:

> QGIS 0.9.2rc1, loading symbology style issue
>
> If a Symbology style is saved from one layer and then loaded into a new
> layer, the layer is renamed with the name of the layer from which the
> style
> was generated. Should not the <id> and <layername> of the layer into
> which
> the style is being loaded be preserved, rather than replaced from the
> loaded
> style?
>
>  From qml file before loading style:
> <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
> <qgis version="0.9.2rc1-Ganymede" >
>    <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0"
> geometry="Polygon" type="vector" >
>      <id>soils_Brown_AWC20080203131757664</id>
>
> <datasource>/Users/rcline/GIS/soils/brown/soil_sd013/spatial/
> soils_Brown_AWC
> .shp</datasource>
>      <layername>soils_Brown_AWC</layername>
>
>
>  From qml file after loading styel from other layer:
> <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
> <qgis version="0.9.2rc1-Ganymede" >
>    <maplayer minScale="1" maxScale="1e+08" scaleBasedVisibilityFlag="0"
> geometry="Polygon" type="vector" >
>      <id>soils_Dickey_AWC20080201151406028</id>
>
> <datasource>/Users/rcline/GIS/soils/brown/soil_sd013/spatial/
> soils_Brown_AWC
> .shp</datasource>
>      <layername>soils_Dickey_AWC</layername>
>      <srs>
>
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
>


--
Tim Sutton
QGIS Project Steering Committee Member - Release  Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: QGIS 0.9.2rc1, loading symbology style issue

Maciej Sieczka - old
Tim Sutton pisze:

> We did discuss this a bit, but its problematic to do this in that part
> of the 'style' may be to set a more user friendly name. Also applying
> a default style from one layer to another could cause problems if they
> have different attributes etc.

In case of GRASS layers problems include crashes. Example:

1. Create a qml for any layer.
2. Add a GRASS vector that has a not exactly matching table.
3. Load the qml for the GRASS vector layer, Apply - segfault:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1264494912 (LWP 300)]
0xb6f4bf62 in QgsVectorLayer::draw (this=0x85e6ef8, p=0xbfa9a43c,
     viewExtent=@0xbfa9a280, theMapToPixelTransform=0x859fa58, ct=0x0,
     drawingToEditingCanvas=true, widthScale=1, symbolScale=1)
     at /home/mms/src/straight/qgis09/src/core/qgsvectorlayer.cpp:758
758         mDataProvider->updateFeatureCount();
(gdb) bt
#0  0xb6f4bf62 in QgsVectorLayer::draw (this=0x85e6ef8, p=0xbfa9a43c,
     viewExtent=@0xbfa9a280, theMapToPixelTransform=0x859fa58, ct=0x0,
     drawingToEditingCanvas=true, widthScale=1, symbolScale=1)
     at /home/mms/src/straight/qgis09/src/core/qgsvectorlayer.cpp:758
#1  0xb6f4cc81 in QgsVectorLayer::draw (this=0x85e6ef8, p=0xbfa9a43c,
     viewExtent=@0xbfa9a280, theMapToPixelTransform=0x859fa58, ct=0x0,
     drawingToEditingCanvas=true)
     at /home/mms/src/straight/qgis09/src/core/qgsvectorlayer.cpp:720
#2  0xb6f0f02a in QgsMapRender::render (this=0x85a09f0, painter=0xbfa9a43c)
     at /home/mms/src/straight/qgis09/src/core/qgsmaprender.cpp:277
#3  0xb6deae3c in QgsMapCanvasMap::render (this=0x85d6550)
     at /home/mms/src/straight/qgis09/src/gui/qgsmapcanvasmap.cpp:84
#4  0xb6de5c6a in QgsMapCanvas::refresh (this=0x85a0080)
     at /home/mms/src/straight/qgis09/src/gui/qgsmapcanvas.cpp:365
#5  0xb6e09f81 in QgsMapCanvas::qt_metacall (this=0x85a0080,
     _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbfa9a53c)
     at /home/mms/src/straight/qgis09/build/src/gui/moc_qgsmapcanvas.cxx:109
#6  0xb718bc04 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#7  0xb718c079 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#8  0xb6fa2d43 in QgsMapLayer::repaintRequested (this=0x85e6ef8)
     at /home/mms/src/straight/qgis09/build/src/core/moc_qgsmaplayer.cxx:132
#9  0xb6f4972f in QgsVectorLayer::triggerRepaint (this=0x85e6ef8)
     at /home/mms/src/straight/qgis09/src/core/qgsvectorlayer.cpp:976
#10 0x082225d5 in QgsVectorLayerProperties::apply (this=0x8a2ec00)
     at
/home/mms/src/straight/qgis09/src/app/qgsvectorlayerproperties.cpp:329
#11 0x082a7c6a in QgsVectorLayerProperties::qt_metacall (this=0x8a2ec00,
     _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbfa9afac)
     at
/home/mms/src/straight/qgis09/build/src/app/moc_qgsvectorlayerproperties.cxx:100
#12 0xb718bc04 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb718be00 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#14 0xb7bc23c8 in QAbstractButton::clicked () from /usr/lib/libQtGui.so.4
#15 0xb796d878 in ?? () from /usr/lib/libQtGui.so.4
#16 0x08aa1050 in ?? ()
#17 0x00000000 in ?? ()

Maciek
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user