Skip to content

Instantly share code, notes, and snippets.

@patte
Created December 9, 2022 21:10
Show Gist options
  • Save patte/cdb481c6ffb17a3dfe622173a99777c8 to your computer and use it in GitHub Desktop.
Save patte/cdb481c6ffb17a3dfe622173a99777c8 to your computer and use it in GitHub Desktop.
var topojsonClient = require("topojson-client")
ch = await fetch("https://swiss-maps.vercel.app/api/v0?format=topojson&projection=wgs84&year=2022&shapes=lakes").then(res => res.json())
geo = topojsonClient.feature(ch, ch.objects.lakes)
console.log(JSON.stringify(geo, null, 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment