yakra / tmtools

Tools to aid in development of the TravelMapping project
0 stars 0 forks source link

canvas: rg & sys brainstorming #45

Closed yakra closed 6 years ago

yakra commented 6 years ago

vector\<string> IncludeSys should list full path of CSVs, to enable mixing canonical systems & custom CSVs

SYS

SYS & RG

RG

Neither RG nor SYS

User-specified CSV only

// PSEUDOCODE

           // obtain IncludeSys vector
/* NOPE */ if (IncludeSys.empty() && !IncludeRG.empty())
            // use dirent to obtain list of systems for each region
            // add systems to IncludeSys vector, DBFmine style to avoid duplications

/* No wait, never mind! This is redundant, accomplished by scanning all system
   CSVs and then restricting them to the specified regions. It may take a while
   to process, but I don't have to write any extra code.

           // pass IncludeSys to ReadSysCSV
/* DONE */ bool ReadSysCSV(vector<string>, bool)
           // ...
/* DONE */ ReadSysCSV(IncludeSys, IncludeSys.empty());
           // ...
/* DONE */ bool envV::ReadSysCSV(vector<string> &IncludeSys, bool PushToVector)
           {    // yadda yadda
            try {   // yadda yadda
/* DONE */      if (PushToVector) IncludeSys.push_back(Repo+"hwy_data/_systems/"+System+".csv");
                }
            // catch, yadda yadda, indentation, closing braces
           }

           // pass each CSV to ChoppedRtesCSV and proceed from there
/* DONE */ for (unsigned int i = 0; i < IncludeSys.size() i++)
/* DONE */  ChoppedRtesCSV(HwyVec, env.IncludeRG, env.IncludeSys[i], env.Repo+"hwy_data/", 1);

...Does this all make sense? Double-check...

Yeah, looks about right.