POLYGON_CROP_FILE not the same result as Crop to Selected Area Feature(s)
veddycent
Global Mapper User
in User Scripts
Hi all,
Hopefully this has an easy solution
I'm running this script to export PNG's and crop to square areas:
EXPORT_RASTER FILENAME="%SAVE_IMAGE_DIR%" TYPE="PNG" POLYGON_CROP_FILE="%LAYER_FNAME_W_DIR%" BG_TRANSPARENT="NO" FORCE_SQUARE_PIXELS="YES" FILL_GAPS="YES"
The raster images are smaller than the crop areas so the exported images when using the script are not the same size as the crop area.
However
Manually exporting the raster and ticking Crop to Selected Area Feature(s) makes the exported image the same size as the crop area.
Is there a reason why the script doesn't do this? Is there a parameter in the script I have missed?
See image below which explains the two different outcomes
Any help/guidance would be much appreciated!
Hopefully this has an easy solution
I'm running this script to export PNG's and crop to square areas:
EXPORT_RASTER FILENAME="%SAVE_IMAGE_DIR%" TYPE="PNG" POLYGON_CROP_FILE="%LAYER_FNAME_W_DIR%" BG_TRANSPARENT="NO" FORCE_SQUARE_PIXELS="YES" FILL_GAPS="YES"
The raster images are smaller than the crop areas so the exported images when using the script are not the same size as the crop area.
However
Manually exporting the raster and ticking Crop to Selected Area Feature(s) makes the exported image the same size as the crop area.
Is there a reason why the script doesn't do this? Is there a parameter in the script I have missed?
See image below which explains the two different outcomes

Any help/guidance would be much appreciated!
Tagged:
Answers
-
Ah! it looks like the script needs:
INC_VECTOR_DATA="YES"
Categories
- 12.9K All Categories
- 5.8K Features Discussion
- 349 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 651 GM Script Language
- 55 User Scripts
- 115 GPS Features
- 420 Projection Questions
- 834 Raster Data
- 1.4K Vector Data
- 6.6K Support
- 181 Announcement and News
- 934 Bug Report
- 561 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 578 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 109 Global Mapper Forum Website
