<div dir="ltr"><div>Hi Ashwin,</div><div>which GDAL version are you using?</div><div>JPEG format doesn't support geospatial information (it's a pure image) so when you convert GeoTIFF to JPEG, <br></div><div>GDAL takes care of writing geospatial info into an external auxiliary file: yourfile.jpg.aux.xml.</div><div><br></div><div>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.</div><div>alternatively, you 
may force spatial extent and coordinate reference system using -a_ullr 
and -a_srs parameters on your gdal_translate command.</div><div><br></div><div>Cheers,</div><div>Daniele</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 20, 2019 at 11:22 AM Ashwin Nair <<a href="mailto:ashnair0007@gmail.com">ashnair0007@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>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 <span class="gmail-m_-5235380277595291015gmail-pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">gdal_translate </span><span class="gmail-m_-5235380277595291015gmail-pun" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">-</span><span class="gmail-m_-5235380277595291015gmail-pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">of </span><span class="gmail-m_-5235380277595291015gmail-typ" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(43,145,175)">GTiff</span><span class="gmail-m_-5235380277595291015gmail-pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)"> </span><span class="gmail-m_-5235380277595291015gmail-kwd" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(16,16,148)">in</span><span class="gmail-m_-5235380277595291015gmail-pun" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">.</span><span class="gmail-m_-5235380277595291015gmail-pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">jpg </span><span class="gmail-m_-5235380277595291015gmail-kwd" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(16,16,148)">out</span><span class="gmail-m_-5235380277595291015gmail-pun" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">.</span><span class="gmail-m_-5235380277595291015gmail-pln" style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;background-color:rgb(239,240,241);font-size:13px;margin:0px;padding:0px;border:0px none;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;color:rgb(48,51,54)">tif </span>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. </div><div><br></div><div>Best Regards</div><div>Ashwin</div></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Regards,</div><div dir="ltr">Daniele Romagnoli</div><div dir="ltr">==</div><div dir="ltr">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</div><div dir="ltr">==</div><div dir="ltr"><br></div><div dir="ltr">Ing. Daniele Romagnoli</div><div dir="ltr">Senior Software Engineer</div><div dir="ltr"><br></div><div dir="ltr">GeoSolutions S.A.S.</div><div dir="ltr">Via di Montramito 3/A</div><div dir="ltr">55054  Massarosa (LU)</div><div dir="ltr">Italy</div><div dir="ltr">phone: +39 0584 962313</div><div dir="ltr">fax:      +39 0584 1660272</div><div dir="ltr"><br></div><div dir="ltr"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></div><div dir="ltr"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">-------------------------------------------------------</span></div><div dir="ltr"><span style="font-size:12.8px"><br></span></div><div dir="ltr"><span style="font-size:12.8px">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.</span></div><div dir="ltr"><span style="font-size:12.8px"><br></span></div><div dir="ltr"><span style="font-size:12.8px">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.</span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>