PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
1answer
343 views

Error while importing shapefile using shp2pgsql: Coordinate values are out of range

I have a shapefile with 180 points. I'm using shp2pgsql-gui via pgAdminIII. This is an error it gives me when I try to import shapefile. Failed in pgui_exec(): ERROR: Coordinate values are out of ...
11
votes
1answer
547 views

Nearest Neighbor Grouped Selection in QGIS

OK - so I have an interesting problem I am trying to solve. I have a list containing over 100,000 points in lat/long format which I have imported into qgis. Now, what I am trying to do here is group ...
5
votes
2answers
443 views

PostGIS: Approximating a house number from address range

I'm developing a reverse-geocoder for Canada. So far, given a lat/lng, I can find the nearest street (line segment), which includes line segment direction and address ranges for both sides of the ...
6
votes
4answers
1k views

Rename postGIS table and updating the GeoServer?

I want to rename one of my postGIS tables. However, when I do this by applying a simple ALTER TABLE old_name RENAME TO new_name; The spatial data, as I understand it, isn't updated with the new ...
5
votes
2answers
390 views

ArcMap Draw Camera Range with ArcPy

i am working on some camera data. I have some points which consist of azimuth, angle, distance, and of course coordinate field attributes. In arcmap I want to draw shapes like this: The shape is ...
6
votes
1answer
1k views

PostGIS and invalid SRIDs

I'm having difficulty with a PostGIS query. I am trying to query my database (world_countries) using a bounding box drawn on a google web map. The objective of this query is to find any countries that ...
5
votes
3answers
1k views

Developing Web Application For Map

I have huge data of maps usually most of the table are co-ordinates and the other are raster maps stored in SQL server 2008 and PostGres Server. I am using desktop application to analyse the data. ...
2
votes
1answer
242 views

How to modify area polygon in postgres? [duplicate]

Possible Duplicate: Automated correction of parcel geometry based on area measure I need a function to modify area polygon in postgres the major probleme is automated correction of parcel ...
5
votes
2answers
422 views

PostGIS ST_Distance vs. pgRouting

I am looking to create a city directory web app, and the site will need to be able to calculate distances between two geospatial points (like the distance between the user and a restaurant, or the ...
10
votes
2answers
3k views

Finding the closest Geometry in PostGIS

I've been looking over the PostGIS "API" of functions, and I notice that most of them take two elements to compare. For example, the ST_Distance function takes two geometry/geography elements to find ...
3
votes
4answers
2k views

Migration from postgresql 8.4 to postgresql 9.0, postgis 1.5 involved

Im migrating from 8.4 to 9.0, in pg8.4 i have postgis 1.5.1 and in 9.0 im just installed 1.5.2. I decided to dump the postgis databases before the pg_upgrade command, and delete them, planning to ...
4
votes
1answer
2k views

Why is my PostGIS query not using a spatial index?

I am having an issue with a spatial query that is not making use of indexes. My schema is: CREATE TABLE geoplanet_place ( woeid integer NOT NULL, "name" character varying(300) NOT NULL, ...
6
votes
3answers
2k views

How to load OSM data into PostGIS preserving all Tags?

I am new to the field of GIS and am trying to view source tags in OSM. I have downloaded the shapefiles from http://downloads.cloudmade.com and have loaded them into Postgres. When I view the data, I ...
2
votes
2answers
230 views

File paths in a PostGIS Table in QGIS

I have a PostGIS table which I have stored the location of some viewpoint photographs. I would like to store the location of the photo file in a field, but when I add a file path in the attribute ...
6
votes
2answers
570 views

How to get an array of simple lines from one multipoint linestring in PostGIS?

How can I extract some LINESTRING consisting of 3 or more POINTs to several LINESTRINGs each of 2 POINTs in PostGIS?
5
votes
2answers
2k views

GDAL Python bindings not picking up OGR PostgreSQL driver

I have a windows server (Microsoft Windows Server 2003) with: Python 2.7, PostgreSQL 9.04-1, GDAL 1.8.1 (installed from the windows installer (gdal-18-1500-core.msi) hosted at ...
4
votes
2answers
400 views

Does PostGIS not work with psql?

I have a sql script that creates several tables, a trigger, and a trigger function. All the commands work in pgAdmin when I execute them in the "Query" section. My goal is to put all these commands ...
7
votes
4answers
4k views

How to fix “Access to database denied” when accessing PostgreSQL?

I got a tiny problem regarding connection to my server. What should we do when this message appears in front of you? I've done several changes in the *pg_hba.conf* entry but yet to succeed. Any ...
3
votes
1answer
2k views

PostGIS Error: type “geography” does not exist

I just upgraded my development machine to Windows 7 and am therefore reinstalling PostgreSQL and PostGIS. I used the Postgres Plus installer, as recommended on the Postgres website, and followed this ...
5
votes
1answer
438 views

Promotion radius in miles around venues using PostGIS

Bear with me as I'm new to PostGIS and GIS in general. I also don't know the domain well enough to create a good title for this post! Here is what I'm trying to accomplish: I have Venues in my ...
13
votes
6answers
6k views

How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
3
votes
2answers
520 views

Updating Apps on OpenGEO suite Community Edition

I would like to update PostgreSQL and PostGIS on Opengeo CE to a newer version, maybe the other apps too (geoserver, openlayers, etc). Can it be done? Can someone point me the right direction? ...
16
votes
3answers
3k views

In PostGIS is it possible to create a View with a unique ID?

When I create a view in PostGIS is there any way to add a unique ID to that view? Just like the "gid" field in any other PostGIS table? Edit: Sorry I should have included this in the original post. I ...
5
votes
1answer
4k views

qgis to local postgis connection - fails

It seems pretty clear I cannot connect to a local postgresql installation out of QGIS. This is my first experience with PostGIS. I am using PostgreSQL 9.0 on a win7 machine. I can see the successful ...
6
votes
1answer
755 views

Intersection of multiple layers in PostGIS

I need to write PL/pgSQL stored procedure for calculation of intersection of multiple layers. For example, for three layers A, B, C this function should return ABC geometry: Function takes as input ...
2
votes
1answer
332 views

How to create source and target ID columns for a linestring table in PostGIS?

I have table paths_3D which has column "the_geom". I need to create a new column source_id which will have starting points from the geom. This statement doesn't work: ALTER TABLE paths_3d ADD COLUMN ...
12
votes
2answers
1k views

Mixing geometry types in one PostGIS table

I've faced with the following problem. I have to migrate from Oracle database to PostgreSQL+PostGIS. Currently all geometries of all types are stored in one table and each record contains "lid" field ...
5
votes
2answers
379 views

Selecting POIs around specific buildings using PostGIS

The problem: I need to select, for each residential building in my table that has say at least 2 pharmacies and 2 education centers within a radius of 1km, all POIs (pharmacies, comercial centres, ...
3
votes
1answer
1k views

Casting a Geography type in PostGIS

I have the following table defined, which uses PostGIS geography. CREATE TABLE test_geog ( id SERIAL PRIMARY KEY, boundary GEOGRAPHY(Polygon) ); I added the following test polygon to the ...
9
votes
1answer
149 views

How to get the contributors on Open Street Map

I have put my osm file in base thanks to osm2pgsql and I am looking a way to get the contributor list. I have searched in my database and haven't found so much... and the osm wiki about the osm2pgsql ...
10
votes
4answers
772 views

Open Street Map and PostgreSQL what do I exactly need?

I make my first steps in the GIS world and everything is very new for me even if I work on a "huge" project (ie: for a single programmer) very related to maps. My project needs to know informations ...
0
votes
2answers
976 views

QGis import partial PostGIS layer using query builder

I'm sorry, but I'm terribly new to the GIS scene (and PostGIS & QGis). I have loaded a whole bunch of OpenStreetMap data into a PostGIS database and successfully drawn a map using Mapnik. Now I ...
3
votes
2answers
459 views

pgRouting: Is it possible to do multiple (concurrent) Dijkstra/A*/A_shooting_star queries at a time?

Disclaimer: the author of the question is a novice in PostgreSQL and pgRouting. As I understand doing a shortest path query in pgRouting is a complicated SELECT underneath. And as I know unlike any ...
4
votes
1answer
297 views

Sort by geometry using INHERITS?

hope everyone's doing well. I have a statewide point data set (parent table: 600K rows, 500 columns) I need to analyze at multiple scales based on several different spatial divisions. I'll also need ...
8
votes
2answers
332 views

PostGIS- GROUP BY for continuous data values?

In the sample code for the PostGIS ST_ConvexHull function, multiple polygons would be created based upon different, discrete values found in the field "disease_type". --Get estimate of infected area ...
5
votes
2answers
1k views

How to get multiple shortest paths with PgRouting in one query?

I want to run shortest path algorithm on multiple source&target pairs at once and get a result as a table and process it then. How do I do this? This query does not work: SELECT a.source, ...
36
votes
7answers
3k views

Best practices for PostGIS production environments?

What PostGIS documentation have you come across that has been helpful when tuning PostGIS for a production environment? I would like to get together with my DBA to setup a Postgresql/PostGIS ...
6
votes
1answer
682 views

Creating columns in PostGIS using osm2pgsql hstore tags

While I feel this may come down to a database question, it feels GIS-related enough that I feel comfortable posting it here. I'll be happy to take it elsewhere if it belongs there, though! I've ...
4
votes
2answers
897 views

Qgis is slow with complex 'postgis query' layer. How to speed up?

I have a postgis layer in Qgis that is a result of a complex query. Every screen update, Qgis runs the Query again and that's slow. Any suggestion on how to speed up? EDIT - Here is the query: ...
6
votes
2answers
3k views

Postgis TopologyException: side location conflict at 226.001 39.5158, what's the problem?

after st_union() PgSQL returns a note: NOTE: TopologyException: side location conflict at 226.001 39.5158 And in the results there are two rows with empty geometry and other rows are ok. What ...
1
vote
0answers
93 views

Getting started with storing LoST and GML searching

I am working on a logging and search database application. The application will receive event records containing XML LoST values (RFC5222 Location-To-Service-Translation). These records will be ...
4
votes
1answer
570 views

Error using ST_AddPoint for adding a new point to a polyline in PostGIS

I have two PostGIS tables, one where I store points, named "nodes" and another with where I store multilinestrings, named "lines". I'm trying to append a new vertex to a line using one of the nodes ...
7
votes
2answers
5k views

Creating spatial tables with PostGIS

In the PostGIS documentation it says that there are two steps to creating a spatial table with SQL: Create a normal non-spatial table. Add a spatial column to the table using the OpenGIS ...
7
votes
3answers
2k views

Technical comparison of Oracle and PostgreSQL

I have searched on google and the archives for a technical comparison of Oracle and PostgreSQL (also MySQL), unsuccessfully. Is there any comparison that covers more than just the basic differences? ...
4
votes
1answer
374 views

Migration from Oracle to PostgreSQL

I emphasise that I am a newbie in databases. Is it possible to migrate from Oracle database to Postgres? If yes do you know any tested solutions?
6
votes
1answer
515 views

Installing pgRouting Ubuntu Lucid

Here are the steps i did: Added ppa to repository sources in synaptic marked all pgrouting for postgres 8.4 apply (everything was ok) restarted postgres But, i just tried a simple function ...
6
votes
1answer
860 views

QGIS WKT Raster Plugin error, what does this mean?

I have been playing with the WKT Raster plugin. I have installed the WKT Raster experimental binaries in PostGIS successfully and followed the instructions in the read me to the letter. When i am in ...
11
votes
5answers
2k views

Speeding up OpenStreetMap PostGIS querying

I have OpenStreetMap data for the Netherlands loaded into a PostGIS database (PostgreSQL 8.3 / PostGIS 1.3.3) using the osmosis schema. This means all tags are stored in a hstore field. In addition to ...
7
votes
2answers
1k views

Basic PostGIS and PGRouting question

I'm using OSX 10.6 and just downloaded and installed PostgreSQL 9.0.2-1 and pgRouting 1.0.5-1 for Postgres 9.0 from here. I'm a confused what my next steps are though. I'd like to try loading a ...
5
votes
2answers
394 views

Trouble with PostGIS and multiple selection sources

I'm attempting to take geometry columns from two different tables, perform basic PostGIS operations on them, and have them returned in a single result set. My SQL statement looks like the following: ...