Your Type System Working for You
summary
Uses Scala's type system to make coordinate reference systems first-class so wrong CRS is a compile error, tying EPSG codes to types and looking up definitions from GeoTools and running geometry math with JTS. Builds a type-safe Coordinate/Geometry/Feature API, a type-indexed attribute map that accumulates fields safely, and an existential CRS pattern for runtime-discerned CRSs. Resampling requires explicit opt-in (resample only via import). Demonstrates it prevents misplaced polygons, compiles where correct, rejects bad CRS at compile time (compile-time CRS tracking).
AI-written summary · about
chapters (25)
- 0:00Introduction
- 1:50The Earth is not flat
- 3:02Earth is not an exact sphere
- 4:05LatLongs
- 5:28Point Polygons
- 6:38Raster Data
- 7:09CRS
- 8:33CRS Examples
- 9:10Transverse Mercator
- 9:57CRS coordinates
- 11:08Runtime CRS checking
- 11:52Scala type parameters
- 12:39Scala variants
- 13:19CRS tracking
- 14:29Case classes
- 15:17Implicit companion
- 17:39Harmony
- 18:21CRS Type
- 26:28The Result
- 32:37Future Definition
- 33:42Type Index Map
- 34:57Type Tag
- 39:34Harvesters
- 41:05Implicit Extension
- 42:44Rich Feature
related talks
31mYour Type System Working For You!
48mAcademese to English: A Practical Tour of Scala’s Type System
49mAcademese to English: Scala's Type System, Dependent Types and What It Means To You
24mLet the Scala compiler work for you
38mThinking in Scala 3 Types
49mType level Programming in Scala
45mTypelevel Programming 101: The Subspace of Scala
32mUnderstanding the Type System of Scala 3
