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

0
votes
0answers
29 views

Select all lines between two points

I need some ideas to solve the problem selecting all "lines" between two "points" using SQL Server. I have tables: Lines (line_id, geom) and Point (point_id, geom) I want to select all Lines between ...
0
votes
1answer
17 views

Turn a GeoDataFrame of x,y coordinates into Linestrings using GROUPBY?

I have a dataframe of X,Y coordinates that represent points along the paths taken by several different entities. Pseudo-data here, but it is roughly of the form: entity_id lat lon time 1001 ...
3
votes
2answers
173 views

How to compare polygon boundaries in PostGIS?

I've to compare two polygon layers, 'land_use' and 'land_parcels', in PostGIS. My aim is to create linestrings, where boundaries of 'land_use' polygons do not match boundaries of 'land_parcel' ...
1
vote
1answer
219 views

How to combine LineStrings using JTS

I want to combine LineStrings with common points. The scenario looks like this: I tried it using the GeometryCollection.union() method like suggested here: http://docs.geotools.org/latest/userguide/...
2
votes
1answer
63 views

How to split overlapping linestrings?

I'm new to PostGIS and a bit lost... I work with linestrings that sometimes overlap, for example: I'd like to distinguish these linestrings by splitting them like Google Maps do: I was thinking ...
1
vote
1answer
71 views

QGIS show labels in beggining or ending points of Linestrings

I've got a Linestrings layer. Each Linestring has among other fields, these ones: id ENTRY EXIT 1 S1 E2 2 S1 E3 3 S1 E3 4 S1 E3 5 S1 E3 6 S1 E1 7 ...
0
votes
0answers
20 views

Move Dragged marker along a line String in Openlayers 3

I have a linestring and a marker on top of it. I want to drag the marker alonng the Linestring and restrict the movement only along the line. (cant drag to any other place on map). it should be ...
0
votes
0answers
19 views

Maximum likelihood Between 2 linestrings in Postgre?

I created a lot of linestring datasets and loaded them all in PostgreSQL, I want to compare said linestrings 2 by 2 using a maximum likelihood Query which would give me a coefficient proportional to ...
0
votes
1answer
41 views

Linestrings into one multilinestring

I have 2 tables "dijkstra_results_geo" and "dijkstra_results_geo_aggregate". I have a set of Linestrings in the column dijkstra_results_geo.geom_path_intermediaire (defined as geometry(Linestring, ...
0
votes
0answers
10 views

MSL/AGL bounds checking in PostGIS for Line/Polygon Intersection

I have a table with Polygons and columns defining an optional upper and lower altitudes bounds and altitude type. The Type can be MSL, AGL, or NULL, if unbounded, and can be set separately for upper ...
1
vote
0answers
33 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-...
3
votes
2answers
69 views

PostGIS - Get a point inside a line or polygon

I need to get the center point of a line or polygon to make marker for my app. So that when you click a marker the geometry appears (line or polygon). I used ST_Centroid to make it work. The result ...
2
votes
1answer
31 views

What does the GEOS LineString “normalize()” routine really do?

What does the GEOS LineString "normalize()" routine really do? GEOS has virtual void geos::geom::LineString::normalize() with the documentation: A normalized linestring has the first point which ...
1
vote
0answers
20 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 ...
3
votes
0answers
48 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 ...
1
vote
1answer
39 views

Convert KML polygons to lines

I've been given a KML file which should consist of linear features (train lines), but for some reason they're all represented as <Polygon> types. Each appears to have the right data, from end of ...
3
votes
2answers
309 views

PostGIS get the distance between two points over a linestring

I have a linestring: LINESTRING(-1.3326397 50.9174932,-1.3319842 50.9166939) and I select two points that lay on that linestring. I would like to get the distance between these two points (in ...
2
votes
1answer
59 views

Bring a list of unsorted linestrings in order so that they form a path from origin to destination

I have a table of linestrings together with some attributes that, when displayed all at the same time, represent a connected path from an origin to a destination (each linestring has one predecessor, ...
2
votes
1answer
127 views

Get LineString length in meters (Python, GEODjango)

In a Django model, I have a LineString field which holds GPS coordinates of a street route. I know that I the .length holds the length of the LineString, but I don't know what unit the returned value ...
13
votes
4answers
317 views

How to create lines to visualize differences between polygon features in PostGIS?

I've a PostGIS table polygon_b with some polygon features. There is also a table polygon_a which contains the same polygons as polygon_b but with minor changes. Now I want to create lines to visualize ...
5
votes
1answer
142 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 referencing....
3
votes
0answers
32 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?...
0
votes
1answer
37 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 = ...
2
votes
1answer
90 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
117 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
2answers
151 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
215 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 table,...
4
votes
2answers
78 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
28 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 34.2779308,-117....
1
vote
1answer
118 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
51 views

JSON to line string

I'm getting a JSON return like so: [{"lat":38.660274,"lng":-90.136198},{"lat":38.6613,"lng":-90.13860199999999},{"lat":38.664634,"lng":-90.141853},{"lat":38.664634,"lng":-90.141853},{"lat":38....
2
votes
2answers
112 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 ...
2
votes
3answers
95 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
94 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 198727....
0
votes
0answers
85 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
248 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: this.ll_(geometry.coordinates)})...
0
votes
1answer
229 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 ST_Polygonize(ST_LineMerge(...
0
votes
1answer
238 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
67 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 ...
4
votes
1answer
330 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
113 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
52 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
34 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
307 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
125 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
193 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
180 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 - ...
2
votes
1answer
201 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
211 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 ...
3
votes
2answers
227 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 ...