PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.

learn more… | top users | synonyms

1
vote
0answers
110 views

Why does QGIS crash when my PostGIS table has a primary key?

Configuration: PostGIS Library: 2.0.3 GEOS: 3.3.8-CAPI-1.7.8 Proj: Rel. 4.8.0, 6 March 2012 PostgreSQL 9.2.2, compiled by VC++ build 1600, 64 bit, running on Win2012 server 64 bit QGIS 2.2.0 - 32 ...
1
vote
0answers
45 views

Point in Polygon operation for 100G of data

I have lat/lon point locations for over a billion points, all based in the US. For each point I would like to generate a dataset that links them to their county and to their MSA according to US Census ...
1
vote
0answers
40 views

PostGIS automatically creating geometries after importing using QGIS DB Manager

I have a shapefile consisting of linestrings, in which some of the features have null geometry. Yet, after importing it to PostGIS, using QGIS' DB Manager, a geometry is created for those features ...
1
vote
0answers
25 views

Use pgRouting with a PaaS

Is it a way to use a postGIS/pgRouting enabled database with a PaaS like Windows Azure? If not, do you know alternatives?
1
vote
0answers
51 views

Focal Mean of neighbors using ST_DWithin on points in PostGIS

I'm trying to calculate focal means on a grid of points in PostGIS. I know that a raster calculation would be more efficient, but I only need to run the algorithm once to get the data, so I don't ...
1
vote
0answers
38 views

PostGIS 3D Extrude function

I selected buildings from OSM (which represents my city). I insterted a new column 'height' and I filled with a random number exactly number 2, so every building have 2metres altitude. Buildings are ...
1
vote
0answers
18 views

How to simplify a polygon down to X amount of points?

If I have a polygon that has 100000 points, how can I calculate what the tolerance should be to simplify it down to 1000 points using ST_SimplifyPreserveTopology?
1
vote
0answers
40 views

qGIS' Database Manager “Load as New Layer” Option Not Working

I'm trying to visualize some of my database queries on qGIS. I run a valid SQL query which returns a subset of my table that should be easily loaded as a layer. I then check "Load as new layer," ...
1
vote
0answers
31 views

Problem installing Aggregate Polygons Function in PostgreSQL 9.3

I'm new to PostgreSQL and I've been trying to run a sql function written by Dr. Horst Duester, found in http://www.kappasys.ch/cms/index.php?id=65&L=5, which is used to aggregate detached ...
1
vote
0answers
65 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 ...
1
vote
0answers
22 views

ST_SplitRight() in PostGIS?

I am looking to split a shapefile via a line. I am interested only in the feature that lies to the right of the line; exactly what ST_SplitRight does here. Do any of you know of a way to do this in ...
1
vote
0answers
56 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 ...
1
vote
0answers
94 views

Broken PostGIS support GDAL

I'm having some problems with Postgres/PostGIS after rebuilding my GDAL library:( I wanted to add MrSID support in GDAL so rebuilt it with the MrSID SDK. Everything compiled ok and I am now able to ...
1
vote
0answers
42 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 ...
1
vote
0answers
31 views

How to SELECT one day's scene (Landsat 8 scenes)

I have a huge dataset of raster in PostGIS. Each scene is divided into tiles (tile-size 500x500). I was trying to SELECT rast FROM landsat8 WHERE ST_Intersects(rast, polygon). It runs very slow, ...
1
vote
0answers
221 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 ...
1
vote
0answers
78 views

PyQGIS Dialog Plugin not resetting

I have written a PostGIS search plugin that works pretty well, except two things that I just cannot figure out a solution 1) When the dialog closes and then is reopened the previous query is still in ...
1
vote
0answers
123 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 ...
1
vote
0answers
90 views

django---error in displaying data and displaying it on the map

. i am trying to display a feature queried from postgis. . i also designed a user input field to enter the id of the desired feature to be displayed. . i have already queried the attributes first ...
1
vote
0answers
18 views

Forcing Hash Join Query Plans using PostGIS

I'm currently testing PostGIS 2.0 in a Greenplum Appliance (Postgres 8.2 based) and have hit an incompatibility between PostGIS and the MPP Greenplum environment. The basic query below can't be ...
1
vote
0answers
60 views

How can I edit spatial data automatically on postgis and check for topology errors on said data whitout using shapefiles?

So, I have spatial data stored in postgis (points, lines and polygons) and would like to edit and update those in an Open Source software (quantum GIS, grass, etc.) to check for topologic errors, ...
1
vote
0answers
108 views

PostGIS: How to distinguish overlapping routes (i.e., LineStrings) based on their direction?

I have a set of routes which are represented by LineStrings in my PostGIS database. These routes represent journeys that people make. I want to come up with routes that (a) overlap, and (b) have the ...
1
vote
0answers
84 views

Fastest way to add shapely geometries to a PostGis database using geoalchemy2

I am looking for the absolute fastest approach to adding +10,000 shapely geometry objects to a PostGIS database using geoalchemy2. I'm having no speed issues when uploading to a localhost postgres ...
1
vote
0answers
49 views

PostGIS replace view crashes PostgreSQL server from ArcGIS script

I have the following script which when from ArcGIS (and a similar script from a QGIS plugin) will update a view. Every so often (around 1 in 5 times the script is run) it causes the PostgreSQL ...
1
vote
0answers
41 views

How can I obtain the unit of a projection SRID?

Given a projection SRID, is there a way I can obtain the coordinates unit string (meter, degree, ...) ? In PostGIS for example, it looks like it is present in the srtext column of spatial_ref_sys. ...
1
vote
0answers
139 views

How to create a regular polygon grid in Openlayers?

I am trying to create a grid in my map and do some calculations. I seen the following links:- Create regular polygon grid using postgis Create regular polygon grid inside a polygon using postgis ...
1
vote
0answers
91 views

Traversing all possible road routes

I have created a topology from OSM data and would like to simulate a car driving every possible route along the map. The purpose is to "survey" the osm data as if in a car. My ultimate objective is to ...
1
vote
0answers
49 views

How to get intersected points between polygon and line in desired order

I have polygon for example "POLYGON((5 1, 6 1, 6 5, 5 5, 5 1))" that I want to intersect with line "LINESTRING(0 2, 10 2, 10 3, 0 3, 0 4, 10 4)" and get intersection points in the order that they ...
1
vote
0answers
211 views

pgrouting php problem “pg_fetch_result(): Unable to jump to row 0 on PostgreSQL result index 3”

I'm trying to build a simple routing web-app using pgrouting, followed some tutorial and the latest workshop. Because I'm using PostgreSQL 9.3(x64), Postgis 2.1.1, and pgrouting 2.0 so I did some ...
1
vote
0answers
38 views

PostGIS layer attribute table empty in Quantum 2.0.1

I recently installed QGIS 2.0.1 (Dufour) on a Windows 7 PC (64-bit). Today I tried, for the first time since Dufour was installed, to load PostGIS layers into QGIS. I successfully set up a connection ...
1
vote
0answers
102 views

Finding the Closest Points using ST_ClosestPoint() for MULTIPOLYGON

I am working to match between the closest points of two tables. I have two tables: Building, SchoolBuilding. Building Table: Contains Polygones, SchoolBuilding Table: contains Points (From ...
1
vote
0answers
37 views

Create a single line from a resultset of line segments

How can I create a single line using the line segments geometry found in each row in resultset? I followed this tutorial: http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ I ...
1
vote
0answers
96 views

Need to enhance a function for creating quadrants within polygons

I wrote a function that creates arbitrary quadrants within a polygon SELECT (quadrant(20,0.0,90)).* The first parameter is the polygon ID, the second one is the start angle and with the third one ...
1
vote
0answers
66 views

Trajectory Indexing: How could I store and index the large trajectory dataset generated by cars' GPS?

I have a large trajectory dataset generated by cars' GPS. Since I will do some data mining work on them, I need an efficient way to store and index them. I read some papers about Trajectory Indexing ...
1
vote
0answers
330 views

Creating a spatial database using EXTENSIONS: error loading legacy.sql

I am using Postgres 9.3 and PostGIS 2.1, installed in a Docker container via RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list RUN apt-get -y ...
1
vote
0answers
93 views

PostGIS Raster: raster2pgsql was not found in /usr/lib/postgresql/9.3/bin

I have installed sucessfully Postgresql-9.3-postgis on Ubuntu 12.04, following this instructions: http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21UbuntuPGSQL93Apt Having done that, I have ...
1
vote
0answers
106 views

Complexity of A-star algorithm using pgRouting in a graph

I'm using the A-star algorithm in pgRouting. It uses the Manhattan distance as a heuristics ((|dx|+|dy|)/2). What would be the time complexity in a standard route network? Based on Why is the ...
1
vote
0answers
138 views

Write Nominatim-like geocode query using only PostGIS functions?

I'm new to PostGIS and was anticipating being able to write geocode queries using only the functions provided by PostGIS. However, once I loaded my database using osm2pgsql and discovered tables like ...
1
vote
0answers
118 views

identify subgraphs within planet_osm_line table

I want to identify subgraphs within the planet_osm_line table of the osm2pgsql-schema. those subgraphs are classified by certain tags i want to check. My first attempt was to do this recursively with ...
1
vote
0answers
126 views

pgRouting results to LINESTRING geometry type

I am doing some routing queries, using pgRouting's second version of pgr_trsp function. What I can't do effectively yet is storing the results. That is, I want to able to store in a table: either ...
1
vote
0answers
99 views

Merging contour lines along tile boundaries

I am working with the CANVEC data set. The data in canvec is broken up in to mapsheets. eg. 116B04. I have data covering the entire province of the Yukon. I have merged all the data in to one ...
1
vote
0answers
86 views

Upgrading Postgres database to Postgis 2.1.1

I executed the postgres 9.1.6 with Postgis 1.5.8 dump from a remote server on Linux pg_dump -h localhost -p 5432 -U postgres -Fc -b -v -f "/somepath/tumidb9.1geom1.5.8.backup" tumidb9 So I have a ...
1
vote
0answers
56 views

Problems with versioning

I have 5 PostgreSQL_PostGIS database in my company and i conneting on them through ArcSDE. Four of database work correctly, only with one i have i realy big problem. When i make two versions of ...
1
vote
0answers
391 views

Failure to Access DBMS Server Error - ArcGIS/Postgres

If connected to an SDE enabled Postgres database via ArcGIS (10.1) for a long period of time, maybe an hour +, I will often receive an error from ArcGIS stating "Failure to access the DBMS Server[my ...
1
vote
0answers
64 views

How to get from GeoServer a KML of the external boundary of several areas

I have a GeoServer with PostGis database. PostGis database has a table with small geographic areas (English LSOAs and output areas, to be precise), with codes and shapes. I want to submit to ...
1
vote
0answers
46 views

Selecting a rectangle box from a raster tiled table in PostGis 2.1

I am new to PostGIS as well as SQL queries for rasters. I have imported a raster .tif file into PostGIS with tiles. I would need to select a bounded rectangle from within this raster using SQL ...
1
vote
0answers
103 views

SQL procedure(s) to convert GPS traces to an ordered set of junctions in a network

I have three datasets that I have loaded into a geodatabase (spatialite or PostGIS): A set of GPS points collected from individual trips through urban areas. Points have a unique point id, a group ...
1
vote
0answers
166 views

Smoothing Lines in PostGIS

I want to smooth Lines in postgis, to be more specific, I want to smooth road data from OpenStreetMap. Basicly I thought of something like this scenario. This would be a possible road segment. I ...
1
vote
0answers
44 views

Upgrade Postgres/Postgis

I have Postgres 8.4 and postgis 1.5.3 installed on centos6. Now I need to upgrade both to postgres 9.x and postgis 2.x. Is there somewhere a good tutorial how to upgrade without removing the old ...
1
vote
0answers
290 views

Using PostGIS with Postgres.app (9.3)

I'm trying to run CREATE EXTENSION postgis; on a fresh 9.3 Postgres.app install. I get this as a return: ERROR: cannot change return type of existing function HINT: Use DROP FUNCTION ...