Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 1046 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1046 Rev 1055
Line 113... Line 113...
113
			$this->insererRelationsCommunes();
113
			$this->insererRelationsCommunes();
114
		}
114
		}
115
	}
115
	}
Line 116... Line 116...
116
 
116
 
-
 
117
	private function analyserChemins($relation_id, $chemins) {
117
	private function analyserChemins($relation_id, $chemins) {
118
		$ordreChemin = 1;
118
		foreach ($chemins as $chemin) {
119
		foreach ($chemins as $chemin) {
119
			if ($chemin->getAttribute('type') == 'way') { //écarter le noeud centrale
120
			if ($chemin->getAttribute('type') == 'way') { //écarter le noeud centrale
120
				$chemin_id = $chemin->getAttribute('ref');
121
				$chemin_id = $chemin->getAttribute('ref');
121
				$role = $chemin->getAttribute('role');//role: null, inner, outer, exclave et enclave.
122
				$role = $chemin->getAttribute('role');//role: null, inner, outer, exclave et enclave.
122
				$this->relation_a_chemins[] = array($relation_id, $chemin_id, $role);
123
				$this->relation_a_chemins[] = array($relation_id, $chemin_id, $role, $ordreChemin++);
123
			}
124
			}
124
		}
125
		}
Line 125... Line 126...
125
	}
126
	}
Line 202... Line 203...
202
		$this->relations_communes = array();
203
		$this->relations_communes = array();
203
	}
204
	}
Line 204... Line 205...
204
 
205
 
205
	private function insererRelationAChemins() {
206
	private function insererRelationAChemins() {
206
		if (count($this->relation_a_chemins) > 0) {
207
		if (count($this->relation_a_chemins) > 0) {
207
			$requete = 'INSERT INTO osm_relation_a_chemins (id_relation, id_chemin, role) '.
208
			$requete = 'INSERT INTO osm_relation_a_chemins (id_relation, id_chemin, role, ordre) '.
208
				'VALUES '.$this->creerValuesMultiple($this->relation_a_chemins).
209
				'VALUES '.$this->creerValuesMultiple($this->relation_a_chemins).
209
				' -- '.__FILE__.' : '.__LINE__;
210
				' -- '.__FILE__.' : '.__LINE__;
210
			$this->bdd->requeter($requete);
211
			$this->bdd->requeter($requete);
211
		}
212
		}