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

Last change on this file since 18177 was 18177, checked in by nic, 10 years ago

New maxspeed code
Updated tags
Compass option
Background colour option with automatic night mode
New icons.csv format
Make links relative for better pak file compression
Better routing memory management under Linux.
Better polygon rendering and 3D support.

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