System.out.println(&quot;Elevation&quot;+poDS.GetLayerByIndex(0).GetFeature(0).GetFieldAsString(&quot;elevation&quot;));<br><br>ERROR 1: No such a field &#39;elevation&#39;<br><br>I am refetching to find where in the tree is the elevation :) yes I know is expensive<br>
<br>does it has to do with the version I am using? I am using 1.7.2<br><br>--Nikos<br><br><div class="gmail_quote">On Mon, Aug 8, 2011 at 6:18 PM, Frank Warmerdam <span dir="ltr">&lt;<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Mon, Aug 8, 2011 at 5:09 PM, Nikolaos Hatzopoulos &lt;<a href="mailto:nhatzop@gmail.com">nhatzop@gmail.com</a>&gt; wrote:<br>

&gt; Hi Community,<br>
&gt;<br>
&gt; we have this gml data:<br>
&gt; <a href="http://nvclwebservices.vm.csiro.au/geoserverBH/wfs?SERVICE=WFS&amp;REQUEST=GetFeature&amp;VERSION=1.1.0&amp;maxFeatures=1&amp;typeName=gsml:Borehole" target="_blank">http://nvclwebservices.vm.csiro.au/geoserverBH/wfs?SERVICE=WFS&amp;REQUEST=GetFeature&amp;VERSION=1.1.0&amp;maxFeatures=1&amp;typeName=gsml:Borehole</a><br>

&gt;<br>
&gt; System.out.println(&quot;Layer Count: &quot;+poDS.GetLayerCount());<br>
&gt; System.out.println(&quot;Layer Name: &quot;+poDS.GetLayerByIndex(0).GetName());<br>
&gt; System.out.println(&quot;Feature Count:<br>
&gt; &quot;+poDS.GetLayerByIndex(0).GetFeatureCount());<br>
&gt; System.out.println(&quot;1st Feature X:<br>
&gt; &quot;+Double.toString(poDS.GetLayerByIndex(0).GetFeature(0).GetGeometryRef().GetX()));<br>
&gt; System.out.println(&quot;1st Feature Y:<br>
&gt; &quot;+Double.toString(poDS.GetLayerByIndex(0).GetFeature(0).GetGeometryRef().GetY()));<br>
&gt;<br>
<br>
</div>I imagine something like:<br>
<br>
System.out.println(poDS.GetLayerByIndex(0).GetFeature(0).GetFieldAsString(&quot;elevation&quot;));<br>
<br>
BTW, refetching the feature each time may be quite expensive!<br>
<br>
Best regards,<br>
<font color="#888888"><br>
--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up   | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush    | Geospatial Software Developer<br>
</font></blockquote></div><br>