PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

6
votes
0answers
289 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 ...
5
votes
0answers
63 views

How to compare two Geodatabases

I would like to compare the data of two geodatabases, in SDE or a file geodatabase, to detect the changes occured between them , i've tried to compare the Xml workspace document of both databases ...
3
votes
0answers
87 views

POSTGIS SQL - How do I remove (defined) sliver polygons

I would like assistance in writing SQL (for POSTGIS in postgresql) to remove sliver polygons (including long narrow slivers and some small irregular polygons that were erroneous 'gaps' in the original ...
3
votes
0answers
47 views

Why are date vaules displaying a trailing 'Z' when layers are published with Geoserver and a PostGIS data store?

I have published various layers using Geoserver 2.2.x with a PostGIS 2.0.1 (PostgreSQL 9.1.x) data store. Fields that only have date values and not time/timestamp related values are stored as date. ...
3
votes
0answers
214 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. ...
3
votes
0answers
137 views

Where can I find PostGIS error codes?

Using ST_Contains in where clause sometimes gives me error messages like ERROR: GEOSContains: TopologyException: side location conflict at 37.3706 55.7882 For now I can't guarantee validity for ...
3
votes
0answers
196 views

Is there a way to start the route on pgrouting from a coordinate that is not a node?

After execute all steps from this pgRouting tutorial, now I have a map that creates and displays routes, but as the routing methods rely on parameters representing vertex Ids that was created using ...
3
votes
0answers
308 views

How to save table from PostgreSQL to MapInfo File?

I have two tables: 1 with geometry in WGS 2 with geometry in Local System I tried this: ogr2ogr -f "MapInfo File" output2.tab PG:"host=localhost user=postgres password=123456 dbname=postgis" -sql ...
3
votes
0answers
424 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: ...
2
votes
0answers
29 views

PostgreSQL : Question about dropping tables inside funtions

I am writing a PostgreSQL code where I have a function wich is used multiple times in a single query with different input values. Inside the function I create some tables and use them. What is the ...
2
votes
0answers
42 views

How do I simplify the straight sections of (multi)Linestring in PostGres/PostGis leaving the curved sections untouched

I have (multi)linestrings containing upwards of 5000 points and I want to perform two simplifications possibly using Ramer Douglas Peucker or alternative methods in PostGis The (multi)linestrings ...
2
votes
0answers
22 views

Insertion of a raster geotiff in PostgreSQL database

I am new in PostgreSQL and psql. What is the method to insert a raster geotiff in a postgreSQL database using command psql? What is the best format? Someone indicates to save a raster image as BLOB ...
2
votes
0answers
80 views

Data loss after compressing geodatabase in ArcSDE

I suffer sometimes from data loss after compressing ArcSDE geodatabase, this geodatabase contains versioned feature classes, so the compressing script reconciles and compress the geodatabase: # ...
2
votes
0answers
143 views

Styling river charts with TileMill - issue with filling a polygon made of disjoint line segments

I am trying to style inland river charts produced by the Army Corps of Engineers. I imported the vectors into Postgres, and I’m using TileMill to style the data. I am having trouble correctly filling ...
2
votes
0answers
105 views

Loading postgresql tables in Arcgis for Desktop 10.1

I have postgresql version 9.0.5 installed and configured. Also in my ArcGIS for Desktop 10.1 in "Add Database connection" I have my postgresql connected and I can see all the tables in it (figure1). ...
2
votes
0answers
551 views

Error when register database with ArcGIS server

I am using Arcgis 10.1(x32) and I have successfully connect postgresql(x64) as geodatabase. When I try to register database with Arcgis server 10.1(x64), I followed the instruction on the esri' ...
2
votes
0answers
154 views

Migrating from PostGIS to Oracle Spatial

We are now using a solution based on PostGIS extension of Postgresql database for various spatial queries. But we are now thinking about data security. This is why we have a plan to migrate existing ...
2
votes
0answers
147 views

Finding poi using st_dwithin in postgis

I am not familiar with gis or writing sql, so my understanding in this field is lacking. I have a hundreds of lat/lng geographic coordinates stored in a single table called Places like this: ID | ...
2
votes
0answers
92 views

Hitting Memory Limits of PostGIS ST_ConcaveHull / Incomplete Shrink Wrap

I am trying to use PostGIS 2.0 on Postgres 8.4 to do some mapping. I am working with the NOAA Shapefiles, specifically their US States & Territories file located here: ...
2
votes
0answers
270 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 ...
2
votes
0answers
95 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 ...
2
votes
0answers
133 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. ...
2
votes
0answers
84 views

Pgrouting can't find postgresql (on Mac)

I've installed both postgreSQL 9.0 and postgreSQL 9.1 on my mac, using binaries from http://www.kyngchaos.com. I also have postgis 1.5 installed. I tried to install pgrouting, again using binaries ...
2
votes
0answers
174 views

Projecting PostGIS in Openlayers

I have a layer(base layer) with MultiLineString Geometries and now I need to project the layers(overlays) in the base layer from PostGIS using OpenLayers. However, I got an idea how to project table ...
2
votes
0answers
220 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 ...
2
votes
0answers
216 views

OSM Database created: now what happens?

I imported an OSM file into a Postgres DB using the Osmosis tool. Now, I need to extract some data but I can't find any schema description (I'm really a newbie in GIS). Where can I find it? Do you ...
1
vote
0answers
12 views

Focal Mean of neighbors using ST_DWithin on points in PostGIS

I'm trying to calculate focal means on a grid of points in PostGIS. I know that a raster calculation would be more efficient, but I only need to run the algorithm once to get the data, so I don't ...
1
vote
0answers
13 views

PostGIS 3D Extrude function

I selected buildings from OSM (which represents my city). I insterted a new column 'height' and I filled with a random number exactly number 2, so every building have 2metres altitude. Buildings are ...
1
vote
0answers
33 views

Raster slightly displaced after exporting from PostGIS database

With the following queries I've exported a raster (GTiff) from my postgis database: 1.Creating a large object: WITH buffer AS ( SELECT id, ST_Buffer(geom,50) AS geom FROM ...
1
vote
0answers
46 views

How to save a google map direction into a postgresql/postgis database?

I have taken a direction(route) from google map. Can I save this resultant direction/path/route to my postgresql/postgis database? How?
1
vote
0answers
36 views
+50

Postgresql JDBC Table Valued Parameters

MSSQL has a great feature called Table Valued Parameters. It allows you to pass a table of a custom data to stored procedures and functions. I was wondering what is the equivalent , if exists, in ...
1
vote
0answers
17 views

qGIS' Database Manager “Load as New Layer” Option Not Working

I'm trying to visualize some of my database queries on qGIS. I run a valid SQL query which returns a subset of my table that should be easily loaded as a layer. I then check "Load as new layer," ...
1
vote
0answers
17 views

Problem installing Aggregate Polygons Function in PostgreSQL 9.3

I'm new to PostgreSQL and I've been trying to run a sql function written by Dr. Horst Duester, found in http://www.kappasys.ch/cms/index.php?id=65&L=5, which is used to aggregate detached ...
1
vote
0answers
35 views

Geoserver WFS Fails to Load in OpenLayers

I'm working with Postgis->Geoserver->openlayers on localhost. I followed a Geoserver tutorial to import some nyc sample data into my postgres/postgis database and link it to Geoserver. The layer ...
1
vote
0answers
32 views

Do ArcGIS clients that direct-connect to postgresql/postgis databases override configuration settings?

I went in to modify some settings on a Postgresql database via the PGAdmin config editor and some of the settings don't have their default values and they are higher because they've been overridden ...
1
vote
0answers
27 views

How to define Z dimension on table with PostGIS for import in TileMill?

I'm trying to reproduce the idea behind this blogpost from Mapbox, but with other data, for example the ne_10m_populated_places_simple dataset from Natural Earth. By adding a z-dimension to the data ...
1
vote
0answers
59 views

QGIS loads PostGIS layers but DBManager can't connect

DB Manager can't connect to PostgreSQL, but "Add PostGIS Layer" can. My eventual goal is to save created layers to PostGIS. I assume I can do this using the DBManager Tool. I can alternatively use ...
1
vote
0answers
67 views

How do I catch PostGIS/PostgreSQL RAISE messages in QGIS?

I have a trigger set up in PostGIS/PostgreSQL which will show a RAISE WARNING when an inserted or updated polygon is within a certain distance of some predefined planning constraints. I want this ...
1
vote
0answers
24 views

Reading lines within Bounding box failed

I am developing an application to display OSM data. In my scenario I need to display the data for one entire country. So my approach is that I will load curresponding countries osm data to postGreSQL ...
1
vote
0answers
32 views

PostGIS replace view crashes PostgreSQL server from ArcGIS script

I have the following script which when from ArcGIS (and a similar script from a QGIS plugin) will update a view. Every so often (around 1 in 5 times the script is run) it causes the PostgreSQL ...
1
vote
0answers
83 views

pgrouting php problem “pg_fetch_result(): Unable to jump to row 0 on PostgreSQL result index 3”

I'm trying to build a simple routing web-app using pgrouting, followed some tutorial and the latest workshop. Because I'm using PostgreSQL 9.3(x64), Postgis 2.1.1, and pgrouting 2.0 so I did some ...
1
vote
0answers
73 views

How to best intersect vector data with raster data?

I have Open Street Map [OSM] data imported so that I can access the geometry of buildings. I have also loaded SRTM digital height data from NASA from a GeoTIFF raster. I have projected the raster into ...
1
vote
0answers
30 views

Create a single line from a resultset of line segments

How can I create a single line using the line segments geometry found in each row in resultset? I followed this tutorial: http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ I ...
1
vote
0answers
148 views

Creating a spatial database using EXTENSIONS: error loading legacy.sql

I am using Postgres 9.3 and PostGIS 2.1, installed in a Docker container via RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list RUN apt-get -y ...
1
vote
0answers
54 views

Complexity of A-star algorithm using pgRouting in a graph

I'm using the A-star algorithm in pgRouting. It uses the Manhattan distance as a heuristics ((|dx|+|dy|)/2). What would be the time complexity in a standard route network? Based on Why is the ...
1
vote
0answers
79 views

Merging contour lines along tile boundaries

I am working with the CANVEC data set. The data in canvec is broken up in to mapsheets. eg. 116B04. I have data covering the entire province of the Yukon. I have merged all the data in to one ...
1
vote
0answers
65 views

Upgrading Postgres database to Postgis 2.1.1

I executed the postgres 9.1.6 with Postgis 1.5.8 dump from a remote server on Linux pg_dump -h localhost -p 5432 -U postgres -Fc -b -v -f "/somepath/tumidb9.1geom1.5.8.backup" tumidb9 So I have a ...
1
vote
0answers
53 views

St_OffSetCurve with self-crossing lines

I have about 50,000 linestrings in PostGIS. They represent routes along roads. But I want them to be (roughly) pavements (aka sidewalks) instead. So I need to move all the lines 3 metres to the left ...
1
vote
0answers
37 views

Selecting a bounded area within a raster

I am new to postgresql. I have imported a 256kb sample raster (.tiff) into postgres with tilesize 100x100. Now I need to select the area (rectangle) from the center of the image using sql query. Then ...
1
vote
0answers
30 views

Is it possible to have run-time dynamic table updates to visualization using javascript interacting with postgis and geoserver

I have an idea of/have seen implementations, of dynamic map retrieval/updating using wms on openlayers by using updates to a postgis database which was hooked into geoserver and having a refresh ...