Hot answers tagged

45 votes
Accepted

Cannot get plot() in geopandas to produce a map of the GeoDataFrame

The examples provided are for executing the scripts in a Jupyter/IPython notebooks environment. In a normal Python environment, you need to import matplotlib to show the image import geopandas as gpd ...
gene's user avatar
  • 54.4k
28 votes
Accepted

Setting up PostGIS database and opening it in QGIS on Windows?

It sounds as if your administrator has installed the database successfully and provided you with the details you will need. They may have also configured PostGIS during the install as well, but if not,...
Martin Hügi's user avatar
  • 3,602
27 votes
Accepted

Can QGIS 3.0 be installed and run side-by-side with QGIS 2.x?

Short answer Yes Slightly longer answer The two applications save all their settings in different places and when they use different versions of the same library, these library versions can safely ...
Matthias Kuhn's user avatar
23 votes
Accepted

Plugins crashing with "No module named qgsprojectionselectionwidget" in Windows?

Probably your QGIS is trying to import your widget from .h file like in c++. Please open your .ui file and find lines: <customwidget> <class>QgsProjectionSelectionWidget</class> ...
dmh126's user avatar
  • 6,642
17 votes

Installing GDAL with Python on Windows

Another option is to install the Anaconda Python distribution which has packages for GDAL. If you are going to be doing a lot of work using GDAL with other Python packages (scipy, pandas, scikit-learn ...
17 votes
Accepted

calling gdal_merge into python script

Add an empty argument in the first approach (because gdal_merge.py parses arguments starting from 1 and not 0): import sys sys.path.append('C:\\OSGeo4W64\\bin') import gdal_merge as gm gm.main(['', '-...
Antonio Falciano's user avatar
16 votes

Installing GDAL with Python on Windows

I find OSGEO4W a poor solution because it creates a whole parallel universe, almost like a virtual machine. I was able to install GDAL and use it in python following the steps outlined here (this is ...
16 votes

QGIS "not responding" as reaction to every type of action

I had the same "not responding" problem. As recommended, I closed the browser tab and now it seems to work. Quoted from comments: If you have many network drives mapped, you can hide those ...
Jonas D's user avatar
  • 161
12 votes

Installing 3rd party python libraries for QGIS on Windows

The simple way I found to install libraries for Python in QGIS is Open OSGeo4W Shell as an administrator Type py3_env in the console (This should print paths of your QGIS Python installation) Type ...
amit haldar's user avatar
12 votes
Accepted

How to cleanly upgrade QGIS on Windows?

Here are some general notes for un-installing the two types of installs: OSGeo Network OSGeo Network version, this version may not be un-installed from Control Panel>Programs and Features option. ...
artwork21's user avatar
  • 35.1k
11 votes

Does QGIS work with Anaconda?

I have miniconda 4.8.3 installed on a Linux Mint 19.3 system and, following some instructions reported on this blog and on the official conda-forge channel of Anaconda I very easily and effectively ...
fastest's user avatar
  • 1,269
11 votes
Accepted

Make several rasters more uniform

You could try merging the rasters into one: From the toolbar: Raster > Miscellaneous> Merge From the Processing Toolbox: GDAL/OGR > Miscellaneous > Merge From the GDAL console: gdal_merge.py -o ...
Joseph's user avatar
  • 75.3k
10 votes
Accepted

Photo Map tip in QGIS 3 on windows

Will you add file:/// before the drive letter C: ? <img src="file:///C:/Local/aa.jpg" width="350" />
Kazuhito's user avatar
  • 30.5k
9 votes

Importing qgis.core when writing standalone PyQGIS script

I've just been wrestling with a similar problem, and noticed a batch file in the OSGeo4W\bin folder called python-qgis.bat. This is part of an OSGeo4W package based install of QGIS 2.18.15 x64 on ...
Andy Harfoot's user avatar
  • 3,297
9 votes

Does QGIS work with Anaconda?

Yes, QGIS is even available on Conda Forge: https://anaconda.org/conda-forge/qgis
underdark's user avatar
  • 83.8k
9 votes
Accepted

Could not load library "C:\...\ rtpostgis-2.2.dll"

I suspect you are running the latest PostgreSQL Patch released yesterday. I have confirmed an incompatiblity issue with latest release OpenSSL and the libcurl we ship - detailed here - http://www....
LR1234567's user avatar
  • 10.3k
9 votes
Accepted

How to disable Windows 10 pop ups after processing in QGIS

Open the Windows Settings menu by pressing the Windows Key and “I” Click on "System" (Display, notifications, apps, power) Click “Notifications & Actions” menu Wait a few seconds until Windows ...
Kazuhito's user avatar
  • 30.5k
8 votes

Installing PostGIS on Windows

Thanks to @pateto777 answer and other sources like this and this , I managed to have a "portable" installation of PostGIS on a windows 7 machine without admin rights. Select the packages and download ...
Marco's user avatar
  • 3,210
8 votes

Completely uninstalling and removing QGIS 2.8.1 on Windows Vista

There are comprehensive uninstall programs available which do thorough searches and removal for all leftover files and registry values which should solve the problem. An example is Revo Uninstaller.
Jonathan West's user avatar
8 votes

Install GDAL 2.0 on Windows

The two main alternatives for installing GDAL on Windows are to use OSGeo4W installer or to use binary packages from GISInternals.com. Installation with the packages from GIS Internals is perhaps a ...
user30184's user avatar
  • 63.1k
8 votes

Is it possible to change default encoding for QGIS?

Go to the "Settings -> Options -> Data Sources" menu, and look for the checkbox "Ignore shapefile encoding declaration", when you uncheck it, the default encoding (for shapefiles) will be 'set to' ...
NettaB's user avatar
  • 1,926
7 votes

Installing a Minimal qgis, without extensions (GRASS, SAGA)?

In the OSGeo4W installer, there is an advanced install option which allows you to chose exactly what should be installed. The other installers will just install everything.
underdark's user avatar
  • 83.8k
7 votes
Accepted

ogr2ogr too many GCP points - exceeds maximum number of characters in the command line

This page, which lists general command-line options, says there's an "--optfile" argument: Read the named file and substitute the contents into the command line options list. Lines beginning with # ...
mikewatt's user avatar
  • 4,963
7 votes
Accepted

How to install PDAL in Windows?

You downloaded the source code, not a prebuilt binary. If you read the PDAL download page you linked to you will see: Binaries ... Windows Windows builds are available via Conda Forge (64-bit only). ...
user2856's user avatar
  • 64.9k
7 votes

how to setup gdal_calc.py for command line use (windows)?

If you have OSGeo4W installed (which normally comes with QGIS) You can "directly" run gdal_calc.py with the OSGeo4W shell from the windows command shell by using something like: C:\Program Files\QGIS ...
user30184's user avatar
  • 63.1k
7 votes
Accepted

QGIS layer properties window oversized

You cannot scroll, because the buttons area is generally not in scrollable area. Since I use multiple screens which have different resolution, I frequently encounter this problem. Reduce the size by ...
Kadir Şahbaz's user avatar
7 votes

Deleting shapefile after removing it with removeMapLayer using PyQGIS

Even if you keep in mind several things regarding your code: work with a real path to the shapefile instead of "XXXX/input1.shp" i.e. apply either source_layer.source() or source_layer....
Taras's user avatar
  • 31.4k
6 votes

Running Python outside of QGIS - (ImportError: No module named qgis.core)

This solution worked for me in Windows 7x64 SP1 with Python 2.7.13-64bit and QGIS 2.14.9x64 standalone install (important: Python and QGIS architectures must match). This solution involves virtualenv (...
raphael's user avatar
  • 3,377
6 votes

Couldn't load SIP module (QGIS doesn't load Python)

pip3 uninstall PyQt5 worked for me
user166286's user avatar
6 votes

How to setup Visual Studio Code (Windows) for PyQGIS 2 or 3?

We didn't want to use a script to open our workspace, so we finally found out how to configure Visual Studio Code through the settings.json file: https://github.com/isogeo/isogeo-plugin-qgis/blob/...
Guts's user avatar
  • 612

Only top scored, non community-wiki answers of a minimum length are eligible