[gdal-dev] GMLAS driver - identification of geometry columns.

kusala nine kusala9 at googlemail.com
Thu Jul 25 03:29:40 PDT 2019


Hi everyone,

I'm using the GMLAS driver in connection with the OGCs pilot project on
maritime limits and boundaries. The first part of the project is the
creation of an application schema and we're using the IHO S-100 profile of
GML. What I've noticed is that the GMLAS driver won't recognise geometry
columns unless they're in the GML namespace. Because we're using a profile
of gml I want to use s100:PontPropertyType (which is essentially the same
as gml:PointPropertyType but oginfo and the gdal tools (including QGIS and
the GMLAS plugin) won't identify the element as geometry.

snippet from the gmlas driver is below which makes it clear that you must
have a gml namespace for an element to be identified as geometry. I've
built a version of GDAL2.4.2 which takes out the namespace constraint and
that seems to do what I wanrt (i.e s100:PointPropertyType elements are
identified as ogr geometry types).

so.... question - has this come up before? Is there a configuration way
round it? Is it a bug or should we think again in the IHO about how our GML
profile works??? Grateful for any advice...

cheers,

Jonathan
OGC Marine Domain Working Group co-chair

            else if( IsGMLNamespace(transcode(poTypeDef->getNamespace())) &&
                   (eGeomType = GetOGRGeometryType(poTypeDef)) != wkbNone )
            {
                GMLASField oField;
                oField.SetName( osPrefixedEltName );
                oField.SetMinOccurs( nMinOccurs );
                oField.SetMaxOccurs( nMaxOccurs );
                oField.SetType( GMLAS_FT_GEOMETRY, szFAKEXS_GEOMETRY );
                if( nMaxOccurs > 1 || nMaxOccurs == MAXOCCURS_UNLIMITED )
                {
                    // Repeated geometry property can happen in some schemas
                    // like
inspire.ec.europa.eu/schemas/ge_gp/4.0/GeophysicsCore.xsd
                    // or
http://ngwd-bdnes.cits.nrcan.gc.ca/service/gwml/schemas/2.1/gwml2-flow.xsd
                    oField.SetGeomType( wkbUnknown );
                    oField.SetArray( true );
                }
                else
                    oField.SetGeomType( eGeomType );
                oField.SetXPath( osElementXPath );
                oField.SetDocumentation( GetAnnotationDoc( poElt ) );

                oClass.AddField( oField );
            }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190725/5b6900dc/attachment.html>


More information about the gdal-dev mailing list