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

learn more… | top users | synonyms

14
votes
2answers
3k views

What are hardware requirements for a cloud hosted PostGIS & GeoServer?

I have been playing with a local installation of PostGIS & GeoServer. I would like to move my work online now to share it with several collaborators. The proof of the concept map will consist of ...
14
votes
3answers
1k views

Is there a CASE Tool for modelling spatial databases?

Does anyone knows if there is a CASE Tool that would be possible for modelling spatial tables? I need to create a model and export it to SQL or a database directly. I´m using PostGIS. Thanks in ...
12
votes
2answers
500 views

PostGIS interpolation / triangulation options

I'm looking for an open source workflow to automate DEM construction. We have a series of sites that fall within a LIDAR dataset. We want to create site specific DEM's for each site, and we're ...
11
votes
5answers
988 views

Large shapefile to raster

I have a large shapefile (1 gb) and need to rasterise it. I have tried the following already. 1.) Import it into GRASS using v.in.ogr this failed with the error message: ERROR: G_realloc: unable to ...
9
votes
2answers
450 views

Are there Desktop GIS alternatives to ArcGIS 10.X for topology and vector conflation?

Is there any options other than ArcGIS for Desktop for topological rules and automatic topology integrity enforcing in a Desktop GIS? I am looking for something that will automatically snap features ...
9
votes
3answers
1k views

How to populate an undirected graph from PostGIS?

This question is more related to resources that I might not have identified yet, although I've been searching the web for a while. In the project I'm working at the moment I need to run a ...
8
votes
4answers
1k views

Queries returning very big datasets in PostGIS

I have a PostGIS query that will return several million rows: SELECT t1.id AS id1, t2.id AS id2, ABS(t1.mean_h - t2.mean_h) AS h_diff, ST_Distance(t1.the_geom, t2.the_geom) AS dist FROM ...
7
votes
2answers
4k views

Spatially enabled Postgres database

I am trying to create a spatially enabled PostGIS database. I am following the PostGIS documentation, http://postgis.net/docs/manual-1.5/ch02.html#id2648455. In the short version, i executed, ...
7
votes
1answer
2k views

Output polygon data from postGIS and read it on Google Maps API

So, I have a group of polygons stored in PostGIS. I'm trying to build a web application with Google Base maps (using Google Maps API). Now, How do i output the polygons in the right format so that ...
7
votes
1answer
724 views

PostGIS Intersection and Summarise Attributes

I am usually an ArcGIS desktop user, but keen to start using PostGIS more and I have a really big bit of processing to do. Not sure what functions to use, hopefully someone can help. I have a polygon ...
6
votes
3answers
1k views

Join intersecting lines with PostGIS

This is something that I'm almost ashamed to ask but I can't seem to get it to work for the life of me. I have a road layer with segments, each segment has a Road ID and a segment type. I would like ...
6
votes
2answers
3k views

What is the best way to do reverse geocoding with PostGIS?

Is there a way to do reverse geocoding with PostGIS? There's a lot of information on the Web but I found it very confusing... I have imported osm data into my own Postgres with PostGIS database. Now ...
5
votes
2answers
852 views

What is the most common way of displaying geodata from Postgis on Leaflet?

For example, in my database I've some points with geographic coordinates. I want to display them on Leaflet JS layer. Which instruments should I use? Maybe there is some API...
5
votes
2answers
1k views

How to implement Spatial Autocorrelation using QGIS or PostgreSQL (or any free application)?

I am a total newbie on the GIS scene so I hope this is not a stupid question. I have two layers in a PostgreSQL database. The first layer contains points where events happened in Europe. The second ...
5
votes
4answers
3k views

ST_Intersection slow query

I am trying to perform an intersection between two layers: Polyline layer representing some roads (~5500 rows) Polygon layer representing irregularly shaped buffers around various points of interest ...
3
votes
2answers
667 views

Total great circle distance along a path of points (PostGIS)

I am looking for an SQL query that sums the distances between a series of points using PostGIS. The situation is as follows: I have 2 tables: tracks and points. Points belong to a track and thus ...
15
votes
2answers
3k views

How can I calculate the bearing between two points in PostGIS?

How can I find the bearing between two points in PostGIS? Please specify in your answer whether or not the method producing a bearing on the spheroid, or a planar bearing.
14
votes
4answers
4k views

What is the best way to join lots of small polygons to form a larger polygon?

I have the following layer using SRID 27700 in postgis: It's every administrative region in the UK, and (as you can see from the colour grouping) each of them has a text field specifying the county ...
11
votes
3answers
563 views

How to add offsets to the route?

Edited: I want to ilustrate my question. Suppose that you're in "Point A" and want to go to "Point B". This points wouldn't be in "at_2po_4pgr" table cause aren't source/targets nodes. Then, I ...
10
votes
5answers
562 views

Database versus Files for Solo Developer

I'm just getting started in GIS and am interested in using it to create maps of mountain biking trails in my area and nearby. I've been learning QGIS and have made enough progress to generate a decent ...
10
votes
2answers
3k views

How to import esri Personal Geodatabase (.mdb) to PostGIS on Linux

We have esri Personal Geodatabases that we need to import into PostGIS. Ultimately, we'd like to allow people to upload an MDB on a web server, and have it import the layers into PostGIS. On ...
9
votes
2answers
885 views

Storing GML surface in PostGIS

I'm using PostGIS 2.0.0 and would like to store a GML Surface in a way that allows calculating intersections between that surface and various points and lines. In my case, the Surface will have one ...
8
votes
1answer
1k views

PostGIS 3D in Action

I was wondering if there is a website that showcases Openlayers and PostGIS 3D in Action
6
votes
1answer
172 views

How to install a patch in PostGIS

Can anybody tell me how to install this patch in PostGIS? http://trac.osgeo.org/postgis/ticket/413 http://trac.osgeo.org/postgis/changeset/7534 I need to use the ST_OffsetCurve function. but it ...
6
votes
2answers
1k views

How to locate PostGIS AMIs on Amazon EC2?

There are nearly 7000 AMIs on EC2, but I'm having a difficult time figuring out which ones have what I'm looking for--in this case PostGIS on Linux. No specific version/configuation--I want to check ...
5
votes
1answer
861 views

How to route over (partial) edges in pgrouting?

I have made a route planning system (based on shortest path using A*) like the Google directions service using pgrouting and google maps. It includes clicking on the map to generate waypoints, ...
3
votes
3answers
972 views

How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

I try to use the following function to add polygons to my Leaflet map. function polygon(geojson) { alert(geojson); // alert for testing layer = L.geoJson(geojson); layer.addTo(map); } ...
3
votes
2answers
967 views

Automating batch load of multiple GPX files into PostGIS

I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, ...
3
votes
1answer
2k views

How to find the nearest point projected on the road network?

I would like to know if there is a function at pgRouting that given a point (lon/lat) can give you the projection of that point to the road network . Thanks in advance john
3
votes
4answers
738 views

GeoServer Layer from PostGIS not updating

I created a WMS layer from a PostGIS table with a fraction of total polygons in GeoServer. Everything displayed fine. Then, I added the rest of the polygons to the table in postgis. For some reason ...
3
votes
3answers
2k views

Writing a plugin for Qgis using python to access PostGIS and write geometries

Sorry about the strange title didn't really know how to word it. I currently use MapInfo to do most of my GIS work however I have recently installed PostGIS 1.5 and am really liking it so far. A ...
2
votes
3answers
904 views

Calculate min distance between points in PostGIS

I have point layer in PostGIS database. Help please with query which add for each points in layer distance in attribute table between this point and another nearest point. Thanks! Update Calculate ...
13
votes
6answers
6k views

How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
11
votes
0answers
256 views

How to query OSM for all beaches facing west? - QGIS preferred

I want to identify all beaches on this planet (or a given subset of it) that are facing westwards (+/- 20-30 degrees). My idea is to use OSM as the data source. Extracting all polygons that have the ...
11
votes
2answers
294 views

Are there any tricks to using a schema other than public in PostGIS?

I'm currently setting up a fresh install of PostGIS 2.0.2 and PostgreSQL 9.1.6 on Ubuntu. I've recently come across some information indicating that using the public schema to store all data is not a ...
11
votes
6answers
612 views

PostGIS: Assign ID of point in layer A to closest point in Layer B

This should have been an obvious precursor (that I didn't ask) to my other question: PostGIS function to create spider diagrams? If I do not know the relationship between a point in layer A (stores) ...
10
votes
5answers
4k views

How best to fix a non-noded intersection problem in PostGIS?

I'm using a PL/R function and PostGIS to generate voronoi polygons around a set of points. The function that I am using is defined here. When I use this function on a particular dataset I get the ...
10
votes
2answers
3k views

Finding the closest Geometry in PostGIS

I've been looking over the PostGIS "API" of functions, and I notice that most of them take two elements to compare. For example, the ST_Distance function takes two geometry/geography elements to find ...
9
votes
3answers
2k views

How to install PostGIS on Windows?

I want to create an application platform based on PostGIS data. I read the documentation where I saw the prerequisite to install GEOS, GDAL and Proj4. The main problem is I am using windows platform. ...
9
votes
1answer
913 views

How to add features to a PostGIS layer using Quantum GIS?

I am using Quantum GIS and the PostGIS dbms. I am able to call the PostGIS layer into QGIS but i am unable to add feature to it. I am using the method of adding features to a Shapefile but still it is ...
9
votes
3answers
2k views

Beginner PostGIS question: getting geometry from multiple tables

I am very new to PostGIS, PostgreSQL, and SQL in general. I have 44 tables in my PostGIS database, and each one represents a different layer of vector data. Each was loaded from a separate shapefile, ...
8
votes
2answers
694 views

How to add vertices to existing linestrings?

If I have Linestring(1 2, 1 5, 1 9) and a Point(1 3) Is there any function that can merge linestring and point preserving the order so output would be: Linestring(1 2, 1 3, 1 5, 1 9)
8
votes
1answer
572 views

How to Simplify a Line Network Preserving Topology?

I have a Shapefile (consisting of European major roads) with about 250.000 Segments which I have to simplify for pgrouting. But I can't seem to find a way to do that properly. This is what it looks ...
8
votes
2answers
878 views

How to preserve topology while editing polygons in OpenLayers?

I’m facing this issue: I have a chloropleth map based on a set of polygons with some data. Using WFS-T (postgis, geoserver, openlayers) I am able to edit the geometry of the polygons. This works fine. ...
7
votes
2answers
313 views

PostGIS Union Between Two Tables, Preserving Attributes

I'm trying to union US State level upper- and lower-level government boundaries in such a way that generates one PostGIS table with both the upper and lower level names for each shape. In my example ...
7
votes
2answers
1k views

How to run two PostGIS versions in parallel on Windows?

I'm trying to understand how to install PostGIS2.0 on Windows7. The PostGIS site has the following suggestions: PostGIS Experimental Binaries PostGIS 2.0.0SVN Binaries with Raster, Topology ...
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 ...
5
votes
2answers
282 views

How to detect duplicates and keep only one?

I've got a table with lots of points (200.000). Some of them are duplicates (not exactly but e.g. a metro station has eight entrances) and I want to keep only one of these metro entrances. I am able ...
5
votes
1answer
1k views

grib2 to raster? (grib2 -> raster2pgsql -> PostGIS 2.0 -> GeoServer)

I'm looking to implement import of US National Weather Service data for doing various sorts of models (www.soils.wisc.edu/uwex_agwx if you're curious about what we're doing with the data). The ...
5
votes
1answer
1k views

Why do simplify polygon results differ between ArcGIS and PostGIS?

I am mainly interested in why and how the Simplify Polygons tool in ArcGIS handles the simplification process, including preventing and resolving topological errors better than the equivalent ...