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

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
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 ...
6
votes
1answer
730 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": "...
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' ...
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 ...
2
votes
3answers
263 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 ...
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/...
0
votes
1answer
370 views

Check if a point coordinate is between linestring coordinates

I know that, linestring is a vector and if i want to check that, if point coordinates are between linestring beginning and ending coordinates then i need to use vector comparison (x2 > x && ...
4
votes
1answer
209 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 geometry(...
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
2answers
187 views

How to extract a new linestring vector from a existing multipolygon in QGIS?

What I want to do: create a new line (named linestring in Postgis?) from existing multipolygon layer in Postgis. Purpose: once these lines are created, I'll run some distance calcs from specific ...
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 ...
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 ...
3
votes
2answers
308 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
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-...
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 ...
1
vote
0answers
77 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,...
4
votes
0answers
280 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 st_geomfromgml('<?...
1
vote
1answer
303 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
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 ...
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 ...
6
votes
1answer
6k 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
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 ...
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 ...
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....
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 ...
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 = ...
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 ...
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 ...
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
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,...
1
vote
2answers
226 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
214 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 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....
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 # ...
5
votes
2answers
424 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
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 ...