Questions tagged [qgis-2]

Version 2.x of QGIS (previously Quantum GIS)

3
votes
1answer
2k views

How to style a vector layer in QGIS using hexadecimal color code stored in attribute?

I have a polygon shapefile storing hexadecimal color codes in a specific attribute. gid | label | color ---------+-----------+------------ 1 | Crops | #FF5F2C 2 | Forest ...
3
votes
1answer
898 views

Why does “Join attributes by location” fail to compute sums when used in a model?

If I use "Join attributes by location" from the menu it works fine but if I'm using it within the Processing modeler it's not working. I want to sum up previously selected records having a field area ...
2
votes
2answers
1k views

Predefined Coordinate Systems missing in QGIS 2

in QGis 1.8 were lots of predefined coordinate systems (national projections). Where have they all gone in qgis 2.0? I specifically need the Gauß-Krüger-Projections Zone 1 to 5. Is there any plugin ...
2
votes
1answer
2k views

How to randomly select from existing points within each polygon?

I have a polygon layer (where each feature has a class attribute), and a point layer, and there are at least 10 points within each feature of the polygon. Is there a way to randomly select only "k" ...
2
votes
1answer
199 views

SVG symbol colors differences in QGIS 2.12?

I don't understand why SVG symbols, which are colors changeable in the symbol default installation like this airplane: whereas there symbols like the transport bus station, and lighting symbol (that ...
1
vote
1answer
631 views

gdal for reprojection of VSCMO VIIRS data

I downloaded h5 VIIRS file by CLASS NOOA website. In particular I am interested in Snow Cover Binary Maps EDR and I need to reproject them in lat/lon or UTM. I tried to use gdal warp to this aim but,...
0
votes
1answer
2k views

NameError: name 'QImage' is not defined [closed]

Traceback (most recent call last): File "<input>", line 1, in <module> File "F:/QGIS/bin/test.py", line 6, in <module> img = QImage(QSize(800,600), QImage....
8
votes
1answer
8k views

How to find the watershed area for each point in the river network using DEM?

Update#1: Thanks, Micha, I have followed your instruction and successfully use the modules in GRASS. I use r.watershed to get the basin raster and the drainage line: and I use r.water.outlet to get ...
12
votes
2answers
2k views

Setting a default value in a QGIS field

I would like to add in a layer's field a default value. I mean, every time a new feature is created, that field would be automatically filled with the default value. In my case the default value ...
7
votes
2answers
631 views

Representing uneven tree canopy spread around point in QGIS?

I am trying to make an attribute to show the uneven spread of the crown of a tree using the four cardinal points. I can use a buffer to show one feature, in this case a root protection area. But I ...
3
votes
3answers
1k views

Measure distances between specific features in QGIS for Desktop

I'm completely new using PyQGIS and developing plugins. Currently I have a layer with the X and Y coordinates of electric distribution poles, where each pole is a feature. What I need to do is ...
9
votes
1answer
2k views

How to show Python console at QGIS program start

I wonder if there is a way to open the Python console of QGIS 2.6 directly at program launch. There is a possibility to set a shortcut for the Python console, but I can't find such an option for the ...
7
votes
1answer
9k views

QGIS and SQL Server Spatial Tables Performance

I'm trying to get a SQL Server 2008 R2 spatial database up and running to streamline the production of maps using QGIS. Currently I just have a handful of spatial tables (a postcode level point table ...
6
votes
1answer
151 views

How to setup default toolbars and menu item?

I need to customize the UI for a group of users at another office. I want to turn off a bunch of toolbars and menus that are not needed. I know how to save my configurations (Settings -> ...
6
votes
2answers
4k views

How to change default path for “.qgis2” folder on Windows?

I'm working with Windows 8 32Bit OS and QGIS 2.8.2. The QGIS default installing path for ".qgis2" folder is C:\Users\image95\\.qgis2. This directory stores several useful components like QGIS ...
4
votes
2answers
2k views

PIP no longer works with QGIS 2.18.x Python (TLS version no longer supported)

We've run into a problem installing Python packages (using pip) for use with QGIS 2.18.x (error messages copied below) Our diagnosis is that: Pypi now requires TLSv1.2 support (http using TLSv1.0 ...
15
votes
2answers
1k views

Is it possible to write a label expression in qgis that displays the label at a given coordinate?

I am using the QGIS expression builder for the label properties of my data. Is it possible to put different parts of the label in different coordinates on the map? For instance I have a linestring ...
7
votes
3answers
13k views

I would like to know how to clean topological errors

I am a new QGIS 2.0 user. I was so impressed the new default tool, Topology Checker, in this new version. But, hundreds errors are bothering me for cleaning up features. Is it possible to clean ...
7
votes
1answer
3k views

QGIS equivalent to ArcGIS Aggregate Polygons?

I am looking for a tool in QGIS 2.40 that performs the function ArcGIS refers to as Aggregate Polygons. Basically it takes a group of polygons within a specified distance and creates a concave hull ...
7
votes
2answers
938 views

QGIS 2.4: Basemap.at is displayed in poor quality

I have a huge problem displaying the austrian Basemap.at WMTS Service in QGIS 2.4. When I add the service, qgis logs multiple errors on failed tile requests. When I zoom into the map, it is displayed ...
6
votes
3answers
2k views

Is it possible to set up a local QGIS Plugin repository?

I've developed a couple of custom QGIS Plugins for use by our office. I can't post them to the official QGIS Plugins repository as they reference/utilize sensitive data on our own servers. For ...
5
votes
0answers
428 views

QGIS Align Rasters how to retain pixel values?

I am attempting to align and then merge a number of rasters of the same resolution and extent, but where the pixels are slightly misaligned (creating small gaps when merged). This works fine using the ...
5
votes
1answer
2k views

Relation Reference to simulate filtered drop-down lists

I have a layer of Land Uses that has a 3-tiered classification system (basically so that it can be broken down for different uses by other people). I have managed to create Project Relations and use ...
4
votes
2answers
475 views

Filling a field in a layer using a spatial relation with another layer/shapefile?

I want to know how I can fill in a column of a layer based on a certain relation criteria to another layer. In my case I want the column "straat" in my "bomen" shapefile filled in with the value's of "...
3
votes
1answer
1k views

PyQGIS reload a QGIS plguin

I have a plugin that has a psycopg2 connection to a PostGIS database. When i close GUI with the X-Button and open it again, all the widgets are filled with the data from before. It looks like the X is ...
3
votes
4answers
2k views

System variable PATH overwritten in QGIS?

The system env variable 'PATH' seems to be overwritten in Qgis, replacing it with their own values. Not sure if it was intended or not. Anyway in version 2.2, I could solve it by go into settings and ...
2
votes
2answers
1k views

Create Intersecting lines and remove dangles [closed]

I have 3 cases shown in the image. In all of them i want to intersect the lines and remove dangles using python in Qgis python console so afterwards i can make a plugin for this work in qgis.In case ...
1
vote
1answer
1k views

Aligning labels with line connecting feature to its label in QGIS?

I have labelled a points layer by defining a line between points and labels, because points were overlapping too much. Using additional columns in the points layer attributes table (LABEL_X and ...
9
votes
2answers
9k views

Is there a way in qgis 2.0 to prevent overlapping labels?

Is there a way in qgis 2.0 to prevent overlapping labels? I have a layer with a large geographical extent, which means a hell of a lot of labels. Many of them collide and it looks really bad. Is ...
7
votes
1answer
2k views

How to use qgis:selectbylocation in PyQGIS?

I am trying to use the processing toolbox to perform a spatial query (points in polygon). I am not sure how to use the tool and I keep getting Error: Wrong number of parameters. Here is my script: ...
7
votes
1answer
3k views

Change NODATA pixel value in raster to arbitrary value

I want to change the value in all pixels that are currently 0 to 800 in QGIS 2.6.1. 0 is listed as the no-data value in Properties > Transparency. I have unchecked the No Data Value box there. Then I ...
5
votes
3answers
13k views

Shapefile layer no longer editable (toggle edit option greyed out) in QGIS?

I am using QGIS 2.16 / Windows 10. I have a point shapefile which I have been using for a little while that has always been editable. Today I was editing the layer, saved my edits and left my ...
4
votes
1answer
677 views

Setting different context menu actions for each layer type with PyQGIS

I want to set different actions(context menu) for vectors,rasters,etc . class MyMenuProvider(QgsLayerTreeViewMenuProvider): def __init__(self, view): QgsLayerTreeViewMenuProvider.__init__(self) ...
4
votes
2answers
577 views

Determining when layer visibility is turned ON or OFF (changed) in QGIS plugin?

I need to update a vector layer's data when the visibility is turned back on. My update does not occur when the visibility is off. To what signal do I need to connect to catch the visibility change?
4
votes
2answers
2k views

Access all plugin from QGIS Modeler (Sextante)

I read that it is not possible to access to all of the installed QGIS plugins from the Graphical Modeler (QGIS 2.0.1). It would be great, in defining the model in the Graphical Modeler, if the user ...
3
votes
1answer
2k views

QGIS Not Importing ExtendedData from Self-Exported KML?

I've been scouring the internet for the past few hours, and I just can't seem to figure it out! I am using QGIS 2.4.0-Chugiak. Here are my simple steps: 1) I create a new ShapeFile (Type: Polygon) ...
3
votes
1answer
3k views

How to change the type of a column of an attribute table in QGIS? [duplicate]

So I want to change one of the columns in my table from string to real. How am I supposed to do that?
3
votes
1answer
617 views

Change default layer name in QGIS 2.18

In QGIS 2.18, new vector layers resulting from QGIS tools have a default name related to the corresponding tool. For example, when I perform the "Lines to polygons" operation (under QGIS Vector menu), ...
2
votes
0answers
399 views

QGIS 2.4.0-Chugiak: How to produce raster colour map

By carefully deriving the NDVI values from Landsat Band 3 and Band 4 after doing atmospheric correction by applying DOS1 method in semi-automatic classification Plugin QGIS, I was to calculate the ...
1
vote
1answer
1k views

Creating multiple lines label in QGIS?

I try to create a multiple lines label for this this polygon: I red How to create multiline labels in QGIS? QGIS, Multiple lines and wrap on character? and tried to use the "wordwrap" function ...
1
vote
1answer
240 views

Enable layer plugins when using external standalone QGIS python scripts

I created a QGIS standalone script (custom Application) that enables me to automatically export Atlas as images. The problem is that in my QGIS project, I'm using a Mask plugin and the generated ...
1
vote
1answer
2k views

QGIS 2.2: Rotated labels not possible any more?

Using Qgis Valmiera I would like to create feature labels on a layer that are rotated with a rectancular whitish background. Using "Labels (deprecated)" and entering an angle does the first part of ...
30
votes
2answers
19k views

Where is the Merge selected features button in QGIS 2.2?

I can't seem to find the "Merge selected features" button. I need to merge several polygons inside a shapefile and can't find how to do it in this version. (I was running on Wroclaw until 2.2). Is ...
9
votes
1answer
758 views

Clearing Recently used coordinate reference systems using QGIS?

After using some non usual SRC for demonstration purpose, I wish to clear my "Recently used coordinate reference systems" list for the sake of praticity. Is it possible? I am using QGIS 2.10.1.
5
votes
3answers
5k views

Is it possible to perform automatic snapping of polygons in QGIS or ArcGIS?

Note: in the picture below white space between the polygons is blank space – it does not contain any polygons as a result of Intersect or Union functions.
5
votes
2answers
231 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 ...
5
votes
2answers
2k views

How to display multiple attributes in a QGIS Composer legend?

I have a polygon layer which has a number attribute and a text attribute. When I make a legend in the composer, it automatically chooses the number to display while I would like to have both the ...
4
votes
0answers
61 views

Is there a way to customize the Options dialog in QGIS 2.14.6?

I'm creating a deployment package to update QGIS from V2.8 (wien) to V2.14 (essen (LTR)). In QGIS 2.14 there is a new "Advanced" section under "Settings > Options", see screenshot: Can this menu ...
4
votes
1answer
522 views

Load WMS with PyQGIS

I have installed QGIS server on Ubuntu 14.04 which serves WMS. Connection uses https and basic auth. URL is https://my.awesome.url:8090/cgi-bin/project1/qgis_mapserv.fcgi I can connect with QGIS and ...
4
votes
1answer
14k views

Creating shapefile from Excel file in QGIS?

I am using QGIS 2.6.1 and have worked in an Excel file database (which was actually converted from a Shapefile). I have managed to convert it as CSV file and load it into QGIS (displays data fine) but ...