PostgreSQL is an open source object-relational database system.
0
votes
0answers
19 views
Query Multipolygon from PostGIS database
I my OSM PostGIS DB there are multiple polygons in the planet_osm_polygon table with the same osm_id, my idea is that this must be the parts of a Multipolygon.
Now I want to query the Multipolygon ...
1
vote
1answer
50 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 ...
0
votes
0answers
25 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 ...
0
votes
1answer
45 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
0answers
18 views
Fatal error: Call to undefined function pg_connect() in /var/www
I have seen this error online, I have followed the online instructions. However when i do this and restart wamp it wont load up, it stays amber, as soon as i recomment in the lines and restart wamp ...
0
votes
1answer
46 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 ...
0
votes
1answer
25 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?
0
votes
0answers
24 views
How can i enable PostGIS Shapefile and DBF Loader 2.0 plugin in PgAdmin III
First post here..
I am in 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
Thx in advance
...
1
vote
0answers
24 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
57 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
58 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
1answer
33 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 ...
0
votes
1answer
34 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 ...
2
votes
0answers
53 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
50 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 ...
3
votes
0answers
28 views
What is the correct syntax for using gdal_rasterize with a PostGIS datasource
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 ...
1
vote
1answer
25 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
37 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
votes
0answers
22 views
First time running PostGIS on OS X, need help [closed]
I'm trying to get familiar with PostGIS and wanted to install on my OS X 10.8.3;
I've been goggling around and found out about postgres.app, downloaded and run it, but, any time I open the psql ...
1
vote
1answer
58 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
56 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
42 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 = ...
2
votes
2answers
80 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 ...
0
votes
0answers
16 views
connexion to postgres and update attribute table of a shapfile in QGIS [duplicate]
I have created a plugin with "plugin builder" , now I search to connect my plugin to postgres. I have a shapfile and I try to find a script in Python that can use to assign a SQL query to my table ...
-1
votes
0answers
56 views
How to assign a SQL query to a table attribute? [closed]
I have created a plugin with "plugin builder." Now I seek to connect my plugin to postgres. I have a shapefile and I try to find a script in Python that can assign a SQL query to my table attribute. ...
2
votes
1answer
53 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 ...
1
vote
1answer
78 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
87 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
28 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: ...
4
votes
2answers
103 views
What are the 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
57 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
56 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.
{
...
0
votes
1answer
25 views
How to store multiple records output of a function in another function?
Normally if we get 1 output from a function then we keep it as
select function name() into r;
where r is the variable where we need to store the function output, if the output is 1 record.
How to ...
2
votes
0answers
34 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
46 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
69 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
16 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
38 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
57 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
65 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
24 views
error in loading raster tiles on postgreSQL
I am trying to import raster data from PostGIS to GeoServer.
I follow the instructions given on this link.
...
0
votes
2answers
78 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
53 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
63 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
118 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
56 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
51 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
1answer
173 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 ...
0
votes
0answers
14 views
Which all columns should I add in postgresql table so that it stores elevation values and displays them in Geoserver?
I am using geoserver and postgresql. I imported raster (.tif) file to postgresql using raster2pgsql. The file thus imported creates a new table in postgresql. But when that file is previewed in ...
0
votes
0answers
34 views
Is QGIS OGR plug-in data provider (based on Postgres) limited to 500 features in layer?
I developed a plug-in based on OGR. It works fine but when I want to add a vector data (using my plug-in) I get 1449 features (with 76 columns) in my layer. Then I select this layer and load it.
...






