[Gdal-dev] C/C++ APIs communication

Frank Warmerdam fwarmerdam at gmail.com
Fri Feb 4 13:38:47 EST 2005


On Fri, 04 Feb 2005 15:10:04 +0100, Julien Demaria <dem at acri-st.fr> wrote:
> Hi,
> 
> I have an OGRGeometry C++ object (created in a C++ code with the C++ OGR
> API), and I would to pass it to a C function using the C OGR API.
> This C function returns a geometry I would use in the C++ code too.
> I think it is possible because GDAL/OGR C API use internally C++ objects ?

Julien,

You are correct.  A C++ "OGRGeometry *" is the same as a C OGRGeometrH
value, except for the typecasting.  They are both really pointers to the C++
object. 

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