<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-04-17T09:41:15+00:00</updated><id>/feed.xml</id><title type="html">karavia.ch</title><subtitle>Things with maps.</subtitle><entry><title type="html">Trying out Deck.gl-raster</title><link href="/2026/04/17/deck.gl-raster.html" rel="alternate" type="text/html" title="Trying out Deck.gl-raster" /><published>2026-04-17T00:00:00+00:00</published><updated>2026-04-17T00:00:00+00:00</updated><id>/2026/04/17/deck.gl-raster</id><content type="html" xml:base="/2026/04/17/deck.gl-raster.html">&lt;p&gt;⚡ &lt;strong&gt;&lt;a href=&quot;https://labs.karavia.ch/deckgl-raster-swisstopo/&quot;&gt;Straight to the demo&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ever since I have seen the
&lt;a href=&quot;https://mapstodon.space/@kylebarron/115855600661463965&quot;&gt;Deck.gl-raster release announcement&lt;/a&gt;,
I have been meaning to try it out, and now I finally got around to it.&lt;/p&gt;

&lt;h3 id=&quot;raster-reprojection-in-the-browser&quot;&gt;Raster reprojection in the browser&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://developmentseed.org/deck.gl-raster/&quot;&gt;Deck.gl-raster&lt;/a&gt; is only a few months old, but the idea of reprojecting rasters in the browser is not new. Notable previous examples are &lt;a href=&quot;https://openlayers.org/doc/tutorials/raster-reprojection.html&quot;&gt;OpenLayers&lt;/a&gt; and &lt;a href=&quot;https://ivan.sanchezortega.es/development/2021/03/08/introducing-arrugator.html&quot;&gt;Arrugator&lt;/a&gt;. However, the combination with &lt;a href=&quot;https://deck.gl/&quot;&gt;Deck.gl&lt;/a&gt; (and therefore also MapLibre, since Deck.gl integrates with it) promises a more convenient usage in mainstream web mapping.&lt;/p&gt;

&lt;h3 id=&quot;choosing-test-data&quot;&gt;Choosing test data&lt;/h3&gt;

&lt;p&gt;For my little test run, an obvious choice for me was a map from
&lt;a href=&quot;https://data.geo.admin.ch/browser/&quot;&gt;Swisstopo’s Data Catalog&lt;/a&gt;, specifically the
&lt;a href=&quot;https://data.geo.admin.ch/browser/#/collections/ch.swisstopo.pixelkarte-farbe-pk1000.noscale/items/swiss-map-raster1000_1000?.asset=asset-swiss-map-raster1000_1000_krel_50_2056-tif&quot;&gt;National Map 1:1 million&lt;/a&gt;, which covers all of Switzerland in a single map.&lt;/p&gt;

&lt;h3 id=&quot;making-it-render-well&quot;&gt;Making it render well&lt;/h3&gt;

&lt;p&gt;Starting from &lt;a href=&quot;https://developmentseed.org/deck.gl-raster/examples/cog-basic/&quot;&gt;deck.gl-raster’s basic example&lt;/a&gt;, I added
&lt;a href=&quot;https://data.geo.admin.ch/ch.swisstopo.pixelkarte-farbe-pk1000.noscale/swiss-map-raster1000_1000/swiss-map-raster1000_1000_krel_50_2056.tif&quot;&gt;the URL&lt;/a&gt; to my chosen map, and it rendered like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/deckgl-raster-swisstopo_0_initial.png&quot; alt=&quot;Swisstopo GeoTIFF: Initial render&quot; width=&quot;640&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;small&gt;All maps &lt;a href=&quot;https://www.swisstopo.ch/&quot;&gt;© Swisstopo&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Then I &lt;a href=&quot;https://github.com/developmentseed/deck.gl-raster/commit/1ec5b3620e7b42acbcaefea28d26dae10af88475&quot;&gt;added a 2x fudge factor&lt;/a&gt;
in order to get a higher level of detail (LOD), meaning that more pixels are loaded to get a more detailed rendering:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/deckgl-raster-swisstopo_1_fudge_factor.png&quot; alt=&quot;Swisstopo GeoTIFF: Higher LOD&quot; width=&quot;640&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then I noticed that the map appeared darker than usual, so I had to disable some lighting computation in the rendering pipeline
(this &lt;a href=&quot;https://github.com/developmentseed/deck.gl-raster/pull/423&quot;&gt;has been fixed&lt;/a&gt; in the meantime):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/deckgl-raster-swisstopo_2_avoid_darkening.png&quot; alt=&quot;Swisstopo GeoTIFF: Avoid darkening&quot; width=&quot;640&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, I had to &lt;a href=&quot;https://github.com/developmentseed/deck.gl-raster/commit/1a7332e0df9a6bbb9d908b01b70406de2b378859&quot;&gt;change the texture settings to enable antialiasing&lt;/a&gt; to make the appearance smoother:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/deckgl-raster-swisstopo_3_add_antialiasing.png&quot; alt=&quot;Swisstopo GeoTIFF: Add antialiasing&quot; width=&quot;640&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now it looks exactly like I had expected. I added a toggle to overlay Swisstopo Web Mercator tiles of the same map, which has almost no effect now, because the rendering looks very similar. I think the browser-reprojected base map looks slightly sharper because it only goes through one resampling step, while the tiles are resampled twice (reproject to Web Mercator, then up-/downsample to match current map zoom).&lt;/p&gt;

&lt;p&gt;You can ⚡ &lt;strong&gt;&lt;a href=&quot;https://labs.karavia.ch/deckgl-raster-swisstopo/&quot;&gt;head to the demo&lt;/a&gt;&lt;/strong&gt; and see for yourself.&lt;/p&gt;

&lt;h3 id=&quot;closing-thoughts&quot;&gt;Closing thoughts&lt;/h3&gt;

&lt;p&gt;This specific example may not appear very useful because it is reproducing existing functionality, namely reprojecting a raster map to Web Mercator. On the flip side, this allowed me to focus on the details and iron out a few glitches with this new library. Other interesting things to try in the future could be:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Rendering multiple GeoTIFFs à la &lt;a href=&quot;https://developmentseed.org/stac-map/&quot;&gt;stac-map&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Using raster tiles instead of a GeoTIFF as a source for the reprojection pipeline.&lt;/li&gt;
  &lt;li&gt;Once deck.gl-raster has matured a bit more, it should be possible to build a similar demo with a much simpler setup, just linking the library, rather than tweaking in a forked custom build.&lt;/li&gt;
&lt;/ul&gt;</content><author><name></name></author><summary type="html">⚡ Straight to the demo</summary></entry><entry><title type="html">swissBOUNDARIES3D as GeoJSON</title><link href="/2018/07/11/swissBOUNDARIES3D.html" rel="alternate" type="text/html" title="swissBOUNDARIES3D as GeoJSON" /><published>2018-07-11T00:00:00+00:00</published><updated>2018-07-11T00:00:00+00:00</updated><id>/2018/07/11/swissBOUNDARIES3D</id><content type="html" xml:base="/2018/07/11/swissBOUNDARIES3D.html">&lt;p&gt;swissBOUNDARIES3D is an open dataset that contains all national, cantonal,
district, and municipal boundaries of Switzerland.&lt;/p&gt;

&lt;p&gt;I converted it to &lt;a href=&quot;https://tools.ietf.org/html/rfc7946&quot;&gt;RFC 7946 GeoJSON&lt;/a&gt; and
made it available at
&lt;a href=&quot;https://labs.karavia.ch/swiss-boundaries-geojson/&quot;&gt;labs.karavia.ch/swiss-boundaries-geojson&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This makes it usable with a variety of tools, e.g. you can show the national boundaries of
Switzerland and Liechtenstein on &lt;a href=&quot;https://geojson.io/#data=data:text/x-url,https%3A%2F%2Flabs.karavia.ch%2Fswiss-boundaries-geojson%2Fgeojson%2F2018%2FswissBOUNDARIES3D_1_3_TLM_LANDESGEBIET.geojson&quot;&gt;geojson.io&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://geojson.io/#data=data:text/x-url,https%3A%2F%2Flabs.karavia.ch%2Fswiss-boundaries-geojson%2Fgeojson%2F2018%2FswissBOUNDARIES3D_1_3_TLM_LANDESGEBIET.geojson&quot;&gt;&lt;img src=&quot;/assets/img/swissBOUNDARIES3D_geojson.io.png&quot; alt=&quot;swissBOUNDARIES3D on geojson.io&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More applications hopefully coming soon…&lt;/p&gt;

&lt;p&gt;You can find the &lt;a href=&quot;https://github.com/rkaravia/swiss-boundaries-geojson&quot;&gt;conversion code on GitHub&lt;/a&gt;.&lt;/p&gt;</content><author><name></name></author><summary type="html">swissBOUNDARIES3D is an open dataset that contains all national, cantonal, district, and municipal boundaries of Switzerland.</summary></entry><entry><title type="html">Map of 20 km de Lausanne</title><link href="/2018/04/29/20km.html" rel="alternate" type="text/html" title="Map of 20 km de Lausanne" /><published>2018-04-29T00:00:00+00:00</published><updated>2018-04-29T00:00:00+00:00</updated><id>/2018/04/29/20km</id><content type="html" xml:base="/2018/04/29/20km.html">&lt;p&gt;Today, the annual 20k race took place in Lausanne. I checked
&lt;a href=&quot;https://www.20km.ch/cms/fr-fr/index.php?option=com_content&amp;amp;view=article&amp;amp;id=74&quot;&gt;the official website&lt;/a&gt;
for a web map of the race track, but I could only find some pdf files. So I decided to make my own.&lt;/p&gt;

&lt;iframe class=&quot;map-iframe&quot; src=&quot;https://labs.karavia.ch/geojson-swiss/?options=%7B%22trackUrl%22%3A%22https%3A%2F%2Fkaravia.ch%2Fdata%2F20km.geojson%22%7D&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;You can also&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://labs.karavia.ch/geojson-swiss/?options=%7B%22trackUrl%22%3A%22https%3A%2F%2Fkaravia.ch%2Fdata%2F20km.geojson%22%7D&quot;&gt;Open the map in a new tab&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://karavia.ch/data/20km.geojson&quot;&gt;Get the track file in GeoJSON format&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><author><name></name></author><summary type="html">Today, the annual 20k race took place in Lausanne. I checked the official website for a web map of the race track, but I could only find some pdf files. So I decided to make my own.</summary></entry></feed>