source: branches/client-library-split/osm05.h @ 80

Last change on this file since 80 was 80, checked in by simon, 5 years ago

Relicense all code as LGPL. This was approved by Marius. Add AUTHORS and COPYING file

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Date Author Id Revision HeadURL"
  • Property svn:mime-type set to text/x-chdr
File size: 2.2 KB
Line 
1/*
2 * Memphis - Cairo Rederer for OSM in C
3 * Copyright (C) 2008  Marius Rieder <marius.rieder@durchmesser.ch>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20#ifndef OSM05_H
21#define OSM05_H
22
23#include <glib.h>
24
25typedef struct osmTag_ osmTag;
26struct osmTag_ {
27        char *key;
28        char *value;
29        osmTag *next;
30    };
31
32typedef struct osmNode_ osmNode;
33struct osmNode_ {
34        int id;
35        float lat;
36        float lon;
37        short int layer;
38        osmTag *tag;
39        osmNode *next;
40    };
41
42typedef struct osmWay_ osmWay;
43struct osmWay_ {
44        int id;
45        short int layer;
46        char    *name;
47        osmTag  *tag;
48        GSList  *nd;
49        osmWay  *next;
50    };
51
52typedef struct osmMember_ osmMember;
53struct osmMember_ {
54        osmNode     *node;
55        osmWay      *way;
56        char        *role;
57        osmMember   *next;
58    };
59
60typedef struct osmRelation_ omsRelation;
61struct osmRelation_ {
62        int         id;
63        osmTag      *tag;
64        osmMember   *member;
65    };
66
67typedef struct osmFile_ osmFile;
68struct osmFile_ {
69        osmNode         *nodes;     // Node List
70        GHashTable      *nodeidx;   // Node Hash
71        unsigned int    nodecnt;    // Node Count
72        osmWay          *ways;
73        unsigned int    waycnt;
74        float           minlat;
75        float           minlon;
76        float           maxlat;
77        float           maxlon;
78    };
79
80/*
81 * Prototypes
82 */
83osmFile* osmRead(char *filename);
84void osmFree(osmFile *osm);
85
86#endif /* OSM05_H */
87
88/*
89 * vim: expandtab shiftwidth=4 tabstop=4:
90 */
91
Note: See TracBrowser for help on using the repository browser.