[Qgis-user] QgsMeshLayer: Copying a MeshLayer style from an available dataset to another layer

Saber Razmjooei saber.razmjooei at lutraconsulting.co.uk
Thu Mar 16 02:37:25 PDT 2023


Hi Christian,

It is logical not to be able to copy and paste style if the mesh datasets
are not the same. It is consistent with the other parts of QGIS, for
example, you can not copy and paste style from a point layer to a line
layer.
My suggestion is to save the color ramp from hydro_as-2d (2nd layer in your
layer tree) > Submersion and apply it to hydro_as-2d (1st layer in your
layer tree) > Submersion.

It might be useful to file an enhancement ticket, so that if a mesh dataset
name matches, the style can be used for that specific dataset.

Also, worth upgrading to more recent versions of QGIS.

Kind regards
Saber

On Tue, 14 Mar 2023 at 17:48, Christian Naujoks via QGIS-User <
qgis-user at lists.osgeo.org> wrote:

> Hi,
>
> I use mesh layers to represent floodplains and flow depths.
>
>
> Question to the QgsMeshLayer users and QGIS developers - Core enhancement
> (QgsMeshLayer)
>
> Problem: Copying a MeshLayer style from an available dataset to another
> layer.
>
> A style can be transferred from one layer to a second layer by two
> different methods: Under the layer properties, the Style menu at the bottom
> of the dialog or Copy Style in the layer properties combo box (right mouse
> click).
>
>
> Misbehavior: A style can only be copied if the dataset is in the same
> position in the destination layer as in the source layer.
>
> Example files:
> https://www.namotec.de/asku/example.qgis.3.18.3-Zuerich%20(copy%20paste%20QgsMeshLayer%20Style).7z
>
>
> A dataset is displayed in the sequence (Source of Layer Properties, Mesh
> Layer) as it is read in from the solution file. It is not possible to move
> the position in the sequence.
>
>
> https://docs.qgis.org/3.22/en/docs/user_manual/working_with_mesh/mesh_properties.html?highlight=mesh#id21
>
>
> Is there a solution to this problem?
>
> Regards,
> Christian Naujoks
>
>
>
>
> QGIS version:
> 3.18.3-Zürich
> QGIS code revision
> 735cc85be9
> Compiled against Qt
> 5.11.3
> Running against Qt
> 5.11.3
> Compiled against GDAL/OGR
> 2.4.0
> Running against GDAL/OGR
> 2.4.0
> Compiled against GEOS
> 3.7.1-CAPI-1.11.1
> Running against GEOS
> 3.7.1-CAPI-1.11.1 27a5e771
> Compiled against SQLite
> 3.27.2
> Running against SQLite
> 3.27.2
> Compiled against PDAL
> 1.8.0
> Running against PDAL
> 1.8.0 (git-version: Release)
> PostgreSQL Client Version
> 11.11 (Debian 11.11-0+deb10u1)
> SpatiaLite Version
> 4.3.0a
> QWT Version
> 6.1.4
> QScintilla2 Version
> 2.10.4
> Compiled against PROJ
> 5.2.0
> Running against PROJ
> Rel. 5.2.0, September 15th, 2018
> OS Version
> LMDE 4 (debbie)
> Active python plugins
> lockzoom;
> zoom_level;
> qgis2web;
> OSMDownloader;
> db_manager;
> MetaSearch;
> processing
>
>
>
>
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>


-- 
Saber Razmjooei
www.lutraconsulting.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230316/9fe95b37/attachment.htm>


More information about the QGIS-User mailing list