exporting KMZ image without background color
kavagoe
Global Mapper User
I am trying to export geo-image without background color. The image has uneven shape with white background which get's imported into the kmz/kml file. Could someone please advice on how to eliminate the background?
Thanks,
Capture.JPG
Thanks,
Capture.JPG
Comments
-
To add to discussion,
I have successfully imported small chunks in PNG format by cropping out the outside BUT, the files larger than small chunks will not open in google earth.I am trying to export geo-image without background color. The image has uneven shape with white background which get's imported into the kmz/kml file. Could someone please advice on how to eliminate the background?
Thanks,
Capture.JPG -
Kavagoe,
You can use the Options setting for Transparency, IF your background is close to a consistent color, AND your image doesn't have any of the same colors.
If you are not familiar with Options, open Tools | Control Center (or Alt-C, or the fifth toolbar icon from the left). Then select the layer containing image, then select the Options button at the bottom.
If your background colors are not consistent, and/or duplicate colors that are used on your image, then more work is required. I use Photoshop, but the GeoTIFF information is lost, so we need to be sneaky.
In Global Mapper, create and export your image to a single file, and ensure that you have a projection (PRJ) and/or global (TFW) file selected to be written. Make a backup copy of the exported image, then edit the image. Be sure that you do not change the size or resolution of your image: you need the PRJ / TFW file to be usable with your edited image.
In your image editor you can make the background one color that is not used on your image. White might work, but maybe not. Sometimes I will wind up using a bright pink, just so nothing in the image will match.
Now you can load your edited file back into Global Mapper, and it should be placed properly. As you move your cursor around, note the information on the bottom line of the window, left side. It will include the RGB values for the pixel under the cursor. If you don't see any info at the bottom of the window, turn on View | Status Bar. Note the RGB numbers for your border color, then open the Options for the layer with your edited image, and enter the numbers for the transparent color.
Hide all layers that you don't want to export, then you can export to KMZ (use PNG tiles with transparency).
Cheers,
Mykle -
Thanks for the reply Mykle,
I was able to crop the file as well and export it to png as well, the issue now is that png conversion created a kmz file in excess of 1gb which google earth was unable to handle.Kavagoe,
You can use the Options setting for Transparency, IF your background is close to a consistent color, AND your image doesn't have any of the same colors.
If you are not familiar with Options, open Tools | Control Center (or Alt-C, or the fifth toolbar icon from the left). Then select the layer containing image, then select the Options button at the bottom.
If your background colors are not consistent, and/or duplicate colors that are used on your image, then more work is required. I use Photoshop, but the GeoTIFF information is lost, so we need to be sneaky.
In Global Mapper, create and export your image to a single file, and ensure that you have a projection (PRJ) and/or global (TFW) file selected to be written. Make a backup copy of the exported image, then edit the image. Be sure that you do not change the size or resolution of your image: you need the PRJ / TFW file to be usable with your edited image.
In your image editor you can make the background one color that is not used on your image. White might work, but maybe not. Sometimes I will wind up using a bright pink, just so nothing in the image will match.
Now you can load your edited file back into Global Mapper, and it should be placed properly. As you move your cursor around, note the information on the bottom line of the window, left side. It will include the RGB values for the pixel under the cursor. If you don't see any info at the bottom of the window, turn on View | Status Bar. Note the RGB numbers for your border color, then open the Options for the layer with your edited image, and enter the numbers for the transparent color.
Hide all layers that you don't want to export, then you can export to KMZ (use PNG tiles with transparency).
Cheers,
Mykle -
Kavagoe,
During your "Export Raster/Image Format" to KML/KMZ, you have Sample Spacing values listed. The values reflect the highest-resolution layer presently displayed. Are they appropriate for your needs?
For testing purposes, you could reduce the resolution (increase the Sample Spacing) to verify that you are able to export a file that Google Earth can use.
If your desired resolution results in a file too large for Google Earth, you could create a set of files if the Google Earth restriction is for the size of a single file. The set of files may need to overlap a bit, thinking about how they will look with Google Earth looking at an oblique angle.
The Tiling tab on the Global Mapper export options dialog may be worth exploring. I haven't needed to use tiling, but it looks interesting for large files. I have exported not-very-small images with good results, but apparently not as large as yours. I also load several files, vector and raster, into Google Earth so you are not limited to just one input file.
Looking forward to your results ...
Mykle -
Thanks for your help,
That's the route i will take.Kavagoe,
During your "Export Raster/Image Format" to KML/KMZ, you have Sample Spacing values listed. The values reflect the highest-resolution layer presently displayed. Are they appropriate for your needs?
For testing purposes, you could reduce the resolution (increase the Sample Spacing) to verify that you are able to export a file that Google Earth can use.
If your desired resolution results in a file too large for Google Earth, you could create a set of files if the Google Earth restriction is for the size of a single file. The set of files may need to overlap a bit, thinking about how they will look with Google Earth looking at an oblique angle.
The Tiling tab on the Global Mapper export options dialog may be worth exploring. I haven't needed to use tiling, but it looks interesting for large files. I have exported not-very-small images with good results, but apparently not as large as yours. I also load several files, vector and raster, into Google Earth so you are not limited to just one input file.
Looking forward to your results ...
Mykle
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 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