[gdal-dev] Missing geometry type when using ogr2ogr to write FileGDB

Even Rouault even.rouault at mines-paris.org
Sun Apr 21 10:52:50 PDT 2013


Le dimanche 21 avril 2013 19:44:19, Stefan Keller a écrit :
> I got the real problem: It occurs with this WFS source:
> http://maps.zh.ch/wfs/FnsNSWFS?SERVICE=WFS&REQUEST=GetCapabilities
> 
> => ogrinfo reports no geometry with this WFS:
> 
> $ ogrinfo -ro WFS:http://maps.zh.ch/wfs/FnsNSWFS?TYPENAME=svo_zonen
> INFO: Open of `WFS:http://maps.zh.ch/wfs/FnsNSWFS?TYPENAME=svo_zonen'
>       using driver `WFS' successful.
> 1: svo_zonen
> 
> Should be
> 1: svo_zonen (Polygon)
> 
> No geometry reported here in parantheses. So it's a configuration or
> installation problem of the WFS server (ArcGIS)
> 
> In QGIS this works (QGIS reader seems to guess somehow the geometry type).

Yes, when examining the 
"http://maps.zh.ch/wfs/FnsNSWFS?TYPENAME=svo_zonen&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType" 
you can see :

          <element name="msGeometry" type="gml:GeometryPropertyType" 
minOccurs="0" maxOccurs="1"/>

So the geometry type is undefined. OGR then reports a unknown geometry type. 
There could be a mix of geometries in such a layer.

I guess that QGIS will inspect the whole layer content after having downloaded 
it to determine the geometry type, but the OGR WFS driver doesn't do that for 
effeciency purposes. It can operate on arbitrarily huge layers in streaming 
mode (true for OGR 1.10)



More information about the gdal-dev mailing list