source: subversion/applications/rendering/gosmore/libgosm.h @ 22745

Last change on this file since 22745 was 21720, checked in by dvaey, 9 years ago

Fix minor wince compiler warnings

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