PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
1answer
36 views

Using ST_Extrude in Postgres 9.2, with PostGIS 2.2.0

I'm trying to use the function ST_Extrude() in Postgres 9.2. I enabled the PostGIS 2.2.0 extension and the PostGIS_SFCGAL extension (which carries the ST_Extrude function). I can see the function in ...
1
vote
1answer
37 views

Keep empty GRID Cells in PostgreSQL (after join)

I want to join a 100*100m Grid with a point layer. The points contain the number of people living in the grid cell. There are some cells with no polulation, which I want to keep with the Attribute ...
2
votes
1answer
124 views

Installing Postgis 2.2.0 on Windows?

I'm trying to get the newest version of Postgis (2.2.0) up and running with Postgres 9.4. I'm using Windows and the only installation manuels I found, are Linux-only. Can anybody point me in the ...
1
vote
2answers
78 views

Edit Geometry with digitizing tools in QGIS of a postgis layer

I have a multiline PostGIS layer added to my QGIS 2.10.1 Pisa. I'm able to add features using the digitizing tools, but I'm not able to use the delete or node tool. It remains gray even if I'm in ...
0
votes
1answer
41 views

Error in using 'psql' from osm2po [closed]

I am following this direction to make network dataset from OSM data to use ArcGIS network analysis (by using osm2po and psql)(http://revenant.ca/www/postgis/workshop/loadingdata.html). So far so good ...
2
votes
1answer
17 views

Multi-string data-set without z layer, applying ordinal values as a workaround

I'm new to GIS and have been learning a lot over the last few weeks, however, I've finally come to a point where I could use some help. I'm working with the pdx_streets data-set from ...
0
votes
1answer
154 views

Install Postgresql / Postgis with SFCGAL

I need to access ST_StraightSkeleton() function. At the moment i have a Postgresql instalation PostgreSQL 9.3.4 compiled by Visual C++ build 1600, 64-bit installed via EDB with Postgis 2.1.7 on a ...
1
vote
1answer
46 views

How to make a change in the_geom_webmercator visible in the_geom in CartoDB?

I am having some trouble with the the_geom column and the the_geom_webmercator column in CartoDB. I have some SQL (which I modified from http://bl.ocks.org/andrewxhill/8695515) in which the ...
2
votes
0answers
40 views

How to clean the postgres instance while setting cartoDB locally in ubuntu

I am following https://github.com/danseely/cartodb-install/blob/master/DEV-INSTALLATION.md for setting cartoDB locally in ubuntu12.04. While installing cartoDB-postgresql, the second install check ...
2
votes
2answers
110 views

Postgis ST_Intersects performance

I am selecting a lot of polygons within a gigantic polygon by using the postgis function ST_Intersects(). SELECT * FROM data.polygons AS poly, data.gig_polygon AS gig ...
0
votes
1answer
27 views

How Update one table row with combare with the other polygon table using their geom in SQL Server

a-> points b -> Polygon i want to update city trow in table a with compare b of geom in SQL server this is the PostgreSQL Query update a set city=b.name from b where st_contains(b.the_geom, ...
2
votes
1answer
129 views

How to save postgres table to kml without losing attributes using python

I am saving the postgres table loaded in QGIS to kml. qgis.core.QgsVectorFileWriter.writeAsVectorFormat(aLayer, myFile, "ogr", projDest, "KML") But the output file does not have the attributes. So ...
2
votes
0answers
74 views

How to export ESRI Geodatabase format .gdb from PostGIS

I found several posts explaining how to import a .gdb file into PostGIS. Is exporting also possible? For example using ogr2ogr to generate a .gdb file from query result.
1
vote
1answer
77 views

Load the postgis layer/table to qgis canvas using python

I want to load the postgis layer to qgis canvas. I am using the following code but it is not loading the layer in canvas. sql = "(SELECT * FROM table WHERE id = 20)" uri = QgsDataSourceURI() ...
2
votes
1answer
32 views

How to solve the error: query must return columns 'id', 'source', 'target' and 'cost' in postgres 9.3

SELECT seq, id1 AS source, id2 AS target, cost FROM pgr_kdijkstraCost( 'SELECT gid, source, target, cost FROM road_network', 26, array[1055,2013], false, false ); I am getting the ...
2
votes
2answers
90 views

I import map from file osm.pbf using osm2po. Why the low speed function call pgr_dijkstra in database Postgresql?

Good day! I import map from file russia.osm.pbf using osm2po. Why the low speed function call pgr_dijkstra in database Postgresql (>2 minute)? My steps: java -Xmx6g -jar osm2po-core-5.0.0-signed.jar ...
2
votes
1answer
70 views

pgrouting calculate length of shortest travel time route

I currently use the pgr_kdijkstraCost() function to calculate the travel times of a few origins and destinations. But I would also like to return the distance length of these trips. Is this possible? ...
1
vote
1answer
89 views

PostgreSQL Database Connection Issue

I have two separate computers, each of which are running ArcGIS Desktop 10.3.1 and PostgreSQL and PostGIS 2.1.7. The only difference is one is running PostgreSQL 9.3.4, the other is running 9.3.5. I ...
1
vote
1answer
52 views

Clustering by property

I have a number of points with a "time" property. I need a procedure that, given a total time, results in a number of clusters in which the sum of the time property do not exceed the given total time. ...
1
vote
0answers
39 views

How to scatter all points at identical locations in CartoDB?

I am working on a project in which data points are often at the same location (e.g. Rome). This poses a problem because the data points then overlap and cannot be clicked on. I found some SQL at ...
2
votes
2answers
61 views

point returned from ST_LineLocatePoint returns false in ST_Contains

I am using postgis's ST_LineLocatePoint to find out the closest point on a LineString to the given Point, and using ST_LineInterpolatePoint to extract a Point from the returned float number.(as ...
1
vote
0answers
37 views

Resuming an osm2pgsql import to postgres [closed]

I was doing an import of the north american data with osm2pgsql using sudo ./osm2pgsql -c -S /home/osmNA/nfs/osmNA/osm2pgsql/default.style --slim -d addressNA --flat-nodes flat-nodes.bin ...
1
vote
0answers
53 views

Why is the geometry changing slightly when I import shapes into a postgresql database with postgis?

I recently posted this question when first trying to import data from a file geodatabase into a postgis database: how can I maintain curves when converting from geodatabase to postgresql using og2gui ...
1
vote
1answer
55 views

PostgreSQL equivalent of ArcGIS “Eliminate” function?

I am looking to eliminate small slivers in a shapefile dataset using PostgreSQL. What would work to dissolve features < 0.1 hectares into the neighbour with the longest shared boundary (1) or the ...
0
votes
1answer
68 views

Geoserver max connection

I, im creating a application to display some data with geoserver and postgres database. My application is working fine when i displays 5-6 layer of data one by one, after that, the next layer I try to ...
2
votes
1answer
91 views

Alternative approach for loading osm2pgsql data

I am slowly going insane trying to successfully complete an OSM data import and I would like to find an alternative approach. What I'm attempting is frustratingly simple yet fails repeatedly. ...
0
votes
2answers
72 views

Modifying “pg_hba.conf” file to listen a dynamic address

this is the sequel of "Modifying "pg_hba.conf" file to listen local TCP/IP conection" I manage to modify pg_hba.conf to listen other PCs and allow them through the firewall, but my problem now is ...
1
vote
1answer
41 views

Finding out the extent of the default zoom levels of open layers

I'd like to reproduce the zoom levels of openlayers in postgis. I am not used to working with Javascript and am having difficulties to find out the exact extent in meters of the default zoom levels of ...
0
votes
1answer
43 views

function st_length3d(geometry) does not exist

Whenever I execute this query: SELECT ST_Length3D(ST_GeomFromEWKT('LINESTRING(0 0 0,5 0 3,5 10 5)')); Postgresql is throwing an error: ERROR: function st_length3d(geometry) does not exist SQL ...
2
votes
1answer
78 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 ...
2
votes
0answers
45 views

Error on qGIS with postgresql views

I have a PostGIS database with various tables and views. With pgAdmin I can make requests on the tables, on the views, all is working. I add tables in QGIS 2.8, it's working, I can read, write, modify ...
1
vote
0answers
226 views

PostGIS is already installed in schema 'public', uninstall it first

I am having problems adding postgis to my database. I'm following the instructions from here: http://postgis.net/docs/postgis_installation.html#idp32328352 (That said, I have combined some previous ...
1
vote
1answer
121 views

Using st_distance to calculate shortest distance between a table with point geometry to a table with multipolygon geometry

I'm trying and failing to do a calculation of the shortest distance for each point in a point geometry table (15000 records) to the nearest polygon edge in another table (170000 records). The end ...
0
votes
1answer
92 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.
0
votes
0answers
46 views

ogr2ogr *.tab to postgres: Failng on date format

I'm importing some MapInfo tab files into a PostgreSQL database running the following command in FWTools Shell: ogr2ogr -f "PostgreSQL" PG:"dbname='<the_database>' host='<the_host>' ...
1
vote
1answer
51 views

how can I maintain curves when converting from geodatabase to postgresql using og2gui

I am using the ogr2gui to convert a feature class in a geodatabase to a postgresql feature class. My original data is in a file geodatabase, and I am using the folder OpenFileGDB format as my input ...
0
votes
1answer
102 views

Problem using raster2pgsql to upload a raster to PostGIS

I am trying to upload a large number of 3 band rasters to a PostGIS database using raster2pgsql on the command line in Windows 7. Here is my command: raster2pgsql -I -C -s 27700 -F -t 100x100 -M ...
2
votes
1answer
33 views

Accessing non-PostGIS Postgres instances from QGIS

Does anyone know if it's possible to query tables that are regular Postgres and not PostGIS with QGIS? I have a PostGIS database but want to access tables that aren't spacial - much like reading in a ...
1
vote
0answers
36 views

ST_Intersects does not use spatial index

I wrote this part of code: SELECT CB.id_2 AS CountyID, CA.id_2 AS NeighbourCountyID FROM "Counties10B" CB,"Counties10" CA WHERE ST_Intersects(CA.geog,CB.geog); But it does not use spatial index. ...
1
vote
1answer
67 views

Separating disjoint GPS path segments in Postgres

This involves a lot of code; if it's better suited for StackOverflow, please let me know! I'm working on a project involving trips that are constructed from GPS coordinates. I'm mapping the recorded ...
2
votes
1answer
137 views

Offline Map with mapnik: Tiles are vertically unaligned and randomly displayed (Leaflet + Tilecache + Mapnik + Postgis)

I'm new to maps and currently I am developing my first offline Map with OSM data. I have map data added to postgres via osm2pgsql and installed mapnik 2.2. For caching I have used tilecache with ...
2
votes
1answer
203 views

Calculate road distance between GPS points

I am working on tracking system that track location of vehicles on the map and tell their total distance from the beginning till today. I have device_id, timestamp and GPS location in the table like ...
4
votes
0answers
59 views

How to load layers from postgres using SELECT statement?

I am trying to load a postgres table (columns extracted using a select statement) from the python console in QGis: The following works fine and the layer loads as expected: uri = QgsDataSourceURI() ...
0
votes
0answers
28 views

Regarding Geoserver postgis Store - connection Issue

I have installed geoserver 2.7 in windows 8.1 Everything works fine but while I try to connect PostGIS store using the GeoServer web admin page I get error as unable to obtain connection. I have my ...
1
vote
2answers
61 views

PostGIS query to retrieve the largest polygon for multi-polygons by grouping on attribute field

I'm working with the Natural Earth 10m Admin 1 States Provinces polygon data. This dataset contains multi-polygons for each state / province in the entire world. What I'd like to do is to grab the ...
1
vote
1answer
77 views

Creating geodatabase administrator account other than SDE?

I need to create another account other than SDE and make it geodatabase administrator. Is it possible? I have already created another account and have given SUPERUSER priviledge. However I cannot do ...
0
votes
0answers
55 views

Copying File Geodatabase to PostgreSQL using ogr2ogr?

I am trying to export Feature Classes and Tables from GDB to PostgreSQL. I am using ogr2ogr tool to export from GDB to PostgreSQL. I am using following method: ogr2ogr -f "PostgreSQL" ...
2
votes
1answer
97 views

How to update a postgres/postgis table periodically with multiple data?

I have created a postgis table from point.shp with 5 fields containing 20 records. Now I want to populate the table with another 150 records keeping the previous 20 records so that the total records ...
2
votes
1answer
273 views

How can I generate a specific number of random points in a polygon with PostGIS?

I have a postgis table that I've uploaded a shapefile to, this shapefile contains 200+ polygon rows with several integer columns. What I'd like to do is similar to the QGIS 'random points in polygon' ...
0
votes
0answers
39 views

Postgres PostGIS geocode_intersection()- How to handle exception?

I have a table in Postgres with a set of records that are street names which needs to be geocoded to get an intersection point.Some of the records would be bad input and when using the ...