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)

1
vote
0answers
26 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
13 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
49 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
37 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 ...
2
votes
1answer
75 views
+100

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
61 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
30 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
73 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
70 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
43 views

Creating Virtual Layer as a UNION of two LEFT JOINs in QGIS

In QGIS 2.18 I have two layers, e.g. "Locations" and "Connections" "Locations" has values Id | Dimension --------------- 1 | 4 2 | 8 3 | 2 "Connections" maintains attributes Origin ...
6
votes
3answers
768 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
34 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
37 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
163 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
47 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
49 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
1answer
42 views

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
63 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
31 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
19 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
50 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
43 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
28 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
59 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
78 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 ...
0
votes
1answer
26 views

KML polygon rainbow filled colors is showing only as simple color?

I draw filled color contour in Surfer application I imported this file to Google Earth as .kml file There is no problem so far I tried to import the same file to QGIS 2.18.28 But the colors is not ...
1
vote
1answer
40 views

QGIS 2.18: Import Result Table of a query into QGIS as pointlayer

I have a query which outputs a table with an unique nodeID and x-,y-coordinates. How can I import this query result table into qgis as an point-layer? I have tried it with the DB-Manager (see below)...
0
votes
0answers
18 views

QGIS 2.18 Workaround minidump in C [duplicate]

I have an input POINT-layer with lots of features in it. What I am trying to do is to calculate the azimuth for two features. And the way I am doing this is the following: geomFrom = (...).geometry() ...
0
votes
1answer
50 views

QGIS - online Bing basemap shifts when map is exported as a PDF [duplicate]

Using QGIS 2.18 “Las Palmas” Created a map to print using the “New Print Composer” extension. When working on this all polygons are perfectly in place. Once the map is saved as a PDF/Image the ...
0
votes
0answers
31 views

Difference tool becomes unresponsive and causes QGIS (2.18.24) to crash

I'm trying to find the difference between two layers (the first is a manitoba wide shapefile and the second is a layer that narrows down the water bodies of manitoba selected from another canadian ...
2
votes
2answers
137 views

How to remove the boundaries of a Polyline?

I have a polyline. I want to delete outside boundaries of that polyline. I achieved it by splitting the features of that polyline and selecting/deleting the outer lines/boundary. I'm thinking, is ...
0
votes
0answers
19 views

QGIS 2.18.12 Add Feature to Vector Layer Problem

I have created a new line vector layer and have attempted to add a linear feature. I finish editing, and the feature is depicted on the map. However, it does not show up in the attribute table. I WAS ...
0
votes
0answers
12 views

using multiple mapbox wmts baselayers with dififerent labels in QGIS composer

I have created two basemap layers in mapbox. https://api.mapbox.com/styles/v1/akrystos/cjr1epzf905a32sqhkwvjl5i7.html?fresh=true&title=true&access_token=pk....
0
votes
1answer
39 views

The new version of qgis (2.18.20) no longer scales maps in the print composer

I've used various versions of qgis to make maps and never had a problem scaling them until now. My system updated, including my version of qgis which has the scale option but doesn't apply it to the ...
3
votes
0answers
46 views

Unable to compute intersection between two polygons using PyQGIS?

I have two polygons in different layers. I am trying to find the intersect between the two polygons. Below a figure showing my test case. I initially wanted to find the intersect between the green ...
1
vote
1answer
55 views

Merging TIFF files using QGIS?

I have around 1200 tiff files (example below), and corresponding .tfw files and .aux files with sonar data that I'd need to merge into one file and I'm struggling to do so. I browsed some topics ...
3
votes
2answers
222 views

Creating polygon from hole in QGIS?

I work with this polygon and try to find a way to create a new polygon from the empty gap (not distinguish it) in the middle of the polygon. I succeed to do it with a "difference" tool- but used with ...
1
vote
1answer
48 views

Creating label coordinates in a virtual columns in QGIS 2.18

I'm working from a database (PostgreSQL/ PostGIS). I created a view in QGIS of joined polylines from one table with the ST_union function. I want to label this polylines in QGIS. So, I created 2 ...
1
vote
1answer
40 views

Line first,last node distance along another line QGIS

I am using QGIS 2.18.6 . I have created two line layers. First layer "testroad" with long line (road). Second with short lines along,near road. I would like to know distance of first and last point of ...
2
votes
1answer
47 views

Assigning function to a key in QGIS Plugin

I have trouble assigning function to a hotkey in my plugin. I have a class that does things with a mouse click. I'd like to assign another function to a keyboard key or sequence. I've tried two ...
2
votes
1answer
61 views

Cleaning topology errors in PostgreSQL (vector data) using QGIS?

I need to append the shapefiles to a PostgreSQL database. Once the data gets appended to PostgreSQL, some topology errors like gaps & overlaps can be seen. By using the v.clean tools the topology ...
0
votes
1answer
49 views

QGIS Print composer using margin and scale

When using the Atlas feature in the print composer is there any way of using both the Margin around feature and a defined scale?
1
vote
1answer
29 views

Moving points by multiple attributes automatically

I have a shapefile including sightings of birds (points), but the gps points are taken from where the sighting have been made, not where the bird actually are. And in the map I need to show the real ...
2
votes
0answers
52 views

Closest features from a mouse click – altering selection if a feature has already been found

I have a working code that selects 4 closest points from a mouse click and creates a convex hull using the selection. def canvasReleaseEvent(self, mouseEvent): """ Each time the mouse is ...
2
votes
1answer
45 views

How to create a valid QgsVectorLayer from a PostgreSQL view?

I am attempting to create a QgsVectorLayer with the same code as I am using for a PostgreSQL table, which works correctly and the isValid() method on the layer returns true. uri=QgsDataSourceUri() ...
2
votes
1answer
25 views

Measuring distace between two points with PyQGIS 2.18

Can someone help me understand what I am doing wrong in my calculation of the distance between two points? My code is as follows: import qgis crs = qgis.core.QgsCoordinateReferenceSystem() crs....
1
vote
1answer
49 views

Plugin that selects closest point features from a mouse click

I'm trying to build a plugin that would select let's say 8 closest points from a mouse click. I've found a working plugin that selects the closest feature from a mouse click here: https://www....