class GeoJSON::LineString
- GeoJSON::LineString
- GeoJSON::Object
- Reference
- Object
Overview
A LineString
is a Geometry
representing two or more points in geographic
space connected consecutively by lines.
This class corresponds to the GeoJSON LineString.
Defined in:
geojson/line_string.crConstructors
-
.new(pull : JSON::PullParser)
A
LineString
is aGeometry
representing two or more points in geographic space connected consecutively by lines. -
.new(coordinates : Array(Coordinates), *, bbox = nil)
Create a new
LineString
with the given coordinates and optional bounding box bbox. -
.new(coordinates : Array(Point), *, bbox = nil)
Create a new
LineString
with the given coordinates and optional bounding box bbox. -
.new(coordinates : Array(Array(Float64)), *, bbox = nil)
Create a new
LineString
with the given coordinates and optional bounding box bbox.
Instance Method Summary
-
#[](*args, **options)
Gets the LineString vertex at the given index.
-
#[](*args, **options, &)
Gets the LineString vertex at the given index.
-
#bbox
Calculates the bounding box for any GeoJSON object, including
FeatureCollection
. -
#coordinates : Array(Coordinates)
Gets this LineString's GeoJSON type ("LineString")
-
#type : String
Gets this LineString's GeoJSON type ("LineString")
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
A LineString
is a Geometry
representing two or more points in geographic
space connected consecutively by lines.
This class corresponds to the GeoJSON LineString.
Create a new LineString
with the given coordinates and optional
bounding box bbox.
Create a new LineString
with the given coordinates and optional
bounding box bbox.
Create a new LineString
with the given coordinates and optional
bounding box bbox.
Instance Method Detail
Calculates the bounding box for any GeoJSON object, including FeatureCollection
.