How to configure a default legend for GeoTIFFs on the Geoshare (linux): Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 6: Line 6:
}}
}}


Bij deze een aantal stappen waarmee je nu al zelf een GeoTIFF legenda kan maken:
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.
- 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" : {   "argb" : -15414180 }, "entryName" : "High", "id" : 5, "value" : 1.0} ]
Example: { "color" : { "argb" : -3402732 }, "entryName" : "Low", "id" : 1, "value" : 0.0 }, { "color" : { "argb" : -15414180 }, "entryName" : "High", "id" : 5, "value" : 1.0} ]
Dit is een hele simpele legenda met twee entries "Low" (groen met waarde 0.0) en "High" (rood met waarde 1.0) erin.
- Download vervolgens de ExifTool: https://exiftool.org/ (ik heb Linux versie getest, maar er is ook een Windows versie).
- Met deze tool kun je buiten Tygron om de tags van een Tiff (of ander plaatje) uitlezen.


Voorbeeld: exiftool -D -G -a -u -U -f -s test.tiff
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.
Je krijgt dan alle tags informatie van het bestand. Waaronder de huidige ImageDescription.
- Gebruik nu de tool om de ImageDescription tag aan te passen naar de nieuwe JSON legenda.


Voorbeeld: exiftool -ImageDescription='[ { "color" : {   "argb" : -3402732 }, "entryName" : "Low", "id" : 1, "value" : 0.0 }, { "color" : {   "argb" : -15414180 }, "entryName" : "High", "id" : 5, "value" : 1.0} ]' test.tiff
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.
Let op dat je single-quotes (') gebruikt aan begin en einde, als je dat niet doet gaat het mis met de dubbel-quotes (") in JSON.
 
- Tot slot upload je de aangepast test.tiff naar de GeoShare, gooi hem in een viewer en als alle stappen goed zijn doorlopen heeft hij een nieuwe legenda.
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

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.