Ejemplo n.º 1
0
int main(int argc, char** argv)
{
    mapnik::parameters params;
    benchmark::handle_args(argc,argv,params);
    test test_runner(params);
    run(test_runner,"expr: grammer per parse");
    test2 test_runner2(params);
    return run(test_runner2,"expr: reuse grammar");
}
Ejemplo n.º 2
0
// echo -180 -60 | cs2cs -f "%.10f" +init=epsg:4326 +to +init=epsg:3857
int main(int argc, char** argv)
{
    mapnik::parameters params;
    benchmark::handle_args(argc,argv,params);
    mapnik::box2d<double> from(-180,-80,180,80);
    mapnik::box2d<double> to(-20037508.3427892476,-15538711.0963092316,20037508.3427892476,15538711.0963092316);
    std::string from_str("+init=epsg:4326");
    std::string to_str("+init=epsg:3857");
    std::string from_str2("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs");
    std::string to_str2("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over");
    int return_value = 0;
    test test_runner(params,
                     from_str,
                     to_str,
                     from,
                     to,
                     true);
    return_value = return_value | run(test_runner,"lonlat->merc epsg");
    test test_runner2(params,
                     from_str2,
                     to_str2,
                     from,
                     to,
                     true);
    return_value = return_value | run(test_runner2,"lonlat->merc literal");
    test test_runner3(params,
                     to_str,
                     from_str,
                     to,
                     from,
                     true);
    return_value = return_value | run(test_runner3,"merc->lonlat epsg");
    test test_runner4(params,
                     to_str2,
                     from_str2,
                     to,
                     from,
                     true);
    return_value = return_value | run(test_runner4,"merc->lonlat literal");
    return return_value;
}
Ejemplo n.º 3
0
int main(int argc, char** argv)
{
    int return_value = 0;
    try
    {
        mapnik::parameters params;
        benchmark::handle_args(argc,argv,params);
        {
            test test_runner(params);
            return_value = return_value | run(test_runner,"std::getline");
        }
        {
            test2 test_runner2(params);
            return_value = return_value | run(test_runner2,"csv_utils::getline_csv");
        }
    }
    catch (std::exception const& ex)
    {
        std::clog << ex.what() << "\n";
        return -1;
    }
    return return_value;
}