<div>I got the real problem: It occurs with this WFS source: </div><div><a href="http://maps.zh.ch/wfs/FnsNSWFS?SERVICE=WFS&REQUEST=GetCapabilities">http://maps.zh.ch/wfs/FnsNSWFS?SERVICE=WFS&REQUEST=GetCapabilities</a></div>
<div><br></div><div>=> ogrinfo reports no geometry with this WFS:</div><div><br></div><div>$ ogrinfo -ro WFS:<a href="http://maps.zh.ch/wfs/FnsNSWFS?TYPENAME=svo_zonen">http://maps.zh.ch/wfs/FnsNSWFS?TYPENAME=svo_zonen</a></div>
<div><div>INFO: Open of `WFS:<a href="http://maps.zh.ch/wfs/FnsNSWFS?TYPENAME=svo_zonen">http://maps.zh.ch/wfs/FnsNSWFS?TYPENAME=svo_zonen</a>'</div><div> using driver `WFS' successful.</div><div>1: svo_zonen</div>
<div><br></div><div>Should be </div><div>1: svo_zonen (Polygon)</div><div><br></div><div>No geometry reported here in parantheses. So it's a configuration or installation problem of the WFS server (ArcGIS) </div><div>
<br></div><div>In QGIS this works (QGIS reader seems to guess somehow the geometry type).</div></div><div><br></div><div>Yours, Stefan</div><div><br></div><div>P.S. Still unsure why the OGR WFS reader stumbles over additional WFS URL parameters appended. Could be because of the key parameter?</div>
<div><br></div><div><div>$ ogrinfo -ro WFS:<a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS</a></div>
<div>INFO: Open of `WFS:<a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E</a>'</div><div> using driver `WFS' successful.</div>
<div>1: pois (Point)</div><div>'SERVICE' is not recognized as an internal or external command,</div><div>operable program or batch file.</div><div><br></div></div><div><br><br><div class="gmail_quote">2013/4/21 Stefan Keller <span dir="ltr"><<a href="mailto:sfkeller@gmail.com" target="_blank">sfkeller@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Weird enough, this ogrinfo command works<div><br></div><div><div>$ ogrinfo -ro WFS:<a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E" target="_blank">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E</a></div>
<div>INFO: Open of `WFS:<a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E" target="_blank">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E</a>'</div><div>
using driver `WFS' successful.</div>
<div>1: pois (Point)</div><div><br></div><div>This works too but stumbles over any additional URL parameters:</div><div>$ ogrinfo -ro WFS:<a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS&TYPENAME=pois" target="_blank">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS&TYPENAME=pois</a></div>
<div>INFO: Open of `WFS:<a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E" target="_blank">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E</a>'</div><div>
using driver `WFS' successful.</div>
<div>1: pois (Point)</div><div>'SERVICE' is not recognized as an internal or external command, </div><div>operable program or batch file.</div><div>'TYPENAME' is not recognized as an internal or external command,</div>
<div>operable program or batch file.</div><div><br></div><div>Yours, Stefan</div><div><div class="h5"><div><br><br><div class="gmail_quote">2013/4/21 Stefan Keller <span dir="ltr"><<a href="mailto:sfkeller@gmail.com" target="_blank">sfkeller@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Many thanks for the quick reply, Even!<div><br></div><div>You're right, it seems to work with Shapefile - but not for the WFS reader (and own server) we are testing...</div>
<div><br></div><div>Below you find the GML output of our WFS source.</div>
<div><br></div><div>So is the "fault" in the WFS reader - or even in our WFS Response XML?</div><div><br></div><div>Yours, Stefan</div><div><br></div><div><br></div><div>Testing OpenPOIMap WFS Service</div><div>
--------------------------------------------------</div><div><br></div><div><div>Get all hostels of Switzerland from OpenStreetMap database ("tourism=hostel"). Response edited:</div></div><div> </div><div><div>
GetCapabilities: <a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS&REQUEST=GetCapabilities" target="_blank">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS&REQUEST=GetCapabilities</a></div>
<div><div>Response => (...)</div></div><div><br></div><div>GetFeature: <a href="http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=pois&SRSNAME=EPSG:4326" target="_blank">http://openpoimap.ch/featureserver/workspace.cgi?key=HG4kFX2kEEqBSqvcswuh2E&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=pois&SRSNAME=EPSG:4326</a></div>
<div><br></div><div>Response => </div><div><wfs:FeatureCollection</div><div> xmlns:fs="<a href="http://example.com/featureserver" target="_blank">http://example.com/featureserver</a>"</div><div> xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>"</div>
<div> xmlns:gml="<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>"</div><div> xmlns:ogc="<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.net/ogc</a>"</div>
<div> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"</div>
<div> xsi:schemaLocation="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a> <a href="http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd" target="_blank">http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd</a>"></div>
<div> </div><div> <gml:featureMember gml:id="-324390"></div><div> <fs:pois fid="-324390"></div><div> <fs:way></div><div> <gml:Point srsName="EPSG:4326"></div>
<div> <gml:coordinates decimal="." cs="," ts=" ">6.59728931318,46.5195096642</gml:coordinates></div><div> </gml:Point></div><div> </fs:way></div>
<div>
<fs:shop>None</fs:shop></div><div> <fs:amenity>None</fs:amenity></div><div> <fs:surface>None</fs:surface></div><div> <fs:street>None</fs:street></div><div>
...</div><div> </fs:pois></div><div> </gml:featureMember></div><div> ...</div><div></wfs:FeatureCollection></div></div><div><div><div><br></div><div><div><br><div class="gmail_quote">
2013/4/21 Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le dimanche 21 avril 2013 17:49:28, Stefan Keller a écrit :<br>
<div><div>> When trying to use ogr2ogr (ver. 1.9) to convert a Shapefile (geometry type<br>
> Polygon) to file geodatabase (FileGDB) I'm getting an error like "FGDB<br>
> layers cannot be created with a wkbUnknown layer geometry type.":<br>
><br>
> $ ogr2ogr -f filegdb out.gdb polygon.shp<br>
><br>
> When adding -nlt it seems to work:<br>
><br>
> $ ogr2ogr -f filegdb out.gdb polygon.shp -nlt POLYGON<br>
><br>
> This is to a) an usual OGR behavior, and b) a show stopper for my script<br>
> because I don't know before hand (and won't check with ogrinfo) what<br>
> geometry type the input source is. Seems like there is a problem in the<br>
> FileGDB driver.<br>
><br>
> Can anybody confirm and explain this bug?<br>
<br>
</div></div>Stefan,<br>
<br>
I don't confirm that behaviour with either 1.9.2 or 1.10.0. Conversion works<br>
fine for me without specifying -nlt. What is the geometry type reported by<br>
ogrinfo on polygon.shp ?<br>
<span><font color="#888888"><br>
Even<br>
</font></span></blockquote></div><br></div></div><div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>