Routino SVN Repository Browser

Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino

ViewVC logotype

Contents of /trunk/src/planetsplitter.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (show annotations) (download) (as text)
Sun Jan 4 17:51:24 2009 UTC (16 years, 3 months ago) by amb
File MIME type: text/x-csrc
File size: 1595 byte(s)
Changed the node, way and segment functions and data types.
Removed 'alloced', shortened the prototype array.
Remove the automatic sorting of the data.
Added assert statements.

1 /***************************************
2 $Header: /home/amb/CVS/routino/src/planetsplitter.c,v 1.4 2009-01-04 17:51:23 amb Exp $
3
4 OSM planet file splitter.
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 "functions.h"
19 #include "types.h"
20
21
22 int main(int argc,char** argv)
23 {
24 /* Parse the file */
25
26 ParseXML(stdin);
27
28 /* Sort the variables */
29
30 printf("Sorting Nodes"); fflush(stdout);
31 SortNodeList();
32 printf("\rSorted Nodes \n"); fflush(stdout);
33
34 printf("Sorting Ways"); fflush(stdout);
35 SortWayList();
36 printf("\rSorted Ways \n"); fflush(stdout);
37
38 printf("Sorting Segments"); fflush(stdout);
39 SortSegmentList();
40 printf("\rSorted Segments \n"); fflush(stdout);
41
42 /* Fix the segment lengths */
43
44 printf("Measuring Segments"); fflush(stdout);
45 FixupSegmentLengths();
46 printf("\rMeasured Segments \n"); fflush(stdout);
47
48 /* Write out the variables */
49
50 printf("Saving Nodes"); fflush(stdout);
51 SaveNodeList("data/nodes.mem");
52 printf("\rSaved Nodes \n"); fflush(stdout);
53
54 printf("Saving Ways"); fflush(stdout);
55 SaveWayList("data/ways.mem");
56 printf("\rSaved Ways \n"); fflush(stdout);
57
58 printf("Saving Segments"); fflush(stdout);
59 SaveSegmentList("data/segments.mem");
60 printf("\rSaved Segments \n"); fflush(stdout);
61
62 return(0);
63 }

Properties

Name Value
cvs:description Planet file splitter.