Questions tagged [qml]

an XML file used to define a QGIS layer style.

Filter by
Sorted by
Tagged with
1
vote
0answers
18 views

Have QGIS read QML file when opening a project

Is it possible to have QML files which are read every time I open QGIS? I would like to edit these to reflect changes in the data (in my case I'd just need to change the HEX color codes), but I can't ...
1
vote
1answer
33 views

PyQGIS - setting color of existing categorised symbol (from .qml) crashes QGIS

I have several layers in a project which have existing style files applied. I want to modify the symbol color attributes using python. The symbols are QgsFillSymbol objects. This seems to work fine ...
1
vote
1answer
114 views

Setting QGIS style (QML) file via PyQGIS

I want to set QML style file to raster file and save as image. This code does not set the style file when I run it as standalone script. It works fine in QGIS's Python editor. There is no error in the ...
0
votes
0answers
26 views

Migrate from 2.* to 3.* value map interpreted as text edit widget

After switching to QGIS 3.* from 2.* some of my layers style forms are not working anymore. Fields that previously had value map applied to them is now showing as text edit. Is there a way of ...
1
vote
2answers
145 views

Transforming QML/SLD in XML with QGIS

I have a bunch of .qml and .sld files. I want to convert them to .xml, but I still haven't found a proper way to do it. Does anyone know any plugin or website that I can do this conversion?
1
vote
1answer
75 views

Exporting layer symbology using PyQGIS

I need to save the symbology of several layers and I would like to do it with a PyQGIS-3 script. I think I have to use the QgsMapLayerStyle class but I don't understand what is a QDocument and how to ...
1
vote
0answers
28 views

Guessing which .qml goes with every layer of a project

I have a project in QGIS (v3.8) containing 25 layers with different simbology. This simbology I know it is associated to a specific .qml file that is in a folder of my user profile in QGIS. Is there ...
0
votes
1answer
60 views

How to use Expressions in QML file in QGIS 3.x

I have a plugin that uses optional QML files for layer labels. If I use a standard field name for the value, it works fine, but if I use an expression, it will not display the label UNLESS I open and ...
2
votes
1answer
161 views

Reducing raster legend classes to the ones shown in my map in QGIS

I have a landcover raster layer. I use the styles of a QML-file. Is there an option to reduce my style classes shown in the legend to only the relevant classes shown in the map? The QML has 44 classes,...
3
votes
4answers
383 views

Applying style change to other layers using .qml-file in QGIS

I have a similar question as @drnextgis in this post: I made a change to the symbol colour of one value out of four categorised values and aim to automatically apply it to other layers in the same ...
5
votes
1answer
290 views

Downloading GitHub QML style file for use in QGIS

I am trying to download a QML-style from GitHub and add it to QGIS styles for use, this is how it looks like: How can I do this? I'd really like to use this style.
1
vote
0answers
26 views

Decent satellite map for open source project?

I'm working on a cheap open source sidewalk travelling delivery robot. I built a GUI using Qt/QML which (among other things) I use to view satellite data to identify and manually mark where sidewalks ...
4
votes
2answers
313 views

Can you edit a QGIS layer style file (.qml) to create random colors?

I have a .qml file that I am using on a project importing photos using the 'import photos' plugin. Every import batch needs to have the color manually changed after importing in order to distinguish ...
3
votes
1answer
177 views

Loading style from GeoPackage with PyQGIS

Reading the documentation I do not understand how the the row in layer_styles is specified (and why a table name has to be given)... layer.loadNamedStyleFromDatabase('/path/to/geopackage/','...
0
votes
0answers
50 views

Where do I find QGIS QML schema?

I have a set of GeoPackages created with QGIS. They have those layer_styles in it, which contain -- among other columns -- the styleQML column providing styling information. I am reading and ...
1
vote
0answers
71 views

Adding Text and defined placement to a label in SLD (from QML(QGIS))

I've created a beautiful rule-based Labeling format in QGIS 3.12. 1) I have added text to the labels. for example using the value : 'Beton' then the word Beton is added to the line 2) I also used ...
0
votes
1answer
170 views

QGIS QtQuick integration?

I would like to use QGIS with QtQuick. I can use QGIS with QtWidget with the libs that I downloaded from OSGeo4W but there is no qtquick libraries in there. In QGIS's website there is a demo with ...
2
votes
1answer
322 views

Write layer style .qml as predefined within a gpkg using R

I have this code to export a layer (Pbm) to a gpkg called "Atlas": writeOGR(Pbm, paste0(normalizePath(OutputFolder),'\\', "Atlas.gpkg"),"Atlas", driver="GPKG", encoding = "UTF-8", ...
1
vote
1answer
469 views

Create QML Widget with a picture in Attributes Form

I would like a Qmlwidget in the Attributes Form to show a picture. So far I have created the basic qml for a blue rectangle: import QtQuick 2.0 Rectangle { width: 100 height: 100 color: "...
0
votes
1answer
109 views

Assign layer style from qml file

I am adding a number of spatial csv files as layers and want to assign a qml layer style. import processing # User Dialog to pick Import_QGIS folder Folder_Path = QFileDialog.getExistingDirectory(...
2
votes
2answers
541 views

QGIS 3.4, how to add .qml style to sink in processing

How can I import a .qml style from a file and apply it to a sink? In QGIS 2.18, I used something like that script: output=QgsVectorLayer ('Point?crs=EPSG:2154','output', 'memory') path_style='./...
4
votes
1answer
441 views

Batch convert of viewer styles from QML to SLD

Until now I was saving styles in QML files. Now I need them in SLD to be used in GeoServer. Is there a way how to perform a batch convert?
2
votes
0answers
1k views

Batch converting .lyr to .qml?

I am looking for ways to make .lyr files usable in QGIS. It appears that they can be converted into an .sld file in ArcMap but according to one of the posts, they only store symbology and do not point ...
5
votes
0answers
357 views

Old .qml style (vector-polygons) from QGIS 2.18 in QGIS 3.4

I have a .qml polygon style file created with QGIS 2.18. It works to import until Version 3.2 without problem. But in 3.4 the style is loaded, but not applied/visualized. The Polygons dissappear ...
1
vote
0answers
247 views

How to set default QML styles in QGIS?

I need to analyze multiple GPX files with QGIS. My workflow so far is as follows: Add an OSM tile layer to serve as a map background. Import the GPX file as a vector layer, select the routes and ...
1
vote
2answers
10k views

Importing QML styles into QGIS

I have spent the day attempting this to no avail...I am a bit of a newbie to QGIS, but please help! I am trying to import the files at the bottom of: https://www.fscbiodiversity.uk/?q=...
2
votes
1answer
201 views

Defining no data in qml style file or python for QGIS

I am attempting to script a process that I undertake quite frequently, and have got everything working apart from one little step. Essentially I want to convert a singleband raster into a 3 band ...
1
vote
1answer
190 views

Automatically apply blending mode to raster

Currently using QGIS 2.18.24, but tested this on 2.14.18 as well. I'm trying to load a QML file for a raster with a specific blending mode ('multiply'), however QGIS only applies it until I click '...
2
votes
2answers
2k views

Problem with style file (.qml) loading in QGIS 3.2

I am trying to load a .qml style file to CORINE land cover maps, but the application generates an automatic color ramp. Dataset:http://geoforall.hu/sites/default/files/geodata/clc-series_hun.zip ...
14
votes
1answer
603 views

Creating a 'brick wall' style for polygons

I am trying to create a brick wall style for a vector polygon in QGIS 2 and 3. I can render a svg drawing of a brick wall with SVG fill (image below). But I do not want to use SVG since the style is ...
12
votes
2answers
2k views

QGIS Load Multiple styles on single layer at once

I have a set of qml style files saved that I apply to similar layers across multiple projects. An example would be a linetype shapefile layer with about a dozen different styles; currently I have to ...
3
votes
1answer
330 views

Proper assignment of QML legend to raster failed in QGIS 3.0.1

I downloaded raster data sets together with the legend qml files from the SoilGrids page (ftp://ftp.soilgrids.org/). Assignment of the qml legend (TAXOUSDA_1km/TAXN_WRB_1km) didn't work in QGIS 3, as ...
2
votes
0answers
57 views

Linked styles between .QGS projects

Is there a way to share (linked) a style form one project into other projects so that if I change the style in the "source" project, it's updated in the destination projects? QLR would be great if it ...
1
vote
1answer
2k views

Opening QML file in ArcGIS Desktop?

I have been trying to open a map which I downloaded from the ESA website. There are several files in the folder including .cpd, .csv, .dsr, .qml, .tif and so on. I was trying to open the .tif image ...
1
vote
0answers
81 views

Order of QML entries

In my styling file I have a value map with a certain order. But whenever I load it to QGIS the order changes. For example in my styling file I defined this. <edittype widgetv2type="ValueMap" name="...
3
votes
1answer
1k views

Load and convert .txt file to .qml for raster color map

I have a "QGIS Generated Color Map Export File" in .txt format. I'm trying to load it using QGIS 2.18 but the only file extension QGIS will accept is .qml file format. This question relates what I'm ...
1
vote
0answers
52 views

Ordnance Survey Northern Ireland OSNI .qml file for large scale vector data?

I am a new QGIS user, having moved across from Arc. I have access to OSNI (Ordnance Survey Northern Ireland) data and to .lyr files associated with them, but has anyone created a .qml file for the ...
2
votes
1answer
478 views

QGIS 2.18 - How to reference a svg symbol which is in the qml file's directory?

Relative path for svg symbols in .qml files works as expected if the svg file is in another directory than the .qml file's. Example : <prop k="name" v="../icons/symbol.svg"/> However, if the ...
7
votes
2answers
2k views

Converting ArcGIS raster colormap file (*.clr) to QGIS style file (*.qml)

I have an ArcGIS colormap (*.clr) and I want to open it in QGIS to apply a predefined style. The *.clr file is really simple, only has four columns representing [value] [red] [green] [blue], as this ...
2
votes
0answers
62 views

line_width from qml file not considered in my final output

I'm building a standalone pyQGIS script which creates a PNG from a Shapefile. During the creation process, I apply a style defined in a qml file (saved from QGIS). Below is an extract of the qml files ...
1
vote
0answers
424 views

QGIS - Automatically apply QML styles to Vector Layers within a VRT

I have created a VRT file that contains two vector files, one being made up of polygons, the other one points. My VRT file is as follows: <OGRVRTDataSource> <OGRVRTUnionLayer name="test"&...
1
vote
0answers
196 views

Is it possible to change widgets in QGIS when opening style-file with Python

When loading a QGIS-project using a Python-file and having the same name on both shp- and qml-file, just the symbology and labels are according to the style-file, but not the widgets. I have tried 2 ...
4
votes
1answer
728 views

Styling OS maps in QGIS 2.18 with QML

I'm trying to apply the OS QML (Full Colour) styles to OS Vector Map District shapefiles in QGIS 2.18.0 . Mostly, it works OK sometimes but I am having problems styling the roads. Roads are styled ...
0
votes
0answers
633 views

QGIS: Editing .qml files

I tried to follow these intructions on creating google-styled maps from osm-data. I have the SpatialLite data in QGIS (2.18) and now tried to load the styles provided by Anita. I open the properties ...
3
votes
0answers
193 views

QGIS categorised layer style import

Is there a way of importing categorised layer styles into style-manager? I have created a set of styles for certain layers based on attribute data, but am having to go via properties>styles>load style>...
3
votes
0answers
302 views

Adding multiple styles to single layer with pyQGIS? [closed]

On QGIS, I would like to programmatically assign multiple .qml styles to a single layer with python. I can add styles manually from the Properties dialog on the layer by selecting Styles->Add... ...
3
votes
1answer
414 views

Importing large OpenStreetMap database into QGIS?

I've got a large .osm file I'd like to load into QGIS and stylise with some QML files I downloaded from the web (https://github.com/anitagraser/QGIS-resources/blob/master/qgis2/osm_spatialite). The ...
11
votes
1answer
5k views

Loading style (*.qml file) to layer via PyQGIS?

Is there any way to load a *.qml file to layer and set a style to it in python (pyqgis)? Can I 'get into' this file in console? I want to review it.
1
vote
1answer
403 views

How to combine two QML files?

I am making a plugin. I have two QML files for the same layer and column. I want the plugin to combine the two existing files into a new QML file and then I will select which one symbol for each value ...
3
votes
2answers
1k views

Assign predefined legend style to raster layer via qml in QGIS [closed]

I work with rasterized extracts of CORINE data (V 18.5 gdb) in QGis. My layers however are not depicted in the colours that are standard for CORINE, but in different shades of red. From EEA i ...