PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
2answers
109 views

GIN/GiST Full Text searches through openlayers, geoserver and postgres

I have a a web app that automatically maps recent tweets and allows you to search for certain keywords. it uses Postgres for the database, geoserver as the server, and openlayers as the cartographic ...
1
vote
1answer
72 views

Trouble with INSERT in PostgreSQL 9.1

I am trying to execute the following: INSERT INTO lithic (cp_east, cp_north, type, material, art_count, comment, field_no, gps_unit, initials, rec_date, cortex, geom) SELECT (cp_east, cp_north, ...
2
votes
0answers
22 views

Insertion of a raster geotiff in PostgreSQL database

I am new in PostgreSQL and psql. What is the method to insert a raster geotiff in a postgreSQL database using command psql? What is the best format? Someone indicates to save a raster image as BLOB ...
2
votes
2answers
64 views

shp2pgsql mangles date field — quotes data as if it were char or varchar

I'm attempting to import a shapefile into postgis via shp2pgsql. Among the fields in the shapefile's .dbf file is a date field with format yyyymmdd, which is a valid date format for postgresql. ...
0
votes
2answers
47 views

Select area which is at least x meters away from other geometries

In my table I have the build-up area from a region as a big number of polygons. urban_area: id | name | geometry(polygon) I was wondering if and how I would be able to find the area within a ...
1
vote
0answers
55 views

St_OffSetCurve with self-crossing lines

I have about 50,000 linestrings in PostGIS. They represent routes along roads. But I want them to be (roughly) pavements (aka sidewalks) instead. So I need to move all the lines 3 metres to the left ...
1
vote
3answers
120 views

Why is ogrinfo showing no layers from an ESRI FileGDB?

I have an ESRI File Geodatabase (FileGDB) (size is 15+GB), which has over 10 layers, when I open it up in ArcGIS, everything seems to be working. I want to move this database to postgreSQL with OGR ...
0
votes
0answers
84 views

error occured when importing file on cartodb local host

Logged in as development user. Not able to import a .zip or a csv file. Ruby console has this error log 1.9.2p320 :004 > DataImport[1].log 2014-01-07T05:44:44Z || Using database connection with ...
4
votes
1answer
102 views

Password protecting tables in cartodb

I am trying to find an easy way to have private tables, yet exposing them to certain clients if they are authenticated. This authentication can be achieved by a token system that allows the client to ...
1
vote
2answers
255 views

Install PostGIS and TIGER Data in Ubuntu 12.04

Could someone write a brief albeit dumbed down idiot's guide to installing postgis and loading national Tiger data on ubuntu? I've tried a few guides, namely, ...
0
votes
1answer
39 views

INSERT INTO Error

Hey guys I am trying to get the results of a query into a column in my table. The error I received is this ERROR: Quota exceeded by 16KB. I am using cartodb API, INSERT INTO address (distance) ...
0
votes
0answers
136 views

postgresql 8.4 and postgis 1.5 error: type modifier is not allowed for type 'geometry'

I would like to generate a buffer (within a limit of 3km ) where the user clicked point. In pgAdmin, select my database and open a query editor and create 2 PostGIS functions (UTM Zone Function and ...
0
votes
1answer
228 views

Connecting PostgreSQL/PostGIS and MapGuide Maestro

This is less a specific question, but hopefully more of an open question. There is little documentation regarding connecting the excellent OS web mapping software MapGuide Maestro ...
1
vote
3answers
131 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 ...
1
vote
0answers
150 views

Creating a spatial database using EXTENSIONS: error loading legacy.sql

I am using Postgres 9.3 and PostGIS 2.1, installed in a Docker container via RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list RUN apt-get -y ...
0
votes
2answers
153 views

Building CartoDB from source using updated dependencies on Ubuntu 13.10

I am attempting to build CartoDB from source on an Amazon VM for the first time in my life. For purposes of sanity, I want to use the same instance/database of postgres for both CartoDB and all of my ...
1
vote
1answer
47 views

creating a st_contains query with geographies not geometries

I'm trying to find all the geography points that are contained in a geography polygon, let say all the traffic lights within a given city or neighborhoods, how can i convert this working st_intersect ...
4
votes
1answer
3k views

Connect to Postgresql ArcSDE 10.1

I cannot connect to postgresql 9.0.5 with ArcSDE 10.1, using ArcCatalog 10.1 on Win 7 professional 64 bit. I followed the steps described here, and installed the Pg-Agent from Stack builder. When I ...
2
votes
1answer
222 views

Direct DBMS sql queries and ArcSDE geodatabase

i want to make updates from Arcobjects on several tables stored on a ArcSDE 10.1 versionned geodatabase based on Postgresql 9.0.5 , none of these update require spatial data , and making these updates ...
1
vote
1answer
77 views

python scripts for accessing info from a postgresql database in case of a qgis application?

I am beginner and I need to know if I could access a postgresql database from python script made for a qgis application
1
vote
2answers
53 views

Ogr2ogr - shape to postgis - is there a way to use and preserve an existing primary key?

I've been struggling with this for a while, tried a few different ideas inspired by these pages: http://www.gdal.org/ogr2ogr.html http://www.gdal.org/ogr/drv_pg.html ...
0
votes
1answer
47 views

Cast record type to geometry type

How can I cast type record /subquery/ to geometry type? My example: select geom from (select (ST_Simplify..... ) as geom and result is type record, but I need to convert to geometry.
2
votes
2answers
426 views

pgrouting 2.0 package for postgresql 9.3

I'm trying to install pgrouting 2.0 on a postgresql 9.3 database (with postgis 2.1). Are there any packages on ubuntu 12.04 or do I have to install from source? Is postgres 9.3 supported at all in ...
4
votes
2answers
3k views

How to connect to Postgres with QGIS?

Oddly, it should be simple, but I can't connect to a local PostGIS database. My installation is with Mac OS X (10.8), Postgres.app (in doc it's said to have PostGIS included) and Quantum GIS 1.8. ...
0
votes
1answer
130 views

How to install pgrouting 2.x on ubuntu 12.04 LTS

I try to install pgrouting 2.0 on ubuntu 12.04 LTS with postgresql 9.2 I have ppa in the system by sudo add-apt-repository ppa:gwibber-daily/ppa answer: `You are about to add the following PPA to ...
6
votes
5answers
1k views

How to split OSM roads into individual segments at intersections?

I want to create a road-network for use with pgRouting using OpenStreetMap data. I loaded a shapefile from GeoFabrik into a Postgres table (with PostGIS enabled). However, one problem I had was that ...
1
vote
0answers
56 views

How to run PostgreSQL stored procedures from QGIS? [closed]

I'm trying to figure out if it's possible to run a stored procedure in a Postgres database from QGIS, more specifically I would like to do this from within a python plugin. In this case I'm trying to ...
2
votes
1answer
66 views

Creating pop-ups on point layers

i have a postgresql database which is refreshed all 10 minutes and i need to create graphs in pop-up with the data. When i click, a pop-up (or annotation ?) appears. How can i make it possible ? ...
2
votes
2answers
529 views

Importing planet files into Nominatim

After a gruesome night installing PostgreSQL 9.1, PostGIS 2 and Nominatim 2 on CentOS 6.3 using the instructions here, I am finally at the stage of importing a US planet file. Problem: In ...
2
votes
0answers
82 views

Data loss after compressing geodatabase in ArcSDE

I suffer sometimes from data loss after compressing ArcSDE geodatabase, this geodatabase contains versioned feature classes, so the compressing script reconciles and compress the geodatabase: # ...
3
votes
1answer
64 views

Add vertices costs to postgresql routable network

In osm2po it's possible to create custom routers as the sample router TrafficSignalsRouter, but the costs seem to be added on vertices after the routing. Is it possible to add these costs on the ...
3
votes
3answers
694 views

How to route between lat/lon pairs in pgRouting?

I have set up Postgresql, PostGIS and pgrouting on Ubuntu. I have imported an osm for wales using the following command: ./osm2pgrouting -file wales.osm \ -conf ...
0
votes
1answer
81 views

How to format SQL expressions for ArcPy with ArcSDE for PostgreSQL feature class?

I'm trying to use SelectLayerByAttribute to find the last point added to a FC. I figured I could use the objectid field because it's serial. I wrote the following: ...
1
vote
0answers
57 views

Complexity of A-star algorithm using pgRouting in a graph

I'm using the A-star algorithm in pgRouting. It uses the Manhattan distance as a heuristics ((|dx|+|dy|)/2). What would be the time complexity in a standard route network? Based on Why is the ...
2
votes
1answer
101 views

Retrieve geographic coordinates from OSM imported data

We have just finished importing OSM data into our PostGIS (Postgresql) database. And we are having difficulty understanding the geometry of various shapes imported. We run a query to retrieve the ...
0
votes
0answers
65 views

Arcpy ERROR 000732 using tools from Toolbox (Copy, FeatureToFeature etc.)

I have got a lot of feature classes in my sde postgreSQL database. When I check the existence of sde database using arcpy.Exists(inGDB) I get the True result. In the case when I check the existence ...
0
votes
3answers
3k views

Get geometry from coordinates

I have a table with geometry column called point, saved in SRID 4326. I want to get the geometry by its coordinates, but something didn't work. I suspect database configuration or something. Here is ...
0
votes
0answers
29 views

Unable to set pg as default backend with osgeo4w GRASS

I am trying to set PostgreSQL as default backend for GRASS, but cannot manage to get it right. Working with GRASS 6.4.3 print g.run_command('db.connect', driver='pg', flags = 'c', ...
4
votes
1answer
92 views

Proximity search: ST_DWithin vs ST_Distance?

I have records stored in a table with latitude/longitude coordinates stored in a geometry field. I want to find all records nearby a user supplied reference point. Note "nearby" probably means less ...
5
votes
1answer
137 views

What spatially-aware GUI administration softwares exist for PostgreSQL/PostGIS (free or paid)?

Most of my experience with PostgreSQL has been PGAdminIII and psql, but I'm interested to know what others use. Is there PostgreSQL equivalent to SQL Server Management Studio (SSMS) and its ability ...
1
vote
4answers
36 views

postgresql how not to show the first result returned st_distance

I have a query that calculates the distance away from a given point, however currently my query returns the point I am actually querying a distance for. How would I prevent site 1 from showing in my ...
0
votes
0answers
25 views

It is possible to invoke PostGIS internal function within new PostgreSQL user-defined function in C?

I have fuction f() and function ST_Area() for example. Can I invoke ST_Area() in the body of my function f()? Function f() is written in C. The code might look like this: #include "postgres.h" ...
5
votes
2answers
887 views

How to implement Spatial Autocorrelation using QGIS or PostgreSQL (or any free application)?

I am a total newbie on the GIS scene so I hope this is not a stupid question. I have two layers in a PostgreSQL database. The first layer contains points where events happened in Europe. The second ...
4
votes
2answers
204 views

How to find out what features /tags are included in an .osm or .pbf file?

I would like to load osm data into a postgis (postgresql) database. In How to load OSM data into PostGIS preserving all Tags? there has been a solution posted: Download the OSM files (in .osm ...
0
votes
3answers
323 views

Unable to connect PostgreSQL to ArcMap 10.1

I'm trying to connect my local PostgreSQL database to ArcMap 10.1 but for some reason I'm unable to connect to the server. Any ideas of what might be causing the issue. For the instance option in ...
1
vote
2answers
113 views

Postgis csv and error loading into mysql

I want to load spatial data into mysql using a csv i have generated from a postgres table and when loading it into mysql database using phpmyadmin it complains Cannot get geometry object from data ...
0
votes
1answer
103 views

Install both postgis and postgresql-9.1-postgis packages?

I've installed the PostgreSQL package (ver. 9.1) on a Debian 7 server using the command "apt-get install postgresql postgresql-contrib". I now want to install PostGIS as well. Should I install both ...
0
votes
0answers
79 views

OSM. Problem with memory

I have the virtual machine with 64 GB I download OSM map: osm2pgsql --slim –d gis –C 16000 –number-processes 4 planet-latest.osm.pbf But I have warnings: Going over pending ways... 121492826 ...
0
votes
0answers
30 views

SQL questions testing pgRouting 2.0

Following the post:pgRouting 2.0 for Windows quick guide, cuz I have some problem with DB manager(here is the problem I posted:DB manager in QGIS 2.0), I skip DB manager and save the test shapefile, ...
0
votes
0answers
36 views

DB manager in QGIS 2.0

I followed this post:pgRouting 2.0 for Windows quick guide, and I want to use DB manager to load the test data into my PostgreSQL database. I used url to get the test data: I have set up the ...