How to configure a default legend for GeoTIFFs on the Geoshare (linux)

From Tygron Support wiki
Jump to navigation Jump to search
This article is a stub. The following information should be added:
  • Must be english
  • Link to windows howto as well
  • Link to geotiffs
  • Formatting

Here are a few steps with which you can create your own GeoTIFF legend: - Create your own JSON legend in the Tygron Editor by creating any Overlay and then clicking on legend tab on the right side of editor on copy in the menu near the copy-paste icon. - The JSON legend is then in your clipboard, CTRL-V in a text editor to view it.

Example: { "color" : { "argb" : -3402732 }, "entryName" : "Low", "id" : 1, "value" : 0.0 }, { "color" : { "argb" : -15414180 }, "entryName" : "High", "id" : 5, "value" : 1.0} ]

This is a very simple legend with two entries "Low" (green with value 0.0) and "High" (red with value 1.0). - Then download the ExifTool: https://exiftool.org/ (We tested Linux version, but there is also a Windows version). - With this tool you can read the tags of a Tiff (or other image) outside of Tygron.

Example: exiftool -D -G -a -u -U -f -s test.tiff You will then get all the tags information of the file. Including the current ImageDescription. - Now use the tool to change the ImageDescription tag to the new JSON legend.

Example: exiftool -ImageDescription='[ { "color" : { "argb" : -3402732 }, "entryName" : "Low", "id" : 1, "value" : 0.0 }, { "color" : { "argb" : -15414180 }, "entryName" : "High", "id" : 5, "value" : 1.0} ]' test.tiff

Make sure you use single-quotes (') at the beginning and end, if you don't do that it will cause issues with the double-quotes (") in JSON.