Class: Shapelib::Shape

Inherits:
Object
  • Object
show all
Defined in:
lib/shapelib/shape.rb,
ext/shapelib_ext/main.c

Direct Known Subclasses

Arc, MultiPatch, MultiPoint, Point, Polygon

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.newObject

Instance Method Details

#eachObject



3
4
5
6
7
# File 'lib/shapelib/shape.rb', line 3

def each
  latlngs.each do |l|
    yield l
  end
end

#inspectObject



13
14
15
# File 'lib/shapelib/shape.rb', line 13

def inspect
  self.class.to_s + self.to_h.inspect
end

#latlngsObject



9
10
11
# File 'lib/shapelib/shape.rb', line 9

def latlngs
  @latlngs ||= yvals.zip(xvals)
end