aerostitch / testnavit

0 stars 0 forks source link

speed_cam OSD doesn't draw correctly #76

Open aerostitch opened 13 years ago

aerostitch commented 13 years ago

Issue migrated from trac ticket # 777

component: osd/core | priority: minor | keywords: traffic, OSD, speed, speedcam

2011-02-18 14:50:40: korrosa created the issue


The attached images will explain better, but the situation is as follows:

  • speed_cam OSD enabled
  • audio warnings work fine
  • background disappears when camera is out of range
  • basically, everything works fine.

Except: when a camera is within range, the OSD doesn't draw properly. Below is the line in my navit.xml:

<osd enabled="yes" type="speed_cam" w="125" h="20" x="-125" y="20" label="${distance}" announce_on="1" font_size="300" background_color="#000000c8" align="8"/>

Attached are screenshots to show what happens. The speed_cam OSD is top-right, second down.

Navit 4186. Binfile processed using maptool with patch from #402. Speed camera data is from binfile only: no csv (IGO8) files were enabled.

aerostitch commented 13 years ago

2011-02-18 14:50:56: korrosa uploaded file Screenshot.png (207.9 KiB)

Screenshot.png

aerostitch commented 13 years ago

2011-02-18 14:51:06: korrosa uploaded file Screenshot-1.png (165.8 KiB)

Screenshot-1.png

aerostitch commented 13 years ago

2011-02-18 14:51:31: korrosa changed owner from KaZeR to Singesang

aerostitch commented 13 years ago

2011-02-18 14:51:31: korrosa changed component from core to osd/core

aerostitch commented 13 years ago

2011-02-19 03:39:47: tegzed commented


Korrosa, which graphics driver are you using?

aerostitch commented 13 years ago

2011-02-19 04:17:51: korrosa commented


Sorry, should have said: internal.

<graphics type="gtk_drawing_area"/>
<gui type="internal" keyboard="false" enabled="yes">
...

Is this working for you then? It wouldn't surprise me if this was specific to me, but it'd be nice to work out why...!

aerostitch commented 13 years ago

2011-02-20 04:02:40: korrosa uploaded file navit.xml (164.5 KiB)

My navit.xml

aerostitch commented 13 years ago

2011-02-20 04:11:32: korrosa commented


I think this might be a speed cameras in binfile vs speed cameras in csv file issue: the OSD works fine for speed cameras defined in csv files, but I get the problem in this ticket for speed cameras defined in the binfiles.

aerostitch commented 13 years ago

2011-02-20 05:44:24: tegzed commented


Is the problem occur with binfile cameras created from csv file (csv->textfile->binfile conversion) or with cameras come directly from OSM data?

aerostitch commented 13 years ago

2011-02-20 05:46:07: tegzed commented


If the problem is with OSM cameras can you pls link the place in osm to be able to reproduce the bug.

aerostitch commented 13 years ago

2011-02-20 08:22:51: korrosa commented


Binfiles are created from OSM data - i.e. the speed camera is embedded in the binfile, along with all the other OSM data (streets, POIs etc). Just as if I'd have downloaded the binfile from the Navit map extractor.

An example node is http://www.openstreetmap.org/browse/node/918608677

aerostitch commented 13 years ago

2011-02-20 09:40:13: korrosa changed priority from major to minor

aerostitch commented 13 years ago

2011-02-20 09:40:13: korrosa commented


Apparently the rectangle is supposed to be empty when using speed cameras from OSM binfiles. I thought this got fixed in 4185 (Fix:osd/core: speedcam osd can now use both binfile and csv cameras) ?

aerostitch commented 13 years ago

2011-02-20 13:34:44: tegzed commented


After rev 4228 distance to osm based cameras is displayed. Korrosa, what attributes can an osm camera have?

aerostitch commented 13 years ago

2011-02-22 01:22:08: korrosa commented


Of itself, a highway=speed_camera node has no other attributes. http://wiki.openstreetmap.org/wiki/Tag:highway%3Dspeed_camera. When using this node, the renderer/router is expected to look at the road the speed camera is on/next to and judge the speed-limit etc from that. Not very easy.

However, there is an enforcement relation from which you can - if used correctly - deduce the following:

  • Type of enforcement: maxheight / maxweight / maxspeed / mindistance / traffic_signals / check
  • Enforcement value (if applicable): maxheight / maxweight / maxspeed
  • Direction of enforcement

The relationship includes as members:

  • Device (i.e. speed camera). This can be a node, way or area (i.e. for a HGV scale)
  • From: where the enforcement starts
  • To: where the enforcement ends (thus giving you direction)

The wiki page is: http://wiki.openstreetmap.org/wiki/Relation:enforcement. The original proposal which includes many examples is at: http://wiki.openstreetmap.org/wiki/Proposed_features/Relation:enforcement.

To be honest, I don't expect Navit to support this relationship anytime soon. To me this doesn't matter too much: I can tell what the speed limit is from the speed_warner OSD (and, of course, actually concentrating on driving!), and the direction of the camera is not important as most cameras can (and are) turned around to face the other way very often!

aerostitch commented 13 years ago

2011-02-24 10:32:57: tegzed commented


Korrosa, thanks for the detailed info. I guess most of the time these tec relations are set up correctly in osm data. Possibly when navit will support relations we can utilize these relations if statistics shows that large part of camera data is filled correctly.

aerostitch commented 13 years ago

2011-04-02 00:55:18: korrosa changed status from new to closed

aerostitch commented 13 years ago

2011-04-02 00:55:18: korrosa set resolution to fixed

aerostitch commented 13 years ago

2011-08-24 09:58:57: polarbear_n commented


I updated to 4702 today, and tried speed_cam for the first time. However on my device the background_color= setting/transparency has no effect at all, I get a white box displayed even without any camera event. The background setting works fine for other text labels.

Device is a wince 6.0 type, WayteQ-N800.

<osd enabled="yes" type="speed_cam" w="550" h="40" x="0" y="250" font_size="450" text_color="#ff0000" label="${distance} | ${camera_type} | ${camera_dir} | ${direction} | ${speed_limit}" path="$NAVIT_SHAREDIR/ie-allcam_speedcamerapoi.com.txt" background_color="#11111100"  />

On other text items, background_color="#00000000" works fine being completely transparent.

aerostitch commented 13 years ago

2011-08-24 09:58:57: polarbear_n

aerostitch commented 13 years ago

2011-08-24 09:58:57: polarbear_n

aerostitch commented 13 years ago

2011-08-24 09:59:34: polarbear_n changed status from closed to reopened

aerostitch commented 13 years ago

2011-08-24 09:59:34: polarbear_n changed resolution from fixed to **

aerostitch commented 13 years ago

2011-08-29 11:06:55: tegzed commented


Hello Polarbear,

Currently background_color attribute is not used in speedcam osd. Speedcam osd should disappear when out of range and it is red when active(in range). Disappearing is done by disabling the osd. Maybe the problem is in the implementation of osd disable for wince.

aerostitch commented 11 years ago

2013-07-26 06:31:54: usul

aerostitch commented 11 years ago

2013-07-26 06:31:54: usul commented


So how is the state of this issue? Can anybody please reproduce it on current SVN/binfile?

Sounds like a ugly bug, if somebody gets confused while riding a road -> scheduled to next hotfix.