Opened 9 years ago

Closed 9 years ago

#1127 closed defect/bug (fixed)

Some POI labels are hidden

Reported by: usul Owned by: KaZeR
Priority: minor Milestone: version 0.5.1
Component: core Version: git master
Severity: Keywords: map layout, navit.xml
Cc: sebastian.leske@…


Hi, I noticed a very strange behavoiur in the current SVN (tested linux 5532 src and wince 5539 nightly build): Some poi labels are hidden, even if they are specified at the car map layout:

<layer name="POI Labels">
                                <itemgra item_types="poi_airport,town_ghost,poi_hotel,poi_car_parking,poi_car_dealer_parts,poi_car_sharing,poi_fuel,poi_shopping,poi_attraction,poi_cafe,poi_bar,poi_pub,highway_exit,poi_camp_rv,poi_museum_history,poi_hospital,poi_dining,poi_fastfood,poi_police,poi_autoservice,poi_bank,poi_atm,poi_bus_station,poi_bus_stop,poi_business_service,poi_car_rent,poi_church,poi_bahai,poi_buddhist,poi_hindu,poi_islamic,poi_jain,poi_jewish,poi_pagan,poi_pastafarian,poi_shinto,poi_sikh,poi_taoist,poi_cinema,poi_concert,poi_drinking_water,poi_emergency,poi_fair,poi_fish,poi_government_building,poi_hotspring,poi_information,poi_justice,poi_landmark,poi_library,poi_mall,poi_manmade_feature,poi_marine,poi_marine_type,poi_mark,poi_oil_field,poi_peak,poi_personal_service,poi_pharmacy,poi_post_office,poi_public_office,poi_rail_halt,poi_rail_station,poi_rail_tram_stop,poi_repair_service,poi_resort,poi_restaurant,poi_restricted_area,poi_sailing,poi_scenic_area,poi_school,poi_service,poi_shop_bicycle,poi_shop_retail,poi_skiing,poi_social_service,poi_sport,poi_stadium,poi_swimming,poi_theater,poi_townhall,poi_trail,poi_truck_stop,poi_tunnel,poi_worship,poi_wrecker,poi_zoo,poi_biergarten,poi_castle,poi_ruins,poi_memorial,poi_monument,poi_shelter,poi_fountain,poi_viewpoint,vehicle" order="14-">
                                        <circle color="#606060" radius="0" width="0" text_size="10"/>

In my area (city of rostock, DE) I noticed missing labels for: *pharmacies *clothes shops *firefighters *public offices *restaurants *islamic

I found out, that it's not caused by the data, but there seems to be problems in parsing the layout. So I guess a overflowing in string processing or creating the style tables :/ I compared with user:Xenos1984 and it turnes out, that he hadn't problems with restaurants or pharmacies.

So a few statistics:

resturant @876
pharma @749
publich @774
poi_islamic @373

What I did is to splitup the string:

<layer name="POI Labels">
                                <itemgra item_types="poi_airport,town_ghost,poi_hotel,poi_car_parking,poi_car_dealer_parts,poi_car_sharing,poi_fuel,poi_shopping,poi_attraction,poi_cafe,poi_bar,poi_pub,highway_exit,poi_camp_rv,poi_museum_history,poi_hospital,poi_dining,poi_fastfood,poi_police,poi_autoservice,poi_bank,poi_atm,poi_bus_station,poi_bus_stop,poi_business_service,poi_car_rent" order="14-">
                                        <circle color="#606060" radius="0" width="0" text_size="10"/>
                                <itemgra item_types="poi_church,poi_bahai,poi_buddhist,poi_hindu,poi_islamic,poi_jain,poi_jewish,poi_pagan,poi_pastafarian,poi_shinto,poi_sikh,poi_taoist,poi_cinema,poi_concert,poi_drinking_water,poi_emergency,poi_fair,poi_fish,poi_government_building,poi_hotspring,poi_information,poi_justice,poi_landmark,poi_library,poi_mall,poi_manmade_feature,poi_marine,poi_marine_type,poi_mark,poi_oil_field,poi_peak,poi_personal_service,poi_pharmacy" order="14-">
                                        <circle color="#606060" radius="0" width="0" text_size="10"/>
                                <itemgra item_types="poi_post_office,poi_public_office,poi_rail_halt,poi_rail_station,poi_rail_tram_stop,poi_repair_service,poi_resort,poi_restaurant,poi_restricted_area,poi_sailing,poi_scenic_area,poi_school,poi_service,poi_shop_bicycle,poi_shop_retail,poi_skiing,poi_social_service,poi_sport,poi_stadium,poi_swimming,poi_theater,poi_townhall,poi_trail,poi_truck_stop,poi_tunnel,poi_worship,poi_wrecker,poi_zoo,poi_biergarten,poi_castle,poi_ruins,poi_memorial,poi_monument,poi_shelter,poi_fountain,poi_viewpoint,vehicle" order="14-">
                                        <circle color="#606060" radius="0" width="0" text_size="10"/>

That works better (restaurants and public buildings etc. have labels now), but there are still POI labels missed that are specified e.g. cinemas

Hopefully somebody with more experience can reproduce this bug and find a final solution.

Change History (8)

comment:1 Changed 9 years ago by sleske

  • Cc sebastian.leske@… added

comment:2 Changed 9 years ago by sleske

Congratulations, you found a bug :-).

However, it's not the number of POI types that causes the problem, but invalid POI types.

In the string "item_types" in your example, the following are invalid:

poi_bahai,poi_buddhist,poi_hindu,poi_islamic,poi_jain,poi_jewish, poi_pagan,poi_pastafarian,poi_shinto,poi_sikh,poi_taoist,

(the valid item types are defined in item_def.h).

Now the bug is that using an invalid item_type does not trigger a warning. Instead, all following values are ignored. That's why it helps to use less values - that way less values are stuck behind the invalid ones.

comment:3 Changed 9 years ago by sleske

As a short-term fix you can just throw out the invalid item_type values.

Once I get around to it, I'll check in a fix for this, so Navit warns about invalid types, and ignores them.

comment:4 Changed 9 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in rev. 5542.

Navit now warns about invalid item types, and ignores them:

23:10:42.480|navit:attr_new_from_text:Unknown item type 'poi_bahai' ignored.
23:10:42.480|navit:attr_new_from_text:Unknown item type 'poi_xxx' ignored.

comment:5 Changed 9 years ago by usul

  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks for that!

I checked out the latest SVN (5532) but I'm not sure if the bug is fixed. It still doesn't display any labels for the cinema, even if it is included in the poi label layer :/ There is no error log on stdout, even if I increase the loglevel to 1

P.S. Are you skilled/privileged to introduce the missing tags into items_def.h? They are already referenced in the main styles and somebody added the corresponding icons to the repo as well?

comment:6 Changed 9 years ago by usul

I'm sorry, this was a wrong alarm. I was just to stupid to switch to our new SVN and so I checked against the old version *douh*. The current SVN behaves right, as you described above. Thanks for fixing!

comment:7 Changed 9 years ago by usul

  • Milestone set to version 0.5.1

comment:8 Changed 9 years ago by sleske

  • Resolution set to fixed
  • Status changed from reopened to closed

You're welcome :-). I'll close this ticket.

Note: See TracTickets for help on using tickets.