<div dir="ltr">Hi Dave,<div><br></div><div style>You mean some "artificial" network, right?</div><div style>Something that could (best case) be used to test various use cases for all functions .</div><div style>It's a good idea, but requires some time to "draw" and assign costs. restrictions, etc.. Eventually it's easier that each algorithm comes with it's own sample data as Steve did with TRSP.</div>
<div style>But if somebody has a time and a good idea how to make a general test network, that would be great.</div><div style><br></div><div style>Daniel</div><div style><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">
On Wed, Apr 24, 2013 at 2:13 PM, Dave Potts <span dir="ltr"><<a href="mailto:dave.potts@pinan.co.uk" target="_blank">dave.potts@pinan.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 23/04/13 14:02, Stephen Woodbridge wrote:<br>
Hi Steve,<br>
<br>
We often seem to get a lot of questions on this list about pg-route does not work with my database, how do I handle xyz etc.<br>
<br>
What I was hoping for, that a complex spatial network could be developed for testing, documentation be include in pg-route saying this is an example spatial database, install this, pg-route generates this type of result when shooting example is applied etc.<br>
<br>
That way, next time somebody mails in, I am having problems with geting this routing method to work, you can ask the question does the example database work correctly, that way you would known that postgres/postgis/pg-route software had been correctly installed.<br>
<br>
Dave.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Dave,<br>
<br>
All algorithm should have tests as part of the new 2.0 release branch. While the current tests are pretty trivial, I would hope over time that we add to the existing tests to improve on out test coverage. One of the reasons that shooting star got so broken was because we did not have any tests to verify that changes made to it did not break it.<br>
<br>
The new directory structure is:<br>
<br>
src/<algorithm>/<src|sql|doc|<u></u>test>/<br>
<br>
in the test sub-directory there are:<br>
<br>
test.conf<br>
*.data<br>
*.test<br>
*.rest<br>
<br>
Where the test.conf file identifies what what data files to load and what test to run and it the control file that the <a href="http://test-runner.pl" target="_blank">test-runner.pl</a> script looks for.<br>
<br>
*.data - sql ascii dump or sql statements to create data tables needed for any of the given tests.<br>
<br>
*.test - a sql query that the results of will be diff'd against a corresponding *.rest file. Any differences are reported as test failures.<br>
<br>
I would expect all new code to have tests installed in the future.<br>
What were you referring to by a 'test grid'?<br>
<br>
Thanks,<br>
-Steve<br>
<br>
On 4/23/2013 2:41 AM, Mukul priya wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Dave ,<br>
<br>
Can I suggest that a 'test grid' be created for this project and be made<br>
part of pgroute package.<br>
<br>
In that way, when somebody is having a problem, they can be asked to run<br>
a problem basied on the 'test gird' and it can be discovered very<br>
quickly if there is problem with the pgroute package or something else.<br>
Can you be a bit more elaborate about this??<br>
<br>
Sorry for replying late.<br>
<br>
<br>
Mukul<br>
<br>
<br>
<br>
<br>
On Tue, Apr 16, 2013 at 9:00 PM, Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>> wrote:<br>
<br>
On 4/15/2013 6:36 AM, Mukul priya wrote:<br>
<br>
Hi Steve ,<br>
Just to clear things i would prefer item 2 (<br>
partitioning<br>
graph and then routing ) over item1 ( multi point routing ) .Its<br>
kind of<br>
exciting and challenging too. what are your thoughts regarding<br>
this??<br>
<br>
<br>
I am fine with this preference. I think it is more important that<br>
whatever you work on will be exciting and keep you interested<br>
through out the course of the project.<br>
<br>
<br>
I went through the mail archive of previous years<br>
and it was<br>
quite useful . For now i am trying to get familiar with the<br>
development<br>
framework whenever i get time using this link<br>
(<a href="https://github.com/pgRouting/__pgrouting/wiki/Developer---__Getting-Started" target="_blank">https://github.com/pgRouting/<u></u>__pgrouting/wiki/Developer---_<u></u>_Getting-Started</a><br>
<<a href="https://github.com/pgRouting/pgrouting/wiki/Developer---Getting-Started" target="_blank">https://github.com/pgRouting/<u></u>pgrouting/wiki/Developer---<u></u>Getting-Started</a>>).<br>
Once i am done with my semester by 23rd of this month i will<br>
speed up<br>
significantly.<br>
<br>
Meanwhile feedbacks and suggestions are welcome.<br>
<br>
<br>
As you have time learning the development environment and github are<br>
critical so you can focus on your project and not the infrastructure.<br>
<br>
You should also look over:<br>
<a href="https://github.com/pgRouting/__pgrouting/wiki/2.0-__Development-Guidelines-and-__Standards" target="_blank">https://github.com/pgRouting/_<u></u>_pgrouting/wiki/2.0-__<u></u>Development-Guidelines-and-__<u></u>Standards</a><br>
<<a href="https://github.com/pgRouting/pgrouting/wiki/2.0-Development-Guidelines-and-Standards" target="_blank">https://github.com/pgRouting/<u></u>pgrouting/wiki/2.0-<u></u>Development-Guidelines-and-<u></u>Standards</a>><br>
<br>
Thanks,<br>
-Steve<br>
<br>
Thanks<br>
<br>
Mukul<br>
<br>
<br>
<br>
<br>
On Sun, Apr 14, 2013 at 7:11 PM, Mukul priya<br>
<<a href="mailto:mukul2047@gmail.com" target="_blank">mukul2047@gmail.com</a> <mailto:<a href="mailto:mukul2047@gmail.com" target="_blank">mukul2047@gmail.com</a>><br>
<mailto:<a href="mailto:mukul2047@gmail.com" target="_blank">mukul2047@gmail.com</a> <mailto:<a href="mailto:mukul2047@gmail.com" target="_blank">mukul2047@gmail.com</a>>>> wrote:<br>
<br>
Thanks for the reply Steve , clarifies all the issues that<br>
i raised<br>
, Proposed data structures cover what we need , quad tree<br>
should<br>
work too , I am right now looking into the last part which<br>
describes the method of appending our graph with new cells<br>
, seems<br>
fine and very much implementable , will post something in<br>
case some<br>
new ideas strike me . :)<br>
<br>
<br>
Thanks.<br>
<br>
<br>
On Sun, Apr 14, 2013 at 10:59 AM, Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>> wrote:<br>
<br>
On 4/13/2013 11:12 PM, Mukul priya wrote:<br>
<br>
Thanks Steve for clearly mentioning the two proposals.<br>
<br>
For Item 1 , upgrading all the algorithms will<br>
certainly<br>
require a lot<br>
of work and since i will be having my summer vacation i<br>
don't have any<br>
issue with it :).<br>
<br>
<br>
For item 2 , i am looking into the idea that you have<br>
proposed , It is<br>
very much doable , there are however some concerns<br>
of mine like<br>
<br>
- how do we decide what should be the grid size .<br>
this can<br>
vary for<br>
suburban area and urban area based on netwrok density.<br>
<br>
<br>
This might be done with a quad tree approach. You start<br>
with a<br>
square and some condition like maximum number of node.<br>
If you<br>
exceed that number you quarter it into 4 squares and<br>
divide the<br>
point into each of them.<br>
<br>
<br>
- how do we classify the nodes lying on the<br>
junction of two<br>
or more<br>
grids . should it be assigned to all the grids??<br>
<br>
<br>
A node can only lie in one square or the edge boundary of a<br>
square it does not matter which one it is put in. Edges<br>
need to<br>
be flagged if the cross a square boundary.<br>
<br>
<br>
- how do we decide the grid that needs to be loaded<br>
in the<br>
memory ,<br>
connectivity with the previous grid seems legit<br>
here but i<br>
guess we need<br>
to discuss some corner cases too.<br>
<br>
<br>
We could probably do something like<br>
<br>
typedef struct pair {<br>
int a;<br>
int b;<br>
} PAIR;<br>
<br>
typedef struct edge_type {<br>
int node_a;<br>
int node_b;<br>
PAIR *squares; // NULL if it does not cross square edge<br>
float cost;<br>
float rcost;<br>
} EDGE;<br>
<br>
Where PAIR can be assign the gridcell for the a and b ends.<br>
<br>
If we number the grid cells by their quadtree numbers like:<br>
<br>
+---+---+<br>
| 1 | 2 |<br>
+---+---+<br>
| 3 | 4 |<br>
+---+---+<br>
<br>
So you start, with the above for your coverage area. So all<br>
nodes would fall into cells 1-4. If you had to split cell 1<br>
above, then those 4 new cells would be number 11, 12,<br>
13, 14 and<br>
the remaining unsplit cells would still be 2, 3, 4. If<br>
you had<br>
to further split cell 14, then the new cells would be<br>
numbered<br>
141, 142, 143, 144. So each time a cell gets<br>
subdivided, it gets<br>
another digit added.<br>
<br>
This is the challenge of design good algorithms, if we have<br>
millions of edges and node, we need to be efficient<br>
memory wise<br>
with our data structures but still be fast. In the<br>
database, you<br>
need to think about where the data is coming from (ie:<br>
tables<br>
using queries) and when it gets moved into memory. You<br>
can't<br>
think just C code or database code, you have to use both.<br>
<br>
The idea being that we want to prepare our data in<br>
tables, then<br>
issue queries from C to get the new edges we need to append<br>
cell(s) to our graph. So I'm thinking that we have a<br>
recursive<br>
plpgsql procedure that splits the nodes into the<br>
appropriate<br>
quadtree cells based on some rules. So for example we<br>
have a<br>
vertices_tmp table that we use to assign node numbers<br>
to nodes,<br>
we could add a cell column like this:<br>
<br>
CREATE TABLE vertices_tmp<br>
(<br>
id serial NOT NULL,<br>
cell bigint,<br>
the_geom geometry,<br>
);<br>
<br>
and after we run the quadtree analysis each node is<br>
assigned a<br>
cell number. The edge table has node_a and node_b<br>
assigned to it<br>
also.<br>
<br>
If we want all edges related to cell 114 then we can do<br>
a query<br>
like:<br>
<br>
select b.*<br>
from vertices_tmp a, edges b<br>
where a.cell=114 and (<a href="http://a.id" target="_blank">a.id</a> <<a href="http://a.id" target="_blank">http://a.id</a>><br>
<<a href="http://a.id" target="_blank">http://a.id</a>>=b.node_a or <a href="http://a.id" target="_blank">a.id</a> <<a href="http://a.id" target="_blank">http://a.id</a>><br>
<<a href="http://a.id" target="_blank">http://a.id</a>>=b.node.b);<br>
<br>
<br>
Thoughts?<br>
<br>
-Steve<br>
<br>
<br>
Thanks.<br>
<br>
<br>
<br>
<br>
On Sat, Apr 13, 2013 at 6:20 AM, Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>>> wrote:<br>
<br>
On 4/11/2013 3:24 PM, Mukul priya wrote:<br>
<br>
Hi Steve and Daniel,<br>
<br>
<br>
You suggested extending the present<br>
algorithms such<br>
that its<br>
input can take more points and not only<br>
the source and<br>
destination . i<br>
think this can be implemented and i will<br>
soon come<br>
up with<br>
implementation details( kind of more<br>
technical ) .<br>
<br>
Can you be a liitle bit more<br>
elaborate about<br>
partioning data<br>
into spatial chunks or even suggest some<br>
readings .<br>
I can then<br>
come up<br>
with some better ideas about implementing it.<br>
<br>
<br>
This is just me thinking out loud :)<br>
<br>
Lets say we construct a grid of one degree<br>
squares, you can<br>
visualize it by drawing a grid over your map.<br>
<br>
Then you can associate all the nodes with the<br>
grid they<br>
fall in. We<br>
might also need to associate edges to the<br>
grids also<br>
and an edge the<br>
crosses over a grid boundary might need to be<br>
associated with two<br>
grids. This could be done with some simple<br>
relational<br>
tables like:<br>
<br>
node_id|grid_id or edge_d|grid_id<br>
<br>
So my idea would be to do the routing like this:<br>
<br>
1. get the start node or edge<br>
2. build the graph based on loading the items<br>
in the<br>
related grid<br>
3. mark the boundary nodes (we might want to<br>
do this<br>
when we grid them)<br>
4. run the algorithm until we find the target<br>
node or<br>
hit a boundary<br>
node<br>
5. on hitting a boundary:<br>
a. we check if the connected grid is loaded and<br>
continue if it is<br>
b. or we extent the graph with the new grid<br>
6. continue with the routing<br>
<br>
We might want to be able to dynamically change<br>
the size<br>
of the grid<br>
cell based on the number of items in it. This<br>
would<br>
give us better<br>
performance when transitioning from rural<br>
areas into<br>
urban areas<br>
where there is a greater density of road segments.<br>
Think of a<br>
quadtree where we split it based on number of<br>
entities.<br>
<br>
<br>
Daniel , i took a look at the<br>
oracle link<br>
that you<br>
provided but<br>
there was no details about how it has been<br>
implemented , it was more<br>
about how one can use it. May be a bit<br>
more search<br>
and luck might<br>
take me to its implementation document :) .<br>
<br>
<br>
Right, it is useful if you look at the<br>
documentation<br>
and ask why did<br>
they do it that way and what does it imply<br>
about how it<br>
works behind<br>
the scenes.<br>
<br>
<br>
The other thing that you<br>
mentioned was<br>
about contraction<br>
Hierarchy . Still the nodes have to be ordered<br>
based on some<br>
criteria or<br>
according to their importance . We can<br>
use natural<br>
hierarchy<br>
present in<br>
the network for doing that .<br>
<br>
<br>
This is not related to what you proposed. It is an<br>
algorithm that<br>
does a lot of precompuation, that is LOTS in<br>
capitals,<br>
but it can<br>
get results in milliseconds for cross country<br>
routes.<br>
<br>
<br>
i will be really grateful if<br>
anyone can<br>
correct me<br>
in case if<br>
my thought process in not on the right<br>
lane and<br>
sorry for the<br>
late reply<br>
as my academic session is in progress too<br>
.Meanwhile i am<br>
trying to<br>
get fluent with git ,cmake and other tools.<br>
<br>
<br>
So read over our wiki:<br>
<br>
<a href="https://github.com/pgRouting/______pgrouting/wiki" target="_blank">https://github.com/pgRouting/_<u></u>_____pgrouting/wiki</a><br>
<<a href="https://github.com/pgRouting/____pgrouting/wiki" target="_blank">https://github.com/pgRouting/<u></u>____pgrouting/wiki</a>><br>
<<a href="https://github.com/pgRouting/____pgrouting/wiki" target="_blank">https://github.com/pgRouting/<u></u>____pgrouting/wiki</a><br>
<<a href="https://github.com/pgRouting/__pgrouting/wiki" target="_blank">https://github.com/pgRouting/<u></u>__pgrouting/wiki</a>>><br>
<br>
<br>
<br>
<<a href="https://github.com/pgRouting/____pgrouting/wiki" target="_blank">https://github.com/pgRouting/<u></u>____pgrouting/wiki</a><br>
<<a href="https://github.com/pgRouting/__pgrouting/wiki" target="_blank">https://github.com/pgRouting/<u></u>__pgrouting/wiki</a>><br>
<<a href="https://github.com/pgRouting/__pgrouting/wiki" target="_blank">https://github.com/pgRouting/<u></u>__pgrouting/wiki</a><br>
<<a href="https://github.com/pgRouting/pgrouting/wiki" target="_blank">https://github.com/pgRouting/<u></u>pgrouting/wiki</a>>>><br>
<br>
The way I see it at the moment there are two<br>
unrelated<br>
proposals on<br>
the table (I'm leaving out the contraction<br>
hierarchy):<br>
<br>
1. multi point routing<br>
2. partition JIT graph building while routing<br>
<br>
Item 1 is fairly trivial technically, I think,<br>
but if<br>
you were to<br>
upgrade all the algorithms to do this it would<br>
be a lot<br>
of work and<br>
a useful contribution to pgrouting.<br>
<br>
Item 2 is more of a design and code a new<br>
algorithm and<br>
you would<br>
probably want to focus on using astar or trsp<br>
algorithm<br>
to do this<br>
with. This one is more technically challenging<br>
and has<br>
more unknowns<br>
in it but I think it should be doable.<br>
<br>
If you are interested in reading about contraction<br>
hierarchies:<br>
<a href="https://www.google.com/#q=______contraction" target="_blank">https://www.google.com/#q=____<u></u>__contraction</a><br>
<<a href="https://www.google.com/#q=____contraction" target="_blank">https://www.google.com/#q=___<u></u>_contraction</a>><br>
<<a href="https://www.google.com/#q=____contraction" target="_blank">https://www.google.com/#q=___<u></u>_contraction</a><br>
<<a href="https://www.google.com/#q=__contraction" target="_blank">https://www.google.com/#q=__<u></u>contraction</a>>><br>
<br>
<br>
<<a href="https://www.google.com/#q=____contraction" target="_blank">https://www.google.com/#q=___<u></u>_contraction</a><br>
<<a href="https://www.google.com/#q=__contraction" target="_blank">https://www.google.com/#q=__<u></u>contraction</a>><br>
<<a href="https://www.google.com/#q=__contraction" target="_blank">https://www.google.com/#q=__<u></u>contraction</a><br>
<<a href="https://www.google.com/#q=contraction" target="_blank">https://www.google.com/#q=<u></u>contraction</a>>>> hierarchies<br>
<br>
Thanks,<br>
-Steve<br>
<br>
Thanks .<br>
<br>
Mukul<br>
<br>
<br>
<br>
<br>
On Thu, Apr 11, 2013 at 6:47 PM, Stephen<br>
Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.><u></u>______com<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>>>> wrote:<br>
<br>
With pgRouting, we do most things<br>
dynamically,<br>
here is the<br>
basic flow:<br>
<br>
1. Given a collection of input,<br>
points, nodes,<br>
or edges<br>
map these to nodes or edges depending on<br>
algorithm.<br>
<br>
2. Select the edges we need to build<br>
the graph<br>
<br>
3. build the graph and solve it<br>
<br>
4. return the results<br>
<br>
All our algorithms today only take<br>
start and<br>
end points.<br>
They could<br>
be extended to take points. Each<br>
"point" (I<br>
use "point" as<br>
a generic<br>
term because it might be a lat/lon,<br>
node id,<br>
edge id and<br>
offset,<br>
etc) would need to be mapped to the<br>
appropriate input need<br>
for any<br>
given algorithm.<br>
<br>
So for node based algorithms like<br>
Dijkstra,and<br>
astar it<br>
would get<br>
resolved to a node. For TRSP it would get<br>
mapped to the<br>
nearest edge<br>
and offset along that edge. Postgis<br>
has lots<br>
of handy tools for<br>
doing this.<br>
<br>
-Steve<br>
<br>
<br>
On 4/10/2013 10:50 PM, Mukul priya wrote:<br>
<br>
Thanks for the reply steve . i have<br>
already cloned the<br>
github<br>
repository<br>
and looking into various aspects<br>
of it .<br>
<br>
For IRNN querry implementation i<br>
think it<br>
is a good<br>
idea to sub<br>
divide<br>
the whole route and generate n+1<br>
routes<br>
separately ,<br>
say from S<br>
to F1 ,<br>
F1-F2 ,..... F(n-1)-Fn , Fn to D . i<br>
wanted to know if<br>
we have<br>
that kind<br>
of a data where each and every<br>
facility is<br>
mentioned on<br>
the map as a<br>
point (node ) . even if it is not<br>
directly<br>
connected to<br>
the road<br>
network<br>
we can basically treat it a<br>
pseudo node<br>
and then call<br>
the router<br>
. The<br>
other thing about optimization<br>
yes we can<br>
do that using<br>
spatial<br>
range<br>
querries suppose there are several<br>
instances of the same<br>
facility that a<br>
user wants to access then we can use<br>
spatial range<br>
querries to<br>
locate<br>
that facility which is the nearest.<br>
<br>
<br>
On Thu, Apr 11, 2013 at 1:42 AM,<br>
Stephen<br>
Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.><u></u>______com<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>>.<u></u>>________com<br>
<br>
<br>
<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.><u></u>______com<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>>>>> wrote:<br>
<br>
On 4/10/2013 3:23 PM, Mukul<br>
priya wrote:<br>
<br>
<br>
Hi ,<br>
<br>
<br>
Hi Mukul,<br>
<br>
Thank you for your interest<br>
in pgRouting.<br>
<br>
I am a<br>
B.tech<br>
fourth year<br>
student at<br>
IIIT-Hyderabad<br>
pursuing a degree in<br>
computer<br>
science and<br>
engineering<br>
and i will<br>
be soon<br>
pursuing a Masters<br>
Degree in the<br>
field of Spatial<br>
Informatics<br>
and the<br>
research topic that i<br>
have been<br>
working on is *"In<br>
route nearest<br>
neighbour querries".*<br>
<br>
<br>
Last year<br>
i worked<br>
on a project<br>
that was<br>
funded by<br>
Honeywell technology<br>
solutions<br>
and it gave me<br>
a lot of<br>
insight about<br>
open source programming and<br>
industrial work<br>
culture.<br>
<br>
I was introduced to<br>
pgrouting by<br>
*Prof. Venkatesh<br>
Raghavan* who<br>
visited<br>
<br>
our college last summer.<br>
i have<br>
also used<br>
pgrouting for<br>
implementing one<br>
of my Honors project.<br>
<br>
i have gone through the<br>
updated<br>
ideas page and<br>
i am<br>
listing out<br>
a topic<br>
that i feel i can<br>
contribute to.<br>
<br>
*Idea *<br>
<br>
Network Partitioning<br>
<br>
A very simple method<br>
using which<br>
it can be<br>
done is :<br>
<br>
* *Existence of a natural<br>
Hierarchy*<br>
<br>
<br>
Generally road<br>
networks are<br>
organized such<br>
that there<br>
is some<br>
natural hierarchy for<br>
example if<br>
we look at<br>
the road<br>
network of<br>
USA we<br>
observe that there are<br>
national<br>
highways which<br>
connect<br>
multiple<br>
large<br>
regions , inter state roads<br>
connect places<br>
within these<br>
regions<br>
, multi<br>
lane roads connect city<br>
areas and<br>
then there<br>
are small<br>
roads to<br>
connect<br>
individual houses.<br>
<br>
so what we<br>
can do is<br>
first rank these<br>
classes that<br>
constitute the road<br>
network and<br>
then use the<br>
highest<br>
level roads to<br>
divide the road network into<br>
large regions<br>
enclosed by<br>
these<br>
roads. each<br>
of the divided regions can<br>
further be divided<br>
again<br>
using next lower<br>
level road.<br>
<br>
so suppose<br>
we have a<br>
road network<br>
which n<br>
classes of<br>
different roads then we can<br>
create a tree of<br>
depth n-1<br>
where the<br>
root of<br>
the tree will represent the<br>
entire road<br>
network and<br>
children of<br>
the the<br>
root node will represent<br>
the area<br>
formed by<br>
partitioning the<br>
root using<br>
the level 1 ( highest )<br>
edges and<br>
so on . the<br>
nodes<br>
will basically<br>
represent a smaller part<br>
of the<br>
road network.<br>
<br>
The idea<br>
seems to<br>
be very naive<br>
right now<br>
but if<br>
anyone can<br>
give some feedback<br>
whether it is<br>
achievable or<br>
not or<br>
may be suggest<br>
some modifications.<br>
<br>
<br>
Yes this is the basics of<br>
how this<br>
could work.<br>
Because we<br>
build our<br>
graphs dynamically for each<br>
route<br>
request, we can do<br>
something like<br>
this today. Typically you<br>
have to<br>
feed the route<br>
request<br>
and SQL<br>
query that provides the<br>
edges needed<br>
to build the<br>
graph and<br>
this can<br>
be simply the bounding box<br>
of the<br>
start and end<br>
point of<br>
the route<br>
expanded slightly to allow<br>
the route<br>
move outside that<br>
bounds by a<br>
little if needed. A case in<br>
point are<br>
start and<br>
end points<br>
that form<br>
a vertical of horizontal line.<br>
<br>
So for the natural<br>
hierarchy, you can<br>
for a SQL<br>
query like:<br>
<br>
select * from edges where<br>
st_dwithin(the_geom,<br>
start_pnt,<br>
radius)<br>
union<br>
select * from edges where<br>
st_dwithin(the_geom,<br>
end_pnt, radius)<br>
union<br>
select * from edges<br>
where<br>
st_expand(st_makeline(start___<u></u>________pnt,<br>
<br>
<br>
end_pnt), pct)<br>
<br>
<br>
and road_class < 4;<br>
<br>
So this gets all edges<br>
regardless of<br>
class at the<br>
start and<br>
end and<br>
then gets all the major<br>
roads and<br>
highways between the<br>
start and end<br>
points. We can dynamically<br>
select the<br>
edges that<br>
we want<br>
when we<br>
build the graph.<br>
<br>
Regardless of how you<br>
implement the<br>
routing, the<br>
problem is all<br>
about the data. If you have<br>
a road<br>
segment the is<br>
misqualified, you<br>
might end up with a network<br>
that is<br>
broken between<br>
start<br>
and end.<br>
This can alsoo happen if<br>
ramps are<br>
not coded<br>
correctly.<br>
<br>
One of the challenges we<br>
have today<br>
is that we<br>
have to be<br>
able to<br>
construct the whole graph in<br>
memory<br>
before we can<br>
start<br>
routing.<br>
This is ok for small areas<br>
but it is<br>
a problem if<br>
you want to<br>
generate a route between say<br>
Miami,<br>
Florida and<br>
Seattle,<br>
Washington.<br>
An interesting problem would<br>
be the<br>
ability to<br>
partition<br>
the data in<br>
spatial chucks and only load<br>
them as<br>
the solver<br>
needed them.<br>
<br>
If you think about your<br>
edges sorted<br>
into say 1<br>
degree grid<br>
partitions,<br>
then you load the partition<br>
for the<br>
start point<br>
and start<br>
routing<br>
using A* search, when you<br>
frontier<br>
get to an edge<br>
of the<br>
grid you<br>
are in, then you load the<br>
adjacent<br>
grid and<br>
continue, if<br>
you bump<br>
into another grid boundary<br>
that is<br>
not loaded yet, you<br>
load, if it<br>
is already loaded you continue.<br>
Anyway food for<br>
thought! :)<br>
<br>
<br>
In route<br>
nearest<br>
neighbour<br>
querries(<br>
IRNN) which<br>
handle<br>
querries like computation of<br>
shortest path ,<br>
provided<br>
that the user<br>
wants to visit<br>
facilities F1 , F2<br>
,.....FN<br>
while he/she<br>
drives<br>
or walks<br>
from source to<br>
destination. Network<br>
partitioning can<br>
optimize these<br>
computations too as the<br>
search<br>
space reduces<br>
significantly once<br>
we have<br>
the partitions. Handling<br>
such<br>
querries have<br>
not been<br>
implemented<br>
yet. It<br>
will be very helpful if<br>
we can<br>
have some<br>
discussion<br>
about whether<br>
implementing it is<br>
feasible or not.<br>
<br>
<br>
What is we just added via<br>
support to<br>
routing? Then<br>
we could do<br>
something like say generate<br>
a route:<br>
Start, F1,<br>
F2, ... Fn, End<br>
This would allow us to build<br>
a graph<br>
one time and<br>
then generate<br>
multiple sub-routes with in the<br>
graph. Today if<br>
you want to<br>
do that<br>
you have to generate n+1<br>
routes and<br>
build the<br>
graph n+1<br>
times. We<br>
could also do some preliminary<br>
optimization of the via<br>
points based<br>
on Euclidean distance using<br>
something<br>
like TSP before<br>
calling the<br>
router.<br>
<br>
<br>
<br>
It would<br>
be great<br>
if someone<br>
could give<br>
a general<br>
idea<br>
how to go about<br>
learning more<br>
about the areas<br>
mentioned with<br>
respect</blockquote></blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>
Web: <a href="http://georepublic.de/" style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span>
</div>