Tuesday, 22 September 2015

Converting large jp2 files using GDAL


I have a bunch of jp2 files with size going from 40MB to 1GB and I need to convert them all to GeoTiffs (.tif format). When using gdal_translate for the small files (having the jasper driver to support jp2 files), this works. But when applying this on files with size about 400MB, I get segmentation errors.


gdal_translate input.jp2 output.tif

In another attempt I've used opj_decompress (from the JP2OpenJPEG library) to convert jp2 to tif files, but again resulted in an error.


opj_decompress -i input.jp2 -o output.tif


Is there a way to handle large jp2 files with GDAL (or another library) to convert them to .tif?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...