Questions tagged [qgis]

QGIS is an open source program used to process and visualize geospatial data. It is available for most desktop and mobile operating systems.

QGIS (formerly Quantum GIS) is a user-friendly, cross-platform Geographic Information System (GIS) application with support for Linux, Unix, MacOS X and Windows. News updates are available from the QGIS blog.

QGIS supports numerous vector, raster, and database formats and provides numerous features for exploring, creating, analyzing, converting and exporting geospatial data. The core functions can also be extended through external plugins written in .

QGIS is an official project of the Open Source Geospatial Foundation (OSGeo) and is licensed under the GNU General Public License.

The gis.stackexchange.com site covers QGIS use cases in detail.

1691 questions
4
votes
0 answers

Change geopandas column value from postgis query

I have some QGIS layers and I am performing some spatial queries with them using GeoPandas. I'm using psycopg2 to make a connection to a local PostgreSQL/PostGIS database. Then I use the read_postgis() function from GeoPandas to make a spatial query…
Erich Purpur
  • 1,337
  • 3
  • 14
  • 34
4
votes
4 answers

SSL module in Python is not available - QGIS

The following error seems to be quite common: C:\Program Files\QGIS 3.10\apps\Python37>python -m pip install doesnotmatterwhatIputhere WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not…
CNIDog
  • 374
  • 3
  • 18
4
votes
2 answers

How to list all layers on Geopackage using pyqgis?

I am studying about pyqgis (using the pyqgis cookbook and started loading a vector layer. So far I was able to open a layer that I already knew exist on a…
4
votes
2 answers

'Could not handshake' : Error while doing sudo apt-get update

I am trying to install QGIS 3.4 on my Ubuntu 18.04. I am following instructions given at QGIS website. I have also updated my /etc/apt/sources.list file as below. deb https://qgis.org/ubuntu-ltr bionic main deb-src https://qgis.org/ubuntu-ltr bionic…
Ashj
  • 121
  • 1
  • 2
  • 9
4
votes
1 answer

QGIS 3 python loop through layers and run algorithm

I'm attempting to loop through layers and run a processing algorithm on each layer but get an error with the input: Code feedback = QgsProcessingFeedback() # Get current layers layers = QgsProject.instance().mapLayers().values() # Loop through…
James Norris
  • 151
  • 4
4
votes
1 answer

Interpolate Temperature Data On Urban Area Using Cartopy

I'm trying to interpolate temperature data observed on an urban area formed by 5 locations. I am using cartopy to interpolate and draw the map, however, when I run the script the temperature interpolation is not shown and I only get the layer of the…
user1345283
  • 645
  • 5
  • 11
  • 18
4
votes
1 answer

How to change an attribute in Shapefile with a certain value with QGIS / Python

I want to use the Python Console in QGIS to change all attributes in a Shapefile with a certain value. I have a field named "ANB" and I want to change the value "2" in for example "3". I know how to access the layer and select the values I…
Robert BK
  • 81
  • 1
  • 4
4
votes
1 answer

Render custom tiles in R leaflet from local directory (i.e. not from a git repository)

I have created some tiles out of a very large raster using the Qtiles plugin in Qgis. I have saved them to a local directory on my computer, and now want to render them in a leaflet map using R. The addTiles function passes a URL, but doesn't seem…
gvan
  • 473
  • 4
  • 15
4
votes
1 answer

Seed up refresh of large raster layer in QGIS

I am a novice QGis user, and I’m sure there is an easy way to do what I want, but I don’t have a clue as how to start. I downloaded a bunch of SRTM DEM sections and combined them into one raster layer. An image of my elevations and rivers is shown…
4
votes
2 answers

ERROR: function addgeometrycolumn does not exist: When trying to import file into POSTGIS database by QGIS DB Manager

I am trying to import a shapefile via db manager in QGIS to my POSTGIS database but I get an error, that I do not know to resolve: ERROR: function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) does not exist LINE 1: SELECT…
ThunderSpark
  • 183
  • 2
  • 11
4
votes
2 answers

ImportError: No module named qgis.core ubuntu 16.04 python 2.7 qgis 2.16.2

I keep getting this error in python from trying to call qgis from a script. The code is: from qgis.core import * from qgis.analysis import * I have read every posting on SO about this; wiped QGIS and reinstalled. Reset my PYTHON_PATH and…
scdavis50
  • 111
  • 1
  • 5
4
votes
2 answers

How to run QGIS plugin from python script

I would like to access external qgis plugins through a python script. I have been able to access the built in qgis processing and vector toolboxs, but have been unsuccessful with external plugins such as the topology checker plugin. I have tried…
4
votes
2 answers

Where do I find an overview of all python functions for QGIS

I'm making a plug-in for QGIS, using the python language. I've looked everywhere but I can't seem to find a good overview of all the QGIS functions there are usable in the python script. For example, let's say I selected a Polygon as a geometry. I…
4
votes
0 answers

Installing python module to Mac OS QGIS through console

My QGIS python console returns error import tweepy Traceback (most recent call last): File "", line 1, in File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 572, in _import mod =…
Peter
  • 75
  • 7
4
votes
1 answer

Is there a way to store date and time info in a field in QGIS?

I have a bunch of input values in this format: 2014-05-14 17:42:18 And I would like to store them in a field in QGIS. I am using the Python API for GDAL/OGR. I notice that QGIS supports a field type "QDate", but it seems that it can only handle…
wfgeo
  • 2,716
  • 4
  • 30
  • 51