Opened 9 years ago

Last modified 12 months ago

#777 reopened defect/bug

speed_cam OSD doesn't draw correctly

Reported by: korrosa Owned by: Singesang
Priority: minor Milestone: version 0.6.0
Component: osd/core Version: git master
Severity: Keywords: traffic, OSD, speed, speedcam
Cc:

Description

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 r4186. Binfile processed using maptool with patch from #402. Speed camera data is from binfile only: no csv (IGO8) files were enabled.

Attachments (3)

Screenshot.png (207.9 KB) - added by korrosa 9 years ago.
Screenshot-1.png (165.8 KB) - added by korrosa 9 years ago.
navit.xml (164.5 KB) - added by korrosa 9 years ago.
My navit.xml

Download all attachments as: .zip

Change History (20)

Changed 9 years ago by korrosa

Changed 9 years ago by korrosa

comment:1 Changed 9 years ago by korrosa

  • Component changed from core to osd/core
  • Owner changed from KaZeR to Singesang

comment:2 Changed 9 years ago by tegzed

Korrosa, which graphics driver are you using?

comment:3 Changed 9 years ago by korrosa

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...!

Changed 9 years ago by korrosa

My navit.xml

comment:4 Changed 9 years ago by korrosa

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.

comment:5 Changed 9 years ago by tegzed

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

comment:6 Changed 9 years ago by tegzed

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

comment:7 Changed 9 years ago by korrosa

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

comment:8 Changed 9 years ago by korrosa

  • Priority changed from major to minor

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

comment:9 Changed 9 years ago by tegzed

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

comment:10 Changed 9 years ago by korrosa

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!

comment:11 Changed 9 years ago by tegzed

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.

comment:12 Changed 9 years ago by korrosa

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

comment:13 Changed 9 years ago by polarbear_n

I updated to r4702 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.

Last edited 9 years ago by polarbear_n (previous) (diff)

comment:14 Changed 9 years ago by polarbear_n

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:15 Changed 9 years ago by tegzed

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.

comment:16 Changed 7 years ago by usul

  • Keywords traffic OSD speed speedcam added
  • Milestone set to version 0.5.1

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.

comment:17 Changed 12 months ago by http://wiki.navit-project.org/index.php/user:jkoan

  • Milestone changed from version 0.5.1 to version 0.6.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.