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
1answer
86 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
225 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
468 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
132 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
49 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
305 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
527 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
283 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 ...
4
votes
1answer
477 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
261 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
133 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:- ...
2
votes
3answers
569 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
156 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
251 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
118 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 ...
1
vote
1answer
680 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
483 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, ...
1
vote
1answer
363 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 ...
4
votes
0answers
420 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
562 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
131 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
421 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
286 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
1answer
167 views

Openlayers Linestring over edge of map

im trying to create a route displayer for ships. But im struggling with the edges of the map. When going from ie. 179* to 2* it displays a line across the entire map, instead of displaying it on the ...
1
vote
0answers
489 views

Line to Polygon via Polygonizer in QGIS

My question is in the same vein as this one. I'm attempting to convert precipitation lines (Precipitaci├│n Media Anual) to a polygon for Mexico in QGIS using the Polygonizer plugin. After running the ...
1
vote
1answer
338 views

Why ignores Google Earth the gx:altitudeOffset in KML files?

I am currently writing software that creates 3D polylines and outputs these in KML format. According to the official documentation it is possible to define an altitude offset via gx:altitudeOffset to ...
3
votes
0answers
180 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
0answers
412 views

How to merge linestrings which are connected with each other?

I would like to join linestrings which are connected to each other. The preferred output is a longer linestring based on all joined single linestings! The table that holds my single linestrings is ...
1
vote
0answers
179 views

Break LINESTRING values in postgis into mutiple LINESTRINGs

Figure A below is the visual representation of what i have in my road data set. Line 1, Line 2, Line 3 in illustration are each represented as 1 row postgis DB inside a geometry column, some of these ...
1
vote
1answer
84 views

How to get routes in the database that intersects circle?

I have routes (linestrings) recorded in the database. I want to create a query which returns the routes that have some commonality with a circle whose center and radius are passed as parameter. I ...
0
votes
1answer
574 views

how to find vertices for a geometry in OpenLayers

I am having a LineString, where I need to find the vertices logically and save those vertices. Can anyone help me out. Or else how below can help me. OpenLayers.Geometry.LineString = ...
4
votes
1answer
1k views

How to create polyline of varying distance from origin point using azimuth?

I am looking for a Python script that does the following: Uses a point (from a point shapefile) as the origin. Creates about 3 km line from point Based on an azimuth provided in the original point ...
2
votes
1answer
97 views

What is the PostGIS function for retrieving buildings by road side?

I want to get information of buildings by the road side only. Assuming that the building table has multi-polygon geometry and the road table has multi-linestring geometry, what would be a pgSQL Query ...
8
votes
1answer
304 views

How to rank polylines according to their similarity to a ref polyline?

How to rank polylines according to their similarity to a ref polyline? Update 1: simulations show that simple $\sqrt{\sum{(case-ref)^2}}$ can find better similarity between polylines (as set of ...
5
votes
1answer
312 views

How do you fix Overlapping Lines?

I have a line dataset that contains some lines where the "end points" are actually found in the middle of the line. In the image below, the nodes are shown in green and one of the end points in red. ...
1
vote
0answers
643 views

How to handle postgresql/postgis geometry type errors in a function?

I have created the following function in PL/SQL to make a polygon from a set of linestrings: CREATE OR REPLACE FUNCTION _myfunction( _fid integer, _rid integer ) RETURNS VOID AS $$ ...
3
votes
3answers
2k 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
2answers
1k views

Create point to a 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? Cheers, Sanna
5
votes
1answer
429 views

adding multiple points to a linestring in PostGIS

Though a newbie to PostGIS, I'm having trouble solving something that I think should be farily straightforward. I have two linestring tables, both consisting of simple, 2-node line objects: one has ...
3
votes
1answer
226 views

Polyline “breakage” calculation in MapInfo?

I am a novice MapInfo user, with a basic to moderate knowledge of queries and SQL. My work entails doing risk assessments for shipping traffic based on AIS-tracks (radio-based vessel information ...
8
votes
2answers
757 views

How to add vertices to existing linestrings?

If I have Linestring(1 2, 1 5, 1 9) and a Point(1 3) Is there any function that can merge linestring and point preserving the order so output would be: Linestring(1 2, 1 3, 1 5, 1 9)
3
votes
0answers
757 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 ...
7
votes
1answer
252 views

How to see what lines have changed in an updated Shapefile?

I'm using my county's GIS data to update the roads in OpenStreetMap. I have a copy they published last year and one that was just published, and I'd like to find all the LineStrings that have either ...
0
votes
1answer
234 views

What is the fastest way to identify the two nearest linestrings using PostGIS?

I want to be able to identify the closest roads to two points that are generated through geocoding (a start and end address). The points will likely be near a linestring. Two approaches that I have ...
1
vote
2answers
2k views

How to offset point perpendicular to line direction in PostGIS

I have a postgis table of points, that are sitting on road centerlines (I've linear referenced them). And the second table with road centerlines themselves. The point table also has a field roadid and ...
3
votes
3answers
2k views

How to delete duplicate lines?

I was wondering if anyone could help. I have a tab file in MapInfo consisting of just polylines. Each is meant to have its own reference number, however some are duplicated (e.g two lines occupying ...
6
votes
3answers
551 views

How to generate geodesic linestring from two points in C#

I'm looking for a FREE C# class, library or set of functions that will allow me to generate a geodesic linestring (or array of vertices, whatever) from two decimal degree points. I've found ...
1
vote
1answer
3k views

show a Collection of LineStrings with labels

I use the following peace of code to show multiple LineStrings which have a point as the last one, along with a label: var strokeColors = [...];//"#FFAACC" kind-of elements var linesLayer = new ...
4
votes
1answer
84 views

Rasterise heights from a 3D linestring

I have a 3D network of streams represented using linestrings with Z-coordinates. I would like to rasterise this feature, where the raster values represent the linearly interpolated Z-values between 3D ...