共有 0 个贴子
没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
oss.trustie.net/open_source_projects | 主页 > 开源项目社区 > dodomet |
dodomet
|
0 | 0 | 10 |
贡献者 | 讨论 | 代码提交 |
My atmospheric routinesin IDL/C/C++/Matlab/shell
Featured stuffs:A C++ lib for reading and editing MM5 model data files. Introduction:
http://code.google.com/p/dodomet/wiki/mm5_lib_intro
source code:
http://code.google.com/p/dodomet/source/browse/#svn/cpp/mm5
A simple plotting lib in C++ !!!FAR FROM FINISHED YET!!!
This lib is based on cairomm (plotting part) and Frank Warmerdam's shapelib (map part).
demo: color
demo: map, generated with code:
// setting up a Lambert conic projection,
// with (16N, 30N) as the parallel latitudes,
// and (104W, 24N) as reference point, and two other points confines the bound of the map
Point top_left(-120, 36);
Point bottom_right(-80, 10);
Lambert proj(16, 30, -104, 24, top_left, bottom_right);
// loading 4 map layers and bind the data to the projection
Map_Data states_data("mexico/states.shp");
Map_Data rivers_data("mexico/rivers.shp");
Map_Data lakes_data("mexico/lakes.shp");
Map_Data roads_data("mexico/roads.shp");
Map states_map(states_data, proj);
Map rivers_map(rivers_data, proj);
Map lakes_map(lakes_data, proj);
Map roads_map(roads_data, proj);
// tuning the details
states_map.set_fill_color(Color(0.95, 0.85, 0.6));
rivers_map.set_line_color(BLUE);
rivers_map.set_line_thick(1.2);
lakes_map.set_line_thick(0.8);
lakes_map.set_line_color(BLUE);
lakes_map.set_fill_color(Color(0.2, 0.5, 0.9));
roads_map.set_line_color(Color(0.5, 0.5, 0.5));
roads_map.set_line_thick(1.5);
// overlaying the 4 layers
// new added: Picture::operator+ for overlaying pictures center aligned
Picture final = states_map + rivers_map + lakes_map + roads_map;
Canvas canvas;
canvas.draw(final);
canvas.write_png("mexico.png");
demo: plot prototype