Commit dc47ec3f authored by Emmanuel Christophe's avatar Emmanuel Christophe

Working with todays svn mapnik version

parent 93b96a2f
......@@ -12,9 +12,9 @@ ELSE(OTB_FOUND)
ENDIF(OTB_FOUND)
# INCLUDE_DIRECTORIES("/home/christop/slash/include" )
INCLUDE_DIRECTORIES("/home/christop/slash/include" )
INCLUDE_DIRECTORIES("/usr/include/freetype2" )
# LINK_DIRECTORIES("/home/christop/slash/lib")
LINK_DIRECTORIES("/home/christop/slash/lib64")
......
......@@ -156,7 +156,8 @@ int main(int argc, char * argv[])
projection->SetInput(reader->GetOutput());
projection->Update();
mapnik::datasource_cache::instance()->register_datasources( "/usr/lib/mapnik/0.5/input");
mapnik::datasource_cache::instance()->register_datasources( "/home/christop/opensource/mapnik/plugins/input/shape");
// mapnik::datasource_cache::instance()->register_datasources( "/usr/lib/mapnik/0.5/input");
mapnik::freetype_engine::register_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
mapnik::Map m(800,600);
m.set_background(mapnik::color_factory::from_string("cadetblue"));
......@@ -165,8 +166,8 @@ int main(int argc, char * argv[])
mapnik::rule_type rule;
rule.set_max_scale(250000000000LLU);
rule.set_min_scale(600000);
// rule.append(polygon_symbolizer(color("#f2efe9")));
rule.append(mapnik::polygon_symbolizer(mapnik::Color(242,239,233)));
rule.append(mapnik::line_symbolizer(mapnik::color("#f2efe9")));
// rule.append(mapnik::polygon_symbolizer(mapnik::Color(242,239,233)));
style.add_rule(rule);
m.insert_style("world",style);
}
......@@ -174,8 +175,8 @@ int main(int argc, char * argv[])
mapnik::feature_type_style style;
mapnik::rule_type rule;
rule.set_max_scale(600000);
// rule.append(polygon_symbolizer(color("#f2efe9")));
rule.append(mapnik::polygon_symbolizer(mapnik::Color(242,239,233)));
rule.append(mapnik::line_symbolizer(mapnik::color("#f2efe9")));
// rule.append(mapnik::polygon_symbolizer(mapnik::Color(242,239,233)));
style.add_rule(rule);
m.insert_style("coast-poly",style);
}
......@@ -188,6 +189,7 @@ int main(int argc, char * argv[])
ProcessNode(inputRoot,mDatasource);
std::cout << "Datasource size: " << mDatasource->size() << std::endl;
......@@ -196,9 +198,9 @@ int main(int argc, char * argv[])
p["file"]="world_borders";
mapnik::Layer lyr("world");
lyr.set_datasource(mapnik::datasource_cache::instance()->create(p));
// lyr.set_datasource(mDatasource);
lyr.add_style("world");
// lyr.set_datasource(mapnik::datasource_cache::instance()->create(p));
lyr.set_datasource(mDatasource);
lyr.add_style("coast-poly");
m.addLayer(lyr);
......
......@@ -11,12 +11,10 @@
#include <mapnik/memory_datasource.hpp>
#include <iostream>
int main ( int argc , char** argv)
{
using namespace mapnik;
mapnik::datasource_cache::instance()->register_datasources( "/usr/lib/mapnik/0.5/input");
// datasource_cache::instance()->register_datasources( "/home/christop/opensource/mapnik/plugins/input/shape");
datasource_cache::instance()->register_datasources( "/home/christop/opensource/mapnik/plugins/input/shape");
freetype_engine::register_font("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
......@@ -37,8 +35,7 @@ int main ( int argc , char** argv)
rule_type rule;
rule.set_max_scale(250000000000LLU);
rule.set_min_scale(600000);
// rule.append(polygon_symbolizer(color("#f2efe9")));
rule.append(polygon_symbolizer(Color(242,239,233)));
rule.append(polygon_symbolizer(color("#f2efe9")));
style.add_rule(rule);
m.insert_style("world",style);
}
......@@ -46,8 +43,7 @@ int main ( int argc , char** argv)
feature_type_style style;
rule_type rule;
rule.set_max_scale(600000);
// rule.append(polygon_symbolizer(color("#f2efe9")));
rule.append(polygon_symbolizer(Color(242,239,233)));
rule.append(polygon_symbolizer(color("#f2efe9")));
style.add_rule(rule);
m.insert_style("coast-poly",style);
}
......@@ -63,6 +59,7 @@ int main ( int argc , char** argv)
line->line_to(45,45);
line->line_to(50,30);
line->line_to(0,-30);
line->line_to(-50,-50);
std::cout << line->num_points() << std::endl;
typedef boost::shared_ptr<raster> raster_ptr;
......@@ -85,6 +82,7 @@ int main ( int argc , char** argv)
// lyr.set_datasource(datasource_cache::instance()->create(p));
lyr.set_datasource(mDatasource);
lyr.add_style("world");
// lyr.add_style("coast-poly");
m.addLayer(lyr);
......@@ -98,4 +96,4 @@ int main ( int argc , char** argv)
return EXIT_SUCCESS;
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment