PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
1answer
17 views

PostGIS replace pixel value by lookup table?

I was wondering if it is possible to write a PostgreSQL statement to replace the value of each pixel in an input PostGIS-raster with a value obtained from a look up table. For example, suppose I have ...
0
votes
0answers
19 views

Trouble setting up Postgres PostGIS database with GeoServer [on hold]

Last weeks I created an application. I want to import from PostgreSQL a database to GeoServer, so that I will call WFS-T service after to my project using JavaScript. For the first time I have to ...
3
votes
1answer
29 views

Finding all segments that makeup a road in OSM

I've spent 2 days trying to figure this out and I'm afraid that it's something that's not possible. If that's the case then I'm thinking the wrong with with respect to OSM data. Let's say I have a ...
0
votes
1answer
15 views

Learning pg_routing - shortest_path error

I'm learning PostGIS and pg_routing to help in our project planning and grant applications at my transportation agency (we wanted to move beyond the limitations of the 1/4 mile walking buffer we use ...
1
vote
0answers
48 views

Create GeoServer SQL View with variable number of arguments ( double precison [ ] )

I was trying to create a PostGIS procedural function which will perform a particular operation depending upon the user's provided coordinates. But since the user can provide any number of coordinates, ...
2
votes
0answers
49 views

How do you disconnect ArcGIS Pro from a PostgreSQL database?

What is the equivalent to the ArcCatalog's Disconnect option in ArcGIS Pro? I have successfully connected to a Postgresql database, but cannot figure out how to disconnect. This is what I'm seeing ...
2
votes
2answers
34 views

pgrouting - network distance many-to-one shortest paths

I want to find the distance (km) between each origin point to the closest destination point (restaurants) using pgrouting. I have 3 tables my road network with nodes and edges 140 origin points - ...
2
votes
0answers
30 views

filling the attributes according to intersection of two layers (Postgresql)

How to automatically fill attributes of a point layer according to the exact position in the polygon layer? I mean how to write a command in PostgreSQL to automatically fill the attributes by the ...
2
votes
0answers
13 views

What are the problems of loading overlapping (or the same) tifs into postgis?

I am still early on the Postgis learning curve. I have an existing table in Postgres - it looks like this: create table "public"."mytable" ( "rid" serial primary key, "rast" raster, "filename" ...
2
votes
2answers
59 views

How to change from EPSG:900913 to EPSG:3857 in Postgresql

I didn't use the '-E 3857' switch when importing the OSM data into postgresql using osm2psql. I'm trying to set up a map server for the first time and I'm following the instructions from here: ...
1
vote
1answer
47 views

How to select geography features within a certain distance given in miles?

I am just taking the first steps in using POSTGIS, but having trouble finding a simple example. I have a database with a Key field, lat and lon fields and a GEOGRAPHY field. I just want to have a ...
2
votes
1answer
46 views

Is it possible to use spatial function to retrieve non-spatial data?

I'm using PostGIS in postgresql.I wish to calculate points within the radius from particular geocode.For that i have created a table with spatial column geocode having datatype as geometry and ...
3
votes
1answer
23 views

PostGIS 1.5 Errors with PostgreSQL 8.4

I am trying to add PostGIS functionality to a database that I created in PostgreSQL using the following command: psql -d <db_name> -f /location/to/this/file/postgis.sql However, I receive a ...
1
vote
0answers
17 views

How to Increase the length of column type geometry in postgres(pgAdminIII)

I am just wondering is there any way to increase the default length of column type geometry in postgres. Since we are trying to save large number of vertices polygon in to the geometry column geom in ...
0
votes
0answers
18 views

Any way to speed up my postgis topology creation?

I need to do topology aware simplification, and I'm investigating PostGIS's new topology extension. However it's taking a very long time to create the topology, and I'd like to know if there's ...
0
votes
0answers
30 views

Upload SHP to PostgreSQL via QGIS

There was the error when I try to upload the SHP to the PostGRESQL. The feature is the line type. The error was: ERROR: Geometry type (LineString) does not match column type (MultiLineString) Do ...
1
vote
0answers
50 views

Query layer in ArcGIS 10.2.2 with PostgreSQL not querying data

After some days I was finally able to import OSM data to a PostgreSQL database and connect it with ArcGIS 10.2.2 I can load every piece I want by simple clicking "Add data ..." however a SQL query ...
1
vote
2answers
42 views

How to get the geometry value from coordinates

I have a table with empty geometry column. I have two columns in the same table which has xcoordinate and ycoordinate values. I want to get the geometry value formed by these two coordinates. The ...
4
votes
2answers
121 views

Why is the Google Maps circle shape not matching to the distance calculated with PostgreSQL?

I am running a PostgreSQL 9.1 Database with PostGIS 1.5 extension. Several coordinates are stored in there with type GEOMETRY (SRID 4326). I'm building a web-application with Google Maps Javascript ...
2
votes
1answer
31 views

How do I get the vector and raster metadata from a PostGIS database?

im using php/postgres/postgis in a webapp, im wondering if its possible to get metadata from the db about all shp/geotiff table like (name, projection, type(ship/tiff), date, desc, owner etc ...) i ...
0
votes
1answer
31 views

how to query contour postgres db for elevation at a point using postgis

Is there a way to interpolate between these contour lines for a given point using postgis? Thanks.
1
vote
2answers
43 views

postgresql rule to trigger

I have two spatial tables and I am mirroring the data between the two table with a postgres rule: CREATE OR REPLACE RULE create_centroid AS ON INSERT TO csg.client_area_request DO INSERT INTO ...
1
vote
1answer
45 views

Get closest (source or target) of an edge from a point in postgres

I have a Postgres custom function that uses pgr_dijkstra to generate a route working. It works be passing the lat/lon of the start and destination points. I then find the closest segment vertice to ...
3
votes
1answer
138 views

PostGIS doesn't use index for spatial query

I can't get PostGIS 2.1 running on PostgreSQL 9.3.5 to use a spatial index even for the simplest queries. The whole dataset is 8 million points (population count grid from here ...
0
votes
1answer
26 views

Modeling SQL Query to add statistical data to a geometry

Hello I have a problem modelling a SQL Query for the following problem: I have two tables with geometries from Shapefile der Verwaltungsgrenzen (WGS84). Of interest for me are Kreise and Gemeinden, ...
0
votes
0answers
45 views

How to split linestrings where start/end points don't touch nearby lines

I am trying to figure out some basic routing with PostgreSQL/pgRouting and I'm struggling a bit. Our network of linestrings are not topologically correct, tracks that should be connected don't touch, ...
1
vote
1answer
37 views

Is product purchaser in distribution area?

I am going to be using PostGIS 2 to create a lookup service. Given a point (lat/lon), I need to either find if a product can be distributed there, or b) a list of products or distributors. I am ...
0
votes
0answers
16 views

QGIS formatting problem using POSTGIS (datetime)

I want to use the time manager plugin using data from a PostreSQL-db. In there the time stamp is set up as follows: "[...]to_timestamp('2014-10-21 00:00:00', 'YYYY-MM-DD HH24:MI:SS')::timestamp ...
0
votes
0answers
36 views

GeoServer 2.6 + PostgreSQL 9.3.5, GeoServer becoming unresponsive

We're displaying point vector data on a web client using an OpenLayers (2.12) WMS layer... rendered via a GeoServer SQL View reading from data in PostgreSQL. The particular layer has a viewParam on ...
3
votes
2answers
51 views

How can I export data containing umlauts from PostGIS to shapefile, without losing the umlauts?

I am exporting my Finnish (Finland) data from PostGIS to esri shapefile. I am using the PostGIS Shapefile Import/Export Manager and I don't see any way to specify the encoding of the shapefile's ...
2
votes
1answer
73 views

PostGIS Nearest Neighbour outside buffer

I am trying to find the 6 nearest neighbours to a point which are outside a defined buffer. Basically I am comparing points of the same table and working with Mike Gleason's examples. WITH subq AS ...
1
vote
0answers
35 views

Create a “wide” table recording all overlaps between polygons in PostGIS

I have a set of overlapping polygons and would like to record which polygons are overlapping at each intersection. I have followed the instructions at: ...
5
votes
1answer
89 views

SQL “Case” statement when count(*) is 0

I am trying to write the following SQL command using case clause. with x as (select the_geom as geom from table1 where st_dwithin(the_geom, st_setsrid(st_makepoint(28.959495,41.019913), 4326), ...
1
vote
2answers
35 views

Insert values in Postgresql in Java

Hello i try to insert same values in my table but i write this code String sql = "INSERT INTO points (gid, osm_id, name, type, geom)VALUES (?, ?, ?, ?,ST_GeomFromText('POINT(?, ?)', 2100));"; ...
1
vote
1answer
59 views

Modifying “pg_hba.conf” file to listen local TCP/IP conection

I am starting with PostGIS and there is an error when trying to connect through a TCP/IP connection. What I have done is: installed PostGre 9.3 in my PC, then installed PostGIS 2.3 for postGre 9.3, ...
0
votes
1answer
32 views

How to modify imposm data mapping in order to include the user name?

I want to import OSM data into postgresql with imposm. How do I have to modify the import process in order to have the user name as an attribute in my tables? Do I have to change that in the data ...
1
vote
0answers
40 views

Generate random points in polygon. Algorithm question

i created a Random Point Generator in python using the algorithm described here by @whuber. The algorithm is implemented using Shapely, PostGIS and psycopg2. To boost performance pythons ...
1
vote
1answer
17 views

How do I ensure polygons are properly displayed when using 'on the fly' CRS transformations in QGIS 2.6?

QuantumGIS 2.6.0 (Windows 7 64-bit) I have created a PostgreSQL POLYGON as WGS84 (CRS 4326). The polygon is a series of points around (but not actually on) the edge of the map. This is a rectangle ...
2
votes
3answers
89 views

ST_MakePoint or ST_PointFromText to generate points

I'm new to postGIS and am having trouble finding an answer to this question. I have loaded UK postcode data (OSGB36, SRID 27700 with eastings and northings fields) into a postGIS database. I now want ...
3
votes
0answers
17 views

QGIS isn't displaying dates in the attribute table

I have a QGIS project that links to data in a Postgres database. For some reason, QGIS is not displaying any data in date fields. The date fields appear to be fine in Postgres and I have performed ...
0
votes
0answers
68 views

Converting GPS coordinates points to polylines

I happen to have some GPS coordinates points based on timestamp in a table. My table consists of and id , time_stamp and GPS points as the geometrical data. I want to create a line by joining all ...
-3
votes
1answer
42 views

How to use st_touches to get all nearby states

I have a table with all US states geometrical data: USstate ------- state | The_geom (here filling in random value) AL | 00012312 NM | 000234234 NJ | 0000234534 NY | 00005465 ...
-3
votes
1answer
54 views

How do you combine multiple spatial functions in one query?

I want to find out the intersection and difference in the same query using postgresql. How can I combine both st_intersect and st_Difference in same query and return the result.I want to compute the ...
1
vote
0answers
25 views

TileStache some vector tiles failing / postgis connection error

I have TileStache running fine with NGINX/uWSGI on my server. Problems start when I try to render data as vector tiles from a postgis datasource. A few tiles will normally work fine, but at some ...
0
votes
0answers
28 views

Capturing points slightly out at sea

I have two tables one containing points (points) and the other polygons (polygons). I want to generate a two-columns table identifying for each point of the first table the polygon containing it. So ...
1
vote
1answer
44 views

How to import geometry data from csv file to postgres?

I have geometry file in *.xls file, but when I save in *.csv it say "some feature in your workbook might be lost if you save it as CSV (Comma delimited)" however I keep that file anyway and when I ...
2
votes
0answers
48 views

Arcpy cannot connect to SDE on PostgreSQL with 32-bit version

So I've been banging my head against a wall for awhile with this one. I recently setup an SDE database in Postgres, and all seemed good. I am able to connect to it from both ArcMap and ArcCatalog, ...
3
votes
1answer
108 views

Postgis is Broken after installing Nominatim

I followed Nominatim Tutorial to install PostGIS and after that I can't access PostGIS at all I already trying reinstalling and installing everything over and over again with no success. Everytime I ...
2
votes
0answers
74 views

Inserting coordinates from Google Maps into a Database

My question is pretty basic. I am using Android Google Maps to take the coordinates off a location on the map and I want to insert it into a PostgreSQL database. I know I have to use PostGIS but how ...
1
vote
1answer
27 views

importing shapefiles to postGIS on QGIS1.8

I am trying to import a shapefile into postgis from within QGIS 1.8. The QGIS is based on a server that is not managed by myself. I have requested an upgrade to QGIS 2.0 ...but this may take ...