[gdal-dev] geoTransforms and OGRSpatialTransforms

Smart, Gary Gary.Smart at goodrich.com
Mon Jan 11 12:50:08 EST 2010


Well, part of the problem seems to be that I was addressing a symbolic
link to the file and not the actual file itself.

Now that I'm addressing the file directly, BOTH files manage to create
the geo transform BUT NEITHER can generate the coordinate transformation
object (OGRCoordinateTransformation) .  Can anyone tell me why both
files give me the following message...?

 

ERROR 1:  No PROJ.4 translation for source SRS, coordinate
transformation initialization has failed.

 

I am using Linux SLES10 SP2, gdal-svn-trunk-2009.12.14 and
proj4-4.7.0-1.

 

Gary 

________________________________

From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Smart, Gary
Sent: 07 January 2010 18:25
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] geoTransforms and OGRSpatialTransforms

 

  // First create a spatial reference in the input space
  OGRSpatialReference iref;
  char *tmp = NULL;
  if (proj_ref)
  {
    tmp = (char *)malloc(strlen(proj_ref)+1);
    iref.importFromWkt(&tmp);
    //iref.SetWellKnownGeogCS("WGS84");

    // Create a spatial reference in WGS84 lat/long space and
    // create a transform object between input and output space
    OGRSpatialReference oref;
    oref.SetWellKnownGeogCS("WGS84");
    OGRCoordinateTransformation *coord_transform
      = OGRCreateCoordinateTransformation(&iref, &oref);
    if (!coord_transform)
    {
      fprintf(stderr, "!!!FAILED! Cannot create converter from %s "
              " to WGS84\n", proj_ref);

    } // end case default
    free(tmp);



 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100111/7fa0035d/attachment.html


More information about the gdal-dev mailing list