Skip to content

Commit

Permalink
postgres provider: consider TIN and POLYHEDRALSURFACE as MULTIPOLYGON…
Browse files Browse the repository at this point in the history
…M (instead of POLYGONM) (fixes #9651)
  • Loading branch information
jef-n committed Feb 26, 2014
1 parent 9c4a990 commit cb919e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/postgres/qgspostgresconn.cpp
Expand Up @@ -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;
}
Expand All @@ -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 )
{
Expand Down

0 comments on commit cb919e9

Please sign in to comment.