[Gdal-dev] problems with OSR

Frank Warmerdam warmerdam at pobox.com
Sat Feb 22 13:16:23 EST 2003

Gary Bishop wrote:
> I'm a newbie to gdal, osr, and gis in general. I'm trying to get things 
> set up so that we can use osr to create map projections for our 
> python-based blind mapping system 
> (http://www.cs.unc.edu/Research/assist/bats/).
> I have downloaded and successfully compiled gdal-1.1.8 on my Windows2000 
> system. I also downloaded proj-4.4.5 and built it. I put the proj.dll on 
> my path.
> Now when I try the following little python script that I'm using for 
> testing:
> import osr
> src = osr.SpatialReference()
> src.SetWellKnownGeogCS('nad83')
> dst=osr.SpatialReference()
> dst.SetProjCS("UTM 17 (NAD83) in northern hemisphere")
> dst.SetWellKnownGeogCS('nad83')
> dst.SetUTM(17, True)
> xfm = osr.CoordinateTransformation(src, dst)
> I get an error on the last line saying:
> ERROR 1: Can't find requested entry point: pj_get_def
> ERROR 1: Can't find requested entry point: pj_dalloc
> Any suggestions for what I'm doing wrong? I *thought* I had this working 
> a few weeks ago and I was just coming back now to document the procedure 
> to get a working version but I was either wrong then or have done 
> something wrong now.


The pj_get_def and pj_dalloc entry points are not strictly necessary for
correct operation and the intention is that they should just be
considered warnings. I would hope that you would find things are still working.

You can avoid the problem entirely by utilizing the version of PROJ.4 that
is in CVS (which has the entry points) or using the CVS snapshot of GDAL
(which avoids printing out an error message for these failures).

I skimmed over the BATS pages.  It looks cool and I will have to try on the
demo some time when I am working on Windows.  I am always keen to support
fellow Python users in GIS and mapping.  What do you use for image and vector
access in BATS?  I wonder if GDAL and OGR might be of use?

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