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
4
votes
1answer
39 views

Calculate difference of two LineString

The tool I'm developing is written in Java with Spring Boot, using PostgreSQL as database (PostGIS extension). I also make use of GeoTools. I want to calculate the geometrical difference between two ...
0
votes
0answers
39 views

Spatially join linestrings (which can overlap or not overlap) in R and provide output in a data format that I can add other variables

I am using R to exam road infrastructure. The sf dataset I am using is very granular e.g. for the same road two or three observations may exist that are differentiated by different coloured tarmac ...
-1
votes
1answer
16 views

Weird problem with st_polygon in the sf package

I would like to create a simple polygon using the sf package. From my understanding, I have to create a two column matrix where the last row is identical to the first one to close the ring of the ...
5
votes
1answer
61 views

Does QGIS 3.10.2 change the line.xAt(0) function? .xAt()

Is there a recent change to the way a LineStringZ nodes are referenced? I am getting the error Error 'QgsMultiLineString' object has no attribute 'xAt' I have submitted it as a bug (#34094) but it ...
2
votes
1answer
41 views

Polygonizing LineString features to Polygon features and keeping Attribute table values using PyQGIS

i am trying to create a circular raster in Qgis3.8.3-Zanzibar with the Python console. I am able to make it with LineStrings (combine of Polyline and Circular String) and fill each feature with ...
0
votes
0answers
13 views

What is causing the error “more than one linestring in KML”

I exported a KML from Mapinfo as a single combined line, however when i try to uploaded into a different mapper I get an error indicating that there are multiple linestring tags in my KML. I can see ...
2
votes
1answer
39 views

Split linestring by selecting two points in OpenLayers?

I have a project where people can drag and drop a gpx file. This results in a multilinestring. People should be able to take a piece of their route and submit that. I was thinking of letting the user ...
1
vote
1answer
33 views

Length of a street-Spatial SQL

I have a table with the geometry of streets and I`d like to find out, which is the longest and which length (in kilometers) it is. How can I summarize the individual street segments?
1
vote
1answer
42 views

Adding points every X distance along a LineString [closed]

I have a list of LineString coords: list = [(90, 170), (99.0, 159.0), (321.0, 159.0), (300, 146), (296, 23)] which looks like this. How to interpolate a point at every X distance along the line ...
2
votes
0answers
28 views

Problem when trying to cut linestring at multiple points after conversion from Multi-linestring

This is my script: def cut_line_at_points(line, points): ''' line is gdf format points are series of points in gdf format ''' # union all geometries - convert the gdf to shpely (...
3
votes
2answers
138 views

How can I extend a linestring to the edge of an enclosing polygon in PostGIS?

I have linestrings that are each entirely within a polygon. I want to extend the first and last segments to touch the first rings of the polygon in line with them.
0
votes
1answer
26 views

Spatial Analysis: use of buffer function inside GeoDjango's LineString model

I'm trying to make a buffer around a line. I've a model with a LineString field and I would to use the buffer function like this to make my buffer. The aim of this is render the buffer on a webmap ...
1
vote
1answer
208 views

How to create a linestring from a geopandas data frame?

I am trying to create a linestring from a geopandas dataframe with points as geometries date_time latitude longitude year data01 hour minute data02 0 2019-11-08 08:21:38 36.830444 -...
1
vote
1answer
42 views

Seeking algorithm that can re-locate vertices on linestring so that line does not intersect land polygons

I'm currently working with GPS data gathered from boats. The data has low temporal resolution (every 5 minutes) which causes the linestrings that display the boat's trajectory to be jagged. An example ...
2
votes
1answer
86 views

PostgreSQL create line from points

How do i create a linestring from points sort by date in PostgreSQL? I tried: SELECT observations.id, ST_MakeLine(observations.geom ORDER BY observations.date) AS newgeom FROM observations ...
2
votes
1answer
41 views

Copy/pasting QGIS features between two layers with linestringZ() geometry gives linestring()

I'm puzzled: when I copy-paste a feature with linestringz() geometry to another layer I get linestring() and the elevation attribute is lost. Although when I paste to a text editor I see a linestringz(...
0
votes
1answer
26 views

Mapbox: Multilinestring Z, stand on the background

I added to Mapbox, a 3D not extruded object by geojson: a Linestring Z. But it's stand on the background. So: I'ts possible to put this object at the height that is defined?
1
vote
1answer
23 views

Batch open GeoJSON LineString from files with multiple features

I want to open multiple GeoJSON files, each have Points and LineStrings - I only want the LineStrings. I want to open potentially 1000s of files so don't want the popup asking if I want Points or ...
0
votes
0answers
33 views

Combining Multiples Linestrings into Polygon (Turf.js)

My main goal is to combine linestrings into a polygon. Is there a way to accomplish this using a library like Turf.js, or are there any geometrical rules to follow ? I Tried building the concave hull ...
1
vote
0answers
27 views

Merging overlapping GeoJSON LineStrings (Tippecanoe) and add visualization

I would like to merge overlapping GeoJSON LineStrings and visually style merged LineString. I have a database of GeoJSON LineStrings which represent routes people drove. I would like to visualize ...
1
vote
0answers
26 views

Extend LineString on map zoom [closed]

In OpenLayers 5, I have some LineString that represent the streets. Now I want that when the map is zoomed also the LineString should be zooomed. For example in the following image, I have two ...
1
vote
1answer
177 views

Extract borders from country polygons

I'm trying to convert a polygon GeoJSON of countries into a line layer that contains only the borders. It should not contain the edges of the polygons that border the ocean (in my polygon dataset, ...
2
votes
1answer
53 views

Controlling line width at different points in QGIS [closed]

I have vector data for rivers including their width at various points. From what I have seen so far, QGIS 3.8 can set the line width only per linestring, no per segment. Is it possible (maybe with a ...
1
vote
1answer
118 views

Line at map scale that do not vanish when zoomed out? (QGIS 3.8)

I'm drawing rivers and roads as linestrings with width set in map units from an attribute. When zooming out, of course they vanish quickly, because 10, 20 or 100m is less than a pixel at 1:100,000 ...
0
votes
0answers
45 views

AGOL REST API: Why do linestrings auto-convert to multilinestrings w/ 0 z elevation?

I'm using the ArcGIS Online REST API to add/delete features from a 3D web layer. I'm able to POST linestrings to the layer. But, seemingly randomly, some (not all) of the linestrings get converted to ...
3
votes
0answers
78 views

Calculate weighted azimuth/bearing of a line

Given the line LINESTRING(-9.086532643219698 -7.939337106873815,-1.396102955719698 -0.9775148048290135,-0.780868580719698 -0.7138718839794582,-0.077743580719698 -0.6699297767574899,0.581436106780302 ...
2
votes
0answers
36 views

QGIS splits line feature at all intersections? [duplicate]

I have a long GPS track that I've converted to a shape file. I need to divide it into segments. The first time I use the "split features" tool, it makes a cut where I draw my line, but also splits the ...
4
votes
1answer
59 views

QGIS Linestring rendering curves between vertex

I'm sure I hit a setting somewhere, but now I can't fix it. When a linestring shp file is rendered in QGIS it adds curves between my verticies... I want straight lines. How do I turn this off? In ...
1
vote
1answer
111 views

PostgreSQL: Copy the line segment together in another table without copying the intersection with another line segment

Presently these linesegments are in different rows but in the same table and numbers shown in the image are the ids of respective linestrings. I want to copy linesegment 350, 333, 352,4,.. in one ...
2
votes
1answer
163 views

Measuring / calculating curvature of linestring using QGIS?

How can I measure/calculate the curvature of a linestring? I need just a boolean value: is curved or is not curved. At the moment, I don't find a working strategy for that.
2
votes
1answer
82 views

How can I smooth LineString coordinates with 1D Gaussian Filter?

I'm trying to smooth a LineString through 1D Gaussian Smoothing and I'm having a doubt on the steps required to implement it, regardless of programming language. I couldn't find by myself anything ...
0
votes
1answer
137 views

Converting lat long strings to xy linestrings [closed]

In PostGIS, I have a dataset with road segments including a column with coordinates for the various segments. The coordinates are in a lat-long format and the data type of the column is character ...
1
vote
0answers
26 views

Is there a standard way to apply different field values to linestring vertices?

In QGIS I have several 3D points that I am creating a linestring from and each point could have a different value in one of the fields like "type". I want to somehow create the linestring and be able ...
2
votes
0answers
66 views

Behaviour ST_Intersection of 3D LINESTRING and 3D POLYGON - Z value with GEOS backend

I do not quite understand the behaviour of ST_Intersection applied to 3D geomerties when using the GEOS backend. Take this example: SELECT ST_AsText(ST_Intersection('POLYGON((1 1 1, 6 1 3, 6 4 3, 1 4 ...
3
votes
1answer
109 views

Converting point into line using QGIS

I have a set of points with datatype as geometry(MultiPoint, 32643), I want each point to be converted in short line segments. The purpose of doing this is to use "split by lines" tool in QGIS which ...
3
votes
1answer
322 views

QGIS SAGA split lines at points creates redundant lines

I have 2 projected (ESPG 2039) layers of roads and points (bus stops and junctions). I snapped the points to the roads layer and this is how it looks: I then try yo use Saga Split lines by points to ...
2
votes
0answers
33 views

“bending” lines to a predetermined shape

I have a dataset with AIS-transponder information. A AIS-transponder is a digital system onboard a ship that sends/receives information to/from the vessels within range of the VHF transceiver in a ...
5
votes
1answer
212 views

Create a line string from street geometry

I'm currently facing some hard times trying to create a simplified line from a street geometry. The data that I'm currently using comes from OpenStreetMap, using osm2pgsql.(Which means PostGIS, but I'...
1
vote
0answers
41 views

Check point in line segment not accurate in Shapely

I use Shapely and I've run into an issue where I can find the intersection of two lines. However once I have the intersection point, I don't seem to be able and cross-reference that it belongs in both ...
0
votes
1answer
261 views

Getting geohash of LINESTRING in PostGIS?

I have some LINESTRING in PostGIS. LINESTRING(104.011 30.637,104.014 30.638,104.022 30.640,104.026 30.645) LINESTRING(104.022 30.666,104.031 30.659) LINESTRING(104.044 30.655,104.056 30.655) I ...
4
votes
1answer
409 views

Add Line Layer from PostGIS to Leaflet

I have a line layer in PostGIS that I would like to add to a Leaflet map. I have the PHP setup, but I can't seem to get the Javascript correct. I know my issue is converting the line to geoJSON. The ...
4
votes
3answers
148 views

Can I reorder the coordinates of a line when importing into QGIS a WKT linestring?

I managed to import a csv file containing lines in QGIS but unfortunately the x y aren't in the correct order. that is, the csv has a field where there is a sequence of lat (y), lon (x), while qgis ...
0
votes
1answer
155 views

Converting CSV with LineString into shapefile using ArcGIS Desktop?

I have a CSV which I've imported into ArcGIS Desktop, and it contains a Linestring column. How do I convert it into a shapefile? Example of what one of the fields contain below: [[51.53878768021,...
2
votes
0answers
106 views

Shapefile lines disappear, but data remains

I'm working in QGIS 3.4 on a line type shapefile layer with +/-5000 records. I made an edit to the start/end nodes of a couple of lines to move them to a point node from another layer; then when I ...
0
votes
0answers
61 views

Mark Dangle Error for linestring

I will create buffer for 5 meter in start point of line string, If any other line string is within the buffer but not snapped then to mark as the startpoint as dangle error.I have attached the sample ...
0
votes
0answers
96 views

Matching streets in two line datasets with PostGIS or QGIS?

Explanation: I have 2 tables on PostgreSQL, one table named 'city' that have linestrings wich represents streets from a city (using QGIS I downloaded OpenStreetMaps data and imported to PostgreSQL ...
0
votes
0answers
37 views

Segmentation of a line based on several overlapping lines within the first line

I stumbled over a problem which I can't figure out myself so maybe you can help me.. I have a line going from 0 to 100% of its length. On this line I have 1:n lines with different information and ...
0
votes
1answer
207 views

OpenLayers Linestring does not draw straight images

My problem:Add image along the LineString My problem has been solved here, but when I add a 32x32 image and I draw between two points, the images in the line don't go straight and there's a slight ...
1
vote
0answers
73 views

How can I calculate the “average” or “median” result between a number of MultiLine Strings?

So I have a number (let's say 12) of multiline strings representing something that changes over time, like forest borders or shorelines. I want to create a single line that is the result of the ...
2
votes
1answer
1k views

Add image along the LineString

I am wondering how to place images on a line. For example, instead of a dotted or dashed line. I could include a symbol of a cloud a character (e.g. |) repeated along the line. it cannot show the ...

1 2 3 4 5 7