[gdal-dev] confused about coordinate dimension

Richard Greenwood richard.greenwood at gmail.com
Mon Jun 29 11:45:29 PDT 2026


In Python, I want to find the coordinate dimension of my source. For
example, with a postgis table with geometry(MultiLineStringZM,4326). My
Python:

in_lyr = in_ds.ExecuteSQL(select)
feature0 = in_lyr.GetNextFeature()
feature0_geom = feature0.GetGeometryRef()
feature0_geom.GetGeometryType()        # 3005
ogr.GeometryTypeToName(3005)            #  '3D Measured Multi Line String'
feature0_geom.GetCoordinateDimension()  # 3

Based on:
https://gdal.org/en/stable/api/vector_c_api.html#_CPPv425OGR_G_CoordinateDimension12OGRGeometryH
I am expecting the coordinate dimension to be 4. Am I approaching this
incorrectly?

-- 
Richard W. Greenwood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20260629/f4bcf4ac/attachment.htm>


More information about the gdal-dev mailing list