source: trunk/osm05.h @ 16

Last change on this file since 16 was 16, checked in by marius, 6 years ago

start using glib

  • Property svn:eol-style set to native
  • Property svn:keywords set to "Date Author Id Revision HeadURL"
  • Property svn:mime-type set to text/plain
File size: 2.0 KB
Line 
1/*
2 * Memphis - Cairo Rederer for OSM in C
3 * Copyright (C) 2008  <marius.rieder@durchmesser.ch>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, 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;
70        GHashTable  *nodeidx;
71        osmWay      *ways;
72        float       minlat;
73        float       minlon;
74        float       maxlat;
75        float       maxlon;
76    };
77
78/*
79 * Prototypes
80 */
81osmFile* osmRead(char *filename);
82
83#endif /* OSM05_H */
84
85/*
86 * vim: expandtab shiftwidth=4 tabstop=4:
87 */
88
Note: See TracBrowser for help on using the repository browser.