class GeoScript::Geom::MultiPoint

Attributes

bounds[RW]

Public Class Methods

new(*points) click to toggle source
Calls superclass method
# File lib/geoscript/geom/multipoint.rb, line 10
def initialize(*points)
  feature_points = []

  if points.first.kind_of? JTSMultiPoint
    multi_point_geom = point.first
    for i in (0...multi_point_geom.num_geometries)
      feature_points << multi_point_geom.get_geometry_n(i)
    end
  else
    points.each do |point|
      if point.kind_of? Point
        feature_points << point
      else
        feature_points << Point.new(*point)
      end
    end
  end

  super(feature_points.to_java(com.vividsolutions.jts.geom.Point), GEOM_FACTORY)
end

Public Instance Methods

buffer(dist) click to toggle source
Calls superclass method GeoScript::Geom::buffer
# File lib/geoscript/geom/multipoint.rb, line 31
def buffer(dist)
  Polygon.new super
end
to_json() click to toggle source
# File lib/geoscript/geom/multipoint.rb, line 43
def to_json
  IO.write_json self
end
to_wkb() click to toggle source
# File lib/geoscript/geom/multipoint.rb, line 39
def to_wkb
  IO.write_wkb self
end
to_wkt() click to toggle source
# File lib/geoscript/geom/multipoint.rb, line 35
def to_wkt
  IO.write_wkt self
end