Questions tagged [qgis-2]

Version 2.x of QGIS (previously Quantum GIS)

Filter by
Sorted by
Tagged with
3
votes
0answers
34 views

Empty result while running Processing Modeler

There is one polygon layer, see image below I am simply trying to achieve all the holes as polygons with the following step-by-step algorithm Dissolve all Delete holes in the output of 1 Difference ...
2
votes
1answer
42 views

Faster, more efficient way to extract stream network from DEM

I am using QGIS and use r.stream.extract to extract the stream lines from a single DEM tile. However, this takes long (about 15 minutes) to complete, especially for a rugged terrain. I plan to extract ...
8
votes
3answers
341 views

Selecting point with maximum value for each polygon

I have a point layer with two fields named "id" and "price", and a polygon layer with a field named "code_zone". I need to get, for each polygon, the "id" of the point that has the highest value of "...
1
vote
0answers
24 views

Clipping shapefiles with different CRS in QGIS 2 [closed]

In QGIS 2.18.22 I have to different vector-shapefiles and I would like to clip the overlay. Unfortunately, the shapefiles did originally not have the same CRS so I saved them in the desired CRS (EPSG:...
0
votes
0answers
24 views

QGIS2.18.27 changelog

I know it is an old version, but I have a plugin that works fine on 2.18.16 (developed in 2.18.15), but it won't work on 2.18.27 and above. I am hoping that the changelog might help me figure out why, ...
1
vote
0answers
60 views

QGIS Server 2.18 GetPrint doesn't wait for XYZ tiles

I am trying to generate a PDF output with a Print Composer using QGIS Server 2.18. The map includes a couple of layers from local shapefiles, and also an XYZ Tile Server layer. QGIS Server does not ...
0
votes
1answer
56 views

QGIS Application in C++ [closed]

I'm new to QGIS 2.8 Library to develop standalone map application in qt4, C++ language. I was wondering if there is any way that I can use QGIS plugins such as Advanced viewshed analysis, Contour ...
1
vote
0answers
26 views

Getting (0,0) instead of the intersecting co-ordinates value

This code works below fine when line(The Circle I mean) intersects more than two new lines but fails when both the intersection falls in the middle of the same line polygon_path = iface.activeLayer() ...
2
votes
1answer
38 views

Extracting contours as shapefile from DTM (tif) in QGIS?

I am looking to convert a tif. file from the Scottish Remote Sensing Portal (Scottish LiDAR) into contours which can be used for a surface in civils 3D. I have tried this myself with a full DTM and a ...
1
vote
0answers
42 views

Renaming pre-existing table Field name using PyQGIS

I am using PyQGIS with QGIS 2.84. This is the code I have used: layer = iface.activeLayer() parking_layer_field_names = [str(i.name()) for i in point_layer3.pendingFields()] layer.startEditing() ...
2
votes
1answer
33 views

How to change the particular letter color in text box using python

I need to highlight the particular letter in a text box using python. I am using the below code but it changes the entire text color in text box. Kindly suggest any other ideas. I am ...
0
votes
0answers
29 views

Generating output from compose manager after setting extent and adding zooming to scale in QGIS using python

I have a piece of script which is suppose to do the following: Load required shape-file in proper order and zoom to layer Generate image using the composer manager based on all the shape-file in the ...
2
votes
1answer
33 views

Using composer manager in QGIS 2.8.1 to export the current canvas as PNG?

I am a newbie to QGIS Python. I have a shape-file which I want to load to QGIS 2.8.1 and manipulate them by zooming to the layer of the preferred shape-file. Once I have my canvas ready, I want to ...
3
votes
1answer
74 views

qgis2to3 to migrate plugin from version 2 to version 3

I have a plugin in QGIS 2 and I'm trying to migrate it to version 3 I downloaded the 'qgis2to3' tool --> I installed the pip (get-pip.py) : python get-pip.py --> I installed qgis2to3 : python ...
3
votes
1answer
59 views

Auto populate qgis file name with no file extension?

I'm looking to be able to auto populate an attribute field with the project file name either by a virtual field or default option in the properties. The "@project_filename" expression always produces ...
1
vote
0answers
39 views

Is there a tool to cut a polygon with the outline of a raster layer?

I would like my polygon layer to be cut into two where the end of the raster layer meets the polygon, is it possible? I've tried to polygonize my raster layer, but that doesn't seem to work. Any ...
0
votes
0answers
44 views

Loading line and multipolygons into QGIS on Raspbian GNU/Linux 10 (buster)

I try to load line and multipolygon shapefile layer to QGIS in Raspbian GNU/Linux 10 (buster) and it appear like this: Although I use the same shapefile layer in Windows 10 and it load without any ...
1
vote
1answer
41 views

QGIS shows the same label twice

In QGIS 2.18, I have a shapefile of lines whose attributes are the lengths (in Km) of the lines. When displaying the labels of this attribute they appear repeated, as seen below: How do I get the ...
2
votes
0answers
48 views

When does a Python script in QGIS execute drawing of QgsRubberBand?

I have a script which has an unrelated error after the draw_polygon function. I don't care about the error at the moment because I want to see the current results. For some reason my draw function ...
1
vote
0answers
26 views

Find Topology error in polygon layer

I try to find topology error in this polygon layer using QGIS 2.18 with topology rule of "must not overlap": but i don't understand why with the Topology checker, only several areas marked in red, ...
2
votes
0answers
67 views

Saving what is inside a polygon coordinates as an image?

I am trying to get an image from inside a polygon. TLDR; What I am trying to do: save what's inside a polygon as an image. What is happening now: I am only able to save the canvas as an image. ...
1
vote
0answers
13 views

Saving a form .ui file with relative path?

My company uses QGIS 2.18 (soon to upgrade to 3.4) and I've designed a form to make data entry for our survey field staff a little less hateful. The .ui file is saved on a network drive, and as long ...
1
vote
1answer
38 views

Turn string data (of GPS coordinates) into a GPS tracker = frozen map. QGIS2.14/Py2.7/Win7/LAN

I am currently involved in a student project which is to turn string GPS coordinates into a GPS tracker. This is my current work: First, the UDP data is shared through a LAN (No internet available) ...
0
votes
0answers
75 views

Login as another user in PostGIS using QGIS 2.18 without restart

I have a PostGIS DB with three roles: admin, user and readonly. When I set up a connection to this database via "Add PostGIS layer" this connection is saved as it should be. So I login as admin to ...
1
vote
1answer
58 views

Where is config file for QGIS 2.18?

I search the config (.ini) file for QGIS 2.18 on my pc. For QGIS 3.4.8 the file is stored under this path C:\Users\AppData\Roaming\QGIS\QGIS3\profiles\default\QGIS\QGIS3 I can´t find this file for ...
0
votes
1answer
68 views

Error Updating the Attributes value [closed]

The code below is not working: This code doesn't affect the table at all layer = point_layer3 selected_feature = layer.selectedFeatures() print(len(selected_feature)) layer.startEditing() for ...
0
votes
0answers
29 views

Labelling only the selected features with custom text using pyqgis

I want some alternate to this code as this code just labels only the current feature in the loop . FEATURES = point_layer3.selectedFeatures() for f in FEATURES: total = f['parkeer_approx'...
2
votes
0answers
72 views

Changing color of each selected feature based on expression using PyQGIS?

Code below changes the color of all the selected features based on the last condition it satisfied instead of changing the color of the feature which satisfied the condition. for f in FEATURES: ...
2
votes
0answers
43 views

Print composer forgets layers and puts them in wrong order

I have a project that mainly consist of PostGIS tables, but also some shapefiles. All in all I have some 50 layers in use in the project. The last days, I have had problems with the print composer. ...
1
vote
2answers
63 views

Customize symbols in QGIS

I am using QGIS 2.18 and I am trying to add symbols to my map but I cant find the kind of symbols I need. Is there a way I can get symbols depicting security threats, flooding, violence?
2
votes
1answer
82 views

Saving data of original layer while buffering in QGIS?

I'm using QGIS 2.18.27. I have the following problem: I am trying to create some buffers in the city center, as you can see. And I need to calculate some statistical parameter on every buffer. As ...
3
votes
1answer
81 views

Multiple layers auto-updated when one of them is modified

I just discovered this post and I found what I searched here. But I was wondering if there was a way to have multiple layers (let's say l1, l2, l3, l4) being updated automatically when you change ...
1
vote
0answers
28 views

Keeping ids and attributes of source features when creating QgsGraph?

I followed the example in QGIS documentation for Network Analysis library to create a graph from a vector layer. When building the graph, the features of the line layer are added as arcs (edges) to ...
2
votes
2answers
79 views

Selecting lines where start and end points within polygon using Virtual Layer

In QGIS 2.18 project there are several layers, lines and polygons respectively My task is to select all lines when their start and end points are laying within polygons using Virtual Layer, see image ...
2
votes
1answer
60 views

GRASS 7.6 v.net.iso not providing output in QGIS 2.18

There are simply two layers in EPSG:31469 both are located on the Server side, see image below: points 'HST_Bestand_GK5' polylines 'vwESKN_1_25000_Teil' On my Windows 10 with QGIS 2.18 and GRASS 7.6,...
1
vote
0answers
19 views

Batch Saving Raster DTm and choosing type in QGIS 2.18

Follow on question from the following Previous question batch saving 10m DTM layers using python console I would now like to set the output of my Raster .tif files to Float32 as by default the .asc ...
3
votes
0answers
29 views

Topology checker - whole polygon highlighted rather than polygon segment

When I check for overlaps, topology checker is only identifying errors at the polygon level but not the polygon segment where the errors exist (the whole polygon is highlighted in blue). I believe ...
1
vote
0answers
169 views

QGIS 2.18.28 Dissolve Error: “-2147483645 See log for more details”

I am doing property research on a county in Texas. I have all the parcel data and am trying to dissolve by Owner Name so that I can use the info tool to quickly see all the properties a given person ...
2
votes
1answer
36 views

QGIS - Create buffer circle around particular point using its geometry

Can I create a buffer circle around a particular point using its geometry in pyQGIS? I have my code as below: myVariable = '123456' expr = QgsExpression( "\"identificatie\"={}".format(str(myVariable))...
3
votes
0answers
31 views

Calculating direction of polygon using other features? (QGIS)

In QGIS 2 or 3 I have some DEM rasters, on top of that vector layers with plots and buildings + pin (blue one) with coordinates of building. How to calculate position of garden? Is it n, ne, e, se, s,...
2
votes
1answer
77 views

Getting coordinates on click and pass it to dialog using PyQGIS?

I am creating a plugin in which i need to get coordinates by clicking on QGIS canvas so i tried the solution mentionned at Getting coordinates by clicking on QGIS Canvas with PyQGIS? but it didn't ...
2
votes
1answer
121 views

Calculating volume of buildings using QGIS?

I am working with QGIS 2 or 3 I have DSM and DTM already so I can calculate DSM - DTM: Plus, I have shapefile with buildings' footprints. How to calculate volume of every single building using DSM-...
0
votes
1answer
40 views

Invalid syntax when trying to define a dictionary in pyQGIS code [closed]

I'm trying to run a code in which I need to use a dictionary, but the terminal acuses 'Invalid Syntax' when I try to define that dictionary. Outside of QGIS the code runs without any problems.
2
votes
2answers
124 views

Select by location using for-loop in Python Terminal

I have two shapefiles ('drenagem' and 'rio_pri'). I need to loop through every feature from 'rio_pri' and save all those features from 'drenagem' that intersect 'rio_pri'. So I wrote the following ...
2
votes
1answer
85 views

QGIS very slow and stops when increasing points size / number

I used the "graduated" style option to represent data by year. Then for each year I used this method with a custom function to increase point size according to the number of points at the same ...
0
votes
0answers
33 views

Rectangular (not square) pyramid with QuickMapServices

I’m using QGIS 2.14.9 (upgrading is not an option), and QuickMapServices. I have two tile servers (one for images and one for OSM). Images work, OSM does not. I'm sure the problem is related to ...
3
votes
1answer
106 views

Using expressions to relate column to layer style in QGIS?

I have a QGIS project with N layers, each pointing to the same CSV file with columns "1_1, 2_1, ..., N_1". I would like each layer to refer to its respective column (Layer 1 -> column 1_1, and so on) ...
0
votes
0answers
26 views

How to remove “Recent Projects” saved to automatically open when starting QGIS [duplicate]

I have the version of QGIS 2.18.16 that was copied over to my computer. The original user must have had some saved projects before copying and every time I open QGIS, these Recent Projects shows as ...
0
votes
1answer
39 views

Error message using sDNA Prepare Network

I'm preparing a road network using the sDNA Prepare Network tool on QGIS 2.18.28. My OS is Windows 10 64 bit. I get the following error message: Algorithm Prepare Network starting... ****************...
2
votes
0answers
48 views

Resolution/displaying issue with legend item in QGIS

I'm having an issue in QGIS print composer. I am using QGIS 2.18. Some of my legend items are displayed in low resolution or are partially cut off. The strange thing is that some groups of the legend ...