Hi Doug,
Thanks for the info. I know that JPEG is lossy but our datasets are very large.
That’s why we use JPEG, which is good enough for our needs and the file sizes
are smaller.
It seems that GDAL doesn’t create new JPEG files without having pre-existing
JPEG-s to modify. If I try to modify old JPEG, I get a message “Output dataset
exists, but cannot be opened in update mode.
I also tried using “CreateCopy” but that produced syntax error. Used command on
GDAL CMD:
“GDALDriver::CreateCopy ("new.jpg","old.jpg", FALSE, NULL, NULL, NULL)”
Kalev
From: Doug Newcomb <[email protected]>
Sent: Thursday, June 21, 2018 5:24 PM
To: Kalev Julge <[email protected]>
Cc: gdal dev <[email protected]>
Subject: Re: [EXTERNAL] [gdal-dev] Convert VRT+JPEG with gdalwarp
Kalev,
Just set the output file format to -f JPEG format ( .jpg) or -f JP2OpenJPEG
(.jp2)
The JPEG format will be lossey by default. Is that what you want?
See:
https://medium.com/planet-stories/a-gentle-introduction-to-gdal-part-1-a3253eb96082
https://medium.com/planet-stories/a-gentle-introduction-to-gdal-part-2-map-projections-gdalwarp-e05173bd710a
Doug
On Thu, Jun 21, 2018 at 10:00 AM kalevj
<[email protected]<mailto:[email protected]>> wrote:
Hello,
I used gdalwarp to transform a VRT+JPEG pair from one EPSG projection to
another. Everything worked well. This conversion changed the VRT file so
that reprojection takes place when the images are loaded. However, I would
need to reproject the JPEG so that there would not be a need to reproject
every time the images are loaded. Is it possible somehow?
I used the command:
"gdalwarp -s_srs EPSG:2006 -t_srs EPSG:3857 -of VRT -r near old.vrt new.vrt"
Thanks!
Kalev
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[email protected]<mailto:[email protected]>
https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Doug Newcomb
USFWS
551F Pylon Dr
Raleigh, NC
919-856-4520 ext. 14 [email protected]<mailto:[email protected]>
---------------------------------------------------------------------------------------------------------
NOTE: This email correspondence and any attachments to and from this sender is
subject to the Freedom of Information Act (FOIA) and may be disclosed to third
parties.
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev