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

learn more… | top users | synonyms

55
votes
8answers
4k views

How do I get started with PostGis

I have been reading a lot about it, but I am struggling to find a good beginner's guide. Which tutorials/books do you recommend? My past experience involves python and arcgis. But I have never worked ...
45
votes
8answers
8k views

How to create Vector Polygons at the same amazing speeds GISCloud is able to render them?

EDIT (outlining new bounty added): I have added the largest bounty possible to this question in hope of getting a very detailed answer. Your solution should outline a step-by-step guide utilizing open ...
44
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 ...
38
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 ...
35
votes
4answers
7k views

What are the pros and cons of PostGIS geography and geometry types?

My company uses geometry (the_geom) data type for storing geospatial data. I've recently been acquainted to the concept of geography (the_geog) data type which, as I understand it, stores the SRID ...
33
votes
2answers
4k views

Acquiring ArcGIS-like speed in Postgis

I have been using Postgis 2.0 for 3/4 of a year now and while I really enjoy using it, excessive query processing time has rendered it basically unusable for my use case. I tend to do heavy ...
30
votes
3answers
11k 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 ...
30
votes
6answers
9k views

How to use PostgreSQL/PostGIS with ArcGIS for Desktop?

Has anyone used PostgreSQL with PostGIS successfully? I am a semi-experienced ArcGIS user and want to build out a database and connect it to ArcCatalog. I've scoured the internet for resources but ...
30
votes
2answers
1k views

What coordinate system should be used to store geography data for celestial coordinates?

I am doing an astronomy project. I want to have the information about our images stored in a spatially enabled database. This, I would think, should be a very easy special case for GIS functions ...
28
votes
4answers
4k views

Curved point-to-point “route maps”

I have recently been looking at airlines web pages that display their routes departing a certain city to all other cities they service. I would like to be able to create similar curved routes between ...
26
votes
2answers
5k views

How to create a regular polygon grid in PostGIS?

How to create, on the shape of a polygon, a regular grid of polygons/squares of an given size, in postgis? I have thought about a function like Create regular point grid in Postgis only for squares, ...
26
votes
3answers
9k views

How to make a spatial view in PostGIS and add it as a layer in QGIS?

In PostGIS 2.0, what is the most efficient way to create a spatially enabled view that is viewable in QGIS? I followed the context of Part 2 of @Mike Toews answer to this question, and the view ...
26
votes
5answers
10k views

How to migrate GDB data into PostGIS without ESRI apps?

Can you tell me how I can load geodatabase data into PostGIS without having to install ESRI apps? The solution I found online talked about using ArcGIS to convert GDB to SHP and then importing SHP to ...
25
votes
9answers
13k views

How to connect to PostGIS database from ArcMap?

How can I connect to a PostGIS database from ArcMap? Solutions for ArcGIS 9.3, 10.0 and later are acceptable. Ideally, I would like to be able to perform spatially enabled queries and receive the ...
23
votes
2answers
9k views

How to change the SRID of exisisting data in PostGIS?

While importing my shapefile data to PostGIS, I did not select the proper Projection. How do I now change the SRID of the data, without transforming the Coordinates?
23
votes
10answers
5k views

Alternatives to pgRouting

I was wondering if there are any alternatives to pgRouting tools. Thinking about it for a bit, I think the only alternative is to use R or RPY to do the analysis. Basically I'm trying to solve ...
23
votes
5answers
9k views

Optimizing osm2pgsql imports for OSM data

I'm currently building an instance on EC2 on which to import the entire Planet.osm snapshot of the whole Earth's worth of data for some projects we're working on. I've spun up a large Ubuntu x64 ...
21
votes
6answers
8k views

Shapefile PRJ to PostGIS SRID lookup table?

I was wondering if there is such a thing as an shapefile PRJ to PostGIS SRID lookup table? Something that can translate the most standard shapefile PRJ definitions into the likely SRID. When using ...
21
votes
4answers
3k views

Bulk load multiple shapefiles into PostGIS

I've got over a hundred data layers in shapefile format that I want to upload into a PostGIS database. They are all in the same projection, but represent different data layers so they do not have the ...
21
votes
4answers
17k views

Why does PostGIS installation not create a template_postgis

I went this route for installation of PostgreSQL and PostGIS: PostgreSQL using the standalone KyngChaos, PostGIS install from KyngChaos as well... pgAdmin3 from PostgreSQL Tools Now when I launch ...
21
votes
3answers
4k views

How can I calculate the average width of a polygon?

I'm interested in examining the average width of a polygon that represents the road surface. I also have the road centerline as a vector (which is sometimes not exactly in the center). In this example ...
21
votes
5answers
3k views

How to create regular point grid inside a polygon in Postgis?

How to create, inside a polygon, a regular grid of point spaced x,y in postgis? Like the example:
20
votes
4answers
2k views

Would PostGIS offer an advantage over MySQL for a produce farm application?

I have a web app that stores the locations of farms in West Michigan. You can search for a product (e.g. "broccoli") and it will show you all the farms that grow that product. Right now I'm using ...
20
votes
3answers
2k views

When should you NOT use a spatial index?

I am asking this because I was mainly working with Oracle but for the past year I've been doubling with PostGIS and SQLServer 2008. Most spatial functions in Oracle won't work without a spatial index ...
20
votes
2answers
6k views

Looking for fastest solution for Point in Polygon analysis of 200 million points

Apologies for asking a question that has been asked before -- I've read through answers, and I'm left wondering how to implement the recommendations. I've never used SQL, Python, C, and have only ...
20
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 ...
19
votes
7answers
8k views

Options for displaying PostGIS vectors in OpenLayers

I am very new to web-mapping, so this question may be a little misguided. I want to have a very simple web interface using OpenLayers (or even Google Maps if that will be easier) which can display a ...
19
votes
7answers
6k views

Nearest neighbor between a point layer and a line layer

I've asked this question several times on stackoverflow and irc between #qgis and #postgis and I also tried to code it or implement it my self in postgis with no real answer. Using programming (most ...
19
votes
4answers
6k 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 ...
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.
18
votes
4answers
6k views

Separate polygons based on intersection using PostGIS

I have a PostGIS table of polygons where some intersect with one another. This is what I'm trying to do: For a given polygon selected by id, give me all of the polygons that intersect. Basically, ...
18
votes
6answers
4k views

How do you best deal with data that spreads across UTM Zones?

I have data that spreads across two UTM Zones GDA/MGA94 UTM Zone 55 and 56. I have layers such as a cadastre, roads, pipelines etc where I want to store measurements like lengths and areas in metres ...
18
votes
4answers
2k views

Generalisation Strategies for Building Outlines

I have a dataset of building footprints vectorised from a raster dataset. The dataset is currently just a vector representation of the raster data. I would like a polygon dataset that only has ...
18
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 ...
18
votes
5answers
1k views

How to simplify a routable network?

I have a network graph that I need to simplify in the sense of reducing the number of edges. The idea would be to merge nodes that are located close together and remove the connecting short edges. ...
18
votes
4answers
9k views

How to get the nearest point on a linestring to a given point?

I've been using PostGIS in a long time now but never had to use the LINESTRING geometry ... yet! :) Here's what I would like to do : I have a table of linestrings (representing streets of a given ...
18
votes
1answer
2k views

Comparison of geocoding solutions (such as Gisgraphy & PostGIS 2.0)

As I am sure many of you are aware, PostGIS has finally released Version 2.0 and included within this version they have also built a geocoder (see: http://postgis.net/docs/Extras.html). Although I ...
17
votes
6answers
3k views

How do I get started with GIS Servers on Amazon EC2?

Are there any tutorials, talks or presentations that discuss the use of EC2 or other cloud computing services to host GIS Servers? Has anyone had any experience in doing it with Amazon's EC2? How hard ...
17
votes
1answer
1k views

What's the status of Postgis 2.0 topology support in QGIS?

Having followed the Postgis developments over the past 6 months I have noticed a bunch of features which seem to be incredibly cool especially in the area of topologies and associating calculations on ...
17
votes
2answers
1k views

Moving a PostGIS Installation

I have a simple question: I have a postGIS installation running on an old computer that I'd like to move. I spent a bunch of time playing with pg_dump and pg_dumpall without success. It seems the ...
16
votes
4answers
3k views

PostGIS: Select features that do NOT intersect

This seems to me like such a simple question (and it probably is) yet I cannot seem to find an example that gives me the answer. Using PostGIS, I just want to select points that fall outside of ...
16
votes
2answers
4k views

How can I find a point inside a polygon in PostGIS?

How can I find a point that is guaranteed to be within a given polygon in PostGIS? I am aware of the ST_Centroid function. However, the centroid is not always within a polygon, see below: ...
15
votes
4answers
5k views

How to reproject all geometries in a PostGIS table?

I created a spatial table with SRID:4326. Now I want to change total projection to SRID:32644 into a new table. The old table should remain unchanged.
15
votes
2answers
7k views

How to change the geometry type from Point to Multipoint within an existing table in PostGIS?

Is there a PostGIS function that can change geometry type for an existing table? We need to change from POINT to MULTIPOINT. The table will be empty when we change the geometry type and we cannot ...
15
votes
4answers
5k views

How to create a simple front-end for a PostGIS database?

My organisation collects a lot of environmental monitoring data (stream flow, water chemistry etc.) most of which is currently stored in Excel. I’d like to get everything into a database – probably ...
15
votes
4answers
10k views

Select bounding box using postgis

I want to create a query to select all ways and their nodes that exist within a bounding box using postGIS. The bounding box shall includes all details as osmosis "--bounding-box" command will ...
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.
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) ( ...
15
votes
4answers
1k views

What are some high-profile websites that use OpenLayers and PostGIS?

I think there are many convincing arguments for using PostGIS but I am interested in showing people examples of websites that use PostGIS and OpenLayers. Some examples that I have seen are: ...
15
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 ...