Saturday, 3 March 2018

Does QGIS have the equivalent of ArcGIS's Layer (*.LYR) file?


Using ArcMap, it is possible to add a dataset (eg a shapefile) to the map, and configure the layer's properties (such as the symbology, table joins, switching some attributes off in the Identify results, etc).


This layer can then be saved as a Layer file:


enter image description here


The resulting *.lyr file references the data source (the shapefile) and all of the properties which have been configured for that layer. This makes it easy to add this same layer to multiple map documents, inheriting all of the properties which have been set.


Is there an equivalent in QGIS?



Answer



It does now :)



Only in the dev version but something like this could be added in an older release using a plugin. If I get some time I might just do that.


enter image description here


enter image description here


A QGIS Layer Definition file will have the *.qlr extension and is a XML dump of the maplayer node for the project.


The start of the file will look like this:




F:/gis_data/cadastre.shp






cadastre
... {style, etc}

QGIS 2.8 Update


As of 2.8 QLR files now support many layers as well as groups. Right click on a group in the legend to save it out to a QLR file everything under the group will be saved to the QLR file.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...