User Tools

Site Tools


census:qgis_install

This is an old revision of the document!


Installing QGIS

The following are instructions on installing and starting QGIS on Ubuntu/Mint22.

Installing Qgis

The following are instructions for Installing QGIS on Ubuntu/Mint and then loading Census Data

  1. apt update
  2. As user root: apt install qgis (this installed 3.22 which is a long term support version)

Starting QGIS

On Linux, if you are ssh-ing into a server, make sure to specify the “-XY” arguments. This will allow X-windows to re-route to your local machine.

ssh -XY -l <user> <host>
qgis

Plugins

qgis2web and QuickMap Service

  1. Menu –> Plugins –> Manage and Install Plugins
  2. Search for qgis2web
  3. Click “Install Plugin”
  4. Search quickmap and choose quickmapservices
  5. Click “Install Plugin”

Configuring QGIS to accept URL Arguments

Change the following at the top of qgis2web.js

function getParam(name) {
    const urlParams = new URLSearchParams(window.location.search);
    return urlParams.get(name);
}

let lat = parseFloat(getParam("lat")) || 44.8;
let lon = parseFloat(getParam("lon")) || -103.4;
let zoom = parseInt(getParam("zoom")) || 4;

Users

I'm going to use a user called “qgis” to own all files.

 useradd -g developer -s /bin/bash -c 'Qgis Account' qgis 
mkdir -p /opt/qgis
chown -R qgis:developer /opt/qgis
census/qgis_install.1766175439.txt.gz · Last modified: by mlivolsi