Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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)

18
votes
4answers
12k 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.
19
votes
6answers
31k 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
7k 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 ...
5
votes
2answers
10k views

Nearest distance between point layer and line layer, QGIS

I have two layers , line and point layer. I need to make line layer which connect all points to nearest line features? Is someone made a plugin for qgis? This is very important tool which missing in ...
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 ...
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 ...
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 ...
9
votes
4answers
2k views

How to create a polygon connecting the endpoints of multiple lines using python?

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 ...
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
2k 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
5k 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 ...
27
votes
2answers
49k 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
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. ...
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
2k 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 ...
6
votes
1answer
952 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) ...
11
votes
1answer
43k 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 ...
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
253 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
24k 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 ...
1
vote
3answers
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 ...
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 ...
16
votes
2answers
52k 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,...
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, ...
7
votes
3answers
296 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 ...
14
votes
6answers
23k views

How to Partition Line into Segments using ArcGIS for 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 further ...
6
votes
1answer
253 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 ...
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 ...
3
votes
2answers
547 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
1answer
12k 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 ...
6
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, ...
3
votes
1answer
116 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
1k 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 ...
7
votes
1answer
5k 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 ...
3
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 ...
2
votes
2answers
414 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
1k 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 ...
10
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 ...
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 ...
12
votes
3answers
24k 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 ...
8
votes
1answer
4k 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
4answers
5k 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, ...
11
votes
2answers
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 ...
9
votes
4answers
12k views

Checking "connectedness'' of line shapefile in ArcMap?

I inherited a line shapefile in ArcMap that is used to represent a road network. The problem is that the road network is pretty large and it is impossible for me to: Tell if the end of each line (...
9
votes
3answers
6k 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 ...