Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /trunk/src/filedumper.c
Parent Directory
|
Revision Log
Revision 99 -
(show annotations)
(download)
(as text)
Wed Feb 4 18:23:33 2009 UTC (16 years, 1 month ago) by amb
File MIME type: text/x-csrc
File size: 1628 byte(s)
Wed Feb 4 18:23:33 2009 UTC (16 years, 1 month ago) by amb
File MIME type: text/x-csrc
File size: 1628 byte(s)
Sort the nodes geographically and take coordinates as command line arguments.
1 | /*************************************** |
2 | $Header: /home/amb/CVS/routino/src/filedumper.c,v 1.16 2009-02-04 18:23:32 amb Exp $ |
3 | |
4 | Memory file dumper. |
5 | ******************/ /****************** |
6 | Written by Andrew M. Bishop |
7 | |
8 | This file Copyright 2008,2009 Andrew M. Bishop |
9 | 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 "types.h" |
19 | #include "nodes.h" |
20 | #include "segments.h" |
21 | #include "ways.h" |
22 | #include "functions.h" |
23 | |
24 | |
25 | int main(int argc,char** argv) |
26 | { |
27 | Nodes *OSMNodes; |
28 | Segments *OSMSegments; |
29 | Ways *OSMWays; |
30 | |
31 | /* Examine the nodes */ |
32 | |
33 | OSMNodes=LoadNodeList("data/nodes.mem"); |
34 | |
35 | printf("Nodes\n"); |
36 | printf("-----\n"); |
37 | |
38 | printf("sizeof(Node)=%9d Bytes\n",sizeof(Node)); |
39 | printf("number =%9d\n",OSMNodes->number); |
40 | |
41 | printf("Lat bins=%3d\n",OSMNodes->latbins); |
42 | printf("Lon bins=%3d\n",OSMNodes->lonbins); |
43 | |
44 | printf("Lat zero=%4.6f\n",OSMNodes->latzero); |
45 | printf("Lon zero=%4.6f\n",OSMNodes->lonzero); |
46 | |
47 | /* Examine the segments */ |
48 | |
49 | OSMSegments=LoadSegmentList("data/segments.mem"); |
50 | |
51 | printf("\n"); |
52 | printf("Segments\n"); |
53 | printf("--------\n"); |
54 | |
55 | printf("sizeof(Segment)=%9d Bytes\n",sizeof(Segment)); |
56 | printf("number =%9d\n",OSMSegments->number); |
57 | |
58 | /* Examine the ways */ |
59 | |
60 | OSMWays=LoadWayList("data/ways.mem"); |
61 | |
62 | printf("\n"); |
63 | printf("Ways\n"); |
64 | printf("----\n"); |
65 | |
66 | printf("sizeof(Way) =%9d Bytes\n",sizeof(Way)); |
67 | printf("number =%9d\n",OSMWays->number); |
68 | |
69 | return(0); |
70 | } |
Properties
Name | Value |
---|---|
cvs:description | Test program for mmap files. |