[pgrouting-users] GIS enabled rule engines/processors

Stephen Woodbridge woodbri at swoodbridge.com
Thu Feb 21 05:58:21 PST 2013

On 2/21/2013 2:34 AM, Dave Potts wrote:
> It anybody aware of an gis enabled rule processing engines?
> I am looking for something that is capable of walking through a know
> directed graph according to a given set of rules.
> Starting from node J I need to C
> For example I must include node X
> I must stay 5km away from nodes H and R


You can do all that with pgrouting, but you probably need to write some 
code that translates rules into pgRouting actions.

One of the things in my "want to do list" is make a wrapper for for 
shortest path that would allow you to pass it a list of nodes and a flag 
to follow the list or optimize the list then follow it.

For the avoidance, you can do that today with a little SQL like:

select * from edges
select * from edges
  where st_dwithin(the_geom,
                       st_buffer(nodeH, 5000),
                       st_buffer(nodeR, 5000)),

You can get pretty fancy with how you select edges and avoid edges.

If the set of rules is not very large this probably could be easily done 
in perl, python or PHP with the output being the SQL to run the route.

-Steve W

More information about the Pgrouting-users mailing list