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.

54 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
0answers
719 views

Simplify the straight sections of (multi)Linestring in PostgreSQL/PostGIS leaving the curved sections untouched

I have (multi)linestrings containing upwards of 5000 points and I want to perform two simplifications possibly using Ramer Douglas Peucker or alternative methods in PostGIS. The (multi)linestrings ...
6
votes
0answers
294 views

How to remove overlapping features by percentage?

I have geometry records of type MultiLineStringZM and I am trying to INSERT new records that overlap some of the records currently in the table. If they were type MultiPolygon I could use ST_Area() as ...
6
votes
0answers
528 views

PostGIS: How to distinguish overlapping routes (i.e., LineStrings) based on their direction?

I have a set of routes which are represented by LineStrings in my PostGIS database. These routes represent journeys that people make. I want to come up with routes that (a) overlap, and (b) have the ...
4
votes
0answers
113 views

Change from LineString to MultiLineString when saving layer edits in QGIS

In QGIS, when a user creates a new single part line in an open editing session for a “Multi-Line” SpatiaLite dataset, the QGIS data type is initially a “LineString”. But, when the user commits the ...
4
votes
0answers
174 views

SQL Server, Given a linestring with M value, what is the location of this other M value

We are investigating migrating a prototype into SQL Server (azure). We have LineStrings that also have M values. What we would like to do is given another M value find out what its geographical ...
3
votes
0answers
48 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 ...
3
votes
0answers
276 views

Reorder Shapefile of lines for consecutive ordering (Assemble Lines into LineString)

I have a Shapefile containing segments of Lines/LineStrings: Unfortunately the order of the DBF attributed table is random. How to reorder the segments so entry #1 in the Shapefile will be "Segment ...
3
votes
0answers
184 views

Can I reorder the points in a GEOS LineString?

Using libgeos, when I buffer() a polygon and then getExteriorRing() [to make a slightly smaller outline copy of the polygon just inside the original], it seems that which point on the new geometry is ...
3
votes
0answers
43 views

Postgis - Construct linestring of length N

Give a table of linestrings (roads) ogc_fid, wkb_geometry And a road with ogc_fid = X In postgis how could I construct a linestring that is of length Y metres made up of roads starting from road X?...
3
votes
0answers
571 views

Get Distance between two point on linestring using mysql Spatial

I have a linestring and two point on this linestrin according to my picture i want distance between two point as base of linestring please hellp me
2
votes
0answers
46 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 ...
2
votes
0answers
32 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 ...
2
votes
0answers
68 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 ...
2
votes
0answers
32 views

Processing tool to fill all voids within a lines layer

I'm trying to convert a lines layer from Ordnance Survey which is made up of field boundaries, river banks, woodland boundaries and houses etc into a polygon layer, but only 'polygonise' the fields. ...
2
votes
0answers
157 views

Postgis List of adjacent LineStrings ordered sequentially from one end of the MultiLineString to the other

I have LineStrings that represent a road network/address centerline that are segmented at intersections, etc. I have determined how to query collections of LineStrings that are adjacent to each other ...
2
votes
0answers
32 views

Osm2pgrouting - edit final route

I've imported my data to database by osm2pgrouting. This tool created network topology which contains vertices and edges between them. Problem is when I need get route to specific point which is not ...
2
votes
0answers
250 views

Progress Bar gets stuck converting Lines to Polygons using QGIS?

I'm trying to convert lines to polygon using QGIS 2.8.1. I use Vector > Geometry Tools > Polygons to Lines. I always get the progress bar stuck on 90%, it can't get to 100%. Could someone ...
2
votes
0answers
101 views

Extract from a linestring layer, groups of linestrings to a multilinestring objects layer

I've got a linestring layer with thousands of linestrings. I want to extract groups of linestrings to individual multilinestring objects. In the following picture you can see a part of the layer ...
2
votes
0answers
671 views

Splitting Line.shp at Point.shp with Python/ogr

I'm trying to modify some ESRI Shapefiles using Python with gdal/ogr module. What I want to do is quite simple, but I didn't find any solution by now. I have two shapefiles: (1) Lines.shp and (2) ...
2
votes
0answers
1k views

How to merge linestrings which are connected with each other?

I would like to join linestrings which are connected to each other. The preferred output is a longer linestring based on all joined single linestings! The table that holds my single linestrings is ...
2
votes
0answers
1k views

How to handle postgresql/postgis geometry type errors in a function?

I have created the following function in PL/SQL to make a polygon from a set of linestrings: CREATE OR REPLACE FUNCTION _myfunction( _fid integer, _rid integer ) RETURNS VOID AS $$ ...
1
vote
0answers
9 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
21 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 ...
1
vote
0answers
36 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 ...
1
vote
0answers
65 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 ...
1
vote
0answers
128 views

Cluster LineStrings using HDBSCAN?

I am trying to cluster a set of LineStrings (made out of lat/lon Points) with the help of HDBSCAN (using the "haversine" metric). The objective is to define the most "usual" path. I have only managed ...
1
vote
0answers
59 views

SumLineLengths in QGIS 3.2 not working?

I'm trying to use the Vector > Analysis Tools > Sum Line Lengths in QGIS version 3.2.3-Bonn. I'm inputting a ploygon (Multi Polygon) and a Lines (MultiLineString) shape files. I'm hoping to get the ...
1
vote
0answers
514 views

JSTS Buffered Polyline in route Service (google maps V3)

I do not know if someone has already lived the same thing as me, I work with JSTS API to create a polygon that surrounds the route of the google services but the problem is that when there are ...
1
vote
0answers
78 views

Need to fill the area of shapefile that contains LineStrings, which form a polygon, in ipython

The porblem I have is that I fetched the data about the administrative level of vienna (from OSM via overpass --> vienna relation id = 109166) as xml format. (json didn't work it had encoding problems)...
1
vote
0answers
390 views

Swapping start and end points of line (i.e. direction) of LineString in PostGIS?

I know that postgis has the function to find the start and end point of a line. Is there a function that can swap the start point and end point? (Note: I do not mean literally changing the co-...
1
vote
0answers
39 views

Linestring segment completition?

I just extracted some river paths from some old maps I acquired a few weeks ago, they seem accurate enough and will be very interesting to put against my theoretical mapping calculated by using the ...
1
vote
0answers
302 views

need to split some linestrings by points

please help me, i'm new in gis 1) i have а table with geom railways, which are multilinestrings (for example there are 2 ways one of which is interrupted, so this way will be multilinestrings ...
1
vote
0answers
178 views

Postgis ST_AsSVG renders a tiny SVG

I am storing information about a person's journey as a linestring. Having recently discovered ST_AsSVG I tried the following query: SELECT ST_AsSVG(path) FROM activities WHERE id = 209 ...
1
vote
0answers
210 views

Postgis - st_MakeLine and st_lineLocatePoint

Lets explain, I have 4 points (1,2,3,4), and I need to visit clients (A, B, C, D). So, I need to use st_makeline with (1,2,3,4,3)... Now I have to get % position from A,B,C,D; but in visit order. ...
1
vote
0answers
141 views

Using TIGER/Line shape files, how do I get address coordinates?

I've downloaded addressfeature shapefiles from TIGER/Line on the Census Bureau website. I converted one file to CSV using ogr2ogr. I get the following sample output: WKT,TLID,TFIDL,TFIDR,ARIDL,ARIDR,...
1
vote
0answers
263 views

Postgis - Split linestring between point A and B

I need to find the different trajectories between point A and B. In the image is possible to see 2 differents trajectories. The way i use to calculate them is: Found the min time and the max time (in ...
1
vote
0answers
935 views

OpenLayers - Add points at vertices of line while drawing line

I would like to create points while I draw a line on my map in OpenLayers. That is, at each vertices of a line and at the end points there is a shape like a square, circle, or diamond. I have this ...
1
vote
0answers
722 views

Line to Polygon via Polygonizer in QGIS

My question is in the same vein as this one. I'm attempting to convert precipitation lines (Precipitación Media Anual) to a polygon for Mexico in QGIS using the Polygonizer plugin. After running the ...
1
vote
0answers
304 views

Break LINESTRING values in postgis into mutiple LINESTRINGs

Figure A below is the visual representation of what i have in my road data set. Line 1, Line 2, Line 3 in illustration are each represented as 1 row postgis DB inside a geometry column, some of these ...
0
votes
1answer
12 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?
0
votes
0answers
16 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 ...
0
votes
0answers
44 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 ...
0
votes
0answers
66 views

Geospark - Creating LineStringRDD from coordinates extracted from the sides of each polygon in a PolygonRDD

I am using geospark 1.1.3 with scala and I am trying to split into lines a polygon shapefile dataset which contains 189 polygons. I am expecting to get each side of each polygon as a LineString, ...
0
votes
0answers
55 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
79 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
36 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
0answers
55 views

Stop detection on a dataset of (id,geometry points,timestamp) to be transformed into meaningful trajectories

My pretty large dataset consists of AIS transmitted messages. I load the dataset to a table in my db. Among other columns in this table, there are a longitude and a latitude column. I already ...
0
votes
0answers
38 views

How to add date to point?

I have a lot of points with a GPS tracker and I need to simplify them. I create view (location_view) in PostgreSQL (with PostGIS): SELECT location.id, location.added, location.latitude, ...
0
votes
0answers
70 views

Breaking LineString into MultilineString group by distance between two points and it's time

This is line string of my geometry column that created by postgis and shown in qgis: This is multiline string like above: I am new on gis and How can i do break line and convert it into multiline? I ...
0
votes
1answer
269 views

Getting width of road segment given its end points using Leaflet?

I want to highlight a road segment on a Leaflet Map. I have the coordinates of the end point of the road segment, so could plot it as a linestring. But the problem is how can I get the width of the ...