Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Annotation of /trunk/src/router.c
Parent Directory
|
Revision Log
Revision 6 -
(hide annotations)
(download)
(as text)
Sat Jan 3 12:25:24 2009 UTC (16 years, 3 months ago) by amb
File MIME type: text/x-csrc
File size: 1083 byte(s)
Sat Jan 3 12:25:24 2009 UTC (16 years, 3 months ago) by amb
File MIME type: text/x-csrc
File size: 1083 byte(s)
Added the ways to the output.
1 | amb | 2 | /*************************************** |
2 | amb | 6 | $Header: /home/amb/CVS/routino/src/router.c,v 1.3 2009-01-03 12:25:24 amb Exp $ |
3 | amb | 2 | |
4 | OSM router. | ||
5 | ******************/ /****************** | ||
6 | Written by Andrew M. Bishop | ||
7 | |||
8 | amb | 3 | This file Copyright 2008,2009 Andrew M. Bishop |
9 | amb | 2 | It may be distributed under the GNU Public License, version 2, or |
10 | any higher version. See section COPYING of the GNU Public license | ||
11 | for conditions under which this file may be redistributed. | ||
12 | ***************************************/ | ||
13 | |||
14 | |||
15 | #include <stdio.h> | ||
16 | #include <stdlib.h> | ||
17 | |||
18 | #include "functions.h" | ||
19 | #include "types.h" | ||
20 | |||
21 | |||
22 | int main(int argc,char** argv) | ||
23 | { | ||
24 | node_t start,finish; | ||
25 | |||
26 | /* Parse the command line aarguments */ | ||
27 | |||
28 | if(argc!=3) | ||
29 | { | ||
30 | fprintf(stderr,"Usage: %s <start-node> <finish-node>\n",argv[0]); | ||
31 | return(1); | ||
32 | } | ||
33 | |||
34 | start=atoll(argv[1]); | ||
35 | finish=atoll(argv[2]); | ||
36 | |||
37 | /* Load in the data */ | ||
38 | |||
39 | LoadNodeList("data/nodes.mem"); | ||
40 | amb | 6 | LoadWayList("data/ways.mem"); |
41 | amb | 2 | LoadSegmentList("data/segments.mem"); |
42 | |||
43 | /* Calculate the route */ | ||
44 | |||
45 | FindRoute(start,finish); | ||
46 | |||
47 | /* Print the route */ | ||
48 | |||
49 | amb | 3 | PrintRoute(start,finish); |
50 | amb | 2 | |
51 | return(0); | ||
52 | } |
Properties
Name | Value |
---|---|
cvs:description | Router. |