[gdal-dev] QUAPOS and other geometry fields (C#)
Tom Lewis
tglewis1993 at gmail.com
Tue Dec 8 02:56:49 PST 2020
Hi,
I am trying to get the geometry fields through the GDAL.OGR c# wrapper.
I need to loop through and print every field (with name) on every geometry
in a feature. I am looking for the QUAPOS field in the geometry (if
applicable) but am unsure which combination of definitions and functions to
use, as GeomFieldDef names always seem to return blank.
What I tried was:
Use feature.GetGeomFieldCount to set up a loop between 0 -> fieldCount.
For each iteration, use the loop index with feature.GetGeomFieldRefnDef()
to get the GeomFieldDefn instance (which was not null).
With this GeomFieldDefn use the GetNameRef (also tried just GetName)
function to get the fields name. (Not sure how to get the value of the
field in this method, but the return was always blank so it wouldn't matter
I suspect. I tried with the fields SpatialRef, but that didn't work.)
Trying to write the conditional procedures outlined in the S52 Presentation
Library documentation (Ed 4.0) and am now hitting a roadblock here. I am
probably just woefully misunderstanding this document and apologies if this
is a simple question, but I have had no luck finding any answers through
GoogleFu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20201208/6a86db37/attachment.html>
More information about the gdal-dev
mailing list