Questions tagged [qgis-2]

Version 2.x of QGIS (previously Quantum GIS)

Filter by
Sorted by
Tagged with
-2
votes
2answers
38 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
17 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
30 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
22 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
39 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
28 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
11 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
42 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
17 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
14 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
17 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
17 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
27 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
44 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
3answers
45 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
51 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
34 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
25 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
134 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
28 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
80 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
394 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
28 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
71 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
84 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
55 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
45 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
123 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
31 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
39 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
131 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
71 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
51 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
53 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
51 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
72 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
17 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
40 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
94 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
74 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
31 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
100 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
60 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
97 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?

1
2 3 4 5
33