81 vector <CONVERTER::CellSpace*> CellSpace_vector;
82 vector <CONVERTER::CellSpaceBoundary*>CellSpaceBoundary_vector;
83 vector <CONVERTER::State*>State_vector;
84 vector <CONVERTER::Transition*>Transition_vector;
85 vector <CONVERTER::Pos*> node_vector;
86 vector <CONVERTER::IC*> IC_vector;
87 cout <<
"OSM to ..."<<endl ;
90 ifstream theFile (PATH);
91 vector<char> buffer((istreambuf_iterator<char>(theFile)), istreambuf_iterator<char>());
92 buffer.push_back(
'\0');
93 doc.
parse<0>(&buffer[0]);
101 node_input->
osm_id=osm_str;
104 node_vector.push_back(node_input);
105 IC_vector.push_back(node_input);
109 for (
xml_node<> * xml_relation = root_node->
first_node(
"relation"); xml_relation; xml_relation = xml_relation->next_sibling(
"relation")) {
110 if(xml_relation->first_attribute(
"action")!=NULL)
111 if(strcmp(xml_relation->first_attribute(
"action")->value(),
"delete")==0)
continue;
113 if(xml_tag==NULL)
continue;
115 for(
xml_node<> * xml_member = xml_relation->
first_node(
"member"); xml_member; xml_member = xml_member->next_sibling(
"member")){
117 std::string osm_str(xml_member->first_attribute(
"ref")->value());
118 cellspace_input->
osm_id=osm_str;
120 cellspace_input->
outer=1;
121 CellSpace_vector.push_back(cellspace_input);
122 IC_vector.push_back(cellspace_input);
126 for(
xml_node<> * xml_member = xml_relation->
first_node(
"member"); xml_member; xml_member = xml_member->next_sibling(
"member")){
128 std::string osm_str(xml_member->first_attribute(
"ref")->value());
129 cellspaceboundary_input->
osm_id=osm_str;
131 CellSpaceBoundary_vector.push_back(cellspaceboundary_input);
132 IC_vector.push_back(cellspaceboundary_input);
136 for(
xml_node<> * xml_member = xml_relation->
first_node(
"member"); xml_member; xml_member = xml_member->next_sibling(
"member")){
138 std::string osm_str(xml_member->first_attribute(
"ref")->value());
142 State_vector.push_back(state_input);
143 IC_vector.push_back(state_input);
147 for(
xml_node<> * xml_member = xml_relation->
first_node(
"member"); xml_member; xml_member = xml_member->next_sibling(
"member")){
149 std::string osm_str(xml_member->first_attribute(
"ref")->value());
150 transition_input->
osm_id=osm_str;
152 Transition_vector.push_back(transition_input);
153 IC_vector.push_back(transition_input);
157 for (
xml_node<> * xml_way = root_node->
first_node(
"way"); xml_way; xml_way = xml_way->next_sibling(
"way")) {
158 if(xml_way->first_attribute(
"action")!=NULL)
159 if(strcmp(xml_way->first_attribute(
"action")->value(),
"delete")==0)
continue;
160 std::vector<CONVERTER::IC*>close;
162 std::string osm_str(xml_nd->first_attribute(
"ref")->value());
166 std::string osm_str(xml_way->first_attribute(
"id")->value());
167 if(
matching_id(CellSpace_vector,osm_str)!=NULL)
continue;
169 cellspace_input->
osm_id=osm_str;
173 cellspace_input->
outer=1;
176 CellSpace_vector.push_back(cellspace_input);
177 IC_vector.push_back(cellspace_input);
180 for (
xml_node<> * xml_way = root_node->
first_node(
"way"); xml_way; xml_way = xml_way->next_sibling(
"way")) {
181 std::string osm_str(xml_way->first_attribute(
"id")->value());
185 std::string nd_str(xml_nd->first_attribute(
"ref")->value());
219 if(
matching_id(CellSpaceBoundary_vector,osm_str)!=NULL){
222 std::string nd_str(xml_nd->first_attribute(
"ref")->value());
235 std::string nd_str(xml_nd->first_attribute(
"ref")->value());
253 it->storey=Transition_Pointer->
storey;
260 for (
xml_node<> * xml_relation = root_node->
first_node(
"relation"); xml_relation; xml_relation = xml_relation->next_sibling(
"relation")) {
262 if(xml_tag==NULL)
continue;
299 for (
xml_node<> * xml_relation = root_node->
first_node(
"relation"); xml_relation; xml_relation = xml_relation->next_sibling(
"relation")) {
307 if(level==99999)
continue;
317 if(IC_POINTER==NULL)
continue;
T1 matching_id(std::vector< T1 > &a, string b)
xml_node< Ch > * next_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
std::vector< Pos * > pos_vector
std::vector< Pos * > pos_vector
std::vector< IC * > inner
xml_node< Ch > * first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Parent class both Indoorgml and OSM.
std::vector< Pos * > pos_vector
Transition class in IndoorGML, Transition(way) in OSM weight in IndoorGML Member of pos in Transiti...
string Read_tag(string input)
CellSpaceBoundary class in IndoorGML, CellSpaceBoundary(way) in OSM Member of pos in CellSpaceBounda...
bool Cellspace_check(std::vector< CONVERTER::IC *>input)
Pos class in IndoorGML, Node in OSM latitude in OSM and IndoorGML longitude in OSM and IndoorGML h...
State class in IndoorGML, State(Node) in OSM State Pos.
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
char * lowercase(char *input)
change char * to lower case