<?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: problem with WFS Data, GDAL, Python, ArcGIS, &amp;amp; Defining Projection in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-with-wfs-data-gdal-python-arcgis-amp-amp/m-p/239318#M18640</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;You're writing to "E:\\Melo\\USGS\\Roads.gml" but trying to convert "E:\\Roads.gml"&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;You don't need the ArcGIS GDAL python bindings, you are not using them in your script.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;You can convert directly from the WFS (including defining the projection) using:&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;ogr2ogr -a_srs EPSG:4267 -f "ESRI Shapefile" E:\\Roads.shp WFS:http://path/to/WFS/service?required_or_optional_parameters_etc...&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Aug 2013 05:35:10 GMT</pubDate>
    <dc:creator>Luke_Pinner</dc:creator>
    <dc:date>2013-08-07T05:35:10Z</dc:date>
    <item>
      <title>problem with WFS Data, GDAL, Python, ArcGIS, &amp;amp;amp; Defining Projection</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-wfs-data-gdal-python-arcgis-amp-amp/m-p/239317#M18639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm pulling in data in gml2 format with a EPSG#4267 from a wfs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I create a datastream in python and then run the following from the python window in ArcMap:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;data = datastream.read()

#write the gml data to a gml file
rasterdata = open("E:\\Melo\\USGS" + "\\Roads.gml", 'w')
rasterdata.write(data)
rasterdata.close()

#Run the ogr2ogr to convert to shp
cmd = ["ogr2ogr", "-f", "ESRI Shapefile", "E:\\Roads.shp", "E:\\Roads.gml"]
subprocess.call(cmd)

#Define the projection
infc ="E:\\Roads.shp"
prjfile = "E:\\4267.prj"
arcpy.DefineProjection_management(infc, prjfile)
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, when i try to add the layer in ArcMap 10.1 it "appears" blank.&amp;nbsp; Typically, I've only seen this happen when their was something wrong with the projection.&amp;nbsp; I know there is data in the file because I've converted it successfully using alternate methods.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I installd GDAL according to &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/6009506/unable-to-install-python-and-gdal-dll-load-failed" rel="nofollow noopener noreferrer" target="_blank"&gt;these&lt;/A&gt;&lt;SPAN&gt; instructions exactly (1500/32 bit/2.7).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did NOT download and install the &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=1eec30bf5fa042a5a2227b094db89441" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS bindings &lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; Do I need them?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on what could be causing the layer to appear blank in ArcMap?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-wfs-data-gdal-python-arcgis-amp-amp/m-p/239317#M18639</guid>
      <dc:creator>Town_ofSnowflake</dc:creator>
      <dc:date>2021-12-11T12:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: problem with WFS Data, GDAL, Python, ArcGIS, &amp; Defining Projection</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-wfs-data-gdal-python-arcgis-amp-amp/m-p/239318#M18640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;You're writing to "E:\\Melo\\USGS\\Roads.gml" but trying to convert "E:\\Roads.gml"&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;You don't need the ArcGIS GDAL python bindings, you are not using them in your script.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;You can convert directly from the WFS (including defining the projection) using:&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;ogr2ogr -a_srs EPSG:4267 -f "ESRI Shapefile" E:\\Roads.shp WFS:http://path/to/WFS/service?required_or_optional_parameters_etc...&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 05:35:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-wfs-data-gdal-python-arcgis-amp-amp/m-p/239318#M18640</guid>
      <dc:creator>Luke_Pinner</dc:creator>
      <dc:date>2013-08-07T05:35:10Z</dc:date>
    </item>
  </channel>
</rss>

