Even,
Thank you, that was very helpful. Then I’ll map Curve to CompoundCurve and 
Surface to CurvePolygon.
The possible reason, that this may be due to a lack of mapping between OGR and 
QGIS geometry types, is quite intriguing. I tried to find out more on the web, 
and came across 
https://github.com/qgis/QGIS/blob/master/src/core/providers/ogr/qgsogrprovider.cpp
 (if that is the right place to look for the actual code), but could not find 
out more about the implemented mapping. Oh well, it’s ok.
Again, thanks, and best regards,
Johannes

Von: Even Rouault <even.roua...@spatialys.com>
Gesendet: Donnerstag, 5. Januar 2023 15:13
An: Johannes Echterhoff <echterh...@interactive-instruments.de>; 
gdal-dev@lists.osgeo.org
Betreff: Re: [gdal-dev] GML driver - gfs geometry type values and supported GML 
geometry types


Johannes,

this is more an issue on QGIS side, in its OGR provider where there's likely a 
lack of mapping between the OGR geometry types and QGIS geometry types for 
Curve and Surface (just guessing, didn't check). The root cause is that Curve 
and Surface in OGC/ISO specs are abstract types only, not directly 
instantiable. So it is really hard to have datasets where they are reported as 
layer geometry types, unless you try hard to do so, as you did. I'd suggest you 
use CurvePolygon (resp. CompoundCurve) instead of Surface (resp. Curve) in your 
.gfs file. That's what the OGR XSD reader does when encountering a 
gml:SurfacePropertyType or gml:CurvePropertyType. Those are instanciable types 
and QGIS should behave properly

Even
Le 05/01/2023 à 14:00, Johannes Echterhoff a écrit :
Hi,

The GML driver shows behavior that I do not understand: When I load a feature 
with a gml:Polygon, which, in the gfs file, is defined with 
GeomPropertyDefn/Type = Surface, then the geometry does not appear to be 
understood. At least when I try to load the data in QGIS 3.28.0, then the layer 
has an unknown geometry type. If, on the other hand, I set 
GeomPropertyDefn/Type to “Polygon”, “MultiPolygon”, or even “MultiSurface”, the 
geometry is recognized. Same problem if the feature has a gml:LineString as 
geometry, and I declare it as GeomPropertyDefn/Type = Curve.

What am I missing here? :-)

Is there some documentation available that sheds light on which gfs geometry 
type values support which GML geometry types?

Best regards,
Johannes



_______________________________________________

gdal-dev mailing list

gdal-dev@lists.osgeo.org<mailto:gdal-dev@lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev

--

http://www.spatialys.com

My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to