Questions tagged [qgis-2]

Version 2.x of QGIS (previously Quantum GIS)

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

QGIS 2.18 Scale not being set up correctly

I'm working on adding scale based visibility on different layer. I'm currently using : canvas.setDestinationCrs(crs) crs.createFromUserInput(name) crs = QgsCoordinateReferenceSystem() to set ...
1
vote
1answer
30 views

Select file path via GUI [closed]

I would like to select my input file and output folder path via a GUI. At the moment, I simply defined my paths like this #path to het input file input_path = 'c:/Users/tobias/Desktop/object1/object2/...
2
votes
1answer
40 views

Joining attributes from point layer to line layer which the endpoint's geometry matches the point geometry

In QGIS 2.18 I have 2 layers, one is a multiline layer and the other is a point layer. The point layer contain every endpoints of that multiline layer and saved some of the point's own attributes. I'd ...
1
vote
1answer
25 views

Using NNJoin-Plugin through Python console

I want to write a Python script which I can execute from within QGIS 2.18 (from the Python console). The Python script should calculate the nearest line (out of a set of lines) of a given point (out ...
2
votes
1answer
33 views

Plot RGB values for each feature seperately

I want to plot each rgb value for its respective feature of the layer via pyqgis. Atm I struggle to properly implement it for each layer individually. With my current code below, all features get the ...
0
votes
2answers
78 views

Use colums in attribute table to set colors and line thickness directly automatic

i have a column in my attribute table called 'Color' and 'Line' where I store rgb color codes and line thickness values (in map units) to give my layer elements a color and thickness. You can do it ...
1
vote
1answer
45 views

Fill Features of attribute table by using another feature in QGIS

I would like to fill up an attribute table in QGIS for the feature 'Color' based on another feature in the attribute table. At the moment it looks like this for the features 'Direction' and 'Color': ...
2
votes
1answer
163 views

Starting QGIS 2.18 processing algorithms from .bat-file

I have written a bunch of Python scripts within the QGIS 2.18 processing framework to process a sequence of tasks. What I am trying to achieve now is to call the python scripts from a .bat-file ...
0
votes
0answers
31 views

Use output of 1st processing algorithm as input for a 2nd processing algorithm in combined script

Using QGIS v2.18, I have been attempting to combine (pipe?) two Processing Toolbox algorithms into one script. Random Extract as the first and Differential Privacy as the second. Through my weeks (...
-2
votes
2answers
39 views

How to install QGIS 2.18 on Windows10Home (64bit) - where can a Beginner find an installation package please?

QGIS installation packages are all for v3, but this does not allow working with / importing OSGB1936 / EPSG27700 data, so I would like to install 2.18 if I can find an installation package. Any ...
0
votes
0answers
26 views

Find out row/col of pixel in raster

I have a geo-located raster image and I need to know the row/col of a particular pixel (for use in another, non-GIS package). Ideally I would like to be able to click on a pixel and check its row/col. ...
0
votes
1answer
48 views

How to display table content using Qtableview after selecting a vector layer in Pyqt4?

I'm developing a QGIS plugin using QtDesigner and pyqt4. I have a comboBox of my vector layers and I want to show the table of the selected layer. I used this code for my comboBox: def run(self): ...
0
votes
0answers
24 views

QGIS 2.18 selected features not working in processing algorithms

After reading up on processing algorithms I see there is not an option to have a "selected features" checkbox. It states in the documentation: Algorithms follow the following simple rules when using ...
1
vote
0answers
48 views

How to make buttons work from second window in my QGIS plugin?

I'm trying to develop a QGIS plugin. I already created a second window. In that second window, there are several buttons that I need them to work. I can't say I'm a programmer that's why I don't ...
1
vote
0answers
37 views

GeomorphicFloodArea Plugin is not working

I'm trying to get the plugin GeomorphicFloodArea to work but cannot. I tried using QGIS 3.10 but got an error message, so I downloaded version 2.18.28 and it still will not work. I get an error ...
0
votes
0answers
12 views

Path for QGIS v2 default plugins

I am searching for the path of the default plugin 'Random selection' found in QGISv2's Processing Toolbox. I know the .py path is: C:\QGIS\apps\qgis-ltr\python\plugins\processing\algs\qgis. ...
0
votes
1answer
67 views

Filter input layers to point layers

Can I edit this code below to show only point layers? This is being used in a plugin for QGIS v2. I am creating if that makes any difference. self.addParameter(ParameterVector(self.INPUT, self.tr('...
1
vote
0answers
21 views

How to georeference images with GCP's in straight line?

I would like to use the Thin Plate Spline tranformation type in the QGIS georeferencer plugin. The image I'm trying to georeference is a sequence of aerial images which have been merged manually. I ...
0
votes
0answers
17 views

QGIS's “setItemPosition” doesn't seem to work for QgsComposerLabel

I'm using QGIS 2.18 and I'm printing maps using a QGIS plugin I made myself. The method setItemPosition(x, y) is working fine with my legend (QgsComposerLegend object). But when I try to use the same ...
0
votes
0answers
22 views

Problem with Rasterize Tool (vector to raster) QGIS 2.18.28

I am trying to convert a vector file into a raster using the rasterize tool however it us just producing a back block of a single value. I am rather confused as I have used this tool on another ...
0
votes
0answers
20 views

QGIS version 2.18: Is there a processing tool in version 2.18 that is similar to “Sample raster values” in newer QGIS versions?

I am using a server (Compute Canada) and they have version 2.18 of QGIS loaded. I need to extract values of a raster to points (long/lat) - equivalent to "Sample raster values"- and be able to ...
0
votes
1answer
56 views

How or where to install Python plugins in OSX? (QGIS 2.18)

For a school assignment we are using QGIS 2.18 (professor's suggestion) and 2 plugins he gave us. I am working on an iMac. The short manual he gave us is for use of QGIS under Windows. I have QGIS 2....
1
vote
1answer
53 views

How to get RGB fill color values from polygones?

I'm trying to get color values from layers inserted into canvas. I used this code but it seems that I'm doing something wrong: for layer in QgsMapLayerRegistry.instance().mapLayers().values(): ...
2
votes
2answers
98 views

Dividing shapefile into multiple shapefiles using an attribute value in QGIS Graphical Modeler

I have a shapefile with a column that have project references, I want to create a different shapefile for every project reference there is. Note that the project references are not unique in the ...
0
votes
0answers
19 views

File repair and editing

I created a vector file from using "raster-polygon " tool, now it's telling me, "invalid geometry, please repair before processing", when I want to split it's features. How can I repair the file in ...
2
votes
1answer
57 views

Differences in the Select by expression between QGIS 2.18 and 3.4

I want to select in a population table the growth rate between two years greather than 1.5. In QGIS 2.18 the following expression works fine "POP_P2014" / "POP_P2000" > 1.5 With the same data ...
1
vote
0answers
49 views

Calling outside function file in PyQGIS

I am making a plugin that calls a customised library which contains a list of functions. I, first saved this library outside the plugins folder, then inside it to see if it changes something. The ...
0
votes
0answers
31 views

QGIS 2.x installing Ubuntu 18.04

I can't find any installation repo for QGIS 2.x. Last week I was able to install QGIS 2 then I wanted to try QGIS 3.x. However I encountered many problem related with netCDF. Ergo, wanted to install ...
1
vote
1answer
258 views

QGIS SAGA “Kriging” tools doesn't work

I try out different methods of point interpolation for a digital terrain model. For this purpose I tried to run the "ordinary kriging tool" from the SAGA Tools with QGIS 2.18 and QGIS 3.2. When I run ...
1
vote
0answers
41 views

Listing items using QGIS combo box from PostgreSQL

I am building a plugin for QGIS which will have a combo box listing data from PostGreSQL. I have already connected PostGreSQL. Now I would want to make this a plugin and add the list of jobs to the ...
3
votes
1answer
113 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
490 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
29 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
75 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
119 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
99 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
47 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
402 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
32 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
40 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
163 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
98 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
41 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
56 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
66 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 ...
4
votes
1answer
215 views

Where did checkbox option in Points to Path tool go?

I made considerable use of the "Points to Paths" tool. I forgot which QGIS version I was using, but it was most likely 2.x, probably 2.14. According to my memory and notes the tool had a ...
2
votes
0answers
55 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, ...

1
2 3 4 5
33