Questions tagged [qgis-2]

Version 2.x of QGIS (previously Quantum GIS)

3
votes
0answers
949 views

How to rotate symbols in QGIS

I have a vector symbol that I am using rule based style with. In the Rule properties tab I click on the SVG marker and change the "rotation" which is a field I have made to handle to the rotation ...
3
votes
1answer
786 views

How to set drawing style for QgsRasterLayer in QGIS 2?

I am using PyQGIS. In QGIS1, I can use: rlayer.setDrawingStyle ( QgsRasterLayer.PalettedColor ) but In QGIS2, I got some errors. I follow pyqgis developer cookbook, put some demo scripts in ...
3
votes
1answer
2k views

QGIS's Select Features tools only work occasionally

I'm hoping someone can help me work out whether there's something I'm missing here or whether QGIS's Select Features tools are just really buggy. I have a variety of polygon layers from shapefiles ...
3
votes
1answer
179 views

How can I get the default zoom level to work in QGIS for geography types?

Create a table like this, and then add it as a layer to PostGIS. It has one simple geography, a line. CREATE TABLE foo AS SELECT ST_GeogFromText( 'LINESTRING(-122.27172 37.80345,-122.27172 37.81549)...
3
votes
1answer
40 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) ...
3
votes
3answers
118 views

Automatically populate r.reclass rules based on table values

In QGIS I have a raster map showing land, snow and cloud zones, having resp. pixel values 1, 2, and 3. I extracted the mean altitude values (in m) of each zone on the basis of an underlying DEM and ...
3
votes
2answers
1k views

How to set NULL as default value for a date field in QGIS 2.4?

In QGIS 2.4, i am unable to set the default value as NULL if i have not updated any value on date fields. Its automatically taking the current system date. I am expecting to set the default values(...
3
votes
1answer
825 views

Can QGIS 2.8 load WMTS layers?

I'm having a bit of an issue loading a WMTS into QGIS 2.8. The application can connect to the WMTS, correctly identify the layers that are available and load the layer into the layer pane. However, ...
3
votes
1answer
894 views

How to bring feature selection into Printing Composer?

I'd like to make maps of Finland's municipalities. Our National Land Survey provides data I can make into a Shapefile, and when a municipality is selected in QGIS/Identify Features, three different ...
3
votes
2answers
9k views

How to avoid “Handle bad layers” message when using QGIS Flowmapper plugin?

In QGIS, if I close a project and try to open it a few days later I often get a message that says "Handle bad layers". This is very frustrating because when I open the project various layers will have ...
3
votes
2answers
1k views

Where are QGIS application setting file(s) stored?

I have some application settings (Windows/QGIS v2.0) that I would like to pass to other users (such as those settings defined under Settings menu>Options>Rendering tab). In ArcGIS they are stored in ...
3
votes
2answers
800 views

Any QGIS 2.0 updated RPM for Fedora?

I'm very excited about the new release of QGIS (2.0), and would like to install it on my Fedora 18 machine. I couldn't find any relevant RPMs, and the documentation on the QGIS main site for Fedora is ...
2
votes
1answer
101 views

Creating different label styles for different polygon classes using QGIS?

I'm new to QGIS 2. I have a polygon shape with two classes, and I want to set different labeling style and different "Scale-based visibility" but I don't get how the expression works.
2
votes
1answer
2k views

QGIS 2.12 & Ubuntu 14.04 SAGA installation not found

Installing QGIS 2.12 on Ubuntu 14.04 from the debian trusty ppa. Upon opening QGIS I notice the following error under the Processing tab: Problem with SAGA installation: SAGA was not found or is not ...
2
votes
1answer
737 views

Erode pixel areas in QGIS

I try to resize Pixel segments exported from eCognition. The goal is to erode the segments for one pixel of the boarder. So for example if the segment is 30px x 30px the result should be a new area ...
2
votes
1answer
596 views

How to show in a custom QGIS form the feature and/or geometry info?

I need to show point coordinates on the from dialog used to edit the attributes of a point.. I see that in the formOpen the dialog receives a layerId and a featureId, but no iface object, so how can ...
2
votes
1answer
676 views

How to rollback the committed changes in the Vector Layer in qgis

I selected few features in the vector layer and updated the field. But I want to rollback the changes committed to the vector layer. How can I do that in QGIS? I have used the following coed: layer....
2
votes
1answer
3k views

How to edit a vector layer extent?

I'm working on QGIS 2.2, and I would like to make a vector layer extent bigger (thus the clip option is not suitable) to match exactly my mask layer extent. I would like the new added area to be empty....
2
votes
1answer
2k views

Remove unwanted black area around clipped raster in QGIS 2.18

Following on from Remove white background in Raster in QGIS When I choose the unwanted value - in my case I want to remove black area around the clipped raster - I write 0 as the unwanted value, but ...
2
votes
0answers
83 views

Prevent QGIS from loading WMS services when opening project

I have a QGIS project with several hundred WMS and ArcGIS MapServer layers. Every time I open the project it starts loading them one by one, which my take quite a while. Is there a way to prevent ...
2
votes
1answer
40 views

Number each value in each section due to other value

I'm working with map of plants in garden. This garden is divided into about 40 sections. Plants of one species have their number for example every Scots pine is 12 and every Common oak is 15 in field "...
2
votes
1answer
200 views

GRASS in QGIS - ' Cannot read raster map region' (running r.lake.xy)

I want to use the GRASS function r.lake.xy on a DEM that I have. I load the DEM raster into QGIS, it is not georeferenced. Then I create a New Mapset. I set Projection Not defined. I either leave the ...
2
votes
1answer
1k views

Grid and Graticule in QGIS Print Composer in QGIS 2.8

I'd like to add a grid in the print composer. The problem is there is no visible option like it was in previous version. I mean I'm looking for an option "Show grid?" like in the picture below. I can'...
2
votes
1answer
181 views

Decimal Degree data erases itself between edit sessions in QGIS

I have a shapefile with point data. I calculate the $x and $y of the points successfully I save the changes and close the edit session. Once I reopen the attribute table, the data after the decimal ...
2
votes
2answers
880 views

Setting SAGA folder for QGIS with OS X for macports install?

I am trying to get the toolbox to work in QGIS 2.6, but I keep getting an error message that SAGA is not properly configured. After much digging, I finally found I can set the SAGA folder in ...
2
votes
1answer
1k views

How can I lock the scale when panning?

I'm just wondering if there's any way to easily lock the map scale when panning etc. For example, suppose I set the scale to 1:100,000 - panning with the mouse will then alter that slightly, which can ...
2
votes
1answer
327 views

QGIS 2.18 : Choosing path of file for Python init function

I'm using a custom feature form for QGIS 2.18 (custom .ui file + custom Form.py file containing the Python init function used by the form). I would like to be able to put the .ui file and the Form.py ...
2
votes
1answer
188 views

PyQgis api returns wrong layer CRS

I have shape vector layer in ESPG:3859 CRS. I try to get layer crs layer.crs.geographicCRSAuthId() but method always returns EPSG:4326 no matters which CRS I chose in layer properties. .qpj file ...
2
votes
1answer
230 views

Merging multiple bus stops with same name using QGIS?

My question is similar to Merging points (bus stops) in QGIS manually or programmatically?, but it's not answered sufficiently I have OSM-transit data with bus stops. Some stops have two or more bays ...
2
votes
3answers
1k views

Raster calculator : How to make 0 + NoData = 0?

I have a point data layer (vector) that I converted to a raster layer. I want to replace the NoData value (between each raster point) in the point raster layer by 0. So, I made a background raster ...
2
votes
2answers
1k views

Is there a way to quickly paste multiple columns of data into an attribute table in QGIS?

So I have a shapefile with 133 rows of data, and I want to add 4 extra fields to it. My problem is that after I have created the new fields in the attribute table, I have no way to quickly paste the ...
2
votes
2answers
1k views

How to show a QgsComposition created in the QGIS Python console?

I'm trying to develop a similar script to How to make serial maps from template?. I'd like to modify elements in the composition programmatically for each map that I want to print. In developing this ...
2
votes
0answers
727 views

QGIS 2.4 Processing (Zonal Statistics) error [closed]

In QGis 2.2 all my models (processing model builder) are working fine. When I start the same models in 2.4 I get errors like this: Prepare algorithm 5: Zonal Statistics Running Zonal Statistics [...
2
votes
0answers
298 views

Get signal on edited feature?

Regarding my pyqgis plugin 2.2 , I've implemented signal on a vector layer event successfully. For instance, whenever i create a new feature, i can read a new basic message appeared via QGIS logging ...
2
votes
1answer
307 views

Why do I get a NameError for QDomDocument when attempting to programmatically load a template in the QGIS Python console?

I'm trying to work through this answer in the QGIS (2.14) Python console to understand, ultimately, how to iterate over layers and print them with a template. When I run the following code block. I ...
2
votes
1answer
329 views

Error when writing SHAPE to WKT with pyqgis and QGIS 2.14

It seems the answer linked here doesn't work in latest version of QGIS 2.14 layer = QgsVectorLayer("/home/reyman/Projets/cours/coursPython/pyQgis/shape/passages/passages.shp", "passages", "ogr") if ...
2
votes
0answers
381 views

Using SVG file to fill polygon using QGIS- problem

I try to fulfill polygon with SVG file (which created with inkscape) but when i load the file into QGIS by this way: i get polygon layer with no symbology: Now, i red Using SVG from Wikipedia to ...
1
vote
0answers
161 views

Measuring in Print composer and main layer window in QGIS 2.12.3 does not match

I work on the municipality level and I am composing print maps with scalebar. I noticed, that length (or scale of my maps) is presented different when items are measured in my main QGIS 2.12.3 layer ...
1
vote
1answer
297 views

Removing the existing context menus from legendlayeractions QGIS 2.6.1 using python

a = QAction( u"My Action", iface1.legendInterface() ) iface1.legendInterface().addLegendLayerAction( a, u"My Plugin Menu", u"id1", QgsMapLayer.VectorLayer, True ) #adds action iface1.legendInterface(...
1
vote
1answer
309 views

PyQGIS get existing ComposerAttributeTable from composition?

Working with QGIS 2.14.10x64 in Windows 7 in the QGIS Python Console I've managed to create a new print composer from a template, and update the layers in the map, and I'd now like to update the ...
1
vote
0answers
1k views

How to fix “Unable to load GdalTools plugin. The required ”osgeo [python-gdal]“ module is missing.”

When I start QGIS, it display error message: Unable to load GdalTools plugin. The required "osgeo [python-gdal]" module is missing. Install it and try again. Couldn't load plugin 'processing' from ['...
1
vote
1answer
9k views

How can I open a jpg format with QGIS 2.8?

I'm having some difficulties opening the jpg format at QGIS 2.8. It opens, but nothing appears.
1
vote
2answers
611 views

Improving Clip Raster workflow in QGIS?

I've tried to come up with an open-source equivalent to the following process in ArcGIS 10.3: Spatial Analyst Toolbox > Extract by Mask target input: 1" SRTM DEM in EPSG 4019 mask layer: single ...
1
vote
1answer
492 views

Point in Polygon QGIS 2.18 [duplicate]

Point in polygon does not appear in my QGIS 2.18.0 (Windows 10). The tutorials indicate I should find it in Vector -> Analisis Tools -> Point in Polygons, but it is not there. How should I install ...
1
vote
1answer
76 views

Trouble with creating new attributes on large shapefile?

I have a point shapefile with ~2.5 million points. I am creating a new attribute converting ft to m, and QGIS (2.18.15) is having trouble working with the datasets. I have seen suggestions to only ...
1
vote
3answers
913 views

Creating dynamic field area in QGIS? [duplicate]

I work with this perimeter\area fields: i created it with "Add geometry columns" vector tool. How can i create a dynamic perimeter\ area fields, so when i create a new feature or change existed ...
1
vote
1answer
245 views

The graduated symbology doesn 't take into account the attribute I need in QGIS

I m working on a project on QGIS I have a point shapefile vector that represents my store In the attribute table, i have bunch of data such as size, unit per transaction and most importantly store ...
1
vote
1answer
858 views

PGRouting Layer plugin “UnboundLocalError: local variable 'db' referenced before assignment”

I am trying to do some basic computations using the PGRouting plugin for QGIS, but I am getting this error all time: An error has occured while executing Python code: Traceback (most recent call ...
1
vote
1answer
608 views

Creating many-to-many table from intersection between two polygon layers in QGIS?

I have created a buffer around several points. I want to intersect this layer with a Census Tract layer. My end goal is to create a table that would list all the census tracts that intersect with the ...
1
vote
1answer
148 views

How to sort the layer list in Multiple selection window?

Multiple selection window pops up when you want to select input layer(s) within Processing Tools. The order of layers in Multiple selection window seems not corresponding to Layer Panel. How to ...