Opened 16 years ago
Closed 9 years ago
#2057 closed enhancement (fixed)
clip with (some) bounding coords outside image extent
Reported by: | maphew | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Utilities | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
I often need to be able to specify a clipping box whose extent ranges outside the image extent. It would be good to extend -projwin for this purpose.
Use case: clip a group of images to a box which overlaps a piece of each. Imagine 4 adjacent images A,B,C,D arranged in a square, and we want to crop to a box centered on the intersection. The images are too large to mosaic together first.
Attachments (1)
Change History (2)
by , 16 years ago
Attachment: | gdal_clip_beyond_extents.jpg added |
---|
comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
According to gdal_translate documentation this has been implemented in GDAL 1.10 by introducing new -epo and -eco parameters:
-epo: (Error when Partially Outside)
(GDAL >= 1.10) If this option is set, -srcwin or -projwin values that falls partially outside the source raster extent will be considered as an error. The default behaviour starting with GDAL 1.10 is to accept such requests, when they were considered as an error before.
-eco: (Error when Completely Outside)
(GDAL >= 1.10) Same as -epo, except that the criterion for erroring out is when the request falls completely outside the source raster extent.
example for use case of clipping corner of four adjacent images