Skip to content
Permalink
Browse files

[OGR provider] Make ogrWkbGeometryTypeName() correctly display M/ZM g…

…eometry names, as potentially returned by GDAL 2.1
  • Loading branch information
rouault committed Jun 18, 2016
1 parent 22dfd76 commit 6bc0313a1e5dc61520dc69f2186790108eb0b08a
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -479,6 +479,20 @@ QString QgsOgrProvider::subsetString()
QString QgsOgrProvider::ogrWkbGeometryTypeName( OGRwkbGeometryType type ) const
{
QString geom;

// GDAL 2.1 can return M/ZM geometries
#if defined(GDAL_COMPUTE_VERSION) && GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,1,0)
if ( wkbHasM( type ) )
{
geom = ogrWkbGeometryTypeName( wkbFlatten( type ) );
if ( wkbHasZ( type ) )
geom += "Z";
if ( wkbHasM( type ) )
geom += "M";
return geom;
}
#endif

switch (( long )type )
{
case wkbUnknown:

0 comments on commit 6bc0313

Please sign in to comment.
You can’t perform that action at this time.