title: readOGR cannot read a GML file
body: <p>I want to use a function <strong>mapunit_geom_by_ll_bbox</strong> from <strong>soilDB</strong> package in <strong>R</strong> which is supposed to download a GML file containing from the web, and read the GML using <strong>readOGR</strong> to return me an <strong>SpatialPolygonsDataFrame</strong> (i think) object. Although the function downloads the GML file successfully, it fails during readOGR step, and gives me an error:</p>
  
  <p>Specifically, the code reads:</p>
  
  <pre><code>library(soilDB)
  library(rgdal)
  mapunit_geom_by_ll_bbox( c(-120.54,38.61,-120.41,38.70) )
  </code></pre>
  
  <p>and the error (with other messages) thrown is:</p>
  
  <pre><code>trying URL 'https://sdmdataaccess.nrcs.usda.gov/Spatial/SDMNAD83Geographic.wfs?Service=WFS&amp;Version=1.0.0&amp;Request=GetFeature&amp;Typename=MapunitPoly&amp;BBOX=-120.54,38.61,-120.41,38.7'
  Content type 'text/xml; charset=utf-8' length 1547808 bytes (1.5 MB)
  ==================================================
  downloaded 1.5 MB
  
  Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv,  :
    Cannot open file
  </code></pre>
  
  <p>This error was thrown in the <strong>Centos 6.6</strong> machine, but when tried in Windows, it runs successfully. Also, <code>"GML" %in%  rgdal::ogrDrivers()$name</code> returns TRUE, so there is GML driver in the machine.</p>
  
  <p>I would love to know why the issue exist. Can someone please guide me?</p>