# Release Notes

## Version 1.19

This is generally a tidy-up version, adding little new functionality but disabling redundant functionality and moving to the current Java version (21.0.2) with Long-Term Support (LTS).

This release also fixes a long-standing bug in which filenames for tiles had incorrect case used for n,s,e and w. The error is not apparent under Windows which has a case-insensitive file system but was an issue with linux-based systems.

#### Error Messages

A number of error messages have been re-designed to try and make them more helpful and user-friendly

#### Auto-Download

GUI elements related to auto-download selection of datasets have been removed. Auto-download functionality remains in the source code but is not accessible because NASADEM is not flagged as downloadable.

#### Help About

The dialog box now includes my current e-mail address so that you can contact me and additional fields to identify the Java version, the runtime system and the Home Directory. The Home Directory is where you will find the .terraintool sub-directory where you need to place downloaded data tiles.

#### Source code

Numerous pieces of the source code have been tidied up to make them easier to read and understand and redundant items removed. Package names have been changed from `mccombe.` to the more conventional `uk.co.mccombe.` For example `mccombe.mapping` becomes `uk.co.mccombe.mapping`. The main source code impact has been two minor changes to MappingToolkit.java to allow it to recognise the new package names. Additional comments and javadoc have been included, though this is far from complete.

#### Linux-specific Version

This release automatically detects when it is running under a linux-variant by checking the `os.name` system parameter, ensuring that terrain.properties and the tile files are stored in appropriate locations under both Windows and linux-variants. This avoids the need to patch the source code. To date, we have had no contact from Mac users using TerrainTool so we don't know the value of `os.name` under MacOS nor the preferred location to place data files.

#### Java Version

This release was compiled with Java version 21.0.2 LTS which, at the time of writing, is the most-recent Java release with Long-Term Support. This is important from a security point of view but will require you to download and install the latest Java 21 runtime system from Oracle, OpenJDK or other Java provider. Please be aware that compiled java code is not necessarily backward-compatible with earlier versions of the java runtime system so may not run.

## Version 1.16

### DEMs

Added support for NASADEM. Removed superceded support for ASTER.

Deal correctly with DEM data below sea level.

### Java Version

The minimum java version is now Java 8. Public packages are built with Java 15./p>

### Grids

Added support for the Slovenian Grid

## Version 1.13

### HTTPS Support

Sometime prior to July 2017, changes were made to the USGS webserver that force the use of an encrypted HTTPS connection in place of HTTP to download the SRTM tiles. Version 1.13 adds support for HTTPS using Transport Layer Security (TLS) version 1.2. The USGS server does not seem to accept earlier versions of TLS.

### Java Version

Previous versions of TerrainTool were built using Java 6 because this was the highest version supported on Mac OS X at the time (2010). However, Java 6 does not support TLS1.2, forcing TerrainTool 1.13 to be built on Java 7. Oracle provide downloads for both Java 7 and Java 8 for OS X but be aware that there may be compatibility issues with legacy Mac systems.I'm keen to hear from Mac users about whether their systems support Java 7 or Java 8 because it would clearly be better for everyone if I could upgrade TerrainTool to be build on the latest and most secure version of Java.

## Version 1.12a

### ASTER 2

This version bring support for the ASTER-2 dataset that has recently become available. This has the same resolution as the original ASTER data but the processing has resulted in fewer artefacts. Internally, the data format is the same as before but the filename e.g. ASTGTM2_N51W003.zip now includes a "2" to indicate that it is from the ASTER-2 dataset. Note: you can't just read the file and read it as though it came from the original ASTER dataset because the files inside the outer zip "wrapper" also have a "2" added to their names.

### File Locations

Previous versions of TerrainTool running under Windows placed the terraintool.properties and data directory in the same directory as terraintool.jar. Under unix-family operating systems, (e.g. Ubuntu, Debian) these files were created in the current working directory, wherever that happened to be. If the current directory already contained a sub-directory called "data", terrain data files were just added to it. This sometimes resulted in terrain data being added to unrelated data directories and, potentially, duplication of data.

The sections below explain where the data files and properties file will be located, according to whether you have the cross-platform version (default) or used an application installer under Ubuntu or Debian. If you already have data that has been downloaded from the SRTM or ASTER sites, you may want to copy these into the new data directory to avoid having to download them again.

#### Cross-platform version

If you downloaded TerrainTool as a "jar" file from the UBSS web site, you have the cross-platform version which is built to run under Windows, Unix family (Ubuntu, Debian, Solaris etc.) and OS X. By default, this version of TerrainTool creates the terraintool.properties and the data store in the .terraintool sub-directory of the user's home directory. For recent Windows versions, this would be something like c:\users\Mike\.terraintool or /home/mike/.terraintool on Ubuntu. Note that normally, Unix-family operating systems treat directories starting with "." as hidden - hence the sub-directory may not be visible.

#### Unix-specific Version

Apart from downloading terraintool.jar from the UBSS web site, TerrainTool can also be installed as a pre-packaged application for Ubuntu and Debian (thanks to Wookey!). This is identical to the cross-platform version, except that the properties file and data directory are placed in a more unix-friendly location, as follows:-

- If $XDG_CONFIG_HOME is set, terraintool.properties goes in $XDG_CONFIG_HOME/terraintool/. Otherwise, it goes in $HOME/.config/terraintool/
- if $XDG_DATA_HOME is set, the data directory is $XDG_DATA_HOME/terraintool/ Otherwise it is $HOME/.local/share/terraintool/

#### Customisation

If building TerrainTool from source-code, the file locations are easily customised by changing a single line of TerrainFrame.java and writing a class to implement the Pathnames interface. See Pathnames.java.