Btw - the programm crashes during loading the map as soon as I have declared a
parameters object. It does not matter if I use this parameters object or not.
datasource_cache::instance()->register_datasources
("/usr/lib/mapnik/0.7/input/");
freetype_engine::register_font
("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
Map map (tdim,tdim);
load_map(map,"/home/tom/Desktop/test2.xml");
parameters p;
for(int count=0; count<map.layerCount(); count++)
{
qDebug() << "layer name = " << map.getLayer(count).name().c_str();
}
The error message:
REV_HMI: /usr/include/boost/variant/detail/visitation_impl.hpp:203: typename
Visitor::result_type boost::detail::variant::visitation_impl(int, int,
Visitor&, VPCV, mpl_::true_, NBF, W*, S*) [with W =
boost::detail::variant::visitation_impl(int, int, Visitor&, VoidPtrCV,
mpl_::false_, NoBackupFlag, Which*, step0*) [with Which = boost::variant<T0,
T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17,
T18, T19>::internal_apply_visitor_impl(int, int, Visitor&, VoidPtrCV) [with
Visitor = boost::detail::variant::copy_into, VoidPtrCV = const void*, T0_ =
int, T1 = double, T2 = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T3 = boost::detail::variant::void_, T4 =
boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 =
boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 =
boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 =
boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 =
boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 =
boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 =
boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 =
boost::detail::variant::void_, T19 =
boost::detail::variant::void_]::first_which, step0 = boost::variant<T0, T1, T2,
T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18,
T19>::internal_apply_visitor_impl(int, int, Visitor&, VoidPtrCV) [with Visitor
= boost::detail::variant::copy_into, VoidPtrCV = const void*, T0_ = int, T1 =
double, T2 = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T3 = boost::detail::variant::void_, T4 =
boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 =
boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 =
boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 =
boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 =
boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 =
boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 =
boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 =
boost::detail::variant::void_, T19 =
boost::detail::variant::void_]::first_step, Visitor =
boost::detail::variant::copy_into, VoidPtrCV = const void*, NoBackupFlag =
boost::variant<int, double, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_,
boost::detail::variant::void_>::has_fallback_type_]::next_which, S =
boost::detail::variant::visitation_impl(int, int, Visitor&, VoidPtrCV,
mpl_::false_, NoBackupFlag, Which*, step0*) [with Which = boost::variant<T0,
T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17,
T18, T19>::internal_apply_visitor_impl(int, int, Visitor&, VoidPtrCV) [with
Visitor = boost::detail::variant::copy_into, VoidPtrCV = const void*, T0_ =
int, T1 = double, T2 = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T3 = boost::detail::variant::void_, T4 =
boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 =
boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 =
boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 =
boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 =
boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 =
boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 =
boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 =
boost::detail::variant::void_, T19 =
boost::detail::variant::void_]::first_which, step0 = boost::variant<T0, T1, T2,
T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18,
T19>::internal_apply_visitor_impl(int, int, Visitor&, VoidPtrCV) [with Visitor
= boost::detail::variant::copy_into, VoidPtrCV = const void*, T0_ = int, T1 =
double, T2 = std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, T3 = boost::detail::variant::void_, T4 =
boost::detail::variant::void_, T5 = boost::detail::variant::void_, T6 =
boost::detail::variant::void_, T7 = boost::detail::variant::void_, T8 =
boost::detail::variant::void_, T9 = boost::detail::variant::void_, T10 =
boost::detail::variant::void_, T11 = boost::detail::variant::void_, T12 =
boost::detail::variant::void_, T13 = boost::detail::variant::void_, T14 =
boost::detail::variant::void_, T15 = boost::detail::variant::void_, T16 =
boost::detail::variant::void_, T17 = boost::detail::variant::void_, T18 =
boost::detail::variant::void_, T19 =
boost::detail::variant::void_]::first_step, Visitor =
boost::detail::variant::copy_into, VoidPtrCV = const void*, NoBackupFlag =
boost::variant<int, double, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_,
boost::detail::variant::void_>::has_fallback_type_]::next_step, Visitor =
boost::detail::variant::copy_into, VPCV = const void*, NBF =
boost::variant<int, double, std::basic_string<char, std::char_traits<char>,
std::allocator<char> >, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_, boost::detail::variant::void_,
boost::detail::variant::void_,
boost::detail::variant::void_>::has_fallback_type_]: Assertion `false' failed.
And the debugging points to this: "BOOST_ASSERT(false);"
///////////////////////////////////////////////////////////////////////////////
// (detail) function template visitation_impl
//
// Invokes the given visitor on the type in the given variant storage.
//
template <
typename W, typename S
, typename Visitor, typename VPCV
, typename NBF
>
inline
BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(typename Visitor::result_type)
visitation_impl(
int, int, Visitor&, VPCV
, mpl::true_ // is_apply_visitor_unrolled
, NBF, W* = 0, S* = 0
)
{
// should never be here at runtime:
BOOST_ASSERT(false);
typedef typename Visitor::result_type result_type;
return ::boost::detail::variant::forced_return< result_type >();
}
Any idea what's happening here?
Cheers, Tom
Am Montag 28 Juni 2010, um 15:44:05 schrieb Thomas Walter:
> Hi Dane
>
> The rendering with nik2img seems to work correctly:
> $ nik2img.py test2.xml test2.png
> generates this image:
> http://img251.imageshack.us/img251/470/test2sz.png
>
> The interesting thing is that with my program I get some of the street
> names in the map so it seems to load the osm file and to read it. And in
> fact it also takes about 2 seconds to render it (256x256 pixels on an dual
> core pentium 2Ghz).
>
> So imho the problem is neither the xml file nor the osm file nor the mapnik
> installation. But maybe I did not select the correct envelope?
> Currently I am using this:
> map.zoom_all();
>
> When selecting another envelope like this
> Envelope<double> bbox(50.9,-1.45,51.0,-1.35);
> map.zoomToBox(bbox);
> it renders only the background. Btw, the coordinates are taken from the
> osm file: <bound box='50.9,-1.45,51.0,-1.35'
> origin='http://www.openstreetmap.org/api/0.5' />
>
> Could this be the problem? If it is, how can I select the correct bbox?
>
> Cheers, Tom
>
> Am Montag 28 Juni 2010, um 10:18:34 schrieb Dane Springmeyer:
> > Thomas. Hard to say what is wrong. I'm traveling so I cannot currently
> > dig up that osm plugin example map. Can you render the map using
> > nik2img and compare the results?
> >
> > Dane
> >
> > --- \o/ ---
> > Sent from my phone
> >
> > On Jun 25, 2010, at 12:24 PM, Thomas Walter <[email protected]>
> >
> > wrote:
> > > Hi there
> > >
> > > I am trying to generate map tiles out of an osm-file, but for some
> > > reason
> > > mapnik has problems with the rendering. Often it generates only the
> > > background
> > > and if it renders more then it is only some random stuff.
> > >
> > > When I try to render the test2.xml from
> > > http://trac.mapnik.org/browser/trunk/plugins/input/osm
> > > it generates this tile:
> > > http://img145.imageshack.us/img145/8569/mapnikerror.png
> > >
> > > I am using mapnik 0.7.0 from the ubuntu repositories.
> > >
> > > The relevant source code (mainly taken from the examples) is:
> > > datasource_cache::instance()->register_datasources
> > >
> > > ("/usr/lib/mapnik/0.7/input/");
> > >
> > > freetype_engine::register_font
> > >
> > > ("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf");
> > >
> > > Map map (tdim,tdim);
> > > load_map(map,"/home/tom/Desktop/test2.xml");
> > > map.zoom_all();
> > >
> > > Image32 buf(map.getWidth(), map.getHeight());
> > > agg_renderer<Image32> ren(map,buf);
> > > ren.apply();
> > >
> > > QImage image((uchar*)buf.raw_data(),map.getWidth(),
> > >
> > > map.getHeight(),QImage::Format_ARGB32);
> > >
> > > Cheers
> > > Tom
> > > _______________________________________________
> > > Mapnik-users mailing list
> > > [email protected]
> > > https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users