Class: GeoRuby::SimpleFeatures::Polygon
- Inherits:
-
Object
- Object
- GeoRuby::SimpleFeatures::Polygon
- Defined in:
- lib/geomagic/extensions/geo_ruby_ext/point_in_polygon.rb,
lib/geomagic/extensions/geo_ruby_ext/utility.rb
Instance Method Summary collapse
Instance Method Details
#includes?(point) ⇒ Boolean
7 8 9 10 11 12 |
# File 'lib/geomagic/extensions/geo_ruby_ext/point_in_polygon.rb', line 7 def includes? point self.each do |linear_ring| return true if linear_ring.contains_point? point end false end |
#to_coordinates ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/geomagic/extensions/geo_ruby_ext/utility.rb', line 6 def to_coordinates _points = [] self.rings.each do |points| points.each do |point| _points << [point.lat, point.lng] end end _points end |