PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
1answer
56 views

how to run a PostgreSQL query on CartoDB tables?

I want to run a VACUUM FULL on my table, but I don't think it's working. Simply sandorl.cartodb.com/api/v2/sql?q=VACUUM&api_key={MYKEY} results in long output, apparently only repeating for ...
0
votes
1answer
462 views

How to save results of postgresql to csv/excel file using psycopg2?

I use driving_distance in postgresql to find distances between all nodes, and here's my python script in pyscripter, import sys #set up psycopg2 environment import psycopg2 #driving_distance module ...
1
vote
0answers
61 views

Geoserver WFS Fails to Load in OpenLayers

I'm working with Postgis->Geoserver->openlayers on localhost. I followed a Geoserver tutorial to import some nyc sample data into my postgres/postgis database and link it to Geoserver. The layer ...
0
votes
0answers
47 views

PostGIS: calculate width/length of rectangular surface

I have rectangular shaped surfaces (multipolylines) and I need to calculate the width and/or length.. they have a rectangular shape but they're not real rectangles. Is there a way to do this ?
0
votes
1answer
140 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 = """ ...
2
votes
1answer
125 views

System requirement specification for Big Data Postgesql, PostGIS, and GeoServer based service

I want to start a GIS portal for around 3000-5000 visitors per day. MY database will be of an approximate size of 10 Terrabytes. The maps and layers are moderately complex, satellite-map overlay is ...
1
vote
1answer
203 views

How to execute sql lines in postgresql using python?

I use postgresql 8.4 to route a river network, the following is my code typed in pgAdmin and the result is fine, select * from driving_distance ('select gid as id, start_id::int4 as source, ...
0
votes
1answer
48 views

Increase Map Availability in Geoserver [duplicate]

I have an application which access same map from two geoserver using loadbalancing concept the map is accessed using WMS service. where the two geoserver connected to a single same POSTGIS database. ...
0
votes
0answers
29 views

Double version of PostGIS installed on my server

For some reason I messed up an installation of Postgis on my PostgreSQL 9.2.8 server. I had version 2.0.3 installed and when I tried to upgrade to 2.1 it did so. The problem comes when I dump the ...
0
votes
0answers
137 views

PostGIS 2.1 error install with shared object (rtpostgis-2.1.so") Linux Mint

I've Installed Linux Mint 16 mate and install PostGIS with PostGreSQL (I've tried many ways in the Internet from original source to some suggestion) but all is too error: " ERROR: could not load ...
2
votes
1answer
86 views

POSTGIS: function st_collect(geography) does not exist

I am trying to use some Geography functions, but I am getting an error that (all) functions are not existing. I have checked other Stackexchange posts (e.g. this one), but the solutions did not work ...
2
votes
1answer
55 views

Inserting union of two tables into another table Postgresql

I am working on a research project. I have two tables, one of a polygon that represents a severe weather risk area, one that represents the US. I want to merge them into one output polygon. I am stuck ...
2
votes
2answers
56 views

Change from polygon to multipolygon in postgres

can somebody describe please how to do the transformation from polygon to multipolygon in the postgres DB, is not possible for me to save my edited data. All data loaded just need to do some editing ...
1
vote
1answer
29 views

Does the psql prompt have a working directory in the file system?

I am learning postgis. This tutorial says "Navigate to where you downloaded the shapefile." Does that mean navigate to this location in the #psql prompt or navigate to this location with the $propmt? ...
1
vote
1answer
41 views

PostgreSQL : question about SELECT .. WHERE .. = max()

If you have, for example; SELECT * FROM data WHERE line = min( (SELECT length FROM lines) ) AND number < 500; (It's just an example, not a real code) How does PostgreSQL react when the ...
2
votes
0answers
31 views

PostgreSQL : Question about dropping tables inside funtions

I am writing a PostgreSQL code where I have a function wich is used multiple times in a single query with different input values. Inside the function I create some tables and use them. What is the ...
0
votes
0answers
113 views

Problems moving POSTGIS database from postgresql 8.3 to 9.3 using Navicat

I am using Navicat 11 to move a POSTGIS database from 8.3 to 9.3 on Mac OS X 10.9. I have installed PostgreSQL 9.3 and PostGIS with homebrew (brew install postgresql postgis) and everything looks ok. ...
1
vote
1answer
105 views

PostGIS Type Modifier Error

I'm trying to work an example from the "PostGIS Cookbook" and I'm getting an error I don't understand. I'm running the example using Postgres.app on a MacBook. Postgres.app is running PostgreSQL ...
0
votes
0answers
32 views

PostGIS : check if 2 lines are at contrary sides of third line

I am looking for a workflow to select a line on the condition that it is located on the contrary side of a middle line. So there are 3 lines (2 are given, 1 I want to select). I don't need you guys ...
4
votes
2answers
141 views

How to speed up a query for nearest linestring to point data

I have processed a Strahler stream order layer with a lot of river linestrings (type: Multilinestring) and their corresponding strahler number (see information here). Besides I have a point layer. I ...
1
vote
0answers
51 views

Do ArcGIS clients that direct-connect to postgresql/postgis databases override configuration settings?

I went in to modify some settings on a Postgresql database via the PGAdmin config editor and some of the settings don't have their default values and they are higher because they've been overridden ...
2
votes
1answer
97 views

PostGIS : I want to use ST_OffsetCurve with MultiLineStrings

I need to use the function ST_OffsetCurve for a multilinestring, but PostgreSQL gives me the error that the function is only for Linestrings. Is there a way arround? I want to use the function ...
1
vote
1answer
77 views

CartoDb - Aggregate and Infowindow

I'd like to use CartoDb to map historic addresses of a city (link to demo). Individual addresses are mapped as points on the map. Detailed information for each address point should be displayed in the ...
4
votes
2answers
93 views

pgAdmin vs psql

I have downloaded postgreSQl 9.3 and Postgis 2.1 recently as an educational adventure and have been working with both through the pgAdminIII interface. I haven't used psql yet when working with my ...
1
vote
1answer
75 views

Update postgres/postgis point data attribute from another enclosed polygon shapefile in QGIS

I have a placename point table in postgis with 'district' column. a districts polygon shapefile with district name in 'Name' column. See the image below. I would like to update the 'district' ...
0
votes
2answers
157 views

GeoServer create layer from PostGIS (data type point)

(Several days ago a user on gis stackexchange suggest that I should use OpenGeo (I was using geojson before). I succeed at what I was doing at that time, but now I have a different problem.) I was ...
1
vote
2answers
68 views

Is it possible to run a spatial query in QGIS 2.0 across multiple layers using a user-specified radius from a point?

I would like to be able to click on a point on a map to select all vector features (from multiple layers) within a specified radius of the point. Can anyone point me in the direction of how to do this ...
1
vote
0answers
40 views

How to define Z dimension on table with PostGIS for import in TileMill?

I'm trying to reproduce the idea behind this blogpost from Mapbox, but with other data, for example the ne_10m_populated_places_simple dataset from Natural Earth. By adding a z-dimension to the data ...
2
votes
1answer
65 views

Length of a line within a surface

I need to find out the lengt of each line within a surface. I have approx. 20'000 diferent lines and around 10'000 different surfaces. what kind of SQL-sentences do I need to use? I've tried things ...
2
votes
1answer
42 views

ST_ZMax() does not exist in PostGIS

I'm trying to follow this example on Mapbox blog, about using 3D shapes in PostGIS. The database-query is this: DROP TABLE tilemill_buildings; CREATE TABLE tilemill_buildings AS SELECT ogc_fid, ...
3
votes
1answer
134 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 ...
1
vote
0answers
206 views

QGIS loads PostGIS layers but DBManager can't connect

DB Manager can't connect to PostgreSQL, but "Add PostGIS Layer" can. My eventual goal is to save created layers to PostGIS. I assume I can do this using the DBManager Tool. I can alternatively use ...
2
votes
1answer
83 views

PostgreSQL : total length of roads in polygon

I have 2 tables : wgo (lines) and wbn (polygons) With this code, I can display the length of each road inside a polygon. If I have a polygon with 2 roads in it, as a result I get 2 rows with the 2 ...
2
votes
1answer
167 views

PostgreSQL : finding all lines intersecting with a polygon

I am totally new in the world of GIS but as a student surveyor I am working on a project using postgreSQL and PostGIS. I have one database with all the roads of my country (lines), and one database ...
2
votes
2answers
177 views

Postgres Log Error

I am using Geoserver + GeoWebCache + Postgres for an application. On the application side there is no bugs but on postgres I am getting this log. Please explain and help me to solve this ...
0
votes
0answers
57 views

pgrouting shortestpathfromAtoB multiple pairs

I've got to solve a shortest path problem between multiple location pairs. E.g.: A to B C to D E to F etc. These pairs are stored in a table routing_basis like hkey; A; a.lat; a.lon; B; b.lat; b.lon ...
1
vote
0answers
116 views

How do I catch PostGIS/PostgreSQL RAISE messages in QGIS?

I have a trigger set up in PostGIS/PostgreSQL which will show a RAISE WARNING when an inserted or updated polygon is within a certain distance of some predefined planning constraints. I want this ...
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 ...
1
vote
1answer
78 views

PostGIS ST_Within returns zero data

I am using PostgreSQL 9.3.3 & PostGIS 2.1.1 and I have a table Entries which has a column called "latlng" of geographic type (this column stores entry's latitude and longitude coordinates). I am ...
0
votes
3answers
177 views

Faster routing algorithm on pgrouting [duplicate]

I have downloaded data for india as a dbf file then converted it using osm2po to make it routable but the problem is when i make any routing query it takes a lot of time around 300 seconds and these ...
2
votes
2answers
79 views

how to Find n nearest lines for the given points from a collection of lines?

I have two tables, points and lines. For each point in point table, I want to find out nearest 3 points in the nearest 3 cables. I almost developed a query, but it is best suitable for single point, ...
2
votes
1answer
200 views

Postgresql table won't display in QGIS 2.2

I just downloaded QGIS 2.2 to check it out and now one (just the one) of the tables from one of my PostgreSQL database won't display. It loads just fine in 2.0. The records are all there (there's ...
0
votes
0answers
40 views

Speed drastically reduced when including geometry, is there a way to improve?

-- EDIT: Issue is that the shape files being used are at too small of a precision and way too large, output was 488M total, looking for different source -- I'm having some speed issues with a complex ...
7
votes
1answer
150 views

Replacing a corporate GIS [closed]

I'm looking at replacing our corporate GIS, this is the first time that I have had the responsibility of such a task despite my years of experience with the software as an end user. We will be ...
2
votes
2answers
58 views

self intersecting polygon SQl

I am trying to write a sql to query one land parcel for intersections between itself. I can do this fairly easy in QGIS using topology checker but i don’t know why this does not produce the correct ...
1
vote
1answer
85 views

Monitoring Geoserver for Production Environment

Is there any opensource server monitoring is available for Geoserver ? Like watchdog and nagios? Suppose if geoserver is stopped working whether mapmeter will automatically start it..Like the ...
0
votes
0answers
18 views

Postgres self self intersecting polygons and error

I have a land parcel which has self intersecting polygons and I am trying to create a view to select all the distinct polygons but sql query does not generate correct results. The polygon has 500 ...
1
vote
1answer
56 views

How to make osm2pgsql import a tag?

I loaded OSM data into PostgeSQL with Osmosis&Osm2PgSQL, and see many tags are missing. I need to make it import lanes tag. How can I make it save this tag too? edit: my solution was to copy ...
1
vote
1answer
60 views

Problem with runing a loop in a query in PostGIS

I am new to PostGIS and I have a question which can't solve. I have a table of buildings each having a value for number of people living in it. I would like to calculate the total value (sum of number ...
1
vote
1answer
100 views

Problem with nested query in PhP and PostGIS

I have a simple problem regarding a nested query. I would like to select all buildings in a given circular buffer and create a kml file of those selected objects. The following query does the job very ...