Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [qgis-2]

Version 2.x of QGIS (previously Quantum GIS)

0
votes
1answer
16 views

Replacement for legendInterface in QGIS 3

I am a novice to QGIS tasked with updating other developers' plugins from QGIS 2 to QGIS 3. Here's the code I need to replace: legend = self.iface.legendInterface() index = legend.addGroup('...
0
votes
0answers
9 views

QGIS 2.18 GDAL tool path wrong. gdalbuildvrt: command not found

Can't seem to get any GDAL operation working. For example QGIS 2.18 crashes when doing a raster calculation. Also it fails to build VRT catalogue. I looked in the Plugins manager and installer what ...
0
votes
0answers
11 views

Uninstall QGIS 2.18 from mac and reinstall. Remembers settings

Relates to Mac OS 10.14. I have problems with QGIS 2.18. Plugins not working etc. (latest problem is not being able to make a virtual raster catalogue of landsat 8 tiles. Error message : "The ...
0
votes
0answers
7 views

configuration file not found

Every time at startup this message shows (and reappears a second time after clicking it away). And everytime I quit QGIS 2.18 the same message shows. How do I get rid of it ? I imagine it has to do ...
1
vote
0answers
10 views

QGIS quit unexpectedly

Running QGIS 2.18 on Mac OS 10.14. Python 2.7 and GDAL 2.1 installed. Trying to clip raster by polygon. (raster--> extraction --> clipper) Get error message. ("qgis 2.18 clipper The process failed ...
1
vote
0answers
9 views

Cannot find Grass7 folder in QGIS 2.18 content folder

I have freshly re-installed QGIS 2.18.28 in the prescribed order. I was under the impression Grass7 in included in one of the install packages. But when trying to point QGIS to the grass7 folder under ...
-5
votes
0answers
33 views

Making another layer dependent on field values in QGIS? [on hold]

Could you help me to achieve the automation written in point no 5 of this query: Automate filling of attribute table using QGIS?
0
votes
0answers
19 views

Looping group of layers and keeping another layer on in QGIS?

While using loop visible layer plugin, it simply makes a loop of a predefined group of layers, rest of the layers are turned off. What I want is to keep a vector layer on and visible all the time ...
3
votes
0answers
21 views

QGIS tile cache not working

I'm new to QGIS and work on an air-gapped system where I have access only to QGIS 2.14.9-Essen. I create a WMS layer, which "works" but performance is abysmal. So I enable caching (Settings > Network) ...
1
vote
0answers
22 views

Is it possible to put grid lines with coordinates in a PyQGIS standalone script?

I just want to know is it possible to put gridlines and border with coordinates (lat, lon) in an image in a standalone pyqgis script. I have checked almost all cookbooks about python ang qgis and ...
1
vote
1answer
31 views

How are the joined results different between choosing “Only keep matching records” and “Keep all records”?

I don't really understand the main difference between these two functions? What are the key differences between these two options and why are they different? Like what makes these two so different ...
-1
votes
1answer
53 views

Importing animated GIFs in QGIS

Is it possible to import a animated GIF into QGIS? And is it also possible to georeference it, to have it on the right place?
1
vote
1answer
43 views

Analytical hierarchy process tool - SAGA. How to configure Pairwise comparisons table?

What is the configuration and extension (.txt, .csv ...) of the Pairwise comparisons table file requested by the SAGA AHP tool- Analytical Hierarchy Process - in QGIS? Are there examples of ...
0
votes
0answers
4 views

QGIS froze while downloading landsat data with semi-automatic classifications plugin

Landsat data download in Semi automatic classifications plugin was interrupted because QGIS froze. Is it possible to resume download or must I start all over again ? How do I reconnect to the ...
2
votes
1answer
54 views

Creating an Action in QGIS with multiple Expression?

I want to create an action in QGIS with multiple Expression. But unable to do so. I want to open images from two different directories with one action. Is it possible? How can I do so? e.g. Type : ...
1
vote
2answers
35 views

QGIS2 to QGIS3 plugin migration issue AttributeError: type object 'QObject' has no attribute 'connect' [duplicate]

I am trying to migrate a plugin. I have these two lines: QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Configuration.accept) QtCore.QObject.connect(self.buttonBox, ...
1
vote
0answers
34 views

Labelling layer not from attribute fields QGIS API v2.14?

How to label vector layer with my own values that aren't stored in the attribute fields?
1
vote
1answer
21 views

Trying to find the Qt5 version of QVBoxLayout

Migrating a plugin and started getting the error AttributeError: module 'qgis.PyQt.QtGui' has no attribute 'QVBoxLayout' I cannot find this one in the API changes I tied using qgis.PyQt5.QtGui but ...
1
vote
1answer
18 views

TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'

Similar question here, I tried the suggested answer but it didn't work for my situation. updating plugin from qgis 2 to 3. qRegisterResourceData . argument 2 has unexpected type 'str' I am ...
1
vote
0answers
25 views

QGIS 2.18 - Can't get click coordinates from mapCanvas

Trying to get click coordinates from map canvas but code is not working. Newbie for Python, pyqgis, pyqt I already check these topics but still code is NOT working 1 - QGIS 3 Get coordinates from ...
1
vote
2answers
39 views

qgis_version_2: add layer or group of layers always on the top of the legendInterface / Insert the layer at the top of the ToC

I have a code which is adding raster layeror group of raster layers, its working fine. I want to know if there is a way to add layer or group of the layers always on the top of the legend Interface? ...
1
vote
0answers
35 views

How to switch on snap option in QGIS 2.18 when creating customize polygon

How to switch on snap option in QGIS 2.18 when creating customize polygon as in: class customPoly(QgsMapToolEmitPoint): def __init__(self, iface): self.iface = iface QgsMapToolEmitPoint....
1
vote
0answers
42 views

Copying features certain number of times between layers in QGIS

On the image below, there are two layers showing the transportation network Red | current | only important objects | geometry repeats/overlaps Blue | new | required and other objects | ...
0
votes
0answers
27 views

QGIS server doesn't publish layers, that come from WMS source

I have a QGIS 2 project, that contains some layers from local sources, and a couple of "background layers" that come from "external" WMS sources. If I publish this project in QGIS server 2 the local ...
1
vote
0answers
56 views

Integrating User Defined Coordinate System into PyQGIS?

Here is my current code: #Loading of post-wrf(raster) files starts here crs = 'USER:100000' QSettings().setValue('/Projections/defaultBehaviour', 'useGlobal') QSettings().setValue('/Projections/...
1
vote
1answer
39 views

Counting features within other features

I've several files composed of elements like the one below which I'm trying to make sense of (essentially a very simple microtopography study). I've vectorised the image with lots of separate lines ...
4
votes
1answer
150 views

Filter vector layer by searching through complete attribute table - limitations and improvements

In a case were I have a shapefile with a lot of attributes (predominantly text), also I don't have any information about the structure and I don't have any idea in which attribute I have to search/...
3
votes
1answer
67 views

Counting number of roads between two points using QGIS

I use QGIS 2.18 and I have a point shapefile of many animal locations and a shapefile of roads. I want to use QGIS to tell me how many roads are between each pair of animal locations. So, basically ...
0
votes
1answer
37 views

Preserving geometry with Virtual Layer in QGIS 2

There is a polygon layer "Union23" that was created with 'Union' tool. Layer's attribute table includes the following values. My effort is simply to aggregate those polygons by "FLAECHEID" field ...
1
vote
1answer
90 views

Inherited values between polygons in QGIS? [duplicate]

In this project, I have three polygons, see the image below "Polygons_From", includes input attributes, i.g. "Value_1", "Value_2", "Value_3", and $area for each quadrate (on the image there are two ...
2
votes
0answers
74 views

Inverting shapefile in QGIS 2.18?

I asked a question earlier about how to invert my file "hydropolys.shp" from a vector of ocean and seas to a vector of land and got sent to here, but I am experiencing issues where using the "...
2
votes
1answer
52 views

UNION two LEFT JOINs as Virtual Layer in QGIS

In QGIS 2.18, there are two layers, e.g. "Locations" and "Connections" "Locations" has values Id | Dimension --------------- 1 | 4 2 | 8 3 | 2 "Connections" maintains attributes ...
7
votes
3answers
852 views

What happened to QGIS 2.x LTR?

I've been using QGIS 2.x LTR version for quite some time now (mostly for Lizmap webclient because 3.x didn't perform as well), but today as I wanted to install QGIS on another PC, I realized I couldn'...
1
vote
0answers
17 views

Saving individual figures in Print Composer in QGIS 2

Can anyone tell me how to save individual figures in QGIS print composer that I can later go back and edit? Do I have to create a new print composer for each figure? I am using QGIS 2.18.9.
1
vote
1answer
36 views

operator FIELD_NAME IS NULL is not working

I have a map of soil properties. I am trying to exclude areas that are designated for protection from a selection on this map. I have tried to use the following query: SOIL_TEXTURE = 'clay' AND ...
1
vote
1answer
58 views

QGIS filtering a whole field using NOT

I'd like to negate some values from my map using the NOT operator. However, i need to deselect a whole field which contains over 600 entries so I don't want to select each. Is there a way to do this?...
0
votes
0answers
42 views

Converting QGIS 3.6 Templates for use in QGIS 2.18?

How do I convert QGIS 3.6 Templates for use in QGIS 2.18? I have found plenty of stuff on converting the opposite way around.
5
votes
2answers
190 views

Adjusting flow map styles in QGIS 2

In one project, I am trying to adopt marvellous styles for flow maps created by @underdark a.k.a. Anita Graser. At this moment I have the following output Shapefile was created with the usage of ...
1
vote
0answers
55 views

Updating set of attributes on vector layer from .csv table?

I have over 1,000 records in a .shp file, all with a unique ID field (LINKID), along with many other fields containing data (TXTFLD1, TXTFLD2, INTFLD1, INTFLD2, etc). These records have been copied ...
3
votes
1answer
55 views

How to update the Layer Tree View after changing the color ramp in PyQGIS?

After changing a raster style/color ramp (wich is working properly to define the class colors and values) using: layer = processing.getObjectFromName('NDVIrec') provider = layer.dataProvider() ...
2
votes
2answers
82 views
+50

Geopackage - select on geometry column returns null

In DB Manager in QGIS 2.18.26 I want to select geometries in geopackage table. The returned geometry column is null but the source layer can be loaded as a geometry table in Qgis and i can read the ...
3
votes
1answer
70 views

PyQGIS: “for” loop with nested “if ..elif …” condition

I want to update an existing field according to another, it means the equivalent of a CASE WHEN .... THEN ..... ELSE .... END in SQL , but I want to know how to write this same update in Python for ...
1
vote
1answer
32 views

Filter options are not saving in Dissolve algorithm window through Graphical modeler in QGIS 2

I am working on my project in QGIS 2.18 through Graphical modeller and using some basic algorithms for polyline objects. However, I do not understand why specification for Dissolve algorithm cannot ...
1
vote
1answer
25 views

QgsMapToolEmitPoint.canvasReleaseEvent not firing with SHIFT modifier

I've created a plugin that implements a Map Tool. It captures mouse click events, which works fine. Now I want to capture Shift+Mouseclick. This doesn't work at all, while Alt+Mouseclick and Ctrl+...
1
vote
1answer
63 views

Using GRASS 7 in QGIS 2.18 on MacOS

Does anybody found a way to use GRASS 7 in QGIS 2.18 under MacOS? QGIS 2.18.19-2 is the latest version packaged with GRASS 7. For many reasons, all the following versions been have packaged with ...
1
vote
0answers
20 views

pyqgis: using gdalogr:rastercalculator not working

I have an Int16 - 16 bit GeoTiff and would like to do a simple calculation. Using the GUI in QGIS (raster calculator) it works without problems. The expression in the raster calculator is: ...
3
votes
1answer
58 views

Export as SVG with path / polygon IDs

I imported two layers to my Project (one is a shapefile from natural earth, the other is built out of lon/lat Points in a csv-data-file) QGIS fits the two graphics perfect together. Now my goal is to ...
2
votes
0answers
29 views

Count the number of points of a multipoint-feature [duplicate]

I try to use the fieldcalculator in QGIS 2.18 to count the number of points of a multipoint-feature. Is it possible?
1
vote
0answers
62 views

Difference between DEM raster in QGIS 2.18 and 3.4.4 [duplicate]

I came across a really strange problem. Untill today i always worked in QGIS 2.18. Now i wanted to upgraded to 3.4.4 ( it was already downloaded but hadn't used it yet) When opening my QGIS ...
3
votes
3answers
94 views

Automatically populate r.reclass rules based on table values

In QGIS I have a raster map showing land, snow and cloud zones, having resp. pixel values 1, 2, and 3. I extracted the mean altitude values (in m) of each zone on the basis of an underlying DEM and ...