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
1answer
339 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
1answer
179 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
59 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
14 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 ...
3
votes
1answer
271 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
2answers
182 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
204 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 ...
0
votes
0answers
17 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
35 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
9 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
19 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 ...
3
votes
2answers
55 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
21 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
18 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
39 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
24 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 ...
1
vote
0answers
74 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: ...
4
votes
0answers
268 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 ...
1
vote
1answer
296 views

Using Python in Arcmap to partition strings [closed]

I have a title "Text that remains Proposed Thing to replace" var_a = New Text I want the output to be "Text that remains Proposed New text" Currently outputs this "(u'Text that ...
3
votes
3answers
3k views

Creating point to 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?
13
votes
4answers
268 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 ...
2
votes
1answer
55 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
0answers
481 views

How to add an offset to a GeoJSON layer in Leaflet?

Using the example GeoJSON tutorial code at leafletjs.com. Change the myLines variable so that the two lines overlap, but run in opposite directions as follows: var myLines = [{ "type": ...
2
votes
1answer
80 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 ...
6
votes
1answer
5k 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
2answers
135 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 ...
2
votes
1answer
68 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 ...
5
votes
1answer
105 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 ...
7
votes
4answers
5k 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 ...
1
vote
2answers
240 views

Densify a JTS LINESTRING (add points)

I have a LineString I would like to "soften" in a way that if two coordinates (vertices) in the LineString are very far apart, I want to automatically add some coordinates in between. The line ...
3
votes
0answers
28 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
28 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 = ...
1
vote
1answer
84 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 ...
4
votes
2answers
72 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 ...
4
votes
1answer
1k 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 ...
1
vote
1answer
145 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 ...
1
vote
2answers
182 views

How to get the LineStrings from a MultiLineString

I was wondering if there is a way I can extract the LineStrings from a MultiLinestring object. What I am really trying to do is look into a MultiLineString and see if I have a certain LineString. I ...
6
votes
2answers
210 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 ...
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 ...
1
vote
1answer
101 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
44 views

JSON to line string

I'm getting a JSON return like so: ...
0
votes
1answer
188 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 # ...
5
votes
2answers
397 views

Counting self intersections of linestring using PostGIS?

Is there a way of using PostgreSQL + PostGIS for finding the number of self intersections in a linestring? I have a linestring that goes forward but in circles, and I need to find the number of times ...
2
votes
2answers
86 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
90 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 ...
5
votes
0answers
234 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
2answers
362 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 ...
2
votes
1answer
83 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
77 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
226 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: ...