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.
2
votes
1answer
41 views

Delete duplicate polygon nodes with PostGIS

I'm trying to delete duplicate nodes from a shapefile with QGIS, but after running the tool to delete it, nothing happens and shows the same errors. I thought that maybe importing to postgis could be ...
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 ...
2
votes
1answer
49 views

Spike finder in PostGIS

I tried to modify spikeRemover from Schmidt & Krüger. My goal it's to obtain, for each polygon, the position of the spikes. I don't need to remove it. For some reason, that I can't figure out, my ...
0
votes
1answer
45 views

Extract address data / Query point in administrative boundary

I try to create a DB in postgreSQL with all the postal adress data for a specific country. Actually I have this table full of data: id integer NOT NULL DEFAULT nextval('plz_id_seq'::regclass), ...
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 ...
3
votes
1answer
88 views

polygon from exterior points

How to convert points data to polygon, so as to form polygon from exterior point as shown above
0
votes
2answers
169 views

GeoServer create layer from PostGIS (data type point)

(Several days ago a user on gis stackexchange suggest that I should use OpenGeo (I was using geojson before). I succeed at what I was doing at that time, but now I have a different problem.) I was ...
0
votes
0answers
27 views

Multiple Centroids within a dataset based on distance

Is there a way that we can find out the centroids of clusters within a dataset while differentiating one cluster from other based on distance not on any attribute value. The dataset is present in ...
6
votes
1answer
204 views

How can I transform polylines into points every n metres in PostGIS?

Question in pretty much the same as this, but I need to use PostGIS. I have a number of polylines, and want to trasform them into points every n metres along these lines. edit: Thanks a lot to ...
2
votes
4answers
138 views

Linking up GPS points taken from rail network

Bit of a newbie here, trying to work out whether any PostGIS functions can help with my task. Apologies in advance if my use of GIS terminology is not up to scratch yet. I have a large database 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: ...
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
148 views

Alternative to ST_ClosestPoint, one which returns a vertex of the geometry

ST_ClosestPoint returns the closest point on a geometry, as in the example at http://postgis.net/docs/ST_ClosestPoint.html What I need is to get the closest point which is already a part of the ...
4
votes
1answer
421 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 ...
2
votes
0answers
44 views

Update PG table setting an area_id

I have a table with lots of points which I'd like to update and set a consecutive area_id to every point "group". I define a point "group" as points that are within a 500 meters radius. The raw table ...
1
vote
1answer
301 views

Postgresql view with Point geometry returns QGIS error “(the_geom) sql = is an invalid layer and cannot be loaded”

I want to create a Postgresql view using point data. When I create the view, the geometry_columns table updates appropriately. Attempting to load in QGIS produces the error “(the_geom) sql = is an ...
0
votes
0answers
27 views

Bounding Boxes around nearby points [duplicate]

I've got a table with 200.000 points. My aim is to draw bounding boxes around points where this point have the same name and that are in a maximum distance of 500 meters to each other. I guess I can ...
5
votes
2answers
294 views

How to detect duplicates and keep only one?

I've got a table with lots of points (200.000). Some of them are duplicates (not exactly but e.g. a metro station has eight entrances) and I want to keep only one of these metro entrances. I am able ...
1
vote
2answers
900 views

How to select all points within a circle in PostGIS?

I have set of points in a PostGIS Table (Type Geometry). Now, I need to filter points that lie in a circle with a center (C) and radius (R)! I expect C to be of type Point or Coordinates.. R to be ...
1
vote
0answers
48 views

windows function with points in a mixed (multipoint/point) table

I have a table comprising multipoints (tracks) and points (stops between tracks). there can be several consecutive multipoints. now, i want to merge any points lying very closely to each other ...
2
votes
1answer
104 views

Is it possible to update only latitude or longitude in postgis ?

I have a postgis database that contains Points created based on a couple (longitude, latitude), and I need to update only one of those two for a given point. I found that it's possible to do so but ...
1
vote
1answer
763 views

PostGIS, create line from points

I have a PostGIS table with position data of numerous vehicles and want to create lines from these points. Data can be selected by vehicle id and ordered by timestamp but how to create lines from the ...
-1
votes
1answer
283 views

QGIS and Python - create line with multiple points in postgis [closed]

How can I create a line, with Python functions, with many points that are records in Postgis? Thank you
1
vote
1answer
306 views

Aggregate points with same values to polygons

I have a shapefile with 2M measurement points (each measurement point has a resolution of a 1/10). How can I aggregate points around each other if and create polygons out of it? They do not have to ...
0
votes
2answers
120 views

Manually add a new point to PostGIS table [duplicate]

I did accidently delete a table row - or well, in fact a whole subway station. My attempt to solve the problem was this PostGIS function: ST_GeomFromText('POINT(coordinates)') But then PostgreSQL ...
2
votes
1answer
4k views

Make POINT from longitude/latitude coordinates from existing table in PostGIS

I would like to make a POINT using the longitude and latitude columns of an existing table. Here's a link to the documentation of ST_MakePoint. Here's my table: CREATE TABLE sysinst.bio ( oid ...
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. ...
2
votes
3answers
959 views

Calculate min distance between points in PostGIS

I have point layer in PostGIS database. Help please with query which add for each points in layer distance in attribute table between this point and another nearest point. Thanks! Update Calculate ...
2
votes
1answer
283 views

Postgis 1.4 - Obtain closest point of point over polylines layer (without st_ClosestPoint)

I´ve got a polylines layer (pipes) and a points layer (valves) and In Postgis 1.4 I would like to obtain the closest points but exactly on the closest polyline. In other words, i need to locate each ...
6
votes
2answers
954 views

QGIS or Postgis - How to split polylines with a point layer?

In QGIS, I would like to split the polylines in a layer loaded in the workspace with the points in another loaded layer. If a point intersects a polyline, this polyline should be transformed into two ...
1
vote
2answers
429 views

QGIS create layer with the points of the beginnings and ends of a polylines layer (without duplicate points)

In QGIS, i would like to create a new layer containing the beginning and end points of a polylines layer, but without the duplicate points that would result of adjacent polylines.
3
votes
3answers
1k 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
1answer
304 views

How to connect particular sets of points with (poly)lines?

I think my problem is quite easy to be solved by the most postgis-users, but i am a bloody beginner: i have a timestamped point-table representing GPS-tracked places of different cars. To distinguish ...
5
votes
1answer
408 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 ...
8
votes
2answers
714 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)
10
votes
2answers
392 views

How to identify and simplify point clusters with regard to time in PostGIS?

I just started to work with spatial databases and I want to write a SQL(PostGIS) query for automatic generalizing of raw GPS-tracks (with fixed tracking frequency). The first thing I am wokring on is ...
1
vote
4answers
587 views

How to find the center point of MULTILINESTRING?

How to find the center point of MULTILINESTRING, which lies on the multiline?
1
vote
2answers
1k 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 ...
2
votes
2answers
2k views

PostGIS convert geography(Point,4326) to GPS

I got a database with a column of type geography(Point,4326), the data contained looks like 0101000020E610000092E057F66EF73140930035B56CBD4840. How can I convert it to GPS coordinates?
5
votes
1answer
188 views

Given 2 LINESTRINGs with common point, how to extract common point?

I have 2 LINESTRING geometries. I know both share a common point. Using PostGIS for Postgres, what is the cleanest way to extract the common point? Example with illustration: How do I extract the ...
2
votes
1answer
362 views

How to create a point table from a remote csv file?

The current approach that I am using to load a csv file into a PostGIS enabled database on a server is the following: -- create table CREATE TABLE points( id int, lat double precision, lng double ...
3
votes
1answer
2k views

convert list of points to line or polygon

I have a list of Points in a PostGIS table. The rows can be grouped by a date something like: myTable id INT date DATE lat NUMBER lng NUMBER geom GEOMETRY(POINT) now I need a table where all ...
2
votes
1answer
429 views

PostGIS - table with 3d points with fast ordering by distance

I am pretty new to PostGIS and I am trying to solve the following problem. I need a table with 3D points (x,y,z) that will contain around 1-10million points. I want to be able to efficiently ask the ...
7
votes
4answers
908 views

Output PostGIS geometry data as centroid or polygon depending on zoom level (GeoServer)

This is what I want: when I zoom out, cities of the country should appear as points and at a certain level when I zoom in, I want them to appear as polygons (showing the area of the city and ...
5
votes
1answer
4k views

Simple PostGIS ST_Distance query for two points from the same geometry table?

Note: This question was published at Stackoverflow at first. I have a geometry table points_table with SRID 4326 and a few points in it. I need to find a distance between a pair of points (features) ...
2
votes
3answers
545 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
2answers
678 views

Total great circle distance along a path of points (PostGIS)

I am looking for an SQL query that sums the distances between a series of points using PostGIS. The situation is as follows: I have 2 tables: tracks and points. Points belong to a track and thus ...
8
votes
2answers
1k views

PostGIS raster value of a lat/lon point

I have a tiff raster in my PostGIS 2.0 database. I want to get the value of the raster at a specified lat/lon point. I have: postgresql-9.1 postgis-2.0-svn with raster support a raster imported ...
7
votes
2answers
3k views

PostGIS: Find points that lie within a set of coordinates

I have a PostGIS db, and I want to find the points that lie within some region (a bounding box). I have two sets of coordinates, from which I can get all four rectangle points that form the box (if ...