This repo hosts Swiss canton and municipality geodata in open formats that can be used to build static and interactive maps (e.g. with D3).
The following formats are available:
The ESRI Shapefiles are generated with QGIS using the 'V200' municipality area Shapefiles (QGIS wouldn't combine the cantons with the 'swissBOUNDARIES3D' files). Foreign municipalities are removed.
The CRS is set to WGS84 because that's the default for GeoJSON.
The simplified shapefiles are generated with MapShaper, using the Visvalingam algorithm with 50% simplification.
Run rake geojson
to generate the GeoJSON files from the shapefiles. Useful feature properties are automatically populated and converted to camelCase. Coordinates are rounded to a precision of 3 with LilJSON.
Run rake topojson
to generate the TopoJSON files from the GeoJSON files. Note that the simplified files are using the non-simplified GeoJSON as input and are simplified using TopoJSON with the -s 10e-9
setting.
- TopoJSON Cantons and Municipalities (stored in a single file!)
- TopoJSON Cantons
Jeremy Stucki, Interactive Things
Data source is the Swiss Federal Office of Topography, swissBOUNDARIES3D 2012.
This agreement under public law in accordance with Article 12, paragraph 1b of the Swiss Federal Act of 5 October 2007 on Geoinformation (hereinafter referred to as Geoinformation Act) regulates access to, and use of, the federal geodata database.
By accepting this agreement, the licensee acknowledges all contractual provisions – in particular the scope of the licence and the contractual obligations – as well the applicability of Swiss federal legislation governing geoinformation.
By accepting this agreement, the licensee also acknowledges the sole right of the licensor to regulate access to, and use of, the federal geodata database. The attention of the licensee is herewith drawn to the fact that geodata may be protected under copyright law. The licensee thus acknowledges the exclusive right of the licensor to determine the use of the data.