<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: gdal.translate via os.system/subprocess in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/gdal-translate-via-os-system-subprocess/m-p/1139743#M63637</link>
    <description>&lt;P data-unlink="true"&gt;Why not use the &lt;A href="https://gdal.org/python/osgeo.gdal-module.html#TranslateOptions" target="_self"&gt;gdal.Translate&lt;/A&gt; python method instead of a subprocess?&lt;/P&gt;&lt;P data-unlink="true"&gt;You may get more help posting this on GIS Stack Exchange, this is an ArcGIS community, though there's probably at least some GDAL users. And please next time post text as text not screenshots (you can use the code formatting button in the advanced editor). Text is hard to read in an image.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2022 09:15:50 GMT</pubDate>
    <dc:creator>Luke_Pinner</dc:creator>
    <dc:date>2022-02-02T09:15:50Z</dc:date>
    <item>
      <title>gdal.translate via os.system/subprocess</title>
      <link>https://community.esri.com/t5/python-questions/gdal-translate-via-os-system-subprocess/m-p/1139739#M63636</link>
      <description>&lt;P&gt;I want to run a gdal.translate command via os.system() or subprocess.run() inside a script.&lt;/P&gt;&lt;P&gt;I tested the following ways of running the command:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;Directly in the command-line:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://imgur.com/LWC7Sa3" target="_blank" rel="noopener"&gt;https://imgur.com/LWC7Sa3&lt;/A&gt;&lt;A href="https://www.olansivn.com/" target="_self"&gt;service&lt;/A&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Starting python from the command-line:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://imgur.com/AgQtQsq" target="_blank" rel="noopener"&gt;https://imgur.com/AgQtQsq&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As you can see it worked fine in both ways. However if I pass the command inside a script it will not work. The following error occurs when I catch the output of the subprocess.run()-Command:&lt;/P&gt;&lt;PRE&gt;ERROR 1: PROJ: proj_create_from_database: Cannot find proj.db\nERROR 1: Failed to process SRS definition: epsg:25832\n')&lt;/PRE&gt;&lt;P&gt;I am using Ubuntu and process the data inside a docker-container. The command is executed somewhere deep inside of the command-chain.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 09:52:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gdal-translate-via-os-system-subprocess/m-p/1139739#M63636</guid>
      <dc:creator>TimDavid</dc:creator>
      <dc:date>2022-02-17T09:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: gdal.translate via os.system/subprocess</title>
      <link>https://community.esri.com/t5/python-questions/gdal-translate-via-os-system-subprocess/m-p/1139743#M63637</link>
      <description>&lt;P data-unlink="true"&gt;Why not use the &lt;A href="https://gdal.org/python/osgeo.gdal-module.html#TranslateOptions" target="_self"&gt;gdal.Translate&lt;/A&gt; python method instead of a subprocess?&lt;/P&gt;&lt;P data-unlink="true"&gt;You may get more help posting this on GIS Stack Exchange, this is an ArcGIS community, though there's probably at least some GDAL users. And please next time post text as text not screenshots (you can use the code formatting button in the advanced editor). Text is hard to read in an image.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 09:15:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gdal-translate-via-os-system-subprocess/m-p/1139743#M63637</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2022-02-02T09:15:50Z</dc:date>
    </item>
  </channel>
</rss>

