If you are running a 64-bit machine, make sure that you are installing QGIS from the 64-bit network installer: http://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe.
I am an OSGeo4W user, for both Windows 64 and 32 bit.
And I must say that the installation made from the network installer seems to me pretty stable. I don't see another reason for the stand-alone installer more than for a Portable GIS.
The standard installation was made only once, and all I do is keep it updated from the advanced mode.
When a tool does not work, 90% of the time is due to a problem with the data or the procedure used.
There is no need to install outdated packages, they will surely not solve the problem and they are even likely to generate some more. When a regression in a package is found, it is reported to the developers and (earlier than later) it is fixed.
These are my current packages for a qgis
, grass
and saga
search in a Win10 64bit machine:
This is the QGIS Settings > Options > System view:
This is the C:\OSGeo4W64\bin\qgis-grass7.bat
content:
@echo off
call "%~dp0\o4w_env.bat"
call "%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\etc\env.bat"
call qt5_env.bat
call py3_env.bat
@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\lib;%OSGEO4W_ROOT%\apps\grass\grass-7.6.0\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
start "QGIS" /B "%OSGEO4W_ROOT%\bin\qgis-bin-g7.exe" %*
This is the C:\OSGeo4W64\bin\o4w_env.bat
content:
REM Make parent of this script location our current directory,
REM converting UNC path to drive letter if needed
pushd %~dp0
cd ..
REM set OSGEO4W_ROOT to short path version
for %%i in ("%CD%") do set OSGEO4W_ROOT=%%~fsi
REM start with clean path
set path=%OSGEO4W_ROOT%\bin;%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\WBem
for %%f in ("%OSGEO4W_ROOT%\etc\ini\*.bat") do call "%%f"
popd
And this is the C:\OSGeo4W64\bin\qgis-bin-g7.env
content:
PATH=C:\OSGEO4~1\apps\qgis\bin;C:\OSGEO4~1\apps\grass\grass-7.6.0\lib;C:\OSGEO4~1\apps\grass\grass-7.6.0\bin;C:\OSGEO4~1\apps\Python37;C:\OSGEO4~1\apps\Python37\Scripts;C:\OSGEO4~1\apps\qt5\bin;{app};C:\Program Files\MiKTeX 2.9\miktex\bin;C:\OSGEO4~1\apps\Python27\Scripts;C:\OSGEO4~1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem;C:\Program Files\R\R-3.5.2\bin\x64
GDAL_DATA=C:\OSGEO4~1\share\gdal
GDAL_DRIVER_PATH=C:\OSGEO4~1\bin\gdalplugins
GDAL_FILENAME_IS_UTF8=YES
GEOTIFF_CSV=C:\OSGEO4~1\share\epsg_csv
GISBASE=C:\OSGEO4~1\apps\grass\grass-7.6.0
GRASS_PROJSHARE=C:\OSGEO4~1\share\proj
GRASS_PYTHON=C:\OSGEO4~1\bin\python.exe
JPEGMEM=1000000
OSGEO4W_ROOT=C:\OSGEO4~1
PROJ_LIB=C:\OSGEO4~1\share\proj
PYTHONHOME=C:\OSGEO4~1\apps\Python37
QGIS_PREFIX_PATH=C:/OSGEO4~1/apps/qgis
QT_PLUGIN_PATH=C:\OSGEO4~1\apps\qgis\qtplugins;C:\OSGEO4~1\apps\qt5\plugins
QT_RASTER_CLIP_LIMIT=4096
VSI_CACHE=TRUE
VSI_CACHE_SIZE=1000000
O4W_QT_PREFIX=C:/OSGEO4~1/apps/Qt5
O4W_QT_BINARIES=C:/OSGEO4~1/apps/Qt5/bin
O4W_QT_PLUGINS=C:/OSGEO4~1/apps/Qt5/plugins
O4W_QT_LIBRARIES=C:/OSGEO4~1/apps/Qt5/lib
O4W_QT_TRANSLATIONS=C:/OSGEO4~1/apps/Qt5/translations
O4W_QT_HEADERS=C:/OSGEO4~1/apps/Qt5/include
Reference links
Best Answer
Short answer: the principles
You can use QGIS expressions to generate custom overlay like intersection of as many layer as you want. Use Geometry generator or Geoemtry by expression (see here for differences).
How to do it
Let's say you have 5 polygon layers, name
p1
top5
. Say you look for the areas where all five intersect. Split up this task in several steps. This is because the expressionintersect()
only takes two arguments (input layers), so you have to create a "nested" (combined) statement, say like (pseudocode):Or more detailed:
The expression to use
The expression looks like this (see below at the bottom for detailed explanation of the functions used):
Screenshot: the expression with Geometry generator: the diagonal X hached area is created with the expression above - the area where all 5 layers intersect:
Variant: how to adapt the expression to changing number of layers
For an even number of intersecting polygons, adapt the expression as follows (here: 6 polygons
p1
top6
). As you see, I added abuffer([geometry],0)
statement. Sometimes, without this, the expression returnsNULL
.Screenshot: the diagonal X hached area, representing the common space of all 6 polygons, is bordered by all 6 polgons as you can see from the color of the outer boundaries: red, blue, green, yellow, black and pink:
Explanation: How this expression works
intersection()
function, this only takes two arguments:intersection(geometry1, geometry2)
.intersection
functions. Geometry generator as well as Geoemtry by expression are always based on a specific layer, so to get the geometries of the other layers to combine (intersect) them, we use theoverlay_intersect()
function.collect_geometries()
.buffer()
function. For the very layer we work on, it's enough to get the geometries with$geometry
.