[Gdal-dev] Re: ruby bindings proj4 stangeness

Charlie Savage cfis at savagexi.com
Wed Aug 30 02:00:45 EDT 2006


Are you regenerating the SWIG bindings or using the ones in CVS?

Either way, open the appropriate cxx file (osr_wrap.cxx maybe) and 
scroll to the bottom.  Do you see these missing methods being registered 
(I'm guessing no)?

Charlie


Shoaib Burq wrote:
> I have been banging my head against this for a few hours now with
> little success. I have gdal-1.3.2 build with ruby bindings on gentoo.
> 
> So far while scripting all had been well until i got to proj4 import
> and export functions in osr.
> 
> It appears that that osr ruby bindings aren't registering the proj4 
> functions.
> 
> the strange thing is everything else works fine. Also in python these
> functions is working fine. Below is the run of the osr test suite to
> demonstrate the problem
> 
> $ ruby ts_osr.rb
> Loaded suite ts_osr
> Started
> ...E........EE..
> Finished in 0.077001 seconds.
> 
>  1) Error:
> test_translate_nad_shift(TestOsrBasic):
> NoMethodError: undefined method `set_towgs84' for
> #<Gdal::Osr::SpatialReference:0xb7b2930c>
>    ./tc_osr_basic.rb:109:in `test_translate_nad_shift'
> 
>  2) Error:
> test_exponents(TestOsrProj4):
> NoMethodError: undefined method `import_from_proj4' for
> :Gdal::Osr::SpatialReference
>    ./tc_osr_proj4.rb:18:in `test_exponents'
> 
>  3) Error:
> test_k_0_flag(TestOsrProj4):
> NoMethodError: undefined method `import_from_proj4' for
> :Gdal::Osr::SpatialReference
>    ./tc_osr_proj4.rb:9:in `test_k_0_flag'
> 
> 16 tests, 79 assertions, 0 failures, 3 errors
> ------------------
> So i am running gentoo. gdal was built using the most recent ebuild
> (with ruby flags) and everything compiled fine.
> 
> any thoughts?
> -shoaib




More information about the Gdal-dev mailing list