class GeoJSON::MultiPoint

Overview

A MultiPoint is a Geometry representing several Points.

This class corresponds to the GeoJSON MultiPoint.

Defined in:

geojson/multi_point.cr

Constructors

Instance Method Summary

Instance methods inherited from class GeoJSON::Object

bbox bbox, type : String type

Constructor methods inherited from class GeoJSON::Object

new(pull : JSON::PullParser) new

Constructor Detail

def self.new(pull : JSON::PullParser) #

A MultiPoint is a Geometry representing several Points.

This class corresponds to the GeoJSON MultiPoint.


def self.new(coordinates : Array(Point), *, bbox = nil) #

Create a new MultiPoint with the given coordinates and optional bounding box bbox.


def self.new(coordinates : Array(Array(Float64)), *, bbox = nil) #

Create a new MultiPoint with the given coordinates and optional bounding box bbox.


Instance Method Detail

def <<(point : Array(Point)) #

Adds the given point to this MultiPoint.


def <<(coordinate : Array(Float64)) #

Adds the given coordinate to this MultiPoint.


def [](*args, **options) #

Gets the Point at the given index.


def [](*args, **options, &) #

Gets the Point at the given index.


def bbox #
Description copied from class GeoJSON::Object

Calculates the bounding box for any GeoJSON object, including FeatureCollection.


def coordinates : Array(Coordinates) #

Returns an array of this MultiPoint's coordinates.


def type : String #

Gets this MultiPoint's GeoJSON type ("MultiPoint")