-
-
Save francbartoli/7699404 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SINGLE FILE CONVERT | |
| gdal_translate input_nysdop_ortho.jp2 output.tif -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co PHOTOMETRIC=YCBCR --config GDAL_TIFF_INTERNAL_MASK YES -a_srs EPSG:2260 | |
| BATCH CONVERT | |
| for /r %g in (*.jp2) do gdal_translate -of GTiff "%g" "%~dpng.tif" -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co PHOTOMETRIC=YCBCR --config GDAL_TIFF_INTERNAL_MASK YES -a_srs EPSG:2260 | |
| BUILT VIRTUAL RASTER (CATALOG) | |
| gdalbuildvrt catalog.vrt e_06811416_06_05000_4bd_2011.jp2 e_06811414_06_05000_4bd_2011.jp2 e_06781416_06_05000_4bd_2011.jp2 e_06781414_06_05000_4bd_2011.jp2 | |
| gdalbuildvrt -allow_projection_difference -hidenodata -vrtnodata "255 255 255" nysdop.vrt *.jp2 -a_srs EPSG:2260 | |
| CONVERT JP2 VRT TO SINGLE, MERGED GEOTIFF | |
| gdal_translate catalog.vrt merge.tif -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co PHOTOMETRIC=YCBCR --config GDAL_TIFF_INTERNAL_MASK YES | |
| CONVERT SINGLE JP2 TO GEOSPATIAL PDF (GDAL >= 1.10.0) | |
| gdal_translate -of PDF input.jp2 output.pdf -a_srs EPSG:2260 -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co LAYER_NAME=nysdop | |
| CONVERT VRT TO GEOSPATIAL PDF (GDAL >= 1.10.0) | |
| gdal_translate -of PDF input.vrt output.pdf -a_srs EPSG:2260 -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co LAYER_NAME=nysdop | |
| CREATE MULTI-LAYER PDF | |
| gdal_translate -of PDF 2011.jp2 2007-2011.pdf -a_srs EPSG:2260 -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co LAYER_NAME=2011 -co EXTRA_RASTERS=2007.jp2 -co EXTRA_RASTERS_LAYER_NAME=2007 -co OFF_LAYERS=2007 -co EXCLUSIVE_LAYERS=2011,2007 | |
| gdal_translate -of PDF 2011.tif 2007-2011.pdf -a_srs EPSG:2260 -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co LAYER_NAME=2011 -co EXTRA_RASTERS=2007.tif -co EXTRA_RASTERS_LAYER_NAME=2007 -co OFF_LAYERS=2007 -co EXCLUSIVE_LAYERS=2011,2007 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment