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

4
votes
1answer
62 views

Find all intersections of a LineString and a Polygon and the order in which it intersects it

I would like to find out all intersections of a LineString (River) through Polygons (Municipalities). I would like to list the order of municipalities which the river crosses, using linear ...
3
votes
0answers
24 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 ...
0
votes
1answer
21 views

Linestring in OpenLayers doesn't draw

I don't understand why my code doesn't work. If the map is displayed, the line is never drawn: <script> var long_deb = -1.28627; var lat_deb = 43.49829; var long_fin = -1.29394; var lat_fin = ...
0
votes
0answers
24 views

Creating line-strings from points in MySQL

I am extracting the lat/long information from Geo-tagged images and storing them in MySQL. I want to get a line-string from the points, I looked into the GROUP_CONCAT() function but I am not able to ...
1
vote
1answer
35 views

Finding and merging lines that touch in PostGIS?

I would like to select and merge segments that touch like in the image below. My table contains single segments with their own id (shown in the figure), I just want to isolate single "group" of ...
5
votes
1answer
94 views

How to use ST_Difference to create linestrings from non-intersecting polygon boundaries?

There are two tables with polygon features in my PostgreSQL database. I want to create linestring features where the boundries of the polygons are not intersecting. CREATE TABLE schema.poly_a ( gid ...
1
vote
1answer
54 views

In PostGIS: how to split linestrings into their individual segments?

I have one table with many linestrings and I want to make a new table containing the individual segments of all the linestrings, no matter if they are grouped line per line or not. This is my ...
4
votes
2answers
58 views

Get the 2 points immediately before and after a given point in PostGIS

In the picture below: The given point is C, I would like to select A and B, but not Z (which is closer to C than B but it's not immediately after in the LineString). Note that C is always ON the line ...
1
vote
1answer
26 views

Finding zero-length LINESTRINGs the wrong way gives funny answer

I tried select st_astext(geom) from table where st_pointn(geom, 1) = st_pointn(geom, 2) But I get some results which don't match the criteria. For example: LINESTRING(-117.1642086 ...
1
vote
1answer
41 views

Determine points where a LineString meets the boundaries of a Polygon using Turf.js

Using Turf, I'm trying to determine the points at which a line (LineString) meets the boundaries of a polygon. Turf has the ability to do point-in-polygon/point-on-line and polygon intersections etc, ...
-1
votes
1answer
37 views

JSON to line string

I'm getting a JSON return like so: ...
2
votes
2answers
51 views

PostGIS - Merging linestrings into multilinestrings in a particular order

I have a set of linestrings, which I want to group into a single multilinestring, and in a specific order. However, when I use ST_Collect, it merges them out of order, like this: Geometries as ...
1
vote
3answers
75 views

How to remove identical lines from layer in QGIS?

I converted polygon layer to line layer using "Polygons to Lines" tool. Then I used "Split" function of the Networks plugin. What I need to do next is to remove identical lines that were shared ...
2
votes
1answer
63 views

How to export a CSV with lat lon WKT from a layer which is not in WGS84?

I want to extract a csv with lat and lon coordinates so I select -- Geometry AS_WKT but when the csv is created I see this LINESTRING (277054.55782319931 198725.03588318737,277052.43701817648 ...
0
votes
0answers
59 views

Drawing lineString in Google Earth API

I am able to draw a Polygon on the Google Earth API which is integrated in my website but i have to draw a lineString. Does anybody can help me? Here is the code i use to draw the polygon: function ...
0
votes
0answers
150 views

google maps api with polyline not displaying lines

I converted shape files into mysql table that has features like LINESTRING and MULTILINESTRING. I am using google maps api ( var shape = new google.maps.Polyline({path: ...
0
votes
1answer
97 views

Multipolygon From Multilinestring PostGis

I have been looking for a answer for days. I dont even know if its possible. Tried: ST_AsGeoJson(ST_MakePolygon(ST_transform(geom,4326))) ERROR: Shell is not a line ...
0
votes
1answer
126 views

MapServer: Symbol (v-line) style that automatically follows line direction

I created this image: with: MAP SIZE 1000 1000 IMAGETYPE png24 EXTENT -30 -10 60 30 UNITS DD SYMBOL NAME "v-line-shift" TYPE vector POINTS 0 0 5 10 10 0 END # ...
1
vote
0answers
51 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 ...
2
votes
1answer
161 views

How to detect if point is on the left or right side of the line in PostGIS

I have a linestring table and a point table in postgis. I know the closest line to any given point. What I need to know is on which "side" of that line is the point. I guess I have to do that by ...
0
votes
0answers
56 views

Drawing Lines Between Postal Codes in Fusion Tables

I'm using Google Fusion Tables and have two columns of corresponding postal codes. Fusion Tables automatically converts postal codes to coordinates (the centroids of each postal code) upon import. ...
1
vote
0answers
32 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 ...
2
votes
0answers
30 views

match noisy GPS data to closest linestring in road network [duplicate]

I have some noisy GPS data(Points) that they are not exactly on the road because of the noise. But I want to match them to the closest road linestrings. How to do this in PostgreSQL? Data: ...
3
votes
1answer
173 views

MySQL select linestrings into a multilinestring

I have a mysql column of linestring type with 2000 linestrings (high water mark values to be more specific). I want to merge them into one multilinestring so i can see what the shape of these values ...
0
votes
1answer
70 views

Spatial query ST_CONTAINS returns empty result

I want to create a database view in Postgres/PostGIS which returns a subset of the points stored in another table called locations. The subset is defined by an area stored in yet another table called ...
3
votes
2answers
107 views

Remove specific points from linestring postgis

I am working with a data set that has been using the (0 0) point to pad any points that were missing when the linestring was created. So now the query SELECT id, route as line FROM trips ...
2
votes
4answers
131 views

How to determine if two points are on the same side of a LineString?

I have two points, A and B, and a line string L. A line string is formed by a sequence of points such that consecutive points are joined by a straight line. This is the same as a LineString in Geos - ...
0
votes
0answers
69 views

draw coloured LINESTRING over map [.NET (C#) if possible]

I need to render linestring on the map (possibly OSM map) where each pixel (or at least segment) has assigned custom color. In my linestring, each point defining the line has also color definition. ...
2
votes
1answer
79 views

How to individually label points in Openlayers linestring?

I want to display some text below each point on a linestring with Openlayers. The text would include, for example, the coordinates of the point, plus some other information. I have managed to add a ...
0
votes
2answers
116 views

Create point on a line with given distance from end in PostGIS

Does anyone know how to create points along a line (MultiLineString geometry) with a given distance in PostGIS? I'd like to create points at a regular distance over a line, which represents a ...
2
votes
2answers
162 views

Merging linestrings in QGIS using PostgreSQL and PostGIS

I've to merge all linestrings from a PostgreSQL table "river" where not more than two start-/endpoints are overlapping. In the illustration below I use a "M" to mark all linestrings that needs to be ...
2
votes
1answer
52 views

Algorithm to remove Loops from a Line-String

I am using a third-party API to acquire a linestring representing a route. Occasionally, this API (which I will not name, here) returns a linestring that contains loops. Logically, this makes no ...
1
vote
0answers
61 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
1answer
91 views

ST_LineMerge doesn't return LineString

I want to create a LINESTRING from a MULTILINESTRING. However in the following case ST_MultiLineString is returned: Select ST_GeometryType(ST_LineMerge(ST_AsText(' MULTILINESTRING( (-70.52570888 ...
1
vote
0answers
57 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
1answer
78 views

What is the best way to get two points along the line in both directions using postgis?

I have a point on a linestring geometry (found by an intersection). What is the best way to get two points along the line in both directions using postgis? It does not really matter if the points ...
0
votes
1answer
248 views

Check if a point cordinate is between linestring cordinates

I know that, linestring is a vector and if i want to check that, if point cordinates are between linestring begginning and ending cordinates then i need to use vector comparison (x2 > x && ...
2
votes
0answers
44 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
49 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 ...
0
votes
1answer
105 views

QSpatiaLite Plugin: LINESTRINGZ(x y z, …) supported?

I get an error when trying to import this query as a spatial table in QGIS: select geomFromText('LINESTRING Z(13.091464 47.061328 2597, 13.092059 47.061287 2580)') as geometry 'The result can't ...
1
vote
0answers
58 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: ...
0
votes
1answer
67 views

Postgis: Conflation of two vector layers into a single layer

If I have table A that I consider to be definitive and table B that may have some elements missing from table B but also has geometries that are "close" to those in A that I want to ignore. How could ...
0
votes
1answer
138 views

How to transform isolines to isopolygons with postgis?

I have a table a postgis table of isolines that's defined like this: CREATE TABLE myisolines ( gid serial NOT NULL, isotime timestamp without timezone, val numeric(10,4), geom ...
1
vote
1answer
58 views

How to use gdal's “forceToLineString()” with Python

I'm working with Python and GDAL and I'm quite new to this ^^ For my script I'm looking for a method to convert a MultiLineString into a simple LineString. Example: MULTILINESTRING ((0 0,0 1),(0 1,0 ...
2
votes
0answers
182 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
1
vote
1answer
290 views

How to find a point on linestring and in a range of 10 meter

i have a linestring which is show in diagram and i have a point which is some time on the linestring or out of linestring but in range which is red line and some time its is out of range so how can i ...
1
vote
1answer
55 views

Index to speed up ST_HausdorffDistance?

When comparing similarity of linestrings with ST_HausdorffDistance (or another type of similarity function), is there a way to use an index to speed up the search for similar linestrings?
2
votes
0answers
255 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) ...
0
votes
1answer
150 views

Check if point is near a linestring Spatialite

I have a LINESTRING made of two points start point and end point in spatialite. UPDATE points SET road_geometry = GeomFromText('LINESTRING(24.889142 67.196188, 24.889673 67.196579)',4326) where ...
6
votes
2answers
199 views

What controls the direction of TopoGeometry Linestrings?

In PostGIS, what if anything controls the direction that topogeometry LINESTRINGs will have when converted to geometry? It doesn't appear to be the order in which the edges are listed in the call to ...