What GIS is¶
A Geographic Information System (GIS) is any system for capturing, storing, querying, analyzing, and displaying data that has a location component. That covers everything from a spatial database extension like PostGIS, to desktop tools like QGIS, to the web map on a delivery-tracking page. The common thread is spatial data: information that's tied to a place on Earth, and the tooling built around answering questions like "what's near this point," "does this area overlap that one," or "how do these features relate to each other in space."
Related docs in this section: PostGIS (spatial database) and QGIS (desktop GIS application).
The two data models: vector and raster¶
Almost everything in GIS falls into one of two data models.
Vector data¶
Vector data represents discrete features as geometric shapes with exact coordinates:
- Point — a single location (a city, a sensor, a tree).
- Line (LineString) — a path with no area (a road, a river, a pipeline).
- Polygon — an enclosed area (a country border, a lake, a building footprint).
- Multi-* variants —
MultiPoint,MultiLineString,MultiPolygonfor representing a single feature made of several disconnected parts (e.g. a country like Canada, which includes many islands, is aMultiPolygon). - GeometryCollection — a mix of different geometry types grouped as one feature.
Vector data is precise and scales well to zooming in/out without losing detail, and it's what you use when features have clear boundaries (parcels, roads, administrative regions).
Raster data¶
Raster data represents continuous data as a grid of cells (pixels), each holding a value — elevation, temperature, land cover classification, or a satellite image's reflectance values. Rasters are the natural model for anything measured continuously across space rather than existing as discrete, boundaried objects.
Rasters have a resolution (the ground size each pixel represents — e.g. a 30-meter Landsat pixel covers a 30x30m area) that determines the tradeoff between file size and detail.
Choosing between them¶
A road network is vector; a satellite image is raster; elevation is usually raster (a Digital Elevation Model, or DEM); building footprints are vector. Many real analyses combine both — e.g. overlaying vector parcel boundaries on a raster satellite basemap.
Coordinate Reference Systems (CRS)¶
Every piece of spatial data needs a CRS to say what its coordinates actually mean — otherwise a pair of numbers like (45.42, -75.70) is meaningless.
Geographic vs. projected CRS¶
- Geographic CRS — coordinates as latitude/longitude on a 3D model of the Earth (a spheroid/ellipsoid). The most common is WGS84, identified by EPSG:4326. Units are degrees, not a linear distance, which makes some calculations (like measuring true distance) awkward directly in this CRS.
- Projected CRS — a mathematical projection that flattens the curved Earth onto a 2D plane, with coordinates in linear units (meters, feet). Every projection introduces some distortion (area, shape, distance, or direction) — there's no way to flatten a sphere without distorting something.
Common CRSs you'll encounter¶
| EPSG code | Name | Notes |
|---|---|---|
| EPSG:4326 | WGS84 | The default geographic CRS; what GPS devices output |
| EPSG:3857 | Web Mercator (Pseudo-Mercator) | Used by nearly all web slippy maps (Google Maps, OSM tiles); badly distorts area near the poles |
| EPSG:2154 | RGF93 / Lambert-93 | Example of a country-specific projected CRS (France) |
| UTM zones (e.g. EPSG:32617) | Universal Transverse Mercator | Good local accuracy; the Earth is divided into 60 narrow zones, each with low distortion |
Reprojecting (transforming data from one CRS to another) is one of the most common GIS operations — e.g. converting WGS84 lat/lon into a projected CRS before measuring distances or areas accurately, since degrees of longitude represent a different real-world distance depending on latitude.
Vector file formats¶
| Format | Extension | Notes |
|---|---|---|
| Shapefile | .shp (+ .shx, .dbf, .prj) |
Old (1990s) Esri format; still extremely common despite real limitations (10-character field name limit, multi-file, no native support for large attribute values) |
| GeoJSON | .geojson / .json |
Plain-text, human-readable, native to web mapping (JavaScript can parse it directly); WGS84 only by convention |
| KML/KMZ | .kml / .kmz (zipped) |
XML-based, Google Earth's native format; includes styling info alongside geometry |
| GeoPackage | .gpkg |
Modern, SQLite-based, single-file container that can hold multiple layers (vector and raster) — increasingly the recommended replacement for Shapefile |
| WKT / WKB | text / binary | Well-Known Text/Binary — a geometry serialization standard used inside databases like PostGIS, not typically a file you hand someone directly |
Raster file formats¶
| Format | Extension | Notes |
|---|---|---|
| GeoTIFF | .tif / .tiff |
The standard — a normal TIFF image with embedded georeferencing metadata (CRS, extent, resolution) |
| Cloud Optimized GeoTIFF (COG) | .tif |
A GeoTIFF organized so clients can fetch just the needed portion/resolution over HTTP, without downloading the whole file |
| NetCDF | .nc |
Common in climate/oceanographic data; supports multi-dimensional arrays (e.g. time + lat + lon + depth) |
| JPEG2000 | .jp2 |
Compressed imagery format, common in satellite imagery distribution |
Spatial data sources¶
- OpenStreetMap (OSM) — crowd-sourced, free, global vector data (roads, buildings, points of interest); exportable via tools like Overpass API or downloadable regional extracts.
- Natural Earth — free, curated vector and raster basemap data (country borders, coastlines, populated places) at several scales, commonly used for cartography and quick demos.
- National/government open data portals — most countries publish authoritative administrative boundaries, cadastral (property parcel) data, and census geography.
- Satellite imagery — Landsat (USGS, free, ~30m resolution) and Sentinel (ESA/Copernicus, free, ~10m resolution) are the two major free, global, regularly-updated imagery sources.
- Digital Elevation Models (DEMs) — SRTM (~30m global coverage) and national LiDAR-derived DEMs (much higher resolution where available).
Core spatial operations¶
These are the operations most GIS analysis is built from, regardless of which tool performs them:
- Buffer — generate a polygon representing "everything within X distance of this feature."
- Intersection — the geometry shared between two features.
- Union — merge two or more geometries into one.
- Difference — subtract one geometry's area from another.
- Distance — the shortest distance between two geometries.
- Spatial join — attach attributes from one layer to another based on their spatial relationship (e.g. "which county does each customer address fall in?").
- Containment/overlap tests — does geometry A contain, intersect, touch, or lie completely within geometry B (
ST_Contains,ST_Intersects,ST_Within, and similar predicates in PostGIS). - Centroid — the geometric center point of a feature.
- Nearest neighbor — find the closest feature(s) in one layer to a feature in another.
Spatial indexing¶
Spatial queries ("find everything within this bounding box," "find the nearest 5 points") are expensive to run against raw geometry without help, since comparing every row's exact geometry to every other is O(n²) at worst. Spatial databases and libraries solve this with spatial indexes:
- R-tree — groups nearby geometries into a hierarchy of bounding boxes, letting a query quickly discard whole branches that can't possibly match.
- GiST (Generalized Search Tree) — PostgreSQL/PostGIS's indexing framework, which implements an R-tree-like structure for geometry columns.
- Quadtree — recursively divides space into four quadrants; common in raster/tile-serving contexts.
Without a spatial index, a "what's near me" query against a large table effectively has to check every single row's geometry — this is the single most common cause of a slow spatial query, and adding a GIST index is almost always the first fix.
Web mapping and service standards¶
- XYZ / slippy map tiles — the standard scheme behind virtually every interactive web map (Google Maps, OpenStreetMap, Mapbox): pre-rendered raster or vector tiles addressed by zoom/x/y, stitched together as you pan and zoom.
- WMS (Web Map Service) — an OGC standard for requesting rendered map images from a server on the fly, given a bounding box and layer names.
- WMTS (Web Map Tile Service) — like WMS but serves pre-cached tiles for better performance, at the cost of flexibility.
- WFS (Web Feature Service) — an OGC standard for requesting raw vector feature data (not just images) over HTTP, so a client can do its own rendering/analysis.
- Vector tiles (MVT — Mapbox Vector Tiles) — tiles containing actual vector geometry rather than rendered pixels, letting the client style/render/interact with features directly (used by Mapbox GL, MapLibre).
The GIS tooling landscape¶
| Category | Examples |
|---|---|
| Desktop GIS | QGIS (free/open source), ArcGIS Pro (commercial, Esri) |
| Spatial databases | PostGIS (PostgreSQL extension), SpatiaLite (SQLite extension) |
| Command-line / library toolkit | GDAL/OGR (the toolkit nearly everything above is built on for format conversion and reprojection) |
| Web mapping libraries | Leaflet, OpenLayers, Mapbox GL JS, MapLibre GL JS |
| Map/tile servers | GeoServer, MapServer, Martin (vector tiles from PostGIS) |
| Python spatial libraries | Shapely (geometry), Fiona (I/O), GeoPandas (tabular + spatial), Rasterio (raster) |
| Routing engines | OSRM, GraphHopper, Valhalla |
GDAL/OGR deserves a special mention: it's the underlying translation and processing library that most other GIS tools (QGIS, PostGIS's ogr2ogr loader, GeoPandas, and many commercial products) call into under the hood for reading, writing, and reprojecting nearly every spatial format that exists. Its ogr2ogr (vector) and gdal_translate/gdalwarp (raster) command-line tools are worth knowing directly even if you mostly work through higher-level GUIs.
Common real-world use cases¶
- Urban planning — zoning, parcel analysis, walkability studies.
- Logistics and routing — delivery route optimization, service-area analysis (drive-time isochrones).
- Environmental science — land cover change detection, watershed delineation, habitat modeling.
- Telecom/utilities — network asset mapping, coverage/signal modeling.
- Public health — disease spread mapping, facility accessibility analysis.
- Disaster response — flood/fire extent mapping, damage assessment from satellite imagery.
- Real estate — comparable-property proximity analysis, flood-zone/risk overlays.