[Gdal-dev] Re: ruby bindings proj4 stangeness

Shoaib Burq hydromap at gmail.com
Fri Sep 1 03:14:13 EDT 2006


Hi Charlie

Sorry about the delayed response. The osr_warp.cxxx does contain the
import/export_to_proj4 definitions.

just did a hand compile of gdal-cvs on my laptop using --with-ruby
config option and it works. While on the problem server i used an
ebuild with a gdal-ruby patch that just modifies the RubyMakefile.mk
to add ${RUBY_MODULES} to the install target -- something bad happens
without it -- if my memory serves me correctly it couldn't find
gdal.o. I am now thinking the problem maybe with my ebuild. I am
investigating this. will keep you posted.

regards
Shoaib

On 8/30/06, Charlie Savage <cfis at savagexi.com> wrote:
> 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
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>



More information about the Gdal-dev mailing list