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

learn more… | top users | synonyms

8
votes
2answers
756 views

How to add vertices to existing linestrings?

If I have Linestring(1 2, 1 5, 1 9) and a Point(1 3) Is there any function that can merge linestring and point preserving the order so output would be: Linestring(1 2, 1 3, 1 5, 1 9)
8
votes
1answer
304 views

How to rank polylines according to their similarity to a ref polyline?

How to rank polylines according to their similarity to a ref polyline? Update 1: simulations show that simple $\sqrt{\sum{(case-ref)^2}}$ can find better similarity between polylines (as set of ...
7
votes
4answers
526 views

How to calculate the “depth” of a linestring using postgis

I have linestring features, which look like bent linestrings, hemicycles or convex or concave linestrings. In the moment I can select the distance between the startpoint and endpoint of each feature. ...
7
votes
2answers
1k views

For a given feature find the closest point along a given path

Looking for a Java based (foss4g) solution for the following: I am using a path along with a buffer to find features that are along the path. For each of the features returned I want to find the ...
7
votes
2answers
2k views

How can I export a linestring to a GPX file in QGIS?

I have a linestring in a vector layer in QGIS. How can I expot/save this linestring as a GPX file? I tried to select the linestring, then right click on the vector layer and choose "Save selection ...
7
votes
1answer
252 views

How to see what lines have changed in an updated Shapefile?

I'm using my county's GIS data to update the roads in OpenStreetMap. I have a copy they published last year and one that was just published, and I'd like to find all the LineStrings that have either ...
6
votes
3answers
550 views

How to generate geodesic linestring from two points in C#

I'm looking for a FREE C# class, library or set of functions that will allow me to generate a geodesic linestring (or array of vertices, whatever) from two decimal degree points. I've found ...
5
votes
1answer
2k views

How can I transform a polygon to a linestring in QGIS?

I have a polygon, imported from a shapefile in QGIS. I would like transform it to a linestring instead so I can save it as a GPX file later. How can I transform a polygon to a linestring in QGIS?
5
votes
1answer
311 views

How do you fix Overlapping Lines?

I have a line dataset that contains some lines where the "end points" are actually found in the middle of the line. In the image below, the nodes are shown in green and one of the end points in red. ...
5
votes
1answer
429 views

adding multiple points to a linestring in PostGIS

Though a newbie to PostGIS, I'm having trouble solving something that I think should be farily straightforward. I have two linestring tables, both consisting of simple, 2-node line objects: one has ...
5
votes
1answer
666 views

How to merge linestrings that don't touch based on common name?

I had a table of road line strings that contained duplicate road names with different geoms for different line segments. I extracted the duplicates to another table. I now want to join these segments ...
4
votes
1answer
1k views

How to create polyline of varying distance from origin point using azimuth?

I am looking for a Python script that does the following: Uses a point (from a point shapefile) as the origin. Creates about 3 km line from point Based on an azimuth provided in the original point ...
4
votes
2answers
392 views

How to group connected linestrings in PostGIS?

I have a table of streets I've selected based on a set of attributes (let's say it's speed_limit < 25). There are groups of streets that are locally contiguous; I'd like to group these sets of ...
4
votes
1answer
476 views

How to create linestrings with a definite angle and length, that are fixed to a point

I want to create linestrings with a definite angle (e.g. 160°) and length (e.g. 2m) that are fixed to a number of points of another linestring. So, I want to use the ST_DumpPoints function to find the ...
4
votes
2answers
304 views

How to calculate the azimuth of a line of a multilinestring in PostGIS?

I have two spatially enabled tables in PostgreSQL with a geometry in each: First table is with POINT type, second is with MULTILINESTRING. I need to calculate the azimuth of the LINESTRING part of a ...
4
votes
1answer
1k views

PostGIS geometry intersection test results different for Point and Linestring

Can anyone please tell me what I'm doing wrong, and how do I avoid the problem? I'll attempt to clarify what I'm doing as things go along. The geom column is a multipolygon column, all values are ...
4
votes
2answers
98 views

Split lines at intersection points

I've got some linestrings covering a road network, and need to split them at the crossroads. Does anybody have any idea on how to do it? I'm using QGIS 2.4, with a Postgis 2.1.3.
4
votes
2answers
166 views

How to speed up a query for nearest linestring to point data

I have processed a Strahler stream order layer with a lot of river linestrings (type: Multilinestring) and their corresponding strahler number (see information here). Besides I have a point layer. I ...
4
votes
1answer
124 views

How to transform a set of street-segments into city-blocks, with PostGIS2?

Theoretically is possible to obtain the polygons of city blocks (urban blocks) from streets, when streets are represented by street axis (LineStrings). The urban blocks are bounded by streets, so ...
4
votes
1answer
84 views

Rasterise heights from a 3D linestring

I have a 3D network of streams represented using linestrings with Z-coordinates. I would like to rasterise this feature, where the raster values represent the linearly interpolated Z-values between 3D ...
4
votes
1answer
152 views

Calculating “travelled distance” of a GPS track without including “stops”

I have a set of GPS tracks from a cycling event and I want to correlate their distance along the route. Problem is: when a rider stops, generally by entering a covered place, GPS keeps logging (low ...
4
votes
0answers
419 views

ArcGIS Kernel Density with polyline, search radius / bandwidth calculation

I'm conducting a density analysis of a series of polylines and I'm hung up on determining an appropriate search radius. The default calculation performed by arcgis is to take the shorter dimension ...
3
votes
3answers
2k views

How to delete duplicate lines?

I was wondering if anyone could help. I have a tab file in MapInfo consisting of just polylines. Each is meant to have its own reference number, however some are duplicated (e.g two lines occupying ...
3
votes
2answers
1k views

Create point to a center of polyline

I'm trying to create a points in the middle of polylines. The data is now in the form of shapefile. Is there an easy way to do this? Cheers, Sanna
3
votes
1answer
783 views

clip linestring by length

Is there a way to clip a linestring based on distance? For example, linestring from a to b is 150 meters. I would like to get the linestring from a to a point that is is 75 meters away from a ...
3
votes
3answers
2k views

How to extract POINT from a [LINE|MULTILINE]STRING

I'd like to create a vectorLayer in QGIS to display all the points that form a LINESTRING or a MULTILINESTRING stored in a PostGIS DB. I think that I need to transform all points of LINESTRING (or ...
3
votes
1answer
43 views

Bounding box of a set of MULTILINESTRINGs PostGIS

I have a PostGIS table with a geometry column (geom) and a type column. The geom column contains only MULTILINESTRINGs and the type column contains tags that tell me what each MULTILINESTRING ...
3
votes
1answer
282 views

PostGIS: Using a polygon to 'mask' linestrings returns both multi and linestrings

I have a table of linestrings (OSM roads, in fact) that I'm displaying on a map. I want to filter them so that only those within a certain area are displayed- I've already done this with the coastline ...
3
votes
3answers
413 views

Redistribute linestring vertices to specified distance

I use a groundwater model program called GMS, and it has a very useful function "Redistribute vertices" (more info). I use this function all the time to both simplify and provide regular spacings ...
3
votes
1answer
86 views

Find the closest line vertex from the linestring using PostGIS

How to find the closest line vertex from a linestring? ST_ClosestPoint will give a point which is not from the linestring.
3
votes
1answer
89 views

Calculate distance between point and linestring and how to represent that on QGIS?

I have loaded my data with osm2pgrouting and I have my network with ways (Linestring) and nodes (Point). The problem is : I have a database of doctors addresses (point) and I should calculate the ...
3
votes
1answer
738 views

How to detect overlapping linestrings in PostGIS?

I'm looking for the fastest way to detect whether a given linestring overlaps another linestring. (As reference, let's say my wife and I both go for a run and take different routes, I'd like to detect ...
3
votes
1answer
562 views

Find polygon that contains all linestring records in PostGIS table

I'm still pretty new to this stuff, so bear with me. In PostGIS how could I find a polygon that would contain all the linestring records in a given table?
3
votes
1answer
54 views

PostGIS: Get closest point between geometry and Multipoint

I think my question is not that difficult for GIS professionals, but i didn't found an answer to my problem (even not in other questions). Problem: I have given two tables (table1,table2) with Points ...
3
votes
1answer
125 views

Select linestrings containing points with duplicating M coordinates in postgis

I have a table of LineStringM geometries. Some of lines have points with same measure (M coordinate). This is a bug in initial data, that I want to clean somehow. So I need to: 1. Select all records, ...
3
votes
2answers
332 views

In PostGIS, how do I merge a multilinestring into a single linestring, keeping the pieces in proper order?

I have a multilinestring made up of several pieces, some of which are facing the wrong direction. (Accessible here: http://pastebin.com/89Zcixv5 ) I think what I'm looking for is some utilization of ...
3
votes
2answers
687 views

How to perform SIA or Bezier line smoothing in PostGIS?

Can anyone provide an example SQL for smoothing linestrings from postgis table using Bezier curves or Iterative Averaging (SIA) algorithm?
3
votes
1answer
226 views

Polyline “breakage” calculation in MapInfo?

I am a novice MapInfo user, with a basic to moderate knowledge of queries and SQL. My work entails doing risk assessments for shipping traffic based on AIS-tracks (radio-based vessel information ...
3
votes
2answers
304 views

How to recalculate the the length of a geography linestring from nearby geography point in POSTGIS?

I have a geography type linestring *route_geography geography(LineString,4326)*, its a route from point A to point B. Now I have a point C near that line. I want to find the nearest point on that ...
3
votes
1answer
69 views

How to find intersected line is from left or right on another line?

There is a main LineString and its direction is known. I want to find the side of intersected lines to this main line. Example image: Black line is main LineString and red one is intersected ...
3
votes
1answer
59 views

OpenLayers: How to get *real* centroid of a Line Geometry/Feature?

I have declared a line geometry as: var lineString = new OpenLayers.Geometry.LineString([source,target]); then I am trying to get the centroid of this lineString as lineString.getCentroid(). But ...
3
votes
0answers
75 views

How do I simplify the straight sections of (multi)Linestring in PostGres/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 ...
3
votes
0answers
179 views

PostGIS 2.0 st_geomfromgml using LineString fails with invalid GML representation

I am attempting to insert a geometry into a table using the st_geomfromgml function. The GML is being sourced from a Geoserver WFS request. The function call looks like this ...
3
votes
1answer
85 views

Find gap in / endpoints of linestring

I have a set of features of type linestring. I'm trying to polygonise the linestrings and assumed that they were closed (naive me :) ). Of course some were not closed and I'm trying to locate the gaps ...
3
votes
0answers
756 views

leaflet - Drawing line following the road

Short version: What I wish to be able to do is drawing a polyline along part of a road. In that way marking certain houses, along this road. Long Version: I have several houses that I wish to mark ...
2
votes
3answers
569 views

How to create a efficent linestring out of geography points using postgis

I'm trying to create a linestring out of geography points. At the moment I'm doing it like this: select ST_GeographyFromText(ST_Makeline(a.record_point)) from ( select (record_point::geometry) from ...
2
votes
1answer
109 views

Access points with PostGIS

I have a PostGIS table with linestring geometries and point (A) on it and I need to detrimine points (M) which located M meters from A. Distance is measured along linestrings. Any thoughts?
2
votes
2answers
129 views

Switch coordinates in linestring

I made a silly mistake: when creating linestrings in my PostGis database i inverted the lon and lat values. Which isn't a problem for postgis itself, but for my visualization and intersections. ;) Of ...
2
votes
2answers
6k views

ArcGIS: How to create a line with a specific length?

How can I create a line in ArcGIS 9.3 to a specific length? I click once to start the line where I want it, and then I want it to be, say 10 Meters in length...Similar to AutoCAD. How do I do this? ...
2
votes
1answer
94 views

Merge multiple linestring features into a single multilinestring

Using QGis or ogr2ogr how do I convert a vector file containing multiple linestrings features into a single multilinestring feature? At the moment I've been doing this manually by converting the data ...