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 <warmer...@pobox.com> wrote: > On Mon, Aug 8, 2011 at 5:09 PM, Nikolaos Hatzopoulos <nhat...@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, > warmer...@pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Software Developer >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev