[pgrouting-users] NiuRouting, PgRouting for SQLite

I am very happy to share with you a SQLite extension that allows part of
PgRouting routines, the project initially has a solution toTRSP included in
PgRouting, I hope to support the project.

https://github.com/jorgeliecer/NiuRouting

This is very cool. Have you noticed that Spatialite has also basic Djikstra functionality for SQLite? I'm mostly interested in mobile environments but Spatialite solution requires too much memory for it. It loads whole graph to running memory, and if it is larger than about 10MB then it does not work in Android for example. pgRouting as such has similar approach. What about your implementation in this regards?

Jaak Laineste
Nutiteq

On 2/21/2012 2:33 PM, Jaak Laineste wrote:

I am very happy to share with you a SQLite extension that allows
part of PgRouting routines, the project initially has a solution
toTRSP included in PgRouting, I hope to support the project.

https://github.com/jorgeliecer/NiuRouting

This is very cool. Have you noticed that Spatialite has also basic
Djikstra functionality for SQLite? I'm mostly interested in mobile
environments but Spatialite solution requires too much memory for it.
It loads whole graph to running memory, and if it is larger than
about 10MB then it does not work in Android for example. pgRouting as
such has similar approach. What about your implementation in this
regards?

I think the trick here is to only load the topology for the bbox needed to solve the query. This is what pgRouting does.

-Steve

Hi

On Tue, 21 Feb 2012 14:53:49 -0500
Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

I think the trick here is to only load the topology for the bbox
needed to solve the query. This is what pgRouting does.

That is one part of the "trick" :slight_smile:

I also store my OSM data in SQLite with spatialite
But I call the trsp algorithm as an external process
and implemented graph caching there. This increase the
speed of "incremental" route calulations "inside" the
same bbox which is the typicial use case in car navigation.

Additional I use a bbox filter based on geom data of the "edges"
which is stored in the DB

Building the graph is the most time consuming task
and needs more time then fetching the data from sqlite.
The bbox filter just reduces the memory consumption

Regards

max

-Steve
_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users

Hi

On Tue, 21 Feb 2012 22:12:02 +0100
Max Weninger <max.weninger@gmail.com> wrote:

Additional I use a bbox filter based on geom data of the "edges"
which is stored in the DB

Using spatialite you could use a query like this
to fetch only the edges withing a bbox

SELECT id, source, target, cost, reverseCost FROM
    edgeTable WHERE MbrWithin("geom", BuildMbr(lonMin, latMin, lonMax,
    latMax, 4326))==1

The geom column of the edges can be e.g. a LINESTRING of
the start end endpoint of the edge

Regards

max