Export and clip to an ECW file
Hello,
I tried to export to an compress file (ECW) and to clip this export file from a polygon. The goal is to avoid the Collar (convolution value around the compressed file). After ECW compression, you have around the images some value (0,1 or 2).
I would like to compress thge file and clip it with a polygon. I tried it but the software clip the raster on global coverage of the vector file (Upper-left, Lower right), not on the polygon (ech vertex of the polygon).
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
IMPORT FILENAME="F:\MS_Mosaic-East.tif"
EXPORT_RASTER FILENAME="F:\PNG\test-fp1.ecw" TYPE=ECW SPATIAL_RES_METERS="0.5,0.5" \
TARGET_COMPRESSION="3" POLYGON_CROP_FILE="F:\PNG\AOI_East.shp"
Something is missing in my script
Thanks for your help
Francois
I tried to export to an compress file (ECW) and to clip this export file from a polygon. The goal is to avoid the Collar (convolution value around the compressed file). After ECW compression, you have around the images some value (0,1 or 2).
I would like to compress thge file and clip it with a polygon. I tried it but the software clip the raster on global coverage of the vector file (Upper-left, Lower right), not on the polygon (ech vertex of the polygon).
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
IMPORT FILENAME="F:\MS_Mosaic-East.tif"
EXPORT_RASTER FILENAME="F:\PNG\test-fp1.ecw" TYPE=ECW SPATIAL_RES_METERS="0.5,0.5" \
TARGET_COMPRESSION="3" POLYGON_CROP_FILE="F:\PNG\AOI_East.shp"
Something is missing in my script
Thanks for your help
Francois
Answers
-
Because rasters must be rectangular, it is necessary to enable a transparent background if you want the raster to be clipped exactly to the boundary of your polygon. This can be done with the BG_TRANSPARENT=YES parameter in your export.
-
I tested it. With the option BG_TRANSPARENT=YES, I have still some bad values (254, 253, 252) close to the border of the area of interest.
-
What version of Global Mapper are you using? If you are using v16 or v17, please update your installation to the latest released version.
Categories
- 13K All Categories
- 5.8K Features Discussion
- 351 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 423 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 183 Announcement and News
- 944 Bug Report
- 565 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 583 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 246 How I use Global Mapper
- 111 Global Mapper Forum Website

