PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

30
votes
6answers
8k views

How to use PostgreSQL/PostGIS with ArcGIS for Desktop?

Has anyone successfully used PostgreSQL with PostGIS successfully? I am a semi-experienced ArcGIS user and want to build out a database and connect it to ArcCatalog. I've scoured the internet for ...
4
votes
2answers
839 views

Is Shooting Star broken in PGRouting 1.05?

I'm using pgrouting DLL 1.05 with postgresql 9.1. All required function installed. Astar and Dijkstra work fine with sample data but "SHOOTING STAR" is not considering "reverse_cost". Also if i try ...
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 ...
19
votes
1answer
7k views

How to change the SRID of exisisting data in PostGIS?

While importing my shapefile data to PostGIS, I did not select the proper Projection. How do I now change the SRID of the data, without transforming the Coordinates?
7
votes
1answer
2k views

Using PostgreSQL with QGIS and ArcGIS?

Is it possible to use PostgreSQL with QGIS and ArcGIS? i.e. one database for different clients. Is it anything that I have worry or any problems to use the DBMS from two different software? I know ...
9
votes
2answers
1k views

Which function for creating a POINT in PostGIS?

When defining a Point in PostGIS, when do you decide to use which of the following? ST_SetSRID(ST_MakePoint(lon,lat),4326) ST_SetSRID(ST_Point(long,lat),4326) ST_SetSRID(ST_GeomFromText('POINT(lon ...
4
votes
4answers
3k views

Calculate distance of point from an arc/polyline

Using Postgres/PostGIS, I am trying to query the database for the closest arc to a particular GPS point. Each Arc is made up of two nodes that are GPS points on a map. Is there a way I could query ...
14
votes
2answers
2k views

Identifying road intersections using PostGIS

I'm trying to identify where roads intersect each other, and to make a point at this intersection, with the number of roads that form the intersection listed. I was wondering if there was some way ...
13
votes
2answers
23k views

How to insert a point into postgis?

I have created one table in my Postgis. But I can not insert point. I do not know what's wrong with my query? CREATE TABLE app ( p_id INTEGER PRIMARY KEY ); SELECT ...
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, ...
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 ...
2
votes
2answers
1k views

What does 'DBMS table not found' message mean?

I have a plain postgressql table (version 8.2). I am trying to connect to it to it from ArcGIS desktop 10.0, and use as a query layer, as given in this document: ...
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 ...
10
votes
3answers
3k views

Which is the best way of working with PostGIS data in R?

I work with R almost all the time, and now I am using it for doing spatial data mining, but I have this question: I have a PostGIS database with (obviously) GIS data, If I want to make statistical ...
10
votes
2answers
2k views

How do you display related records in QGIS?

Coming from an esri background I have always used relationship classes in a gdb to display records related to a feature. Eg. Relate 1 survey point to many documents, photos etc. Does any one know how ...
15
votes
3answers
3k views

How can I optimize pgrouting for speed?

I am using pgrouting on a postgis database created through osm2pgrouting. It performs very good on a limited dataset (3.5k ways, all shortest path A* searches < 20 ms). However since I have ...
13
votes
6answers
11k views

How can I enable Shapefile GUI Loader in pgadmin3?

I have installed PostgreSQL 9.1 with PostGIS 1.5.3 on Ubuntu 11.10. I also installed pgadmin3 1.14.0-beta1, following this instructions. If I remember correctly, when I installed PostGIS on Windows ...
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. ...
13
votes
1answer
1k views

How to publish PostGIS Rasters in Geoserver?

What is the best solution to publish postgis rasters using Geoserver? I have spent a lot of time trying to create a Raster datasource using Image Mosaic JDBC but with no luck. Steps performed: 1. ...
6
votes
3answers
2k views

Connecting to ArcGIS Desktop PostgreSQL database (running locally)

I know this is a total noob question but then again, when it comes to PostgreSQL I am a total noob... I have installed the OpenGeo suite on my computer, running Windows 7, 64-bit. I have ...
5
votes
1answer
3k views

How to create a table from existing tables (applying new schemas) in postgis DB?

I have a table that is geospatially enabled; that contain world borders. I want to break it down to different schemas (global, europe etc..) . My thought is to use use something that looks like this: ...
4
votes
3answers
234 views

How to number polygons according to their spatial relationships?

I have, for example, this layer in postgresql (polygons): table : poly (objectid: integer, num: integer, shape: geometry) I want to enumerate the polygons from left to right and top to bottom ...
4
votes
2answers
4k 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. ...
7
votes
2answers
7k views

Adding shapefiles to PostGIS database

I was able to create a Postgresql database and then I executed, createlang plpgsql geospecies psql -d geospecies -f postgis.sql psql -d geospecies -f spatial_ref_sys.sql So now can I directly ...
6
votes
1answer
3k views

How to import a raster into PostGIS?

I'm trying to follow the instructions here to load a raster into a PostGIS database: python raster2pgsql.py -s 4269 -I -r *.tif -F myschema.demelevation -o elev.sql I understand that I replace * ...
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
1answer
2k views

Loading a raster using QGIS into a PostGIS2.0 enabled database

Following on from my attempt to install a postgresql 9.1 db with postgis 2.0 on windows 7, I am trying to figure out how to load a raster. I have successfully loaded a shapefile, and am trying to do ...
5
votes
1answer
2k views

How do I perform a proximity search with Postgis?

OK, so I downloaded the Geonames database (cities1000) and wrote a small Ruby program to import them into my table (geo_cities). I then added geography column called geog. So after all of that, 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 ...
4
votes
1answer
421 views

How to create linestrings with a definite angle and length, that are fixed to a point

I want to create linestrings with a definite angle (e.g. 160°) and length (e.g. 2m) that are fixed to a number of points of another linestring. So, I want to use the ST_DumpPoints function to find the ...
7
votes
1answer
1k views

How to perform a spatial join of point and polygon layers in PostGIS?

I have a point dataset representing households that I want to associate with a parcel layer (i.e. assign its parcel_id). With ArcMap, I could spatially join the polygons to the points and specify that ...
4
votes
3answers
98 views

GIS QUERY on point and buffer

I have a point table and the buffer geometry is created around the point. I have defined the if the point is within the buffer_distance then its value is =1 and if it is outside the buffer its value ...
4
votes
1answer
233 views

Is there a way to select what to import from planet-latest.osm.bz2 to database?

Is there a way to select what to import from planet-latest.osm.bz2 to database? I want to do something like : osm2pgsql ... --place='city' --admin_level='2' My goal is to use only cities and ...
3
votes
1answer
507 views

How to manage the osmosis command line?

This refer to this post : Read Here I'm in trouble when using osmosis command line to export data from planet-latest.osm.bz2 directly to osm2pgsql using some criteria to select what to transfer. I ...
3
votes
0answers
461 views

How can I properly add PostGIS data into MapGuide Maestro?

I am having trouble connecting a PostGIS database to MapGuide Maestro. Actually, I have added the PostGIS data into Maestro, but when I click to validate the layer it shows an error message: ...
3
votes
1answer
370 views

How to connect a PyQGIS plugin with Postgres?

I have some questions for you: I created a python-plugin in QGIS, then I created a Qt gui fom my plugin and at last I created a Postgres DB now I need to make a connection between Qt-gui and ...
2
votes
1answer
390 views

Quantum GIS ->ArcGIS Server configuration possible?

Is it possible to connect a Quantum GIS Desktop 1.8.0 to an ArcGIS Server 10.0 ? and of course publish services on it?. The configuration would be like this Quantum GIS-> ArcGIS Server 10.0 on ...
2
votes
1answer
197 views

3d terrain from data in postgres

I am quite new to arcgis and I would like to create a 3d terrain. Now I have a postgresSQL table containing a list of points with their geometry data and the Z value for each point. What I would ...
2
votes
1answer
253 views

update tables data dynamically

Can u help me in creating a trigger and function so that every time i change the flag in table A the buffer distance should get changed and also its geometry field also , ie the polygon area? I have ...
2
votes
2answers
541 views

Why does Mapserver throw “msQueryByPoint(): Search returned no results.”?

I have been trying to configure a QUERY using mapserver. Below is the mapfile: MAP NAME "Fourth" UNITS dd EXTENT 58.206740 5.756104 ...
1
vote
2answers
166 views

Searching planet_osm_point by longitude and latitude

I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads. I have looked at ...
1
vote
1answer
121 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 ...
0
votes
3answers
3k views

How to store an image in PostgreSQL and display it in an openlayers popup?

This is question regarding storing of image in PostgreSQL and display in openlayers popup through geoserver(using wms service). PostgreSQL is installed in my virtual machine. I tried to store image ...
22
votes
5answers
8k views

Optimizing osm2pgsql imports for OSM data

I'm currently building an instance on EC2 on which to import the entire Planet.osm snapshot of the whole Earth's worth of data for some projects we're working on. I've spun up a large Ubuntu x64 ...
11
votes
1answer
554 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 ...
8
votes
2answers
494 views

PostGIS Intermittent INDEX Performance

I have a table containing approximately 55 million data points ( point is a geometry with SRID 4326 ) and for my query I need to join this to an area table ( currently have ~1800 areas ) which ...
17
votes
4answers
15k views

Why does PostGIS installation not create a template_postgis

I went this route for installation of PostgreSQL and PostGIS: PostgreSQL using the standalone KyngChaos, PostGIS install from KyngChaos as well... pgAdmin3 from PostgreSQL Tools Now when I launch ...
7
votes
1answer
2k views

Output polygon data from postGIS and read it on Google Maps API

So, I have a group of polygons stored in PostGIS. I'm trying to build a web application with Google Base maps (using Google Maps API). Now, How do i output the polygons in the right format so that ...
5
votes
2answers
1k 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 ...
5
votes
3answers
2k views

Can I connect (& edit) to a postgresql database with arcgis without arcSDE?

After trying in vein to get spatialkit and zgis working with my postgresql database in arcgis 9.3 and 10 , I was wondering if anyone has had any luck with these products. My postgresql database has ...