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
0 votes
0 answers
8 views

Can;t find LineString or Point for Python

I am trying to use PolyLabel. I did a pip install shapely first. But the from shapely import LineString fails to find LineString. Also, in polylabel there is an from ..geometry import Point which ...
1 vote
2 answers
34 views

How to show points on LineString in QGIS?

I created a shape file with the following schema in python: schema = { "geometry": "LineString", "properties": {"id": "int"}, }...
  • 323
0 votes
0 answers
13 views

GeoJSON edit: merge LineStrings to Polygons

I need to export a district border from OSM to GeoJSON. I made a program that extracts borders as LineStrings from OSM XML and saves it as GeoJSON file. Now I need to merge LineStrings into a Polygon ...
  • 1
1 vote
1 answer
42 views

How to split up Linestrings based on type and connectivity using Python? [closed]

I am working with a road network, where I extracted only the three main road types. In the next step, I would like to union all Linestrings based on their road type and connectivity. That means that I ...
  • 35
1 vote
1 answer
29 views

Select lines that are no 'islands'

I have one table with several linestrings. I want to select all these linestrings, that do not touch any other linestrings, thus are "islands", are not connected to any other linestring. How ...
  • 3,135
1 vote
1 answer
35 views

Count points on linestring

I have a table table_point with points that are located on linestrings (table_line). How would I count for each segement of the a linestring of table_lines the number of points that are located on it?
  • 3,135
1 vote
1 answer
57 views

Splitting multiple Linestrings into 1 metre parts with GeoPandas shapely

I have a GeoPandas dataframe which contains many rows and also a column named 'geometry' with the following input: geometry LINESTRING (445125.050522556 5536587.67127983, 445124.450035... I ...
6 votes
2 answers
219 views

Splitting lines by multiple polygons, taking length of particular segment, using PostGIS

I have a table of 100k+ non-overlapping POLYGON features, and a table of 50k+ simple LINESTRING features (each line has only 2 vertices). The below is a common arrangement of these features on a map, ...
  • 1,507
1 vote
0 answers
23 views

Snapping points to lines returns unexpected results [duplicate]

I have a linenetwork lines and a lot of points points. The table lines has 42869 rows, the table points has 11264 rows. I am trying to snap each point to its closes line. SELECT p.id, ...
  • 3,135
4 votes
1 answer
99 views

Locate ways (multilinestring) that intersect points

I have two tables: crimes (points/ST_MakePoint) and ways (multilinestring). Initially what I did was reposition the points to the point closest to the track using the following: UPDATE renzagoras....
1 vote
0 answers
30 views

MultiLineStringZ in QGIS 3D view

I have a point layer with Z values that I display in the 3D view of QGIS. I want to display the trajectory of those points as a line layer, like in Google Earth. Therefore I converted my PointZ layer ...
  • 899
1 vote
1 answer
19 views

Not all line strings from same coordinates rendered in OpenLayers

I am trying to make two vector lines, one is a FlowLine from ol-ext, the other is a simple LineString function generate_line(points: number[][]){ //Copy points into new array let array = points ...
  • 13
2 votes
2 answers
91 views

PostGIS Splitting complex linestring over dateline

I have complex linestrings in PostgreSQL (see sample below). Many of these linestrings will cross the international date line (longitude 180 / longitude -180). The problem is that PostGIS assumes ...
2 votes
1 answer
98 views

Set linestring color by property value in PyQGIS

I have a GeoJSON layer consisting of some LineStrings. Each feature has a color property: { "type": "featureCollection", "features": [ { "...
  • 125
2 votes
1 answer
53 views

Classifying lines based on number of points located on them using PostGIS [closed]

I have a lines layer (roads) and a points layer (accidents). I'm projecting the points on the lines with st_closestpoint so that I'm sure the accidents are located on the closest road line. I now want ...
3 votes
1 answer
35 views

How can I get the closest linestring in my database to the linestring drawn by some user, following a path?

I have to take a geometry drawn by an user and return the geometry in my database that represents the drawing. I tried in PostGIS In my database I have a column 'way' with the geometry that I want to ...
0 votes
0 answers
52 views

Converting roads line string to polyline covering all roads

I attempted it with a linestring of Australia exported as coords array from QGIS a while ago and tested using a special website where you can input a coords array which then displays as polyline. Now, ...
0 votes
0 answers
30 views

Determining mile marker locations on railroad route LineStrings

Page 7 of the Texas SP Austin and Northwestern Railroad Historic District--Fairland to Llano NRHP application says the following: Contributing and Noncontributing properties are noted by two sets of ...
  • 203
2 votes
1 answer
264 views

Converting column with LineString geometries to np.array

I have a GeoDataFrame of a street network with the geometry of each row as a LineString. Say something like: type id tags geometry lanes bridge name highway 0 way 34953479 {'...
  • 133
3 votes
2 answers
49 views

Convert linestringz to linestringm using alter column?

I am attempting to import linestring data with or without m values, then test whether the data has m values, then add m values to the geometry if they are missing. So far, I have working tests for ...
  • 6,584
0 votes
0 answers
54 views

Receiving Infinity in LineString using shapely and pyproj

I am try get linestring so I can measure the distance and time. Here in this linestring I am getting nan distance and time. data: path = [[29.87819, 121.54944999999998], [24.23111845, 119....
  • 101
0 votes
0 answers
81 views

How to smooth the Linestring after adding additional point?

Actually I am tracking vessel, where I am already having path, and current position. Now the trouble is, obviously the vessel will not be on same coordinates as provided in the path.So I want to ...
  • 101
2 votes
1 answer
96 views

QGIS focus multiple vertices in one point

I have a bunch of lines, which have been offset. The tool in fact works fine, but I noticed, that the lines end in different places, whereas I want them to be terminated in one place. The image below ...
  • 3,531
0 votes
0 answers
19 views

QGIS Shortest path (point to point) for more than 1 points [duplicate]

I have quite a few points as you can see below: and I would like to connect them by the "Shortest path(point to point)" method. The following algorithm works perfectly for one input as you ...
  • 3,531
1 vote
1 answer
74 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 ...
  • 3,531
2 votes
1 answer
142 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?
0 votes
1 answer
60 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 ...
  • 1
1 vote
0 answers
691 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 ...
4 votes
1 answer
73 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 ...
2 votes
1 answer
144 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 ],...
  • 23
0 votes
0 answers
19 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 ...
0 votes
1 answer
73 views

Finding maximum value on raster transect between two points using PyQGIS

I have a raster layer and two points with their coordinates, and I want to find the maximum raster value on the line between these two points. Is there a built-in function in PyQGIS to find the pixel ...
  • 336
0 votes
1 answer
210 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. ...
3 votes
2 answers
371 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 ...
  • 774
0 votes
1 answer
110 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'...
2 votes
1 answer
78 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(...
1 vote
1 answer
460 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 (...
  • 175
3 votes
1 answer
178 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 ...
  • 175
2 votes
1 answer
212 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....
3 votes
1 answer
68 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 ...
2 votes
1 answer
42 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 ...
0 votes
0 answers
24 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....
  • 101
1 vote
1 answer
118 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 ...
  • 133
0 votes
0 answers
336 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-...
0 votes
0 answers
118 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 ...
  • 9
1 vote
1 answer
463 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 ...
4 votes
2 answers
565 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 ...
1 vote
1 answer
82 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) ...
1 vote
0 answers
17 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 ...
0 votes
0 answers
20 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 ...

1
2 3 4 5
11