PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
3answers
42 views

postgresql export database with command or pgAdmin III

I want to export my postgresql db with pgadmin. I search all of its GUI, I also searched the web and I don't find some sueful information. I know how to import the db into postgresql: create a db with ...
2
votes
1answer
42 views

SQL query to have a complete geojson feature from PostGIS

I would like to get a geojson feature with properties from PostGIS. I have found an example to have a feature collection but I can't make it works for just a feature. so far I tryed to modify the ...
1
vote
1answer
33 views

where styles from QGIS are saved in PostgreSQl

I can save style of a layer in DB PostgreSQL. But where it is stored in Postgres? How can I found It?
4
votes
3answers
76 views

From PostgreSQL to QGIS

I have conected to PostgreSQL and imported the layer to QGIS. The names of columns are written using English letters. Can the names of columns be automatically renamed using another language?
0
votes
1answer
13 views

Road displays up to node, not up to starting point and ending point

SELECT id FROM table ORDER BY st_distance(the_geom, st_setsrid(st_makepoint($slng,$slat), 4326)) limit 1 ; get source and similar for target ; and then apply in dijkstra algo SELECT pgr_a('SELECT id ...
2
votes
1answer
38 views

<#> doesn't give a useful distance

I'm new to postgresql/postgis and trying to measure a distance. So st_distance() may be the most accurate, it's the slowest too (as I've read). I read that one can use geometric (instead of ...
1
vote
0answers
35 views

PostGIS - Intersects feature to split into linestring

I would like to know if it's possible to intersect feature datasets (multipolygon, polygon, multilinestring and linestring) to get a result as a set of linestrings being split at each intersection ...
1
vote
2answers
53 views

select intersection of 2 geometries, polygon and polyline

I'm searching how to have a result of 2 geometries (villages and wetland) which don't intersect. When I write: select distinct v.name from villages v , wetland w where ST_intersects(w.geom,v.geom) ...
0
votes
0answers
26 views

Google Streetview Images in infowindow

I have followed the instructions on this blog post on adding streetview images to the infowindow: http://blog.cartodb.com/a-picture-is-worth-1-000-attributes-infowindows-with/ I can do it without a ...
1
vote
1answer
112 views

create the postGIS table error No such driver: PostgreSQL

I'm trying to create the postGIS table with spatial features I can do it by: library(RPostgreSQL) library(spacetime) library(rgdal) dbname = "geodatabase" user = "postgres" password = "***" #password ...
0
votes
1answer
29 views

How to update a CartoDB table at a certain time of day

I have a table in CartoDB 'inland' that I would like to have automatically update each day at 8pm PST. I know that PostgreSQL has no internal function to run an UPDATE COLUMN function at a certain ...
0
votes
0answers
34 views

Connect to PostgreSQL from ArcMap 10.2 failed [duplicate]

I have a database server PostgreSQL and Postgis. I want to connect to database from ArcMap 10.2 , I tried Add Database Connection from arcmap menü. I typed my connection informations and clicked ...
1
vote
3answers
47 views

How can I insert a bounding box or polygon in a PostGIS geometry field?

I have a field in my table called 'geometry' that was created thus: CREATE TABLE "public"."sites" ( "id" int8 DEFAULT nextval('sites_id_seq' :: regclass) NOT NULL, #... A few MORE fields ...
0
votes
3answers
116 views

Import shapefiles on my postgis table using R

Using R, I would like to import shapefiles that are in a directory on a geometric table i have on postgresql / postgis. What is the instruction that allows me to do it? EDIT: here is my code to ...
3
votes
1answer
43 views

Problem in Backing up a database in PostgreSQL

I need to create a backup from my database (in PostgreSQL 9.3). I have used the pg_dump tool, gives me an error. I have also used pgAdmin III for backing up which also gives me the following error: ...
3
votes
1answer
63 views

Using OpenStreetMap for simulation of commuter routes

I'm seeking some advice on how to build a simulation based on OpenStreetMap Data for my masterthesis. My knowledge of spatial data is very limited, since I come from another field of science, namely ...
2
votes
2answers
62 views

Problem with running PostgreSQL 9.3 after installing pgRouting

I have PostgreSQL 9.3 installed on the server. It worked just fine. I also had a webservice which connected to a database. That also worked like a charm. Later, I decided to install and use pgRouting. ...
5
votes
2answers
51 views

Working with address data extracted from *.osm

My goal is get all the addresses from a certain country, ideally - from all countries, but for now - only from one. I downloaded an *.osm file from here http://download.geofabrik.de/ for a certain ...
3
votes
1answer
31 views

PostGIS ST_ConvexHull for cube corners not as expected

I'm new to PostGIS and am wondering whether ST_ConvexHull will be of use in a particular work problem. Trying out some simple cases to make sure I understand what it's doing, I didn't expect this: ...
1
vote
2answers
48 views

How to setup a SQL trigger in CartoDB

I need to setup 2 SQL triggers in CartoDB that will update my inland and coastal tables each time my obs table is updated. I have never setup a SQL trigger but I have looked at the documentation and ...
2
votes
1answer
21 views

Add minutes contained in a column to a date

In CartoDB I want to add minutes contained in a column of data type number to a date. e.g. SELECT my_initial_date + 'xx minute'::INTERVAL as my_date FROM table What is working is: SELECT ...
3
votes
2answers
95 views

Importing .shp to postgreSQL

I want to import a shp file to postgreSQL. First I create sql file and then run PostgreSQL. To create sql file, I run this command in windows cmd: shp2pgsql -s 4326 worldCountries.shp worldcountries ...
2
votes
1answer
47 views

How to calculate the shortest distance for multiple source and targets using PgRouting?

I have a table with points and a road network which includes driveways (where you enter the highway). I want to find the point which is closest to a driveway. So I was thinking I can calculate the ...
3
votes
1answer
52 views

Moving SpatiaLite Table into PostgreSQL using ogr2ogr?

How can I move a Spatialite table from a Spatialite db to a PostgreSQL db using ogr2ogr?
1
vote
1answer
20 views

QGIS: Why do I get permission denied when saving style to postgres

In QGIS I am trying to save a style to a postgres database but I always get the error "Unable to save layer style. It's not possible to insert a new record into the style table. Maybe this is due to ...
2
votes
2answers
35 views

PostGIS SQL NOT EXISTS Statements? [closed]

I'm trying to query my PostGIS database for ID of people who did X but did not do Y. I've attempted the query below, but it does not return any results. I'm very new to SQL so I may be overlooking ...
1
vote
1answer
31 views

Accessing pgsql db set in cygwin from qgis installed on windows through osgeo4w, possible?

As the title of this question, I want to know if it is possible to access a PostgreSQL database set in cygwin (version 9) from QGis installed in Windows 8.1 through the OSgeo4W application, is that ...
2
votes
1answer
60 views

nearest facility with pgrouting

I have a postgres table of students with lat, lon and geom, , and a table of schools with the same, and a table of roads that has been converted to nodes. I'm trying to find the driving distance to ...
3
votes
1answer
33 views

How to quickly extend PostGIS's R-Tree implementation?

I am working on a problem where along with data points location, I also have information about the connectivity between points.(Think a graph of points, where an edge denotes some relationship) My ...
1
vote
1answer
20 views

Updating table with nearest node from another table

I have a roads table that has been transformed into nodes for use with pgrouting. I also have a table of geocoded addresses which contains lat, lon and geom. I am trying to write a query that ...
1
vote
1answer
44 views

Postgres/PostGIS: Dissolve multiple fields with COUNT (Point shape)

I have loaded point .shp feature classes into Postgres 9.3 db, and enabled postgis,plpgsql,postgis_topology extensions. I'm looking to dissolve multiple fields within a single table 'TABLE1' and add ...
7
votes
1answer
180 views

How do I calculate Manhattan distance with PostGIS?

I am using the ST_Distance function to calculate the distance between two geometries (a train station and a building) Since I know that all buildings and all train stations are in Chicago, which has ...
1
vote
1answer
19 views

Error inserting GeoJSON in PostGIS

I know there is a similar question but I am getting a different error and none of those answers have helped. I am trying the following query (the GeoJSON itself is from the PostGIS website. INSERT ...
1
vote
1answer
32 views

Adding SRID 3857 to spatial_ref_sys

My application is throwing the following error: DatabaseError: GetProj4StringSPI: Cannot find SRID (3857) in spatial_ref_sys I'm guessing (as stated above) that I need to add the SRID 3857 to the ...
2
votes
2answers
44 views

OpenGeo postgres installation not working from command line but works from PGadminIII on fresh install

Problem: I just did a default install of opengeo suite (4.1) on Ubuntu 12.04 and followed instructions exactly. The problem is that I can connect just fine to my postgresql through pgadminIII ...
2
votes
1answer
43 views

How to use pgsql2shp when PostGIS extensions installed in a separate schema as geometry

I have the PostGIS extension (postgis functions and spatial_ref_sys table) added to a specific schema called postgis. I'm wanting to run the pgsql2shp utility with a select query on geometries stored ...
1
vote
1answer
107 views

Simplifying Shapefile without risking Spatial Accuracy?

I am building a feature for a web application. Basically would use the ABS (Australian Business Statistics) data to render the regions on the Google Maps. I am able to implement the basic working ...
1
vote
0answers
23 views

How to dissolve inner polygons in a multipolygon

I'm trying to get the boundary of a collection of zip codes. Here is my current sql: SELECT ST_AsText(ST_SimplifyPreserveTopology((ST_Union(geom)), .003)) as poly FROM zcta5_data WHERE zcta5 IN ...
1
vote
1answer
58 views

QGIS Relation Manager

I have a PostgreSQL database with a one-to-many relationship. Here is a reduced example: CREATE TABLE buildings.building ( objectid serial NOT NULL, building_no character varying(40) NOT NULL, ...
1
vote
1answer
43 views

Implementing Wrapper of PostgreSQL?

How can I implement the Wrapper of PostgreSQL? I found this useful looking wrapper from a FOSS4G routing with pgRouting Workshop but I do not know how to implement it!
2
votes
0answers
27 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 ...
0
votes
0answers
31 views

Postgresql Postgis Query is taking long time

I have a table that included only 472 rows and geometry of table is Multipolygon. I am sending query to databse via PgAdmin III select * from mytable // this query takes 99413 ms this is vey long ...
2
votes
0answers
30 views

How can I merge adjacent polygons and return all (adjacent and not adjacent) as Multipolygon?

I have a postgres database with administrative boundaries and their geometry. Each of those boundaries have an ident number. What I want to achieve: First I want to select all rows which are ...
1
vote
1answer
27 views

GeographyFromText and ST_SetSRID+ST_MakePoint different results?

Why am I getting different results? SELECT ST_DISTANCE( ST_GeographyFromText('SRID=4326;POINT(13.401111 52.383343)'), --berlin ST_GeographyFromText('SRID=4326;POINT(9.997559 53.533778)') ...
1
vote
1answer
35 views

postGIS: what is more efficient: single or two-point search

I have seen different approaches to conducting searches. Which is the best approach in storing the data for database efficiency: saving both longitude and latitude points longitude latitude vs ...
4
votes
1answer
45 views

Binary insert into Postgis geography column results in value being inserted as geometry

When writing WKB as a value (and as a binary parameter) to a geography column, the persisted value is not geography. Example Java is also available here: ...
1
vote
1answer
39 views

Union of several linestring to multilinestring using MS SQL Server

Followed Postgreql query is the existing one used to combine serveral linestring to a single multilinestring. is there any equivalent of this in SQLServer . SELECT ST_AsText(ST_Collect( ARRAY[ ...
6
votes
1answer
98 views

How to get the centroid of a set of points in POSTGIS?

I use PostgreSQL with POSTGIS extension. I have a set of points in the_geom column from a table myshema.myobjects I would want create a select statement to get the centroid of this cluster, so from a ...
0
votes
0answers
22 views

Problem in importing .osm file with osm2pgrouting 2.0

i've got two different systems: First system is: Ubuntu linux 64bit Postgres 8.4.8 Postgis 1.5.1 pgrouting 1.05 osm2pgrouting 0.2.0 This the system i've used for an old project that is already ...
0
votes
1answer
36 views

Pgrouting install debian 7.5 whezy

I need to install pgRouting on a Debian 7.5 64-bit server. I have PostgreSQL 9.1 and PostGIS 1.5 running. But somehow I can not install pgRouting. 1 - To use add-apt-repository ran the command: ...