| 1 | /***************************************************************************
|
|---|
| 2 | * Copyright (C) 2008 by Daniel Wendt *
|
|---|
| 3 | * gentoo.murray@gmail.com *
|
|---|
| 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 *
|
|---|
| 17 | * Free Software Foundation, Inc., *
|
|---|
| 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|---|
| 19 | ***************************************************************************/
|
|---|
| 20 | #ifndef WAY_H
|
|---|
| 21 | #define WAY_H
|
|---|
| 22 |
|
|---|
| 23 | namespace osm
|
|---|
| 24 | {
|
|---|
| 25 |
|
|---|
| 26 | class Node;
|
|---|
| 27 |
|
|---|
| 28 | /**
|
|---|
| 29 | \code
|
|---|
| 30 | <way id="20215432" visible="true" timestamp="2008-01-09T22:35:16+00:00" user="Pferdo">
|
|---|
| 31 | <nd ref="213794929"/>
|
|---|
| 32 | <nd ref="213795470"/>
|
|---|
| 33 | <nd ref="213795483"/>
|
|---|
| 34 | <nd ref="213795493"/>
|
|---|
| 35 | <nd ref="213795506"/>
|
|---|
| 36 | <nd ref="213795517"/>
|
|---|
| 37 | <nd ref="213795527"/>
|
|---|
| 38 | <nd ref="213795541"/>
|
|---|
| 39 | <nd ref="213795552"/>
|
|---|
| 40 | <nd ref="213795561"/>
|
|---|
| 41 | <nd ref="213795571"/>
|
|---|
| 42 | <tag k="name" v="Pfänderweg"/>
|
|---|
| 43 | <tag k="created_by" v="JOSM"/>
|
|---|
| 44 | <tag k="highway" v="residential"/>
|
|---|
| 45 | </way>
|
|---|
| 46 | \endcode
|
|---|
| 47 | */
|
|---|
| 48 | class Way
|
|---|
| 49 | {
|
|---|
| 50 | public:
|
|---|
| 51 | //! Do not delete nodes in this container!
|
|---|
| 52 | std::vector<Node*> m_NodeRefs;
|
|---|
| 53 | //! ID of the way
|
|---|
| 54 | long long id;
|
|---|
| 55 | bool visible;
|
|---|
| 56 | //! name of the street
|
|---|
| 57 | std::string name;
|
|---|
| 58 | //! type of the street, for example "motorway"
|
|---|
| 59 | //std::string highway;
|
|---|
| 60 | |
|---|
| 61 | std::string type; |
|---|
| 62 | std::string clss; |
|---|
| 63 | |
|---|
| 64 | //long long type; |
|---|
| 65 | //long long clss; |
|---|
| 66 | |
|---|
| 67 | //! geometry of the street
|
|---|
| 68 | std::string geom;
|
|---|
| 69 | //! length of the street
|
|---|
| 70 | |
|---|
| 71 | double length;
|
|---|
| 72 | bool oneway;
|
|---|
| 73 | |
|---|
| 74 | public:
|
|---|
| 75 | /**
|
|---|
| 76 | * Constructor
|
|---|
| 77 | * @param id ID of the way
|
|---|
| 78 | */
|
|---|
| 79 | Way( long long id, bool visible );
|
|---|
| 80 | //! Destructor
|
|---|
| 81 | ~Way();
|
|---|
| 82 | /**
|
|---|
| 83 | * saves the nodes of the way
|
|---|
| 84 | * @param pNode node
|
|---|
| 85 | */
|
|---|
| 86 | void AddNodeRef( Node* pNode );
|
|---|
| 87 | };
|
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 | } // end namespace osm
|
|---|
| 91 | #endif
|
|---|