Extract Speedcams from an OSM file - More information

 Extract Speedcams from an OSM XML file - This allows you to extract all the speed cameras in an OSM file and write them out to another file in iGo or GPSSC format. You can get an OSM of all the UK from http://download.geofabrik.de/europe/great-britain.html the direct link to the OSM file is great-britain-latest.osm.bz2 1.1GB in size, unzips to 15.7GB, you'll need to have an NTFS format hard disk for that. Fat32 is limited to 4GB maximum file size. Unzip the file using 7zip and use it as the source file.  It will take about ten minutes for the speed camera file to be created.  There are other smaller OSM files available of smaller regions and cities if the complete UK OSM file is to big for you.

GPSSC does not use the iGo format.  I bought a cheap made in China car satnav that has iGo8 on it and it came with a very old  speedcam file.  That was the incentive for me to add this speedcam extract function to GPSSC.

The speedcams on openstreetmap tend to not have the speedcam type and speed entered by the creaters.  This means that most of the cameras that are extracted default to Gatso or type 1 with the speed set to zero.

 You can edit or create new speedcams on OpenStreetMap .  If you are new to OpenStreetMap have a look at the Beginners guide. To set a speedcam speed add a tag of type maxspeed. By default the value for the speed is in km/h, you must follow it with mph to specify miles per hour e.g k="maxspeed" v="30 mph". The GPSSC extract dialog does not do any conversion of the speed value it just reads it as it is. To specify the speedcam type add a note tag and enter the camera type as the value. GPSSC recognises camera names that start with TRUVELO, TEMPORARY, SPECS, REDSPEED, MONITRON, REDLIGHT, GATSO AND MOBILE. You can also use COMBINED for iGo type 2 and "SPECS SECTION" for iGo type 4.  If you use both iGo and GPSSC camera types in the same note value then the GPSSC type should come first.  GPSSC is not case sensitive you can mix upper and lower case as you want.

More information about OpenStreetMap cameras can be found here: OpenStreetMap speedcams

iGo SpeedCam Txt format:


Header: 
X,Y,TYPE,SPEED,DIRTYPE,DIRECTION 

Field Description 
======+============= 
X | horizontal/longitude (E/W) coordinate 
Y | vertical/latitude (N/S) coordinate 
TYPE | Camera type: 
| 1 - Static camera, 
| 2 - Built in Traffic light, 
| 3 - Camera checking passing through red light, 
| 4 - Section camera, 
| 5 - Mobile camera 
SPEED | Speed limit 
DIRTYPE | Camera direction type: 
| 0 - all directions (full 360') 
| 1 - one direction (see DIRECTION field) 
| 2 - both directions (DIRECTION + the opposite direction) 
DIRECTION| Camera angle degree (between 0 and 359, 0 - North, 90 - East, 180 - South, 270 - West)

SPECIAL DIRECTION
 -1 = all directions (360 degrees)
camera angle +1000 = bidirectional camera (ex. 1090 = both direction East and West)

for example: 

X,Y,TYPE,SPEED,DirType,Direction 
18.9429837,47.4521967,1,100,2,90 

Comments: 
- Field names are not case-sensitive 
- The last 2 fields can be omitted from the file, in this case all cameras will check all directions 
- File name can be anything 
- it has to be under POI/speedcam folder 
- extension has to be TXT 
- multiple files supported

GPSSC GPSSCCamera.txt format:

There were never any databases available for RoadName, TownName and Hazard so I normally just duplicate the speedcam information into these.
Latitude, Longitude, and CamType are required.
SpeedLimit is optional.
e.g. 52.16081,-0.34508,TRUVELO@30,,,TRUVELO@30,Yes,30

    Latitude, Longitude, RoadName, TownName, Hazard, CamType, Permanent, SpeedLimit

Back to the main GPSSC web page.

http://www.stevematt.f9.co.uk/ukspeedcamera/gpssc.html