PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
1answer
35 views

PostGIS ST within does not exist

I'm quite new to postgresql and postgis so this error will probably due to some rookie mistake. I want to run the spatial query ST_within. When I describe the query like this SELECT nw.entity_id AS ...
0
votes
0answers
4 views

How to choose entrys in pgr_kdijkstrapath over checkbox in HTML?

I want to create a GIS, where people live at pre-defined places(all of them play a defined musical instrument). A route should be created from these people to the place where they play together. It ...
0
votes
0answers
15 views

How to create unique plane with PostGIS?

How to create a unique plane, with (x , y ,z) as center and a vector as normal, in PostGIS? I already saw "Make3DBox" function, but it does not make a unique one.
0
votes
2answers
19 views

Can you do aggregate functions among nearby geometry in PostGIS?

I want to do aggregation based not on group but on geometry, is that possible in PostGIS? For example to calculate max, min, average price for all listings that's nearby a geometry point, how can I ...
0
votes
0answers
9 views

How to upgrade an PostgreSQL 8.3(32-bit)/ArcSDE 10.0 database to PostgreSQL 9.2(64-bit)/ArcGIS 10.2?

I need to upgrade a large production PG8.3(32-bit)/Arc10.0 database with a fair amount of programming (that has circular references) as-is. This is a system that I inherited, so I don't have the ...
2
votes
1answer
18 views

Visualising a raster PostgreSQL table in QGIS

I have imported a raster tif image into PostgreSQL with this command: raster2pgsql -s 32643 -I -M filepath.tif -F -t 100x100 public.databassename > filepath.sql And imported the output SQL file ...
3
votes
1answer
41 views

PostGIS multiple conditional statement on spatial join

I want to make a multiple conditioned spatial query in PostGIS 2.0/PostgreSQL 9.3., OS Windows 7. There are 2 tables, cadastre (Polygon) and roads (Linestring). Query: Select the sum (one number) of ...
2
votes
0answers
21 views

How to load GeoJSON into PostgreSQL database using Python?

What I have tried to do is (In Python IDLE): import psycopg2 import json try: conn = psycopg2.connect("dbname='carto' user='postgres' host= localhost password='password'") except: print "I am ...
5
votes
2answers
309 views

Find start of river

How can I determine the start of a river in PostGIS? I have a river network (Multiline) and want to find the startpoints of the rivers. I can select the startpoints (rectangles in the graphic) ...
3
votes
0answers
55 views

Spatial query too slow to handle bigger OSM extracts

I'm trying to compute some statistics for OSM data using PostgreSQL 9.3.5 and PostGIS 2.1.4. I started with a small bavaria extract which I downloaded from Geofabrik. The db schema is the normal API ...
0
votes
1answer
30 views

How do I change the PostgreSQL data directory in the OpenGeo Suite 4.5?

I am using OpenGeo Suite and I would like to move the PostgreSQL databases files to a different drive than my operating system. The default location installed by OpenGeo Suite is in the ...
1
vote
1answer
41 views

QGIS 2.6 how to prevent user to drop a postgis table

Does anyone know how to prevent user to drop a postgis table? I have a vector layer imported from a postgis2.0 database, and one of my users drop it accidently. Fortunate I had a backup, but i don't ...
1
vote
1answer
19 views

Select Polygon Intersections Between Two Tables With No Common Key

I am new to geodatabase queries and cartodb. I am trying to write a SELECT query that will do the following. I have two tables. Table 1 contains congressional district polygons and info about ...
-1
votes
0answers
20 views

In need of PostgreSQL tutorial [closed]

Is it me or it's quite hard to find some tutorials to learn PostgreSQL. To me, it's really hard to find anything that has a sample database with it.
1
vote
1answer
16 views

SELECT geometry FROM spaces WHERE geometry ARE WITHIN OR OVERLAP polygons FROM OTHER table

I've got two tables, one containing LINESTRINGs and one containing POLYGONEs. I would like to select all the LINESTRINGs that are containing within the outer boundary of all the POLYGONs combined. ...
-4
votes
1answer
21 views

Make connection from Postgresql to QGIS? [closed]

I'm still new in QGIS. I want to add data from one layer to another layer in QGIS. How could I accomplish that?
-2
votes
0answers
16 views

change database from SqlServer to Postgresql [closed]

I work with GIS Server and Microsoft Sql Server database,Now I need to change my database to Postgresql.I do not know how I can do it.
1
vote
0answers
68 views

Using ArcMap 10.3 with PostgreSQL 9.3.x database and PostGIS 2.1.1?

I have a PostGIS database that we use for data storage. I would like to open this data in ArcMap instead of storing it in another format. In previous versions of ArcMap it has been possible to open ...
2
votes
4answers
73 views

Postgis don't use spacial-index with st_intersects

I imported the data from openstreetmap using osm2pgsql and copied it another table structure. If I made a query for containing rows using st_intersects, st_contain or someone else, postgis don't use ...
0
votes
0answers
21 views

Find closest points in routing network for a set of points to pick shortest route

I have the following WITH SQL Query which does select a set of filling stations along a route within the distance of 1000m. In the SQL statement I fetch 1 Point from the station and search the closest ...
0
votes
1answer
32 views

Get postal codes of a city in OSM via postgis/postgresql

So, I'm trying to get the postal codes of a city (polygon). Unfortunately, I never get consistent results with my code: SELECT a.name, b.tags->'postal_code' FROM planet_osm_polygon a JOIN ...
2
votes
1answer
30 views

am I setting up data from google geocoding correctly for ST_DWithin search?

Sorry to ask a basic question, but I have not been able to find this laid out entirely anywhere. I am mostly relying on this SO post: What Spatial Reference System do I store Google Map's Lat/Lng ...
1
vote
1answer
33 views

PostGIS returning a field one level higher in the Json

I have the following SQL on a PostGIS Database ($properties contains a list of fields, including osm_id) SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, ...
0
votes
0answers
11 views

Post and Reconcile buttons in versionig toolbar grayed out in Arcmap

I have a versioned GDB (Postgresql) and I have versions DEFAULT-> A -> B. Version A modifies two poly lines and version B modifies one of the two that is modified in version A. In ArcMap, even though ...
1
vote
1answer
52 views

How do I sum values that are geographically close to each other?

I have a dataset of Boko Harams rampage in Nigeria uploaded to CartoDB. I have columns like coordinates, dates, number of victims. Would it be possible to write a query that would sum the victims ...
0
votes
0answers
29 views

QGIS Crash: Enter Credentials

just wondering if anyone has come up against this issue...in the office QGIS will come up with an 'Enter Credentials' box with 'Error: Too many clients already'. When you enter your username and ...
1
vote
0answers
41 views

SQL query works in PostgreSQL but not in GeoServer SQL View

I can't find a solution for this problem after a couple of hours of research. The query is: SELECT searchaddress('some string'); FETCH ALL IN mycursor; The function searchaddress returns a ...
5
votes
3answers
148 views

PostGis: Geometry from UTM text

I have plain data in a postgresql table which looks like this: ╔════╦═══════╦═════════════╦══════════════╦══════════╦═════════════════╗ ║ id ║ index ║ easting ║ northing ║ utm_zone ║ ...
2
votes
1answer
57 views

ST_INTERSECT of each element of two tables (polygons, lines)

Im new to postgis and trying to solve the following problem: I have two tables: 1. containing polygons 2. containing lines I need to find out the id of all polygons on each line and fill them in new ...
0
votes
1answer
37 views

Finding lines of similar attribute with respect to nodes connected to its both Ends

I have line networks with node generated for Start and End Point . how to check if a line has correct attribute with respect to point created at its End. for instance FuID_Line = ABC_BDQ and Start ...
0
votes
0answers
31 views

Routes through centroids and array functions

I have a table stopcentroids4 like in figure with the following fields: gid, routes, geom and i want to draw a line for each route that runs through centroids. In my code there is a mistake. ...
0
votes
0answers
21 views

ST_Touches Function in Iterative Process

Im a complete newbie to postgis. I have the following problem: Got two tables: "mp_power_lines_new" -> contains lines of an electricity grid "uw.new"-> contains polygons of all substations in this ...
1
vote
2answers
35 views

How can I add extensions to PostGIS?

As newbie with PostGIS, I downloaded Postgresapp for macosx. Everything works fine, but I noticed some differences with Stackbuilder which adds to extensions address_normalizer and grouting. Can I add ...
0
votes
0answers
19 views

How to transform isolines to isopolygons with postgis?

I have a table a postgis table of isolines that's defined like this: CREATE TABLE myisolines ( gid serial NOT NULL, isotime timestamp without timezone, val numeric(10,4), geom ...
1
vote
1answer
43 views

How to create postgresql triggers to calculate geometry from x,y and vice versa at the same time

I have a postgis table with point geometry which looks like this CREATE TABLE mypoints ( gid serial NOT NULL, coordid integer, geom geometry(Point,4326) ); And a table with coordinates ...
0
votes
1answer
43 views

ST_AsGeoJSON function slow in PostGIS

I'm currently trying to pull neighborhood data from Zillow's Neighborhood page (http://www.zillow.com/howto/api/neighborhood-boundaries.htm) and then load it onto a leaflet map, openstreetmap. I ...
1
vote
0answers
38 views

how to automatically update column based on the second layer, trigger, postgreSQL

I am newbie in postgreSQL. I have 2 tables, observation and landcover, i want to create a trigger which would allowed to update the column observation.land based on the spatial information according ...
0
votes
1answer
28 views

geometries with different SRIDs errors (even after setting SRID)

I've looked at existing questions about this (including this one) and followed the advice that was shared there. I'm still seeing this when I run some queries: RuntimeError: Postgis Plugin: PSQL ...
0
votes
0answers
63 views

box2d spatial type

I'm storing data that defines a box. I created a column by adding it to my table as follows: SELECT addgeometrycolumn('grid', 'grid_geometry', 32650, 'GEOMETRY', 2); I then insert my data in using ...
1
vote
1answer
31 views

Basic sp-gist indexing?

Please forgive a very, very elementary question. I am using a PostgreSQL 9.3.5 database, and one of the tables stores longitude and latitude. (These are two separate columns.) I would like to do ...
2
votes
1answer
40 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 ...
3
votes
1answer
38 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 ...
1
vote
2answers
26 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
58 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
56 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 ...
3
votes
2answers
56 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
36 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 ...
1
vote
0answers
21 views

how Npgsql.EntityFramework support Spatial data

I am using Npgsql.EntityFramework + EntityFramework6.My database is postgresql. I Added to my C# project with this tutorial : ...
2
votes
0answers
15 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
81 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: ...