Yilmaz Arslanoglu wrote:
Everything works perfect if this module is used in a non-MFC project
(btw, projects are compiled with VS 2008) However, when the module is moved
to an MFC-based project, sounding point values (x, y, and z) come as abnormal
values, whereas no problem occurs with the values that come from the
contour layer.

Yilmaz,

I did not see any obvious problem with your code or explanation of why
it might be failing.

As another question, I do the following simple operation (again in MFC):

     OGRSpatialReference *poSRS = new OGRSpatialReference;
     OGRSpatialReference::DestroySpatialReference(poSRS);

and I get heap corruption error. Do we have another way to create a
spatial reference system object for this purpose?

Use:

  OGRSpatialReference *poSRS = (OGRSpatialReference *)
        OSRNewSpatialReference(NULL);

You may need to include ogr_srs_api.h.  The OSR functions are
the C version of the ogr_spatialref.h C++ interface and can
be mixed with c++ with a bit of casting.

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 Programmer for Rent

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to