Exemplo n.º 1
0
void OnDisplay()
{
    osmscout::MapData data;

    projection.Set(lon,
                   lat,
                   zoom,
                   width,
                   height);

    if (!database.LoadData(projection,
                           data)) {
        std::cerr << "Cannot load data" << std::endl;
        return;
    }

    glClear(GL_COLOR_BUFFER_BIT);
    glLoadIdentity();

    //glTranslated(-width/2.0,-height/2.0,-9.0);
    //glRotatef(-15.0f,1.0f,0.0f,0.0f);

    if (!painter.DrawMap(*database.GetStyleConfig(),
                         projection,
                         drawParameter,
                         data)) {
        std::cerr << "Cannot render" << std::endl;
        return;
    }

    // swap buffers to display, since we're double buffered.
    glutSwapBuffers();
}
Exemplo n.º 2
0
void ParallelPlaneManager::dbgDatabaseLoad(){
    Database db;
    db.LoadData("test_nominal_scrub.csv");
    db.dbgData(10);

    QString min_range = "";
    QString max_range = "";
    for(int c = 0; c < db.NumColumns(); c++){
        min_range += QString::number(db.Min(c)) + " ";
        max_range += QString::number(db.Max(c)) + " ";
    }
    qDebug() << "Min Range: " << min_range;
    qDebug() << "Max Range: " << max_range;
}