struct WKB::Point
- WKB::Point
- WKB::Geometry
- WKB::Object
- Struct
- Value
- Object
Defined in:
wkb/geojson.crwkb/point.cr
Constructors
- .new(coordinates : 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
Returns an array with the point's position or an empty array if the position is empty.
-
#empty?
Returns
true
if the point's position is empty. - #kind : ObjectKind
-
#m
Returns the M coordinate or
Float64::NAN
if empty or the mode has not M. -
#position : Position
Returns the point's underlying position.
-
#size
Returns
0
if the point's position is empty,1
otherwise. -
#to_coordinates
Returns a representation of coordinates as an array.
-
#x
Returns the X coordinate or
Float64::NAN
if empty. -
#y
Returns the Y coordinate or
Float64::NAN
if empty. -
#z
Returns the Z coordinate or
Float64::NAN
if empty or the mode has not Z.
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
NOTE It's necessary to require the GeoJSON extension after loading the library.
Instance Method Detail
Returns an array with the point's position or an empty array if the position is empty.