Questions tagged [postgresql]

PostgreSQL is an open source object-relational database system.

557 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
1k views

Ogr2ogr: ERROR 1: Unable to find driver `PostgreSQL'

I need to import geojson files into a local PostgreSQL9.6 database on OSX system. ogr2ogr -f 'PostgreSQL' PG:"dbname=crossmap user=duccioa" "multigraph.geojson" -nln paris.multilayer Ogr2ogr gives ...
2
votes
0answers
399 views

Failed…error: bind message supplies 3 parameters, but prepared statement “” requires 1

I am using node to capture gps data from my devices after every 30 seconds, i want to store the data into a table but when executing the query statement it throws an error Failed.........error: bind ...
2
votes
0answers
339 views

Importing GeoJson data to postgresql using ogr2ogr command

I am using following ogr2ogr command to import GeoJson data to Postgres DB. The command runs successfully but the geometry column is null. ogr2ogr -f PostgreSQL PG:"dbname=test user=postgres ...
2
votes
1answer
224 views

postgis add vector tables together to create one weighted table

There are 7 polygon tables in postgis. Each table has a unique column that holds a weight of 1. so each row has a 1 in it. Without converting to raster I want to "add" up all the vector tables into ...
2
votes
0answers
224 views

Can't connect Docker PostGIS container to QGIS

I recently started experimenting with Docker and PostGIS following this documentation. I have a locally installed version of QGIS which I am attempting to connect the default Postgres database to. ...
2
votes
0answers
204 views

pgRouting: Find source/target ID of edge closest to points in a separate layer for many-to-one routing

I have a small road network which I have extracted from OSM and prepared for routing using OSM2PO. I also have a separate layer of points (postcode centroids). I wish to compute many-to-one routing ...
2
votes
0answers
250 views

How can I split a polygon set with a line set using PostgreSQL recursive queries?

I have a simple polygon layer GEOMETRY(POLYGON,4326) and a simple line layer GEOMETRY(LINESTRING, 4326). I want to find all split areas. I am using PostGIS 2.0. I am using following PL/pgSQL ...
2
votes
0answers
107 views

Shape index, compactness and assymetry index with PostgreSQL /PostGIS

I am working on automated land parcel identification and would like to extract road/river/thin and linear-like polygons from a massive dataset. For now, the only index I can get some answers from is ...
2
votes
0answers
533 views

PostgreSQL/PostGIS Metadata - with QGIS

I'm stuck trying to get metadata for vector-layers into a PostgreSQL database with PostGIS-Extension. The ESRI-Environment allows to define metadata (ISO, FGDC, INSPIRE,...) and saves this information ...
2
votes
0answers
108 views

Create PostGIS trigger that splits lines

I have a table with LINESTRING where one condition is for lines to be composed of only 2 vertices. I want the user to be able to create, or import lines with more than 2 vertices, but upon feature ...
2
votes
0answers
199 views

Creating form in QGIS?

I have a PostgreSQL database wich containes a table with type point an 4 tables without geometry. I created foreign keys to garantee the relations between those tables. I migrated my db via postgis ...
2
votes
0answers
176 views

postgis raster to postgres database

hi Im trying to access my raster file in QGIS by connecting postgresql database. I can see my raster in qgis but I get this error : Geçersiz Katman: GDAL provider Cannot open GDAL dataset PG: ...
2
votes
0answers
662 views

OSM data as Postgresql dump

Does anywhere host the OSM planet DB as a Postgresql dump? I have tried using osm2pgsql but I have limited processing capabilities so it is never finishing. I do not have bandwidth limitations so ...
2
votes
0answers
131 views

Is it possible to perform a join on the fly within OpenLayers, to join a filtered tabular service to a polygon WFS layer?

We have around 2 million species observation records we want to display to users in an OpenLayers-based front-end. I created a VIEW in our PostgreSQL database that summarizes these records by species,...
2
votes
0answers
236 views

Merging adjacent and overlapping polygon from different sources with Postgis

I have three different sources in my PostGIS database that I would like to combine in a materialized view to make a single one. I want to merge all the adjacent and/or overlapping polygons to make a ...
2
votes
0answers
121 views

Memory issue after ST_MakeValid()

After running a ST_MakeValid() on a table with about ~400k records, I receive the following error: update "parcel15B" set geom = ST_MakeValid(geom) ERROR: could not extend file "base/16390/655718":...
2
votes
0answers
113 views

Not rendering new data after second import?

Trying to create a slippy map using apache2, renderd, and postgresql. I started with just one state and used osm2pgsql to import it. I got everything working great and decided to scale up to North ...
2
votes
1answer
169 views

Upgrading PostGIS and PostgreSQL but running upgrade to PostgreSQL it errors?

I want to upgrade PostGIS(2.0.4 ---> 2.2.3) and PostgreSQL (9.2.4 ----> 9.6) so First I upgrade PostGIS 1、install PostGIS 2.2.3 on postgresql 9.2.4 2、alter EXTENSION postgis 2.0.4 ---&...
2
votes
0answers
181 views

PostGIS, PostgreSQL and Solaris

I need to install PostGIS on Solaris, but at the moment of installing I have this error: database=# create extension postgis; ERROR: could not load library "/opt/csw/lib/64/postgresql/93/...
2
votes
0answers
134 views

Importing multiple raster images in PostGIS

I have several raster images for one area and I am trying to import these multiple raster images in PostGIS. Is there a efficient way to import these raster images at once?
2
votes
0answers
2k views

How to import NetCDF file to PostgreSQL

I looked at the other similar questions posed and none of them seem to be answered. Basically I have a NetCDF file with multiple subdatasets and from what I've read, I should be converting it to a ...
2
votes
0answers
91 views

Exported OSM database do not contains node names

I've used osm2pgrouting tool to export data from osm file to my postgresql database. Now I have database with this schema: osm_node: -node_id -osm_id -lon -lat -numofuse -the_geom ...
2
votes
0answers
338 views

PostGis - st_union polygons, keep sum of attribute

There are multiple My current query is: SELECT (ST_Dump( ST_Union( way ) )).geom AS way, 10000 AS way_pixels FROM ( SELECT way, way_pixels, ...
2
votes
0answers
38 views

PostGIS - raster - bit operations

I have a raster data in the database in separate rows. I would like to select 2 rows and do a bit operation with them (like |, &) and store the result in memory as a query output. Is this possible?...
2
votes
0answers
70 views

How to count near intersecting polylines and merge them?

I have a dataset with several polylines created by GPS points of car trips. I am trying to create a simple heatmap where roads with more traffic (where polylines intersect) get darker. I already ...
2
votes
0answers
201 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 = "...
2
votes
0answers
69 views

PostGIS - ST_SetValues is slow

I have large data in my C++ program (up to 3000x3000). I have connection to PSQL with PostGIS. Now I need to store my raster data (greyscale images) in DB raster. I am using ST_SetValues for this and ...
2
votes
0answers
292 views

TopoGeometry commands with postgres are really slow

After messing around quite a while, I was finally able to get a topogeometry converted from my geometry table following the example of toTopoGeom. I have the topology extension, with a topology schema ...
2
votes
1answer
80 views

Issue with GeoJson data format fetching from PostgresQL

I am trying to display the GIS data on the Google map using PostgreSQL. I have few Shapefiles, I imported those shapefile into PostgreSQL. Now I am trying to get this data using this query. After ...
2
votes
0answers
103 views

How to display join query results on a sublayer in CartoDB.js application?

I'm working with my first CartoDB.js application. I created a visualization on the app using cartodb.createVis('map', visjson_url, opts); The app has two layers, base map and data layer. the data ...
2
votes
0answers
142 views

Efficient processing of ST_ValueCount Results in Postgresql

General Problem: I have a table of rasters. The rasters are classified MSI images, so each pixel is an integer indicating the class of the pixel. For a number of regions, I am querying pixel counts in ...
2
votes
0answers
72 views

Creating lines from lonely nodes in a linestring table to closest point on another linestring table

I want to segmentate a country (denmmark) by using barriers such as larger roads, railroads and the border/ coastline as the delimiting lines of the polygonise function in QGIS. But as most roads and ...
2
votes
0answers
93 views

Changing border style in OpenStreetMap?

I am trying to figure out how to change OpenStreetMap country borders color/thickness. I've set up a tile server using OSM data, PostgreSQL & Mapnik. The default mapnik style is used. There ...
2
votes
0answers
87 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
0answers
1k 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 ...
2
votes
0answers
243 views

Issues creating ArcSDE sde_logfile for certain users (username begins with a numeral)

I am having issues when editing an sde feature class from certain users. The way my database is set up is that the authentication roles are updating constantly by comparing the current authentication ...
2
votes
0answers
391 views

using changeset for larger region to update OSM data in PostGIS

I'm using the OSM import and update workflow described here to maintain OSM data in a PostGIS database. Import (osm2pgsql): osm2pgsql -c -d gps -U gps --cache 8000 --number-processes 4 --slim --flat-...
2
votes
0answers
99 views

how to use st_intersection() with re-projection in POSTGIS?

This is a shipping route from 'Portland to Busan' and I want to check the route against land_polygons like how much distance is traveled by a route through land. And the problem is while checking the ...
2
votes
0answers
396 views

How to install PostGIS shp2pgsql-gui on openSUSE 13.2?

I installed PostgreSQL 9.4.4 together with pgAdmin III (1.20.00) and the PostGIS extension (2.1.7, via the Stack Builder) from http://www.enterprisedb.com/products-services-training/pgdownload on my ...
2
votes
0answers
271 views

Optimize PostGIS query, ST_Intersects - Raster and Geom

I am trying to run a spatial query between two tables. Table one (prism_ppt_monthly - see below for details) is monthly precipitation data. Table two (usgs_basin_boundary - see below for details) are ...
2
votes
0answers
284 views

Auto-Sanitizing illegal PostGIS WGS84 (lat, lon) coordinates

I have just stumbled upon what seems to be a very curious behaviour by PostGIS. The XYZ point -117.0, 32.0, 0 in WGS84 (SRID 4326) is legal: items=> SELECT st_y(st_geomfromtext('POINT Z (-117.0 ...
2
votes
0answers
148 views

Geoserver - How to make a psql-backed timestamp that uses timezones

I'm working on an application that extends geoserver and am frustrated as I'm trying to define a SimpleFeature that has timestamps that include timezones. I've tried declaring my timestamp field ...
2
votes
0answers
150 views

filling the attributes according to intersection of two layers (Postgresql)

How to automatically fill attributes of a point layer according to the exact position in the polygon layer? I mean how to write a command in PostgreSQL to automatically fill the attributes by the ...
2
votes
0answers
77 views

What are the problems of loading overlapping (or the same) tifs into postgis?

I am still early on the Postgis learning curve. I have an existing table in Postgres - it looks like this: create table "public"."mytable" ( "rid" serial primary key, "rast" raster, "filename" ...
2
votes
0answers
461 views

How to split linestrings where start/end points don't touch nearby lines

I am trying to figure out some basic routing with PostgreSQL/pgRouting and I'm struggling a bit. Our network of linestrings are not topologically correct, tracks that should be connected don't touch, ...
2
votes
0answers
171 views

How to Create Query Status Table Postgres

I am currently a user of a Postgres database (I am not the DBA). Within my sandbox I run several business critical scripts every day and currently track their status by first in a log text file on my ...
2
votes
0answers
111 views

Opengeosuite blank and postgresql errors

I had the unfortunate idea to upgrade opengeosuite from 4.0 to 4.1. I followed the docs found on opengeosuite site but something has gone wrong. I uninstalled opengeosuite and all connected packages ...
2
votes
0answers
93 views

Import raster to postgis and add a foreign key constraint

I use raster2pgsql to import raster files into a table with this command line: C:\Program Files\PostgreSQL\9.3\bin>raster2pgsql -s 4326 -M -F -a c:\temp\mun.tif public.basqui_raster | psql -U ...
2
votes
0answers
355 views

Geoserver WPS - Tiled Barnes Surface with geospatial index

I'm using Barnes Surface to compute a set of points from my PostgreSQL db. The problem is that my whole table is processed for each tile. I added a geospatial index on my points, how can I tell ...
2
votes
0answers
1k views

Problems moving POSTGIS database from postgresql 8.3 to 9.3 using Navicat

I am using Navicat 11 to move a POSTGIS database from 8.3 to 9.3 on Mac OS X 10.9. I have installed PostgreSQL 9.3 and PostGIS with homebrew (brew install postgresql postgis) and everything looks ok. ...