Problems
Real geospatial problems, graded automatically. Choose a track, a level and what you want to hand in.
- Not started, Docks and bikes per borough, in one querySpatial analysisSQLPostGIS / SQLbeginnerDifficulty: beginner150 XP~25 min4 checksPostGIS / SQLbeginnerDifficulty: beginner
A point-in-polygon join with GROUP BY — and the outer join that keeps the boroughs with nothing to count.
You hand in a spatial SQL query.
Datasets
- London boroughs · Polygon · 33 features · EPSG:4326
- Santander Cycles docking stations (live snapshot) · Point · 799 features · EPSG:4326
What you’ll do
- Join stations to boroughs with a spatial predicate
- Aggregate per borough
- Keep every borough, including the ones outside the scheme
ST_ContainsGROUP BYouter jointransportLondonAlso trains Spatial AnalysisOpen problem - Not started, How many mapped rivers touch each country?Spatial analysisSQLPostGIS / SQLbeginnerDifficulty: beginner150 XP~25 min4 checksPostGIS / SQLbeginnerDifficulty: beginner
ST_Intersects between lines and polygons with GROUP BY — and the outer join that keeps the countries with none.
You hand in a spatial SQL query.
Datasets
- Countries · MultiPolygon · 241 features · EPSG:4326
- Rivers and lake centrelines · LineString · 461 features · EPSG:4326
What you’ll do
- Join lines to polygons with a spatial predicate
- Aggregate per polygon
- Keep every polygon, including those with no match
ST_IntersectsGROUP BYouter joinhydrologyglobalOpen problem - Not started, Which ports are within 25 km of a capital?Spatial analysisSQLPostGIS / SQLintermediateDifficulty: intermediate220 XP~35 min5 checksPostGIS / SQLintermediateDifficulty: intermediate
ST_DWithin on geography: a proximity join in true metres that the index can still answer.
You hand in a spatial SQL query.
Datasets
- Populated places · Point · 1,251 features · EPSG:4326
- Ports · Point · 1,081 features · EPSG:4326
What you’ll do
- Write a proximity join with ST_DWithin
- Measure in metres on SRID 4326 data by casting to geography
- Keep the predicate in a form the GiST index can serve
ST_DWithingeographyGiSTproximityglobalOpen problem - Not started, Urban share of each state, in SQLSpatial analysisSQLPostGIS / SQLadvancedDifficulty: advanced
ST_Intersection for the pieces and ST_Area on geography for the metres — the overlay-and-measure pattern inside the database.
You hand in a spatial SQL query.
Datasets
- United States states · Polygon · 51 features · EPSG:4326
- Urban areas · Polygon · 2,143 features · EPSG:4326
What you’ll do
- Overlay polygons with ST_Intersection
- Measure the pieces on geography rather than in degrees
- Aggregate per state, keeping the states with nothing
ST_IntersectiongeographyoverlayGROUP BYland useAlso trains Spatial AnalysisOpen problem