struct WKB::Polygon

Included Modules

Defined in:

wkb/geojson.cr
wkb/polygon.cr

Constructors

Instance Method Summary

Instance methods inherited from module WKB::LineStringSequenceable

children children, empty? empty?, line_strings : Array(LineString) line_strings, size size, to_coordinates : Array(Array(Array(Float64))) to_coordinates

Constructor methods inherited from module WKB::LineStringSequenceable

new(line_array : Array(Array(Array(Float64))), mode = Mode::XY, srid = 0) new

Instance methods inherited from struct WKB::Geometry

to_coordinates to_coordinates, to_json(builder : JSON::Builder) : Nil to_json

Constructor methods inherited from struct WKB::Geometry

new(pull : JSON::PullParser) new

Instance methods inherited from struct WKB::Object

children children, empty? empty?, has_m? has_m?, has_z? has_z?, has_zm? has_zm?, mode : WKB::Mode mode, size size, srid : Int32 srid, to_json(builder : JSON::Builder) to_json

Constructor methods inherited from struct WKB::Object

new(pull : JSON::PullParser) new

Constructor Detail

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

NOTE It's necessary to require the GeoJSON extension after loading the library.


[View source]

Instance Method Detail

def exterior_ring : LineString #

Returns the polygon's first line string.


[View source]
def interior_rings : Array(LineString) #

Returns a potentially empty array with the polygon's last line strings.


[View source]
def kind : ObjectKind #

[View source]
def rings : Array(WKB::LineString) #

Returns the polygon's child line strings.


[View source]