Generates a LineString
@return {Object} GeoJSON LineString
353073
function generateLineString() {
  var coordNumber = getRandomNumber(3, options.maxCoordCount);

  var feature = rawFeature();
  feature.geometry.type = 'LineString';

  addCoordinates(feature.geometry.coordinates, coordNumber);

  return feature;
}
34838
function() {
        var string;
        if (OpenLayers.Format && OpenLayers.Format.WKT) {
            string = OpenLayers.Format.WKT.prototype.write(
                new OpenLayers.Feature.Vector(this)
            );
        } else {
            string = Object.prototype.toString.call(this);
        }
        return string;
    }
638796
public static void toGeojsonLineString(LineString lineString, StringBuilder sb) {
        sb.append("{\"type\":\"LineString\",\"coordinates\":");
        toGeojsonCoordinates(lineString.getCoordinates(), sb);
        sb.append("}");
    }
117246
function generateGlsl (inputs) {
  var str = ''
  inputs.forEach((input) => {
    str += ', ' + input.name
  })
  return str
}
1356114
function(str) {
            var polygon;
            var polygons = OpenLayers.String.trim(str).split(this.regExes.doubleParenComma);
            var components = [];
            for(var i=0, len=polygons.length; i<len; ++i) {
                polygon = polygons[i].replace(this.regExes.trimParens, '$1');
                components.push(this.parse.polygon.apply(this, [polygon]).geometry);
            }
            return new OpenLayers.Feature.Vector(
                new OpenLayers.Geometry.MultiPolygon(components)
            );
        }
734823
public static MultiLineString of(Iterable<LineString> lineStrings) {
        AreaPositions.Builder positionsBuilder = AreaPositions.builder();
        for(LineString lineString : lineStrings) {
            positionsBuilder.addLinearPosition(lineString.positions());
        }
        return new MultiLineString(positionsBuilder.build());
    }
39660
function (data) {

                        var lines = data.match(/[^\r\n]+/g); //cut lines

                        return lines.map(function (line) {
                            try {
                                return JSON.parse(line);
                            } catch (e) {
                                return line;
                            }
                        });
                    }
1167304
public static @Nonnull JsonArray lineStringToPolygon(@Nonnull double[][] lineString) {
        JsonArray jsonJLineString = toJsonJLineString(lineString);
        if (lineString[0][0] != lineString[lineString.length - 1][0] || lineString[0][1] != lineString[lineString.length - 1][1]) {
            // add last coordinate to close the polygon
            jsonJLineString.add(array(lineString[0][0], lineString[0][1]));
        }
        JsonArray result = array();
        result.add(jsonJLineString);
        return result;
    }
577675
function() {
        var string;
        if (OpenLayers.Format && OpenLayers.Format.CQL) {
            string = OpenLayers.Format.CQL.prototype.write(this);
        } else {
            string = Object.prototype.toString.call(this);
        }
        return string;
    }
695185
function getPolylineJS() {
        $_output = '';
        foreach($this->_polylines as $polyline_id =>$_polyline) {
        	$_coords_output = "";
        	foreach($_polyline["coords"] as $_coords){
				if($_coords_output != ""){$_coords_output.=",";}
        		$_coords_output .= "
        		    new google.maps.LatLng(".$_coords["lat"].", ".$_coords["long"].")
        		";
        	}
        	$_output .= "
        	   polylineCoords".$this->map_id."[$polyline_id] = [".$_coords_output."];    	
			   polylines".$this->map_id."[$polyline_id] = new google.maps.Polyline({
				  path: polylineCoords".$this->map_id."[$polyline_id]
				  ".(($_polyline['color']!="")?", strokeColor: '".$_polyline['color']."'":"")."
				  ".(($_polyline['opacity']!=0)?", strokeOpacity: ".$_polyline['opacity']."":"")."
				  ".(($_polyline['weight']!=0)?", strokeWeight: ".$_polyline['weight']."":"")."
			  });			
			  polylines".$this->map_id."[$polyline_id].setMap(map".$this->map_id.");
        	";
			
			//Elevation profiles
			if(!empty($this->_elevation_polylines) && isset($this->_elevation_polylines[$polyline_id])){
				$elevation_dom_id=$this->_elevation_polylines[$polyline_id]["dom_id"];
				$width = $this->_elevation_polylines[$polyline_id]["width"];
				$height = $this->_elevation_polylines[$polyline_id]["height"];
				$samples = $this->_elevation_polylines[$polyline_id]["samples"];
				$focus_color = $this->_elevation_polylines[$polyline_id]["focus_color"];
				$_output .= "
					elevationPolylines".$this->map_id."[$polyline_id] = {
						'selector':'$elevation_dom_id',
						'chart': new google.visualization.ColumnChart(document.getElementById('$elevation_dom_id')),
						'service': new google.maps.ElevationService(),
						'width':$width,
						'height':$height,
						'focusColor':'$focus_color',
						'marker':null
					};
					elevationPolylines".$this->map_id."[$polyline_id]['service'].getElevationAlongPath({
						path: polylineCoords".$this->map_id."[$polyline_id],
						samples: $samples
					}, function(results,status){plotElevation(results,status, elevationPolylines".$this->map_id."[$polyline_id], map".$this->map_id.", elevationCharts".$this->map_id.");});
				";
			}
		}
        return $_output;
    }
1358384
public static @Nonnull JsonArray lineStringToPolygon(@Nonnull JsonArray lineString) {
        if(!lineString.first().equals(lineString.last())) {
            JsonElement e = lineString.first().deepClone();
            lineString.add(e);
        }
        return array(lineString);
    }
580896
public LineString toLineString(List<LatLng> latLngs, boolean hasZ,
                                   boolean hasM) {

        LineString lineString = new LineString(hasZ, hasM);

        populateLineString(lineString, latLngs);

        return lineString;
    }
285945
function validateGeoJson(geoJson) {
  if (!geoJson)
    throw new Error('No geojson passed');

  if (geoJson.type !== 'FeatureCollection' &&
    geoJson.type !== 'GeometryCollection' &&
    geoJson.type !== 'MultiLineString' &&
    geoJson.type !== 'LineString' &&
    geoJson.type !== 'Feature'
  )
    throw new Error(`Invalid input type '${geoJson.type}'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature`);
}
230655
public static LineString createLine(GeometryCollection points) throws SQLException {
        if(points == null) {
            return null;
        }
        final int size = points.getNumGeometries();
        if (!atLeastTwoPoints(points)) {
            throw new SQLException("At least two points are required to make a line.");
        }
        List<Coordinate> coordinateList = new LinkedList<Coordinate>();
        for (int i = 0; i < size; i++) {
            coordinateList.addAll(Arrays.asList(points.getGeometryN(i).getCoordinates()));
        }
        return points.getGeometryN(0).getFactory().createLineString(
                coordinateList.toArray(new Coordinate[size]));
    }
327452
public function jsonSerialize()
    {
        $linestrings = [];

        foreach ($this->linestrings as $linestring) {
            $linestrings[] = $linestring->jsonSerialize();
        }

        return new \GeoJson\Geometry\MultiLineString($linestrings);
    }
840321
function(str) {
            var line;
            var lines = OpenLayers.String.trim(str).split(this.regExes.parenComma);
            var components = [];
            for(var i=0, len=lines.length; i<len; ++i) {
                line = lines[i].replace(this.regExes.trimParens, '$1');
                components.push(this.parse.linestring.apply(this, [line]).geometry);
            }
            return new OpenLayers.Feature.Vector(
                new OpenLayers.Geometry.MultiLineString(components)
            );
        }
1192972
public static LineString createDummyLine() {
        Coordinate[] c = new Coordinate[]{new Coordinate(0.0, 0.0), new Coordinate(1.0, 1.0), new Coordinate(1.0, 0.0)};
        LineString lineString = gf().createLineString(c);
        return lineString;
    }