Skip to main content

QGIS

QGIS is a professional GIS application that is built on top of and proud to be itself Free and Open Source Software (FOSS)

🌐 qgis.org, docs

Documentation

Plugins

Visit QGIS plugins web portal.

NameDetails
OGR2Layersgithub
QuickMapServicesgithub
Qgis2threejsqgis2threejs.readthedocs.io, examples
mmqgisplugins.qgis.org, github
Plugin reloadergithub
Plugin buildergithub

How-to create a QGIS plugin

  • Reference

  • Steps

    • Download osgeo4w (doesn't work... seems not needed), QtCreator (offline-installer)
    • Install QGIS plugins (extensions): Plugin Builder, Plugin Reloader (experimental)
    • Look at C:\Users\username\.qgis2\python\plugins, this is where plugins are loaded
    • Edit the file C:\Program Files\QGIS 2.18\bin\o4w_env.bat and add C:\Qt\Qt5.10.1\Tools\mingw530_32\bin to SET PATH commmand line, then open a dos window.
    • Install MinGW
    cd C:\Qt\Qt5.10.1\Tools\mingw530_32\bin
    copy mingw32-make.exe make.exe
    • In Windows, search for "OSGeo4W Shell", open the application.
    cd C:\Users\bertrand.thomas\.qgis2\python\plugins\MyPluginName
    make
    REM pyrcc4 -o resources.py resources.qrc
    • Think about reload the plugin repository when the plugin directory is directly updated!

QGIS in Docker

How-to run QGIS container on Windows 10

  • First you need to install an X server, XMingin our case (download from sourceforge.net.

  • Create a docker-compose.yml file:

    db:
    image: kartoza/postgis:latest
    environment:
    - USERNAME=docker
    - PASS=docker

    qgisdesktop:
    image: kartoza/qgis-desktop:latest
    hostname: qgis-server
    volumes:
    # Wherever you want to mount your data from
    # TODO
    # Unix socket for X11
    - C:\Users\bertrand.thomas\.X11-unix:/tmp/.X11-unix
    links:
    - db:db
    environment:
    - DISPLAY=192.168.1.48:0
    command: qgis
  • Edit C:\Program Files (x86)\Xming\X0.hosts to add the IP address (192.168.1.48)

  • Execute from the command line (in the directory where the docker-compose file has been created):

    docker-compose up
  • From QGIS you can add PostgreSQL DB access, you'll need to get the DB IP address

    docker inspect kartoza_db_1

It works!

References:

TODO:

  • Update docker compose file to
    • Fix QGIS version 2.18.17
    • Fix PostgreSQL version 9.6.7
    • Install Python (2.7)
    • Fix file errors in the console (missing mapping)