Tagged Questions

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

learn more… | top users | synonyms

2
votes
1answer
110 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
830 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
422 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
346 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 ...
42
votes
4answers
12k 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
716 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
977 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
541 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
387 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
153 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
477 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
334 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
386 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
547 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
531 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
559 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
237 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
331 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
672 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
347 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
880 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 ...
18
votes
7answers
2k views

Spatial databases learning resources for newbies

Would be taking up a course on spatial databases next semester. Would anybody know a newbie friendly introductory resource? A vendor neutral one would be preferable. Thanks.
15
votes
4answers
4k views

How to create a circle in PostGIS?

I'm using PostGIS 1.5.2, with geometries in SRID:900913. I need create a circles using a list of points as centre, with a radius of 600 kilometers. I'm using this query: INSERT INTO circles (geom) ( ...
7
votes
1answer
944 views

Should I split MultiPolygons into Polygons?

In the system I'm implementing I have a table T1 with an associated geometry. Most of the geometries are a set of n polygons, with 10 < n < 100. At the moment in the table T1 I have a geometry ...
37
votes
7answers
4k views

Best practices for PostGIS production environments?

What PostGIS documentation have you come across that has been helpful when tuning PostGIS for a production environment? I would like to get together with my DBA to setup a Postgresql/PostGIS ...
6
votes
1answer
717 views

Creating columns in PostGIS using osm2pgsql hstore tags

While I feel this may come down to a database question, it feels GIS-related enough that I feel comfortable posting it here. I'll be happy to take it elsewhere if it belongs there, though! I've ...
5
votes
1answer
767 views

How to insert 3d line into postgis database?

I have 3D line which I exported from GRASS in .shp format. When I try to insert this line to Postgis database with QuantumGIS, it gives an error: ERROR: Invalid type name - valid ones are: ...
6
votes
1answer
2k views

How to measure length of line accurately?

In postgis 1.5 for the below given query the answer is 1540651.62674101 meters , SELECT ST_Length(ST_GeomFromText('LINESTRING(77.83042478941326 9.98463896136159,78.03469506809812 23.90398909552571 ...
6
votes
1answer
2k views

Find nearest POI of given GPS coordinates

I am new to GIS and need to achieve the following: Find the nearest train station or bus stop of given GPS coordinates in a Java application. Since there are many coordinates to be checked, an ...
1
vote
1answer
1k views

How to make MapInfo able to edit geographic data from PostGIS?

I'm using MapInfo 10.5 to read geographic data from PostGIS 1.5.2. After a pg_dump/pg_restore to another PostGIS-database on another server I'm trying the same via a VPN-tunnel. When I open a table I ...
7
votes
1answer
344 views

Assign Z value to start & end of PostGIS line

I have a line table in my PostGIS database and a table with invert levels for the start and end of each line. My goal is to create create 3D lines in my table, from my invert data. I know I can use ...
7
votes
1answer
1k views

What are the advantages of pgSQL+PostGIS+pgRouting over a simple MySQL+handwritten routing algorithms?

Goal: To have a routable set of roads in a database and to have a software that can calculate the shortest path (e.g. simple Dijkstra) through this set in a reasonable amount of time (up to 2 ...
12
votes
3answers
704 views

PgRouting - How to clip links when reaching max costs?

I have a polyline shapefile representing a road network and a second shapefile containing points. I would like to use PostGIS (presumably PgRouting) to identify sub-networks or service areas radiating ...
29
votes
3answers
10k views

Best GIS system for high performance web application - PostGIS vs MongoDB

I am working on a web/mobile application based on location data. Since i am already familiar with MongoDB, i found the geospatial indexing of mongo is quite suitable for my needs. As i am mainly ...
10
votes
3answers
1k views

How to interpolate GPS Positions in PostGIS

I have a PostGIS table of GPS positions for every five seconds: 2011-01-01 00:00:05, POINT(x1,y1) 2011-01-01 00:00:10, POINT(x2,y2) 2011-01-01 00:00:15, POINT(x3,y3) ... I'm looking for a query ...
6
votes
1answer
989 views

gdalwarp, cutline and postgis

I can not figure out how I directly can read a polygon into gdawarp's -cutline argument. My current approach is: ogr2ogr -f "ESRI Shapefile" mydata.shp PG:"user=myuser dbname=gisdb" -sql "select * ...
4
votes
2answers
926 views

Qgis is slow with complex 'postgis query' layer. How to speed up?

I have a postgis layer in Qgis that is a result of a complex query. Every screen update, Qgis runs the Query again and that's slow. Any suggestion on how to speed up? EDIT - Here is the query: ...
3
votes
2answers
166 views

How to bring polygons closer to a point?

I have some scattered polygons with a lot of space between them. I want to make a thematic map but all that white space doesn't look very good, so I want to bring the polygons closer to the center of ...