import os
import csv
os.chdir("")

## Construction du graphe
Gis=dict()
with open('reseauisere.csv') as res:
    res=csv.reader(res)
    for row in res:
        if row[0]!='Geo Point':
            sd='B'+str(row[13])
            sommet(Gis,sd)
            sf='B'+str(row[14])
            sommet(Gis,sf)
            strcoor=row[2][17:-29].replace('[','').replace(']','')
            listcoor=strcoor.split(',')
            listcoor=[float(e) for e in listcoor]
            Gis[sd]['XY']=[listcoor[0],listcoor[1]]
            Gis[sf]['XY']=[listcoor[-2],listcoor[-1]]
            arete(Gis,sd,sf,int(row[6])-int(row[5]))
