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)
- notrgeo::cartesian.factory
- check
rgeo::geos.supported?
dirk said
Comments
Post a Comment