Skip to content

GratisGIS 2.0.0

Latest

Choose a tag to compare

@palavido-dev palavido-dev released this 01 Dec 21:04
· 3 commits to main since this release
53e8290

GratisGIS 2.0 is the biggest release since 1.0. It adds travel time areas, AI that can build and change maps and apps, ways to move whole organizations in and out, and a lot more. If you run a single organization, you can upgrade with one command and nothing else has to change.

Before you upgrade

One command does the safe upgrade. It makes the required safety copy of your data, installs 2.0, checks that it works, and puts everything back by itself if it does not:

curl -fsSL https://raw.githubusercontent.com/palavido-dev/gratis-gis/v2.0.0/infra/upgrade.sh | sudo bash -s -- 2.0.0

Add --check to look first and change nothing. We tested it on Docker with a 1.7.0 install: the upgrade took about 10 minutes, and a failed build, a failed migration, Ctrl-C and a killed script each ended with your data intact and 1.7 running. We have not run it on Podman or on the NAS stack, or in the curl | sudo bash form yet. The site is offline while it runs (10 to 20 minutes on a small install). The copy stays in /var/backups/gratisgis until you delete it, and the script prints the exact upgrade.sh --rollback command that goes back to 1.7 when it finishes. Read the full guide first: Upgrading from 1.7 to 2.0. It also has the manual steps (stop the stack, snapshot the Postgres and MinIO volumes, run ./infra/deploy.sh) for installs that cannot use the command.

On a NAS (TrueNAS, Dockge) you paste the new compose file as before. Before you do, stop the app and run nas-snapshot.sh backup, which makes the same safety copy in one command and restores it with restore. It has not yet been run on a real NAS, so tell us if it fails. Details are in the TrueNAS guide (Safe updates).

Things you will notice or should check:

  • The database container restarts once during the upgrade.
  • People signed in from ArcGIS Pro or QGIS are asked to sign in again, once.
  • If you paste your setup from the TrueNAS file, paste the new docker-compose.nas.yml.
  • If you set GRATIS_TENANCY, leave it unset or single. Any other value stops the services at start.
  • A public feature read with no limit or cursor now stops at 64 MiB or 60 seconds. Page through big layers.
  • An unknown paper size in a print template answers 400, and saving an item that newly refers to an item you cannot read is refused.
  • One migration changes two text columns to enums and stops if a value does not cast. The guide has a query to check first.
  • CREDENTIAL_ENCRYPTION_KEY must be plain base64 that decodes to 32 bytes. Installs made with the setup script already are. 2.0 is stricter about stray characters, and a key it cannot read makes saved credentials fail when used, so check yours first (the guide has the commands). Please do not just change the key.

What's new

Travel time in What's Here

Pick a point or an address and see what is within 5 to 60 minutes by car, on foot or by bike. Choose up to four times, and every layer's numbers are counted inside each one. It works in apps and on public maps, and it appears in the PDF and CSV reports.

It is off until you turn it on. An admin opens Admin, Travel time, picks the regions to cover and builds them. Nothing is downloaded until you ask, and nothing is global by default. It runs on Valhalla, in one extra container. One state needs about 1.5 GiB of memory. Three states (West Virginia, Virginia and Ohio) needed 4 GiB. The areas are estimates from road data and typical speeds, with no live traffic, and drive times ran 8 to 20 percent shorter than another engine we compared. The guide has the exact steps. On the NAS stack the engine starts and builds a region (tested on Docker Desktop with the NAS file); the admin page and What's Here were not yet checked there. Turn on its routing profile (the guide has the steps, including how to turn it off again, which takes a stop and start of the stack). On TrueNAS the "delete the profiles line" step is not yet tested.

AI build and AI changes

  • Describe what you want and AI shows its plan first: the layers, map, form and app it would make, and what it left out. You can edit the plan before anything is created.
  • It asks one to three short questions when a request is too open.
  • "Ask AI to change this map" edits a map you made in place. It lists every value that would change, and "Undo this change" puts the item back exactly as it was.
  • It can color a map by your data, make it 3D, and put tools in the app.

Move organizations and apps around

  • Export an organization to one zip: every layer and table, attachments, files, a list of all items, users and groups. An admin or any user (for their own items) can do it.
  • Archive and import an organization into another install.
  • Send an organization to ArcGIS Online or Enterprise: feature layers, files, maps, groups and sharing, with a dry run first.
  • Export and import a custom app as one file with its theme, images and a list of what it depends on.
  • People an import creates can now actually sign in, with one button to invite them.

What's Here, apps and layers

  • New Feature list widget for custom apps, a logo and header colors, and a Filter widget that can compare numbers as well as pick values.
  • A layer can refresh itself from a web address on a schedule (GeoJSON, CSV, KML and more).
  • Worldwide satellite basemaps from your own MapTiler or Esri account. The built-in Satellite basemap is now named "Satellite (US only)".
  • Address search that sets itself up (Admin, Geocoding), or uses open-geocode.

Field app, ArcGIS Pro and QGIS

  • The field app places features with a pin in the middle of the map and snaps to vertexes and edges.
  • ArcGIS Pro can sign in and edit data layers, and ArcGIS Pro and QGIS can add a layer as a feature layer with one click ("Use in ArcGIS Pro").

Backups and operations

  • Encrypted off-site backups to S3-compatible storage such as Backblaze B2, R2 or Hetzner. The copies are encrypted to a key only you hold and signed. You can test the newest backup by restoring it, and restore onto a new server from an off-site copy.
  • Credential encryption keys can now be rotated without losing stored credentials.
  • The one-command installer checks your server first and says in plain words what to fix.

Fixes and security

Dozens of fixes, including form questions that no longer read the old answer of a hidden question, updated build tooling past two published advisories, tighter storage checks across organizations, safer outbound fetches, a fix for rate-limit errors when panning busy maps, and a long list of What's Here fixes. The full list is in the changelog.

Not in 2.0

  • Point-in-time restore (continuous backups) is not included. It waits on a staging test and will come in a later release.

Running on Podman

GratisGIS is built and tested on Docker. Podman works for at least one user on Ubuntu Server, but it is community-tested only and we have not run 2.0 on it yet. The upgrade guide has a Podman section. The main points: use Docker Compose v2 as the compose provider (older podman-compose ignores the start-order conditions the upgrade relies on, and Ubuntu 24.04's package is one of them); the deploy scripts call docker, so you need the podman-docker shim or to run the compose steps by hand; rootless Podman cannot bind ports 80 and 443 without a sysctl change; and podman volume export and podman volume import replace the volume snapshot and restore. Do not turn on the scripts profile on Podman: its network fence depends on Docker, so scripts could reach the host and cloud metadata. Tell us what you had to change.

Rolling back

There are no down migrations, and the first 2.0 start upgrades PostGIS in your database to 3.7, so 1.7 cannot start on it. The only tested way back is to restore the volume snapshot you took before upgrading and redeploy v1.7.0. upgrade.sh takes that snapshot for you and does this automatically if the upgrade fails (upgrade.sh --rollback does it later). Restoring an Admin, Backup archive over the upgraded database does not work, because the Admin pages never start. Anything written after the upgrade is lost, and credentials saved on 2.0 would have to be entered again.

Thank you to everyone who reported bugs and sent patches.