RGeo Factories and contians? in geographic domain

閲覧: 318 回
最初の未読メッセージにスキップ

Pratuat Amatya

未読、
2014/03/10 3:22:192014/03/10
To: rgeo-...@googlegroups.com
I am new to GIS and RGeo.

I was using RGeo::Geographics.spherical_factory for creating polygons and point with lat/lon data.

I am getting following errors on polygon.contains?(point)
RGeo::Error::UnsupportedOperation: Method Geometry#contains? not defined.
from /Users/pratuat/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rgeo-0.3.20/lib/rgeo/feature/geometry.rb:409:in `contains?'

I noticed another post recommended the usage of RGeo::Geos.factory instead but again GEOS is said to be implementation of the SFS using a Cartesian coordinate system. 

So whats the right way to achieve polygon.contains?(point) in geographic coordinate system.


PS: Going through Daniel Azuma's article series, I realized the spatial data I will be using are locale specific and hence it would be good idea to switch to simple_mercator_factory but again the requirements is such that I need to store the locaiton data in lat/lon. How can I work that out ?

Ken-ichi Ueda

未読、
2014/10/29 19:12:162014/10/29
To: rgeo-...@googlegroups.com
+1. If this isn't implemented, the documentation should say so. If anyone can recommend an alternative strategy that would be helpful. I'm particularly interested using contains? for polygons that cross longitude 180.

-ken-ichi

Jules Ivanic

未読、
2015/08/24 11:37:262015/08/24
To: RGeo-Users
Hi,

You have to use the RGeo::Geos.factory

Like this for example : 

  self.rgeo_factory_generator = RGeo::Geos.factory_generator
  set_rgeo_factory_for_column
(:columnn_name, RGeo::Geographic.simple_mercator_factory)

And one thing very important is to install the system dependancies BEFORE installing the gem, as explain in the last comment of this issue : https://github.com/rgeo/rgeo/issues/52

ravi.l...@nestaway.com

未読、
2016/11/11 17:36:022016/11/11
To: RGeo-Users
Hey,

did you figure out an answer for that ?
全員に返信
投稿者に返信
転送
新着メール 0 件