confused about coordinate dimension
Richard Greenwood via gdal-dev <[email protected]> Mon, 29 Jun 2026 12:45:29 -0600
| Newsgroups | gmane.comp.gis.gdal.devel |
|---|---|
| Message-ID | <CAHBySPZbKHDFLsprh-V_6sek5fFYp4xFt4tvMv3NNipoSbrgfg@mail.gmail.com> |
--===============8698490964248326964== Content-Type: multipart/alternative; boundary="000000000000947dc2065568ddc0" --000000000000947dc2065568ddc0 Content-Type: text/plain; charset="UTF-8" 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 --000000000000947dc2065568ddc0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>In Python, I want to find the coordinate dimension of= my source. For example,<span style=3D"background-color:transparent">=C2=A0= with a postgis table with=C2=A0geometry(MultiLineStringZM,4326). My Python:= </span></div><blockquote style=3D"margin:0 0 0 40px;border:none;padding:0px= "><div>in_lyr =3D in_ds.ExecuteSQL(select)</div><div>feature0 =3D in_lyr.Ge= tNextFeature()</div><div>feature0_geom =3D feature0.GetGeometryRef()</div>f= eature0_geom<span style=3D"background-color:transparent">.GetGeometryType()= =C2=A0 =C2=A0 =C2=A0 =C2=A0 # 3005</span><div>ogr.GeometryTypeToName(3005)= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #=C2=A0 '3D Measured Multi Li= ne String'</div>feature0_geom.GetCoordinateDimension()<span style=3D"ba= ckground-color:transparent">=C2=A0 # 3</span></blockquote><div>Based on:=C2= =A0<a href=3D"https://gdal.org/en/stable/api/vector_c_api.html#_CPPv425OGR_= G_CoordinateDimension12OGRGeometryH">https://gdal.org/en/stable/api/vector_= c_api.html#_CPPv425OGR_G_CoordinateDimension12OGRGeometryH</a></div><div>I = am expecting the coordinate dimension to be 4. Am I approaching this incorr= ectly?</div><div><br></div><span class=3D"gmail_signature_prefix">-- </span= ><br><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_sig= nature"><div dir=3D"ltr">Richard W. Greenwood<br></div></div></div> --000000000000947dc2065568ddc0-- --===============8698490964248326964== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev --===============8698490964248326964==--