Thursday, March 7, 2019

State of TouchTerrain as of version 1.21

State of TouchTerrain 

Chris Harding, Sep. 18, 2018

Tell us about your project

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 :)

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, drop us a note.

Development summary (up to v.1.21)

Here's a quick summary of what I fixed/added since version 1.14
  1. Added region from kml file: The Web app has a Set Box from polygon in KML 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.
  2.  Fixed aliasing artifacts (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.
  3. Use full resolution (printres = -1) (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.
  4. Added DEM to zipped folder: 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.

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.