Questions tagged [qgis-2]
Version 2.x of QGIS (previously Quantum GIS)
812
questions
2
votes
1
answer
549
views
Labelling lines with multiple fields in QGIS
I need on the linear value such an effect as on the point. That is, that the three labels should be next to each other and decrease and grow dynamically. On the screenshots you can see that this is ...
0
votes
0
answers
44
views
Map validation problem in QGIS 2.18
There is a problem in map validation for prediction purpose in QGIS 2.18 (validate the simulated map with the actual map). It showed an error message error occurred while executing python code. I have ...
0
votes
0
answers
487
views
Merging vector layers and deleting duplicate geometries
I merge 3 extracted layers with different counts of parcels but some attributes contain same data.
For example:
Having same data input creates duplicate parcel, was able to clean this with delete ...
1
vote
0
answers
108
views
QGIS Plugin Manager is not available in QGIS 2.18. for Mac
I cannot access the repository because it's not available, and when I updated it doesn't work. So, I cannot install plugins.
I already try to download the plugin and saved it in the path /Applications/...
3
votes
1
answer
150
views
Check if other features besides atlas feature are displayed in the map
I am making an atlas in Print composer and I want to check if other features besides the atlas feature are present in the map. In the Print composer map below, the (current) atlas feature is Licab, ...
4
votes
1
answer
409
views
Limit the number of features rendered in a map
I have a layer of village points and I want to limit the number of features rendered to a maximum of 50 points. I tried using Layer Properties > Labels > Rendering > Limit number of features ...
3
votes
0
answers
285
views
No geometry when importing points from CSV
I'm having problem importing a point layer from Excel. I've saved the Excel file as a CSV and added it to QGIS (2.18) through 'Add delimited text layer' I've checked in semicolon and choosen the right ...
5
votes
0
answers
46
views
How to eradicate excess lines in a singly recorded polygonal line (road) network? QGIS 2.8
I'm a beginner in GIS software.
I'm trying to create a road network shapefile within the reserve I work at. To do this, I've driven each and every road inside the property with my GPS app set to ...
5
votes
1
answer
402
views
Select and load polygons intersecting another with PyQGIS (polygons stored in PostGIS)
I'm still a newbie at Python and I'm having issues selecting and loading polygons intersecting others with PyQGIS.
I managed to use PyQGIS to achieve that operation with shapefiles stored in my laptop ...
1
vote
1
answer
132
views
Selecting snapped vertices of different two features individually by QGIS 3.X vertex tool
In QGIS 2, I can use node tool,
click on feature 2
click on the vertex (of feature 2) to select it.
Delete it.
I QGIS 3, by using vertex tool, I can't select which feature I want to modify, it ...
2
votes
0
answers
87
views
QGIS Composer - Read entered textbox value in another textbox
I'm Limited to QGIS 2.18 composer for several reasons.
I have two textboxes.
BOX1 - User INPUT value, where user enters an integer value.
BOX2 needs to read this value to be able to calculate results.
...
1
vote
1
answer
475
views
NameError: global name is not defined when performing task with FlowMapper in QGIS
I'm using QGIS 2.8 and I'm trying to apply the FlowMapper plugin to create a visualization. I aim to follow the instructions in this blog post and this GIS.SE question, but something seem be going ...
1
vote
1
answer
256
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
1
answer
1k
views
QGIS 2.14.17 repositories "unavailable" can't install plugins
I can't access the plugin repositories. If I go to plugins -> Manage and install plugins and settings I get unavailable for QGIS official repositories with URL "http://plugins.qgis.org/plugins/...
2
votes
1
answer
157
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
1
answer
146
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 ...
4
votes
1
answer
85
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
2
answers
527
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 ...
2
votes
1
answer
148
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
1
answer
308
views
Starting QGIS processing algorithms from .bat-file [closed]
I have written multiple 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 without ...
0
votes
0
answers
164
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
2
answers
3k
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 ...
2
votes
1
answer
499
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
0
answers
50
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 ...
3
votes
0
answers
115
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
0
answers
154
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
1
answer
299
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 2.
I am creating if that makes any difference.
self.addParameter(ParameterVector(self.INPUT, self.tr('...
1
vote
0
answers
86
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
0
answers
40
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
1
answer
294
views
Using Rasterize Tool (vector to raster) of QGIS
I am using 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 ...
0
votes
0
answers
48
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
1
answer
704
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
1
answer
405
views
Is there any QGIS 3.x alternative tool for osmpoly_export plugin?
I used this plugin in QGIS2 for easy defining the area of interest using some vector polygon and then cropping the OSM data with osmctools and the poly file.
However the plugin is QGIS2 only:
This is ...
1
vote
1
answer
413
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
2
answers
2k
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 sense ...
4
votes
1
answer
139
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
0
answers
244
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 ...
1
vote
1
answer
2k
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
0
answers
204
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 ...
4
votes
1
answer
938
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
2
answers
1k
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
0
answers
97
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:...
1
vote
0
answers
120
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 ...
1
vote
1
answer
680
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
0
answers
29
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
1
answer
829
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
0
answers
92
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()
...
1
vote
1
answer
4k
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.
Can you suggest any other ideas?
I am using both ...
0
votes
0
answers
51
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
1
answer
82
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 ...