Questions tagged [linestring]

A sequence of point coordinates referring to the line segments connecting them, as used to represent a one-dimensional feature or object.

Filter by
Sorted by
Tagged with
1 vote
0 answers
17 views

QGIS autoadjust the line to another existing line nearby

I have the line created by the "Point to path" function. The algorithm produces just a straight line, whereas I would like to have this line auto-adjusted to the other line (or buffer) which ...
user avatar
  • 3,594
2 votes
1 answer
26 views

"One or more line ignored due to geometry not having a minimum of three vertices" error when "Line to Polygon" in QGIS

Converting "Line to Polygons" using geometry tools in Vector could not be executed results shows this picture How to solve this issues?
user avatar
0 votes
1 answer
22 views

Buffering polygons with Oracle Spatial 11 vs. 19

Does anyone have special knowledge about Oracle Spatial? I buffered polygons in Oracle-11 Database by making them slightly smaller (-50cm). The geometries are then delivered via a WFS as GML. With ...
user avatar
  • 1
1 vote
0 answers
33 views

Shapely intersection between LineString and multiple Polygons

I am trying to get a function to return True when a LineString intersects with any polygon in a list of polygons. Currently, I am using a for loop to iterate through all the polygons and check one by ...
user avatar
4 votes
1 answer
40 views

PostGIS ST_Intersection with interpolated M value

I have a polygon and a GPS Trace (incl timestamps in the M dimension) zig-zagging across the polygon. I want to find the time intervals whenever the GPS trace entered and exited the polygon, which can ...
user avatar
2 votes
1 answer
25 views

How to insert a coordinate into an LineString at a specific index

I have a LineString: [ [ -122.263923, 37.87459 ], [ -122.263942, 37.874587 ], [ -122.264151, 37.874534 ], [ -122.264231, 37.874511 ], [ -122.264285, 37.874495 ],...
user avatar
  • 23
0 votes
0 answers
11 views

Point features do not emerge after applying st_intersection on two line features

The aim is to create a point at each intersection of roads via st_intersection. Before applying the function st_intersection, I dissolve the line features based on the road number (via ref). The ...
user avatar
0 votes
1 answer
46 views

How to find maximum value on raster transect (between 2 points) in pyQGIS?

I have a raster layer and 2 points with their coordinates, and I want to find the maximum raster value on the line between these 2 points. Is there a built-in function in PyQGIS to find the pixel with ...
user avatar
  • 319
0 votes
1 answer
57 views

Create point feature at line intersection and split lines - R [closed]

I have a shapefile that shows all the roads in Germany. Hereby, I want to create a point at each intersection of lines. Based on this created point, I can split the line into separate line features. ...
user avatar
1 vote
2 answers
80 views

Exploding LineString into segments using Shapely

I am trying to find explode lines tool in QGIS equivalent in shapely or geopandas (which uses shapely anyway). does anyone know this? note that geopandas.GeoDataFrame.explode() does not work because ...
user avatar
  • 622
0 votes
1 answer
40 views

Save simple WMS as WFS layer

I wonder if there is an easy way to transfer my WMS files to shapefiles/WFS. With satellite images I understand it isn't so easy to do this in an accurate way, but perhaps with my layers it is. What I'...
user avatar
2 votes
1 answer
57 views

ST_Difference drops M values: How to subtract line segments

In PostGIS, I have a LINESTRING M and I want to remove a segment of the line that falls between two given M values. I tried the following: SELECT ST_AsText(line) as line, ST_AsText(...
user avatar
1 vote
1 answer
125 views

Replace MultiPoint, GeometryCollection & LineString geometries in shapefile with Point geometries [closed]

I have a geopandas dataframe that contains shapely MultiPoint, LineString, GeometryCollection and Point geometries. Cannot save the the geopandas because of this neither perform other operations (...
user avatar
  • 153
3 votes
1 answer
73 views

Extract river nodes from linestring [closed]

I want to extract the coordinates of river confluences. I have a shapefile of rivers in a watershed. I want to get the coordinates of each point where a river joins another. import geopandas as gpd ...
user avatar
  • 153
2 votes
1 answer
72 views

Splitting line on intersection to another line using Shapely

I'm finding a solution for split a LineString on intersection to another LineString. My first solution is: from shapely import wkt from shapely.ops import split first_line = wkt.loads('LINESTRING (28....
user avatar
3 votes
1 answer
36 views

How to remove Topology Checker red dots?

How do I remove red dots created by topology checker? I was trying to check for overlapping lines within one layer by using the topology checker --> Must not have Dangles. This didn't work, I'm ...
user avatar
2 votes
1 answer
38 views

Vector Difference Multistring lines doesn't work 100% (QGIS)

I'm trying to substract one layer with multilinestring lines from another one. However, the layer that I get does have some (parts of) lines substracted, but not all. Does anyone know another tool ...
user avatar
0 votes
0 answers
19 views

Polygon Intersection with LineString (closed curve)

I have a polygon as such polygon_coords = [(-13585557.004033158, 4498795.070440721), (-13585215.14187693, 4500515.198409752), (-13581108.78850055, 4497863.34704348), (-13581192.612077117, 4497554....
user avatar
  • 101
1 vote
1 answer
29 views

Representing a route that doubles back on itself in BigQuery with a LineString

I'm trying to represent routes in BigQuery, but running into issues for routes that double back on themselves. Consider the following LineString that proceeds from the southwest to the northeast of ...
user avatar
  • 133
0 votes
0 answers
67 views

How to add a new point at user click while modifying an existing line or polygon geometry using Mapbox-gl-draw

I would like to have an edit option for my user to edit an existing line or polygon plotted in a map. The edit option should allow user to add new vertices where user clicks. I have tried using Mapbox-...
user avatar
0 votes
0 answers
61 views

How to convert/desurvey Directional Survey measurements into XYZM points?

I have a spreadsheet of Wellbore Drill data and would like to generate an XYZM path (LineString) that connects the surface hole location (SHL) to the bottom hole location (BHL) using the actual path ...
user avatar
  • 9
1 vote
1 answer
72 views

Project a shapely geometry over a linestring

I'm looking for the most exact way to project a shapely polygon over a line. I assume that any projected point of the polygon is inside the linestring. My first idea is to densify the boundary of the ...
user avatar
4 votes
2 answers
262 views

The distance between two points on a linestring respecting the linestring course

I have a big dilemma that I can't get over as much as I'm looking for here. I have on a linestring two points marked A and B, I want to calculate the distance between point A and point B as the line ...
user avatar
1 vote
1 answer
49 views

Invalid geometry point in ST_Distance query PostGIS

I have a problem that I can't get over .... I have a map on which there are several lines that represent some roads in the commune I click on the map and it gives me the position (latitude, longitude) ...
user avatar
1 vote
0 answers
14 views

Display line with color gradient (or fade effect) based on the value of the vertices it connects

I have two vertices connected by two lines (we can assume way out and way back from point A to point B). In the picture I represented the lines with two arrows curved by adding a midpoint and its ...
user avatar
0 votes
0 answers
14 views

Add a new line when split linestring by nearest point using geopandas

I'm trying to write a short script that allows me to split a line shp file by the nearest point. The interesting thing comes in that I also need to create a new small line that comes out from that ...
user avatar
1 vote
0 answers
60 views

Cluster & Average linestring based on similarity

I am looking for a way to find the "average" linestring of a set of linestrings using postgis 3. Ideally the collection of linestrings should be clustered based on their similarity (Perhaps ...
user avatar
  • 11
5 votes
1 answer
242 views

Using Union tool over MultiLineString in polygons layer in QGIS

I created a polygons layer in QGIS 3.22.2 by creating circular buffers around points. I need to Union them by intersecting the overlapping parts. After running for several hours, the Union tool gives ...
user avatar
  • 209
2 votes
1 answer
38 views

QGIS linestring length as meters from degrees(map unit)

I wrote a code that gives the line string length as degrees but I need the unit as meters. I can't convert it to meters from degree. layer = iface.activeLayer() for i in layer.getFeatures(): geom ...
user avatar
2 votes
1 answer
234 views

Creating a geodataframe from a list of LineStrings or routes

I have created a separate LineString for each origin-destination couples of subdivisions and I did it manually cause when I use a for loop it creates a dataframe with 1 LineString from all lines... ...
user avatar
0 votes
1 answer
58 views

Adding features to featureCollection does not update the map

I am trying to draw lines on the map using GeoTools, and my goal here is to prevent reloading the window when I draw lines on the map every time. I created a layer based on a featureCollection and ...
user avatar
0 votes
1 answer
50 views

Addlayer method reloads screen and the white screen seems in Java desktop application using GeoTools

I am trying to draw lines on map using GeoTools. Firstly I added a map layer, and while the program still is running, the user draws a line with mouse clicks. But every time addLayer method calls, the ...
user avatar
0 votes
0 answers
12 views

Rasterizing line-data with a gradient from the middlemost point

My aim is too rasterize a line data in a way so the middlemost part data is 1 and the outermost pixels are 0 - everything between should be interpolated. The illustration below should showcase my goal:...
user avatar
  • 21
0 votes
0 answers
27 views

Rasterizing line-data with the line-direction as burn in

I am trying to rasterize a line-dataset in a very specific way; namely I want the direction (2D-vector) of the line to be represented as color (RG-vector). The illustration below should hopefully ...
user avatar
  • 21
0 votes
2 answers
12 views

Removing branches from a multilinestring vector and retain the main centerline

I have a vector file that contains a centerline and multiple branches. I wish to remove these branches.I am unable to come up with a logic to remove these branches. Kindly guide.
user avatar
0 votes
1 answer
32 views

How to get union of multiple linestrings and polygons in Google Earth Engine?

I want to get the union of a list of multiple LineStrings and Polygons. The variable geoLeyte contains this list, but if I want to use the .dissolve() attribute, it gives an error. Who could help me? ...
user avatar
-1 votes
2 answers
419 views

Finding distance from Point to LineString in meters using Python [closed]

I have tried this following method to find distance but it is giving me distance like 0.12. I don't know what that 0.12 is meant and I want the distance to be in meters or kilometers. line.distance(...
user avatar
0 votes
1 answer
164 views

Compute East-West or North-South orientation of polylines (sf linestring) in R

I have a shapefile of road segments, which I want to segregate as East-West and North-South when viewing on Leaflet. The repex for the sf object is as follows: dfr_sf <- structure(list(ID = c(1236,...
user avatar
2 votes
1 answer
434 views

Create sf lines from data.frame with four columns of long lat coordinates

I want to create an sf object from a data.frame that contains multiple coordinates under different columns for each row. In the data below, each ID contains start and end coordinates for both latitude ...
user avatar
1 vote
1 answer
665 views

Splitting MultiLine or LineString into equal segments of particular length using GeoPandas and shapely

I don't have a license for any software. So, I want to do it in Python. How do I split the multiline or any linestring into equal segments by taking the length as input? This is the code that I am ...
user avatar
1 vote
1 answer
422 views

ImportError when importing Linestring from shapely.geometry [closed]

With this code I tried to import shapely.geometry: import shapely as shp import geopandas as gpd from shapely.geometry import Polygon, Linestring However, I faced the following error: ImportError: ...
user avatar
1 vote
3 answers
268 views

Convert MultiLineString to one LineString

TLDR: I was not able to change the String type from MultiLineString to LineString and keep the line together but there is a way to still represent that as a symbology. So my problem is solved, but the ...
user avatar
  • 301
1 vote
1 answer
380 views

Is there a way to "sort" points in a MultiLineString such that they seem more like a continuous LineString?

Is there a way to "sort" the points of a MultiLineString such that they follow a more sequential order? Let me illustrate what I mean with a graphical example: Input Suppose I have the ...
user avatar
  • 1,717
2 votes
1 answer
41 views

Selecting single line after polygon is split into line segments

In QGIS 3.20 on Windows 10 Pro 64-bit I have used the menu sequence Vector/Geometry Tools/Polygons to lines to create a new line layer from a polygon layer which contains several polygons. However I ...
user avatar
  • 757
5 votes
2 answers
204 views

Split linestrings at pairwise intersections [closed]

I have a set of line strings in a single sf object R which I want to turn into a (sf)network. Not in all cases are the intersections marked. So I want to transform the left data to the right, dividing ...
user avatar
  • 162
0 votes
1 answer
67 views

Creating LineString geometry from Point geometries with Python's OSGEO/OGR library

Is it possible to create a LineString object with Python's osgeo/ogr library starting from multiple Point objects? For example, I know from the Python GDAL/OGR Cookbook that I can create a ...
user avatar
  • 1,717
4 votes
1 answer
68 views

Creating a new layer with features derived from others from an existing layer in QGIS

I'm working with QGIS 3.16 Hannover. I have a point layer and I want to create a new line layer with features derived from the first one, using the following code make_line( -- using an array of ...
user avatar
  • 2,271
1 vote
1 answer
108 views

geometry.transform() removes the drawn feature in OpenLayers

I have a simple OL-based map with the default EPSG:3857 projection and an interaction which lets me draw a LineString on the map. Then, I have an event listener registered on the VectorSource, which ...
user avatar
0 votes
1 answer
144 views

Something wrong with GeoJSON for LineString

I'm using Python's GeoJSON package to created a simple LineString, put it in a Feature, and put that in a FeatureCollection I'll call featColl. featColl.errors() returns no errors. Below is the dumped ...
user avatar
4 votes
1 answer
102 views

Calculating cumulative line length on large dataset

I have a line split into segments that I want to calculate the accumulative length for, like this: I can achieve this easily on a smaller dataset with this inbuilt function in the field calculator in ...
user avatar
  • 428

1
2 3 4 5
10