LineString: LineString

Description See Also Examples

Description

For type "LineString", the "coordinates" member must be an array of two or more positions. A LinearRing is closed LineString with 4 or more positions. The first and last positions are equivalent (they represent equivalent points). Though a LinearRing is not explicitly represented as a GeoJSON geometry type, it is referred to in the Polygon geometry type definition.

See Also

Other geo types: FeatureCollection, Feature, GeometryCollection, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon, geojson-types

Examples

1
2
3
4
5
6
7
'{
   "type": "LineString",
   "coordinates": [
      [100.0, 0.0],
      [101.0, 1.0]
   ]
}'

Example output

[1] "{\n   \"type\": \"LineString\",\n   \"coordinates\": [\n      [100.0, 0.0],\n      [101.0, 1.0]\n   ]\n}"

geoops documentation built on July 1, 2020, 10:39 p.m.