PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
1answer
19 views

Split lines into non-overlapping subsets based on points

Given a table with line geometry, and one or more points that are snapped to this line in a separate table, I would like to split each line with one or more intersecting points at each of the ...
0
votes
1answer
83 views

Create shp file from data postgis / kml using java

I'm working on a geographic information system project, whose products form shp file. I am using java language, and PostGIS database. Is there a way to generate a shp file from PostGIS or kml using ...
1
vote
0answers
10 views

Python script fails on stand alone but works in ArcMap as a toolbox

I have a fresh install of ArcGIS Server and ArcGIS for Desktop both 10.2, latest patches applied. The data is served in this application from a PostgresSQL enterprise geodatabase. The problem is that ...
14
votes
1answer
345 views

How to query OSM for all beaches facing west? - QGIS preferred

I want to identify all beaches on this planet (or a given subset of it) that are facing westwards (+/- 20-30 degrees). My idea is to use OSM as the data source. Extracting all polygons that have 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?
1
vote
3answers
46 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
43 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
83 views

Geoserver OSM data Imported via osm2pgsql - most efficient tables to use to style roads

The Osm2pgsql importer for OSM data to Postgres results in two tables for ways, one called planet_osm_roads and a second one called planet_osm_lines The Osm2pgsql documentation states that the ...
1
vote
1answer
112 views

How can I relate the osm2po osm_source_id to data in OpenStreetMap?

I created and imported OpenStreetMap (OSM) data into Postgres using osm2po: e.g. java -Xmx8g -jar osm2po-4.6.9/osm2po-core-4.6.9-signed.jar config=osm2po.config.eu_xc prefix=eu tileSize=x,c ...
1
vote
3answers
185 views

How to register as versioned using SDELayer?

This is the normal process using ArcCatalog : I want to automate this process using sdeLayer or any tools - does anybody have an idea as to how to do it? there is an application sdelayer ...
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 ...
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?
4
votes
2answers
2k views

Can POSTGIS 2.0 be install with POSTGRES 9.2 on Ubuntu 12.04 OS at the moment?

This question is more about environment set up. At the current moment, March 4th 2013, can POSTGIS2.0 be install with POSTGRES 9.2? I check their website out and to my understanding it is not ...
3
votes
2answers
5k views

How to install PostgreSQL 9.2 with PostGIS 2.0 on Ubuntu 11.10 (or higher)?

I have read this question: Install PostGIS v2 for PostgreSQL v9.2, but it didn't resolve my problem. I added the PostgreSQL backports PPA and installed the postgresql-9.2 package, but there is no ...
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 ...
0
votes
1answer
88 views

How to update/delete data from a datagridview?

I wanna be able to update/delete data from a datagridview, and when I do that of course the data in my PostgreSQL database should be edited too. So I've thought about giving the user the ability to ...
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 ...
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
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
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 ...
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 ...
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: ...
3
votes
1answer
768 views

How to use the pgRouting TSP function?

For more than two days I'm trying to make the TSP algorithm work in PostgreSQL/PostGIS. My problem seems to occur when I'm trying to take into account the road network for TSP algorithm. I know that ...
1
vote
2answers
83 views

adding geometries to a source, target table for multiple rows in pgrouting

I am having an issue trying to perform the pgr_dijkstra algorithm and getting back a line in my table for multiple rows. I have a table that has a columns of source, target node id's but I cannot ...
1
vote
1answer
113 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
386 views

SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'); not work

I'm using using OSgeo 6.5 dvd and studing pgrouting workshop (link) for get shortest path. I created network topology call "pgrouting - workshop". There are three commands to execute in section 5.2 ...
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 ...
4
votes
1answer
173 views

POSTGIS SQL - How do I remove (defined) sliver polygons

I would like assistance in writing SQL (for POSTGIS in postgresql) to remove sliver polygons (including long narrow slivers and some small irregular polygons that were erroneous 'gaps' in the original ...
2
votes
2answers
63 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. ...
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 ...
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 ...
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
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 ...
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 ...
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
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
2answers
341 views

Function for Selecting Points in a Polygon

I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
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
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 ...
4
votes
2answers
262 views

clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...
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 ...
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
1answer
171 views

Get Multiple Shortest Path using PgRouting in One Query

I am trying to get multiple shortest path using A* Algorithm available in PgRouting. I referred Solution given by UnderDark ( Link of the Stakoverflow Post ) . But it is not giving me proper Output. ...
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 ...
2
votes
1answer
352 views

Create isochrone from multiple start points

I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start ...
3
votes
2answers
216 views

Saving rasters to postgresQL using raster2pgsql, saving forecast time

I would like to save a forecast which is saved as geoTiffs into a postgresQL database. I've been able to import the rasters using: raster2pgsql -s 0 -I -d tiff/field*.tiff -F public.latest | psql -d ...
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!