PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
16 views

using changeset for larger region to update OSM data in PostGIS

I'm using the OSM import and update workflow described here to maintain OSM data in a PostGIS database. Import (osm2pgsql): osm2pgsql -c -d gps -U gps --cache 8000 --number-processes 4 --slim ...
1
vote
1answer
39 views

A few PgRouting database design questions

Does someone know how the cost field in PgRouting is calculated? What are 'source' and 'target' good for? 'osm_source_id' and 'osm_target_id' contain the same information using different numbers. Is ...
1
vote
1answer
24 views

How to select from geometry column in postgresql?

I've got a table which it has a geometry column filed by some point (ex. "POINT Z (116.309627 39.991285 148)"). now I want to select point's id from the table. I wrote follow sql Code but I force an ...
1
vote
0answers
16 views

GeoTools How to add attribute to a schema in DataStore

As you know, you can create a schema in a DataStore. For example, you may create a table in a postgresql database like this: SimpleFeatureType schema = ...;// some schema DataStore dataStore = ...
4
votes
3answers
692 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 ...
0
votes
1answer
17 views

Intersection of two vector tables data in postgresql

I have satellite raster data is converted in to pixels using create table gtru_tile_pix as SELECT (ST_PixelAsPolygons(rast)).val, (ST_PixelAsPolygons(rast)).geom FROM ...
0
votes
1answer
11 views

pgsql2shp error: table does not exist

I am exporting tables from Postgresql 9.2 to shapefiles using postgis 2.0. I have the same system on other machines and it works correctly. I have tried running the command from a prompt and get an ...
0
votes
1answer
26 views

Average distances between two point sets bound by polygon

I have a table of boundary polygons, a table of points and a table of other_points I want to work out the average distance between points contained within and other_points for each polygon. So far I ...
0
votes
1answer
38 views

Couldn't Excute command line PostGIS pgsql2shp

I am using postgres 9.3 with postgis 2.1 on Ubuntu 14. When I tried to dump pgsql table using pgsql2shp, I get the following error. Error: pg_wrapper: pgsql2shp was not found in ...
1
vote
2answers
45 views

Rasters loaded in Postgres/PostGIS using raster2pgsql contain blank lines

I recently set up an Ubuntu Server as a Postgres/PostGIS database server. In an effort to serve a collection of aerial photos to my colleagues, I loaded 608 GeoTiffs (non-overlapping 1km tiles each ...
0
votes
0answers
21 views

postgres update and cluster not empty

I want to update my postgres/postgis server (on Windows) moving from version 9.2 to 9.3, and 2.0 to 2.1 for postgis. I am using pg_upgrade bu stuck on a error : New cluster database "postgres" is ...
0
votes
1answer
57 views

Nominatim installation error: Out of memory for node cache dense index

I am installing Nominatim on my Ubuntu server 14.04 through this link and trying to load OSM data into my postgreSQL database. For loading into my database I am using this command as given in the ...
4
votes
1answer
47 views

Slow Planning for Postgis ST_Intersects

I am trying to run the following query: SELECT * FROM fences where ST_Intersects(geom, ST_GeomFromText('POINT(-73.990452 40.994184)', 4326)) When I run Explain Analyze I get the following: "Index ...
1
vote
1answer
50 views

Performance Improvement of Postgres vs PostGIS

I am trying to run the following query thousands of times per second to determine which is any polygon contains the passed in point. SELECT * from areas WHERE poly @> ? Poly is the name of the ...
1
vote
0answers
30 views

How to create MBtiles from geoserver

How to generate mbtiles in geoserver? using openlayers for displaying geoserver layer for example calling wms layer like this new OpenLayers.Layer.WMS("Kanpur", ...
1
vote
0answers
33 views

Nominatim CentOS 7 Install Problem

The Problem: I've installed Nominatim on CentOS 7 because I want to do some reverse geo-coding, however, when I try to load the and create a Nominatim database with this command: ./utils/setup.php ...
1
vote
1answer
21 views

How to use the Tile Server to fetch latitude/longitude data

I have installed a tile server using the following link and my main purpose was to geocode as many times as possible. Initially I was using openstreet API to geocode but they have certain limits so ...
2
votes
1answer
196 views

Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination?

I am developing an web GIS for map data presentation for public. Is there any readily available implementation of Mapserver (or Geoserver)- Postgres-Openlayers combination or similar? More Details: ...
1
vote
1answer
31 views

Convert Postgresql Polygon to PostGIS POLYGON

I have an existing table in postgres which contains a plain old posgresql polygon. I have added a new column using SELECT AddGeometryColumn ('public','fences','geom',4326,'POLYGON',2); I would ...
0
votes
1answer
23 views

Osm2pgsql failed due to error when I try to import data into PostgreSQL

I am using the following link to install openstreetmap server on my ubuntu 14.04 server. I have followed their tutorial line by line and installed most of the dependencies and everything. When I try ...
2
votes
2answers
108 views

Cleaning geometries in PostGIS?

I am trying to do some processing on some very large polygon layers. However I am running into various geometry errors such as: NOTICE: Ring Self-intersection at or near point 470396.52017068537 ...
1
vote
1answer
29 views

How to store multi-valued attributes in PostGis using Postgresql [closed]

I have a with meterid,meterreading,reader and date read.I wish to store this data using Postgis database. I used this code via postgresql to create the table CREATE TABLE MeterRdg( meterid ...
0
votes
0answers
19 views

GeoWebCache Speed SQL Server Store

How to increase GeoWebCache speed, Am using geoserver 2.7.2 for tile cache and data store creating from a SQL Server database it will take 1 day and above to complete cache and it terminated several ...
0
votes
0answers
12 views

how to use st_intersection() with re-projection in POSTGIS?

This is a shipping route from 'portland to busan' and I want to check the route against land_polygons like how much distance is traveled by a route through land.And the problem is while checking the ...
0
votes
1answer
161 views

How to get a distinct pair of column values based on minimum of another (computed) column?

I have two tables with point geo data, one (sfc_obs) with weather stations (names), one (smos_grid) with satellite pixels (dggs), and I'm trying to find which dgg is closest to each name using ...
0
votes
1answer
30 views

Alpha Shapes in pgRouting - missing FROM-clause

I am attempting to follow Anita Grazer's post on creating alpha shapes in pgRouting. The article was written several years ago, so some of the functions have been updated and names have changed. I ...
0
votes
0answers
26 views

Aggregate/merge data upon insert into PostGIS (via gdal)

I am working on a project where I take a large raster file (1.5GB+), put it through a number of image-processing operations, and finally convert it to vector data. Being that the raster is large, I am ...
2
votes
1answer
2k views

Formatting SQL queries for use in Arcpy?

I have to make an SQL query on a column having not adequat name "type_borne_id", I couldn't make SQL queries using arcpy.Select_analysis neither selectbyattribute, but when I use select_analysis ...
4
votes
1answer
485 views

How can I make a Postgres/PostGIS ST_Distance_sphere query more efficient?

Within Postgres/PostGIS I have written an SQL query to get the closest distance for each element within a point coordinate table from a polyline table. The query comes back and works correctly, but ...
2
votes
1answer
35 views

How to set/update columns by using a trigger?

I want to set/update attributes (alignment_horizontal, alignment_vertical) of a PostGIS geometry (point) by using a trigger. CREATE TABLE point ( gid serial NOT NULL, geom geometry(point, SRID), ...
1
vote
1answer
70 views

driving time to the nearest facility using pgrouting

I'm using pgrouting 2.0 and postgis in postgresql. My problem is to calculate the driving time to the closest facility for each node of my OSM derived network. These are the steps to be implemented ...
0
votes
0answers
20 views

To find a substring of a linestring in postgis to be used in playback in map

I have gps coordinates as point outside the linestring/road. I have interpolated to the closest point in the line using ST_Line_Interpolate_Point(). Now I need to draw line through these points and it ...
0
votes
2answers
191 views

Enlisting all OpenStreetMap (OSM) street names for General Transit Feed Specification (GTFS) routes?

I have exported OpenStreetMap (OSM) data of a city to my local postgresql db using osm2pgsql. I would like to add the General Transit Feed Specification (GTFS) routes information (say bus routes) ...
3
votes
1answer
77 views

What tools do you recommend to draw historical shipping routes?

I´m working on a project where I have to draw historical shipping routes of trade, whaling, etc. ships from the XIX century. I´ve done some research and checked some questions in this forum but I ...
3
votes
2answers
310 views

Error inserting GeoJSON in PostGIS

I know there is a similar question but I am getting a different error and none of those answers have helped. I am trying the following query (the GeoJSON itself is from the PostGIS website. INSERT ...
0
votes
1answer
36 views

Import shapfile to Postgis using Python and ogr?

Iam not able to import a shapfile to PostGIS using the same library(ogr). I am using below link but it give me error. Import shp to Postgis using Python and ogr Error : Traceback (most recent call ...
2
votes
0answers
16 views

Creat point count trigger in PostgreSQL?

I wish to create a trigger in PostgreSQL for counting points in a polygon. The tweak is that the count should automatically get updated whenever the polygon is edited. Can anyone please help me on ...
2
votes
1answer
633 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 ...
3
votes
2answers
54 views

Is the PostGIS st_intersection function viable for very large data-sets?

I am running an area intersection query on two large multipolygon tables (a few million rows). SELECT r.geom FROM public.my_table r WHERE EXISTS ( SELECT gid FROM public.my_table_intersection ...
0
votes
0answers
32 views

Cant able to delete features of a table inside a public schema of postgre database

I have table inside a public schema of postgre database. And i did a connection to that database and load the table inside the public schema in QGIS 2.10.1. I changed the table to edit mode and tried ...
1
vote
0answers
34 views

Running a custom function on each line of a PostGIS table

I am trying to run a custom function on each parcel in a PostGIS table, (in this case its a function that finds the standard deviation value of the pixels intersecting a raster) Here is the code for ...
0
votes
1answer
30 views

Problems with PostGIS St_closestpoint function

I'm trying to find the closest point in a line from an insertion point closest to it. To do it, in the middle of the function I use select id from rede_viaria.t_rviaria_via vias where ...
2
votes
1answer
38 views

How can I do a subquery inside a subquery in PostGIS?

I need to add a subquery to a working function. Instead of select * from table, I'd like to select * from (select * from table where height>1500) as sub, something that works in other functions I ...
0
votes
1answer
35 views

Problem importing sqlite into Postgres (with PostGis) using ogr2ogr

I am trying to import a very large sqlite file into Postgres SQL 9.3. The first tool I tried to use was OGR2GUI (http://www.ogr2gui.ca/). The 64 Bit version does nothing, whilst the 32 bit version ...
1
vote
1answer
38 views

Is Create Spatial Type necessary

When I enable an enterprise geodatabase for a database in postgresql, the st_geometry type get installed with it. So Is it necessary to use "Create Spatial Type" tool to create st_geometry type in ...
0
votes
1answer
144 views

Google Streetview Images in infowindow

I have followed the instructions on this blog post on adding streetview images to the infowindow: http://blog.cartodb.com/a-picture-is-worth-1-000-attributes-infowindows-with/ I can do it without a ...
2
votes
1answer
238 views

ERROR 999999: Error executing function - Failed to execute (CopyRaster)

ERROR 999999: Error executing function Unexpected operation No spatial reference exists This is a fragment from my log report: ERROR 999999: Error executing function. Database user ...
1
vote
2answers
219 views

adding geometries to a source, target table for multiple rows in pgrouting

I am having an issue trying to perform the pgr_dijkstra algorithm and getting back a line in my table for multiple rows. I have a table that has a columns of source, target node id's but I cannot ...
3
votes
1answer
41 views

GeoServer and PostgreSQL JSON column

I have a database table with a dynamic schema implemented via a JSON column named "properties". Currently GeoServer doesn't recognize my JSON column. Is there some way to make Geoserver recognize ...
3
votes
1answer
253 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. ...