PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
1answer
594 views

PostGIS not converting GIS data into latitude/longitude values

I am running PostgreSQL and PostGIS. I am trying to do something mind-numbingly simple: determine the latitude and the longitude of a point. Unfortunately, PostGIS stubbornly refuses to transform the ...
2
votes
0answers
126 views

Installing knn on PostgreSQL for windows

I am trying to install the extension KNN for clustering as an extension on my PostgreSQL database. I have downloaded the file http://www.pgxn.org/tag/analysis I found instructions on how to ...
0
votes
1answer
471 views

ST_MakeEnvelope returning too many geos

I am using the following query in my db: SELECT bg_id, ST_AsGeoJSON(the_geom) FROM bg WHERE bg.the_geom && ST_MakeEnvelope(xxx, xxx, xxx, xxx); It seems to execute alright but when I draw ...
5
votes
2answers
3k 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 ...
2
votes
1answer
56 views

Preserving attributes of linejoin through concatenation

I've run into a bit of a problem, I'm working on a layer of connected lines which represent geological faults and contacts. These lines were broken into many small segments so to get rid unnecessary ...
0
votes
0answers
102 views

Shooting star algorithm in postgres 8.4 and postgis1.4 showing fatal error and remaining are working fine

When I try to run this shooting star algorithm, the postgis suddenly loosing connection to postgres and showing error no connection to server SELECT * FROM shortest_path_shooting_star(' SELECT gid ...
1
vote
1answer
168 views

Win7 Senior users_Which pgRouting and postGIS versions are stable with postgreSQL8.4?

I'm working on a postgreSQL ,postGIS and pgRouting project on Windows 7 I need to work on a stable version (no time for risks), and I can see that many people are asking the same question many ...
1
vote
5answers
3k views

Unable to install the PostGIS extension to PostgreSQL on Ubuntu 12.04 LTS

I just installed Linux Ubuntu 12.04 LTS (on a virtual machine). I then successfully installed the PostgreSQL 8.4 database management system. I am now trying to install PostGIS, which is an extension ...
2
votes
1answer
872 views

How to install multiple versions of postgres in same os windows 7 64-bit?

I have already installed PostGIS along with opengeosuite and it is the latest version. Now I want to run pgrouting but the latest stable version does not compatible to the latest postgres versions. ...
1
vote
2answers
457 views

Public PostGIS Server available?

Can anyone point me to a (if possible at all) list of public PostGIS Servers, where one can set up their own database/tables? I would need a PostGIS server on 24h/7d while not having the resources by ...
0
votes
1answer
415 views

How to install PostGIS 8.4 in windows 7 64 bit parallel to an existing PostGIS 9.2?

PostGIS 9.2 is installed along with OpenGeoSuite using one click setup. But 9.2 dont support pgRouting. So I need to install 8.4. I dont how to include binaries and all. So someone please tell me how ...
2
votes
0answers
456 views

QGIS SPIT errors loading shapefile into PostGIS

With QGIS 1.8 on Windows 7, I just installed PostgreSQL / PostGIS and tried to load my first data into it, a shapefile using SPIT, but failed: ERROR: Geometry type (Polygon) does not match column ...
1
vote
1answer
623 views

raster2pgsql missing in Opengeo-suite installation

I installed opengeo-suite 3.0.2 on Ubuntu 12.04 and although the stack seems to be working fine, raster2pgsql is no where to be seen! root@mywebsite:/usr/local/lib/postgresql/9.2# locate raster2pgsql ...
4
votes
1answer
2k views

How to import QGIS Raster into PostGIS

I have created a IDW heatmap using QGIS 1.8.0 and need to import the raster into PostGIS 2.0.1. QGIS saves the raster layer as a .asc file. How do you import the raster into PostGIS as a Raster? What ...
14
votes
2answers
3k 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 ...
1
vote
1answer
182 views

Postgis invalid geometry from shape file

I'm having trouble converting a Feature class (shape file) to a DB table (Postgresql 8.4/Postgis 1.5). This is the command in the pg log: INSERT INTO "public"."distritos" ("Shape" , "DEPARTAMEN" , ...
2
votes
1answer
669 views

Get the lines between all points of a polygon in PostGis : avoid nested loop?

I am trying to get all the lines between the points of a polygon, by writing PostGreSQL functions. I have written the two following functions that do the job fine : the first function to get all the ...
1
vote
0answers
156 views

Creating polygons for a choropleth map using PostGIS

I have a grid of points, each with a value to it as shown in the image below. The data was retrieved from PostGIS and rendered in Quantum GIS. The final result should be a polygons of a choropleth map ...
5
votes
3answers
329 views

What is the easiest one click install method for PostGIS and it's entire dependencies?

For someone new to database servers and their dependencies, what is the easiest assured way of installing PostGIS on a machine with no other software beyond what comes with its operating system? I'd ...
2
votes
3answers
2k views

Connnect to PostGIS db using QGIS - when not on localhost

I"m just getting started with PostgreSQL/PostGIS db (v9.2) and I'm wanting to connect to db while not on the localhost using QGIS. I've been able to connect successfully on localhost, however I'm not ...
0
votes
2answers
106 views

Is PostGIS doing a full table scan?

I am trying to retrieve all points p that are within polygons c. While building the query, I came across this strange behavior. Question: Why does query 2 takes so long compared to query 1? Is it ...
1
vote
0answers
136 views

I can't connect QGIS with postgresql

I can create a connection to the database in qgis and the test connection is successful. However when I actually connect to the database to export shape files I get the following error: the ...
3
votes
2answers
1k views

Problem loading PostGIS (Postgres) View layer in QGIS

Why is Postgres user XX via command „Add PostGIS Layers“ in QGIS enabled upload only View tables which owns? Or how to achieve it to the user XX via PostGIS can load View table which owns the user YY? ...
0
votes
1answer
212 views

Creating the node ids:Is this SQL error related to geometry type?

I loaded a multilinestring layer into PostGIS Manager: and use the SQL query, trying to get the table with the node ids: ALTER TABLE split_4 ADD COLUMN source integer; ALTER TABLE split_4 ADD ...
4
votes
1answer
486 views

How can I make a Postgres/PostGIS ST_Distance_sphere query more efficient?

Within Postgres/PostGIS I have written an SQL query to get the closest distance for each element within a point coordinate table from a polyline table. The query comes back and works correctly, but ...
2
votes
1answer
152 views

assign_vertex_id:problems when creating the node ids

Before using pgrouting, I have to create the node ids. I loaded my polyline layer into PostGIS Manager: I type this in SQL query: select assign_vertex_id('split_4', 800, 'geom', 'gid') But as ...
4
votes
2answers
2k views

Which spatial DBMS should I select?

I found there are a number of RDMS have the spatial capability e.g. mysql, postgreSQL I considering which I should go forward! I would like to store the lat lon coord from the tracker to the db ...
2
votes
1answer
284 views

SQL Command to convert pgRouting result to GeoJSON

My goal is to produce a Web UI for pgRouting using this tutorial. I have already imported my data from an OSM pBF to PostGIS using osm2po. Using the pgRoutingLayer plugin for QGIS, I was able to ...
2
votes
1answer
511 views

Force dimensionality with shp2pgsql

After invoking: shp2pgsql -W "latin1" theshape.shp > thesql.sql My console responds with: Shapefile type: PolygonZ Postgis type: MULTIPOLYGON[2] Note the shapefile type is PolygonZ. The result ...
0
votes
1answer
105 views

Schema for offline map editing and pass to production environment

I'm working with QuantumGIs and PostgreSQL/Postgis. So when I edit the layers, the changes are reflected on the DB. The thing is I want to do some "offline" editing before committing the changes to ...
3
votes
1answer
255 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. ...
0
votes
1answer
124 views

In QGIS can I show just the lines in a Postgis query? How can I do that?

I have three tables in Postgresql, each table with one layer of lines. I want to show the path of an initial line to another final. Is it possible executing a SQL query? Thanks My three tables are ...
1
vote
1answer
228 views

Difference in raster size using raster2pgsql

I use the PostGIS-build-in raster2pgsql to load SAGA-raster into the db. I tried to grid them into 100x100-tiles, just as seen in the code: /usr/lib/postgresql/9.2/bin/raster2pgsql -s 32632 -a -F ...
0
votes
1answer
195 views

Shp2pgsql - exec() not allowed on external server

Me and my collegue are using the shp2pgsql and psql commands in php code (a Drupal module to be precise). We put these commands in a php variable and use the exec() command to execute them. This ...
8
votes
2answers
2k views

Is there workaround for very slow ArcSDE 10.1 data display

I'm suffering from very slow viewing data of and ArcSDE database from an Arcgis engine application, the SDE database is in localhost so there's no network issues. but i still don't know the reasons ...
4
votes
2answers
3k 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: ...
4
votes
2answers
4k views

group by timestamp interval 10 minutes postgresql

I need some help on this: I need to group by a period of time spliting up by 10 minutes: I have this query below that returns me a result set SELECT timestamp FROM table_1, ...
0
votes
2answers
284 views

How to create a function by passing polygon datatype as a parameter

I am getting stuck while executing the function,Function is getting created but while i am passing the values getting error. CREATE OR REPLACE FUNCTION INS_CCX_ply(P_ID INTEGER,P_POLY_ID ...
0
votes
1answer
444 views

tinyows failing to connect to postgresql - Ident authentication failed for user “postgres”

I'm getting the above error on a new and local tinyows installation on Centos 6. Postgresql 9.2, PostGIS 2.0. I can connect to PostGreSQL locally and from my LAN using several other methods (psql, ...
1
vote
3answers
174 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 ...
2
votes
1answer
355 views

Cannot find my schemas in QGIS's “Add PostGIS layers”

When I connect to my PostGIS database using QGIS's Add PostGIS Layers, I see only public topology pg_catalog information_schema My other schemas that I have created are not shown here. Anyone else ...
0
votes
3answers
6k 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 ...
5
votes
1answer
1k views

How to Find points in a Kilometre radius

I am new to PostGIS and GeoData. I need to find where the lightning has stroke by a period of time and kilometre radius based on a given location. I have given lon/lat and my table is: latitude ...
3
votes
2answers
2k views

osm2pgsql Error: operator class “gist_geometry_ops” does not exist for access method “gist”

When using osm2pgsql to import massachusetts-latest.osm.bz2 into PostGIS 2.0.1 database osm (running on PostgreSQL 9.1 on an Ubuntu 12.04), I get the error failed: ERROR: operator class ...
1
vote
0answers
64 views

New geographical point won't show on map

I did recently ask a question about how to add a new point to a PostGIS table. Now when I've got the new point in the table it should be visible on my map, but it isn't. I'm using Mapnik together ...
9
votes
2answers
2k views

Huge point cloud laser data in PostGIS - Storing and Processing it

I wonder, how it's possible to store huge sets of laser scanned point cloud data in PostGIS, with the time-aspect for processing it in mind. I know, there exists a geometry-object Point in PostGIS. ...
3
votes
2answers
3k views

Get Lon Lat values from a GEOGRAPHY data type in PostGIS

After storing lon lat values as a GEOGRAPHY data type, how do I retrieve the individual lat lon values? Failed attempt: SELECT id, geog, ST_X(geog), ST_Y(geog) FROM locations; Error: No function ...
1
vote
0answers
44 views

Do I need to deal with warnings about row count and spatial index to use pgRouting?

After read this nice post from underdark A Beginner’s Guide to pgRouting, although I still have some little problems, I think I can begin the "Creating a routable road network" stage right now. I got ...
0
votes
1answer
686 views

Unable to load Shapefile using pgShapeloader / shp2pgsql-gui (pgAdmin3's PostGIS Shapefile Import/Export Tool)

I am trying to load a shapefile (http://dds.cr.usgs.gov/pub/data/nationalatlas/statesp020_nt00032.tar.gz) into PostGIS 2.0.1 using pgAdmin3's PostGIS Shapefile Import/Export Tool. However its not ...
1
vote
0answers
38 views

Determining the SRID of a dataset in PostGIS [duplicate]

Sometimes the dataset provides some information about its projection. For example, it can mention Horizontal_Datum_Name: North American Datum of 1983, Ellipsoid_Name: GRS1980, ...