PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
2answers
69 views

Finding vertex in comon with most polygons in PostGIS?

I have a table with polygon geometry, in this case representing counties. I'm trying to figure out how to write a query that returns vertices sorted by the number of polygons that share that vertex. ...
0
votes
0answers
51 views

Receiving -infinity in geoserver wfs GetFeature result

I'm currently using: - Geoserver 2.7.2 - PostgreSQL 9.4.4 - PostGIS 2.1.9 When I submit the following wfs GetFeature request: http://localhost:8080/geoserver/wfs?service=wfs&version=2.0.0&...
1
vote
0answers
52 views

PCA on correlation matrix in PostgreSQL

Does anyone know how to perform PCA using PL/pgSQL in a PostgreSQL function, considering correlation matrixes of potentially high order? Maybe a specific library for this problem... Thanks.
1
vote
1answer
83 views

Applying OSM z-order after osm2pgsql with qgis

I've trying to find a solution to applying the OSM z-order in qgis after using osm2pgsql. Everything is working perfectly, until I add the each layer to the canvas, where the z-order is not being ...
0
votes
0answers
69 views

Fulltext Search with Spatial Search with pagination

We tried to use postgresql+postgis to save our spatial data with points/lines/polygons. Though the postgresql have a built-in full-text search engine, we have to use lucene for some reasons, and ...
1
vote
0answers
82 views

Gisgraphy importer crashing, possibly due to JDBC connections problem. Is there a fix? [closed]

I've been trying to install gisgraphy for the past few days. The setup has went well, but the software crashes while importing data. I'm only importing data for a single country so it's not overly ...
1
vote
0answers
60 views

raster2pgsql stops at line 53 at RETURN

I am importing some very large rasters (in the tif format) into Postgres SQL (9.3) using raster2pgsql on the command line. Most of the rasters imported fine, some had to be converted to the img format ...
1
vote
1answer
39 views

PostgreSQL - PostGIS linkup error

I have a database that I viewed in QGIS using PostGIS. I managed to link them up using the correst host, database combination last year. I am now revisiting the work and am unable to link them again....
0
votes
0answers
48 views

pgr_dijkstra doesn't return when cost values are low

I'm using a different cost column in pgRouting, and passing it to pgr_dijkstra but it returns 0 rows. I analyzed that column and contains some 0 and values in scientific notation (1e-6) and also ...
3
votes
1answer
222 views

Postgres, loading raster into db and visualize with qgis

I'm trying to import a TIF raster into a Postgres db using this command: Raster2pgsql -s 26591 -I -C -e -Y -F –N -M C:\Users\Ivn\Desktop\Postgre_HOME\scratchmres1.tif -F | psql -U postgres -d ivndb -...
2
votes
1answer
66 views

Generating Shapefiles from PostGIS as a Plugin

I used to generate shapefile from PostgreSQL database that is installed with PostGIS tables as templates (geometry_columns and spatial_ref_sys) Shapefiles generated just fine using the following ...
0
votes
1answer
48 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
42 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
198 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
116 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
55 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
22 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 http://www....
0
votes
1answer
298 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
97 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
46 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
330 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
34 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, a....
2
votes
1answer
204 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
111 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
155 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() uri....
2
votes
1answer
39 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
133 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
127 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
194 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
54 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
53 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 http:...
2
votes
2answers
92 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
42 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 --number-...
1
vote
0answers
58 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
67 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
129 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
189 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
110 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
61 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
102 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
2answers
123 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
70 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
307 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
199 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
247 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.
1
vote
0answers
86 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>' port='...
1
vote
1answer
68 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
183 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 F:\...
2
votes
1answer
43 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
45 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. ...