Your Type System Working For You!
summary
Shows how Scala turns CRS errors into compile-time guarantees by baking CRS definitions and transforms into types and implicits, using GeoTools to load EPSG models and mapping lat/longs and UTM zones to type classes. Demonstrates case-class + companion tricks, variance/invariance, existential type injection for loaded files, and compile-time rejection of mixing EPSG:4326 with UTM without a transform. Also covers raster grid coverage handling and statically typed attribute maps via TMap to prevent runtime surprises.
AI-written summary · about
chapters (7)
- 0:00Start
- 3:22WGS 84 UTM Zones
- 6:40CRS Types! Let's start with a simple definition
- 11:28Geometries have the CRS as part of the type
- 12:18Now, the compiler has your back
- 16:03Reifying the CRS type from the existential
- 19:44Grid Coverages (Rasters)
related talks
50mYour Type System Working for You
48mAcademese to English: A Practical Tour of Scala’s Type System
20mType Classes for the Rest of Us
32mUnderstanding the Type System of Scala 3
49mAcademese to English: Scala's Type System, Dependent Types and What It Means To You
45mTypelevel Programming 101: The Subspace of Scala
49mType level Programming in Scala
31mTYPECLASSES — A TYPE SYSTEM CONSTRUCT
