PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
2answers
264 views

3D KNN index in PostGIS

I am looking for a way to do fast KNN queries on a dataset of 10+ million 3D points (and growing). I was hoping PostGIS would do the trick with its new <-> and <#> operators, but they don't seem ...
2
votes
1answer
468 views

Find nearest neighbours faster in PostGIS

I currently have a query that calculates the number of useful amenities within a certain radius of each town, using OSM data: create table places as select town.name, place, town.way, ( select ...
1
vote
0answers
2k views

How to write a point-in-polygon query for Postgis?

I'm trying to write a query in Postgis which will return all rows where a dynamically changing longitude/latitude point resides within the geometric polygon of that row (in the geom column). This is ...
1
vote
1answer
134 views

Postgis max contains query

I have two tables: CREATE TABLE periphereies ( gid serial NOT NULL, per character varying(60), geom geometry(MultiPolygon), CONSTRAINT periphereies_pkey PRIMARY KEY (gid) ) WITH ( ...
0
votes
1answer
104 views

How to select all cities in Germany from city and country layer?

I have 2 layers: layer_1: countries of europe, layer_2: cities of europe I want to create (and then save) a layer_3 which would be all the cities of Germany. Is there any good tutorial of how can i ...
2
votes
2answers
426 views

How to load layers from postgis to dotspatial or sharemap viewer

I want to develop a PostGIS viewer for PostgreSQL (with SQL query editor) to visualize PostGIS layers. Which spatial library (.net C# supported) do I have to use?
1
vote
1answer
3k views

How can I enable PostGIS Shapefile and DBF Loader 2.0 plugin in PgAdmin III?

I am on Windows and I want to download/enable the plugin "PostGIS Shapefile and DBF Loader 2.0". I installed PostGIS 2.0 using StackBuilder of PostgreSQL installer.
1
vote
0answers
50 views

How to load a raster from in-memory bitmap (not from file) into PostgreSQL

I have a bitmap in memory that I would like to load as a raster to PostgreSQL. An unfavorable option is saving the bitmap to file and then use raster2pgsql, but as we have several cameras that ...
0
votes
1answer
107 views

Creating plugin in QGIS to access PostgreSQL? [closed]

i want to develop a plugin in QGIS to access to my database in postgres : i want to import a file.sql that contains my SQL Code in a textbox , and execute this code to assign myd database.
0
votes
1answer
245 views

It seems there is a bug in St_Clip function of PostGIS

The code I am using for clip feature is : raster ST_Clip(raster rast, geometry geom, double precision[] nodataval=NULL, boolean crop=true); I tried clip a shape depends on the polygon from the ...
1
vote
1answer
2k views

Distance between DB field and Point using PostGIS

I'm using Postgresql 9.0 with PostGIS 2.0 extension. I've got the table and geographic field location: =# SELECT * FROM geography_columns; f_table_catalog | f_table_schema | f_table_name | ...
0
votes
2answers
757 views

ST_Touches for more than just one geometry

I'd like to select some neighbor polygons with ST_Touches. Therefore I found the following statement: SELECT b.name FROM layera as a JOIN layera as b ON ST_Touches((SELECT a.geom FROM layera as a ...
1
vote
1answer
63 views

Libraries to navigate and choose path based on congestion level?

I'm trying to develop a system to get best path to travel user based on road traffic (congestion level). Functionality of the system should be provide least congested path for traveler given ...
3
votes
0answers
439 views

Select features within a country or bounding box effectively using PostGIS

I imported the planet OSM file into a PostgreSQL 9.2/PostGIS 1.5 server using osm2pgsql. I now want to select certain map features which lie within the bounding box formed by a countries borders, e.g. ...
0
votes
1answer
621 views

SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'); not work

I'm using using OSgeo 6.5 dvd and studing pgrouting workshop (link) for get shortest path. I created network topology call "pgrouting - workshop". There are three commands to execute in section 5.2 ...
6
votes
0answers
508 views

What is the correct syntax for using gdal_rasterize with a PostGIS datasource [closed]

I have a multipolygon layer in PostGIS and I would like to use gdal_rasterize to generate a raster. I cannot find the correct syntax to specify PostGIS as the data source. $ gdal_rasterize -a ...
0
votes
1answer
383 views

Solving flagrant shared object errors when compiling postgis 2.1SVN from source on Ubuntu 12.04

I have spent the past few days of my life trying to figure out how to get postgis to function properly with a non-standard directory installation of postgres 9.3, but have been unable to resolve the ...
1
vote
1answer
145 views

Tools to make buffer around the polygon on a web map?

We're starting web map app and still deciding what tools is the best to use. We would need option that user add some points and polygons, and also, to automatically get buffer around those polygons. ...
0
votes
0answers
60 views

Is there any feature limit for Spatial data migration to Postgre SQL9.2…?

I am trying to migrate spatial data to Postgre SQL9.2 using 'Postgis Shapefile & DBF Loader 2.0'....Each time it returns a "Runtime error'. Primary data extension - .shp ; Data type - ...
1
vote
1answer
191 views

Pgrouting - Networking

my problem is regarding routing. I have a network based on bicycle graph links (SRID: 4326), with bidirected and directed ways. I want to give the user the functionality to draw a route (shortest ...
1
vote
2answers
513 views

Start postgresql+postgis without installation on Windows

I have used Windows7x64 and want start PostgreSQL+POSTGIS without installation process. I copy PostgresSQl\9.1 folder from other laptop to c:\opt. I need create .bat file with enviroment variables and ...
0
votes
2answers
297 views

PostGIS, distance between two users

I have a simple table (location_test) with three column (name, geom , jid). geom is a geometry column with SRID 27700. I set the user's geometry position with: UPDATE location_test SET geom = ...
3
votes
3answers
4k views

Install the Pgadmin3 shapefile importer plugin on a Mac(10.8)?

I'm new to GIS related things and I'm setting up a Postgre/Postgis database for geospatial queries. I'd like to import various shapefiles into the database and I found that Pgadmin3 has a shapefile ...
2
votes
1answer
578 views

PostgreSQL, find points near points

I'm going to have a database with a 'people' table and a 'shops' table. I'd like to find all people within 500m of a shop, and details from both tables. I'm used to working with mySQL, but I'm ...
2
votes
1answer
2k views

How to restore a back up file into pgadmin III

My backup file containing about 50-60 tables , but I am able to just load only 6 tables for a new db and 31 tables for postgis dbase . And this was the error when I restore a backup file. pg_restore: ...
1
vote
1answer
4k views

How to uninstall PostgreSQL Server on localhost and reinstall with new user and password?

On Windows 7, I'd like to install a brand new, fresh installation of PostgreSQL/PostGIS on a laptop, and wipe ALL the localhost servers, users, data and passwords clean, and then reinstall as if it ...
0
votes
1answer
204 views

Geodjango InspectDB Fails on Postgis Raster_Columns View

I am trying to generate models for an existing Postgresql database using the Django InspectDB command. Models are produced but a failure occurs on the raster_columns view. The error is: Exception: ...
7
votes
2answers
1k views

What are benefits of using ArcGIS with PostgreSQL over simply ArcSDE?

I understand that in order to benefit from ArcGIS spatial datatypes (ST_GEOMETRY, versioned geodatabases etc.) ArcSDE needs to be installed - and with the 10.1 client it is automatically installed ...
1
vote
1answer
150 views

Geometry has incorrect latitude-longitudes

SELECT ST_SRID(geom) AS s FROM zones GROUP BY s; returns a single record: 4326 SELECT Find_SRID('public', 'zones', 'geom'); returns 4326 SELECT AsText(geom) FROM zones returns geometry like: ...
0
votes
1answer
916 views

PostGIS error reads “Geometry has Z dimension but column does not” [duplicate]

I try to store a polygon in GeoJSON format into my PostGIS table. Both are using the CRS EPSG:3857. This is how the polygon is defined. Note that I put in some whitespace to make it more readable. { ...
2
votes
0answers
662 views

Clustering table on geohash index and geohash ordered table

I wonder if there could be a performance gain to re organize the rows in a table by Geohash and then CLUSTER this table on the Geohash index of the geometries. CREATE TEMPORARY TABLE tmptbl AS SELECT ...
1
vote
1answer
369 views

PgAdmin cannot load postgis for a database

Postgis works fine on my other postgresql databases, but I can't load postgis and postgis_topology extensions on a new database. I get following error message: ERROR: could not load library (path to ...
1
vote
2answers
804 views

Geoserver SQL view parameterizing

I've got a postgresql table that has the following attributes: name String begintime String endtime String the_geom Point Now I'd like to create an sql view in geoserver (2.2 ...
0
votes
0answers
21 views

How to find all possible paths by Postgis / Pgrout [duplicate]

There are functions available to find the shortest paths in Postgis / Pgrouting extension. But is it possible to find all the possible paths between two points/nodes ? Is there any such function ...
1
vote
1answer
399 views

Are database client files platform specific?

I'm just looking for some clarification on a question that came up with me this morning. Are the DLL client files (libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll) platform ...
1
vote
1answer
439 views

PostgreSQL: transform spatial column from PG_GEOMETRY to ST_GEOMETRY

I have spatial Data stored in my PostgreSQL database as PostGIS Geometry (PG_GEOMETRY). It looks for example like this: 010100002031BF0D0000000000F989264152B81E057E6D5841 Now I would like to move ...
3
votes
1answer
189 views

Convert OpenStreetMap schemas to ArcSDE in PostgreSQL database

I am trying to find a way to store OSM Extracts (or possibly the planetfile) in a PostgreSQL database, keep it up to date with diff files and then process the data further with ArcGIS (e.g. Geocoding, ...
1
vote
0answers
31 views

error in loading raster tiles on postgreSQL [duplicate]

I am trying to import raster data from PostGIS to GeoServer. I follow the instructions given on this link. ...
0
votes
2answers
2k views

Cannot insert simple geometry data

I installed PostgreSQL 9.2.4 and PostGIS 2.0.3 on my Windows 8 machine. Then I created a table using phpPgAdmin and added a geometry column using the following statement. SELECT ...
0
votes
2answers
403 views

How to select polygons in polygon and export to CSV?

I have two polygon layrers, each layer a table in PostgreSQL: One layer with polygons areas in a city. Another layer with buildings (polygons) that are within areas. How can I to do to know what ...
0
votes
1answer
774 views

Cant Instal psycopg2 on mac 10.8.2

I know there Have been a lot of similar questions asked but none address this issue as I far as I can tell. When I am trying to install the sextante plugin, or run PostGIS Manager in QGIS I receive ...
1
vote
1answer
556 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
124 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
429 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
55 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
101 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
166 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
799 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. ...