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

1
vote
0answers
11 views

OpenLayers - Add points at vertices of line while drawing line

I would like to create points while I draw a line on my map in OpenLayers. That is, at each vertices of a line and at the end points there is a shape like a square, circle, or diamond. I have this ...
3
votes
1answer
83 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
1answer
42 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.
1
vote
0answers
35 views

PostGIS - Intersects feature to split into linestring

I would like to know if it's possible to intersect feature datasets (multipolygon, polygon, multilinestring and linestring) to get a result as a set of linestrings being split at each intersection ...
2
votes
2answers
5k 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? ...
0
votes
1answer
15 views

ValueError when instantiating LineString from a mix of tuples and Point objects

I'm new to Shapely, and tried instantiating a LineString object from a mix of tuples and Point objects like this: >>> LineString([Point(1,2),(2,3),Point(3,4),(5,5)]) I get the following ...
2
votes
0answers
26 views

Showing Linestring from SQL statement with CartoDB

I have cartodb sql statement to return what polygons are intersected by a linestring, but I'd like to have the linestring visualized over the polygons on the results. Also not add the linestring to ...
1
vote
1answer
45 views

Distance Between Two Points vs Length of Linestring

So I have two points that I want to calculate the distance between. If I use: SELECT ST_Distance_Spheroid(point_a, point_b, 'SPHEROID["GRS 1980",6378137,298.257222101]') / 1000 FROM ( ...
1
vote
0answers
19 views

Linestring to CartoDB api

I want to add a linestring to a CartoDB API web app for one time use, I have SQL statement being ran at the same time and just want the linestring in the SQL statement to be displayed.
3
votes
1answer
301 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 ...
0
votes
2answers
204 views

Create multi-line from point in PostGIS

I'm working on an old table where polygons are stored as points. Now, I want to migrate these points to PostGIS and store them as polygons (or multi-polygons). The table structure is as follows: ...
1
vote
1answer
81 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 ...
1
vote
0answers
18 views

Display linestring on Cartodb with SQL

I have a Cartodb api for a separate map, I need to display a linestring for each time the sql is run, but not store the linestring in the database.
1
vote
1answer
49 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 ...
3
votes
3answers
402 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 ...
1
vote
2answers
33 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 ...
2
votes
1answer
59 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 ...
0
votes
0answers
28 views

Offset WGS84 linestring based on pixel values

I would like to split up some roads based on their driving direction. For this, I need to offset the roads 2 pixels to the right, in the direction of the linestring. I have the coordinates in WGS84 ...
0
votes
0answers
23 views

Know if MBR contains any POINT of LINESTRING

I have a table with a Geometry column. This column only has LINESTRING. This LINESTRING only has two POINTS. If i have a MBR, i need to know which of LINESTRING of my Table has some of its POINTS ...
2
votes
1answer
42 views

How to extend a straight line in postgis?

I have a postgis table of simple linestrings, each one is a straight line with just two points. I want to select every linestring, but extended from both sides by 1 meter. So i have lines, that are ...
0
votes
1answer
22 views

Geometry conversion problem.Data loss

I was trying to convert a roadnetwork table.Its geometry contains both MULTILINESTRING and LINESTRING.I converted all the MULTILINE string to Linestring using the query update all_india_merge set ...
1
vote
0answers
111 views

PostGIS: How to distinguish overlapping routes (i.e., LineStrings) based on their direction?

I have a set of routes which are represented by LineStrings in my PostGIS database. These routes represent journeys that people make. I want to come up with routes that (a) overlap, and (b) have the ...
0
votes
0answers
39 views

Multiline String to Linestring conversion

I have road network table which is multilinestring.I was trying to convert this file to Linestring using the following query ALTER TABLE multiline ALTER COLUMN the_geom TYPE geometry(linestring,4030) ...
2
votes
2answers
146 views

OSM linestring shown as point

I have loaded the following file http://openstreetmapdata.com/data/coastlines to postgreSQL. In visual studio with gdal/ogr and geos enabled: SELECT geom FROM waterpoly WHERE geom IS NOT NULL LIMIT ...
4
votes
2answers
350 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 ...
1
vote
2answers
161 views

Cannot st_linemerge a multilinestring because its not properly ordered

i have a MultiLineString which i created by using st_union in many steps. Each of them are connected to each other according to their points, but the order is not correct. So ST_LineMerge is not able ...
4
votes
1answer
113 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 ...
1
vote
1answer
101 views

How to cluster similar lines in PostGIS?

In PostGIS I have a large database of linestrings which I have obtained using ST_makeline function. I would like to cluster similar lines based on where the lines start and end. Here is an example ...
4
votes
1answer
113 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
2answers
151 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 ...
2
votes
2answers
113 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 ...
1
vote
1answer
31 views

violates check constraint

I try to add a constraint based on geometry type to a "street" table that prevents anything except Linestring geometry or Null. alter table streets add constraint streets_geom_linestring_chk ...
3
votes
0answers
66 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 ...
0
votes
1answer
71 views

Why are some OSM GPX line string endpoints connected?

I am working with GPX files from OpenStreetMap to render the public transportation lines of Berlin. I converted them to GeoJSON using the togeojson script. For some reason some of the lines are ...
0
votes
0answers
73 views

Maximum number of points in a linestring?

I have a database (in Postgres/PostGIS) of GPS points recorded all over a rail network. The only data available is the lat/long coords of each point (no timestamps, links between points, or anything ...
2
votes
0answers
123 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
158 views

How to use makeline() function for more than 2 points in spatialite?

Is it possible to use makeline() function to make linestring geometries in spatialite for connecting more than 2 sequence points? Suppose I have four sequence points P1, P2, P3, P4. Or are there any ...
0
votes
1answer
64 views

Can I use Point as the geom type in pgrouting?

in my table i have the field geom(POINT, srid) and its populated, this table also have the source an target field witch is blank(just like pgrouting guide). I tried the function pgr_createTopology() ...
3
votes
1answer
118 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, ...
-1
votes
1answer
68 views

Simplify table of linestrings

I have a PostGIS table of linestrings representing a road network. I want to simplify the geometries such that only lines that connect road junctions are stored. At the moment the table has a large ...
3
votes
2answers
633 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?
0
votes
1answer
47 views

Line style width property not being applied in QGIS 2.0.1

I change the line width of my style and click apply, but the property does not seem to be applying to my line data.
1
vote
1answer
78 views

Separating distinct lines in PostGIS

I have a table of linestring segments in Postgis. These segments make up distinct non-intersecting lines as shown by the diagram. To add confusion the direction of the linestrings are not uniform. I ...
0
votes
1answer
206 views

Linked point geometries to linestrings in Spatialite

I have been parsing Canada's radio system frequency open data. It's a single large table per province, containing point geometries for each station callsign. Where a point-to-point link is defined, ...
2
votes
1answer
367 views

PostGIS: Calculate the length of just the portion of linestring that intersect with a polygon

I want to calculate the portion of the linestring that lies within the limits of a polygon. Better with an image What is the length of the portion of linestring within Province A? and within ...
0
votes
1answer
118 views

Defining a WHERE clause from a subquery for a query to create a handy view

It is about my implementation from an answer of this question. It is more an postgresql issue than a GIS issue, whereas it is about geometries and spatial queries. I want to create a view from the ...
1
vote
2answers
1k views

How to find the nearest line from a point?

I have a table of Roads in PostGIS which geometry is "geometry(MultiLineString,4326)". Its attribute are gid osm_id name ref type oneway bridge maxspeed geom Now i want to know ...
1
vote
1answer
39 views

PostGIS | Get degrees clockwise from north of a linestring's beginning and end

I have a table full of linestrings in PostGIS. I would like to know the degrees clockwise from north of the starting point of the linestring and also of the end point. I was thinking that maybe ...
4
votes
2answers
265 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 ...
7
votes
4answers
506 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. ...