PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
1answer
11 views

How to load the only selected features from the layer in postgresql to Qgis canvas

I am using the uri to load the layer from the postgres to qgis canvas but it is not loading the selected features without where condition it is loading the lAYER. canvas = ...
0
votes
0answers
18 views

Is it possible to use pgsql2shp utility in PL/pgsql environment?

I intend to use PL/pgSQL to generate calculation points on streets with respect to address locations. I am aware that using pgsql2shp utility, a shapefile can be generate using postgis query. I was ...
1
vote
2answers
372 views

Getting OSM maps in Equirectangular Projection via osm2pgsql

I'm trying to import some OSM data into psql as equirectangular projection using osm2pgsql with the following command: osm2pgsql -c -d osm -S /usr/local/share/osm2pgsql/default.style -l ...
1
vote
1answer
23 views

Convert 5-digit string number into a readable date in CartoDB

Based on a couple of assumptions here 1) I have about 6 clean formatted date columns imported from Excel that CartoDB converted into 5-digit strings. I cannot select 'date' in the column label. 2) ...
0
votes
0answers
13 views

Privacy solution in a table view [on hold]

i have a table with two key columns, which are user and privacy. My idea is to write table view to query my table with reference to the relevant column. I want a table view which shows following: ...
0
votes
1answer
13 views

How to instal Pg-Trgm on Windows?

I am currently working on a computer with windows 7 on it and i need to instal the Pg-Trgm module for postgresql 9-5. I have to admit that i am kind of lost here since i don't have any idea how to do ...
1
vote
1answer
76 views

How to add X/Y coordinates and count of overlapping points in a postgresql table?

How to add to my postgres/postgis table the following columns X coordinate | Y coordinate | count (number of points in same location) from an existing table populated with geometries type POINT
0
votes
0answers
35 views

ST_Distance between ST_Centroid and ST_Y

I'm trying to make a ST_Distance between a ST_Centroid and a ST_Y... But ST_Centroid is a geometry and ST_Y is a float. How can I make this? My query: SELECT ...
1
vote
1answer
61 views

Parse and load GPX into database? [on hold]

Having a PostgreSQL database, with the following tables: CREATE EXTENSION postgis; DROP TABLE IF EXISTS trips CASCADE; DROP TABLE IF EXISTS locations CASCADE; CREATE TABLE IF NOT EXISTS trips ( ...
4
votes
1answer
41 views

Import a shapefile to postgis with ogr2ogr gives: Unable to open datasource

I want to use ogr2ogr in order to import a shapefile in a postgis database. I have successfully installed ogr2ogr and I run from the pgsql the following command: ogr2ogr -f "PostgreSQL" ...
0
votes
1answer
48 views

In Postgres how to create columns with geometry?

I have point data stored in the postgis server and I need to create a new table with their geometry values. How can I extract their coordinates and translate them into a table. Something like: ...
9
votes
0answers
235 views

How to extract sublinestring from a linestring with overlapping segments

Problem statement: Given a bus route (defined as a linestring ln.the_geom), and a set of bus stop locations (pt1.the_geom,pt2.the_geom,...ptn.the_geom), divide the bus route into segments between bus ...
3
votes
1answer
70 views

PostGIS crosstab on multiple point tables

I have several point tabels, lets say 3. Tables are alike with two columns: a integer value and a geometry like: table sand1 (value int, geom geometry) table sand2 (value int, geom geometry) table ...
1
vote
1answer
37 views

Loading GML data into Postgres with ogr2ogr

I'm working with a new OS dataset, Highways Network, trying to get it loaded into Postgres and set up in some kind of usable state. I've loaded all the data already, but it seems some elements of ...
0
votes
1answer
27 views

Writeogr to PostgreSQL/PostGIS database with R

I'm producing some Spatialpolygondataframes with R that I would like to upload to my PostGIS Database. I've found out that the way to do this is via the writeOGR() function using the PostgreSQL ...
2
votes
1answer
179 views

How to transform isolines to isopolygons with postgis?

I have a table a postgis table of isolines that's defined like this: CREATE TABLE myisolines ( gid serial NOT NULL, isotime timestamp without timezone, val numeric(10,4), geom ...
1
vote
1answer
44 views

Where to use the shp2pgsql commands?

I need to upload some very large tables (over 10Gb) into Postgis so I actually found this link What is the best hack for importing large datasets into PostGIS? The DB manager is far too slow and only ...
1
vote
0answers
18 views

QGIS not loading default layer style from PostgreSQL database on startup

I have saved a vector layer style to my PostgreSQL database source. I then amended the layer_styles table record for the relevant layer by editing the styleqml field (just changed the outline_width ...
0
votes
0answers
19 views

run shp2pgsql command in c# application

I worked for a month on this command but in vain ; really if someone already tried to help me find the error , because when I load the application displays the message to me as the shapefile was ...
0
votes
1answer
1k views

How do I explode a MultiLineString using ST_Dump() in PostGIS?

I want to do what this blog post does: explode a MultiLineString into individual LineStrings. I'm using CartoDB but don't get individual LineStrings as the result of my query. I still get a ...
0
votes
1answer
26 views

How to edit a table in order to count the number of points in the same location?

Using QGIS, I have a point shapefile that has multiple points with same coordinates across different locations. I need a count of those points. For example there are 15 features that have the exact ...
0
votes
2answers
28 views

QGIS error in merging large point shapefiles

While trying to merge 2 large point shapefiles using the merge shapefiles tool under the data management. These point files have over 20Gb and have the same coordinate system. Problem is, that the ...
1
vote
2answers
41 views

Show results of ST_Union in QGIS

Currently, I am working on SQL in PostgreSQL and I execute query of vector data by "ST_Union" function for the spatial data. Now, I want to access the result of query in QGIS 2.14, but I can't. Is ...
1
vote
0answers
21 views

How to add fields to postgis layer loaded in qgis using python

I have loaded a layer from Postgis in qgis and I am adding the fields to the layer using the follo code snippet: canvas = qgis.utils.iface.mapCanvas() aLayer = canvas.currentLayer() field_name = ...
1
vote
1answer
51 views

Creating shapes/lines from geo coordinates in postgis

Following the suggestion from this topic I'm posting my question here. I have a table in postgres/postgis with geo data and I want to show them on map via qgis. Here is the table: city | street ...
0
votes
3answers
65 views

How can i use WFS in Openlayers 3 with mapserver and PostGis?

I didn't find a documentation to display features ( vectors ) combining MapServer ( mapfile ) and PostgreSQL/PostGIS and OpenLayers 3 ?
3
votes
1answer
256 views

Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination?

I am developing an web GIS for map data presentation for public. Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination or similar? More Details: ...
1
vote
0answers
11 views

I am using an example fracnsites to make a similar map but I don't under stand the ajax code?

I am using an example fracnsites to make a similar map but I don't under stand the ajax code? The example has js code: var map, fields = ["gid", "createdby", "featname", "feattype", "status", ...
2
votes
2answers
110 views

Load style from database in QGIS

Maybe it's a stupid question, but I don't know how to connect layer style with database in QGIS. When I save the style to postgres database in QGIS, it automatically saves the style in the table ...
0
votes
0answers
26 views

Problem with loop for pgr_Dijkstra

I try to use pgr_Dijkstra through Postgis and Pgadmin to find the shortest path in a network between a lot of nodes. So I thought I could to "automate" the process with a PLSQL query. Here is a query ...
0
votes
1answer
182 views

Issue using pgr_dijkstra from Postgres pgRouting

I am using Postgres with Postgis extension to retrieve streets (only for pedestrian use) and several "natural" points. I need to make updates every minute and i am working on a small bounding box. For ...
0
votes
1answer
34 views

ST_Union or ST_Collect on PostgreSQL union result?

Newbie to PostGIS/Postgres. I have the follow query which returns me 2 GEOMETRYCOLLECTIONS. Is there a way within my current query to return one polygon? SELECT ...
1
vote
1answer
678 views

PG::UndefinedFunction: ERROR: operator does not exist: point = unknown

Recently, I developed a feature to save and fetch points(lat and lon) from DB. It is working fine on my local, but on production database it is giving error: PG::UndefinedFunction: ERROR: operator ...
0
votes
1answer
43 views

Geocoding addresses based on own reference data

I have a historical addresses dataset in form: |Name |Description | Where "Name" is a single field with house number, street name, city and country. I have digitised two georeferenced ...
1
vote
2answers
78 views

Importing OSM data into PostGIS and display into QGIS

I am new to all things GIS! However, I need to set up a full GIS infrastructure for a project. I have installed a Postgres server with PostGIS. That is on ancient hardware for now, 32bits processor ...
1
vote
1answer
49 views

Lines from points in postgresql postgis

I have this table (all row aren't in order): time, id, latitude, longitude time is character varying and the format is: dd/mm/year hh:mm id, latitude and longitude are numeric I would create lines ...
0
votes
1answer
208 views

How to check overlap between two sets of Linestrings using postgis

I have 2 sets of LINESTRINGS, each set containing around 50 LINESTRINGS(which form a road), how do I check whether these two sets overlap or not ? Thanks in advance.
2
votes
1answer
56 views

Displaying data from a partitioned PostgreSQL / PostGIS table is unacceptably slow in QGIS

I have two very similar datasets of 27 million polygons stored in PostgreSQL / PostGIS. One is loaded as a single table, with spatial indexes and regular indexes on key fields. The other is ...
1
vote
1answer
36 views

PostGIS with clause not using spatial index

This query uses the spatial index and it's quite fast: explain select a.the_geom from chicago_major_streets a, stormevents_locations_2014 b where ...
0
votes
1answer
36 views

select neighbour polygons in sql

I have a database of few milion records (all houses in my country). Now I want to select all records who have a neighbouring record (a house next to it) and give this a status 'T'. Each record has a ...
5
votes
5answers
625 views

Improve performances on distance coverage routing - PostgreSQL

I have to create layers of land coverage from one point to anywhere around on a given street network for a given distance (ex: FROM house, DISTANCE 30000m) An important factor to understand; I need ...
0
votes
2answers
32 views

Not able to create postgres Sql file using Osm2po

I am newbie to the GIS community. After downloading the osm2po jar file, I have run following the instructions from underdark tutorial. Also, from Carsten's answer in gis stack exchange, I have ...
14
votes
1answer
982 views

Can PostGIS and QGIS provide dependable multi-user editing?

After considering a few options, I'm trying to give my 15-20 QGIS 2.2 users the ability to concurrently view/edit one or two basic point PostGIS layers, largest one has just 16,000 records. I've ...
0
votes
0answers
19 views

PostGIS - raster coodinates - no result for negative values of GPS

I have data in raster and try to run this query WITH ref As ( SELECT (ST_SetSRID(ST_Point(-20.12, 51.50), 4326)) AS pt ) SELECT ST_Value(raw_data, 1, ref.pt) AS val_0 FROM model_data The problem ...
6
votes
1answer
107 views

Leveraging capabilities of PostGIS for large (ish) tables in PostgreSQL?

I am using PostgreSQL and PostGIS to do some exploratory analysis and eventually spatial analysis. I have a table with 40M+ points (geolocated tweets) in the United States that has a spatial index. I ...
1
vote
0answers
46 views

One way Replica deleted feature not synchronizing when I synchronize

I have created one-way replicas from 50 geodatabases to one geodatabase (Arcsde. With PostgSQL 9.2) After that, I update my feature class in parent geodatabase, but when I synchronize the replica the ...
3
votes
1answer
280 views

User locking postgres/postigs table without privileges

I have a PostgreSQL 8.4.4 database with PostGIS 1.4.2 and I am experiencing a problem where an external GIS system (using embedded CadCorp SIS 7.0) is connecting to the database and taking Access ...
0
votes
0answers
17 views

Maximum likelihood Between 2 linestrings in Postgre?

I created a lot of linestring datasets and loaded them all in PostgreSQL, I want to compare said linestrings 2 by 2 using a maximum likelihood Query which would give me a coefficient proportional to ...
1
vote
2answers
47 views

How does pgr_createTopology assign source and target?

This is the first time I post a question here. I was following the tutorial from Anita Graser http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ , on a roads table which ...
0
votes
0answers
15 views

Postgis load raster to DB running on AWS RDS with raster2pgsql

I want to perform very common task: I have Postgresql + Postgis running on Amazon Web Service cloud, using RDS service. I have there some vector layers and can execute SQL (Postgis) commands via ...