[gdal-dev] WFS: GetGeomFieldDefn(i)->GetNameRef() returns empty stirng (C++ API)
Odd Ragnar Lydersen
Odd-Ragnar.Lydersen at powel.no
Tue Nov 29 04:06:17 PST 2016
I want to use GDALDataset::ExecuteSQL() to get a layer containing feature attributes selected by the user, and the geometry of the feature.
When I did this in GDAL 1.11.x, I automatically got the geometry, but now I don't.
If I get the OGRFeatureDefn for the layer, and then get the OGRGeomFieldDefn, then I get the correct geometry type, but no name. It's empty.
So then I try to call the WFS in question by putting "request=DescribeFeatureType" in the URL which I pass to GDAL
OGRInfo lists all the different layers, and what kind of geometry it contains, but where doesn't show the attributes.
Shouldn't these be saved in the config file I'm using?
>From the documentation of the wfs driver:
"At the first opening, the content of the result of the GetCapabilities request will be appended to the file, so that it can be cached for later openings of the dataset. The same applies for the DescribeFeatureType request issued to discover the field definition of each layer."
Am I missing something here, or is this a bug?
Is there another way to select a subset of feature attributes, and the feature geometry?
Odd-Ragnar Lydersen
System Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161129/94ef6458/attachment.html>
More information about the gdal-dev
mailing list