How to configure a default legend for GeoTIFFs on the Geoshare (linux): Difference between revisions
(Created page with "Bij deze een aantal stappen waarmee je nu al zelf een GeoTIFF legenda kan maken: - Maak je JSON legenda in de Tygron Editor door een willekeurige Overlay aan te maken en dan op legend tabje rechts in editor op copy te klikken in het menu bij het copy-paste icon. - De JSON legenda zit dan in je clipboard, CTRL-V in een text editor om het te bekijken. Voorbeeld: [ { "color" : { "argb" : -3402732 }, "entryName" : "Low", "id" : 1, "value" : 0.0 }, { "color" : {...") |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{stub|todo= | |||
* 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. |
Latest revision as of 08:35, 14 February 2024
- 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.