Yes I have the gdalinfo - it seems happy enough with the files I am
experimenting with.  I'm not sure what 'proj' is supposed to do and
can't find any info on it - but it is in my path and runs?

 

I have attached a small extract from my ever failing code - it compiles
and runs.  Perhaps someone could tell me what's wrong.  It seems to fail
to set up a coord transform for any file, even though openev happily
deals with them.  I can't help feeling that there is something decidedly
dodgy about the way I prime the transform with the 'importFromWkt call.
Perhaps the transform is never getting the transform string at all?

 

I also noticed that one of the map tif files from the mapserver tutorial
doesn't return any projection info fro mthe getProjectionRef call - will
this cause problems when trying to set up a transformation in future.

 

The files I used, and the response they give, are included in the
attachment as comments.

 

Gary 

________________________________

From: Martin Chapman [mailto:chapm...@pixia.com] 
Sent: 20 July 2009 22:46
To: Smart, Gary
Subject: RE: [gdal-dev] Converting raster pixel space to geospace

 

Gary,

 

I tried the projection string in some of my code and it worked fine.  I
stepped through the gdal code and proj4 loaded the transform object ok
too which means the projection string is fine and that your environment
suffers from one of the following:

 

1.    Proj.dll cannot be found in the path on your machine or is not in
the same directory as gdal.dll and is failing when gdal calls
LoadLibrary() on "proj.dll".

2.   The proj.dll can be found but a dependency like the nad shift files
or gdal data cannot be found.

 

I would try the following:

 

1.   Use gdalinfo.exe that should come with fwtools or can be downloaded
from gdal.org and run the command gdalinfo.exe - formats and or
ogrinfo.exe -formats.

2.   See if the output from that command gives any useful information on
why proj is failing.

3.   From the command line type in proj.exe and see if the proj util can
be found in your path.  If it can be found then maybe it will give some
useful info.

 

Sorry I am not more help than that but the projection string is valid.

 

Martin

 

From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Smart, Gary
Sent: Monday, July 20, 2009 8:50 AM
To: gdal-dev@lists.osgeo.org
Subject: RE: [gdal-dev] Converting raster pixel space to geospace

 

Thanks Martin, but now to the next problem...

 

I downloaded PRROJ.4 which seemed to configure and compile OK.

Having set the PROJ_LIB as you proposed, I now get:

 

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

 

I guess I am still missing comething.  The failure came from the same
geotiff file as below.

 

I also couldn't find a 'data dir' in the GDAL source and therefore
GDAL_DATA env var remained unset.  We installed everything from the
FWTools download for our Linux SUSE10 system.  Should there be a 'data'
directory under the FWTools directory somewhere?  There is no GDAL
source in this directory - just include files and libraries.  I presumed
this was all that was needed to use GDAL?   

 

________________________________

From: Martin Chapman [mailto:chapm...@pixia.com] 
Sent: 20 July 2009 14:49
To: Smart, Gary; gdal-dev@lists.osgeo.org
Subject: RE: [gdal-dev] Converting raster pixel space to geospace

 

Gary,

 

Set your paths like such on startup or as an environment variable:

 

GDAL_DATA points at the data dir that comes with gdal source.

PROJ_LIB point to the nad directory that you download from proj4
website.

 

string env = string("GDAL_DATA=") + dataPath;

_putenv(env.c_str());

env = string("PROJ_LIB=") + nadPath;

_putenv(env.c_str());

 

and / or

 

CPLSetConfigOption("GDAL_DATA", dataPath.c_str());

CPLSetConfigOption("PROJ_LIB", nadPath.c_str());

 

Martin

 

From: gdal-dev-boun...@lists.osgeo.org
[mailto:gdal-dev-boun...@lists.osgeo.org] On Behalf Of Smart, Gary
Sent: Monday, July 20, 2009 7:38 AM
To: gdal-dev@lists.osgeo.org
Subject: RE: [gdal-dev] Converting raster pixel space to geospace

 

 

 

OK - I can get it to compile and not crash instantly (bonanza!)

 

However, when I try to create the OGR transform using importFromWkt, 

I get the following:

 

ERROR 6: Unable to load PROJ.4 library (libproj.so), creation of

OGRCoordinateTransformation failed.

 

Does anyone know what this means?  Is there some part of OGR/GDAL I have
yet to install?

 

 

Attachment: georef.c++
Description: georef.c++

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

Reply via email to