PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
12 views

Show graph in html popup for dynamic data of a postgresql table

I am trying to plot xy value from a postgresql database table. In the table there are multiple longitude and latitude corresponding to values. The table is like this, where all longitude and ...
2
votes
2answers
2k views

Error when trying to run Create Extension postgis

I have installed PostgreSQL 9.x and PostGIS 1.5/2.0 several times and have never had this problem. I just got a new CentOS 6.3 server up and running and and I have Postgres 9.3 functioning as ...
3
votes
1answer
178 views

Python Postgres Multiprocessing speed increase

I'm trying to speed up my PostGIS queries using multiprocessing. My current setup is using python and psycopg2 such as below. Although this has given a speed increase, it still seems like there are ...
0
votes
2answers
48 views

How to set the tolerance value in pgr_createTopology function of pgrouting?

I am making a map based on the floor plan of a building. I made the shapefile and added it to the PostgreSQL database. I created the topology for the map using the following code: SELECT ...
0
votes
0answers
10 views

mysql foreign data wrapper for postgres with parameter substitution

I have created a mysql_fdw for my postgres and when i try to run the one with a subquerry that has parameter substitution it does create a table but on querying the foreign table it throws an error: ...
0
votes
0answers
22 views

How connect C# to Postgresql in host j.layershift.co.uk

I have installed postgresql database in http://postgres-project-1241043.j.layershift.co.uk/ host. I want to connect to the database using C#. I use Npgsql with following connection string. ...
1
vote
2answers
37 views

What is best way to reorganize osm into PostGIS database entity?

I'm just wondering how to reorganize the OSM given entity to more flexible and schematic purpose. The OSM gave 4 entities the planet_osm_line, planet_osm_point, planet_osm_polygon and ...
2
votes
2answers
54 views

How to rename PostgreSQL/PostGIS columns while importing Shapefiles?

I discovered shp2psql to successfully import geospatial data from ESRI Shapefiles into PostgreSQL/PostGIS. Now I would like to automatically rename the target column names. Is there any mechanism ...
1
vote
2answers
41 views

python qgis 2.4 : display a view with symbology

I have managed to display a view created using postgresql from qgis using python code: uri = QgsDataSourceURI() uri.setConnection("localhost", "5432", "stat", "postgres", "admin") ...
1
vote
0answers
40 views

Counting self intersections of linestring using PostGIS?

Is there a way of using PostgreSQL + PostGIS for finding the number of self intersections in a linestring? I have a linestring that goes forward but in circles, and I need to find the number of times ...
5
votes
2answers
105 views

Growth of a PostGIS database for Social Media - Move to Cassandra?

I currently have a large and growing database of geo-social media. I'm using Postgres with postgis, and so far it's been quite good. My use case thus far has been to query the database for all posts ...
0
votes
1answer
23 views

Issues ST_MakePoint in PostGIS with Geoserver

I am trying to setup a GIS system to use PostGIS and Geoserver. I have loaded all of the data into a table. The data that is received has long/lat coordinates in Degrees, Minutes, Seconds, Direction, ...
1
vote
1answer
45 views

How to render tiles from kml file

I'm trying to render tiles out of a KML file. Normally, I'd render tiles out of an planet.osm extract. For example, I'd select a tag using osmosis and then process it with osm2pgsql. Then I'd ...
1
vote
1answer
107 views

How can I relate the osm2po osm_source_id to data in OpenStreetMap?

I created and imported OpenStreetMap (OSM) data into Postgres using osm2po. e.g. java -Xmx8g -jar osm2po-4.6.9/osm2po-core-4.6.9-signed.jar config=osm2po.config.eu_xc prefix=eu tileSize=x,c ...
3
votes
1answer
750 views

How to use the pgRouting TSP function?

For more than two days I'm trying to make the TSP algorithm work in PostgreSQL/PostGIS. My problem seems to occur when I'm trying to take into account the road network for TSP algorithm. I know that ...
1
vote
0answers
10 views

PostgreSQL and Geoportal Installation giving Fatal Indent Authentication Error?

I am installing geoportal 1.2.4 on CentOS from the command line terminal...during my installation I am receiving a fatal ident error message for my user geoportal. The pg_hba.conf file has been ...
1
vote
2answers
323 views

Function for Selecting Points in a Polygon

I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
6
votes
2answers
6k views

Adding shapefiles to PostGIS database

I was able to create a Postgresql database and then I executed, createlang plpgsql geospecies psql -d geospecies -f postgis.sql psql -d geospecies -f spatial_ref_sys.sql So now can I directly ...
1
vote
0answers
15 views

Debugging ogr2ogr “AddGeometryColumn failed” and “Terminating translation prematurely after failed translation of layer”

As noted in the title, I'm getting the following error: ERROR 1: AddGeometryColumn failed for layer pretty_polys, layer creation has failed. ERROR 1: Terminating translation prematurely after failed ...
1
vote
0answers
23 views

Using python libary simplejson and urllib in PostGIS

I installed PostGreSQL9.3 and want to create a Pl/Python function using simplejson library and urllib. First I use OSGeo4W Shell to test the similar python script, it works. Then in PostgreSQL, it ...
1
vote
0answers
66 views

ArcGIS 10.2.1 crashes during connection with ArcSDE 10.0 inside PostgreSQL 8.0.1 [closed]

I'm currently working in an infrastructure built with ArcGIS 10.0 (Desktop and Server) [SP2 build 3200] and because for some functionalities (ArcGIS for Desktop extensions) I need to use a newer ...
0
votes
2answers
51 views

Osmosis, Save to different schema

Does anyone know how to use osmosis to save to a different schema? I used the pgsnapshot_schema_0.6.sql to create a blank data table, but it always creates it in the public schema. I need to create ...
0
votes
1answer
21 views

PostgreSQL Trigger on inherited tables [closed]

In my PostgreSQL I have a parent table and a number of child tables (inherited from the parent table). How to create a trigger which will be bind to all the current and future child tables derived ...
0
votes
0answers
28 views

Calculate and Label the lengths of polygon edges/sides

I have got a map-server, postgresql/postGIS & Google map API implementation. Users will draw polygon features after logging in. I would like to Label the sides/edges of a polygon with length ...
0
votes
0answers
13 views

Optimize Tilemill export of project with contour-lines

I have a project in Tilemill (based on OSM-Bright) that covers Europe and also displays Contour-Lines. My problem is that the performance is pretty bad when exporting my map. I've already seen that ...
0
votes
1answer
362 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 ...
4
votes
2answers
231 views

clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...
2
votes
0answers
15 views

Convert ArcGIS gdb with coded domains to Postgres / PostGIS [duplicate]

We have several file gdb's and would like to convert these to Postgres / PostGIS. We've used ogr2ogr to transfer these files; however, some of the fields are stored as coded domains and the fields are ...
2
votes
1answer
324 views

Create isochrone from multiple start points

I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start ...
1
vote
1answer
54 views

Converting file geodatabase with coded domains to PostgreSQL / PostGIS?

We have several file gdb's and would like to convert these to Postgres / PostGIS. We've used ogr2ogr to transfer these files; however, some of the fields are stored as coded domains and the fields are ...
1
vote
1answer
46 views

Force St_split() to return geometries in specific pattern

I'm Using PostGIS st_split() to split a polygon geometry by a linestring. Then I use st_dump() to return each of the splitted geometry and it is working fine. But the issue is I want to force ...
1
vote
1answer
107 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: ...
1
vote
1answer
31 views

Postgis create polygon extent/convex hull from spatial table

Please help, I have a polygon layer representing building footprints. I want to create new view in postgis that will contain rectangle representing bounding box and also another view that will have ...
2
votes
1answer
167 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. ...
1
vote
3answers
105 views

Generating a routing database for the entire world while keeping the tags

I've been looking into this matter for a few days now, but I haven't come up with a working solution. Basically, what we are trying to do is create an entire world database, preferably in PostgreSQL, ...
1
vote
1answer
63 views

osm2pgsql missing coordinates

I am quite new to GIS and OSM and am trying to get my head around exporting custom OSM region and uploading them into PostgreSQL. I have started with a very small map area to export with only two ...
0
votes
2answers
28 views

How to update postgis layer from shapefile in QGIS?

My usual workflow with updating layer from shapefile was to: Open DB Manager; Load SHP files into QGIS; Open DB Manager; Import file (with drop option). Now my problem is that I have created ...
0
votes
3answers
78 views

How to Build a graph from a map

I spent days looking in all questions here and trying tutorials. I need to build a graph for a region (It will be my input in simulation) I downloaded Postgresql and Postgis and osm2pgsql. Now i can ...
2
votes
1answer
447 views

generate height data from DTED maps

I have 16 DTED maps of (1 degree x 1 degree). I have to generate combined height matrix of maximum 4 (1 degree x 1 degree) DTED maps in my C++ application. Can someone suggest to me which open source ...
1
vote
1answer
26 views

Run PostGIS command line functions in pgAdmin?

Is it possible to utilize the PostGIS command line functions, e.g. shp2pgsql, from within pgAdmin III? I am using pgAdmin to connect to a remote server.
0
votes
1answer
18 views

How can I get a list of tables in my CartoDB account by size?

The CartoDB dashboard only sorts tables by date modified or created. I would like a list of tables sorted by size.
0
votes
3answers
48 views

postgis insert query to store geometry and other data

I'm using Postgis functions st_dump and st_split to split a polygon based on line. Now, after splitting; output geometry stores in a database table as well. Here is the query: insert into aoo(geom) ...
0
votes
1answer
23 views

ERROR: Operation on two geometries with different SRIDs

I'm new when it comes to GIS and PostgreSQL. I have searched everywhere for the cause of this problem but I can't find the solution. I was following the documentation here First i created a table: ...
0
votes
2answers
91 views

GeoAlchemy pg_function.geojson cannot be decoded with json.loads

I asked this quesiton over on StackOverflow and thought it might make more sense to post it here given it's GIS nature. Given this function: features being a list of SQLAlchemy objects template ...
0
votes
1answer
136 views

Use psycopg2 to do loop in postgresql

I use postgresql 8.4 to route a river network, and I want to use psycopg2 to loop through all data points in my river network. #set up python and postgresql connection import psycopg2 query = """ ...
1
vote
2answers
56 views

Most reliable way to import large dataset with osm2psql

I know my question is similar to slow import via osm2pgsql to postgresql database and Optimizing osm2pgsql imports for OSM data but as we currently have quite some problems importing a large set of ...
3
votes
1answer
133 views

How to create a buffer on a linestring with varying or increasing/decreasing width

I want to buffer rivers/streams for a topographic map. I'm using a PostgreSQL/PostGIS database. Usually, I create buffer with ST_Buffer with a constant width. For example, the width of a river buffer ...
0
votes
1answer
86 views

How to calculate the track length of GPX files with PostGIS?

I am trying to calculate the length of a GPX track. The original GPS data looks like this: <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <gpx ...
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 ...
0
votes
0answers
22 views

How to connect Openlayers with Postgres [duplicate]

hye all, im really new in openlayers, i already have a map using openlayer but not have layer. my question is, how i want display layer using postgres and i want to make a search function to search ...