[gdal-dev] GML elevation

Nikolaos Hatzopoulos nhatzop at gmail.com
Mon Aug 8 21:39:50 EDT 2011


System.out.println("Elevation"+poDS.GetLayerByIndex(0).GetFeature(0).GetFieldAsString("elevation"));

ERROR 1: No such a field 'elevation'

I am refetching to find where in the tree is the elevation :) yes I know is
expensive

does it has to do with the version I am using? I am using 1.7.2

--Nikos

On Mon, Aug 8, 2011 at 6:18 PM, Frank Warmerdam <warmerdam at pobox.com> wrote:

> On Mon, Aug 8, 2011 at 5:09 PM, Nikolaos Hatzopoulos <nhatzop at gmail.com>
> wrote:
> > Hi Community,
> >
> > we have this gml data:
> >
> http://nvclwebservices.vm.csiro.au/geoserverBH/wfs?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&maxFeatures=1&typeName=gsml:Borehole
> >
> > System.out.println("Layer Count: "+poDS.GetLayerCount());
> > System.out.println("Layer Name: "+poDS.GetLayerByIndex(0).GetName());
> > System.out.println("Feature Count:
> > "+poDS.GetLayerByIndex(0).GetFeatureCount());
> > System.out.println("1st Feature X:
> >
> "+Double.toString(poDS.GetLayerByIndex(0).GetFeature(0).GetGeometryRef().GetX()));
> > System.out.println("1st Feature Y:
> >
> "+Double.toString(poDS.GetLayerByIndex(0).GetFeature(0).GetGeometryRef().GetY()));
> >
>
> I imagine something like:
>
>
> System.out.println(poDS.GetLayerByIndex(0).GetFeature(0).GetFieldAsString("elevation"));
>
> BTW, refetching the feature each time may be quite expensive!
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110808/0396e193/attachment-0001.html


More information about the gdal-dev mailing list