struct WKB::LineString
- WKB::LineString
- WKB::Geometry
- WKB::Object
- Struct
- Value
- Object
Included Modules
- Indexable(WKB::Position)
Defined in:
wkb/geojson.crwkb/line_string.cr
Constructors
- .new(coordinates_array : Array(Array(Float64)), mode = Mode::XY, srid = 0)
-
.new(pull : JSON::PullParser)
NOTE It's necessary to require the GeoJSON extension after loading the library.
Instance Method Summary
-
#children : Array(WKB::Position)
Returns the object's child entities as an array.
-
#closed?
Returns
true
if empty or the first child position is equal to the last one. -
#empty?
Returns
true
ifself
is empty,false
otherwise. - #kind : ObjectKind
-
#open?
Returns the opposite of
#closed?
. - #positions : Array(Position)
-
#ring?
Returns
true
if there are at least four positions and they are#closed?
. -
#size
Returns the number of elements in this container.
-
#to_coordinates : Array(Array(Float64))
Returns a representation of coordinates as a nested array.
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.
Instance Method Detail
def children : Array(WKB::Position)
#
Description copied from struct WKB::Object
Returns the object's child entities as an array.
def empty?
#
Description copied from module Indexable(WKB::Position)
Returns true
if self
is empty, false
otherwise.
([] of Int32).empty? # => true
([1]).empty? # => false
def size
#
Description copied from module Indexable(WKB::Position)
Returns the number of elements in this container.
def to_coordinates : Array(Array(Float64))
#
Description copied from struct WKB::Geometry
Returns a representation of coordinates as a nested array.