RGeo on Ruby under Windows: How to enable GEOS support? -


i'm trying spatial operations in ruby rgeo gem. unfortunately, lot of operations require geos library , can't find documentation showing how integrate in windows (i using windows 7 64bit).

i tried downloading , installing windows binaries of geos http://trac.osgeo.org/osgeo4w/ , reinstalling rgeo gem via gem install rgeo -- --with-geos-dir="c:\osgeo4w64\bin (<< in directory there file geos_c.dll).

still, using rgeo::geos.supported? returns false.

does know how solve this?

for else looking - here tips how got working.

  • install geos windows binaries following link http://trac.osgeo.org/geos/ (i have ruby 32 bit version, went 32 bit version)
  • you should able find file geos_c.dll in c:\osgeo4w\bin
  • set windows environment variable env['geos_library_path'] c:\osgeo4w\bin
  • check @ point make sure env variable there - maybe restart pc!
  • in gemfile, add gem 'ffi-geos' , gem 'rgeo' , bundle install
  • in ruby file, remember require 'ffi-geos' , require 'rgeo' (in order)
  • use factory = rgeo::geos.factory(:native_interface => :ffi) - not rgeo::cartesian.factory
  • check rgeo::geos.supported? dirk said

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -