Liu, Jian <JLiu <at> eris.ca> writes: > > > Hello, > > I try to use GDAL to convert USGS Topo geopdfs to Geotiff format. I have the following command: > > gdalwarp geo.pdf geo.tif -crop_to_cutline -cutline C:\JIANTestFolder\cutline.csv -overwrite --config GDAL_CACHEMAX 500 -wm 500 --config GDAL_PDF_LAYERS_OFF Projection_and_Grids --config GDAL_PDF_DPI 508 -co "TILED=YES" -co "TFW=YES" -co "COMPRESS=JPEG" –co "PHOTOMETRIC=YCBCR" > > I want to maintain the image quality while keeping the file to a minimal size. But my output .tif is about twice as big as the input pdf (19.5M vs. 11.9M) -- the output dpi (GDAL_PDF_DPI=508) is set based on the metadata information in the geopdf. I read somewhere that pdf just stores image “as it is”, and I am wondering how come my geotiff is twice as big, even with the jpeg compression with the YCBCR option? Is it still possible to reduce its size? > > Here is the geopdf I use: http://ims.er.usgs.gov/gda_services/download?item_id=5998960 > > I’ve searched the mail archive and couldn’t find anything relevant. I appreciate any answers or suggestions about converting geopdf to geotiffs. Thank you!
Hi, Judged by the compression artifacts I believe that the image in the PDF if already JPEG compressed. When this image is compressed again with JPEG the algorithm tries to save also the new details of the artifacts and therefore the compression ratio is not as good. For minimum size your could try to write the map first into an uncompressed tiff file. Next you can try to remove the noise that is caused by the previous compression with for example GIMP or Photoshop. Once the image is clean it may be possible to compress it with better compression ratio into JPEG. And if you can get it very clean it is possible that compression with LZW or deflate method could compress it even more and without further degradation of quality. -Jukka Rahkonen- > Best regards, > Jian > > > > > _______________________________________________ > gdal-dev mailing list > gdal-dev <at> lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
