Questions tagged [line]

A set of ordered co-ordinates that represent the shape of geographic features too narrow to be displayed as an area at the given scale (contours, street centrelines, or streams), or linear features with no area (county boundary lines)

Filter by
Sorted by
Tagged with
63 votes
2 answers
160k views

Reading shapefile in Python

My question is an extension of Vertical lines in a polygon shapefile. Kindly refer to that question first. What you will see is a method of generating vertical lines with respect to the bounding box, ...
user avatar
  • 1,361
53 votes
8 answers
17k views

Switching line direction in QGIS

I would like to be able to swap the direction of a polyline/line in QGIS. I made a custom tool to do this in MapInfo, however I can't seem to find anything for QGIS. Does anyone know of a tool to do ...
user avatar
  • 33.8k
29 votes
4 answers
4k views

Drawing wavy/wiggly lines in QGIS

Is there a QGIS function or plugin to draw wiggly line? I have used "Spline Tool" to manually draw some waves, but it is time consuming. If possible, I would like to draw something like: ...
user avatar
  • 29.1k
25 votes
7 answers
54k views

Creating points in specified distance along line using QGIS?

I want to use QGIS creating points along the line, but in specified distance. I found two GRASS tools in SEXTANTE Toolbox: v.to.points v.segment I tried v.to.points, setting the maximum distance ...
user avatar
  • 1,485
25 votes
4 answers
48k views

Converting MultiLinestring to Linestring with PostGIS

I have a multiline string and want to convert it to a linestring in order to use some functions that only work with linestrings. I used ST_Dump() and got a collection of my geometries. If I merge them ...
user avatar
  • 887
23 votes
6 answers
47k views

Converting line to polygon using QGIS

I have a shapefile with city areas, but unfortunately the shapefile only contains single lines. The shapefile looks like this: I want to convert those lines to an area-polygon shapefile in QGIS. I ...
user avatar
23 votes
3 answers
7k views

Merging/collapsing nearby and parallel road lines (eg. a dual-carriageway) into one single line [closed]

I have a shapefile from OSM which contains all the roads within a city. Larger roads (like dual-carriageways) seem to have 2 parallel lines. I'd like to collapse / combine those into 1 line so I can ...
user avatar
  • 1,025
22 votes
3 answers
34k views

Adding Direction and Distance into attribute table in QGIS

I just want to add direction (Bearing: i.e N 25 35 E) and Distance (Length: 125 meters) as my new field in polyline/line data. Is there a Plugin to generate these fields? I tried to used Export/Add ...
user avatar
  • 306
22 votes
2 answers
49k views

Creating polygon layer from polyline layer in QGIS

Our systems expect polygon shapefiles, representing a collection of non-intersecting and geometrically valid (Multi)Polygons. Specifically, farm fields. We often receive our representations of farms ...
user avatar
  • 363
20 votes
7 answers
26k views

Retrieving start and end points for each line in line shapefile in ArcGIS Desktop or QGIS

I have a vector(polyline) shapefile and I need to retrieve each line´s start and end points(nodes) and create a shapefile with these points. Then I need to add to the polyline´s attribute table the ...
user avatar
  • 201
20 votes
5 answers
29k views

Nearest distance between point and line layers in QGIS

I have two layers, a line and a point layer. I need to make a line layer which connects all the points to the nearest line feature. How can I do that? Is there a plugin available for QGIS? This is a ...
user avatar
  • 2,197
19 votes
4 answers
26k views

What is unit of Shapely length attribute?

I'm doing a very simple calculation of the length of a Polyline using shapely: from shapely.geometry import LineString ... xy_list = [map(float, e) for e in xy_intm] line = LineString(xy_list) s = '%...
user avatar
  • 2,416
18 votes
4 answers
23k views

Getting geometry length in meters in PostGIS

In PostGIS, the ST_length() function returns the length of a LineString in some units, but not in meters. Is there a function like ST_Length() but in meters?
user avatar
18 votes
4 answers
3k views

Zigzag Line Symbol in QGIS

I'm looking for a zigzag line symbol in QGIS. Is there perhaps an easy way to do this that I'm missing? I have tried creating a marker line using a simple triangle marker (^) and adjusting the size of ...
user avatar
17 votes
5 answers
8k views

Create voronoi diagram from line segments

I'm looking for a way to create a voronoi diagram based on line segments instead of points. See the example below (taken from this presentation). Ideally I'd like something I can script from Python, ...
user avatar
16 votes
3 answers
20k views

Splitting all lines in layer at vertices using QGIS

I want to automatically split all lines in a QGIS layer at their vertices (like this). I've done a Google search and found this article, which is quite close but the workflow is complicated. Because I'...
user avatar
  • 1,866
16 votes
2 answers
3k views

Create "mean" line from multiple lines using QGIS

I have multiple lines features (also have them in multipoints...) representing similar path (mountain trails, in this case) with various GPS precision, resulting in many lines close to each other, but ...
user avatar
  • 161
15 votes
4 answers
6k views

Elevation profile 10 km each side of line

How can I get an elevation profile for a band of terrain? The highest elevation within 10 km (on each side of the defined line) should be taken into account.
user avatar
  • 161
15 votes
6 answers
8k views

Convert line shapefile to raster, value=total length of lines within cell

I have a line shapefile representing a road network. I wish to rasterize this data, with the resulting values in the raster showing the total length of the lines that fall within the raster cell. The ...
user avatar
  • 1,640
15 votes
1 answer
34k views

Cut polygon shapefile by line shapefile

I have two shapefiles, a polygon shapefile (lake) and a line shapefile (boudary) I want to create a new shapefile "polygon to the north of the boundary" What tool can I use in QGIS or other ...
user avatar
  • 1,280
15 votes
2 answers
3k views

Getting the length of line inside polygon

How can I get the length (brown marked part) of the "Road 7" inside the red polygon? My start: SELECT ST_Length(way) FROM lines WHERE road = "Road 7" AND ST_Intersects(line, ...
user avatar
  • 533
14 votes
2 answers
6k views

Showing which way line features are oriented in QGIS?

I'm working on QGIS on a street shp file which has Left From, Left To, Right From, Right To fields fields, building a geocoder. I need to know which way these features are oriented, which I think is ...
user avatar
14 votes
3 answers
13k views

Creating centerline of river in QGIS? [duplicate]

I made two river bank lines and I want to associate them. I want to make a centerline using two rows as a base. I managed to make the centre line with a lot of work creating several lines from one ...
user avatar
14 votes
1 answer
13k views

Creating dashed lines in OpenLayers 3

I know Line dash not working OL3 (Openlayers 3) has been asked earlier but the solution proposed is not working. My code is : var calculateStyle = new ol.style.Style({ fill: new ol.style.Fill({ ...
user avatar
  • 345
14 votes
1 answer
4k views

How can I transform polylines into points every n metres in PostGIS?

Question in pretty much the same as this, but I need to use PostGIS. I have a number of polylines, and want to trasform them into points every n metres along these lines. edit: Thanks a lot to ...
user avatar
  • 2,304
14 votes
2 answers
6k views

Moving points onto lines (~neighborhood)

I do have two vector layer, of which one is a point layer based on "events" by remote sensing and the second one is a line layer from local research. In my case these are earthquakes and tectonic ...
user avatar
14 votes
3 answers
22k views

How to split lines on vertex?

I've searched a lot but didn't find an answer: When editing lines with QGIS, I often need to split a linestring exactly on one of his existing internal vertices, but I can't find a way. I've tried the ...
user avatar
  • 141
14 votes
1 answer
8k views

Interactive and dynamic map with wind data in R leaflet?

I have some data like this : longitude latitude speed direction 1 6.10722222 46.23639 4 360 2 6.95416667 43.54694 4 360 3 7....
user avatar
  • 763
13 votes
3 answers
39k views

Extract Raster from Raster using Polygon shapefile in R

I am new to R and using the raster package. I have a problem extracting polygons from an existing raster file. If I use extract(raster, poly_shape) function on the raster it always creates a list ...
user avatar
  • 2,122
13 votes
1 answer
7k views

Intersecting lines to get crossings using Python with QGIS?

I have a set of lines representing bus lines. Some of the lines are overlapping and take the same roads. I am able to extract the nodes. However I am interested in extracting only crossings like ...
user avatar
  • 7,644
13 votes
6 answers
25k views

Partitioning Line into Segments using ArcGIS Desktop?

I have a shapefile of U.S. states. I extracted the boundary between two states, resulting in a line segment. For example, the boundary between Georgia and North Carolina. Is there a way to ...
user avatar
13 votes
2 answers
5k views

Automated creation of perpendicular lines between a point layer and a line layer

I am using QGIS and I am looking for a script, or a plugin, that can create a large number of perpendicular lines from a point layer to lines in a separate line layer. So far, I've tried to use the ...
user avatar
  • 155
13 votes
1 answer
7k views

Creating line from points using PostGIS?

I have a PostGIS table with position data of numerous vehicles and want to create lines from these points. Data can be selected by vehicle id and ordered by timestamp but how to create lines from ...
user avatar
13 votes
4 answers
9k views

Splitting lines into equal segments with QGIS

I'm attempting to split a curved (wiggle) line into equal length segments. Have used Grass's v.split which works to a degree but does not provide the output I'm after. v.split will extract segmented ...
user avatar
  • 456
12 votes
4 answers
6k views

In PostGIS: how to split linestrings into their individual segments?

I have one table with many linestrings and I want to make a new table containing the individual segments of all the linestrings, no matter if they are grouped line per line or not. This is my table, ...
user avatar
12 votes
3 answers
5k views

Perpendicular lines on line using QGIS

I am using QGIS. I want to create perpendicular Lines on another Line (River). The Lines should be created on points on the Line and should have a length of 40 Meters. I want to create the red lines ...
user avatar
12 votes
5 answers
64k views

Creating polygons from lines using ArcEditor/Standard level license of ArcGIS Desktop?

I am trying to create polygons from a line layer of lots and concessions (large blocks of land in rural areas). The lines are mainly grid style as they intersect mostly at right angles. I need to ...
user avatar
  • 891
12 votes
3 answers
14k views

Making lines curvy in QGIS

In QGIS I am working on a map with lines connecting locations created with the MMQGIS plugin. Is there an easy way to make those direct lines somewhat curvy for aesthetic purposes? I'm trying to ...
user avatar
  • 207
12 votes
2 answers
46k views

Calculating elevation profile for a polyline in ArcGIS 10?

My elevation data is a floating point tif. I have a road for which I need to calculate the elevation profile, but I can't see the tools to do this. Can I do this with ArcGIS, with spatial analyst/3D ...
user avatar
12 votes
3 answers
8k views

Extending line by specified distance in ArcGIS for Desktop?

I have a purely aesthetic layer which has arrow symbols. Some aren't showing up right because the line is too small. I have selected maybe 50 records where I need to extend this line by a given number ...
user avatar
  • 3,568
12 votes
2 answers
520 views

Aggregate Lines Based on Distance between Segments

I have a VectorTile basemap that I am optimizing, (working on reducing the size of individual tiles), the major chunk of tile size is road data (geometry and attributes). I am working on simplifying ...
user avatar
12 votes
2 answers
6k views

Is there a way to split polygons by several lines in QGIS?

I have a polygon (.shp) and a line (.shp) layer. I want to split the polygon in several pieces along the lines that overlap the polygon. Afterwards I want to edit each polygon separately (attribute ...
user avatar
  • 121
11 votes
5 answers
5k views

Measuring straightness of a curve segment (represented as a polyline)

I'm working on an automatic elevation contour labeling algorithm and one of the factors that I want to take into account when deciding the positions of labels is how "straight" a particular segment of ...
user avatar
  • 3,618
11 votes
4 answers
14k views

Which style options are available for polylines in Leaflet?

I added a polyline layer as GeoJSON within Leaflet and want to style it. The following options to set the style I could find (and which work) are: color weight opacity What are other available ...
user avatar
  • 853
11 votes
2 answers
3k views

Creating random points along polyline in QGIS?

I am trying to create random points along a polyline shapefile in QGIS. Basically, like the 'random points' tool in 'research tools' but for polylines instead of polygons. I have tried converting ...
user avatar
  • 113
11 votes
1 answer
499 views

Creating symbol for "Great Wall of China" in QGIS

I wanted to create a symbol like this (see screenshots below(first and second: white circle)), the shape of these symbols are different, some of them are a straight line, some of them are curved. How ...
user avatar
  • 487
11 votes
2 answers
7k views

How to split line into specific number of parts?

I've seen a lot of questions involving splitting a line with the help of a point layer. I want to split a line into fractions of its length. For example, I have a line 400 meters long, I want to ...
user avatar
  • 333
11 votes
2 answers
2k views

Creating line (closest vertex to line) using ArcGIS Desktop?

I'm using ArcInfo 10 SP3. I am working in reorganising our utility data. Two years ago, we have started collecting Private Service water line. We still have a lot of them to extract from old ...
user avatar
  • 884
11 votes
2 answers
29k views

How to set dashed line on Leaflet?

Line style in leaflet always are solid ,I want the line to be -1)Dashed line style -2)Train line style var L2 = new L.geoJson(L2, { style: function(feature) { return { color: '...
user avatar
  • 1,084
11 votes
6 answers
3k views

Cutting line feature by the nearest point in QGIS

I got a line shapefile and a point shapefile (or a CSV file containing coordinates of the point), and I want to clip this line feature by those point in the 'nearest' way. So far, I have always used ...
user avatar
  • 1,485

1
2 3 4 5
36