[gdal-dev] Convert jpg to geotiff

Daniele Romagnoli daniele.romagnoli at geo-solutions.it
Wed Feb 20 05:07:18 PST 2019


Cool.
I'm keeping the list in the loop so anyone having similar issue in future
can see this feedback.

Cheers,
Daniele

On Wed, Feb 20, 2019 at 2:00 PM Ashwin Nair <ashnair0007 at gmail.com> wrote:

> Hi Daniele,
>
> That was exactly it. I had previously removed the accompanying jpg.aux.xml
> file which was why I wasn't able to convert the jpg properly to Geotiff.
>
> Thank you very much.
>
> Best Regards
> Ashwin
>
> On Wed, Feb 20, 2019 at 2:32 PM Daniele Romagnoli <
> daniele.romagnoli at geo-solutions.it> wrote:
>
>> Hi Ashwin,
>> which GDAL version are you using?
>> JPEG format doesn't support geospatial information (it's a pure image) so
>> when you convert GeoTIFF to JPEG,
>> GDAL takes care of writing geospatial info into an external auxiliary
>> file: yourfile.jpg.aux.xml.
>>
>> So, when converting back JPEG to GeoTIFF, make sure that
>> yourfile.jpg.aux.xml is still around so that GDAL can use it to write back
>> that info when producing the GeoTIFF.
>> alternatively, you may force spatial extent and coordinate reference
>> system using -a_ullr and -a_srs parameters on your gdal_translate command.
>>
>> Cheers,
>> Daniele
>>
>>
>>
>>
>> On Wed, Feb 20, 2019 at 11:22 AM Ashwin Nair <ashnair0007 at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I was able to convert my geotiff images (from the Spacenet dataset) to
>>> jpgs using gdal_translate but I would like to know how to convert the jpgs
>>> back to geotiff. I tried using gdla_translate as is, via gdal_translate
>>> -of GTiff in.jpg out.tif but wasn't able to get back the original
>>> geotiff image as there was a difference in the coordinate system. I'm new
>>> to working with satellite images so I'm not entirely sure about the
>>> process.
>>>
>>> Best Regards
>>> Ashwin
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>>
>>
>> --
>> Regards,
>> Daniele Romagnoli
>> ==
>> GeoServer Professional Services from the experts! Visit
>> http://goo.gl/it488V for more information.
>> ==
>>
>> Ing. Daniele Romagnoli
>> Senior Software Engineer
>>
>> GeoSolutions S.A.S.
>> Via di Montramito 3/A
>> 55054  Massarosa (LU)
>> Italy
>> phone: +39 0584 962313
>> fax:      +39 0584 1660272
>>
>> http://www.geo-solutions.it
>> http://twitter.com/geosolutions_it
>>
>> -------------------------------------------------------
>>
>> Con riferimento alla normativa sul trattamento dei dati personali (Reg.
>> UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
>> precisa che ogni circostanza inerente alla presente email (il suo
>> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
>> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
>> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
>> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>>
>> This email is intended only for the person or entity to which it is
>> addressed and may contain information that is privileged, confidential or
>> otherwise protected from disclosure. We remind that - as provided by
>> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
>> e-mail or the information herein by anyone other than the intended
>> recipient is prohibited. If you have received this email by mistake, please
>> notify us immediately by telephone or e-mail.
>>
>

-- 
Regards,
Daniele Romagnoli
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
precisa che ogni circostanza inerente alla presente email (il suo
contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by
European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
e-mail or the information herein by anyone other than the intended
recipient is prohibited. If you have received this email by mistake, please
notify us immediately by telephone or e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190220/5d3112bc/attachment.html>


More information about the gdal-dev mailing list