Skip to content
Permalink
Browse files

postgres provider: consider TIN and POLYHEDRALSURFACE as MULTIPOLYGON…

…M (instead of POLYGONM) (fixes #9651)
  • Loading branch information
jef-n committed Feb 26, 2014
1 parent 9c4a990 commit cb919e972e11573fe2a0e58f4d946c6a30c9f792
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/postgres/qgspostgresconn.cpp
@@ -1373,7 +1373,7 @@ QGis::WkbType QgsPostgresConn::wkbTypeFromPostgis( QString type )
{
return QGis::WKBMultiPolygon;
}
else if ( type == "MULTIPOLYGONM" )
else if ( type == "MULTIPOLYGONM" || type == "TIN" || type == "POLYHEDRALSURFACE" )
{
return QGis::WKBMultiPolygon25D;
}
@@ -1385,9 +1385,9 @@ QGis::WkbType QgsPostgresConn::wkbTypeFromPostgis( QString type )

QGis::WkbType QgsPostgresConn::wkbTypeFromOgcWkbType( unsigned int wkbType )
{
// polyhedralsurface / TIN / triangle => Polygon
// polyhedralsurface / TIN / triangle => MultiPolygon
if ( wkbType % 100 >= 15 )
wkbType = wkbType / 1000 * 1000 + QGis::WKBPolygon;
wkbType = wkbType / 1000 * 1000 + QGis::WKBMultiPolygon;

switch ( wkbType / 1000 )
{

0 comments on commit cb919e9

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