Skip to main content

Questions tagged [polyline-creation]

Used for questions about making polyline features

Filter by
Sorted by
Tagged with
4 votes
2 answers
1k views

Decode Google Polylines in JS

I am a complete novice at coding and am trying to return a decoded polyline in array of (lat;lng) from an encoded polyline string. I found a similar post here Converting encoded polylines into GeoJSON ...
5 votes
1 answer
1k views

Calculating the shortest path between two points and inserting the line result as feature in layer in QGIS

I try to make a script to find the shortest path between two bridges in a network. The goal is to get after each calculation a line that I insert as an entity in a predefined layer. For now, I do well ...
5 votes
2 answers
310 views

Splitting lines into segments without creating new layer in QGIS

How to split line objects into segments/multiple objects based on either polygons or lines without creating a new layer? The problem is clarified in the picture below. I need the green line to be ...
2 votes
1 answer
106 views

Using make_line between points in QGIS Geometry Generator

I'm having difficulty with the geometry generator. Here is my very basic code: make_line( geometry(get_feature('New_scratch_layer_f7ec7875_1bec_46b6_84dd_46bca8f2d978', 'name', 'a')), ...
7 votes
1 answer
1k views

Creating polyline from list of QgsPoints using PyQGIS

So I have a CSV of points that I've cleaned up using pandas, and appended to a list with each item being Type: QgsPoint, with its correct X and Y coordinate. I'm trying to find the correct operation ...
4 votes
2 answers
78 views

Calculating closest point referenced to centroid in QGIS

I have a QGIS project in which I work with a polygon layer ('POLIGONS_TEST') and a point layer ('PUNTS_TEST'). I use the following Geometry Generator expression on the 'POLIGONS_TEST' layer to draw a ...
3 votes
1 answer
94 views

Drawing line defined by start and end points within attribute table in QGIS

I am creating a map with multiple labels. For these, I am using Points with Symbols because I have to be able to control the placement very strictly. I would like to add attribute fields to the Point ...
7 votes
5 answers
1k views

Keeping only internal borders in QGIS

I'm looking for the QGIS equivalent of TopoJSON's mesh function which goes through a vector layer and only keeps borders that are shared between multiple features. Here's an example of the output -- ...
3 votes
2 answers
164 views

Drawing routes (on road shapefile) between X,Y coordinates in QGIS

I've got a column with 300 of start points and 300 of end points (X,Y coordinates for each point). I now want each row in the column to connect with each other (e.g. X,Y Coordinate for Start Point, ...
3 votes
1 answer
1k views

Drawing polyline with user input points in QGIS using Python

I have an empty layer in QGIS in that i just want to draw a polyline by selecting points on layer using Python. For example, if I select a start point and endpoint on a layer, I want to draw a line ...
2 votes
2 answers
123 views

Converting polygons to lines that are split depending on borders being shared in QGIS

I have a file containing polygons that delineate the boundaries of municipalities within a specific region. I want to convert the polygon boundaries to lines. The resulting lines should be split ...
4 votes
1 answer
1k 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
1 answer
13k views

Remove a Drawn Polyline from LeafLet Map

How can I simply just remove this polyline from the map? var pointA = L.latLng(From.lat, From.lng); var pointB = L.latLng(To.lat, To.lng); var pointList = [pointA, pointB]; var st_line ...
1 vote
1 answer
180 views

Automatic Vectorisation in ArcGIS

Is there any method or tool/model for ArcGIS to draw automatic line based upon raster data values. E.g i have a DEM and i want to automatically generate a line feature passing through all those pixels ...
0 votes
0 answers
85 views

Merge multiple tracklogs or route points to one polyline

I'm having a similar case like the one posted Tracklogs to single line OR several lines to one line?. However what differs in my question here is that I want to display the merged or common shared ...
2 votes
1 answer
117 views

Creating tangential lines at points along shoreline in QGIS

I want to create tangential lines for each point along a shoreline in QGIS, such as the dashed line I've hand-drawn. These points are not randomly spaced, they each represent the angle at which each ...
1 vote
1 answer
41 views

Geometry still set as point when creating lines in QGIS Geometry Generator

I'm using QGIS to analyze coastal erosion and have come across an issue with geometry type. I have a vector layer of about 150 control points along the shoreline and used a geometry generator to ...
27 votes
6 answers
43k 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 ...
0 votes
0 answers
45 views

Calculating Length of Polylines in Miles Based on Individual Point Features

I am using ArcMap 10.8. I may be trying to do too much in one query, but I'm hoping there is a way to do what I'm trying to do without repeating the process 1,657 times. I am trying to analyze the ...
5 votes
5 answers
1k views

Creating line layer from point layer with start and end attributes in QGIS

I have a CSV file that contains attributes for a start node and end node of a pipe in a single record. This is data collected in the field, so the inspector captures the lat/long at each end of the ...
5 votes
2 answers
943 views

Connecting points to line segments along path in QGIS

I have a set of points that fall along a trail, as in this image: and I need to convert these points to line segments. The points fall along a polyline, and points on the same line share a common ID &...
1 vote
1 answer
189 views

Creating radial lines from center of polygon to edge in QGIS

I have a set of polygons for which I need 16 radial lines each from the centroid of the polygon to the edge (see image). So far I have only found a python script to create radial points for a circle (...
3 votes
1 answer
659 views

How to get the centerline of a polygon without artefacts in Python?

I am using Python to obtain the central line of a polygon (blue line) which represents the contour of a road (red line). To do so, I have used the Centerline library as shown below: from centerline....
8 votes
1 answer
272 views

Connecting dynamically the 8 nearest lines to @map_extent_center in QGIS

Starting from a points geometry layer, I am working on the following function that has the goal of drawing 8 nearest lines to the @map_extent_center of the map view: make_line( $geometry, @...
3 votes
3 answers
907 views

Building the shortest path between two points inside polygon using QGIS

With QGIS I need to build the shortest route between two points inside a polygon. I have a vector polygon layer and I need to build a path inside it from the starting point to the ending point. How ...
2 votes
0 answers
59 views

Building route on defined graph of roads with intermediate stops in QGIS

I have a layer with stops of public ground transportation routes. I also have a layer with a graph of roads where public transportation can go. I need to build a route from the first to the last ...
6 votes
4 answers
2k 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 ...
8 votes
6 answers
3k views

Creating all possible line segments between all points using QGIS

I want to connect all points in a point feature with every possible line segment using QGIS. For example, how a pentagon has five points with ten line segments connecting them all to form a pentagram ...
2 votes
3 answers
690 views

Connecting thousand of points in QGIS

I have thousands of points generated along river channels. I am trying to connect these points based on distance. Furthermore, I tried "Join attributes by nearest Points" and "Geometry ...
5 votes
1 answer
3k views

Creating line layer with features using PyQGIS

In QGIS GUI, a line feature is created using this icon How to create a line with a fixed distance from a vector layer using PyQGIS. This my example: from qgis.core import * from qgis.PyQt.QtCore ...
6 votes
1 answer
198 views

Drawing an arc with length proportional to a distance in QGIS

From two points layers: 'ORIGIN' → Origin point at coordinate 0,0 'CLUSTERS' → Points identified by cluster with field "CLUSTER_ID" I am drawing a line from each point in the 'CLUSTERS' ...
3 votes
1 answer
1k views

Using points2one plugin in QGIS

I downloaded the points2one plugin and tried many times to connect points to a line, but it never worked. Is there something that I set wrong? I tried the answer, but it has been running for 10 ...
3 votes
2 answers
252 views

Recreating the shape of curved arrows with QGIS Geometry Generator

In QGIS, I have a line layer with straight lines, consisting only of two vertices: start- end endpoint. I can now use Geometry Generator (see below for the expression I use) to create a third point in ...
6 votes
1 answer
122 views

Drawing 10 nearest lines from each point connecting to the centroid of the 5 points nearest to each point with QGIS expression

Starting from a layer with point geometry, my goal is to do two calculations in one Geometry Generator expression. First, for each point, I would like to calculate the centroid for the 5 points ...
8 votes
2 answers
2k views

Building the shortest route through all points in QGIS

How to build the shortest route through all selected points, starting from a given point? Which plugin to use? There is a point layer and a linear layer for all routes between points.
5 votes
1 answer
146 views

Joining point data in chronological order using timestamp in QGIS

I have a data set which gives me the location of livestock every 30 minutes over months. I want to join these points to show the path travelled by individual animals. I have a unique ID for each ...
4 votes
2 answers
2k views

Connecting two nodes with line to close segment in QGIS

I have a line that I drew where the ends are not connected. I now want to select the two end nodes and hit a button to have QGIS connect them with a line segment. How do I do this?
53 votes
8 answers
19k 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 ...
4 votes
1 answer
205 views

Creating horizontal lines connecting points using QGIS Geometry generator

I am using the geometry generator to learn how to generate vectors using expressions. Currently, I have a point vector, and I would like to create horizontal lines (shown in red: manually drawn) ...
3 votes
1 answer
303 views

Adding vectors (segments) connecting pairs of points from CSV file in QGIS [duplicate]

a) Given: In QGIS 3.28 I have two sets of points: Points M and Points N (See embedded image), given by their coordinates in a CSV file. b) Required: A set of vectors (or segments) connecting the pairs ...
3 votes
2 answers
402 views

Generating lines at the end of each measurement with plugin in QGIS

It would be very useful to have a tool like this when measuring and even more useful to generate lines at the end of the operation. I use this plugin which is part of a small GIS program (Map Maker 3....
0 votes
0 answers
92 views

Unable to convert raster to polyline

I'm having trouble successfully converting a raster to a polyline feature in ArcGIS Pro. My ultimate goal is to take the values from a raster image and join them to a line layer so that I can ...
8 votes
4 answers
1k views

Joining lines when direction is not known

I am struggling with this problem: I have a polyline made up of several segments. Each segment is made up of points, each point identified in 3D space by coordinates and elevation. Together, if ...
41 votes
6 answers
126k views

Drawing 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 distance between the point and the line). The nodes of the line will receive the attributes of ...
5 votes
2 answers
225 views

Ordering points when making line in QGIS Virtual Layer

I've got a QGIS point geometry layer with four point features and a numeric field sequence. I want to create a virtual layer joining these points into a line geometry layer (which will have one ...
25 votes
6 answers
74k views

Converting polyline to polygon in 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 ...
14 votes
4 answers
5k views

Calculating line with the longest distance inside polygon in QGIS

I want to calculate the "diameter" of polygons in QGIS. The "diameter" is defined as the distance between the two most distant points of the polygon. I couldn't find a fitting ...
1 vote
0 answers
73 views

Creating line inside polygon using QGIS

I do have polygons in different shapes, most of them squeezed. How can I create one line inside each polygon, along? I have checked it in QGIS but could not find a way to do it. I have tried to create ...
6 votes
1 answer
266 views

Creating feature from multiple LineStrings using PyQGIS

I am trying to create a closed LineString made of a number of CircularSrings, but have got stuck. I cannot see how to add the geometry from both strings. This is what I have so far. QGIS version 3.4....
2 votes
1 answer
60 views

Merging polylines to next one in QGIS

I'm working with QGIS and I'm not super familiar with that. I created a Shapefile with several polylines. In some cases, my polylines do not match each other directly. For further proceedings, I would ...

1
2 3 4 5
7