Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am looking to create a city directory web app, and the site will need to be able to calculate distances between two geospatial points (like the distance between the user and a restaurant, or the distance between two restaurants).

I am a newbie to geospatial function, and recently started using PostGIS. I have been having a heck of a time installing pgRouting into my PostGIS 1.4/PostgreSQL 8.4 server, so am thinking about giving it up for now until I feel like I need it. I have already spent several hours trying to install pgRouting on my OSX 10.6 Snow Leopard machine with little success.

With that said, what exactly am I giving up? It seems like ST_Distance will satisfy most of my needs in the short term and things like the Travelling Salesman Problem won't really apply to webapp (at least not for a while, if ever). Is there something else that I am giving up? Another reason to use pgRouting?

(As a side note, if you know of a place that makes installing pgRouting easy, please point me in that direction, as I have already tried about 3 pages worth of several google results for tutorials/instructions).

share|improve this question
add comment

migrated from stackoverflow.com Sep 12 '11 at 11:38

This question came from our site for professional and enthusiast programmers.

2 Answers

ST_Distance only calculates the distance between two features "as the crow flies". pgRouting on the other hand calculates the actual distance along a network (e.g. road network). Those are two different things and it depends on your use case whether ST_Distance is sufficient or not.

share|improve this answer
add comment

pgRouting can be installed out of the box on OS X 10.6 by downloading packages from: http://www.kyngchaos.com/software/postgres

In fact the kyngchaos site delivers packages for postgresql, postgis and their dependencies as frameworks that all work out of the box.

share|improve this answer
    
Thanks guys. The problem with Kyngchaos was that the versions were slightly different than those that my preferred host was to use (A2 Hosting) and I wanted my local dev environment to be as close to the production environment. In the end I decided to use the Kyngchaos installers and suck up the small version difference. –  user4206 Sep 13 '11 at 4:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.