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

learn more… | top users | synonyms

1
vote
1answer
289 views

Building orientation and simplification using Opencarto Java library

I need to find out orientation of buildings and perform simplification of sides of buildings with a tolerance. I came to know from StackExchange that OpenCarto has useful libraries for geometrical ...
3
votes
2answers
526 views

Updating Apps on OpenGEO suite Community Edition

I would like to update PostgreSQL and PostGIS on Opengeo CE to a newer version, maybe the other apps too (geoserver, openlayers, etc). Can it be done? Can someone point me the right direction? ...
5
votes
3answers
1k views

How can I display with OpenLayers the geometry returned from a ST_Buffer in POSTGIS?

Im using PostGIS, GeoServer and OpenLayers, and the thing is that i want to display the geometry result from a query like this: SELECT ST_Buffer(ST_GeomFromText('POINT(100 100)'), 500); To perform ...
4
votes
1answer
219 views

PostGIS Query: All rows within 1 hour of each other which intersect

I'm using postgres (postgis) and i want to perform a query that returns all rows which geometries intersect and have a timestamp within 1 hour from each other. What would the SQL statement look like? ...
3
votes
2answers
525 views

PostGIS + pgRouting: Adding dummy links to a road network and performing routing analysis

I'm a beginner when it comes to postgis and pgrouting development. For a project I'm working on and a bit of the algorithm: I have a polygon layer that represents zones I have a line layer that ...
17
votes
3answers
4k views

In PostGIS is it possible to create a View with a unique ID?

When I create a view in PostGIS is there any way to add a unique ID to that view? Just like the "gid" field in any other PostGIS table? Edit: Sorry I should have included this in the original post. I ...
2
votes
1answer
106 views

Temporary additions to OSM data

I'm planning on building a transportation related GIS App. In the app, users will be allowed to add their own links to the network. For example, let's say a user wants to add a "driveway" in front of ...
7
votes
2answers
3k views

PostGIS: Find points that lie within a set of coordinates

I have a PostGIS db, and I want to find the points that lie within some region (a bounding box). I have two sets of coordinates, from which I can get all four rectangle points that form the box (if ...
2
votes
1answer
807 views

How to extract data from a POINT column in PostGIS using JAVA (jdbc)

How do you get a value from a column which has a point data type. I've just switched over from MySQL to PostGIS. I have a column which is called point and is of type Point. I want to get that value ...
5
votes
1answer
920 views

How to draw or edit curved lines in free GIS?

I'm searching informations about drawing simple curved arrow lines into free GIS like QGIS, in this problem data geometry is CIRCULARSTRING ( a type which exists in latest postgis version) It seems ...
5
votes
1answer
4k views

qgis to local postgis connection - fails

It seems pretty clear I cannot connect to a local postgresql installation out of QGIS. This is my first experience with PostGIS. I am using PostgreSQL 9.0 on a win7 machine. I can see the successful ...
11
votes
3answers
2k views

Optimizing a nearest neighbor calculation using PostGIS

I'm using PostGIS to calculate the nearest neighbors of polygons. What I want to calculate is the minimum distance from each polygon, to the nearest polygon. Thus far I have got great help from Mike ...
6
votes
1answer
1k views

Nearest Neighbor calculation in PostGIS

I'm learning how to use PostGIS and spatial databases for analysis. What I am trying to do is perform a calculation to get the distance for the nearest polygon in a file, using the edge calculation, ...
6
votes
2answers
752 views

How do you calculate lat/lons from a PostGIS table which has a projected coordinate system?

I have a PostGIS table in a projected coordinate system (EPSG: 28355 or MGA94 Zone55). In QGIS (with the PostGIS manager plugin) I calculate a coordinate by performing the following SQL "UPDATE ...
19
votes
3answers
3k views

Meaning of Simplify's tolerance parameter

The standard parameters of Douglas-Peucker's simplify algorithm are geometry and tolerance (e.g ST_Simplify in PostGIS). What's the meaning of the tolerance parameter? I know that the bigger the ...
2
votes
5answers
4k views

Error importing Shapefile to PostGIS using Importer GUI

I'm trying to import a shapefile into a PostGIS database using the graphical importer. I just installed POSTGRESQL, and PostGIS. The GUI looks like this: After testing that my database worked, I ...
2
votes
1answer
255 views

Mapscript - PostGis Error

I'm doing a spatial query, but I always get an error: "msPOSTGISLayerGetShape(): Query error. msPOSTGISLayerGetShape called on unopened layer (layerinfo = NULL)" This is my code: layerObj ...
2
votes
1answer
109 views

Access points with PostGIS

I have a PostGIS table with linestring geometries and point (A) on it and I need to detrimine points (M) which located M meters from A. Distance is measured along linestrings. Any thoughts?
12
votes
3answers
1k views

Future of spatial databases

It may be a bit off-topic. I am eager to know the industry specific importance of Spatial Databases. Is Spatial Database a very important part of any GIS system? Or will we use other technologies to ...
6
votes
1answer
809 views

Intersection of multiple layers in PostGIS

I need to write PL/pgSQL stored procedure for calculation of intersection of multiple layers. For example, for three layers A, B, C this function should return ABC geometry: Function takes as input ...
1
vote
0answers
419 views

PostGIS installation error [closed]

Try to install PostGIS 2.0 from svn in Ubuntu 11.04. After running postgis.sql file I get an error: ERROR: could not load library "/usr/lib/postgresql/9.0/lib/postgis-2.0.so": ...
2
votes
1answer
343 views

How to create source and target ID columns for a linestring table in PostGIS?

I have table paths_3D which has column "the_geom". I need to create a new column source_id which will have starting points from the geom. This statement doesn't work: ALTER TABLE paths_3d ADD COLUMN ...
6
votes
2answers
1k views

Difference between two layers in PostGIS

What is the right way to calculate the difference between two layers? I tried to use the following approach: SELECT ST_Difference(river.geom, lakes.geom) FROM river LEFT JOIN lakes ON ...
41
votes
4answers
11k views

Spatial clustering with PostGIS

I'm looking for spatial clustering algorithm for using it within PostGIS-enabled database for point features. I'm going to write plpgsql function that takes distance between points within the same ...
8
votes
1answer
698 views

ST_ClosestPoint(line, point) does not intersect line

In my PostGIS database (PostGIS 1.5 on Postgres 8.4.1), I have two tables: roads (composed of linestrings) and crashes (composed of points). I've been trying to correlate each crash to a road, but I'm ...
5
votes
3answers
969 views

How to add column length in a pgRouting PostGIS database?

I have 50 3d linestrings in postgis database, and I need to add column length so I could use pgRouting for calculating shortest path with Dijkstra. How can I add it?
13
votes
2answers
1k views

Mixing geometry types in one PostGIS table

I've faced with the following problem. I have to migrate from Oracle database to PostgreSQL+PostGIS. Currently all geometries of all types are stored in one table and each record contains "lid" field ...
6
votes
1answer
538 views

demo maps for training pgRouting

I'm very new to postgis and pgRouting but I'm using it for my thesys. I need any map to train my self with routing and TSP problems in pgRouting, but on the Internet I found unworking links only! Can ...
5
votes
2answers
385 views

Selecting POIs around specific buildings using PostGIS

The problem: I need to select, for each residential building in my table that has say at least 2 pharmacies and 2 education centers within a radius of 1km, all POIs (pharmacies, comercial centres, ...
2
votes
0answers
229 views

How can I create a parallel lines in a MULTILINESTRING table using Postgis? [duplicate]

Possible Duplicate: How to create one-sided buffers or parallel lines in PostGIS? I need to make parallel lines on a MULTILINESTRING table, similar to st_buffer, but that the result come be ...
3
votes
1answer
2k views

Casting a Geography type in PostGIS

I have the following table defined, which uses PostGIS geography. CREATE TABLE test_geog ( id SERIAL PRIMARY KEY, boundary GEOGRAPHY(Polygon) ); I added the following test polygon to the ...
9
votes
1answer
152 views

How to get the contributors on Open Street Map

I have put my osm file in base thanks to osm2pgsql and I am looking a way to get the contributor list. I have searched in my database and haven't found so much... and the osm wiki about the osm2pgsql ...
7
votes
1answer
1k views

Help with PostGIS polygon geometry - non-closed rings

I've picked up a copy of the super-wicked book 'Python Geospatial Development' by Erik Westra (Amazon link), and I'm working through it. Currently, it's teaching me to load GSHHS coastline data from a ...
0
votes
2answers
1k views

QGis import partial PostGIS layer using query builder

I'm sorry, but I'm terribly new to the GIS scene (and PostGIS & QGis). I have loaded a whole bunch of OpenStreetMap data into a PostGIS database and successfully drawn a map using Mapnik. Now I ...
7
votes
2answers
4k views

Search functionality in Openlayers/Geoserver

I am using Openlayers,Geoserver & Postgis.... My postgis tables are having columns as id, name, POINT/POLYGON/LINE. Each table corresponds to a layer that I am showing in layerswitcher in OL. I ...
3
votes
2answers
475 views

pgRouting: Is it possible to do multiple (concurrent) Dijkstra/A*/A_shooting_star queries at a time?

Disclaimer: the author of the question is a novice in PostgreSQL and pgRouting. As I understand doing a shortest path query in pgRouting is a complicated SELECT underneath. And as I know unlike any ...
4
votes
1answer
329 views

Sort by geometry using INHERITS?

hope everyone's doing well. I have a statewide point data set (parent table: 600K rows, 500 columns) I need to analyze at multiple scales based on several different spatial divisions. I'll also need ...
2
votes
1answer
384 views

geoserver-cURL-REST error

when I try to create a workspace/layer/store following http://docs.geoserver.org/stable/en/user/restconfig/rest-config-examples/rest-config-examples-curl.html I am getting "System cannot find the file ...
0
votes
1answer
541 views

PHP script for publishing a layer

I want to publish a layer automatically in geoserver. Each layer is a database table in postgis db. I can see the table in geoserver store(already contains some layer tables of that particular db) as ...
13
votes
3answers
1k views

Visualization of 3D shapefiles with Mapserver and Postgis

I'm wondering is there a way to visualize 3d data with mapserver? 3D .shp files are in postgis database, and I already connected mapserver to database, but with simple layer in mapfile.
2
votes
1answer
524 views

Order for inserting data into postgis

I am using postgis for my project along with geoserver and openlayers. I give user an html form with drop down menu list of available layers(each layer corresponds to a table in db).The user can ...
2
votes
2answers
547 views

Error when displaying .shp from postgis with mapserver

I have postgis database with lines in .shp format in 3D. I made connection in map file: LAYER NAME paths_3D CONNECTIONTYPE POSTGIS CONNECTION "host=www.*****.com port=5433 dbname=mountain ...
2
votes
3answers
1k views

How to insert data into postgis database with phpPgAdmin?

I have 50 line objects in .shp format in folder on my computer. I need to insert it to postgis database on the distant server.. When I log in in phpPgAdmin, it says it runs on localhost:5433. What is ...
2
votes
2answers
236 views

Displaying circle with a center

I am very much fine with creating a circle in Geoserver using st_buffer to create a view by providing latitude, longitude and radius values. It creates only a circle but without center. But I want to ...
2
votes
2answers
1k views

Automating Geoserver & OpenLayers setup

I'm using OpenLayers, Geoserver, and PostGIS. For now, everything is fine and happy. I have 2 layers showing on my map through WMS from geoserver. I am taking following steps: Step 1: inserting data ...
2
votes
1answer
326 views

SLD for layers present in a table in DB

My layers are present in postgis db which are being served to openlayers JS through geoserver. I have my layers corresponding to polygons,lines etc. whose attributes are stored in the same table ...
4
votes
2answers
662 views

Indian Latitude Longitude values

I am in need of around 10000 and odd Indian latitude and longitude values for my openlayers project. I have to load them in a postgis db. so a sql file or atleast text file would be better than a ...
8
votes
2answers
343 views

PostGIS- GROUP BY for continuous data values?

In the sample code for the PostGIS ST_ConvexHull function, multiple polygons would be created based upon different, discrete values found in the field "disease_type". --Get estimate of infected area ...
5
votes
2answers
2k views

How to get multiple shortest paths with PgRouting in one query?

I want to run shortest path algorithm on multiple source&target pairs at once and get a result as a table and process it then. How do I do this? This query does not work: SELECT a.source, ...
4
votes
3answers
871 views

Create circles using a formula

I am doing a project for a telecom company. I have to render circles on the map(assuming the center of the circle as tower and circle as the area covered by that signal), I am using base layers as ...