PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

3
votes
2answers
498 views

Why does Ogr2Ogr Postgres import fail?

I have a lot of S57 files that need to be imported to PostgresDB. The process takes over 2 hours. In order to improve performance, I have tried using PG_USE_COPY to use copy instead of DB inserts. I ...
3
votes
1answer
569 views

ArcGIS Server 10.1 and Postgres Geoprocessing Service issue

I'm hitting an error when publishing a model from ArcGIS Desktop 10.1 to ArcGIS Server 10.1. The model I want to publish uses a layer from a Postgres DB defined via a Query Layer in my MXD. The ...
6
votes
1answer
95 views

PostGresql and PostGIS courses in Canada

I have been looking for good professional courses for learning more than just the basics for PostGresql nd PostGIS. I have found a number of good courses, but they seem to all be in the US. I was ...
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. ...
4
votes
1answer
258 views

extracting pixel value from a table in postgresql

I have a table in postgresql that contains ID, row number, column number, pixel value and centroid of the pixel in WGS84 lat-lon system(4326). How could I extract the pixel value by giving a point in ...
6
votes
0answers
546 views

Getting ST_Difference between two different tables in postgis [closed]

One table has a series of grid squares in it, and the other has millions of voronoi polygons in it. I need to create a table that has the difference between the two of the them so that I effectively ...
2
votes
2answers
1k views

How to import shp files into postgresql with PostGIS?

I'm a new user of postgreSQL/postgis but I'm having a problem. I'm trying to import some shapefiles (which open perfectly in QGIS or ArcGIS but create an error when i import them). The problem is not ...
2
votes
2answers
605 views

What's the fastest way to search for polygons that intersect with others?

I'm querying the database for searching polygons that intersect with others, but is very slow research, wanted to increase the speed. I thought of using sphinx, solr, elastic search googled but did ...
3
votes
1answer
642 views

raster2pgsql: Strange error when creating a table

Hi GIS Stackexchange people, When I try to load a asc file into my psql setup, I get a strange error message. I have created the sql input file via raster2pgsql -s 4236 -I -C -M gis_data.asc -F ...
2
votes
0answers
257 views

Postgresql Query Plugins Not Returning Results in QGIS

I'm using the Fishnet function as described here to create a grid. If I use the following SQL to call the function to position a grid where I want it (I'm using NZGD2000 SRID = 2193) the query ...
14
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. ...
16
votes
1answer
182 views

Can we create views over a raster table in Postgis2.0?

Is it possible to create PostgreSQL views over a table that contains raster data? I have succeeded in creating the view but the entry in raster_columns is not correct (all the raster info is ...
1
vote
0answers
92 views

Calculating spaces between roads from PostGIS database

Is it possible to calculate the spaces between the roads using a select statement in a PostGIS/PostGre Database? I tried using some combinations of the predefined functions as ST_Intersects & ...
6
votes
3answers
535 views

postgis : is the operator <-> works for Geography also?

With recent postgres//postgis version, you can now use the operator <-> to find nearest rows to a point : Indexed Nearest Neighbour Search in PostGIS Correct me if I'm wrong, but according ...
5
votes
1answer
302 views

Parse error while inserting values into polygon feature

I created a polygon as follows create table boundary (id int, name text); table created; select AddGeometryColumn ('',boundary', 'latlon' 4326,'POLYGON', 2); geometry column added; then i'm ...
3
votes
2answers
1k views

raster2pgsql part of PostGIS?

Hi GIS Stackoverflow people, I wanted to use the PostGIS functionality raster2pgsql, but I had to discover that the Python function was not installed with my PostGIS installation. Do you know if ...
2
votes
1answer
355 views

How to install PostGIS 1.5 on Mac OS 10.5?

I am running PostgreSQL 9.0 on Mac OS 10.5. I've installed postgis-pg90-1.5.3-1-osx through "Stack Builder" but still don't see postgis in my list of databases when I open PgAdmin. When I open my Qgis ...
9
votes
2answers
431 views

Best design for Open Source Python / PostGIS prototype

I am writing a data intensive web application that is delivered through apache. My question is about how to best arrange processing given that there are multiple options. I have at my disposal ...
4
votes
2answers
2k views

How to select segment of linestring using PostGIS?

i have PostgreSQL+PostGIS. I have a linestring: "LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 56.8445673405349,60.702948200063 56.8447993944193,60.703902874093 ...
0
votes
1answer
234 views

What is the fastest way to identify the two nearest linestrings using PostGIS?

I want to be able to identify the closest roads to two points that are generated through geocoding (a start and end address). The points will likely be near a linestring. Two approaches that I have ...
1
vote
0answers
184 views

How to view error feedback in qgis when testing connection to postgres database?

Using qgis 1.8 on Ubuntu 10.04 with Postgres 8.4.13 I am creating a new (and my first) Postgresql connection in qgis. I can connect to the user and the db using the pgsql client. ...
1
vote
0answers
2k views

How to populate data from postgresql using dynamic php\html listing

In the form I created, I need two fields to be dynamically populated from the database while the other fields will be manually entered and push to the database. I have written a script that is able ...
2
votes
1answer
155 views

How to create a network with all the track points

I have created a sample network through the use of gps visualizer. Than I used the ogr2ogr function to import this data in my database. Now I have a table which holds all the track points of these ...
5
votes
1answer
3k views

Postgis 2.0 - public.geometry_columns view does not contain correct info for views

We have recently updated our database to Postgis 2.0. In our system we used to create views for tables containing a geometry column. After creating the view we also manually updated the ...
7
votes
1answer
509 views

How to view a 155 MB raster stored in PostGIS?

I am using the following command to load a raster into a postgres database: raster2pgsql -I -C -e -Y -F -s 3086 -I -C -M myraster.tif myraster -F -t 30x30 | psql -U postgres -d database -h localhost ...
2
votes
1answer
161 views

Finding the Geometry within which a Point falls

I have the following query, which takes on average about 4 seconds. How might one improve the query such that the same response comes back faster? SELECT * FROM geometries g ORDER BY ...
6
votes
5answers
2k 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 ...
2
votes
2answers
384 views

How to specify gdal_contour output format as postgresql table?

I want to generate contours with gdal_contour command. It generates an output as shapefile by default. I want this utility to output a postgresql (postgis) table. The documentation says there is a -f ...
20
votes
1answer
8k 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?
1
vote
0answers
280 views

Qgis Plugin development with postgres data

can someone help me with initial developing on qgis plugin that displays postgres data table on a QTTableView or QTTableWidget? So far: I can connect to database using psycopg2 or using ...
6
votes
3answers
3k views

How can I transfer data from one PostGIS database to another?

I have quite a bit of GIS data in a old PostGIS Database (version "1.1.6") and I need to transfer it to another PostGIS Database ("POSTGIS="1.5.3"). I tried creating a backup and restoring that on ...
1
vote
1answer
800 views

How to install shp2pgsql-gui on Mac OSX Snow Leopard?

I am getting started with PostGIS. I am trying to understand how to install the plugin shp2pgsql-gui under Mac. Right now my 'Plugins' tab in pgAdminIII is blank... Thanks!
2
votes
1answer
1k views

How do I format SQL queries for use in Arcpy?

I have to make an SQL query on a column having not adequat name "type_borne_id", I couldn't make SQL queries using arcpy.Select_analysis neither selectbyattribute, but when I use select_analysis ...
1
vote
1answer
242 views

Problem with Pgrouting 1.5

Hi all and thanks in advance. I have Postgis 2.0.1 and PgRouting latest version. I'm using osm2pgrouting to import OpenStreetMap data everything goes ok the trouble is that I always get source and ...
1
vote
0answers
102 views

I've converted a kml to shp and want to import it to pgsql database, but no geometry column [closed]

As the title explains, I have a shapefile whose attribute table has no geometry column specifying the location of points. Rendered in QGIS, it looks fine, so the geometry data is obviously there. ...
1
vote
0answers
67 views

Database has duplicate values after running pgrouting

I am a newbie with postgresql and sql statements so maybe it is a trivial question, I'm sorry for that. I am working on a postgis database and try to use the pgrouting function. My goal is to store ...
3
votes
3answers
205 views

For the non-IT savvy GIS person (not great w/ Linux & Apache) could someone suggest how to set up PostgreSQL, Geoserver, and ISS/Apache?

I've heard of GeoCommon as being an easy GIS solution, but I'd like to host the data locally for internal users. I know of a group called Open Geosuite - but the ongoing maintenance is something I'd ...
1
vote
1answer
334 views

osm2pgsql import crashed!

I am currently importing a bz2 country file into PostgreSQL 9.1 database for Nominatim 2 using its setup.php that runs osm2pgsql. After processing the nodes. it seems to be stuck at a certain spot ...
9
votes
5answers
2k views

How can I update ogr2ogr to include the PostgreSQL driver?

I'm trying to use ogr2ogr to upload a shapefile to a remote PostGres installation. When I ran this command: celenius:~ celenius$ ogr2ogr -f PostgreSQL PG:"host=255.34.00.00 user=postgres dbname=mydb ...
4
votes
2answers
1k views

Publish SQL Views from Postgres/Postgis to Geoserver

I've trying and reading how to publish a Postgres/Postgis View in Geoserver. I know that I can create an SQL View in Geoserver, but I'd like to define the View in Postgres, not in Geoserver. Does ...
2
votes
2answers
652 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 ...
4
votes
1answer
441 views

Problem processing OSM file with osm2pgsql

I have an OSM file and when I want to import it in my PostGIS base using osm2pgsql, I get the following error: Processing: Node(130k 8.7k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Assertion failed: ...
0
votes
0answers
256 views

assign_vertex_id error

I am trying to test if pgrouting works fine or not. To do so I have created a table containing the following attributes. Columns: gid | length | the_geom | source | target Now my ...
0
votes
1answer
334 views

Do postgres 9.1, postgis 2.0 from stackbuilder and pgrouting 1.0.3. work together?

I am new to pgrouting and I would like to check if the version I have installed works fine with postgres and postgis. I have installed postgres 9.1, postgis 2.0 from stackbuilder and pgrouting 1.03. ...
2
votes
1answer
519 views

How to upgrade PostGIS in OSGEO-Live Xubuntu virtual machine?

I have downlaoded the OSGEO-Live 6.0 virtual machine running Linux Xubuntu. I have it running through VirtualBox on a Windows machine. It currently comes preinstalled with a lot of GIS software, ...
1
vote
0answers
98 views

Is this pgRouting perfomance acceptable for my tiny server?

I'm testing pgrouting functions in a tiny server with 2GB of RAM and a dual core processor. I wrote a program that create client process and they connect to the server in a specific hour to perform a ...
2
votes
2answers
2k views

PostGIS convert geography(Point,4326) to GPS

I got a database with a column of type geography(Point,4326), the data contained looks like 0101000020E610000092E057F66EF73140930035B56CBD4840. How can I convert it to GPS coordinates?
1
vote
2answers
2k views

How to display a image from Postgres database

I have Images in bytea form in PostgreSQL/PostGIS database, i want to display them in a webpage using PHP - PostgreSQL. I got lot of examples and I worked out but not getting output from them... Few ...
5
votes
1answer
195 views

Given 2 LINESTRINGs with common point, how to extract common point?

I have 2 LINESTRING geometries. I know both share a common point. Using PostGIS for Postgres, what is the cleanest way to extract the common point? Example with illustration: How do I extract the ...
0
votes
1answer
306 views

How to get City, State, Numeration, etc from OSM roads by Geofabrik?

I'm really new in this GIS world. I downloaded a shp file from Geofabrik (http://download.geofabrik.de/osm/south-america/chile.shp.zip) and imported it to Postgresql using Postgis. If I see the road ...