Transparent PNG in KMZ export
aNameNooneElseHas
Global Mapper User
Hi
I'm trying to use GM10 to export KMZ / KML, via a script. The raster format is to be PNG. All is well, except that I need colour 0 to be transparent. It looks to me like the Export KMZ dialog does not allow for a transparent color to be set.
Unfortunately the BG_TRANSPARENT keyword does not seem to do anything for PNG within a KMZ.
I can use Tools > Control Center then select an overlay, then Options > Transparency etc. However, the gotcha is that I cannot do that via a script, even with a Sendkeys approach, because it appears to be impossible to select the overlay within the Control Center, without using a mouse. Obviously, if a mouse is needed, the automated scripting won't work.
I don't think I can use the batch convert, because I cannot set the output projection that way (it has to be geographic / WGS-84).
Any ideas on how I can get my KMZ exported, in an automated way, making color 0 transparent?
Thanks
I'm trying to use GM10 to export KMZ / KML, via a script. The raster format is to be PNG. All is well, except that I need colour 0 to be transparent. It looks to me like the Export KMZ dialog does not allow for a transparent color to be set.
Unfortunately the BG_TRANSPARENT keyword does not seem to do anything for PNG within a KMZ.
I can use Tools > Control Center then select an overlay, then Options > Transparency etc. However, the gotcha is that I cannot do that via a script, even with a Sendkeys approach, because it appears to be impossible to select the overlay within the Control Center, without using a mouse. Obviously, if a mouse is needed, the automated scripting won't work.
I don't think I can use the batch convert, because I cannot set the output projection that way (it has to be geographic / WGS-84).
Any ideas on how I can get my KMZ exported, in an automated way, making color 0 transparent?
Thanks
Comments
-
You enable transparency for each layer that you have loaded, rather than on your export. In a script your IMPORT commands is where you specify the transparency.
You could also use batch conversion. Any export to KML/KMZ is automatically reprojected to Geographic/WGS84, you don't have to do anything to make sure that the export projection is correct.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thanks for the info Mike. I have used TRANSPARENT_COLOR="RGB(0,0,0)" with the IMPORT command.
Thanks also for the tip re the batch output being Geo/WGS84.
And for the prompt reply
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 627 GM Script Language
- 52 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website