Method: MapWKT::Geometry::Polygon#initialize

Defined in:
lib/mapwkt/wkt/polygon.rb

#initialize(perimeter, *lacunae) ⇒ Polygon

Returns a new MapWKT::Geometry::Polygon with the given outer perimeter and internal lacunae. If the given LineStrings were unclosed, closes them for use in the Polygon, but leaves the original LineStrings unchanged.



12
13
14
15
# File 'lib/mapwkt/wkt/polygon.rb', line 12

def initialize (perimeter, *lacunae)
  @perimeter = perimeter.dup.close!
  @lacunae = lacunae.map {|lacuna| lacuna.dup.close! }
end