PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
0answers
13 views

Raster slightly displaced after exporting from PostGIS database

With the following queries I've exported a raster (GTiff) from my postgis database: 1.Creating a large object: WITH buffer AS ( SELECT id, ST_Buffer(geom,50) AS geom FROM ...
1
vote
1answer
21 views

3D functions with SFCGAL in PostGIS

I have this setup: "POSTGIS="2.1.2 r12389" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER" on ...
1
vote
2answers
29 views

What is the best way to take a WKB value in SQL Server Management Studio and create a PostGIS geometry in PGAdmin III?

Normally, I would just use WKT strings but I'm investigating some possible geometry weirdness with the Text methods in SQL Server. I would like to copy/paste the WKB values from the SQL Server ...
0
votes
0answers
13 views

SFCGAL problem with PostGIS

I have PostgreSQL 9.3 with these features: "POSTGIS="2.1.2 r12389" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" ...
1
vote
0answers
41 views

How to save a google map direction into a postgresql/postgis database?

I have taken a direction(route) from google map. Can I save this resultant direction/path/route to my postgresql/postgis database? How?
2
votes
2answers
30 views

Do I still have to use a template DB for PostGIS?

createdb mydb -T template_postgis Is this -T template_postgis still necessary in new versions of PostGIS? I never saw this db being different, it always has those 3 sql files you run there. Is this ...
1
vote
0answers
26 views
+50

Postgresql JDBC Table Valued Parameters

MSSQL has a great feature called Table Valued Parameters. It allows you to pass a table of a custom data to stored procedures and functions. I was wondering what is the equivalent , if exists, in ...
1
vote
1answer
17 views

convert XML to PostgreSQL using MATLAB

In a weeks time I should be able to transfer the GIS data provided in the XML format to PostgreSQL database. I have prepared the PostgreSQL database (empty) and looking at Matlab scripts. (I am on ...
1
vote
0answers
16 views

qGIS' Database Manager “Load as New Layer” Option Not Working

I'm trying to visualize some of my database queries on qGIS. I run a valid SQL query which returns a subset of my table that should be easily loaded as a layer. I then check "Load as new layer," ...
3
votes
1answer
20 views

Update/refresh edited PostGIS table in QGIS

I imported a PostGIS table (with geometry) from my PostgreSQL database as a layer in QGIS. Later, I edited the table using PostgreSQL UPDATE commands. Is there a way to quickly update (like a refresh ...
5
votes
0answers
40 views

How to compare two Geodatabases

I would like to compare the data of two geodatabases, in SDE or a file geodatabase, to detect the changes occured between them , i've tried to compare the Xml workspace document of both databases ...
2
votes
1answer
21 views

pass an array of geometry to postgresql function

I am trying to pass an array of geometry to a postgis function using JDBC with JAVA: CallableStatement proc = conn.prepareCall("{ ? = call somefunc(?) }"); ...
-1
votes
0answers
25 views

Postgres localhost -->ip adress [closed]

got to some connections in local network and i have a problem changing localhost at postgre server to host from the stations IP adress, can anybody explain in some steps what operations need to be ...
0
votes
0answers
19 views

OpenStreetMap Road and Polygon Data as 1x1 Degree Shapefiles

I am working on a global project for which I want to use OSM data as a model input. I am looking for advice on the best way to produce 1x1 degree WGS84 shapefiles from either regional extracts or the ...
1
vote
2answers
40 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 ...
0
votes
0answers
11 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 ...
0
votes
1answer
29 views

PostGIS transform geometry with long crs

How do i transform a geometry to a new geometry with a crs like urn:ogc:def:crs:EPSG::25832 st_transform(geom,integer srid) obviously doesn't work since my srid is a string found a solution ...
1
vote
0answers
41 views

Display postGis query result on Google maps Api [closed]

I have MULTILINESTRING Geometry in Postgis and as Google Api does not provide any way to plot MULTILINESTRING , i'm converting MUltiLINEstring to LINESTRING through ST_Merge function. But when i'm ...
0
votes
0answers
13 views

why is the CDB_QuantileBins function not found in cartoDB?

What is wrong with the following SQL query on my data? I found pretty clear documentation (1,2) that the function is supposed to work. SELECT CDB_QuantileBins(array_agg(numeric_column_of_mine), 10) ...
1
vote
1answer
43 views

Routing in MS SQL 2012

I would like to perform routing in MS SQL 2012 similar to pgRouting. In pgRouting, I'd do the following steps to create a routable network: Create a database routing with template template_routing ...
1
vote
0answers
16 views

Problem installing Aggregate Polygons Function in PostgreSQL 9.3

I'm new to PostgreSQL and I've been trying to run a sql function written by Dr. Horst Duester, found in http://www.kappasys.ch/cms/index.php?id=65&L=5, which is used to aggregate detached ...
2
votes
1answer
46 views

polygons and lines not drawn correctly (qgis+postgis)

i am really new to this so i could use some help.. i load osm file into postgresql and then i connect to the database with qgis t to plot it and i see this it happens to whatever file i import to ...
0
votes
1answer
24 views

how to run a PostgreSQL query on CartoDB tables?

I want to run a VACUUM FULL on my table, but I don't think it's working. Simply sandorl.cartodb.com/api/v2/sql?q=VACUUM&api_key={MYKEY} results in long output, apparently only repeating for ...
0
votes
1answer
41 views

How to save results of postgresql to csv/excel file using psycopg2?

I use driving_distance in postgresql to find distances between all nodes, and here's my python script in pyscripter, import sys #set up psycopg2 environment import psycopg2 #driving_distance module ...
1
vote
0answers
34 views

Geoserver WFS Fails to Load in OpenLayers

I'm working with Postgis->Geoserver->openlayers on localhost. I followed a Geoserver tutorial to import some nyc sample data into my postgres/postgis database and link it to Geoserver. The layer ...
0
votes
0answers
24 views

PostGIS: calculate width/length of rectangular surface

I have rectangular shaped surfaces (multipolylines) and I need to calculate the width and/or length.. they have a rectangular shape but they're not real rectangles. Is there a way to do this ?
0
votes
1answer
37 views

Use psycopg2 to do loop in postgresql

I use postgresql 8.4 to route a river network, and I want to use psycopg2 to loop through all data points in my river network. #set up python and postgresql connection import psycopg2 query = """ ...
0
votes
0answers
7 views

PostgreSQL : send all rows of a table to a function [migrated]

I have a table with one column (double precision numbers). I also have made a function (with double precision numbers as input and output), and I want to send every value of my table to the function, ...
2
votes
1answer
78 views

System requirement specification for Big Data Postgesql, PostGIS, and GeoServer based service

I want to start a GIS portal for around 3000-5000 visitors per day. MY database will be of an approximate size of 10 Terrabytes. The maps and layers are moderately complex, satellite-map overlay is ...
1
vote
1answer
82 views

How to execute sql lines in postgresql using python?

I use postgresql 8.4 to route a river network, the following is my code typed in pgAdmin and the result is fine, select * from driving_distance ('select gid as id, start_id::int4 as source, ...
0
votes
1answer
35 views

Increase Map Availability in Geoserver [duplicate]

I have an application which access same map from two geoserver using loadbalancing concept the map is accessed using WMS service. where the two geoserver connected to a single same POSTGIS database. ...
0
votes
0answers
20 views

Double version of PostGIS installed on my server

For some reason I messed up an installation of Postgis on my PostgreSQL 9.2.8 server. I had version 2.0.3 installed and when I tried to upgrade to 2.1 it did so. The problem comes when I dump the ...
0
votes
0answers
24 views

PostGIS 2.1 error install with shared object (rtpostgis-2.1.so") Linux Mint

I've Installed Linux Mint 16 mate and install PostGIS with PostGreSQL (I've tried many ways in the Internet from original source to some suggestion) but all is too error: " ERROR: could not load ...
2
votes
1answer
32 views

POSTGIS: function st_collect(geography) does not exist

I am trying to use some Geography functions, but I am getting an error that (all) functions are not existing. I have checked other Stackexchange posts (e.g. this one), but the solutions did not work ...
2
votes
1answer
30 views

Inserting union of two tables into another table Postgresql

I am working on a research project. I have two tables, one of a polygon that represents a severe weather risk area, one that represents the US. I want to merge them into one output polygon. I am stuck ...
2
votes
2answers
26 views

Change from polygon to multipolygon in postgres

can somebody describe please how to do the transformation from polygon to multipolygon in the postgres DB, is not possible for me to save my edited data. All data loaded just need to do some editing ...
1
vote
1answer
22 views

Does the psql prompt have a working directory in the file system?

I am learning postgis. This tutorial says "Navigate to where you downloaded the shapefile." Does that mean navigate to this location in the #psql prompt or navigate to this location with the $propmt? ...
1
vote
1answer
34 views

PostgreSQL : question about SELECT .. WHERE .. = max()

If you have, for example; SELECT * FROM data WHERE line = min( (SELECT length FROM lines) ) AND number < 500; (It's just an example, not a real code) How does PostgreSQL react when the ...
2
votes
0answers
29 views

PostgreSQL : Question about dropping tables inside funtions

I am writing a PostgreSQL code where I have a function wich is used multiple times in a single query with different input values. Inside the function I create some tables and use them. What is the ...
0
votes
0answers
33 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. ...
1
vote
0answers
26 views

Splitting metadata inside Postgresql [migrated]

I have metadata in a postgresql table that I need to split. So far I have been attempting to use Select col_name from "tbl_name" split_part('QGC|WGPLNW|IR|BBC|FCPC|WGPLNW|ARME|QPC', ", 1 | 2 | 3 | ...
2
votes
1answer
36 views

PostGIS Type Modifier Error

I'm trying to work an example from the "PostGIS Cookbook" and I'm getting an error I don't understand. I'm running the example using Postgres.app on a MacBook. Postgres.app is running PostgreSQL ...
0
votes
0answers
30 views

PostGIS : check if 2 lines are at contrary sides of third line

I am looking for a workflow to select a line on the condition that it is located on the contrary side of a middle line. So there are 3 lines (2 are given, 1 I want to select). I don't need you guys ...
4
votes
2answers
107 views

How to speed up a query for nearest linestring to point data

I have processed a Strahler stream order layer with a lot of river linestrings (type: Multilinestring) and their corresponding strahler number (see information here). Besides I have a point layer. I ...
1
vote
0answers
31 views

Do ArcGIS clients that direct-connect to postgresql/postgis databases override configuration settings?

I went in to modify some settings on a Postgresql database via the PGAdmin config editor and some of the settings don't have their default values and they are higher because they've been overridden ...
2
votes
1answer
55 views

PostGIS : I want to use ST_OffsetCurve with MultiLineStrings

I need to use the function ST_OffsetCurve for a multilinestring, but PostgreSQL gives me the error that the function is only for Linestrings. Is there a way arround? I want to use the function ...
1
vote
1answer
44 views

CartoDb - Aggregate and Infowindow

I'd like to use CartoDb to map historic addresses of a city (link to demo). Individual addresses are mapped as points on the map. Detailed information for each address point should be displayed in the ...
4
votes
2answers
77 views

pgAdmin vs psql

I have downloaded postgreSQl 9.3 and Postgis 2.1 recently as an educational adventure and have been working with both through the pgAdminIII interface. I haven't used psql yet when working with my ...
1
vote
1answer
48 views

Update postgres/postgis point data attribute from another enclosed polygon shapefile in QGIS

I have a placename point table in postgis with 'district' column. a districts polygon shapefile with district name in 'Name' column. See the image below. I would like to update the 'district' ...
0
votes
2answers
69 views

GeoServer create layer from PostGIS (data type point)

(Several days ago a user on gis stackexchange suggest that I should use OpenGeo (I was using geojson before). I succeed at what I was doing at that time, but now I have a different problem.) I was ...