Tagged Questions
1
vote
1answer
50 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
116 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 ...
0
votes
0answers
28 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 ...
1
vote
1answer
83 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
1answer
102 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
1answer
89 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?
6
votes
4answers
237 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. ...
1
vote
0answers
123 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
88 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
56 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 ...
3
votes
1answer
155 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 ...
2
votes
1answer
78 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 ...
1
vote
0answers
186 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 $$ ...
1
vote
1answer
236 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 ...
3
votes
3answers
314 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 ...
4
votes
1answer
216 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 ...
6
votes
2answers
189 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)
1
vote
2answers
479 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 ...
4
votes
1answer
591 views
PostGIS geometry intersection test results different for Point and Linestring
Can anyone please tell me what I'm doing wrong, and how do I avoid the problem? I'll attempt to clarify what I'm doing as things go along.
The geom column is a multipolygon column, all values are ...
0
votes
1answer
98 views
Postgis reorder mixed up linestring chunks / max_segment_length(linestring)?
I imported ~1000 paths from somewhere into my postgis database to a linestring field.
I had the problem that the paths were divided into chunks, and those chunks were mixed up in some cases.
Suppose ...
2
votes
1answer
435 views
How to detect overlapping linestrings in PostGIS?
I'm looking for the fastest way to detect whether a given linestring overlaps another linestring. (As reference, let's say my wife and I both go for a run and take different routes, I'd like to detect ...
2
votes
1answer
350 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 ...
3
votes
1answer
373 views
clip linestring by length
Is there a way to clip a linestring based on distance?
For example, linestring from a to b is 150 meters. I would like to get the linestring from a to a point that is is 75 meters away from a ...
5
votes
1answer
464 views
How to merge linestrings that don't touch based on common name?
I had a table of road line strings that contained duplicate road names with different geoms for different line segments. I extracted the duplicates to another table. I now want to join these segments ...
3
votes
2answers
232 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
96 views
Access points with PostGIS
I have a PostGIS table with linestring geometries and point (A) on it and I need to detrimine points (M) which located M meters from A. Distance is measured along linestrings. Any thoughts?
1
vote
1answer
438 views
Converting LinestringM to Polygon PostGIS
I'm working with PostGIS and plotting polygons on a Google Earth plugin. I've found a few examples via Google on how to convert a LinestringM to a Polygon for rendering, but none of them, including ...
3
votes
1answer
466 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?


