[Gdal-dev] How to get value of an attribute within an object class
    Frank Warmerdam 
    warmerdam at pobox.com
       
    Mon Oct  1 12:35:17 EDT 2007
    
    
  
On 10/1/07, tjansson <tommy.jansson at kongsberg.com> wrote:
>
> How do I get the value of an attribute within an object class?
>
> I'm for instance interested in retrieving the value of the VALDCO (Value of
> depth contour) attribute from within the DEPCNT (Depth Contour) object
> class.
Tommy,
Given a pointer to the OGRFeature named poFeature you would do:
  double VALDCO;
  VALDCO = poFeature->GetFieldAsDouble( "VALDCO" );
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 Programmer for Rent
    
    
More information about the Gdal-dev
mailing list