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
78 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 ...
3
votes
1answer
73 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 ...
1
vote
1answer
64 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
42 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 ...
2
votes
2answers
113 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 ...
3
votes
1answer
243 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 ...
4
votes
2answers
108 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 ...
0
votes
2answers
128 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: ...
2
votes
2answers
68 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
0answers
45 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 ...
1
vote
1answer
27 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 ...
2
votes
0answers
42 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
48 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
39 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
70 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
62 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
49 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
87 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
vote
1answer
58 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 ...
-1
votes
1answer
53 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
498 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
41 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
40 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
158 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
156 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
83 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
808 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
32 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
186 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 ...
6
votes
4answers
444 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. ...
3
votes
1answer
242 views

PostGIS: Using a polygon to 'mask' linestrings returns both multi and linestrings

I have a table of linestrings (OSM roads, in fact) that I'm displaying on a map. I want to filter them so that only those within a certain area are displayed- I've already done this with the coastline ...
3
votes
1answer
289 views

How to create linestrings with a definite angle and length, that are fixed to a point

I want to create linestrings with a definite angle (e.g. 160°) and length (e.g. 2m) that are fixed to a number of points of another linestring. So, I want to use the ST_DumpPoints function to find the ...
1
vote
2answers
125 views

Extract a LineString from LineString by two Points

I am using PostGIS2.0 and PostgreSQL9.3. I have LineString in Spatial-Ref 4326 like geom:= ST_GEOMETRYFROMTEXT('LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 ...
1
vote
2answers
93 views

Mapserver - label at beginning of line string (WMS)

I am creating a WMS service made up of linestrings pulled from a POSTGIS database I want to label the start of each line with a sequence number. At present I can label the centre of each with:- ...
0
votes
0answers
132 views

Computing percentage of similarity between two line strings using python shapely

I'm quite new to shapely, been tinkering with it and I have a necessity to compare two line strings and see what percentage of them overlap. The geographic coordinates come from two different systems. ...
0
votes
0answers
27 views

How to split a feature using GDAL

I want a feature to be cut into 2 or more based on deviation of a segment i.e., the angle between 2 successive segments. At places, I may also require to merge 2 or more features.
2
votes
3answers
485 views

How to create a efficent linestring out of geography points using postgis

I'm trying to create a linestring out of geography points. At the moment I'm doing it like this: select ST_GeographyFromText(ST_Makeline(a.record_point)) from ( select (record_point::geometry) from ...
0
votes
2answers
101 views

postgis linestring segmentation

How can I divide a single postgis linestring with SRID 4326 into segments (preferably an array of linestrings) with no segment longer than a given distance? I've tried st_segmentize(), but it spits ...
0
votes
2answers
177 views

How to create a MultiLineString feature with a postgis layer in QGIS

I have troubles handling with MultiLineStrings in QGIS. I added the table where I defined a column as geometry(MultiLineString, 31468) as a postgis layer in QGIS. Now I want to create features with ...
1
vote
2answers
93 views

Frequency of partially or fully overlapping lines

Let L be a set of line-segments (lines) in a two-dimensional (2D) Euclidean space that are randomly (say, using uniform random function) distributed, that is, some may overlap other(s). Overlapping ...
0
votes
1answer
342 views

How to find the intersection point of polygon geometry and multilinestring geometry in postgis

I have a polygon geometry and multilinestring geometry. How do i find the intersection of both these geometries. Both the geometries are in same reference system. Does st_intersection gives me the ...
1
vote
1answer
315 views

From a trajectory of GPS points to a multiline segment

Given a trajectory as a sequence of GPS points I would like to create a smooth linestring representing a path where a car drove. The data is stored in postgresql: the input trajectory in a table, ...
0
votes
0answers
100 views

OpenLayers Copy Feature without Geometry Duplication

I am working on an OpenLayers project with considerable amounts of geometry data for linestrings. I would like to create a duplicate of the features within a vector layer, but have this duplicate ...
1
vote
1answer
167 views

how to split a line by a point which is on the line but not in the linestring itself?

i need some help with the following: i have a linestring - geom i have $lat,$lon (using some php syntax) i have an osm table with the roads geom, i am trying to get closest point, and then split ...
3
votes
0answers
323 views

ArcGIS Kernel Density with polyline, search radius / bandwidth calculation

I'm conducting a density analysis of a series of polylines and I'm hung up on determining an appropriate search radius. The default calculation performed by arcgis is to take the shorter dimension ...
3
votes
1answer
541 views

Find polygon that contains all linestring records in PostGIS table

I'm still pretty new to this stuff, so bear with me. In PostGIS how could I find a polygon that would contain all the linestring records in a given table?
0
votes
0answers
91 views

Diferent Line color and Diferent Markers at the same time

i'm about to develop a GIS Track App, but until now, i'm testing with some codes, that i've been creating, but for my project we are going to use XML as data records, today, i am able to create a ...
0
votes
2answers
302 views

How to split a linestring every 1000 points in postgis

To assume compatibility with my survey software, I would like to lighten geometries of my linestrings by cutting them every 1000 points without creating or interpolating points. I transformed a ...
2
votes
1answer
203 views

How to Blink a line on a map similarly like a point blinking on map through lat lon points

how to blink a line on a map which is formed by lat lon points through linestring from database the points(lat,lon) comes which is stored in form of MultiLineString. similarly like how a point ...
0
votes
0answers
44 views

Join Geological Linework based on shared attributes while obeying rules

I'd like to join all adjacent geology faults within a table if they share the same attributes in f_type, f_class, f_name and f_conf columns. However I don't want to join adjacent lines with equal ...