-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.template
92 lines (83 loc) · 2.89 KB
/
config.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// ---------------------------------------------------------------------------
//
// you have to change these three functions to create the shapefiles you want.
//
// this default implementation creates stuff that roughly equals the shape
// files on download.geofabrik.de.
//
// ---------------------------------------------------------------------------
void setup_shapefiles()
{
// set up your shapefiles. for each of the files you want to create,
// make one call to shapefile_new, with the following parameters:
//
// shapefile_new(id, type, basename, num_attrs, ...)
//
// where:
//
// id - the number of the file. start with 0 and count upwards.
// type - put SHPT_POINT for point files, SHPT_ARC for line files,
// and SHPT_POLYGON for areas.
// basename - the file name; extensions .dbf/.shp/.shx will be added.
// num_attrs - how many attributes you want in the dbf file.
//
// for each attribute you will then have to specify the following:
//
// a name - for the name of the column in the .dbf file;
// a type - put FTString for strings, FTInteger for integers, and
// FTDouble for doubles;
// a length - how many characters or digits the value may have, and
// decimals - only for FTDouble, the number of decimals.
%SETUP%
}
/**
* Called when a node has been fully read.
*/
void process_osm_node()
{
// this is executed whenever a node has been fully read.
//
// You will find its ID in current_id and its tags in the g_hash_table
// current_tags, its lat/lon in the global current_latlon array.
//
// Determine whether you want the way added to one of your shapefiles,
// and if yes, call
//
// shapefile_add_node(id, ...)
//
// where "id" is the number of the file you have used during setup,
// and "..." is the list of attributes, which must match number and
// type as specified during setup.
// nodes
%TYPE_0%
};
/**
* Called when a way has been fully read.
* You will find its ID in current_id and its tags in the g_hash_table
* current_tags.
*/
void process_osm_way()
{
// this is executed whenever a way is fully read.
//
// You will find its ID in current_id and its tags in the g_hash_table
// current_tags.
//
// Determine whether you want the way added to one of your shapefiles,
// and if yes, call
//
// shapefile_add_way(id, ...)
//
// where "id" is the number of the file you have used during setup,
// and "..." is the list of attributes, which must match number and
// type as specified during setup.
// lines
%TYPE_1%
// polygons
%TYPE_2%
};
// ---------------------------------------------------------------------------
//
// no maintenance required in the parts below.
//
// ---------------------------------------------------------------------------