POLYGON_CROP_BBOX_ONLY=YES not working?

I'm trying to use the following script to reproject some NAIP imagery that is in UTM Z18 (NAD83) to VT State Plane (NAD83 meters) and crop it to the NAIP QQUAD "bbox only".  The script achieves 95% of this but the BBOX_ONLY option isn't working.  Its actually cropping it to the polygon boundary instead of the bounding box, which creates "NODATA slivers" around the edge of the image.  

I'm running GM 16.2

Further testing has shown that it will "work" if I use the POLYGON_CROP_USE_EACH=YES option, however, I don't want to use this option because it gives me a bunch of files I don't need/want.

Is there any way of doing this without having to enable POLYGON_CROP_USE_EACH=YES?

I recall this methodology/script syntax working in earlier versions.

// DESC: Reproject NAIP 2016 GeoTIFFs to VT State Plane Coordinate System
//
// AUTHOR: Steve Sharp, VCGI 4/25/2017
//
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
//
// Set Coordinate System to VT State Plane Meters NAD83
LOAD_PROJECTION PROJ_EPSG_CODE=32145

// Loop over all TIF files in current folder and reproject/crop
DIR_LOOP_START FILENAME_MASKS="*.TIF" RECURSE_DIR=NO
LOAD_PROJECTION PROJ_EPSG_CODE=32145
// Import TIFF
IMPORT FILENAME="%FNAME_W_DIR%" TYPE=GEOTIFF SAMPLING_METHOD=BICUBIC BAND_SETUP="0,1,2" IGNORE_ALPHA=YES

// Use the EXPORT_RASTER command to generate GeoTIFF file in VT State Plane Coordinate System
EXPORT_RASTER FILENAME="D:\VCGI\naip2016\testing\45074_reprojected\%FNAME_WO_EXT%_VCS.tif" TYPE=GEOTIFF GEN_WORLD_FILE=YES SPATIAL_RES=0.60,0.60 COMPRESSION=LZW PALETTE=MULTIBAND NUM_BANDS=4 BAND_EXPORT_SETUP="1?1" BAND_EXPORT_SETUP="2?2" BAND_EXPORT_SETUP="3?3" BAND_EXPORT_SETUP="4?4" POLYGON_CROP_FILE="D:\VCGI\naip2016\testing\naip_vt_2016_060_m4b_VCS.shp" POLYGON_CROP_BBOX_ONLY=YES
// Unload all to make sure the current file doesn't get appended to the next export
UNLOAD_ALL

// End the loop
DIR_LOOP_END
Sign In or Register to comment.