pgRouting/pgrouting — pull request #76 by daniel-j-h (2013-01-21 21:41:29+00:00)
Title: Added Driving distance delta function

First of all, this pull request depends on #72 "Adapt PostGIS function calls to the standard spatial type (ST) prefix syntax", because there is no other way to make the code work with newer PostGIS versions.

(I'm sorry, but there's no better way to add a pull request that depends on another one)

---------------------------------------------------------------------------------------------------------
**Description:**
I added a [driving_distance_delta function](https://github.com/daniel-j-h/pgrouting/blob/driving-distance-delta/extra/driving_distance/sql/routing_dd_wrappers.sql), in order to solve the following issues with the already existing one (extra/driving_distance/sql/routing_dd_wrappers.sql):

* Inconsistent API: You had to pass coordinates instead of an id; unlike the shortest path delta functions or the normal driving distance function.

* Unexpected behavior: The function didn't respect the 'directed' and 'has_reverse_cost' arguments; instead it delegated with 'true', 'true' - no matter the actual arguments.

* Delta dependency: The delta for resolving the coordinates to an id depended on the delta of the driving distance.

* No documentation: Not even in the source code.

---------------------------------------------------------------------------------------------------------
**Further notes:**

* The old driving distance delta function is still available; because I didn't want to break your working code; the new function returns the same and you can use it e.g. in combination with ST_AsGeoJSON(the_geom) to get a GeoJSON polygon.

* For now it assumes length as the cost column - like all other shortest path delta functions. Maybe there should be a driving_distance_delta_cc with the cost column as parameter; or you could just create a view in which you alias your specific column.