0

Spatial graph databases are capable to find a shortest path from the node A to the node B. Are there any DB which allows complex conditions on nodes and edges between them?

For example:

  • The node is closed between 01:00 - 06:00 UTC
  • The edge is available only on weekends
  • The edge is available if we passed the node X and going to the node Y
  • The edge is not available in winter
  • The node is temporarily disabled
  • The polygon closes all edges intersecting it
  • etc

Are there any DBs which allows such geo-restrictions?

Say we can call some function when considering the edge as a candidate?

  • 'spatial graph databases' is a bit vague here. but e.g. in pgRouting for PostgreSQL (+ PostGIS), basically all routing functions require the edges to be included passed in as (SQL expression) strings; this allows for highly dynamic network definitions when combined with the base table/node table attributes. – ThingumaBob Jan 21 at 13:08
  • So it's possible with PostgreSQL, right? – Ivan Veden Jan 21 at 16:38
  • with the right set of attributes it certainly should. note that there is no 'out-of-the-box' solution for any of your examples implemented in pgRouting; but for each call to, say, pgr_dijkstra you need to provide the function with a set of edges to route on via an SQL expression, so you can filter your routing graph highly flexible (and dynamically when wrapped within a custom function). I suggest to investigate since it's one of the most sophistocated routing frameworks for FOSS RDBMS. – ThingumaBob Jan 21 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.