Index: ogr/ogrpolygon.cpp
===================================================================
--- ogr/ogrpolygon.cpp	(revision 11421)
+++ ogr/ogrpolygon.cpp	(working copy)
@@ -131,6 +131,8 @@
 {
     for( int iRing = 0; iRing < nRingCount; iRing++ )
         papoRings[iRing]->flattenTo2D();
+
+    nCoordDimension = 2;
 }
 
 /************************************************************************/

