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.8K All Categories
- 5.7K Features Discussion
- 346 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 639 GM Script Language
- 54 User Scripts
- 115 GPS Features
- 419 Projection Questions
- 829 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 179 Announcement and News
- 923 Bug Report
- 560 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 574 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 241 How I use Global Mapper
- 108 Global Mapper Forum Website