[gdal-dev] GML elevation

Frank Warmerdam warmerdam at pobox.com
Mon Aug 8 21:45:29 EDT 2011


On Mon, Aug 8, 2011 at 6:39 PM, Nikolaos Hatzopoulos <nhatzop at gmail.com> wrote:
> System.out.println("Elevation"+poDS.GetLayerByIndex(0).GetFeature(0).GetFieldAsString("elevation"));
>
> ERROR 1: No such a field 'elevation'


Niko,

Odd, for me ogrinfo reports:

...
gml_id: String (0.0)
name: StringList (0.0)
sampledFeature: String (0.0)
elevation: Real (0.0)
driller: String (0.0)
dateOfDrilling: String (10.0)
drillingMethod: String (12.0)
startPoint: String (22.0)
inclinationType: String (8.0)
lowerCorner: Real (0.0)
upperCorner: Real (0.0)
coreCustodian: String (0.0)
OGRFeature(Borehole):5
  gml_id (String) = gsml.borehole.WTB5
  name (StringList) = (2:,...)
  sampledFeature (String) =
  elevation (Real) = 45
  driller (String) =
...

Fetching with a field name of "elevation" should have worked.
Check your ogrinfo report on the file and see if you see something
different.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer


More information about the gdal-dev mailing list