I'm trying to do some spatial operations in Ruby with the RGeo
gem. Unfortunately, a lot of operations require the GEOS
library and I can't find any documentation showing how to integrate this in Windows (I am using Windows 7 64bit).
I tried downloading and installing the Windows binaries of GEOS
from http://trac.osgeo.org/osgeo4w/ and reinstalling the RGeo
gem via gem install rgeo -- --with-geos-dir="C:\OSGeo4W64\bin
(<< in this directory there is a file geos_c.dll
).
Still, using RGeo::Geos.supported?
returns false
.
Does anybody know how to solve this?
For anyone else looking to do this - here are some tips as to how I got it working.
C:\OSGeo4W\bin
ENV['GEOS_LIBRARY_PATH']
to beC:\OSGeo4W\bin
gem 'ffi-geos'
andgem 'rgeo'
and bundle installrequire 'ffi-geos'
andrequire 'rgeo'
(in that order)factory = RGeo::Geos.factory(:native_interface => :ffi)
- notRGeo::Cartesian.factory
RGeo::Geos.supported?
as Dirk said