Mapping Resources, Applied

A map is geometry, plus values, placed on a flat surface by a projection, then drawn so position, color or height carries the value. One working example per resource on the #30DayMapChallenge list.

1. Raw features2. Clean, project3. Encode in 2D4. Encode in 3D

Data

01OpenStreetMapraw features

Every feature is a tagged point, line or area. Filter on amenity=cafe, then count points per hexagon.

Hexagon radius 8 px
[out:json];
node["amenity"="cafe"](40.48,-74.26,40.92,-73.70);
out;
3,096 cafes from the BBBike New York OSM extract, Oct 31 2026. Data ODbL, OpenStreetMap contributors.
02Overture Mapsraw features

GeoParquet on S3. Read only the rows whose bbox falls inside Long Island City, then extrude each footprint by its height. Drag to orbit.

SELECT height, geometry
FROM read_parquet('s3://overturemaps-us-west-2/release/2026-10-21.0/theme=buildings/type=building/*')
WHERE bbox.xmin > -73.965 AND bbox.xmax < -73.935
  AND bbox.ymin >  40.737 AND bbox.ymax <  40.760;   -- 2,507 buildings, 21 s in DuckDB
03Natural Earthraw features

Same country, three scales. Scale decides how many vertices survive, so pick 1:110m for a world map and 1:10m for a close-up.

gpd.read_file("ne_10m_admin_0_countries.shp").query("ADMIN == 'Norway'").count_coordinates()

Rivers are a graph: each link has a startNode and endNode. Start at the Thames estuary and walk upstream to get the whole catchment.

Upstream distance 283 km
by_end = groupby(links, "endNode")
walk(node):  for link in by_end[node]: keep(link); walk(link.startNode)
Contains OS data, Crown copyright and database right 2026.

Boundaries and statistics ship as separate files that share one key, the P-code. Join on it, divide by area, and you have a choropleth.

Hover a district.
districts.merge(population, left_on="adm2_pcode", right_on="ADM2_PCODE")   # 77 of 77 matched
Nepal COD-AB boundaries and COD-PS 2023 population, OCHA via HDX.
06LINZ Data Serviceraw features

A 1 m lidar elevation grid of Mt Taranaki. Contours are marching squares: for each grid cell, find where the surface crosses the chosen height.

Contour interval 100 m
d3.contours().size([w, h]).thresholds(d3.range(400, 2600, interval))(elevation)
LINZ Taranaki LiDAR 1m DEM (2021), CC BY 4.0, from the LINZ open data bucket s3://nz-elevation, resampled to 20 m.

An XYZ basemap is one image cut into 2z × 2z tiles. Each zoom level halves the ground size of one pixel.

Zoom z 18
m_per_px = 156543.03 * cos(lat) / 2**z
xtile = floor((lon + 180) / 360 * 2**z)
Wellington waterfront, LINZ Wellington 0.1m urban aerial photos (2017), CC BY 4.0, from s3://nz-imagery.
08OpenTopographyraw features

Hillshade from a DEM: brightness is the cosine of the angle between the ground's normal and the sun. Move the sun.

Azimuth 315°Altitude 45°
shade = cos(zenith)·cos(slope) + sin(zenith)·sin(slope)·cos(azimuth − aspect)
Mount St. Helens, SRTM GL1 30 m tile N46W123 from OpenTopography's public raster bucket.
09Public APIsraw features

Any API that returns latitude and longitude is a point layer. This is the USGS earthquake feed, fetched live when you open the page.

fetch("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.geojson")

Directories, not data. Where do the links point? Mostly the US and UK.

11Data is Pluraldirectories

1,995 datasets since 2015, one dot each. Red dots mention maps, boundaries, coordinates or satellites. Click one.

Tools

12QGISall four steps

Run headless here: hillshade + 100 m contours from the LINZ DEM, then a styled map render.

QGIS render of Mt Taranaki hillshade with contours
processing.run("native:hillshade", {"INPUT": dem, "Z_FACTOR": 1.5, "AZIMUTH": 315, "V_ANGLE": 40, ...})
processing.run("gdal:contour",   {"INPUT": dem, "INTERVAL": 100, "FIELD_NAME": "ELEV", ...})
13Kepler.glencode

Kepler is a UI on top of deck.gl. This is its hexbin layer: bin the OSM cafes into 250 m hexagons, height = count. Drag to orbit.

new HexagonLayer({data: cafes, radius: 250, extruded: true, elevationScale: 5})

Aerialod takes a grayscale heightmap (left) and turns brightness into height. Aerialod is a Windows app, so the right side does the same step in three.js. Drag to orbit.

vertex.z = heightmap[row][col] * exaggeration

Same DEM as a 240 × 240 vertex mesh, one sun lamp, path traced in Cycles (48 samples, 2 min on CPU). BlenderGIS automates the DEM import.

Blender render of Mt Taranaki
mesh.from_pydata([(x, y, (z - zmin) * 1.6) for each cell], [], quads)
scene.render.engine = "CYCLES"; bpy.ops.render.render(write_still=True)

sf puts geometry in a data frame column; ggplot2 draws it with geom_sf. 124,070 OS river links, named rivers in navy. Right: rayshader traces a ray from every DEM cell toward the sun to find shadows.

ggplot2 map of Great Britain riversrayshader render of Mount St. Helens
ggplot(rivers) + geom_sf(aes(colour = named, linewidth = named)) + theme_void()
z %>% sphere_shade() %>% add_shadow(ray_shade(z, sunangle = 315, sunaltitude = 30)) %>% add_shadow(ambient_shade(z)) %>% plot_map()

Spatial join: put each OSM cafe in its Census tract (point in polygon), count, plot. Below, xarray-spatial computes hillshade and slope on the OpenTopography DEM.

Cafes per Census tractHillshade and slope of Mount St Helens
gpd.sjoin(cafes, tracts, predicate="within").groupby("GEOID").size()   # 2,634 of 3,096 land in NYC tracts
hillshade(dem, azimuth=315, angle_altitude=45); slope(dem)
18Mapshaperclean, project

Running in this page. Visvalingam simplification drops the vertex whose triangle with its two neighbours has the smallest area, again and again.

Keep 100%
mapshaper -i norway.json -simplify 100% keep-shapes -o out.json

Declare data, mark, projection and color encoding. The library does the rest.

alt.Chart(world).mark_geoshape().encode(color="gdppc:Q").project("equalEarth")
20Vegaencode

Lower level: you wire a slider signal into the projection's rotate parameter yourself.

"signals": [{"name": "lon", "value": -80, "bind": {"input": "range", "min": -180, "max": 180}}],
"projections": [{"name": "p", "type": "orthographic", "rotate": [{"signal": "-lon"}, -20, 0]}]
21Litvisencode

A markdown file where elm-vegalite blocks render inline and your design reasoning sits next to them. Left: the document. Right: what its block draws.

---
elm:
  dependencies:
    gicentre/elm-vegalite: latest
---

Nepal is long and thin, so an
equal-area projection keeps the
Terai districts honest.

```elm {v}
nepal : Spec
nepal =
  toVegaLite
    [ dataFromUrl "nepal.geojson"
        [ jsonProperty "features" ]
    , projection [ prType equalEarth ]
    , geoshape []
    , encoding
        (color [ mName "properties.dens"
               , mScale [ scType scLog ] ] [])
    ]
```

A projection is a function from (lon, lat) to (x, y). Every red circle is the same size on the globe. Watch what each projection does to them.

d3.geoPath(d3.geoMercator().fitSize([w, h], world))(feature)   // a projection turns coordinates into an SVG path string
d3.geoCircle().center([lon, lat]).radius(5)()                   // Tissot circle: 5° radius everywhere

Tutorials

Klas Karlsson: QGIS videos Steven Bernard: QGIS introduction Ujaval Gandhi: QGIS tutorials Alasdair Rae: 3D landscapes Kenneth Field: Basics of mapmaking