<?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: USE GDAL in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/use-gdal/m-p/339709#M26604</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://www.gdal.org/ogr2ogr.html" rel="nofollow noopener noreferrer" target="_blank"&gt;ogr2ogr&lt;/A&gt;&lt;SPAN&gt; is a commandline program not a python module.&amp;nbsp; You can run it from a command prompt or you can use the &lt;/SPAN&gt;&lt;A href="http://docs.python.org/2/library/subprocess.html" rel="nofollow noopener noreferrer" target="_blank"&gt;subprocess&lt;/A&gt;&lt;SPAN&gt; module to run it from within python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cmd=["ogr2ogr", "output_dataset", "input_dataset"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
stdout,stderr=proc.communicate()
exit_code=proc.wait()
if exit_code: print stderr
else: print stdout

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:03:31 GMT</pubDate>
    <dc:creator>Luke_Pinner</dc:creator>
    <dc:date>2021-12-11T16:03:31Z</dc:date>
    <item>
      <title>USE GDAL</title>
      <link>https://community.esri.com/t5/python-questions/use-gdal/m-p/339708#M26603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I installed GDAL core and python bingings (ArcGIS10.2). There are no error massage import:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;from osgeo import gdal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from osgeo import ogr&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from osgeo import osr&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But there are errors:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No module named ogr2ogr&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ImportError: cannot import name ogr2ogr&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What to do to use ogr2ogr?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2014 22:25:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-gdal/m-p/339708#M26603</guid>
      <dc:creator>HollyZhang1</dc:creator>
      <dc:date>2014-02-21T22:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: USE GDAL</title>
      <link>https://community.esri.com/t5/python-questions/use-gdal/m-p/339709#M26604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://www.gdal.org/ogr2ogr.html" rel="nofollow noopener noreferrer" target="_blank"&gt;ogr2ogr&lt;/A&gt;&lt;SPAN&gt; is a commandline program not a python module.&amp;nbsp; You can run it from a command prompt or you can use the &lt;/SPAN&gt;&lt;A href="http://docs.python.org/2/library/subprocess.html" rel="nofollow noopener noreferrer" target="_blank"&gt;subprocess&lt;/A&gt;&lt;SPAN&gt; module to run it from within python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;cmd=["ogr2ogr", "output_dataset", "input_dataset"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
stdout,stderr=proc.communicate()
exit_code=proc.wait()
if exit_code: print stderr
else: print stdout

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-gdal/m-p/339709#M26604</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2021-12-11T16:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: USE GDAL</title>
      <link>https://community.esri.com/t5/python-questions/use-gdal/m-p/339710#M26605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Holly,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I recently did an open source project with Python and found the website below very helpful:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal"&gt;http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I installed the executable "GDAL-1.10.1.win32-py2.7.exe" and was able to use "gdal, ogr and osr" without any further pip or easy_install.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please pay attention to the note on that page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;This distribution includes all required files. Do not use together with OSGeo4W or gdalwin32&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Feb 2014 05:57:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-gdal/m-p/339710#M26605</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-02-24T05:57:18Z</dc:date>
    </item>
  </channel>
</rss>

