tag:blogger.com,1999:blog-32998709281175363472024-03-23T04:59:37.219-07:00TouchTerrain: 3D-Printable Terrain ModelsTouchTerrain lets you create terrain model files (STL or OBJ) that can be 3D printed. Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-3299870928117536347.post-62980403386111811742023-02-17T14:33:00.000-08:002023-02-17T14:33:52.784-08:00What's new in TouchTerrain 3.6?<h1 style="text-align: left;"> What's new in TouchTerrain 3.6?</h1><div><ul style="text-align: left;"><li>Updated the TouchTerrain ReadMe on Github with info about newly added options and on <a href="https://github.com/ChHarding/TouchTerrain_for_CAGEO#standalone-mode" target="_blank">running TouchTerrain in the more standalone mode</a> Standalone mode is more flexible than the Web app, e.g. it can be used to create 3D models from terrain raster files (typically geotiffs). It is also able to handle data that is larger than what the web app allows.</li><li>If you are curious, simply run this <a href="http://colab.research.google.com/github/ChHarding/TouchTerrain_for_CAGEO/blob/master/TouchTerrain_jupyter_starters_colab.ipynb" target="_blank">Colab jupyter notebook</a> (only requires a free Google account). It also provides a gentle intro to using the TouchTerrain python interface.</li><li>Minor facelift: the URL https://touchterrain.geol.iastate.edu/ now leads to a splash screen, once clicked on, https://touchterrain.geol.iastate.edu/main will show the actual web app. For most users this should not change anything, however, if you have pre-3.6 URLs to models with certain parameters (e.g. <span style="font-family: courier;">http://touchterrain.geol.iastate.edu?trlat=44.74</span>6) you will need to change them to this: <span style="font-family: courier;">http://touchterrain.geol.iastate.edu<b>/main</b>?trlat=44.746 </span><span style="font-family: inherit;">for them to work with 3.6</span></li><li><span style="font-family: inherit;">Added the min_elev option, which will set a models minimum elevation regardless of what the actual minimum is. Usage as a manual setting in the Web app: </span><span style="font-family: courier;">"min_elev": 500</span></li><li>Added a way make the the area selection box uniformly larger or smaller (uniform scaling around its center). At the bottom of the Area Selection group, changing the number from 1.00 will scale the box accordingly. E.g. changing it to 0.95 (and hitting Enter) will shrink the box by 5%:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65TP1UeaQJ9MVVP5BdZafgSkUqt_4jlnLhyXoIw_qW07uaII36-ZjJVvGnBwpHxslqULhbUbwnBSEYzu_eAW-1X9jwFRHoIhP8H8Z4LNvlwRlaCqUBwVcPHRNxS_MjfaBVeSaBUxuc6pTp9B5tKmH_wNVOF_CguPeg9wXoqbxZD8gsXfazgYLZ_-EIw/s616/Screen%20Shot%2002-17-23%20at%2004.12%20PM.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="241" data-original-width="616" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg65TP1UeaQJ9MVVP5BdZafgSkUqt_4jlnLhyXoIw_qW07uaII36-ZjJVvGnBwpHxslqULhbUbwnBSEYzu_eAW-1X9jwFRHoIhP8H8Z4LNvlwRlaCqUBwVcPHRNxS_MjfaBVeSaBUxuc6pTp9B5tKmH_wNVOF_CguPeg9wXoqbxZD8gsXfazgYLZ_-EIw/s16000/Screen%20Shot%2002-17-23%20at%2004.12%20PM.PNG" /></a><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1FFXD5nlEOgxU3frVQSfcxHUrxfkZ6Jbb-e9BoTZT5EcIZgDj3pBhmN57h0Ju8_Y63z0gLTziYxlt7lvrbxm4IW7_Pd9cPDTDupyE4S6_2tY2PxXArnXOG3OWJ_t-sSCSYpdFKwFNTMIfMCsl4zjhY-WEHAgGsoQthNZAT5CM9IARUxMs6YBlqPfgaA/s616/Screen%20Shot%2002-17-23%20at%2004.13%20PM.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="241" data-original-width="616" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1FFXD5nlEOgxU3frVQSfcxHUrxfkZ6Jbb-e9BoTZT5EcIZgDj3pBhmN57h0Ju8_Y63z0gLTziYxlt7lvrbxm4IW7_Pd9cPDTDupyE4S6_2tY2PxXArnXOG3OWJ_t-sSCSYpdFKwFNTMIfMCsl4zjhY-WEHAgGsoQthNZAT5CM9IARUxMs6YBlqPfgaA/s16000/Screen%20Shot%2002-17-23%20at%2004.13%20PM.PNG" /></a></div><br /></div></li><li><div class="separator" style="clear: both; text-align: left;">With the popularity of carving terrain models with CNC machines, I reached out to Steve M. Potter, who has used TouchTerrain in this role for a while and has documented his experience as an <a href="https://www.instructables.com/Carving-3D-Terrain-Topographic-Relief-Maps-on-a-CN/" target="_blank">Instructable </a>(<a href=" https://youtu.be/QPqFPspLMyI?t=318" target="_blank">Youtube version</a>): Step 3: Obtain the STL Model of the Terrain. He's also involved in this makerspace: <a href="https://stevempotter.tech" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">https://steveMpotter.tech</span></a> Here's some more info he sent me:<br /><br /><span id="docs-internal-guid-fe5d86ad-7fff-ad53-75c4-41e172faf6a8"><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I have been carving terrain models on a CNC router for 5 or 6 years. I used to spend about a week developing the 3D model from satellite imagery…Until I discovered TouchTerrain. This tool makes the process of creating a carvable STL model SO much easier. It is a simple matter of choosing a place to carve, which dataset to use (I prefer the AW3D30 dataset from JAXA, which covers the globe) and then a few parameters in the TouchTerrain GUI. I go over this process in Step 3 of my Instructables tutorial, and starting around minute 5:35 in the YouTube video. The process is pretty much the same as for making a 3D printed terrain model, but there are a number of additional concerns when carving wood, as well as aesthetic issues to consider. I like to use birch plywood, so the plies end up looking like contour lines of a topo map. For example, </span><a href="https://youtu.be/QPqFPspLMyI?t=318" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">https://youtu.be/QPqFPspLMyI?t=318</span></a><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> .</span></p><br /><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I have carved smaller models, 200x150mm, which are good to bring on hikes to help with orienteering and path planning, for example </span><a href="https://photos.app.goo.gl/h4JgHpfM9AjNESou6" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">https://photos.app.goo.gl/h4JgHpfM9AjNESou6</span></a><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> . I have also carved larger models, nearly 1 m across, as works of art to be hung on the wall. These can be embellished with markings for trails hiked, or places of sentimental value, or carved with text to make them personalized. For example, </span><a href="https://photos.app.goo.gl/T4de4HDqDypZdc5r7" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">https://photos.app.goo.gl/T4de4HDqDypZdc5r7</span></a><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> . One can also use laser engraving to add streets or other features to wood carvings. TouchTerrain has a feature to lower the sea level by a few mm, which is good for creating a resin pour on the model to represent water, for example </span><a href="https://photos.app.goo.gl/WcPnZKHQYp719qWA8" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">https://photos.app.goo.gl/WcPnZKHQYp719qWA8</span></a><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> .</span></span></div></li></ul></div>Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com0tag:blogger.com,1999:blog-3299870928117536347.post-68408418243429967872021-04-30T13:40:00.004-07:002021-05-05T13:11:27.581-07:00What's new in TouchTerrain version 3.3?<div><ul><li><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8JU07RnCi9_OPLq-MPjkrkxMQ1m4x5LHEi4PO8eFWm3con8dHIr_vNdOuz3se0gmIigh1vtwdLcRxy6H9sJVO2kvSg6idDSRazzwBW_nOUovdHZm8vU3Dv-wrbph23MttufTgr8KmJb5I/s515/3.3.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="446" data-original-width="515" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8JU07RnCi9_OPLq-MPjkrkxMQ1m4x5LHEi4PO8eFWm3con8dHIr_vNdOuz3se0gmIigh1vtwdLcRxy6H9sJVO2kvSg6idDSRazzwBW_nOUovdHZm8vU3Dv-wrbph23MttufTgr8KmJb5I/s16000/3.3.png" /></a></div><b>Help "bubbles"</b>: When you mouse-over or click on a question mark icon, a help text (popover) will appear. If you clicked on the question mark, the popover will remain visible until you click on it again.</li></ul></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><br /></div></div><br /><ul style="text-align: left;"><li><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizgVn3PtBtOo9r-6W4ShtZHnp77_JKSIaek_Nj1nlNC6bc8XVdW4VIQ9mRvOpXZST8fkhTbUn-ze3u1dxHFdXe_ixmtmRqHkbQj0MoEh6xgchC5CL7H6bu7Os3hGV4DM8QqcLqmWgewqo4/s270/3.3b.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="165" data-original-width="270" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizgVn3PtBtOo9r-6W4ShtZHnp77_JKSIaek_Nj1nlNC6bc8XVdW4VIQ9mRvOpXZST8fkhTbUn-ze3u1dxHFdXe_ixmtmRqHkbQj0MoEh6xgchC5CL7H6bu7Os3hGV4DM8QqcLqmWgewqo4/s0/3.3b.png" /></a></div><b>3D printer option settings for CNC users</b>: This is mean to help the around 15% of TouchTerrain users who create terrain models using CNC machines. There's no direct equivalent to physical print size or nozzle nozzle, diameter, so for CNC users, I've added three presets: small, medium, large size, which is related to the final, physical size of the piece of wood; and low, medium and high detail, which is related how much detail your carve can potentially contain.</li><li>Medium offers a reasonable compromise of level of detail and the size of the STL. If you want a smaller STL and can deal with less detail, set this to low detail. If you are sure that you need more detail, select high, which will create larger STL files and take longer to process. Preview can help to decide on the best level of detail but, as many factors influence the final outcome, you'll have to experiment with different settings in your CNC software and see which work best</li><li>For CNC users, the rest of the 3D printer settings can be left at their default level. Be aware that using a >1x z-scale can help to make low-relief terrain more interesting. However, this can also be done later in your CNC software.<br /><br /><br /></li></ul><div><ul style="text-align: left;"><li><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggTF6mlGM6ZDONk7MR_12sNuB6IE0QwHnRZmIsaggXmNikzR3-J_Au2x84RirJWxUSTCngo577DPfvJ14LEjuvbCyDrinzKor63swFFtu02zuomwR_54FZ9dq5ZZA6747yV6M42Xmmrsjk/s249/3.3c.png" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" data-original-height="249" data-original-width="117" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggTF6mlGM6ZDONk7MR_12sNuB6IE0QwHnRZmIsaggXmNikzR3-J_Au2x84RirJWxUSTCngo577DPfvJ14LEjuvbCyDrinzKor63swFFtu02zuomwR_54FZ9dq5ZZA6747yV6M42Xmmrsjk/s0/3.3c.png" /></a></div><b>Auto-height values for z-scaling</b>: Many users who leave the z-scale value at the default 1x may be missing out 3D terrain prints that are more visually appealing, especially in low-relief areas. It good practice to set a z-scale that end up creating a 3D print with at least 50 layers, as less layers will not be able to image small terrain details, such as meandering river beds. </li><li>However, it can be a pain to determine the "best" z-scale, which in TouchTerrain can really only be done through trial and error using the Preview, (It is much easier to increase the z-scale in the slicer software until it looks interesting!). I've added a few presets for the desired height of the model (i.e. the physical distance from the lowest elevation to the highest) in either mm or inches. </li><li>A height of 20 mm is good starting value. Preview the model and change the height as desired. The actually used z-scale will be given in the log file.</li></ul></div><p></p><div><br /></div><ul style="text-align: left;"><li><b>kmz files for polygons</b>: You can now use kmz and kml files to provide polygons to define your print area's boundary</li></ul><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><br />Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com2tag:blogger.com,1999:blog-3299870928117536347.post-31418201905283247562021-03-31T11:31:00.007-07:002021-03-31T11:41:30.671-07:00TouchTerrain Story Map<div style="text-align: left;">I've made my first ever ESRI Story map about TouchTerrain: <a href="https://arcg.is/11Cv5D">https://arcg.is/11Cv5D</a> It re-uses some of the material from the AGU 2020 conference poster but is far slicker!</div><div style="text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://arcg.is/11Cv5D" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img border="0" data-original-height="862" data-original-width="1350" height="349" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDpi4FxPRsBPh0z-dSZHyg7e1SW5lCT_4Ou33WJwxT9r6yEg5nQl9T45AQYoHEvFQUK8ewyTto9wrfyDzHdKpK3cfkEVpafW0Je9IxRb6V2zFdSLUqwE-qcwrGP7tQ5VXKqd8luTMhooqa/w547-h349/touchTerrain_story_map.jpg" width="547" /></a></div><br /><div style="text-align: left;"><br /></div><p><br /></p><p><br /></p>Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com0tag:blogger.com,1999:blog-3299870928117536347.post-90648484773167895622021-03-30T15:59:00.004-07:002021-03-30T15:59:26.892-07:00Version 3.2.1: Z-scale bug fix<h2 style="text-align: left;">Z-scale fix </h2><p></p><ul style="text-align: left;"><li>Well, this is embarrassing! Simon Scherrer recently pointed out that my mesh models where hilariously tall when applying a large z-scale. </li><li>Turns out that at one point I had done the z-scaling in one function, then forgot about it and applied it again in another function! </li><li>While easily fixed, this means that any z-scale larger than 1.0 was wrong (not sure since when, must be several years ...). For most users that's likely not an issue b/c it wasn't that obvious at low (>1.0) z-scales and many (including) myself have no real world experience with how a certain z-scale should properly look like. (<a href="https://www.georelief.de/en/produkt/3d-raised-relief-map-alps-large/?v=7516fd43adaa" target="_blank">This</a> is what convinced me that my old z-scale of 5 was WAY too much! Also, I like that they call the z-scale Boost factor!)</li><li>Also, I think most user would have dialed in a appropriate z-scale based on visual inspection. However, if you've been using TouchTerrain for anything scientific where proper z-scale matters you should account for my error and either correct your effective z-scale to the square of what you requested pre version 3.2.1 or re-do you model with the new (correct) z-scale method now in place. </li></ul><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLJGcDIPC89Xz2G7FlC7-bvgnSU7SjD9nUK0Kutou1t5C5xr9oRY8U9zAO_5v4WQbiW-iQ5AarzqqTUWZcUiA7YonSjujvjO_n07_a9x7ZXPo1k4tMpyxUBUVoyrxzx5m2OPYDT8Jo8ow0/" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="" data-original-height="346" data-original-width="1011" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLJGcDIPC89Xz2G7FlC7-bvgnSU7SjD9nUK0Kutou1t5C5xr9oRY8U9zAO_5v4WQbiW-iQ5AarzqqTUWZcUiA7YonSjujvjO_n07_a9x7ZXPo1k4tMpyxUBUVoyrxzx5m2OPYDT8Jo8ow0/w640-h221/image.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: left;">Old (pre version 3.2.1) z-scale of 5 aka <b>Mordor mode!</b><br /><br /><br /></span></td></tr></tbody></table><div><br /></div><div><br /><br /></div><div><br /><br /><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj13mZcV9Qy2VHfm08t2LZ3CzrCztB6FlEXC8gjINpJaTB0cOWiBebH3HxzfkCTtzY2bp5MC-aCGozWyknZ747dAlfBq9NegAYtTvoZ4IdUhosNYygxVeQ3IlrmW-cskTsNfKpULV033YU3/" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="" data-original-height="737" data-original-width="1000" height="472" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj13mZcV9Qy2VHfm08t2LZ3CzrCztB6FlEXC8gjINpJaTB0cOWiBebH3HxzfkCTtzY2bp5MC-aCGozWyknZ747dAlfBq9NegAYtTvoZ4IdUhosNYygxVeQ3IlrmW-cskTsNfKpULV033YU3/w640-h472/image.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: left;">Hillshaded relief with proper z-scale of 5<br /><br /></span></td></tr></tbody></table><div class="separator" style="clear: both; text-align: center;"><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right;"><tbody><tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYU5Z7AxJC9LrKtva1yvZiFbAgFtJ1nOE7wk3Zbj63wUr9JF0qCREgR5Lxy-SbswAVeW6cc91e29YUdzpMErl_Bg0ls4Q6zY1DAsDzJSvBscgtYpvUlzY7gYrh-EZEruSKcWEKmjRuMs6U/" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="" data-original-height="564" data-original-width="1394" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYU5Z7AxJC9LrKtva1yvZiFbAgFtJ1nOE7wk3Zbj63wUr9JF0qCREgR5Lxy-SbswAVeW6cc91e29YUdzpMErl_Bg0ls4Q6zY1DAsDzJSvBscgtYpvUlzY7gYrh-EZEruSKcWEKmjRuMs6U/w640-h258/image.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;"><span style="text-align: left;">Fixed (>= version 3.2.1) z-scale of 5<br /><br /><ul><li><span style="text-align: left;">Again, thanks to Simon Scherrer for bringing this to my attention!</span></li></ul></span></td></tr></tbody></table><br /><br /></div><br /><br /></div><p></p>Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com1tag:blogger.com,1999:blog-3299870928117536347.post-43152037377154032992021-03-12T15:15:00.004-08:002021-03-12T15:42:02.658-08:00What's new in TouchTerrain Version 3.2?<h3 style="text-align: left;">Docker version of TouchTerrain</h3><p></p><ul style="text-align: left;"><li>I created a <a href="https://github.com/ChHarding/TouchTerrain_jupyter_docker" target="_blank">Docker image</a> of TouchTerrain that makes is easy(er) to run the stand-alone version via a jupyter notebook.</li><li>After installing the image and running the container, you will have a virtual Linux box running inside your PC/Mac, with all required python packages already installed.</li><li>Shell scripts are provided to install
the latest version of TouchTerrain and to run a jupyter server inside
the container. The server that can be accessed through your standard,
local browser and you can download and upload files through jupyter.</li><li>A new notebook (<code>TouchTerrain_jupyter_for_starters.ipynb</code>) will hopefully make is easy for beginners to work through the workflow of creating a 3D terrain model file in standalone mode.</li><li>The github repo for the Docker version is: <br /><a href="https://github.com/ChHarding/TouchTerrain_jupyter_docker " target="_blank">https://github.com/ChHarding/TouchTerrain_jupyter_docker </a></li></ul><p></p><h3 style="text-align: left;"><br /></h3><h3 style="text-align: left;">Added two new DEM sources:</h3><p></p><ul style="text-align: left;"><li><p style="background-color: white; box-sizing: inherit; color: #202124; font-family: Roboto, "Noto Sans", "Noto Sans JP", "Noto Sans KR", "Noto Naskh Arabic", "Noto Sans Thai", "Noto Sans Hebrew", "Noto Sans Bengali", sans-serif; font-size: 14px; margin: 16px 0px; padding: 0px;"><span style="background-color: transparent;"><a href="https://developers.google.com/earth-engine/datasets/catalog/NRCan_CDEM" target="_blank">NRCan/CDEM</a></span>: The Canadian Digital Elevation Model (CDEM) is part of Natural Resources Canada's (NRCan) altimetry system and stems from the existing Canadian Digital Elevation Data (CDED). The CDEM is comprised of multiple DEMs with varying resolutions. These vary according to latitude and have a base resolution of 0.75 arc-seconds (about 20m).</p></li><li><p style="background-color: white; box-sizing: inherit; color: #202124; font-family: Roboto, "Noto Sans", "Noto Sans JP", "Noto Sans KR", "Noto Naskh Arabic", "Noto Sans Thai", "Noto Sans Hebrew", "Noto Sans Bengali", sans-serif; font-size: 14px; margin: 16px 0px; padding: 0px;"><span style="background-color: transparent;"><a href="https://developers.google.com/earth-engine/datasets/catalog/AU_GA_AUSTRALIA_5M_DEM?hl=en" target="_blank">AU/GA/AUSTRALIA_5M_DEM</a>:</span> The Digital Elevation Model (DEM) 5 Metre Grid of Australia derived from LiDAR model represents a National 5 metre (bare earth) DEM <b>which has been derived from some 236 individual LiDAR surveys</b> between 2001 and 2015 covering an area in excess of 245,000 square kilometres. All available 1 metre resolution LiDAR-derived DEMs have been compiled and resampled using a neighbourhood-mean method to 5 metre resolution.</p></li></ul><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;">Note that both DEMs are image collections, rather than a single image as can seen here for the Australia DEM (black patches):</span></span><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCiTMLBS8E8cUIF_-xA2uSY1kTM3pPr8kFQi-SUCSu0F6JbomZ7Pq70g54wbgRmlLjLIajpztSGj6_0YbmKkC8BdVkrh5zInSVJBYdY14BMSKcuqi5FIfZY3kbdWRNz8q4b6EAWTq-ZoCi/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="823" data-original-width="956" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCiTMLBS8E8cUIF_-xA2uSY1kTM3pPr8kFQi-SUCSu0F6JbomZ7Pq70g54wbgRmlLjLIajpztSGj6_0YbmKkC8BdVkrh5zInSVJBYdY14BMSKcuqi5FIfZY3kbdWRNz8q4b6EAWTq-ZoCi/s16000/image.png" /></a></div><br /><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;">Zoomed into an urban area. As Lidar cannot image water surfaces, these areas will always be set to NaN and will be omitted from the terrain model.</span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUSHsyNhEzA922lqoOZcRpvC3g7fbGHRm56yTxCvCbYrZjqhS-BV1UWUSbDhqCAKYGhvC0iHxG4xgJy_9kYIkQXQyA6ayxw76GR9K_NHcyyZbSm6VPhlJ7fxGeDlQ2KEtdtY6CGQMkB-iU/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="723" data-original-width="732" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUSHsyNhEzA922lqoOZcRpvC3g7fbGHRm56yTxCvCbYrZjqhS-BV1UWUSbDhqCAKYGhvC0iHxG4xgJy_9kYIkQXQyA6ayxw76GR9K_NHcyyZbSm6VPhlJ7fxGeDlQ2KEtdtY6CGQMkB-iU/s16000/image.png" /></a></div><br /><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><br /></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;">Even at "only" 5 m resolution, it still shows some nice details!</span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtsGNvi3ydk1AcMh5fYXEU4DOKM-h9sdyQurLvvXz4nXs1k3ae3O-jC8vm4R9gKbBKVNWtw4EJ0cqpyvRKTTXcqV3Qmrn0X0306uPkAujS1Lxx_2QVXmUoF7c-POIoXOWxMHA221-851ct/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="439" data-original-width="542" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtsGNvi3ydk1AcMh5fYXEU4DOKM-h9sdyQurLvvXz4nXs1k3ae3O-jC8vm4R9gKbBKVNWtw4EJ0cqpyvRKTTXcqV3Qmrn0X0306uPkAujS1Lxx_2QVXmUoF7c-POIoXOWxMHA221-851ct/s16000/image.png" /></a></div><br /><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;">CDEM coverage:</span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKBEYl7Wjv7eKXNdTNy-T4wyr3c2B8KZGteiY7g-7Qp3GZGoDaIL3RGMXw0YPXnugS7ryBVe8zMRGknYooPOkw0RsjUM6n8zTFrP1qYKJ5Vl2nftPj3UR4C0mSxxz2Bb-_zq5MANsYohxL/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="759" data-original-width="978" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKBEYl7Wjv7eKXNdTNy-T4wyr3c2B8KZGteiY7g-7Qp3GZGoDaIL3RGMXw0YPXnugS7ryBVe8zMRGknYooPOkw0RsjUM6n8zTFrP1qYKJ5Vl2nftPj3UR4C0mSxxz2Bb-_zq5MANsYohxL/s16000/image.png" /></a></div><br /><br /></span></span></div><div><span face="Roboto, Noto Sans, Noto Sans JP, Noto Sans KR, Noto Naskh Arabic, Noto Sans Thai, Noto Sans Hebrew, Noto Sans Bengali, sans-serif" style="color: #202124;"><span style="font-size: 14px;"><br /></span></span></div><div><br /></div></div>Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com0tag:blogger.com,1999:blog-3299870928117536347.post-45417988982814791382020-11-21T14:35:00.011-08:002020-12-08T11:32:21.116-08:00What's new in version 3.1?<h2 style="text-align: left;">Optimized Wall layout for polygon-based models</h2><p style="text-align: left;">For 3.1, I changed the way walls are set up if the models was created via a polygon. This means that the raster contains NoData (NaN) cells. Cells containing a elevation were each simply expressed as a quad, with a top and bottom and possibly with one or more walls. This simple rasterization method worked but lead to a gazillion "corner quads" (i.e. quads with 2 or 3 walls). And while these corners are typically nearly imperceptible in the final 3D print, I found that it was very hard on the motion system of my 3D printer to rattle along all those tiny teeth and it also took longer to print.</p><p style="text-align: left;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB3jUzg6I3wsVAxKPzOcpYxWRm2Rsmc-X8ZT7mqGai_yCNVAMB_9vZiZWQsc1dBLk3T7EppnZQIOFd6Au_Cw3AR-1UqVWohAnxbiCtxLcSdo6hoeCw-5rjqcsnZ67cApbuvssZJYTuRX1l/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Old method" data-original-height="591" data-original-width="670" height="353" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB3jUzg6I3wsVAxKPzOcpYxWRm2Rsmc-X8ZT7mqGai_yCNVAMB_9vZiZWQsc1dBLk3T7EppnZQIOFd6Au_Cw3AR-1UqVWohAnxbiCtxLcSdo6hoeCw-5rjqcsnZ67cApbuvssZJYTuRX1l/w400-h353/Screen+Shot+11-21-20+at+04.08+PM+001.PNG" title="Old method with many jaggies" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">My solution is to "snip off" half of any quad that has 2 adjacent walls and replace them with a single diagonal wall:</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWcheXdB9lUfD7fn5q5K06qmsCSPERxLDwKrXRUzMoCE0Fj-kSncQrORp7mxtfz3ZxP-sBRdbaynFGY8X8QO2dtp5ifZ166znp089-MkMc2Dg65JFG2m1QTmYxsDG8_f82hq60eunOxVKH/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="New method" data-original-height="591" data-original-width="670" height="353" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWcheXdB9lUfD7fn5q5K06qmsCSPERxLDwKrXRUzMoCE0Fj-kSncQrORp7mxtfz3ZxP-sBRdbaynFGY8X8QO2dtp5ifZ166znp089-MkMc2Dg65JFG2m1QTmYxsDG8_f82hq60eunOxVKH/w400-h353/Screen+Shot+11-21-20+at+04.09+PM.PNG" title="New method with collapsed quads" width="400" /></a></div><br /> <p></p><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div>Note that I did not optimize quads with 3 adjacent wall b/c it would have to either randomly choose one of the two possible diagonals or do something drastic like removing this quad or replace it with some sort of "nose".</div><div><br /></div><div>Here's an example of a non-trivial case created with this optimized wall strategy:</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5VC-_FE4z8NFuHFf15wI-_5oRoxgaa84mTdszT5tpu8UvFejUTpJAAzu_E3ZbIMMqkAXIseHFoLY4HnMHf-dIYMw6YjEFLwYZIHwKVIktnpc5NLcCNra1m4RoU40BAk3KfYRYFjrCqDC1/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="805" data-original-width="802" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5VC-_FE4z8NFuHFf15wI-_5oRoxgaa84mTdszT5tpu8UvFejUTpJAAzu_E3ZbIMMqkAXIseHFoLY4HnMHf-dIYMw6YjEFLwYZIHwKVIktnpc5NLcCNra1m4RoU40BAk3KfYRYFjrCqDC1/s16000/No_moa_jaggies.png" /></a></div><br /><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><h2 style="text-align: left;"><br /></h2><div><br /></div><div> </div><h2 style="text-align: left;">Added the MERIT 90m DEM source</h2></div><div>It's only 90m resolution but is more precise, so maybe it's useful for those printing river networks and other flat areas (like Iowa :)</div><div><br /></div><div><a href="https://developers.google.com/earth-engine/datasets/catalog/MERIT_DEM_v1_0_3" target="_blank">From its data description:</a></div><div><br /></div><div>MERIT DEM a high accuracy global DEM at 3 arc second resolution (~90 m
at the equator) produced by eliminating major error components from
existing DEMs (NASA SRTM3 DEM, JAXA AW3D DEM, Viewfinder Panoramas DEM).
MERIT DEM separates absolute bias, stripe noise, speckle noise and tree
height bias using multiple satellite datasets and filtering techniques.
After the error removal, land areas mapped with 2 m or better vertical
accuracy were increased from 39% to 58%. <span style="background-color: #fcff01;">Significant improvements were
found in flat regions where height errors larger than topography
variability, and landscapes such as river networks and hill-valley
structures became clearly represented.</span></div><div><br /></div><div>Another potential benefit is that MERIT is not defined for offshore locations, making it convenient for clean models of coastal areas, where you may not want a "flat ocean"</div><div><br /></div><div>Using the AW3D30 DEM:</div><div><div class="separator" style="clear: both; text-align: left;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizO1Ee4GAn05ux-m64-_LsxkucPZRDKkaS9tL52yVfcGULtDQ6iSRMR1v2o3aibFsgeqYSxIoe_O0lqFpMLFII2Mysdegk7GJVFMPS-OJMdsPETQ_4vlmJtHllE7hukA9aMjDudnd0I7CM/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="AW3D30" data-original-height="523" data-original-width="771" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizO1Ee4GAn05ux-m64-_LsxkucPZRDKkaS9tL52yVfcGULtDQ6iSRMR1v2o3aibFsgeqYSxIoe_O0lqFpMLFII2Mysdegk7GJVFMPS-OJMdsPETQ_4vlmJtHllE7hukA9aMjDudnd0I7CM/s16000/Screen+Shot+12-08-20+at+01.23+PM.PNG" title="Using the AW3D30 DEM source" /></a><span style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></span><span style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;">Using the MERIT DEM:</span></div><br /><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVxorgGPnywg4Ncfp-XTR3j64AnXK6MxC_09P7ihgZ7cvOOgcuP4t1XxHHWO1cIF2xaUjCXEWMRpc6300xxd9Jk_6fZOqkgcLPFAPo0ols4k7Wjr-QEoQBxm0BpjcRcJcKCSdcLnr9QoSE/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="523" data-original-width="771" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVxorgGPnywg4Ncfp-XTR3j64AnXK6MxC_09P7ihgZ7cvOOgcuP4t1XxHHWO1cIF2xaUjCXEWMRpc6300xxd9Jk_6fZOqkgcLPFAPo0ols4k7Wjr-QEoQBxm0BpjcRcJcKCSdcLnr9QoSE/s16000/Screen+Shot+12-08-20+at+01.24+PM.PNG" title="MERIT" /></a></div><br /><br /></div>Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com1tag:blogger.com,1999:blog-3299870928117536347.post-66539390180761432152020-10-09T12:18:00.010-07:002020-11-06T13:42:56.841-08:00TouchTerrain 3.0: New GUI, place search, kml polygon file upload<h2 style="text-align: left;">What's new in Version 3? </h2><p><b>New GUI:</b> With version 3.0 (October 2020), TouchTerrain has gotten a serious facelift. Gone is the utilitarian ca. 1995 aesthetic, replaced by a Bootcamp 4 based GUI. This is my first ever dip into using bootcamp and there are probably still some details to be worked out. </p><p><b>GUI responsiveness: </b>The Bootcamp GUI implements what it calls responsiveness which means that (to an extent) the app will try to dynamically"compact" itself when used with small screens (tablets, smartphones). Note that this should work on a smartphone but will look a bit weird. Hopefully most users will have a reasonably wide display when using the app!</p><p><b>GUI size adjustments: </b>You will notice that there are 3 main parts ("cards" in Bootstrap speak) to the right of the map. Clicking on their titles (e.g. on <span style="color: #0b5394;">Area Selection Box:</span>) will grow or shrink them. By default, only the Terrain Settings and the 3D Printer Options parts are "open", the Area Selection Box (which hides the lat/long coordinates of the box corners) is closed. Opening all three together will make the green Export Button on the bottom to be shoved out of sight, so you'll have to close a part or scroll down to click on it.</p><p><b>Manual box coordinate entry</b>: In version 3, the four coordinate fields inside Area Selection Box are now active. Changing any of the numbers and hitting Enter will immediately resize the red box accordingly.</p><p><b>"Oversampling" warning: </b>If you configure things in a way that TouchTerrain will interpolate the DEM into a higher (more detailed) resolution that what the DEM source can provide, the Current DEM resolution value will turn yellow. Ex: The source DEM resolution is 30 m but you're requesting 20 m. Using 20 m will still "work" but it's counterproductive b/c it won't magically create more detail and your files will be needlessly larger than if you had configured it to resample at say 32 m instead.</p><p><b>Place search bar</b>: As is standard in many other Google Map applications, you can now search for a place by typing a search term into the box and pick one of the five suggestions displayed. Your map view will fly to the result you picked. Be aware that it will NOT move the red selection box to your new view, so don't forget to hit the blue Re-center box button when needed!</p><p><b>Use a Polygon from a kml file:</b> If you have a kml file that contains a polygon or a polyline (e.g. the <a href="https://www.census.gov/geographies/mapping-files/time-series/geo/kml-cartographic-boundary-files.html" target="_blank">outline of a state</a>) you can upload it to the app and use it as boundaries for the 3D model you download. </p><p></p><div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img data-original-height="272" data-original-width="717" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/w658-h243/image.png" width="658" /></div><p>To upload the kml file, click on Browse, select a kml file from you local drive and hit Open. Note that is has to be kml file, not a kmz file! Kmz is just the zipped version of kml. To use a kmz, unzip the kmz file, which will give you a file called doc.kml, just rename that and then upload it. You could of course also use Google Earth to digitize a polygon, save it into a kml file and upload it to the app.</p><p>After the upload your map view will jump to the area and will see your polygon in yellow inside the red box. Adjust the other settings and then hit Export. You will see a note (Using X points from kml file as polygon) and you model (and geotiff file) will be clipped (masked) by the polygon.</p><p>Note that this polygon will be cleared if you move the red box or if you use functionality that requires the app to reload, such as changing the DEM source or the hillshade settings. This is needed, b/c the polygon isn't inlined into the URL (like all the other settings). But, it should be pretty quick to re-upload the kml file again! Finally, be aware that if your file contains multiple polygons or polylines, only the first will be taken.</p><p>Other changes:</p><p></p><ul style="text-align: left;"><li>URL: Depending on you system you may no longer see the full URL in the browser. However, we now give you the full URL at the end of the export (as simple browser text), so you can still use it to "give" your model to somebody else.</li><li>GPX path lines: On the standalone version of TouchTerrain, you can now drape path lines from gpx files over your model.</li><li>Map with jupyter notebook: The jupyter notebook standalone version can now show you an interactive Google Map in a notebook cell (using the geemap module). It also lets you digitize a rectangle, circle or polygon onto that map and use it as your model area.</li></ul><p></p><p></p><div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><br /></div><div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><br /></div><div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeIFg8GSU0guSyulnaq90IZc3JIeQeShNa6s7IQ8wpzQJ6RZ6oRO4jRVeELOOiU80ikN__Nb8u7n_gznRES0_zi9FBeSwHgQSfzbMCebdXKX373OWi4VHY90szuNIVFyhMBZf4sRoIi7Vo/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><div style="text-align: left;"><br /></div></div><p></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com6tag:blogger.com,1999:blog-3299870928117536347.post-31279134400520094872020-05-13T13:26:00.005-07:002020-12-17T16:01:55.941-08:00touchterrain 2.5: New Hillshading, more DEM sources, lower_leq setting and new folder structure (May 13)<h2>
</h2>
The May 13 release of touchterrain (v. 2.5) contains a whole bunch of new and changed features:<br />
<h2>
New Hillshading</h2>
<div>
<ul>
<li>Hillshading creates a overlay map that shows a pseudo-3D relief of the underlying DEM. This is useful as a pre-visualization of how your 3D print will roughly look and helps users to select interesting areas to print.</li>
<li>Hillshading (in its simplest form) assumes that a sun is positioned above the terrain at certain angles:</li>
<ul>
<li>Azimuth: Defines the direction (compass heading) from which the Sun shines to create the hillshade relief. Note that South will typically result in a flipped relief perception!</li>
<li>Elevation: Defines the vertical Sun angle, i.e. how high the Sun is above the horizon. Use it to enhance detail for different types of terrain.</li>
</ul>
<li>So basically we have a 2 angles, a horizontal (0 - 360, 0 = North) and vertical (0 - 90, 90 = perfectly above) that define the position of the light source used to create the impression of a 3D relief by creating greyscale values from 0 (dark) to 255 (super bright). Note that this does not create shadows, only the effect of specular highlights, which is a very strong perceptional cues for creating a 3D effect.</li>
<li>The standard hillshade parameter values are: azimuth of 315° (NNE) and 45° for elevation, which are good all-around settings.</li>
<li>However, it can be fun (and rewarding) to <b>change these angles</b>, which is what the new version allows you to do (in a limited fashion)!</li>
<li>For example, for best results the Sun should come at an angle roughly perpendicular to ridges in your terrain. Here's a comparison for different azimuth values (elevation angle is 60) (<a href="https://www.harrisgeospatial.com/Learn/Blogs/Blog-Details/ArtMID/10198/ArticleID/23459/Bring-DEMs-to-Life-with-the-Topographic-Shading-Tool" target="_blank">source</a>):<br /><div class="separator" style="clear: both; text-align: center;">
<a href="https://www.harrisgeospatial.com/Portals/0/blogs/imageryspeaks/Jason%20Wolfe/Hillshade/AzimuthComparison.png" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="706" data-original-width="800" height="564" src="https://www.harrisgeospatial.com/Portals/0/blogs/imageryspeaks/Jason%20Wolfe/Hillshade/AzimuthComparison.png" width="640" /></a></div>
<br /><div class="MsoNormal" style="font-family: Calibri, sans-serif; font-size: 12pt; margin: 0in 0in 0.0001pt;">
<o:p></o:p></div>
</li>
</ul>
</div>
<div>
<ul>
<li>270, 315, 0 and 45 all bring out different aspects of the same data, e.g. 45 emphasizes NE-SW oriented features. Also, to me, some values seem to make my brain reverse the topography i.e. ridges look like valleys and vice versa. </li>
<li>Looking at the elevation value, values lower than 45, create darker and darker overlays but also more and more emphasize low relief terrain features, such as drainage channels (but at the cost of blowing out high relief features).</li>
<li>For touchterrain 2.5 I have attempted to implement a simple way to experiment with these two hillshade angles without overwhelming and confusing the user:</li>
<li><b>Sun direction</b> (new) has a few direction presets shown as words (West, North-West, etc.). I only sweep the northern directions in 45 steps b/c I'm pretty sure that using southern direction would result in relief confusion. But, just to force the effect I include South as well.</li>
<li>I renamed the Elevation parameter to <b>Sun Angle</b> (b/c I want to avoid confusion with terrain elevation) and again offer just a few presets: Normal (45), Steep (55) and several progressively flatter settings to go below 45 all the way to 5</li>
<li>Finally there's a <b>gamma</b> value via a direct number input. This <a href="https://wolfcrow.com/what-is-display-gamma-and-gamma-correction/" target="_blank">gamma correction factor</a> is used to somewhat compensate that low sun angles tend to create hillshades that look too dark. Gamma values > 1 increase the "lightness" so as the sun angle becomes lower, this gamma will increase to compensate. Note that the specific gamma values are my "opinion" only! If you want to tweak the gamma after selecting a sun angle preset, just change the number and hit enter. Feel free to experiment, but be aware that your tweak will be overwritten next time you choose another sun angle preset!<br /></li>
<li>Be aware that changing any of the hillshade parameters will require a reload of the map, b/c I need to give Earth Engine these new values, get back a new hillshade overlay calculated for the new values and then display it. So it might take a split second, depending on your internet.</li>
<li>Note that I have tried to preserve all other input values you might have chosen before doing such a reload. This includes the type of Google Map map in the background and the transparency. However, this is not fully tested, so please let me know if values for some fields you changed earlier are getting reset.</li>
<li>If you're curious, go and change the Google Map to Terrain (Map -> Terrain), which also has hillshading backed in, and lower your transparency to mix them both.</li>
<li>Transparency (inverse of opacity) is still given in percent but I made the slider much, much smoother (1% steps). I also removed the direct numeric input b/c I feel having a precise number value is not how transparency is used, user should simple move the slider until they are happy. Changing Transparency will not trigger a reload, b/c it's set via your browser (client) not via the server.</li>
<li>Finally, there are a bunch of new query parameters in the URL that store the new hillshade settings and transparency: transp= 0 -100, hsazi= -360 - 360 (hs azimuth), hselev= 0 - 90 (hs elevation) and gamma= 0 - 99, so if you need values that cannot be generated in the GUI, just change those in the URL and hit enter. Note that none of these parameters matter when processing the terrain into 3D models, they are purely for a better visual experience.<br /></li>
<li>So ... got nuts and play with these values! Set the<b> transparency to 0</b> (full left) and set the S<b>un angle to extremely flat.</b> I think this looks very interesting (or at least artistic :)</li>
</ul>
</div>
<h2>
More DEM sources</h2>
<div>
<ul>
<li>I have added a few <b>new sources</b> and added a link to their meta data (via earth engine):</li>
<ul>
<li>USGS/NED: 10 m, continental USA only. <a href="https://developers.google.com/earth-engine/datasets/catalog/USGS_NED" rel="nofollow">link</a></li>
<li><b>ALOS DSM: </b>Global: 30 m, worldwide, but has some small "holes". <a href="https://developers.google.com/earth-engine/datasets/catalog/JAXA_ALOS_AW3D30_V2_2" rel="nofollow">link</a></li>
<li>USGS/SRTMGL1_003: 30 m, "worldwide", but not very far north (lower quality and older than ALOS!). <a href="https://developers.google.com/earth-engine/datasets/catalog/USGS_SRTMGL1_003" rel="nofollow">link</a></li>
<li>USGS/GMTED2010: ~230 m, truly worldwide. <a href="https://developers.google.com/earth-engine/datasets/catalog/USGS_GMTED2010" rel="nofollow">link</a></li>
<li><b>GTOPO30:</b> 30 Arc-Second, 1000 m, 1996, worldwide. <a href="https://developers.google.com/earth-engine/datasets/catalog/USGS_GTOPO30" rel="nofollow">link</a></li>
<li><b>CryoSat-2 Antarctica</b>: 1000 m, antarctica only. <a href="https://developers.google.com/earth-engine/datasets/catalog/CPOM_CryoSat2_ANTARCTICA_DEM" rel="nofollow">link</a></li>
<li>NOAA/NGDC/ETOPO1: 2000 m, worldwide, with bathymetry. <a href="https://developers.google.com/earth-engine/datasets/catalog/NOAA_NGDC_ETOPO1" rel="nofollow">link</a></li>
</ul>
<li>For any non-US area ALOS should be your preferred choice as it's much newer and of better quality. However, it misses data in a few tiny areas ("holes")</li>
<li>Using the Antarctica data is sadly a bit silly at the moment b/c Google maps are way too distorted.</li>
</ul>
</div>
<h2>
lower_leq setting</h2>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk5HWoro_Yy0oTyUEdKSD5W8DFlznHQx6wQw3Ljra5iwXsm9Ua-1gBiDRJ5cLblg7hBLXxr3umV7CtITYQ6qC6KpWODSgQw_OotmnMB-VQTDtNtpeDcegS_5DnXU7dwG-55XB_4xGqFern/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img data-original-height="727" data-original-width="862" height="539" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk5HWoro_Yy0oTyUEdKSD5W8DFlznHQx6wQw3Ljra5iwXsm9Ua-1gBiDRJ5cLblg7hBLXxr3umV7CtITYQ6qC6KpWODSgQw_OotmnMB-VQTDtNtpeDcegS_5DnXU7dwG-55XB_4xGqFern/w640-h539/image.png" width="640" /></a><ul>
<li><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Thanks to<a href="https://github.com/idenc" target="_blank"> Iden Craven</a> a manual setting was added to lower any elevation values that are lower than a threshold (say <= 0 m, i.e. anything not land) by a millimeter value when printed out.</li>
<li>Example <b><span style="font-family: "courier new" , "courier" , monospace;">"lower_leq":[0, 5]</span></b> as a manual setting will lower offshore areas by 5 mm.</li>
<li>This can emphasize shorelines while still printing area below sealevel. (ignore_leq would completely omit these areas when printed)</li></ul><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><ul>
</ul>
<h2> New folder structure</h2>
</div>
<div>
<ul>
<li>I decided to create a proper module for most of the touchterrain code, which required a new folder structure:</li>
<ul>
<li>standalone was remove and the two "main" files TouchTerrain_standalone.py, and its jupyter notebook version, TouchTerrain_standalone_jupyter_notebook.ipynb (recommended) are now at the root level.</li>
<li>All other code (the common and server folders) was moved into a new folder called <b>touchterrain</b></li>
<li>Before running the stand alone version, a module called touchterrain needs to be build and installed in your system's site-packages folder. This is done via setup.py, best by using pip: <span style="font-family: "courier new" , "courier" , monospace;"><b>pip install .</b></span> <-dot!</li>
<li>The jupyter notebook now explains the installation and can even run it inside a cell as a shell command!</li>
<li>auxiliary files (examples, etc.) were mover to a new folder called stuff</li>
</ul>
</ul>
</div>
<div>
<br /></div>
Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com3tag:blogger.com,1999:blog-3299870928117536347.post-54006376283084933122020-03-31T17:06:00.000-07:002020-03-31T17:06:00.612-07:00Adapted to Earth Engine API changes (Mar. 31)<br />
<ul>
<li>Google announced a while back that they are <a href="https://developers.google.com/earth-engine/changelog#2020-03-06" target="_blank">changing the JS and Python API </a>to be supported by it's Cloud API</li>
<li>For me, that change broke several things, both in Python and in JS:</li>
<ul>
<li>I was suddenly unable to d/l any geotiffs from EE to make models from, which took time to figure out.</li>
<li>Even then, none of my hillshade overlays showed up, again, that took some time to fix.</li>
</ul>
<li>Impact: </li>
<ul>
<li>There was an outage of a couple of days that prevented any d/l. Several users got in contact with me; if you've been affected - I'm sorry!</li>
<li>But, nobody complained about the lack of hillshade overlays :)</li>
<li>Google has apparently decided to lower the maximum size that can be downloaded. It should not affect TouchTerrain, b/c I only request appropriately downsampled geotiffs from them anyway and our server also caps how many pixels you can process on it, but I have not tested this well. It's possible that users will run into the Google quota if they request very large models.</li>
<li>But, that pretty much kills the "download at source resolution" option I had and so I took it out. It's still available in standalone to make models at the exact same resolution as a local raster (geotiff). </li>
<li>It is still possible to "export" large rasters into something running in the Google Cloud but I have no intentions to run our server in the Google cloud. At least not for the foreseeable future.</li>
</ul>
<li>Silver lining: After going back to digging around the Earth Engine API I noticed a <a href="https://developers.google.com/earth-engine/datasets/tags/elevation" target="_blank">whole bunch of new terrain and terrain related datasets!</a> My next plan is to add some of these to Touchterrain.</li>
</ul>
Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com1tag:blogger.com,1999:blog-3299870928117536347.post-42138382816376559252020-03-31T17:04:00.004-07:002020-10-16T13:14:46.045-07:00Exporting Terrain models with real world coordinates<br />
<h2 style="clear: both; text-align: center;">Exporting Terrain models with real world coordinates</h2><ul><li>Some people would like to import TouchTerrain model files (STLs or OBJs) into software for CAD or 3D Modelling. </li>
<li>At my University (Iowa State), an architecture student imported terrain into Rhino, manually mach a building he designed to its correct place and CNC'd the entire thing!</li>
<li>Another request asked for the ability to import a TouchTerrain STL into Blender in order to make changes to it there. Specifically, to combine it with a GPS track in order to make the track visible when the 3D terrain is printed out (more about this later, provided this turns out to have worked ...): <b>Update: this is now an official touchterrain option (thanks to KohlhardtC!), s</b>ee the gpx option in the github ReadMe.<br /><br /></li>
<li>As a result, I decided to add an option to set the xyz coordinates of the vertices inside the STL/OBJ files as something in a <b>global </b>context. (Typically, the coordinates are in mm and the origin is the center of your buildplate ...)</li>
<li>Using unprojected lat/long coordinates is out of the question for many reasons (distortions, height, sphere vs plane, etc.), so the only real option is using <b>UTM coordinates</b>, which TouchTerrain already requests from EarthEngine. This makes the x/y coordinates be large numbers, something in 100,000s or even millions, with z (elevation) always in meters. </li>
<li>These UTM x/y coordinates are distances from the intersection of the equator with Greenwich. <a href="https://www.geoplaner.com/" target="_blank">Here's a web app that show those numbers for the (nearly) entire globe</a>.</li>
<li>In theory, terrain models with these numbers, when imported into a 3D modelling system, should show up in the correct place and should also be correct with regard to other, UTM encoded, objects.</li>
<li>Sadly, the only system I remotely know how to use is Blender, for which these standard UTM coordinates did NOT work (at least for me)!<br /><br /></li>
<li>However, after looking into <a href="https://github.com/domlysz/BlenderGIS" target="_blank">BlenderGIS</a>, I realized that I could trick Blender in positioning the STL model in the correct place, if I first imported the geotiff of the terrain (which is always given in the zip folder you download). The trick seems to be to still use meters as units but set the origin (0,0,0) at the center of the geotiff. For this to work, you need to use the "centered" option (see below).</li><li>I've documented my Blender adventure <a href="https://drive.google.com/drive/folders/12b2Ne8O3aHSHB9Oo9_BB6AtgLm2pIzC9?usp=sharing" target="_blank">here</a> (very detailed, illustrated instruction pdf and a zip with example files used). It only deals with draping gpx lines on the topography (which was added as an official option to standalone in version 3) but it will also show you how to center a touchterrain model for use with BlenderGIS. So I imagine this method should also work for placing other types of geometry (like buildings) onto the model using Blender.<br /><br /></li>
<li>Using ArcGIS Pro, I was able to import a OBJ terrain mesh from TouchTerrain (with the "UTM" option, see below) into a local 3D Scene and it does overlap nicely with its geotiff. I used the Import 3D Files (3D Analyst) function.</li>
<li>To show the fit, I've set the build in terrain to flat. The "shadow" over which the imported OBJ seems to be floating is the geotiff.</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHiBphpjf9zmiHZWJGwcnV0RGSIlHU8UJPw0TelYC-FV6k54butASW4zBNoCCHigs2rLGpRYf5Y_4Gui3T2Oa_Bsu3-KxZAdGUOHavnoQ5CTtE_mblp-o-LhpHGFhSChga9sD3YLYUHmyF/s1600/TouchTerrain+in+ArcGISPro.PNG" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto; text-align: center;"><img alt="" border="0" data-original-height="637" data-original-width="1169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHiBphpjf9zmiHZWJGwcnV0RGSIlHU8UJPw0TelYC-FV6k54butASW4zBNoCCHigs2rLGpRYf5Y_4Gui3T2Oa_Bsu3-KxZAdGUOHavnoQ5CTtE_mblp-o-LhpHGFhSChga9sD3YLYUHmyF/s1600/TouchTerrain+in+ArcGISPro.PNG" title="TouchTerrain OBJ model imported into ArcGIS Pro (local 3D Scene)" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">TouchTerrain 3D model of Sheep Mountain, imported as OBJ into ArcGIS Pro, local 3D Scene</td></tr>
</tbody></table>
<br />
<ul>
<li>So what now? Well, if you want to try using a TouchTerrain Model in the context of a 3D Modelling software, all you need to do is to set the manual option:</li>
<ul>
<li>"use_geo_coords":"centered" will set the UTM origin to the center of the full tile</li>
<li>"use_geo_coords":"UTM" will use the official UTM x/y coordinates</li>
</ul>
<li>Again, this is highly experimental and only tested in Blender (with "centered" and using BlenderGIS to import the geotiff first!) and ArcGIS Pro. If it works for you in another 3D software, please let me know! (If it fails, also let me know, maybe I can make it work ...)</li>
</ul>
Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com5tag:blogger.com,1999:blog-3299870928117536347.post-55225550683626203452019-09-16T09:56:00.002-07:002019-09-16T09:58:29.112-07:00TouchTerrain 2.0 is outTouchTerrain version 2.0 is now live on <a href="https://touchterrain.geol.iastate.edu/" target="_blank">https://touchterrain.geol.iastate.edu</a>. Big thank you to the beta-testers! <a href="https://touchterrain-beta.geol.iastate.edu/" target="_blank">https://touchterrain-beta.geol.iastate.edu</a> will still remain active but will be my personal development server where I implement new stuff, which may break the server so you should not use it anymore. Speaking of breaking, if you are experiencing issues (page hangs, not download, etc.) please let us know via Geofablab@gmail.com, same with questions and suggestions! If you are reporting a bug please tell us the 4 digit version shown in the title, e.g. (0914).<br />
<br />
<br />
<br />
<h2>
Summary of changes and addition for version 2.0</h2>
(also <a href="https://github.com/ChHarding/TouchTerrain_for_CAGEO/blob/master/ReadMe.md" target="_blank">here on github</a>)<br />
<div>
<br />
<b>3D Preview</b>: Once your model has been processed, you can preview it in 3D (rotate, zoom, etc.) right in your browser. This uses <a href="http://www.viewstl.com/">www.viewstl.com</a>'s <a href="https://www.viewstl.com/plugin/#intro">Javascript plugin</a> which uses Three,js (WebGL) for rendering. As everything happens inside your browser, it may take a while to actually show you the graphics, especially for large models.</div>
<div>
<br /></div>
<div>
<b>Snazzy wait-animation: </b>I still can't show you how far your processing has gone, but at least now you get a nice animation while you wait. Also, there's no preflight screen anymore, as soon as you hit Export, processing will commence. It's still recommended to hit Save to URL before you hit Export, otherwise your current settings won't get save to the URL and you might need them later!<br />
<br />
<b>Optional feedback/survey text box</b>: I've added a textbox just above the download button where users can tell us what they use the terrain models for (150 chars or less). This is completely optional (you can just leave the box empty) and no personal info is stored. However, we would appreciate it if you write a quick note, so that we, over time, can get a rough idea what the use cases for 3D printed terrain models are.</div>
<div>
<br />
<b>Geotiffs</b>: you will now always get a geotiff of the area that you requested (red box) but projected into UTM at the resolution used to created the STL(s). E.g. if you requested a print resolution of 0.4 mm and this translated into say 27.6 m for each cell, this will be the resolution of the geotiff. If you requested several tiles, the geotiff will be the pre-tiled version i.e. you'll only get one geotiff, not many.</div>
<div>
<br />
<b>Geotiff </b>as File Format: This will <b>only</b> give you the Geotiff as output. Use this with print resolution set to <b>source resolution</b> to grab the geotiff at its native resolution. This should be very handy for users who just want a geotiff (e.g. for GIS work) but need the best possible resolution.</div>
<div>
<br />
<b>Print resolution</b> (printres) set to <b>source resolution</b>: every DEM source has a "native" resolution (e.g. ~10 m for NED). Using source resolution for the print resolution instead of a mm number, will use this native resolution and give you the highest possible level of detail for your 3D terrain model. </div>
<div>
This is primarily meant for the geotiff-only output, where it ensures that no interpolation due to re-sampleing is done. In other words, you'll pretty much get the original data except it will be projected to UTM. E.g. for NED it'll be the same data as you'd get from the USGS TNM website and you don't have to d/l a full 1 degree block and clip out your area.</div>
<div>
For STL/OBJ, using the source resolution will result in the highest detail possible for the 3D models albeit at the cost of very large files, so you'll have to be content with relatively small areas or run up against our server limits. (Note: if you run your own server or use the stand-alone version, you can go nuts with this, just don't be surprised if processing takes a long time and gives you huge files :)</div>
<div>
<br /></div>
<div>
<b>More precise model dimensions</b>: I spend some time making sure that the area you select and the model you actually get are the same. The tricky part is that the red selection box provides four corners, each given in lat/long. However, the lat/long box is always more or less a trapezoid, not a rectangle (thanks, "round" Earth!) but the geotiff I get from EarthEngine is in UTM (meter based) and is always a rectangle.<br />
I did work to improve this by adjusting the print resolution a tiny bit if needed. Previously, a printres of 0.4 might have resulted in a raster is 234.576 cells wide, but as there are no partial cells it had to be shortened to 234 cell and thus the model was a bit too small. Now, I adjust the printres (to say 0.3994554) so that the resulting raster exactly 235 cells wide. This also improves the fit of tiles. Previously it was possible that the tiles were a bit too short and when you assembled them you could see small offset artifacts were they touched. </div>
<div>
The log file will show when such adjustments were made and what your defacto print resolution and model dimensions are, e.g.:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>cell size: 109.05937041208486 m </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>adjusted print res from the requested 0.5 mm to 0.4784688995215311 mm to ensure correct model dimensions </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>total model size in mm: 100.0 x 99.52153110047847 </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>Cropping for nice fit of 2 (width) x 2 (height) tiles, removing: 1 columns, 0 rows </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b> cropped (209, 208) to (208, 208) </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b> cropping changed physical size from 50.0 mm x 49.760765550239235 mm </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b> to 49.760765550239235 mm x 49.760765550239235 mm </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>map scale is 1 : 227934.08416125734 </b></span></div>
</div>
<div>
<br /></div>
<div>
<b>Server Limits</b>: We're still tuning those but the current limits should allow models of up to 300 x 300 mm at 0.4 mm resolution (or 3 x 3 tiles of 100 x 100 mm each, etc.). This should work for areas at the equator. As the farther you get towards a pole, the less data you're actually requesting, you should actually be able to get even larger models away from the equator. If you're over the limit, you will be told by how much, so you can go back and adjust your area. We think that's a pretty generous model size, given that most common 3D printers don't even have 300 x 300 mm buildplates (CR-10s, etc. non-withstanding). If you need multiple tiles of that size, there's a "cheat" you can use (see below).</div>
<div>
<br /></div>
<div>
Which brings us to the <b>manual</b> options:</div>
<div>
<br /></div>
<div>
<b>Manual</b> options: There's now a large field beneath file format to manually put in options and values. Some options are not part of the UI options , but you can override UI options! To put in an option and an override value, type in the name of the option in double quotes, then a colon, then the value (no spaces). If you want to add other options, add a comma and space and repeat. The name of an UI option is shown when you mouse over the UI part: it's the first word in parens.</div>
<div>
<br /></div>
<div>
Example:</div>
<div>
<ul>
<li>You want a print resolution of 0.37 mm, not 0.4 or 0.35 </li>
<li>The name of that options is printres, so you type in:</li>
<li><span style="font-family: "courier new" , "courier" , monospace;">"printres":0.37</span></li>
<li><span style="font-family: inherit;">You also want a model width of 175 mm, name for this is tilewidth, so you add that:</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">"printres":0.37, "tilewidth":175</span></li>
</ul>
</div>
<div>
<br /></div>
<div>
Now for the fun part, where we use the new, non-UI options:</div>
<div>
<br /></div>
<div>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">tile_centered</span></code>: default: false. With false, all tiles are offset so they all "fit together" when they all are loaded into a 3D viewer, such as Meshmixer or Meshlab. Note that slicers (e.g. Cura) have ways to put the model into the center of the build plate, even if its center coordinates is not 0,0. Set this to true to force all tile STL to be centered around 0/0: <span style="font-family: "courier new" , "courier" , monospace;">"tile_centered":true</span></li>
</ul>
</div>
<div>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">no_bottom</span></code>: default: false. Will omit any bottom triangles i.e. only stores the top surface and the "walls". This creates ~50% smaller STL/OBJ files. When sliced it should still create a solid printed bottom (tested in Cura). This option is false by default. meaning you will get all the bottom triangles unless you overwrite it with true: <span style="font-family: "courier new" , "courier" , monospace;"> "no_bottom":true</span></li>
</ul>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">no_normals</span></code>: default: true. Will NOT calculate normals for triangles in STL files and instead set them to 0,0,0. This is significantly faster and should not matter as on import most slicers and 3D viewers will calculate the normal for each triangle (via cross product) anyway. But, if you require properly calculated normals in your STL, set it to false: <span style="font-family: "courier new" , "courier" , monospace;">"no_normals":false</span></li>
</ul>
</div>
<div>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">ignore_leq</span></code>: default: null. Using an elevation (e.g. 0.0), this will ignore any cells less or equal to that elevation. Good for omitting offshore cells and print only onshore terrain. Note that 0 may not be exactly sealevel on some DEMs, you may have to experiment with slightly higher values to remove all of the water, e.g. 0.5: "<span style="font-family: "courier new" , "courier" , monospace;">ignore_leq":0.5</span></li>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">projection</span></code><span style="font-family: "courier new" , "courier" , monospace;">: </span><span style="font-family: "times" , "times new roman" , serif;">default: null. By default, the DEM is reprojected to the UTM zone (datum: WGS84) the model center falls into. The EPSG code of that UTM projection is shown in the log file, e.g. UTM 13 N, EPSG:32613. If a number(!) is given for this projection setting, the system will request the Earth Engine DEM to be reprojected into it. For example, maybe your data spans 2 UTM zones (13 and 14) and you want UTM 14 to be used, so you set projection to 32614. Or maybe you need to use UTM 13 with NAD83 instead of WGS84, so you use 26913. For continent-size models, WGS84 Web Mercator (EPSG 3857), my work better than UTM. See <a href="https://spatialreference.org/" rel="nofollow">https://spatialreference.org</a> for descriptions of EPSG codes. Be aware, however, that Earth Engine does not support all possible EPSG codes. For example, North America Lambert Conformal Conic (EPSG 102009) is not supported and gives an error message: <em>The CRS of a map projection could not be parsed</em></span></li>
</ul>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">only</span></code>: Giving two tile index numbers [x,y], this will only process one tile and ignore all other tiles. [1,1] is the upper left tile, [2,1] it the tile to it's right, etc. This will enable users to d/l otherwise unreasonably large models by processing one of its tiles at a time (thus staying under the server limit), then manually selecting the next tile and process it, etc.<br /><br /><em>Example</em>: You have 4 tiles, each 250 mm wide, so you can't process all 4 of them at once b/c of the server limits. Add the option <span style="font-family: "courier new" , "courier" , monospace;">"only":[1,1]</span> and make sure to <i>Save to URL</i> before hitting Export. This will only process the tile with index 1,1. Once this tile was downloaded, go back to the main screen and change it to <span style="font-family: "courier new" , "courier" , monospace;">"only":[2,1], </span><span style="font-family: inherit;">repeat for all 4 <span style="font-family: inherit;">tiles.</span> </span><span style="font-family: inherit;"><br />Note that each tile will </span>be in a new zip, so you should unzip all of them in a common folder. In a 3D viewer, the tiles will fit together without overlaps if tile_centered was false.</li>
</ul>
</div>
<h3>
Standalone mode</h3>
<div>
There are now 2 ways to run TouchTerrain on your own local PC/Mac/Linux box. After you get teh code from github look in the standalone folder There is is a python file called TouchTerrain_standalone.py that you can run via CLI or IDE. It does require a JSON config file as argument, which contains the equivalent of the settings from the web app GUI. However, it might be easier to run the jupyter notebook <b>TouchTerrain_standalone_jupyter_notebook.ipynb</b> and hand edit the config setting in it and then run it (here is a <a href="https://htmlpreview.github.io/?https://github.com/ChHarding/TouchTerrain_for_CAGEO/blob/master/standalone/TouchTerrain_standalone_jupyter_notebook.html" target="_blank"><b>html </b>preview of it</a>). This will also give you a in-browser 3D preview of your model(s).</div>
Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com2tag:blogger.com,1999:blog-3299870928117536347.post-58257505631651495852019-06-12T15:12:00.004-07:002020-03-31T17:07:30.519-07:00TouchTerrain 2.0-beta is out!<h2>
TouchTerrain 2.0-beta is out!</h2>
<div>
Since Fall last year, I've been working on improvements and fixes In some cases, I've already added them to the current version (1.2x) but most of them are new ... and untested by real users. I therefore decided to have a beta phase with a separate beta server, as to not interrupt the old server. </div>
<div>
<br /></div>
<div>
To try the beta version got to:<br />
<br /></div>
<h3>
<a href="https://touchterrain-beta.geol.iastate.edu/">https://touchterrain-beta.geol.iastate.edu</a></h3>
<div>
<br />
Any feedback is very much appreciated, please use <a href="mailto:geofablab@gmail.com">geofablab@gmail.com</a> to email us any bugs, observations, requests, etc. Please note the version of the beta (see title, will be something like beta-0614) and add screenshots if needed. Thanks!</div>
<div>
<br /></div>
<div>
Finally, huge shoutout to Levi and Nick from ISU Research IT for setting up a docker-webhook-magic-thingy that should (theoretically) enable me to make fixes/changes to my code and update the server directly myself! This should results in much faster turnaround on fixes to the beta.</div>
<h3>
<br />What's new in 2.0?</h3>
<div>
Despite not having gotten much of a face-lift, TouchTerrain 2.0 has a lot of new features behind the scenes! I also re-visited some areas that needed more attention and improved or at least cleaned up some issues.<br />
<br />
<b>3D Preview</b>: Once your model has been processed, you can preview it in 3D (rotate, zoom, etc.) right in your browser. This uses <a href="http://www.viewstl.com/">www.viewstl.com</a>'s <a href="https://www.viewstl.com/plugin/#intro">Javascript plugin</a> which uses Three,js (WebGL) for rendering. As everything happens inside your browser, it may take a while to actually show you the graphics, especially for large models.</div>
<div>
<br /></div>
<div>
<b>Snazzy wait-animation: </b>I still can't show you how far your processing has gone, but at least now you get a nice animation while you wait. Also, there's no preflight screen anymore, as soon as you hit Export, processing will commence. It's still recommended to hit Save to URL before you hit Export, otherwise your current settings won't get save to the URL and you might need them later!</div>
<div>
<br />
<b>Geotiffs</b>: you will now always get a geotiff of the area that you requested (red box) but projected into UTM at the resolution used to created the STL(s). E.g. if you requested a print resolution of 0.4 mm and this translated into say 27.6 m for each cell, this will be the resolution of the geotiff. If you requested several tiles, the geotiff will be the pre-tiled version i.e. you'll only get one geotiff, not many.</div>
<div>
<br />
<b>Geotiff </b>as File Format: This will <b>only</b> give you the Geotiff as output. Use this with print resolution set to <b>source resolution</b> to grab the geotiff at its native resolution. This should be very handy for users who just want a geotiff (e.g. for GIS work) but need the best possible resolution.</div>
<div>
<br />
<b>Print resolution</b> (printres) set to <b>source resolution</b>: every DEM source has a "native" resolution (e.g. ~10 m for NED). Using source resolution for the print resolution instead of a mm number, will use this native resolution and give you the highest possible level of detail for your 3D terrain model. </div>
<div>
This is primarily meant for the geotiff-only output, where it ensures that no interpolation due to re-sampleing is done. In other words, you'll pretty much get the original data except it will be projected to UTM. E.g. for NED it'll be the same data as you'd get from the USGS TNM website and you don't have to d/l a full 1 degree block and clip out your area.</div>
<div>
For STL/OBJ, using the source resolution will result in the highest detail possible 3D models albeit at the cost of very large files, so you'll have to be content with relatively small areas or run up against our server limits. (Note: if you run your own server or use the stand-alone version, you can go nuts with this, just don't be surprised if processing takes a long time and gives you huge files :)</div>
<div>
<br /></div>
<div>
<b>More precise model dimensions</b>: I spend some time making sure that the area you select and the model you actually get are the same. The tricky part is that the red selection box provides four corners, each given in lat/long. However, the lat/long box is always more or less a trapezoid, not a rectangle (thanks, "round" Earth!) but the geotiff I get from EarthEngine is in UTM (meter based) and is always a rectangle. <br />
I did work to improve this by adjusting the print resolution a tiny bit if needed. Previously, a printres of 0.4 might have resulted in a raster is 234.576 cells wide, but as there are no partial cells it had to be shortened to 234 cell and thus the model was a bit too small. Now, I adjust the printres (to say 0.3994554) so that the resulting raster exactly 235 cells wide. This also improves the fit of tiles. Previously it was possible that the tiles were a bit too short and when you assembled them you could see small offset artifacts were they touched. </div>
<div>
The log file will show when such adjustments were made and what your defacto print resolution and model dimensions are, e.g.:</div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>cell size: 109.05937041208486 m </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>adjusted print res from the requested 0.5 mm to 0.4784688995215311 mm to ensure correct model dimensions </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>total model size in mm: 100.0 x 99.52153110047847 </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>Cropping for nice fit of 2 (width) x 2 (height) tiles, removing: 1 columns, 0 rows </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b> cropped (209, 208) to (208, 208) </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b> cropping changed physical size from 50.0 mm x 49.760765550239235 mm </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b> to 49.760765550239235 mm x 49.760765550239235 mm </b></span></div>
<div>
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;"><b>map scale is 1 : 227934.08416125734 </b></span></div>
</div>
<div>
<br /></div>
<div>
<b>Server Limits</b>: We're still tuning those but the current limits should allow models of up to 300 x 300 mm at 0.4 mm resolution (or 3 x 3 tiles of 100 x 100 mm each, etc.). This should work for areas at the equator. As the farther you get towards a pole, the less data you're actually requesting, you should actually be able to get even larger models away from the equator. If you're over the limit, you will be told by how much, so you can go back and adjust your area. We think that's a pretty generous model size, given that most common 3D printers don't even have 300 x 300 mm buildplates (CR-10s, etc. non-withstanding). If you need multiple tiles of that size, there's a "cheat" you can use (see below).</div>
<div>
<br /></div>
<div>
Which brings us to the <b>manual</b> options:</div>
<div>
<br /></div>
<div>
<b>Manual</b> options: There's now a large field beneath file format to manually put in options and values. Some options are not part of the UI options , but you can override UI options! To put in an option and an override value, type in the name of the option in double quotes, then a colon, then the value (no spaces). If you want to add other options, add a comma and space and repeat. The name of an UI option is shown when you mouse over the UI part: it's the first word in parens.</div>
<div>
<br /></div>
<div>
Example:</div>
<div>
<ul>
<li>You want a print resolution of 0.37 mm, not 0.4 or 0.35 </li>
<li>The name of that options is printres, so you type in:</li>
<li><span style="font-family: "courier new" , "courier" , monospace;">"printres":0.37</span></li>
<li><span style="font-family: inherit;">You also want a model width of 175 mm, name for this is tilewidth, so you add that:</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">"printres":0.37, "tilewidth":175</span></li>
</ul>
</div>
<div>
<br /></div>
<div>
Now for the fun part, where we use the new, non-UI options:</div>
<div>
<br /></div>
<div>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">tile_centered</span></code>: default: false. With false, all tiles are offset so they all "fit together" when they all are loaded into a 3D viewer, such as Meshmixer or Meshlab. Note that slicers (e.g. Cura) have ways to put the model into the center of the build plate, even if its center coordinates is not 0,0. Set this to true to force all tile STL to be centered around 0/0: <span style="font-family: "courier new" , "courier" , monospace;">"tile_centered":true</span></li>
</ul>
</div>
<div>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">no_bottom</span></code>: default: false. Will omit any bottom triangles i.e. only stores the top surface and
the "walls". This creates ~50% smaller STL/OBJ files. When sliced it should still create a solid
printed bottom (tested in Cura). This option is false by default. meaning you will get all the bottom triangles unless you overwrite it with true: <span style="font-family: "courier new" , "courier" , monospace;"> "no_bottom":true</span></li>
</ul>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">no_normals</span></code>: default: true. Will NOT calculate normals
for triangles in STL files and instead set them to 0,0,0. This is
significantly faster and should not matter as on import most slicers
and 3D viewers will calculate the normal for each triangle (via cross
product) anyway. But, if you require properly calculated normals in your STL,
set it to false: <span style="font-family: "courier new" , "courier" , monospace;">"no_normals":false</span></li>
</ul>
</div>
<div>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">ignore_leq</span></code>: default: null. Using an elevation (e.g. 0.0), this will ignore any cells less or equal to that elevation. Good for omitting
offshore cells and print only onshore terrain. Note that 0 may not be exactly
sealevel on some DEMs, you may have to experiment with slightly higher values to remove all of the water, e.g. 0.5: "<span style="font-family: "courier new" , "courier" , monospace;">ignore_leq":0.5</span></li>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">projection</span></code><span style="font-family: "courier new" , "courier" , monospace;">: </span><span style="font-family: "times" , "times new roman" , serif;">default: null. By default, the DEM is
reprojected to the UTM zone (datum: WGS84) the model center falls into.
The EPSG code of that UTM projection is shown in the log file, e.g. UTM
13 N, EPSG:32613. If a number(!) is given for this projection setting,
the system will request the Earth Engine DEM to be reprojected into it.
For example, maybe your data spans 2 UTM zones (13 and 14) and you want
UTM 14 to be used, so you set projection to 32614. Or maybe you need to
use UTM 13 with NAD83 instead of WGS84, so you use 26913. For
continent-size models, WGS84 Web Mercator (EPSG 3857), my work better
than UTM. See <a href="https://spatialreference.org/" rel="nofollow">https://spatialreference.org</a> for descriptions of EPSG codes.
Be aware, however, that Earth Engine does not support all possible EPSG
codes. For example, North America Lambert Conformal Conic (EPSG 102009)
is not supported and gives an error message: <em>The CRS of a map projection could not be parsed</em></span></li>
</ul>
<ul>
<li><code><span style="font-family: "courier new" , "courier" , monospace;">only</span></code>: Giving two tile index numbers [x,y], this will only process one tile and ignore all other tiles. [1,1] is the upper
left tile, [2,1] it the tile to it's right, etc. This will enable users to d/l otherwise unreasonably large models by processing one of
its tiles at a time (thus staying under the server limit), then manually selecting the next tile and process it, etc.<br /><br /><em>Example</em>: You have 4 tiles, each 250 mm wide, so you can't process all 4 of them at once b/c of the server limits. Add the option <span style="font-family: "courier new" , "courier" , monospace;">"only":[1,1]</span> and make sure to <i>Save to URL</i> before hitting Export. This will only process the tile with index 1,1. Once this tile was downloaded, go back to the main screen and change it to <span style="font-family: "courier new" , "courier" , monospace;">"only":[2,1], </span><span style="font-family: inherit;">repeat for all 4 <span style="font-family: inherit;">tiles.</span> </span><span style="font-family: inherit;"><br />Note that each tile will </span>be in a new zip, so you should unzip all of them in a common folder. In a 3D viewer, the
tiles will fit together without overlaps if tile_centered was false.</li>
</ul>
<div>
<div style="font-family: "Courier New", Courier, monospace;">
<br /></div>
</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com1tag:blogger.com,1999:blog-3299870928117536347.post-54865725222397181092019-03-07T15:33:00.000-08:002019-03-07T15:33:16.084-08:00State of TouchTerrain as of version 1.21<h2>
State of TouchTerrain </h2>
Chris Harding, Sep. 18, 2018<br />
<h3>
<br />Tell us about your project</h3>
Despite its relative simplicity TouchTerrain continues to grow in popularity since it went live in March 2017. At least that's what Google Analytics tells me. Besides that, we've heard from a number of people using it for cool projects ... but we only find out about those projects when something is broken :)<br />
<br />
While that feedback is vital to improve (or fix) things, we would be delighted to hear from any cool project you're running, just so we can feel better (and also to have some material for justifying the ongoing development, slow it may be ...). So, if you're using the 3D models for say academic research, or teaching visually impaired students or presentations in a museum, and you feel inclined to say thanks to us, <a href="mailto:Geofablab@gmail.com">drop us a note</a>.<br />
<br />
<h3>
Development summary (up to v.1.21)</h3>
Here's a quick summary of what I fixed/added since version 1.14<br />
<ol>
<li><b>Added region from kml file</b>: The Web app has a <b><i>Set Box from polygon in KML</i></b> file button. Digitize an area as a polygon (some sort of box) in Google Earth and save it as a kml file (not kmz). Use the button to upload your kml file and the app will fill the top right and bottom left coordinates with a rectangle surrounding your polygon and fly you to this area.</li>
<li><b> Fixed aliasing artifacts</b> (web and stand-alone): At least two users brought this issue to my attention, which manifested as subtle line patterns across the terrain. Even when noticeable in a 3D viewer, usually they would not show up in the print (due to the 3D printing process). I guessed (correctly, as it turned out) that it was a resampling artifact but was initially not sure where in the process it was introduced. After some poking around I found that Google Earth Engine, which I tell to downsample and project the raster before downloading it for processing, is using nearest-neightbor resampling by default, which leads to these artifacts. Luckily, it's easy to tell it to use a better algorithm, either bi-cubic or bi-linear (which I'm using now). With this, the artifacts seem to have gone.<br /> </li>
<li><b>Use full resolution (printres = -1)</b> (stand-alone version with local raster files only): Unlike the web version, using local raster files with the stand-alone version does not yet have an easy way to use bi-linear interpolation. The current method, uses some numpy trickery to performs the equivalent to nearest-neightbor resampling, again with the potential for aliasing artifacts. Until I find time to add better resampling I've added a way to create 3D models from the resolution of the raster file, i.e. with no down-sampling. This won't show any artifacts but may result in very large meshes.</li>
<li><b>Added DEM to zipped folder:</b> The geotiff I downlaod from Google Earth Engine is now included in the zipped folder you download from TouchTerrain, it's always called DEM.tif.</li>
</ol>
<br />
<br />
Finally a FYI: you may encounter a dialog box with Google telling you "This page can't load Google Maps correctly". This happens because our server has been visited by too many users and Google recently (July 2018), requires that we pay them for usage over this limit. To be clear, this will only happen if we've exceeded the allowed free quota for the day (I think) and I've encountered it only once, late a night. If you get this dialog, press OK and move on. For our app, even the "ugly" version of the streetmap is usable for finding the region you want to print. The hillshade map is not affected by this.<br />
<br />Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com16tag:blogger.com,1999:blog-3299870928117536347.post-4723757279455835022017-11-03T10:33:00.001-07:002017-11-03T10:35:34.114-07:00TouchTerrain version 1.14 is out<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Web app changes:</span></h3>
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">v1.14 fixed the</span> <span style="font-family: "courier new" , "courier" , monospace;">Server returned HTTP code: 404 </span><span style="font-family: "arial" , "helvetica" , sans-serif;">error. </span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Levi and Shane also changed the apache config settings which</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> should make the </span><span style="font-family: "courier new" , "courier" , monospace;">'NoneType' object has no attribute 'route'</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> error less likely. Let us know if its still happening so we can learn more about it.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">The</span> Internal Server error<span style="font-family: "arial" , "helvetica" , sans-serif;"> also seem to have gone. (Report if you get it)</span></li>
</ul>
<br />
<h3>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Stand alone version changes (see </span><a href="https://github.com/ChHarding/TouchTerrain_for_CAGEO" target="_blank"> Github repository</a>)</h3>
<ul>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Instead of a web interface, the Stand alone version gets all its parameters (area coordinates, DEM source, 3D print settings) via a JSON file. To get DEM data from Google Earth Engine (like the web app does), you need to set up a GEE account.</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">v1.14 adds the option t<b>o use your own DEM raster file</b> (geotiff, img, etc.) instead. In this case, no </span>Google Earth Engine is required!</li>
<li>Here's an example JSON file that processes a geotiff called pyramid.tif (my test file):</li>
<pre>"CPU_cores_to_use": 1,
"DEM_name": "USGS/NED",
"basethick": 2,
"fileformat": "STLb",
"importedDEM": "pyramid.tif",
"ntilesx": 1,
"ntilesy": 1,
"printres": 1,
"tile_centered": true,
"tilewidth": 120,
"zip_file_name": "pyramid",
"zscale": 0.5
</pre>
<li>If there's interest, we could add this to the web version as well, so you could upload your own DEM file. </li>
<ul>
</ul>
</ul>
Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com0tag:blogger.com,1999:blog-3299870928117536347.post-64946932815317676252017-10-27T09:33:00.001-07:002020-05-13T13:31:14.846-07:00Errors with the current version (v.1.09):<h2>
Errors with the current version (v.1.09): </h2>
<div>
We are aware of the following errors and are working to fix them. Python error message after pressing Start: <span style="font-family: "courier new" , "courier" , monospace;">Server returned HTTP code: 404</span> or <span style="font-family: "courier new" , "courier" , monospace;">'NoneType' object has no attribute 'route' </span> or (after a while): Internal Server Error</div>
<div>
<br /></div>
<div>
Sometimes going back and trying again may make it work but it's clearly super annoying.<br />
<br />
If you want to be notified after we've fixed it, leave a comment.<br />
<br />
If you desperately need a model now contact us as Geofablab@gmail.com and we can probably create it for you. </div>
<div>
<br /></div>
<div>
Thanks for your patience!</div>
Chris Hardinghttp://www.blogger.com/profile/01973030676657700813noreply@blogger.com0