class GeoRuby::SimpleFeatures::MultiPolygon

Represents a group of polygons (see Polygon).

Public Class Methods

from_coordinates(point_sequence_sequences,srid= DEFAULT_SRID,with_z=false,with_m=false) click to toggle source

Creates a multi polygon from sequences of points : ((((x,y)…(x,y)),((x,y)…(x,y)),((x,y)…(x,y)))

# File lib/geo_ruby/simple_features/multi_polygon.rb, line 31
def self.from_coordinates(point_sequence_sequences,srid= DEFAULT_SRID,with_z=false,with_m=false)
  multi_polygon = new(srid,with_z,with_m)
  multi_polygon.concat( point_sequence_sequences.collect {|point_sequences| Polygon.from_coordinates(point_sequences,srid,with_z,with_m) } )
  multi_polygon
end
from_polygons(polygons,srid=DEFAULT_SRID,with_z=false,with_m=false) click to toggle source

Creates a multi polygon from an array of polygons

# File lib/geo_ruby/simple_features/multi_polygon.rb, line 25
def self.from_polygons(polygons,srid=DEFAULT_SRID,with_z=false,with_m=false)
  multi_polygon = new(srid,with_z,with_m)
  multi_polygon.concat(polygons)
  multi_polygon
end
new(srid = DEFAULT_SRID,with_z=false,with_m=false) click to toggle source
# File lib/geo_ruby/simple_features/multi_polygon.rb, line 8
def initialize(srid = DEFAULT_SRID,with_z=false,with_m=false)
  super(srid)
end