source: subversion/applications/rendering/gosmore/jni/libgosm.h @ 29350

Last change on this file since 29350 was 27125, checked in by nic, 8 years ago

Android port: Check in untested code.
Cgi-bin: Fix travel times (again!!). Not ported to Windows a.t.m.

  • Property svn:executable set to *
File size: 21.8 KB
Line 
1#ifndef LIBGOSM_H
2#define LIBGOSM_H
3
4#include <math.h>
5#include <stdlib.h>
6#include <string.h>
7#include <ctype.h>
8#include <stdio.h>
9#include <limits.h>
10
11#ifdef _WIN32_WCE
12#include <windows.h>
13#define lrint(x) int ((x) < 0 ? (x) - 0.5 : (x) + 0.5)
14typedef int intptr_t;
15#define strncasecmp _strnicmp
16#define stricmp _stricmp
17#endif
18
19#ifndef _WIN32
20#ifndef ANDROID_NDK
21#include <libxml/xmlreader.h>
22#endif
23#include <inttypes.h>
24#define stricmp strcasecmp
25typedef long long __int64;
26#endif
27#ifndef M_PI
28#define M_PI 3.14159265358979323846 // Not in math ??
29#endif
30
31#if __FreeBSD__ || __APPLE__ || ANDROID_NDK
32#define fopen64(x,y) fopen(x,y)
33#endif
34
35#ifndef TRUE
36#define TRUE 1
37#define FALSE 0
38#endif
39
40// this definitions have been changes to prevent compiler warnings
41// copied verbatim for /usr/include/limits.h
42#ifndef INT_MAX
43#define INT_MAX       2147483647
44#endif
45
46#ifndef INT_MIN
47#define INT_MIN       (-INT_MAX - 1)
48#endif
49
50#define Sqr(x) ((x)*(x))
51inline int isqrt (int x) { return lrint (sqrt ((double)x)); } // Optimize this ?
52
53#define TILEBITS (18)
54#define TILESIZE (1<<TILEBITS)
55
56#define RESTRICTIONS M (access) M (motorcar) M (bicycle) M (foot) M (goods) \
57  M (hgv) M (horse) M (motorcycle) M (psv) M (moped) M (mofa) \
58  M (motorboat) M (boat) \
59  M (oneway) M (roundabout)
60
61#define M(field) field ## R,
62enum {
63  STYLE_BITS = 10, RESTRICTIONS bicycleOneway, layerBit1, layerBit2, layerBit3
64};
65#undef M
66
67// Below is a list of the tags that the user may add. It should also include
68// any tags that gosmore.cpp may test for directly, e.g.
69// StyleNr(w) == highway_traffic_signals .
70// See http://etricceline.de/osm/Europe/En/tags.htm for the most popular tags
71// The fields are k, v, short name and the additional tags.
72#define STYLES \
73 s (gosmore_note, yes,        "note"            , "") \
74 s (highway, residential,     "residential"     , "") \
75 s (highway, unclassified,    "unclassified"    , "") \
76 s (highway, tertiary,        "tertiary"        , "") \
77 s (highway, secondary,       "secondary"       , "") \
78 s (highway, primary,         "primary"         , "") \
79 s (highway, trunk,           "trunk"           , "") \
80 s (highway, footway,         "footway"         , "") \
81 s (highway, service,         "service"         , "") \
82 s (highway, track,           "track"           , "") \
83 s (highway, cycleway,        "cycleway"        , "") \
84 s (highway, pedestrian,      "pedestrian"      , "") \
85 s (highway, steps,           "steps"           , "") \
86 s (highway, bridleway,       "bridleway"       , "") \
87 s (railway, rail,            "railway"         , "") \
88 s (railway, station,         "railway station" , "") \
89 s (highway, mini_roundabout, "mini roundabout" , "") \
90 s (highway, traffic_signals, "traffic signals" , "") \
91 s (highway, bus_stop,        "bus stop"        , "") \
92 s (amenity, parking,         "parking"         , "") \
93 s (amenity, fuel,            "fuel"            , "") \
94 s (amenity, school,          "school"          , "") \
95 s (place,   village,         "village"         , "") \
96 s (place,   suburb,          "suburb"          , "") \
97 s (shop,    supermarket,     "supermarket"     , "") \
98 s (religion, christian,      "church"          , \
99               "  <tag k='amenity' v='place_of_worship' />\n") \
100 s (religion, jewish,         "synagogue"       , \
101               "  <tag k='amenity' v='place_of_worship' />\n") \
102 s (religion, muslim,         "mosque"          , \
103               "  <tag k='amenity' v='place_of_worship' />\n") \
104 s (amenity, pub,             "pub"             , "") \
105 s (amenity, restaurant,      "restaurant"      , "") \
106 s (power,   tower,           "power tower"     , "") \
107 s (waterway, stream,         "stream"          , "") \
108 s (amenity, grave_yard,      "grave yard"      , "") \
109 s (amenity, crematorium,     "crematorium"     , "") \
110 s (amenity, shelter,         "shelter"         , "") \
111 s (tourism, picnic_site,     "picnic site"     , "") \
112 s (leisure, common,          "common area"     , "") \
113 s (amenity, park_bench,      "park bench"      , "") \
114 s (tourism, viewpoint,       "viewpoint"       , "") \
115 s (tourism, artwork,         "artwork"         , "") \
116 s (tourism, museum,          "museum"          , "") \
117 s (tourism, theme_park,      "theme park"      , "") \
118 s (tourism, zoo,             "zoo"             , "") \
119 s (leisure, playground,      "playground"      , "") \
120 s (leisure, park,            "park"            , "") \
121 s (leisure, nature_reserve,  "nature reserve"  , "") \
122 s (leisure, miniature_golf,  "miniature golf"  , "") \
123 s (leisure, golf_course,     "golf course"     , "") \
124 s (leisure, sports_centre,   "sports centre"   , "") \
125 s (leisure, stadium,         "stadium"         , "") \
126 s (leisure, pitch,           "pitch"           , "") \
127 s (leisure, track,           "track"           , "") \
128 s (sport,   athletics,       "athletics"       , "") \
129 s (sport,   10pin,           "10 pin"          , "") \
130 s (sport,   boules,          "boules"          , "") \
131 s (sport,   bowls,           "bowls"           , "") \
132 s (sport,   baseball,        "baseball"        , "") \
133 s (sport,   basketball,      "basketball"      , "") \
134 s (sport,   cricket,         "cricket"         , "") \
135 s (sport,   cricket_nets,    "cricket nets"    , "") \
136 s (sport,   croquet,         "croquet"         , "") \
137 s (sport,   dog_racing,      "dog racing"      , "") \
138 s (sport,   equestrian,      "equestrian"      , "") \
139 s (sport,   football,        "football"        , "") \
140 s (sport,   soccer,          "soccer"          , "") \
141 s (sport,   climbing,        "climbing"        , "") \
142 s (sport,   gymnastics,      "gymnastics"      , "") \
143 s (sport,   hockey,          "hockey"          , "") \
144 s (sport,   horse_racing,    "horse racing"    , "") \
145 s (sport,   motor,           "motor sport"     , "") \
146 s (sport,   pelota,          "pelota"          , "") \
147 s (sport,   rugby,           "rugby"           , "") \
148 s (sport,   australian_football, "australian football" , "") \
149 s (sport,   skating,         "skating"         , "") \
150 s (sport,   skateboard,      "skateboard"      , "") \
151 s (sport,   handball,        "handball"        , "") \
152 s (sport,   table_tennis,    "table tennis"    , "") \
153 s (sport,   tennis,          "tennis"          , "") \
154 s (sport,   racquet,         "racquet"         , "") \
155 s (sport,   badminton,       "badminton"       , "") \
156 s (sport,   paintball,       "paintball"       , "") \
157 s (sport,   shooting,        "shooting"        , "") \
158 s (sport,   volleyball,      "volleyball"      , "") \
159 s (sport,   beachvolleyball, "beach volleyball" , "") \
160 s (sport,   archery,         "archery"         , "") \
161 s (sport,   skiing,          "skiing"          , "") \
162 s (sport,   rowing,          "rowing"          , "") \
163 s (sport,   sailing,         "sailing"         , "") \
164 s (sport,   diving,          "diving"          , "") \
165 s (sport,   swimming,        "swimming"        , "") \
166 s (leisure, swimming_pool,   "swimming pool"   , "") \
167 s (leisure, water_park,      "water park"      , "") \
168 s (leisure, marina,          "marina"          , "") \
169 s (leisure, slipway,         "slipway"         , "") \
170 s (leisure, fishing,         "fishing"         , "") \
171 s (shop,    bakery,          "bakery"          , "") \
172 s (shop,    butcher,         "butcher"         , "") \
173 s (shop,    florist,         "florist"         , "") \
174 s (shop,    groceries,       "groceries"       , "") \
175 s (shop,    beverages,       "liquor / wine"   , "") \
176 s (shop,    clothes,         "clothing shop"   , "") \
177 s (shop,    shoes,           "shoe shop"       , "") \
178 s (shop,    jewelry,         "jewelry store"   , "") \
179 s (shop,    books,           "bookshop"        , "") \
180 s (shop,    newsagent,       "newsagent"       , "") \
181 s (shop,    furniture,       "furniture store" , "") \
182 s (shop,    hifi,            "Hi-Fi store"     , "") \
183 s (shop,    electronics,     "electronics store" , "") \
184 s (shop,    computer,        "computer shop"   , "") \
185 s (shop,    video,           "video rental"    , "") \
186 s (shop,    toys,            "toy shop"        , "") \
187 s (shop,    motorcycle,      "motorcycle"      , "") \
188 s (shop,    car_repair,      "car repair"      , "") \
189 s (shop,    doityourself,    "doityourself"    , "") \
190 s (shop,    garden_centre,   "garden centre"   , "") \
191 s (shop,    outdoor,         "outdoor"         , "") \
192 s (shop,    bicycle,         "bicycle shop"    , "") \
193 s (shop,    dry_cleaning,    "dry cleaning"    , "") \
194 s (shop,    laundry,         "laundry"         , "") \
195 s (shop,    hairdresser,     "hairdresser"     , "") \
196 s (shop,    travel_agency,   "travel_agency"   , "") \
197 s (shop,    convenience,     "convenience"     , "") \
198 s (shop,    mall,            "mall"            , "") \
199 s (shop,    department_store, "department store" , "") \
200 s (amenity, biergarten,      "biergarten"      , "") \
201 s (amenity, nightclub,       "nightclub"       , "") \
202 s (amenity, bar,             "bar"             , "") \
203 s (amenity, cafe,            "cafe"            , "") \
204 s (amenity, fast_food,       "fast food"       , "") \
205 s (amenity, ice_cream,       "icecream"        , "") \
206 s (amenity, bicycle_rental,  "bicycle rental"  , "") \
207 s (amenity, car_rental,      "car rental"      , "") \
208 s (amenity, car_sharing,     "car sharing"     , "") \
209 s (amenity, car_wash,        "car wash"        , "") \
210 s (amenity, taxi,            "taxi"            , "") \
211 s (amenity, telephone,       "telephone"       , "") \
212 s (amenity, post_office,     "post office"     , "") \
213 s (amenity, post_box,        "post box"        , "") \
214 s (tourism, information,     "tourist info"    , "") \
215 s (amenity, toilets,         "toilets"         , "") \
216 s (amenity, recycling,       "recycling"       , "") \
217 s (amenity, fire_station,    "fire station"    , "") \
218 s (amenity, police,          "police"          , "") \
219 s (amenity, courthouse,      "courthouse"      , "") \
220 s (amenity, prison,          "prison"          , "") \
221 s (amenity, public_building, "public building" , "") \
222 s (amenity, townhall,        "townhall"        , "") \
223 s (amenity, cinema,          "cinema"          , "") \
224 s (amenity, arts_centre,     "arts centre"     , "") \
225 s (amenity, theatre,         "theatre"         , "") \
226 s (tourism, hotel,           "hotel"           , "") \
227 s (tourism, motel,           "motel"           , "") \
228 s (tourism, guest_house,     "guest house"     , "") \
229 s (tourism, hostel,          "hostel"          , "") \
230 s (tourism, chalet,          "chalet"          , "") \
231 s (tourism, camp_site,       "camp site"       , "") \
232 s (tourism, caravan_site,    "caravan site"    , "") \
233 s (amenity, pharmacy,        "pharmacy"        , "") \
234 s (amenity, dentist,         "dentist"         , "") \
235 s (amenity, doctor,          "doctor"          , "") \
236 s (amenity, hospital,        "hospital"        , "") \
237 s (amenity, bank,            "bank"            , "") \
238 s (amenity, bureau_de_change, "bureau de change" , "") \
239 s (amenity, atm,             "atm"            , "") \
240 s (amenity, drinking_water,  "drinking water"  , "") \
241 s (amenity, fountain,        "fountain"        , "") \
242 s (natural, spring,          "spring"          , "") \
243 s (amenity, university,      "university"      , "") \
244 s (amenity, college,         "college"         , "") \
245 s (amenity, kindergarten,    "kindergarten"    , "") \
246 s (highway, living_street,   "living street"   , "") \
247 s (highway, motorway,        "motorway"        , "") \
248 s (highway, motorway_link,   "mway link"       , "") \
249 s (highway, trunk_link,      "trunk link"      , "") \
250 s (highway, primary_link,    "primary_link"    , "") \
251 s (barrier, bollard,         "bollard"         , "") /* First barrier ! */ \
252 s (barrier, gate,            "gate"            , "") \
253 s (barrier, stile,           "stile"           , "") \
254 s (barrier, cattle_grid,     "cattle_grid"     , "") \
255 s (barrier, toll_booth,      "toll_booth"      , "") /* Last barrier ! */ \
256 s (man_made, beacon,         "beacon"          , "" ) \
257 s (man_made, survey_point,   "survey point"    , "" ) \
258 s (man_made, tower,          "tower"           , "" ) \
259 s (man_made, water_tower,    "water tower"     , "" ) \
260 s (man_made, gasometer,      "gasometer"       , "" ) \
261 s (man_made, reservoir_covered, "covered reservoir", "" ) \
262 s (man_made, lighthouse,     "lighthouse"      , "" ) \
263 s (man_made, windmill,       "windmill"        , "" ) \
264 s (man_made, pier,           "pier"            , "" ) \
265 s (man_made, pipeline,       "pipeline"        , "" ) \
266 s (man_made, wastewater_plant, "wastewater plant" , "" ) \
267 s (man_made, crane,          "crane"           , "" ) \
268 s (building, yes,            "building"        , "") \
269 s (landuse, forest,          "forest"          , "") \
270 s (landuse, residential,     "residential area", "") \
271 s (landuse, industrial,      "industrial area" , "") \
272 s (landuse, retail,          "retail area"     , "") \
273 s (landuse, commercial,      "commercial area" , "") \
274 s (landuse, construction,    "construction area" , "") \
275 s (natural, coastline,       "coastline"       , "") \
276 s (natural, water,           "lake / dam"      , "") \
277 s (landuse, basin,           "basin"           , "") \
278 s (landuse, landfill,        "landfill"        , "") \
279 s (landuse, quarry,          "quarry"          , "") \
280 s (landuse, cemetery,        "cemetery"        , "") \
281 s (landuse, allotments,      "allotments"      , "") \
282 s (landuse, farm,            "farmland"        , "") \
283 s (landuse, farmyard,        "farmyard"        , "") \
284 s (landuse, military,        "military area"   , "") \
285 s (religion, bahai,          "bahai"           , \
286               "  <tag k='amenity' v='place_of_worship' />\n") \
287 s (religion, buddhist,       "buddhist"        , \
288               "  <tag k='amenity' v='place_of_worship' />\n") \
289 s (religion, hindu,          "hindu"           , \
290               "  <tag k='amenity' v='place_of_worship' />\n") \
291 s (religion, jain,           "jainism"         , \
292               "  <tag k='amenity' v='place_of_worship' />\n") \
293 s (religion, sikh,           "sikhism"         , \
294               "  <tag k='amenity' v='place_of_worship' />\n") \
295 s (religion, shinto,         "shinto"          , \
296               "  <tag k='amenity' v='place_of_worship' />\n") \
297 s (religion, taoist,         "taoism"          , \
298               "  <tag k='amenity' v='place_of_worship' />\n") \
299 s (highway,         road,     "hway=road"      , "") \
300 /* relations must be last and restriction_no_right_turn must be first */ \
301 s (restriction, no_right_turn, ""              , "") \
302 s (restriction, no_left_turn, ""               , "") \
303 s (restriction, no_u_turn, ""                  , "") \
304 s (restriction, no_straight_on, ""             , "") \
305 /* restriction_no_straight_on must be the last "no_" restriction */ \
306 s (restriction, only_right_turn, ""            , "") \
307 s (restriction, only_left_turn, ""             , "") \
308 s (restriction, only_straight_on, ""           , "") \
309 /* restriction_only_straight_on must be the last restriction */
310
311#define XXXFSDFSF \
312 s (sport,   orienteering,    "orienteering"    , "") \
313 s (sport,   gym,             "gym"             , "") \
314 /* sport=golf isn't a golf course, so what is it ? */ \
315
316#define s(k,v,shortname,extraTags) k ## _ ## v,
317enum { STYLES firstElemStyle }; // highway_residential, ...
318#undef s
319
320struct styleStruct {
321  int  x[16], lineWidth, lineRWidth, lineColour, lineColourBg, dashed;
322  int  scaleMax, areaColour, dummy /* pad to 8 for 64 bit compatibility */;
323  double aveSpeed[layerBit1], invSpeed[layerBit1];
324};
325
326struct ndType {
327  int wayPtr, lat, lon, other[2];
328};
329/* This struct takes up a lot of space, but compressing is possible: If
330other is encoded as byte offset from the current position, it should typically
331be close to 0. So it can be Huffman encoded. Then the struct will no longer
332have a fixed size, and the final position of an nd will not be known during
333the first pass. So we over estimate the space needed between 2 nds and we can
334do multiple passes until all the excess has been removed.
335
336The difference between lat and wayPtr->clat will normally also be quite
337small and can also be Huffman coded. The same applies to lon.
338
339C code can be generated for these non dynamic Huffman decoders and the C
340compiler can then optimize it for efficient decompression. Not only will this
341save (flash) storage, but it will also increase the size of maps that can be
342loaded and reduce the paging that is so slow on mobile devices.
343*/
344
345struct wayType {
346  int bits, destination;
347  int clat, clon, dlat, dlon; /* Centre coordinates and (half)diameter */
348};
349
350inline int Layer (wayType *w) { return w->bits >> 29; }
351
352inline int Latitude (double lat)
353{ /* Mercator projection onto a square means we have to clip
354     everything beyond N85.05 and S85.05 */
355  return lat > 85.051128779 ? 2147483647 : lat < -85.051128779 ? -2147483647 :
356    lrint (log (tan (M_PI / 4 + lat * M_PI / 360)) / M_PI * 2147483648.0);
357}
358
359inline int Longitude (double lon)
360{
361  return lrint (lon / 180 * 2147483648.0);
362}
363
364inline double LatInverse (int lat)
365{
366  return (atan (exp (lat / 2147483648.0 * M_PI)) - M_PI / 4) / M_PI * 360;
367}
368
369inline double LonInverse (int lon)
370{
371  return lon / 2147483648.0 * 180;
372}
373
374/*---------- Global variables -----------*/
375#define searchCnt 40
376extern wayType *gosmSway[searchCnt];
377extern int *hashTable, bucketsMin1, pakHead;
378extern char *gosmData, *gosmSstr[searchCnt];
379/* gosmSstr is no longer nul terminated. If it's a problem, use
380string s (gosmSstr[i], strcspn (gosmSstr[i], "\n")); ... s.c_str() ... */
381
382extern ndType *ndBase;
383extern styleStruct *style;
384extern int stylecount;
385
386inline wayType *Way (ndType *nd) { return (wayType *)(nd->wayPtr+gosmData); }
387
388inline int StyleNr (wayType *w) { return w->bits & ((2 << STYLE_BITS) - 1); }
389
390inline styleStruct *Style (wayType *w) { return &style[StyleNr (w)]; }
391
392unsigned inline ZEnc (int lon, int lat)
393{ // Input as bits : lon15,lon14,...lon0 and lat15,lat14,...,lat0
394  int t = (lon << 16) | lat;
395  t = (t & 0xff0000ff) | ((t & 0x00ff0000) >> 8) | ((t & 0x0000ff00) << 8);
396  t = (t & 0xf00ff00f) | ((t & 0x0f000f00) >> 4) | ((t & 0x00f000f0) << 4);
397  t = (t & 0xc3c3c3c3) | ((t & 0x30303030) >> 2) | ((t & 0x0c0c0c0c) << 2);
398  return (t & 0x99999999) | ((t & 0x44444444) >> 1) | ((t & 0x22222222) << 1);
399} // Output as bits : lon15,lat15,lon14,lat14,...,lon0,lat0
400
401inline int Hash (int lon, int lat, int lowz = 0)
402{ /* All the normal tiles (that make up a super tile) are mapped to sequential
403     buckets thereby improving caching and reducing the number of disk tracks
404     required to render / route through a super tile sized area.
405     The map to sequential buckets is a 2-D Hilbert curve. */
406  if (lowz) {
407    lon >>= 7;
408    lat >>= 7;
409  }
410 
411  int t = ZEnc (lon >> TILEBITS, ((unsigned) lat) >> TILEBITS);
412  int s = ((((unsigned)t & 0xaaaaaaaa) >> 1) | ((t & 0x55555555) << 1)) ^ ~t;
413  // s=ZEnc(lon,lat)^ZEnc(lat,lon), so it can be used to swap lat and lon.
414  #define SUPERTILEBITS (TILEBITS + 8)
415  for (int lead = 1 << (SUPERTILEBITS * 2 - TILEBITS * 2); lead; lead >>= 2) {
416    if (!(t & lead)) t ^= ((t & (lead << 1)) ? s : ~s) & (lead - 1);
417  }
418
419  return (((((t & 0xaaaaaaaa) >> 1) ^ t) + (lon >> SUPERTILEBITS) * 0x00d20381
420    + (lat >> SUPERTILEBITS) * 0x75d087d9) &
421    (lowz ? bucketsMin1 >> 7 : bucketsMin1)) + (lowz ? bucketsMin1 + 1 : 0);
422}
423
424// int TagCmp (const char *a, const char *b); // Only used in libgosm
425
426struct OsmItr { // Iterate over all the objects in a square
427  ndType *nd[1]; /* Readonly. Either can be 'from' or 'to', but you */
428  /* can be guaranteed that nodes will be in hs[0] */
429 
430  int slat, slon, left, right, top, bottom, tsize; /* Private */
431  ndType *end;
432 
433  OsmItr (int l, int t, int r, int b)
434  {
435    tsize = r - l > 1500000 ? TILESIZE << 7 : TILESIZE;
436    left = l & (~(tsize - 1));
437    right = (r + tsize - 1) & (~(tsize-1));
438    top = t & (~(tsize - 1));
439    bottom = (b + tsize - 1) & (~(tsize-1));
440   
441    slat = top;
442    slon = left - tsize;
443    nd[0] = end = NULL;
444  }
445};
446
447int Next (OsmItr &itr); /* Friend of osmItr */
448
449struct routeNodeType {
450  ndType *nd;
451  routeNodeType *shortest;
452  int heapIdx, dir, remain; // Dir is 0 or 1
453  // if heapIdx is negative, the node is not in the heap and best = -heapIdx.
454};
455/* The data is split over two structures (routeNodeType and routeHeapType).
456  Some of these fields may cause fewer cache misses if their are in
457  routeHeapType */
458struct routeHeapType {
459  routeNodeType *r;
460  int best;
461};
462
463extern routeNodeType *route, *shortest;
464extern routeHeapType *routeHeap;
465extern int routeHeapSize, tlat, tlon, flat, flon, rlat, rlon, routeSuccess;
466
467void Route (int recalculate, int plon, int plat, int Vehicle, int fast);
468int RouteLoop (void);
469void GosmFreeRoute (void);
470
471int JunctionType (ndType *nd);
472
473int *GosmIdxSearch (const char *key, unsigned z);
474// GosmIdxSearch is only exported in order to find unique object, like cities.
475void GosmSearch (int clon, int clat, const char *key);
476
477int GosmInit (void *d, long size);
478
479// *** EVERYTHING AFTER THIS POINT IS NOT IN THE WINDOWS BUILDS ***
480
481#ifndef _WIN32_WCE
482
483void GosmLoadAltStyle(const char* elemstylefile, const char* iconscsvfile);
484
485// struct to hold mappings between elemstyles.xml and stylesrec
486// these are needed when the osm file is converted to a pak file
487typedef struct {
488  char style_k[80];
489  char style_v[80];
490  int ruleNr;
491  int defaultRestrict;
492} elemstyleMapping;
493
494// reads the elemstyles.xml file into srec, with the mapping between
495// srec and elemstyles.xml stored in map, and the list of maximum
496// speeds for each vehicle type in maxspeeds. styleCnt representing
497// the location of the first elemstyle. Returns the final styleCnt.
498int LoadElemstyles(/* in */ const char *elemstylesfname, 
499                   const char *iconsfname,
500                   /* out */ styleStruct *srec, elemstyleMapping *map);
501
502// creates a new pakfile from an osmdata file read from standard in
503int RebuildPak(const char* pakfile, const char* elemstylefile, 
504               const char* iconscsvfile, const char* masterpakfile, 
505               const int bbox[4]);
506int SortRelations (void);
507
508#endif // #ifndef _WIN32
509
510void logprintf(const char *format, ...);
511
512#endif
Note: See TracBrowser for help on using the repository browser.