'Testing coordinate dimensions on geometries after transformation.'

def test18_ogrgeometry_transform_workaround(self):

    wkt_2d = 'MULTILINESTRING    ((0    0,1    1,2    2))'
    wkt_3d = 'MULTILINESTRING    ((0    0    0,1    1    1,2    2    2))'
    srid = 4326
    geom = OGRGeometry(wkt_2d, srid)
    geom.transform(srid)
    self.assertEqual(2, geom.coord_dim)
    self.assertEqual(2, geom[0].coord_dim)
    self.assertEqual(wkt_2d, geom.wkt)
    geom = OGRGeometry(wkt_3d, srid)
    geom.transform(srid)
    self.assertEqual(3, geom.coord_dim)
    self.assertEqual(3, geom[0].coord_dim)
    self.assertEqual(wkt_3d, geom.wkt)
