The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
18
votes
4answers
13k views

Finding centrelines from polygons in QGIS?

I was wondering if there is a way to create centre lines from polygons in QGIS? I have a polygon layer, but ideally need the centrelines as a separate file.
20
votes
6answers
33k 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 ...
7
votes
2answers
8k views

How do I find vector line bearing in QGIS or GRASS?

How can one extract the bearings from a set of lines in a vector file? I'm trying to find the bearings of several straight vector line segments (simplified contour lines, actually) and can't figure ...
10
votes
6answers
7k views

Get a point on a polyline from end points given distance along poly line

I have start point and end point of a polyline. How can I get a point on that polyline from end points specified by the given distance. How can I get this by using arcpy provided that this script ...
6
votes
2answers
12k views

Nearest distance between point layer and line layer, QGIS

I have two layers , line and point layer. I need to make a line layer which connects all points to nearest line features? Did someone make a plugin for qgis? This is very important tool which missing ...
15
votes
4answers
5k views

Elevation profile 10 km each side of a 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. I hope my question is clear. Thank you ...
9
votes
4answers
2k views

Creating polygon connecting endpoints of multiple lines using ArcPy?

I'm trying to figure out how to create a polygon that connects all the endpoints of a shapefile containing a set of polyilnes with pythonscript in ArcGIS, I'm having trouble doing this as the order of ...
14
votes
2answers
5k 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 ...
29
votes
2answers
54k views

Draw lines from points in QGIS

I have a point layer and need to draw a line passing through or in the vicinity of the points (up to 0.5m ditance between the point and the line). The nodes of the line will recieve the attributes of ...
7
votes
4answers
4k views

Unsplit/Dissolve multiple touching lines in Stream Network using ArcGIS Desktop?

I am trying to dissolve multiple lines for stream networks into individual features. The dataset contains many stream networks so a complete dissolve of the whole dataset wont do as I would like to ...
7
votes
1answer
1k views

Creating parallel line in ArcGIS Pro using ArcPy?

I want to create offset/parallel lines for my centre lines (over 12000 polylines) in different distance for each class number(i have numbers in column) and with the same line direction as centre line. ...
4
votes
2answers
7k views

Workflow for creating line features between two coordinate pairs in QGIS

I have a table of stream reaches with XY coordinates for their respective tops and bottoms. I'd like to convert the table to a feature, using the XY coordinates as the endpoints of the line. Any ...
12
votes
5answers
62k 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 ...
2
votes
4answers
3k views

Split multiple polylines by distance in ArcGIS

Is there a method to split thousands of polylines by employing a tool like the "Editor" - "Split" method and using distance, in ArcGIS? When I utilize the "split" - "distance" tool (fig1), it only ...
22
votes
2answers
6k views

How can I merge/collapse nearby and parallel road lines (eg. a dual-carriageway) into one single line?

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 ...
14
votes
6answers
5k 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 ...
11
votes
1answer
44k 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 ...
6
votes
1answer
2k views

Showing directional line symbol in ArcGIS for Desktop?

Is this possible in ArcGIS to have variable number of arrows on the line to show direction? This is an ArcGIS example, where I can have fixed (1,2,3,4,5...) number of arrows and it stays the same ...
13
votes
1answer
3k 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 ...
5
votes
4answers
8k views

Calculating X and Y of line start and line end using ArcPy?

I have a series of polyline shapefiles and I am trying to automate the process of calculating the X and Y coordinates of the line start and line end using Python. I have added the 4 fields (startx, ...
5
votes
1answer
4k views

Is it possible to convert Polygon to centerline linestring?

I have a Polygon which I want to convert to centerline linestring. IMAGE 1 I used the Vector to convert to Polyline but they are not center line as under: VECTOR TOOL IMAGE 2 Polyline created by ...
4
votes
2answers
4k views

How to assign node IDs to links in a network?

I have two shapefile layers in ArcGIS for Desktop 10. I have one line layer and node layer. My node layer(shp) has a "code_1" field and line layer has a "code_node" field. The intersection point ...
2
votes
2answers
4k views

Distance between points along polyline ArcGIS for Desktop?

I'm using ArcGIS 10.3 (Desktop), and I'm trying to measure the distance between points following a path determined by a set of polylines. Hand measurement is not a viable option-- there are ~7500 ...
2
votes
0answers
270 views

Connect two contour lines with calculated line length

Is it possible to make a plugin for QGIS like PEGGER for arcview 3.2? Problem is, how to make path over contour lines with a gradient in percent? Formula is: K= e*100/G*M ; K=10*100/0.08*10000=1.25m ...
14
votes
1answer
25k 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 free GIS ...
8
votes
1answer
3k 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, ...
1
vote
4answers
3k views

splitting a lines layer using points

I'm looking to accomplish a similar task to this thread: Splitting line at point positions using QGIS? Using QGIS and the Processing and GRASS toolboxes available, I'm looking to split a vector layer ...
10
votes
1answer
4k views

How to split a line into a 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 in fractions of its length. For example, I have a line 400 meters long, I want to split ...
2
votes
2answers
2k views

How to edit (particularly flip direction of) polyline obtained through UpdateCursor?

I want to flip the direction of a polyline feature obtained as a result of an Update query; e.g. lines= arcpy.UpdateCursor(myFeatureClass,myQuery) dsc= arcpy.Describe(myFeatureClass) try: for ln ...
20
votes
2answers
64k views

How to read a 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,...
21
votes
2answers
1k 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: Inkscape ...
6
votes
1answer
972 views

Filling a polygon with lines using Postgis

I need to calculate a specific distance in an area. The distance is calculated from parallel lines in a polygon, And I need to find out how many parallel lines (with x meters distance to each other) ...
12
votes
6answers
23k 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 ...
7
votes
3answers
547 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 ...
6
votes
1answer
268 views

How to get smallest line segments from intersection + difference of multiple overlapping lines?

Inspired by this question, and this excellent answer. I have multiple overlapping lines and want to extract the complete intersection of them. So from this sample data SELECT id, geom INTO stackex ...
3
votes
2answers
676 views

Create line heatmap with QGIS

I have loaded my bike tours as .gpx files into QGIS. It already looks quite nice but I was wondering if it might be possible to create something similar to the strava heatmap with tools of QGIS. I ...
7
votes
3answers
5k views

Drawing lines from two points in CSV using QGIS?

I have a CSV file where one line looks like this: Duration, user, lat-start, long-start, lat-end, long-end 298, Casual,38.9101,-77.0444,38.91554,-77.03818 Each row in the CSV has two points and I ...
7
votes
1answer
13k views

Calculating line segment lengths within polygon using ArcGIS Desktop?

I have a layer with line segments and a layer of polygons (in this case, buffers around points). I need to create a new field for each polygon that contains the total length of all line segments ...
3
votes
1answer
137 views

Line width and labels based on blended values of features sharing same geometry in QGIS

I want to appropriate line segments that share the same geometry with a particular line width and labels based on the aggregated values of one field "GIS@BUS_5_Min". My attribute table and polyline ...
2
votes
1answer
2k views

Getting First and Last Point coordinates of Polyline with Field Calculator in ArcGIS Desktop?

I'm trying to get the First Point coordinates (x,y) and Final Point coordinates (x2,y2) from a polyline in ArcGIS 10 with the Field calculator. I've added 4 (double) fields like StartX,StartY,EndX ...
13
votes
5answers
22k views

Convert a line to polygon

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 ...
7
votes
1answer
6k views

How can I add an arrow to a line?

I want to have arrow heads at the end of a number of lines. I add these through Line properties --> Line decorations. It looks nice and all when displayed in the legend: But in my map, due to ...
4
votes
2answers
7k views

Selecting features of vector layers based on another vector layer using QGIS?

I am using QGIS 2.12.2. I am using three vector layers (point, polyline and polygon shapefiles) of the region of interest. Any advice in making the selections from one dataset based on the other ...
3
votes
1answer
606 views

Extending lines to Points without altering original geometry using ArcMap?

Is there an efficient way to extend lines to points in ArcMap? I have a utilities dataset, where I do not want to change the original geometry, but instead add to it in order for end vertices of ...
2
votes
2answers
449 views

Fixed distance between two contours - Qgis 2.14.1

There is a possibility, when you select a contour line and give a fixed length of line, this line connects automatically to the next contour lines? I have two other questions on this subject but I do ...
1
vote
2answers
2k views

Get nearest line to point with v.distance in QGIS

I want to retrieve the nearest line to a point with the GRASS function v.distance(). But I think I do not fully understand how to use this function. What I have are two layers (in the same CRS -> EPSG:...
1
vote
1answer
1k views

Splitting lines with points while maintaining other dissolved lines?

I am on ArcGIS Desktop 10.2. I have a line feature class of a stream network. I also have a point feature class along the main stream (line) where a catchment enters that stream. I have dissolved my ...
11
votes
2answers
1k 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 ...
10
votes
1answer
5k 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 ...
12
votes
3answers
26k 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 ...