Questions tagged [postgresql]
PostgreSQL is an open source object-relational database system.
515
questions
5
votes
1
answer
1k
views
PgRouting : Shortest path starting from the closest vertex not the closest node
I am currently working on a routing solution with PgRouting (Dijkstra's algorithm), but the shortest path it creates always start from the nearest nodes generated from the edge table, and sometimes ...
48
votes
3
answers
60k
views
Adding shapefiles to PostGIS database
I was able to create a Postgresql database and then I executed,
createlang plpgsql geospecies
psql -d geospecies -f postgis.sql
psql -d geospecies -f spatial_ref_sys.sql
So now can I directly import ...
17
votes
2
answers
15k
views
Setting up PostGIS database and opening it in QGIS on Windows?
I have tried to follow the manuals for setting up a PostGIS database to be accessed by users with QGIS, but at the moment I cannot understand enough to progress?
My situation; I am a trainee ...
8
votes
1
answer
9k
views
How to import a raster into PostGIS?
I'm trying to follow the instructions here to load a raster into a PostGIS database:
python raster2pgsql.py -s 4269 -I -r *.tif -F myschema.demelevation -o elev.sql
I understand that I replace * ...
8
votes
2
answers
5k
views
Deleting small gaps (slivers) between polygons?
I try to delete the slivers that appeared when I have merged some polygons.
I have two different cases:
For the CASE 1, no problem I fill the gap with:
CREATE OR REPLACE FUNCTION sliver_killer(...
6
votes
2
answers
5k
views
GDAL Python bindings not picking up OGR PostgreSQL driver
I have a windows server (Microsoft Windows Server 2003) with:
Python 2.7,
PostgreSQL 9.04-1,
GDAL 1.8.1 (installed from the windows installer
(gdal-18-1500-core.msi) hosted at
http://vbkto.dyndns....
6
votes
1
answer
2k
views
Speed up point sampling with ST_Value function in PostGIS, raster/vector overlay
I managed to extract raster values in PostGIS based on a table of point geometries by following Point sampling raster with PostGIS
SELECT id, ST_Value(rastertable.rast, 1, pointtable.geom) as ...
6
votes
3
answers
6k
views
WFS-T Edit using OpenLayers, Geoserver, PostgreSQL ("error performing insert")
I tried following the tutorials:
http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html
and:
http://apps.who.int/tools/...
5
votes
1
answer
2k
views
How to properly establish a PostgreSQL connection using QgsCredentials
I'm trying to establish a Postgres connection using QgsCredentials as described here:
How to access user credentials in database connection?
The only problem is that I cannot establish a working ...
4
votes
1
answer
299
views
Compound contiguous links to lines in a network and find isolated lines
I want to compound the red and green links (lines between the poinst) to one or more lines. I need it to finde the green links that not touching the red lines in my network.
Step 1: compound touching ...
4
votes
3
answers
4k
views
PostGIS and ArcSDE mixed environment
I am trying to setup up a enterprise geodatabase with ArcGIS 10.4.1 and PostgreSQL 9.4 where I can use PostGIS for my SQL queries in PostgreSQL and have the sde functionality.
I have a windows ...
3
votes
1
answer
2k
views
Get a single cluster from cloud of points with specified maximum diameter in postgis
I have on the order of 2M Geometry Collections with N (median: 2, stddev: 6.6, 75th: 6, 95th: 21) Point objects (repeated points allowed and important) in a PostGIS table. I want to identify clusters ...
50
votes
2
answers
79k
views
How do I check which version of GDAL I have and how many?
I have installed in my computer the following software:
PosgresSQL 9.3.2.3
PostGIS 2.1.1.1
QGIS 2.0.1 Dufour (this one installed through the OSGeo4w package)
QGIS 1.7.0 Wroclaw
As far as I know all ...
30
votes
3
answers
31k
views
Postgis TopologyException: side location conflict at 226.001 39.5158, what's the problem?
after st_union() PgSQL returns a note:
NOTE: TopologyException: side location conflict at 226.001 39.5158
And in the results there are two rows with empty geometry and other rows are ok.
What ...
24
votes
3
answers
21k
views
Calculating percent area of intersection in WHERE clause
I have a table of polygons (census block groups) in Postgres. I want to tag each block group with the town (another polygon table) it mainly resides within. Is this possible?
I'm thinking I'd need to ...