GPT Apply Colour Map and Export KML


I am trying to export a series of KML products for a bunch of netCDF files. I can manually achieve my goal by opening each file, selecting the band of interest, applying my custom colour map settings, and exporting as KML. However, I would like to perform this operation in batch using the GPT command line interface. I cannot find any graph options available for applying a colour map to specific bands or for exporting the result as a KML file. Is this possible?

No sorry, it’s not possible to export to KML from a graph but it’s on our list to do in 2017.

Thank you for the quick reply. Is it possible to export a jpg with a predefined colour map?

Yes, this is possible.
Have a look at the pconvert tool. You find it next to the gpt tool.
With the -p you can specify a rgb-profile.

1 Like

Thanks. That works great since I can export geoTIFFs which can be converted to kml!

Also, I was wondering if there is an option to export the images using pconvert with a generic satellite ground overlay (since I am working with ocean color data) such as the world map in SNAP?

Finally, can pconvert export a colour bar associated with a colour map or is there a simple way to export the colour bar only so that I can patch of the images?

Exporting images with overlay is not possible with pconvert.
This needs some development.
I’ve written about it in this thread:

Several layer types are available.
Also to export the colour bar is not possible unfortunately.

We plan to make functions better reusable which we provide in the desktop application.

Thanks Marco, I have found the following work around:

  1. Batch convert all DIMAP bands to GeoTIFFs using pconvert.

  2. Batch convert all GeoTIFFs to KMLSUPEROVERLAY using GDAL.

  3. Capture screenshots of colour bars from slider window.

  4. Batch crop and export png with alpha layer using irfanview.

  5. Batch add png to KMZ using GDAL.

The only part of the process which is not batch at this point is capturing screenshots for the individual colour bars. Not a big deal though since I reuse the same colour bar across multiple bands.

You can export them from the desktop application.
Open the image view and right click on it. Choose from the context menu.
Export Colour Legend as Image…

2 posts were split to a new topic: Pconvert: Access is denied error