Skip to main content
46 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
  • 55.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,642
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
18 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

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
15 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,339
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
11 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
  • 31.2k
10 votes

Does QGIS work with Anaconda?

Yes, QGIS is even available on Conda Forge: https://anaconda.org/conda-forge/qgis
underdark's user avatar
  • 84.5k
10 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,427
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
  • 31.2k
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,260
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,966
8 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
  • 34k
7 votes

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

pip3 uninstall PyQt5 worked for me
user166286's user avatar
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
  • 84.5k
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
  • 5,188
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
  • 69.6k
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
  • 69k
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
6 votes

Installing 3rd party Python libraries for QGIS on Windows

From within the Qgis 2.18.28 's python 2.7.14 console, this works for me. It avoids having to use prompts with absolute python paths. import subprocess subprocess.check_call(['python', '-m', 'pip', '...
Pietro Tou's user avatar
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,417
6 votes

Setting up Visual Studio Code (Windows) for PyQGIS

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
  • 652
6 votes
Accepted

QGIS buttons are huge

Try reducing the icon size in the general-tab of the QGIS settings.
Erik's user avatar
  • 17.1k
5 votes

Installing 3rd party Python libraries for QGIS on Windows

You can put 3rd party lib into your plugin folder and then add it to the path with the following script in plugin_name\__init__.py: import sys, os sys.path.insert(0, str(os.path.join(os.path.dirname(...
greenwd's user avatar
  • 235
5 votes

How to pull a shapefile into R from PostGIS database (in Windows)?

At the University of Florida, David Bucklin and I have released a rpostgis package that provides bi-directional transfer between PostGIS and R for vector and raster data. The package does not rely on ...
Mathieu Basille's user avatar
5 votes

calling gdal_merge into python script

Windows 10, Python 3.9, QGIS 3.20 (installed with OSGeo4W). This code works fine: import osgeo_utils.gdal_merge output_file_path = r'insert path here' input_files_path = r'insert path here' parameters ...
Comrade Che's user avatar
  • 8,208
5 votes

Could not find Easy custom labeling tool in plugin manager

It seems that the EasyCustomLabeling tool is not listed in the plugin manager currently - this has been an issue for several people, as seen in this github thread: https://github.com/haubourg/...
EastWest's user avatar
  • 253
5 votes

ogr2ogr for KML to Shapefile

You can execute ogr2ogr 3 times with -where statement: ogr2ogr -where "OGR_GEOMETRY='Point'" ... ogr2ogr -where "OGR_GEOMETRY='LineString'" ... ogr2ogr -where "OGR_GEOMETRY='Polygon'" ... See OGR ...
Dmitry Baryshnikov's user avatar
5 votes
Accepted

How to upgrade pgAdmin 4 in Windows?

Update: After upgrading to version 5.2, it created a new folder 'v5' within 'Program Files\pgAdmin 4' (instead of overwriting 'v4'). So, I manually uninstalled pgAdmin 4 'v4' (through Windows 'Control ...
Andre Silva's user avatar
  • 10.3k

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