I'm creating a memory layer in PyQGIS and I need to match the geometry of the memory layer that I am building to the geometry of another layer.
After some investigation it seems to me that, as per QGIS 2.2 Documentation and the QGIS 2.2 API Documentation, the URI defining the geometry type approximately matches the QGis::WkbType member enumeration text.
I know I can easily query the WKBType of my input layer with
myWkbType = mylayer.dataProvider().geometryType()
However, this returns an integer, whereas the constructor requires text. Is there a simple built-in PyQGIS way to turn these constants into text, or do I need to build a hacky little reverse mapping function for it?