Skip to content
inmagikPublic

About

A small GIS that runs in your browser. Open Shapefile, GeoPackage, GeoJSON, KML, CSV, Excel and other geospatial files, see them on a map, edit them, run operations on them, and export them to another format, another CRS or an image. There is nothing to install and no account, and your files never leave your device.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

GeoBox

A small GIS that runs in your browser. Open Shapefile, GeoPackage, GeoJSON, KML, CSV, Excel and other geospatial files, see them on a map, edit them, run operations on them, and export them to another format, another CRS or an image. There is nothing to install and no account, and your files never leave your device.

Use it at geobox.inmagik.com.

GeoBox with the statistical zones of Turin coloured by their population, with the city's cycle paths and bike sharing stations on top

Motivation

Most computers have no app for geospatial files. When a colleague sends a shapefile, or an open data portal gives a GeoPackage, just looking at it means installing a desktop GIS such as QGIS, which takes time to install and to learn, or uploading the file to an online converter, which sends your data to someone else's server.

GeoBox is a simple web GIS for those moments, which runs in the browser with no software to install. Its main use is looking at geospatial data: open the files, see them on a map, reproject them, and export them, to another geospatial format or as an image. It also works on the data: it edits geometries, calculates fields, and runs more complex operations, such as joins, overlays, grids and Voronoi polygons.

It is a toolbox for geospatial data rather than an application for complex GIS projects, and ease of use comes first. Reprojecting a shapefile takes three clicks: drop the file, press Export, confirm. There is no project to set up or save: you open your files, work on them, download the results and close the tab.

GeoBox and similar tools

geojson.io is the quickest way to draw and edit a GeoJSON file. GeoLibre is a full GIS, on the web, on the desktop and in notebooks, with projects, a SQL workspace, raster data and over a thousand processing tools. GeoBox sits between them. It reads and writes many more formats than a GeoJSON editor and runs the everyday operations of a GIS, but it stays small on purpose: fewer tools, each explained in plain words and in five languages, with care for what goes wrong with real files, such as a missing or wrong CRS, or a shapefile in Windows-1252. For complex projects, a desktop GIS such as QGIS remains the tool.

Features

  • Import files by dropping them on the window, from a URL, or by pasting text, such as GeoJSON, WKT or the coordinates Google Maps copies: GeoJSON, Shapefile (a .zip, or the .shp, .dbf and .prj on their own), GeoPackage, KML and KMZ, CSV and TSV with coordinates or WKT, Excel, GPX, TopoJSON, FlatGeobuf, GeoParquet, GML, DXF, GeoJSON Lines, Esri JSON and OpenStreetMap.
  • Coordinate reference systems: GeoBox reads the CRS a file declares, and asks for one when it declares none. Reprojection happens on export, to a CRS from its list or to a proj4 definition you paste.
  • Export a layer to GeoJSON, Shapefile, KML, GeoPackage, CSV, Excel, GPX, DXF or GeoJSON Lines, in the CRS you choose, or the map to a PNG or SVG image, with its attribution and legends.
  • 38 operations, which never change their inputs: they make new layers, or a report. Areas, lengths and distances are measured on the ellipsoid.
    • Geometry: buffer and multi-ring buffer, dissolve, centroid, convex hull, bounding box, explode multipart, delete holes, polygons to lines and lines to polygons, points along lines, split lines, points to path, extract vertices, delete duplicate geometries.
    • Combine: clip, difference, intersection, extract by location, spatial join, join by nearest, join a CSV or Excel table, summarize within, append layers.
    • Table: calculate field and filter, with an expression language of their own, keep fields, split layer by field, add X/Y fields, add row number.
    • Create: a grid of squares or hexagons, random points in polygons, Voronoi polygons.
    • Inspect: measure, check validity, list unique values, compare layers, cluster points.
  • Draw and edit: draw points, lines and polygons on a new layer, or change the geometries of a layer you imported, and edit its attributes in the table, or its features as GeoJSON text. Editing works on desktop, for layers of up to 5,000 features.
  • The map: a choice of basemaps, the globe, and other map projections, such as a national grid or Equal Earth, picked from a list or pasted as a proj4 definition. Labels from a field, and an attribute table.
  • Themes and legends: colour a layer by a field's values, as a gradient, classes or categories, with its legend on the map.
  • Administrative boundaries, level by level, such as Italy's regions, provinces and municipalities, imported in one click.
  • Sample files of seven cities and of the world, to try any operation without files of your own.
  • Five languages: English, Italian, French, German and Spanish.

GeoBox is made for files of up to about 50,000 features. It doesn't read raster data, keep projects or make print layouts.

The CSV wizard reading a CSV file of lines as WKT, with its delimiter, encoding, geometry column and CRS already guessed
The CSV wizard reads the cycle paths of Turin, WKT lines in Gauss-Boaga.
The operations drawer, listing the Geometry operations with what each does
The operations, each with what it does.
A layer's style, colouring the statistical zones of Turin in five quantile classes of their population, with the legend shown on the map
A theme: five quantile classes of a field, with the legend on the map.
The countries of the world coloured by population, on a map drawn in the Equal Earth projection
The countries of the world in Equal Earth.

Your files stay on your device

GeoBox has no backend. It reads, converts and writes your files in your browser, and runs its operations there too: no server receives your files, nor anything in them.

What does go over the network is the basemap's tiles for the area in view (none with "No basemap"), the libraries GeoBox downloads the first time it needs them, such as gdal3.js for GML and DXF, a file you import from a URL, which your browser downloads straight from the site that serves it, and the administrative boundaries you import. The online version also counts visits with Umami, without cookies. Its privacy page lists each request and what it tells.

Sample files and administrative boundaries

To try GeoBox without files of your own, the app offers Sample files: three overlapping layers, of polygons, lines and points, for each of Turin, Palermo, Paris, Berlin, Madrid, New York and Tokyo, and the countries, rivers and cities of the world. They come from those cities' open data and from Natural Earth, and they ship with the app, in public/samples/.

The administrative boundaries come from a catalogue that INMAGIK publishes apart from the app, at boundaries.inmagik.com (ADR-0011): copies of the files of geoBoundaries, of openpolis for Italy and of Statistik Austria for Austria.

Both are republished under their sources' licences, such as CC BY 4.0, the ODbL or the public domain, and not under GeoBox's. GeoBox shows the licence and the attribution in the details of every layer imported from them. public/samples/README.md and the catalogue's page give the source and the licence of each file.

Who makes GeoBox

GeoBox is made by INMAGIK, a software company in Bergamo, Italy, which sponsors its development and its maintenance. Many parts of it were developed with AI coding agents, always directed and reviewed by a person.

Disclaimer

GeoBox is provided "as is", without warranties or conditions of any kind, and neither INMAGIK nor the contributors are liable for any damage that comes from using it, as sections 7 and 8 of the Apache License 2.0 say. This holds for the code in this repository and for the app at geobox.inmagik.com.

Check the results before you rely on them. Reprojections, measures and operations can be wrong, as in any software, and an export leaves out what its format can't hold.

The administrative boundaries and the sample files are copies of their sources, some of them simplified. They are not official boundaries, they may be out of date, and they take no position on disputed borders.

Development

The design lives in the spec, the domain terms in GLOSSARY.md, and the decisions in docs/adr/.

Node 22.6 or later, and pnpm.

pnpm install
pnpm dev            # the dev server, on http://localhost:5173
pnpm typecheck
pnpm test           # vitest
pnpm test:e2e       # Playwright, against a production build
pnpm build          # the app in dist/
pnpm build:deploy   # the same, with gdal3.js's .wasm and .data copied into dist/gdal3/2.8.1/

The tests that check the GeoPackages the export writes use GDAL's ogrinfo and its GeoPackage validator (gdal-bin and python3-gdal on Ubuntu), and skip where they are missing. docs/agents/testing.md says which suite runs before a merge.

Releases. GeoBox follows semantic versioning:

  • major: a break in a public contract that someone outside GeoBox relies on, such as ?url= or the boundaries manifest v1 (ADR-0009, ADR-0011);
  • minor: a feature added or changed, meaning anything that changes what the spec states;
  • patch: only fixes, text and translations.

A release is a commit that bumps the version in package.json, a v<x.y.z> tag on that commit, which runs CI, and a GitHub Release with the notes GitHub generates. The app shows the version, read from package.json when it is built, in the header and in /about, and fills it into the bug report. Production, geobox.inmagik.com, is deployed only from a release tag, so the version the app shows always matches the code it runs.

Build configuration

These variables are read when the app is built, so changing one needs a new build. Vite takes them from the environment or from .env files. A variable set in the environment wins over a file. .env.production is read by vite build only, never by the dev server or vitest. .env.local and .env.<mode>.local are kept out of git, for your own values.

Variable Set Unset
VITE_BOUNDARIES_BASE_URL The address of the catalogue of administrative boundaries, such as https://boundaries.inmagik.com/; its manifest is at <base>/v1/manifest.json (ADR-0011). The app has the "Administrative boundaries" button and dialog, a URL on the catalogue's host imports as a Boundary set, and /privacy names the host. No boundaries at all. .env.production sets it, so a production build has them and the dev server doesn't.
VITE_UMAMI_HOST and VITE_UMAMI_WEBSITE_ID Both together: the Umami server, such as https://umami.example.com, and the id it gives the site. The app loads <host>/script.js, counts visits and the events of analytics.ts, without cookies, and /privacy names the server. Either one missing: no script, nothing counted, and /privacy says so.
VITE_GDAL3_BASE_URL The folder that serves gdal3.js's gdal3WebAssembly.wasm and .data, with the version in its path, such as https://gdal.example.com/gdal3/2.8.1/. /privacy names its host. /gdal3/2.8.1/ on the app's own server: the dev and preview servers serve the files from node_modules, and pnpm build:deploy copies them into dist/.
VITE_THEME_LAB 1 builds the Theme lab in, which ?lab then turns on (spec §10). No lab, nor its dependencies. The dev server always has it.

For example:

# A build that counts visits on your own Umami server
VITE_UMAMI_HOST=https://umami.example.com VITE_UMAMI_WEBSITE_ID=<id> pnpm build:deploy

# A build without administrative boundaries, overriding .env.production
VITE_BOUNDARIES_BASE_URL= pnpm build

# The dev server with the boundaries
VITE_BOUNDARIES_BASE_URL=https://boundaries.inmagik.com/ pnpm dev

# A build with the Theme lab, opened at http://localhost:4173/?lab
VITE_THEME_LAB=1 pnpm build && pnpm preview

Other variables don't change the app:

  • E2E_PORT moves the port Playwright's tests serve the build on (4173 by default).
  • BOUNDARIES_BASE_URL is for the script that builds the boundaries catalogue; see scripts/boundaries/README.md.

A UI theme from a Theme lab recipe

The Theme lab tries a UI theme on the app itself: colours, fonts, radius, shadows, colour scheme, and the look of the header, the modals, the layer panel and the map panels. pnpm theme:from-recipe turns what the lab copies into a UI theme the app takes without the lab.

  1. Make the recipe. Open the lab with pnpm dev at http://localhost:5173/?lab, or in a VITE_THEME_LAB=1 build. Then press "Copy recipe", and save what it copies in a file, such as brand.json.

  2. Add the fonts. The app loads a font from its own Fontsource package, never from Google. For each font of the recipe other than "system", add its package, named after the font in lower case with hyphens for spaces:

    pnpm add @fontsource-variable/space-grotesk   # or @fontsource/space-grotesk, when Fontsource has no variable font

    The script stops on a font without a package, and names the package to add.

  3. Make the theme.

    pnpm theme:from-recipe brand.json brand

    The name is a lower-case letter followed by letters and digits, such as brand or kikinDark. It becomes the name of the export. It can't be lab, or the name of a module already in src/themes/.

  4. Pass it in. In src/themes/AppTheme.tsx, before the lab's props, which take over while the lab is on:

    import { brand } from './brand'
    …
    <MantineProvider {...brand} {...labProps}>

The script writes src/themes/<name>/:

File What it holds
index.ts The export: the Mantine theme and the CSS variables the lab computes, written out as plain values, with the colour scheme. The app needs neither the lab nor @mantine/colors-generator.
surfaces.css The lab's rules for the surface looks the recipe chose. It is written only when one of them differs from the default.
recipe.json The recipe, to make the theme again.

Running it again with the same name overwrites the folder, so a theme follows its recipe and the lab as they change. While the lab is on, it marks the page with data-theme-lab, and the theme's surface rules give way to the lab's.

A dark or auto colour scheme leaves some of the app's colours to review by hand, which spec §4 lists: the map's background, the table's handle and selected row, and the INMAGIK logo. The script reminds you when the recipe's scheme isn't light.

Contributing

Bug reports, translations and feature requests go in the issues, each with its form. Issues are public: without a GitHub account, or for a file you can't make public, write to info@inmagik.com.

A contribution, such as a pull request, comes in under the Apache License 2.0, as its section 5 says. There is no contributor licence agreement to sign, and no sign-off on commits.

Licence

GeoBox is open source, under the Apache License 2.0, copyright INMAGIK SRL: you can use it, change it and redistribute it, commercially too, as long as a copy keeps the licence and NOTICE. The packages GeoBox is built on, the sample files and the basemap files keep their own licences, as NOTICE says, and ADR-0012 says why this licence.

About

A small GIS that runs in your browser. Open Shapefile, GeoPackage, GeoJSON, KML, CSV, Excel and other geospatial files, see them on a map, edit them, run operations on them, and export them to another format, another CRS or an image. There is nothing to install and no account, and your files never leave your device.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages