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
7
votes
3answers
2k views

Split a line when it crosses a polygon in R

This should be a simple problem but I can't seem to find a solution. I have a line which crosses several polygons and I want to split it into multiple lines at the intersection of each polygon using ...
2
votes
1answer
1k views

Converting XML to polyline shapefile?

I want to convert this XML file to a polyline shapefile. <?xml version="1.0" encoding="utf-8" standalone="yes"?> <ci nc="BMSKDMA10" nl="BMskDMA10" mt="6" ct="DM" dtt="17342" dtu="15/01/2016 ...
2
votes
1answer
34 views

Removing overlapping sf lines in R

I have sfc LINESTRING and I would like to remove overlapping lines. Object data was created from an algorithm that joins lines with minimum distance. Using unique will not remove the initial lines. ...
1
vote
1answer
4k views

How can I manually cut existing polylines at a point of my choosing in MapInfo?

I want to edit polylines so that only the part of the polylines that fall within a certain area are remaining. SQL queries highlight the whole polyline if it falls within the desired area and hence ...
23
votes
7answers
42k 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 ...
0
votes
1answer
35 views

QGIS- Missing measure line box/point during editing

I've just updated my QGIS 3.4.4 to QGIS 3.10.8 and now I cannot measure distance and place point on measured distance. As soon as I click on to editing/adding point the measure tool box and line/point ...
4
votes
1answer
84 views

Splitting self-overlapping lines with points using PostGIS

I have a line geometry that partially overlaps itself (think about a line going A -> B -> C -> B -> D) and a set of points (not on the line but close to it) that I want to use to split the line in ...
2
votes
2answers
60 views

Creating gap in polyline using QGIS

I have a polyline that I need to make some gaps in at some locations, by cutting this part inside the red box, and leaving a gap in this particular location for instance. How can I do that in QGIS?
4
votes
1answer
116 views

Finding points along line closest to known point

I'm working on a TV graphics system which will be used on a broadcast from train ride. With this system I want to automatically be able to list interesting POIs along our route. We have a large ...
1
vote
1answer
36 views

Nearest Neighbor Two Point Tables Return Line Geometry

I am looking to find the nearest neighbor between two point tables in PostGIS and return the ids of both along with the line geometry. I have been able to determine the distance for the nearest ...
1
vote
0answers
2k views

Converting raster to line vector layer

I would like to convert all values having the value 1 in a binary raster to a line vector layer. The following image shows the binary raster (1=white and 0=black): The optimal output would look like ...
1
vote
1answer
24 views

Create lines of based on same ID points

I have an excel file containing coordinates of taxi positions which I would like to turn into lines in QGIS. The example data are as follows no trj_id lat lng 1 10162 -6.32044 ...
1
vote
0answers
39 views

How to automatically align a line with a grid

I have a line layer (orange line in image below) that I need to snap/align with an underlying grid (light blue lines below). The desired result would be something like the purple line. I have already ...
0
votes
1answer
26 views

How to interpolate sf LINESTRING to another pre-defined grid?

I have a set of sf lines, which on an irregular grid, in other words, they have random coordinates. Is there any way to interpolate LINESTRING coordinates to a regualr grid for example as defined ...
1
vote
0answers
32 views

What format is this list of times, lats and lons?

I have a bunch of strings from an XML file of a sailboat race (the Volvo Ocean Race 2011-2012). The XML file was consumed by an old flash app which I no longer have access to. I am 90% sure the ...
6
votes
1answer
619 views

Creating perpendicular line transects in PostGIS

I have a river network (Line with arrow as shown in image below) and I need to create perpendicular lines to the river at every 15 meters as you walk along it (see image below). Is there a function in ...
3
votes
2answers
552 views

QGIS “Sum Line Lengths” return 'nan.'

I have a polygon shapefile and a (merged) line shapefile (both are zipped). When I use Vector -> Analysis Tools -> Sum Line Lengths on these shapefiles, I get a layer with some of the LENGTHS filled ...
2
votes
1answer
49 views

Subtracting line features in QGIS

Doing network analysis in QGIS. This is where I came from: Start situation: + 600 points with fid and 1 relevant attribute. Also road network data. First step: ran "network tools - service area (...
3
votes
1answer
51 views

Custom QGIS linestyle expression function won't work with MultiLineStrings

After my experiences with a custom Python linestyle expression function (Wavy Edge on polygon in QGIS using geometry generators) I modified the code to support Polygons with holes, MultiPolygons and ...
2
votes
0answers
53 views

How to calculate area of a double-line road network in QGIS?

I have a line vector file that displays a road network. Most roads consist of a double-line indicating the sides of the road (hence the width of individual segments), but some roads are indicated by a ...
1
vote
0answers
29 views

Clipping line with overlaying line in QGIS

I have two layers of line which overlap as seen in the picture. I would like to cut out the first picture with the other as an overlap and then merge them together to get one single layer. Or is there ...
2
votes
1answer
107 views

Interpolating point on each line from vertex in QGIS

How can I interpolate a point on each line from the vertex? I need to interpolate each vertex along the line for a certain distance. I need offset on all lines. Standard QGIS tools shift incorrectly ...
1
vote
0answers
16 views

Collision analysis with line diameter in QGIS

I have some lines representing pipes. They have Z value in the attribute. I need to check if they collide with each other. So I want to know where they intersect/collide in height. I was wondering if ...
12
votes
4answers
15k 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'...
13
votes
3answers
14k 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 ...
0
votes
3answers
28 views

Separate boundary from adjacent polygons [closed]

I have a list of polygon features that share a common boundary. Is it possible to extract that line somehow? I am thinking about making a spatial join that shows me polygons that share a line segment, ...
3
votes
1answer
86 views

Merging touching lines in QGIS

I have a vector layer, in which structures (pipes under roads) are made up of multiple lines. I wish to spatially join all the lines that make up a single structure, but cannot figure out a way to do ...
4
votes
1answer
70 views

Calculating common length of two lines using ArcGIS Desktop

I have a shapefile that consists of around 800 different lines. Now I have another shapefile which also consists line data. Is there a method which can help me calculate the shared length in the ...
9
votes
2answers
4k 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, ...
19
votes
4answers
38k 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 ...
1
vote
1answer
93 views

Calculating length of polyline defined by list of coordinates using Python

I have a list of coordinates, knowing that I am working using EPSG:4326 and using Python I would like to calculate the length in kilometres of the polyline defined by these coordinates. Coords = [(0.0,...
0
votes
1answer
27 views

Extending lines using ArcGIS Pro

I am using ArcGIS Pro 2.6.1. I have massive map of roads in multiple road files. I need to extend lines to their intersect point. Intersect tool does not seem to work to my satisfaction. Any other ...
1
vote
1answer
33 views

Elevation lines label positions (select manually?) in QGIS

I have a layer of elevation lines in QGIS. Now I want to create a map that shows a certain extent of this layer and shows the labels for certain lines (ideally once for every line). So far, this isn't ...
2
votes
2answers
140 views

Merging two isolines into one in PostGIS

How can I sum two isolines A and B (closed linestrings with values) into one isoline C with summed values on common parts? For each line string there is a value and I would like to sum on common part. ...
2
votes
1answer
45 views

Creating lines from raw survey data in CSV-file

I work for a survey company and we convert our raw survey data into a GIS format our clients can use and have used MapInfo in the past to achieve basic shapes our clients can use. I start with 2 CSV ...
1
vote
1answer
540 views

Python: Open a (line) shapefile and calculate distance to point given as a longitude-latitude tuple

I have a Pandas dataframe in Python with longitude and latitude values of certain locations (see sample below): Index Long Lat 0 -98.58 ...
3
votes
2answers
181 views

PostGIS functions for generating centerline from polygon

I want to create a centerline from a polygon and I have tried using both ST_StraightSkeleton and ST_ApproximateMedialAxis functions in PostGIS. It gives an error with a message straight skeleton of ...
1
vote
1answer
32 views

QGIS Sum Line Length Problem: Values 'nan'. Road length in Grid

I wanted to use the QGIS function 'Sum Line Length' to compute the sum of the road lengths in each grid cell in Nigeria. My roads data is from here: https://data.humdata.org/dataset/nigeria-roads My ...
7
votes
0answers
1k views

Joining segments of a line in QGIS?

I have lots of different lines composed of hundreds of segments in a Shapefile. I would like to join them spatially where every start (or end) point of a segment correspond exactly (or within a range ...
33
votes
2answers
95k 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,...
1
vote
1answer
40 views

How do I split the lines of two polygons that are stuck together?

When using the tool to move/delete/add points, all the lines (from multiple polygons) connected to a point move at the same time. Though sometimes this is prefered, there are times I want to move the ...
2
votes
1answer
286 views

Split a polylines according to a specific point in R

I have 2 distinct spatial objects: on one hand I have a SpatialLinesDataFrame on the other hand I have a SpatialPointsDataFrame Considering one line and one point that intersects that line, I ...
2
votes
7answers
8k views

Exporting xy-coordinates from line segment

I need an export of xy-coordinates of line segments in QGIS. I found an answer to a similar question here but that concerned only xy of the first and last vertex of a line segment. But I need the ...
2
votes
1answer
2k views

Exporting xy-coordinates from geodata

I want to get real line segment dataset to do an experiment. So I searched it, and found the site that includes the real data: http://www.wsdot.wa.gov/mapsdata/geodatacatalog/ From this, I downloaded ...
0
votes
0answers
34 views

Polyline node order

I was looking for a tool/mechanism for determining node order in a polyline shapefile. For this exercise, node order would be the number of polylines attached to each node. A dangling node would be ...
1
vote
1answer
29 views

Setting proper rendering order because offset causes odd corners for lines

I used offset on these lines that are on top of each other. How can I make it so the red line is not interrupted by the orange? I can put the orange under the red, but there is another corner where ...
1
vote
1answer
314 views

Count number of points on a line in R

I have a SpatialLinesDataFrame and a SpatialPointsDataFrame. I want to calculate the number of points that fall on a line by a specific field in the lines data frame. Example: I have a river network ...
1
vote
1answer
36 views

Getting latitude and longitude of lines in attribute table using PyQGIS

I have a road network in form of lines. I retreived the Lat/Long using field calculter in QGIS. The method I used was: long: x(centroid($geometry)), for lat y(centroid($geometry)) However, i want to ...
1
vote
1answer
26 views

Display connections between points in QGIS interactively

I have a layer (pointLayer) with point features: Fields: ID, toID. All points have a value in ID, some have a value in toID. If a point "A" has a value in toID, I want to display a line ...
4
votes
1answer
39 views

Applying offset to lines that are on top of each other, result like metro map [duplicate]

As you can see from my picture there are a lot of places where the same lines run on top of each other. Imagine a tram map. How can I make sure that the ones that are behind are visible too? Just ...

1
2 3 4 5
29