def genMeshDynamicMobmap(mesh, meshFileName, mobmapFile, timestamp):
    wf = open(mobmapFile, 'w')
    wf.write(('@static-mesh' + '\n'))
    wf.write((','.join([str(x) for x in [mesh.minLat, mesh.minLon, mesh.dLat, mesh.dLon]]) + '\n'))
    with open(meshFileName, 'r') as rf:
        for line in csv.reader(rf):
            if (timestamp != line[0]):
                continue
            else:
                meshid = line[1]
                number = line[2]
                (xi, yi) = mesh.Index[int(meshid)]
                wf.write((','.join([str(item) for item in [yi, xi, number]]) + '\n'))
    wf.close()
def genMeshDynamicMobmap(mesh, meshFileName, mobmapFile, timestamp):
    wf = open(mobmapFile, 'w')
    wf.write(('@static-mesh' + '\n'))
    wf.write((','.join([str(x) for x in [mesh.minLat, mesh.minLon, mesh.dLat, mesh.dLon]]) + '\n'))
    with open(meshFileName, 'r') as rf:
        for line in csv.reader(rf):
            if (timestamp != line[0]):
                continue
            else:
                meshid = line[1]
                number = line[2]
                (xi, yi) = mesh.Index[int(meshid)]
                wf.write((','.join([str(item) for item in [yi, xi, number]]) + '\n'))
    wf.close()