PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
1answer
176 views

Retrieve geographic coordinates from OSM imported data

We have just finished importing OSM data into our PostGIS (Postgresql) database. And we are having difficulty understanding the geometry of various shapes imported. We run a query to retrieve the ...
3
votes
1answer
88 views

Add vertices costs to postgresql routable network

In osm2po it's possible to create custom routers as the sample router TrafficSignalsRouter, but the costs seem to be added on vertices after the routing. Is it possible to add these costs on the ...
1
vote
1answer
208 views

How to edit PostgreSQL geodatabase table using ArcPy?

I'm trying to update a table using a python script and it's not working. The table resides in a postgres geodatabase and is versioned. I have also verified my user permissions (I'm the admin). The ...
4
votes
1answer
171 views

Proximity search: ST_DWithin vs ST_Distance?

I have records stored in a table with latitude/longitude coordinates stored in a geometry field. I want to find all records nearby a user supplied reference point. Note "nearby" probably means less ...
0
votes
0answers
32 views

Unable to set pg as default backend with osgeo4w GRASS

I am trying to set PostgreSQL as default backend for GRASS, but cannot manage to get it right. Working with GRASS 6.4.3 print g.run_command('db.connect', driver='pg', flags = 'c', ...
1
vote
4answers
47 views

postgresql how not to show the first result returned st_distance

I have a query that calculates the distance away from a given point, however currently my query returns the point I am actually querying a distance for. How would I prevent site 1 from showing in my ...
5
votes
1answer
150 views

What spatially-aware GUI administration softwares exist for PostgreSQL/PostGIS (free or paid)?

Most of my experience with PostgreSQL has been PGAdminIII and psql, but I'm interested to know what others use. Is there PostgreSQL equivalent to SQL Server Management Studio (SSMS) and its ability ...
0
votes
0answers
27 views

It is possible to invoke PostGIS internal function within new PostgreSQL user-defined function in C?

I have fuction f() and function ST_Area() for example. Can I invoke ST_Area() in the body of my function f()? Function f() is written in C. The code might look like this: #include "postgres.h" ...
0
votes
0answers
80 views

Arcpy ERROR 000732 using tools from Toolbox (Copy, FeatureToFeature etc.)

I have got a lot of feature classes in my sde postgreSQL database. When I check the existence of sde database using arcpy.Exists(inGDB) I get the True result. In the case when I check the existence ...
0
votes
3answers
728 views

Unable to connect PostgreSQL to ArcMap 10.1

I'm trying to connect my local PostgreSQL database to ArcMap 10.1 but for some reason I'm unable to connect to the server. Any ideas of what might be causing the issue. For the instance option in ...
0
votes
1answer
143 views

Install both postgis and postgresql-9.1-postgis packages?

I've installed the PostgreSQL package (ver. 9.1) on a Debian 7 server using the command "apt-get install postgresql postgresql-contrib". I now want to install PostGIS as well. Should I install both ...
0
votes
0answers
37 views

SQL questions testing pgRouting 2.0

Following the post:pgRouting 2.0 for Windows quick guide, cuz I have some problem with DB manager(here is the problem I posted:DB manager in QGIS 2.0), I skip DB manager and save the test shapefile, ...
1
vote
1answer
56 views

DB manager in QGIS 2.0

I followed this post:pgRouting 2.0 for Windows quick guide, and I want to use DB manager to load the test data into my PostgreSQL database. I used url to get the test data: I have set up the ...
1
vote
1answer
65 views

Problem using pgRouting 2.0

I follow this great post:pgRouting 2.0 for Windows quick guide, and I have loaded the test data from GeoJSON, like this: But I don't know how to load this layer into my database, and my DB manager ...
0
votes
1answer
98 views

Visualizing information when click in polygon‏ - Spatial join

I am new to cartodb, right now I am trying to do something similar to the cartodb tutorial: Create your first map with CartoDB.js, but with polygons using my own map. For example: I did a spatial ...
1
vote
1answer
51 views

What is the complexity of neigborhood search in PostGIS?

I have a point with coordinates x and y. I want to know all the points in a square around this point, with side L. For this, in postgresql/PostGIS, I use: SELECT * FROM table_of_points WHERE ...
4
votes
1answer
124 views

Password protecting tables in cartodb

I am trying to find an easy way to have private tables, yet exposing them to certain clients if they are authenticated. This authentication can be achieved by a token system that allows the client to ...
1
vote
1answer
493 views

Geoserver sql view using an external sql query?

I am trying to figure out a way of producing a view of a layer in GeoServer, using an external sql query. By external I mean, for instance, a user defined query in a php from where all the parameters ...
0
votes
0answers
108 views

OSM. Problem with memory

I have the virtual machine with 64 GB I download OSM map: osm2pgsql --slim –d gis –C 16000 –number-processes 4 planet-latest.osm.pbf But I have warnings: Going over pending ways... 121492826 ...
0
votes
1answer
207 views

Maximum size on the bounding box with ST_MakeEnvelope and && and geography column in PostGIS?

I've done quite a few google searches, but haven't managed to find anything that has helped me directly. I've got a few features in a PostGIS table with a geography column. The features are focused ...
3
votes
1answer
81 views

ArcGIS Displays Wrong Date

I have a postgres database with a series of fields that includes a date field in MM/DD/YYYY format. Through ArcSDE it displays in Arc in a weird format with the wrong date and some made up time. When ...
0
votes
3answers
159 views

Table Relate Spatial and Tabular data in QGIS 2.0

I am self taught in GIS, so I apologize ahead of time for my noobness. In ArcGIS you have two options to associate data in a table to spatial data. Based upon my understanding, the first is Join ...
3
votes
1answer
280 views

osm2pgsql: Import data in custom projection

I have osm-file and I want to import it to the postgresql via osm2pgsql with custom projection EPSG:20022. I look to the help and found out any keys like -E EPSG: but when I try to do with it I get ...
1
vote
0answers
94 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 ...
3
votes
1answer
280 views

Import of OSM data into PostgreSQL using osm2pgsql: which formats are supported?

I followed a tutorial to install a PostgreSQL server on my Mac OS X Mavericks, and to import some OSM data with the osm2pgsql converter ...
3
votes
1answer
84 views

What maintenance should I do for PostGres database?

I'm getting familiarized with using PostGres for ArcGIS. I've only ever used SQL Server. I was successful in setting up an SDE database within PostGres 9.2, but I'm not sure what type of maintenance I ...
3
votes
1answer
259 views

postgis: difference with && operator and st_intersects

I found that there is a difference in result between using A && B operator or one of the geo functions like st_intersects(A,B) or st_overlaps(A,B) While the st_intersects or st_overlaps ...
10
votes
1answer
596 views

GUI tools for PostgreSQL/PostGIS?

as a cartographer I work with TileMill to visualize geodata. I installed a local PostgreSQL server with PostGIS and osm2pgsql. Everything works fine. Anyhow, I am new to working with servers and the ...
0
votes
1answer
575 views

Postgresql Trigger to insert records in my table from another one

I spent few days trying to resolve this question but it was impossible. I have two tables: Table1. CREATE TABLE point ( id_point integer NOT NULL DEFAULT, layer text, elevation numeric, ...
3
votes
0answers
291 views

Hibernate Spatial - 'Invalid endian flag value encountered' Exception

I'm trying to run a simple query in Hibernate Spatial 4.0 on PostgreSQL 9.3. I have a number of objects in a table with latitude/longitude values, and I'm trying to query objects that fall within a ...
1
vote
1answer
210 views

Postgis functionalities in Microsoft SQL Server

I'm using Postgresql 8.4, Postgis 1.5 for My GIS works. Planning to change my Database to Microsoft SQL Server 2012. Can we use all the Postgis functionalities in Microsoft SQL Server 2012. Please ...
0
votes
2answers
73 views

Problem loading view from postgres

My problem is loading view table from Postgres. Here is my view table: SELECT h1.gid, h1.st_buffer FROM vmo_buffer_2m h1 LEFT JOIN vodomjeri h2 ON st_intersects(h1.st_buffer, h2.geom) WHERE ...
0
votes
1answer
294 views

Postgis: find geometry within multiple polygons

I've got two tables with geometry in it. Table 1:items holds items with a point geometry; while the second table property_zones holds polygons. The Items: CREATE TABLE public.items ( id integer ...
0
votes
1answer
109 views

Defining a WHERE clause from a subquery for a query to create a handy view

It is about my implementation from an answer of this question. It is more an postgresql issue than a GIS issue, whereas it is about geometries and spatial queries. I want to create a view from the ...
1
vote
0answers
82 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 ...
2
votes
0answers
160 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 ...
0
votes
1answer
229 views

ogr2ogr DXF to PostgreSQL some LINESTRING coordinates mirrored to the negative longitude

I have been using ogr2ogr GDAL tool to migrate geospatial data from DXF file to PotgresQL database without much problems. But now there is a special problem I can not fix. I have a DXF file with ...
1
vote
2answers
133 views

getting data into geoserver from two columns to form a point

I have a problem on how I am able to retrieve a geometry data from postgres using geoserver. I am new to this. The latitude and longitude are on separate columns. So I'm trying to figure this out by ...
-1
votes
1answer
157 views

Create a View with a new geometry field in PostGIS

I have a table in my data base. This table was created with differents fields as 'x','y' and 'z'. Now I need to make a view to generate a geometry column, but I found problems, because the created ...
0
votes
0answers
19 views

How to export figure like Post In Action demonstrate?

I am reading the book "PostGIS In Action" and now I follow the listing 2.4 here SELECT AddGeometryColumn ('public','my_geometries', 'my_circular_strings',-1,'CIRCULARSTRING',2); INSERT INTO ...
1
vote
1answer
53 views

how can I assign an id column in sql query that merges geometries

I have a layer that consists of a number of features. Each features is a line segment and has an attribute named zone_name which takes one of 7 values. What I want to do is to use the atlas ...
0
votes
1answer
94 views

How to format SQL expressions for ArcPy with ArcSDE for PostgreSQL feature class?

I'm trying to use SelectLayerByAttribute to find the last point added to a FC. I figured I could use the objectid field because it's serial. I wrote the following: ...
1
vote
1answer
77 views

Clip geometries in table based upon value

I have defined a view in postgres that returns a set of polygons and can be queried as follows:- SELECT wkb_geometry, grade_count FROM ng_schema.grade_count_report [sql.where] order by grade_count ...
2
votes
2answers
332 views

How to connect Microstation V8i to Postgresql?

I have been searching the web trying to find out if any one has connect Microstation to Postgresql, and to my surprise there has not been alot of chatter on ways to do this.. When looking at the ...
1
vote
1answer
58 views

Google Map API and OS Opendata in QGIS

I'm new to gis and having problems with matching reference systems for my two data sources. I have downloaded some OS Vectormap data which I believe is in 27700.. And I have some longitude and ...
2
votes
2answers
3k views

Installing postgis on postgresql 9.1 not working

I'm trying to install Postgis 2.0 on a perfectly functionig postgresql 9.1.10 database. I installed the package via: richard@srv1:/$ sudo apt-get install postgresql-9.1-postgis postgis Reading ...
5
votes
1answer
282 views

Performance in calculating raster statistics in PostGIS

I'm trying to calculate raster statistics (min, max, mean) for each polygon in a vector layer using PostgreSQL/PostGIS. This GIS.SE answer describes how to do this, by calculating the intersection ...
1
vote
1answer
113 views

Load partial shapefile into Postgis / GeoDjango project

I have a shapefile with Canadian postal codes, but am only looking to load a small subset of the data. I can load the entire data file and use SQL or Django queries to prune the data, but the load ...
4
votes
2answers
296 views

How to generate one geojson file from several rows in Postgres/PostGIS?

I have a table with geospatial objects, in particular, polygons. I know that I can generate from one row a geoJSON string using ST_AsGeoJSON(http://www.postgis.org/docs/ST_AsGeoJSON.html). But I would ...
-1
votes
2answers
111 views

How to convert WKB to radians or utm in postgresql?

I am using PostgreSQL with postgis, the geometries are in UTM and stored as WKB with several shapes types (point, polygon, linestring...). Is there a way to convert the WKB to a list of points in ...