nidhaletec
Messages postés
44
Date d'inscription
jeudi 12 juin 2008
Statut
Membre
Dernière intervention
28 mars 2009
24 janv. 2009 à 20:00
pour que vous comprenez plus la question;
c une partie d'un code que je cherche a l'adapter sur les donnees que j'en ai:
// specify data
enum nodes {
Troy, LakePlacid, Plattsburgh, Massena, Watertown, Utica,
Syracuse, Rochester, Buffalo, Ithaca, Binghamton, Woodstock,
NewYork, N
};
const char *name[] = {
"Troy", "Lake Placid", "Plattsburgh", "Massena",
"Watertown", "Utica", "Syracuse", "Rochester", "Buffalo",
"Ithaca", "Binghamton", "Woodstock", "New York"
};
location locations[] = { // lat/long
{42.73, 73.68}, {44.28, 73.99}, {44.70, 73.46},
{44.93, 74.89}, {43.97, 75.91}, {43.10, 75.23},
8
{43.04, 76.14}, {43.17, 77.61}, {42.89, 78.86},
{42.44, 76.50}, {42.10, 75.91}, {42.04, 74.11},
{40.67, 73.94}
};
edge edge_array[] = {
edge(Troy,Utica), edge(Troy,LakePlacid),
edge(Troy,Plattsburgh), edge(LakePlacid,Plattsburgh),
edge(Plattsburgh,Massena), edge(LakePlacid,Massena),
edge(Massena,Watertown), edge(Watertown,Utica),
edge(Watertown,Syracuse), edge(Utica,Syracuse),
edge(Syracuse,Rochester), edge(Rochester,Buffalo),
edge(Syracuse,Ithaca), edge(Ithaca,Binghamton),
edge(Ithaca,Rochester), edge(Binghamton,Troy),
edge(Binghamton,Woodstock), edge(Binghamton,NewYork),
edge(Syracuse,Binghamton), edge(Woodstock,Troy),
edge(Woodstock,NewYork)
};
ces nodes ce ne sont pas que je vais utiliser mais j'ai deja un code qui rends les latitudes et les longitudes des points que je vais utiliser.
et voila une partie du code :
void dotest(OSM::Components *comp1)
{
comp1->rewindNodes();
comp1->rewindWays();
while (comp1->hasMoreNodes())
{
OSM::Node *n = comp1->nextNode();
cout << "Node id: " << n->id() << " lat: " << n->getLat() << " lon: "