[GIS] GDAL/OGR Geometry Type Python

gdalogrosgeopython

Taking a long shot but does anyone have an idea of whether GDAL or OGR has a function to determine a shapefile or layer geometry type using python? I specifically want the output to print "POINT" for example.

I understand that the geometry can be printed to well-known text format and have the code to complete that, but specifically require the string format.

Best Answer

See the cookbook

print(geom.GetGeometryName())