8 ms·
Eduard: Swiss-Style Relief Shading for Maps Using Machine Learning
- malshe 4y agoVery impressive!
- brendanashworth 4y agoThis could be part of a great contribution to the Natural Earth project [1], which is one of the major sources of cartographic raster data for online web maps! [1] https://www.naturalearthdata.com/ https://www.naturalearthdata.com/
- renjimen 4y agoVery cool. Making attractive and readily understandable shaded relief is a real art. Curious to see how well this generalises to morphology outside the Swiss Alps.
- tomrod 4y agoNeat project! On mobile I see about 5% of the left part of the images after the discussion, along with the color boundary. Brave, Android. Not sure if it just me, Javascript blocking, or what.
- hummus_bae 4y ago[dead]
- mashygpig 4y agoIs there an easy way to see that this problem is complicated enough to require a neural network? I'm a noob in graphics, but this problem seems like it shouldn't be that difficult to require a neural net.
- DavidAdams 4y agoI think a lot of it has to do with the fact that a 2D map is going to have roads and valleys and big green spaces in the mountainsides and peaks. The neural net identifies that villages and curvy roads represent valley floors and interpolate where the mountain slopes are.
- rcme 4y agoI think it's using the contour lines on the map, not the villages and roads. The paper mentions the training data is contour maps and relief maps of the same area.
- folli 4y agoI agree, the paper and the examples therein are worth a quick look: https://arxiv.org/abs/2010.01256 https://arxiv.org/abs/2010.01256 They mention using DEM data only, no roads, villages etc.
- nl 4y agoThis is wrong. Relief shading is done from the topological data itself (ie, the contours).
- recuter 4y agoThere's a nice example on that page with an overlayed relief shaded map and the original. Can you explain in English step by step how you would turn one into the other manually using something like photoshop?
- glibby 4y agoUse the partial derivatives of the topo height to calculate a normal. dot that normal against your fake sun angle to shade your terrain. it seems though that the magic in this is in throwing away specific details and changing the sun angle when it is aesthetically pleasing which makes sense. on the surface it looks like you should be able to use the heightfield and standard filters to get a reasonable result but I'll take their word for it that real world data will prove more difficult.
- wnkrshm 4y agoIf you read the text of the site or the paper: it needs a digital elevation model (i.e. a height map) to create the shaded relief. It does not ingest graphical maps and does the relief, it needs a discretized map of height data, such as lidar (which can be downloaded for any place on earth with 1m resolution).
- nestorD 4y agoIt does look like it would be doable without neural networks. My guess (having read their paper but not worked in the domain) is that it would be doable but requires a lot of iterations, tweaking parameters and dealing with corner cases. That would give you something running almost instantaneously but it would take a year to develop with tight feedback from domain experts. Or, you can throw a (relatively standard for that kind of task) neural network at the problem, have a prototype at the end of the week and something solid by the end of the month. In those conditions it makes sense to go with the neural network based solution (however, I do hope that having this result will push people to work on a more traditional approach that is competitive with the neural network based one).
- mdp2021 4y agoThe chances of the problem not having being already tackled with deterministic algorithms is the thinnest - and in fact, yes, there do exist tools, as expected. See the sections about 'hillshade' at the OpenTopoMap "from scratch" instructions, at https://github.com/der-stefan/OpenTopoMap/blob/master/mapnik/README.md https://github.com/der-stefan/OpenTopoMap/blob/master/mapnik...
- nestorD 4y agoIt has but I am hoping that a paper accomplishing the task with machine learning will move the goalpost (it has happened in other areas of computer vision).
- mdp2021 4y ago> move the goalpost I don't think I understand your expression there: do you mean that "the problem of producing relief bitmaps from elevation data could lead to new achievements in our knowledge relevant to Neural Nets"? I am not sure why. If you mean, more consistently with your original parent post, "lead to improvements in the past traditional techniques towards the same goal" - I would say that I don't see much space for leaping better results than those already possible.
- mdp2021 4y agoWe have been doing it "since forever" without Neural Networks. Check Stefan "der-stefan" Erhardt's instructions to create your own OpenTopoMap service and map tiles from iron: you download elevation data and process them into shaded elevations - https://github.com/der-stefan/OpenTopoMap https://github.com/der-stefan/OpenTopoMap
- boromi 4y agoWill you release a Windows or Android version?
- folli 4y agoIn Swiss-Style Relief shading, the light comes from North West, which is impossible in the northern hemisphere. This makes sunny south facing slopes shaded and shaded north facing slopes light. Legend says that this was an intentional design decision, because right handed people usually have their desk lighting on the top left of their desk, giving the map a 3D like appearance. Here's an article on the topic (german only), it seems to have caused quite the debate back in the day: https://www.swisstopo.admin.ch/de/home.detail.news.html/swisstopo-internet/news2023/time-space/light.html https://www.swisstopo.admin.ch/de/home.detail.news.html/swis...
- mdp2021 4y agoBut if you try using the factually correct angle (light from some angle in the south), the result is misleading to the eye.
- pixelesque 4y agoSometimes, but not always: it likely depends on the style of the map and how accurate it is as well I think, and maybe depends on people's perception: thanks to computer UI buttons from the 90s, it is common for upper and left-most surfaces/bevels to be lighter, so there is some assumption there. i.e. I think this type of thing: https://cartographart.com/minimalist/iceland_2_5k_orth_occlusion.jpg https://cartographart.com/minimalist/iceland_2_5k_orth_occlu... works well, but that's not really a detailed map with normal cartographic details like roads and towns on overlaid with relief shading, so difficult to say. However even if you do try and do it accurately, places on the equator are likely troublesome: i.e. the whole of Africa or something: you're unlikely to want to do the fully-accurate thing there of above the equator (or where the sun is) being shadowed from the south and below the equator being shadowed from the north, it'll likely be confusing in the middle.
- mdp2021 4y ago> depends In fact it works with the provided example but, empirically, it does not on area detail of detailed maps. Crests and valleys will switch. > computer UI buttons That is a consequence of consolidated established style, not a cause. > the whole of Africa It will work on the view of the full shape but it will not on the area detail, where the viewer will lose the notion of global position and attempt to interpret it like any other spot.
- folli 4y agoI'm facing the issue on how to aesthetically visualize my hiking and skiing GPS tracks in mountainous terrain (similar to the OP, I live in Switzerland, so it's either up or down). I've decided to go directly the 3D route using Babylon.js, see here for an example: https://cubetrek.com/view/6338 https://cubetrek.com/view/6338 Within Switzerland, it also uses Swiss-style maps as texture, outside of Switzerland a visually similar map style. I'm looking for Beta testers, so feel free to sign up: https://cubetrek.com/ https://cubetrek.com/
- antipotoad 4y agoLooks really nice. One comment from a usability perspective: it would be nice if the center of rotation were a point on the trail, rather than a point somewhere underneath the landscape. Better still if that center point was dynamic as you pan around the map, such that it’s always the ‘middle’ point of the trail segment that’s in the viewport (at least, I think that’s what my brain is telling me it wants, I might be specifying that slightly wrong). Great work anyhow!
- folli 4y agoThanks for trying it out! I like the idea about the dynamic center of rotation, I have not thought about this. Let me know if you have any other suggestions: contact@cubetrek.com
- sorenjan 4y agoOne of my pet peeves is when I zoom in to a 3D model and the rotation is somewhere far off screen, most of the time the model center. It makes it very difficult to orient yourself when rotation also moves what I was looking at off screen. I think Google Earth (desktop) does it well, it rotates around the point where the mouse cursor is pushed. So you push the center button, it shows a marker where the pointer was, and then you rotate by moving the mouse. At the very least I think the rotation center should be on the surface and on screen.
- 4y ago
- ttul 4y agoU-Nets are proving to be extremely versatile networks.
- KingOfCoders 4y agoAs someone who grew up with these maps when my parents went hiking in the alps with us kids, I get so many good feelings from them.
- faebi 4y agoI heard there is some work going on to import the new extremely high quality relief data from swisstopo into openstreetmap. They are even supposed to be accounting for buildings and forests in order to get the ground level accurately. Not sure where they are right now.
- stereo 4y agoOpenStreetMap doesn't really have relief data. We have the buildings, the forests, the elevation of peeks, but that's pretty much it. That being said, high resolution lidar data can be very useful to map paths that are usually hidden by forests, like at https://lidar-hillshade-2019.openstreetmap.lu/#zoom=20&lat=49.6330182&lon=6.116868 https://lidar-hillshade-2019.openstreetmap.lu/#zoom=20&lat=4...
- habi 4y agoswissALTI3D [1], the digital elevation model of Switzerland and swissSURFACE3D [2], a LIDAR scan of the surface of Switzerland are available as background layers in several OSM editors, at least those that use https://github.com/osmlab/editor-layer-index https://github.com/osmlab/editor-layer-index [1]: https://www.swisstopo.admin.ch/en/geodata/height/alti3d.html https://www.swisstopo.admin.ch/en/geodata/height/alti3d.html [2]: https://www.swisstopo.admin.ch/en/geodata/height/surface3d.html https://www.swisstopo.admin.ch/en/geodata/height/surface3d.h...
- shrx 4y agoI don't get it why ML is needed. Just download a DEM (for example, an aerial LIDAR map or SRTM), import it in QGIS along with your base map raster, choose the appropriate shading parameters and combine the two with appropriate blending. edit: and if you're feeling fancy, you can render the relief shading in blender: https://somethingaboutmaps.wordpress.com/2017/11/16/creating-shaded-relief-in-blender/ https://somethingaboutmaps.wordpress.com/2017/11/16/creating...
- TJSomething 4y ago> Many standard shading algorithms exist for creating shaded reliefs, some can easily be found in applications like ArcGIS and QGIS but they are simply not expressive enough (see our paper for examples). Creating these reliefs is partially an art form rather than a simple illumination problem, so trying to encode the 'human-ness' into step-by-step algorithms is simply too difficult. This is where ML enters the picture.
- mdp2021 4y ago> an art form Which is why the linked Daniel Huffman's technique employed the convincing results of Blender.
- TJSomething 4y agoThe biggest thing that I'm seeing that Singh has over Huffman is the adjustable detail-preserving terrain smoothing. Detail-preserving blur algorithms don't generalize well. Application-specific NN solutions tend to excel at this problem, by having a model of what details are important vs incidental. I would like to see a combination of the two, with the terrain pre-processed before being used in Blender.
- flohofwoe 4y agoThis is a similar problem as automatic LOD computation for 3D game assets though, and that has been done for a long time without ML (but maybe ML may actually help there too, no idea). I still find the 'human touch' argument a bit unconvincing for this type of problem.
- meindnoch 4y agoWhy would you use a black box ML model for such a well-defined rendering task is beyond me...
- PufPufPuf 4y ago> The network was able to learn key design principles from manual reliefs such as removing unnecessary terrain details, adjusting illumination direction, and varying brightness to emphasise larger landforms.
- stdbrouw 4y agoMy first impression was also "huh, why would you need a neural net for that?" but I suppose it's a little like brute force calculations in science in cases where probably with some effort you could find an analytic solution -- at a certain point just throwing computation at the problem beats finessing a tidy understandable algorithm to account for e.g. for the small differences in the direction of the shading that seem to define good manual shading.
- mistrial9 4y agohmm this is important and deserves more clarity. Algorithmic computer science is used and taught widely, in a hundred programming languages. Machine Learning is a statistics-based group of techniques using data to guess reliably the values in new data. Machine Learning is often called a subset of AI, but there is no real definition of AI except "doing something with a computer that previously required a human" So the change here is .. instead of pre-written rules to determine outcomes.. use a lot of data, read and build a model from that data, to predict with statistics what the new result should look like given similar inputs. Machine Learning is data-driven to predict, while algorithms use math and loops to derive answers.
- avidphantasm 4y agoAs a primarily macOS user who works with geospatial data, and laments the lack of native GIS tools on macOS, it’s nice to see this in the app store. However, it seems like releasing this as a QGIS plugin would make more sense (though it would be harder to monetize I guess).
- smcin 4y agoYes, this is neat, but sad it's only available as an iOS app, not as a Python/R/etc package and/or plugin.
- brendan8229 4y agoVery interesting. We've worked on implementing a UI to choose settings for hill shade tiles and then use gdal on the fly using the MapZen Terrain tiles (https://www.clockworkmicro.com/terrain-tile-styler https://www.clockworkmicro.com/terrain-tile-styler). But of course in this case the settings are still applied globally. It certainly makes sense to change the light source and azimuth regionally.
- maplucamap 4y agoOver the last 10+ years I‘ve created countless shaded reliefs with different methods and tools: Gdal, Natural Scene Designer, Blender, … Most of the results were ok but I always had the feeling that they were keeping too many terrain details, distracting the map reader from the real content of the map: the relief should show context, not fight with the elements to display. Furthermore I’ve always found a lack of “human touch”. I feel that Eduard allowed me to overcome these issues. It’s an overkill usage of neuronal networks? No, it’s just the evolution of the technology that is offering a tool to help us cartographers produce better maps. After all, by looking at old masterpieces one can argue that we don’t need a computer at all. :)