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
...
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,...
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 ...
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(['', '-...
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 ...
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 ...
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 ...
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" />
10
votes
Does QGIS work with Anaconda?
Yes, QGIS is even available on Conda Forge: https://anaconda.org/conda-forge/qgis
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 ...
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 ...
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 ...
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' ...
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....
7
votes
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.
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 # ...
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).
...
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 ...
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 ...
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', '...
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 (...
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/...
6
votes
Accepted
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(...
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 ...
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 ...
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/...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
windows × 449qgis × 196
installation × 89
gdal × 52
python × 51
geoserver × 35
qgis-3 × 24
postgis × 21
pyqgis × 20
grass-gis × 19
qgis-plugins × 17
error × 15
qgis-2 × 14
shapefile × 13
postgresql × 12
linux × 12
osgeo4w × 12
qgis-processing × 10
qgis-server × 10
arcpy × 9
r × 8
java × 8
arcgis-desktop × 7
arcmap × 7
spatialite × 7