Home PageFacebookRSS News Feed
PocketGPS
Web
SatNav,GPS,Navigation
Pocket GPS World - SatNavs | GPS | Speed Cameras: Forums

Pocket GPS World :: View topic - McGuider Users: Speed Camera Database Conversion Script Here
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in for private messagesLog in for private messages   Log inLog in 

McGuider Users: Speed Camera Database Conversion Script Here
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Pocket GPS World Forum Index -> Sygic McGuider/Mobile Maps
View previous topic :: View next topic  
Author Message
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 11:22 am    Post subject: McGuider Users: Speed Camera Database Conversion Script Here Reply with quote

I have written a batch file that takes the tab-deliminated speed camera database files offered by www.pocketgpsworld.com and converts them into McGuider's own UPI format. The script uses a program made by Sygic (the coders of McGuider) but simplifies the process by allowing the user to simply dump the txt and bmp files from the speed camera database into one directory, execute the script and output the UPI files to another directory.

You can download the script from www.jwtcs.co.uk/TXT2UPIv1.0.zip
You will also need a copy of the speed camera database from PocketGPSWorld - doesn't matter which version (zoned, consolodated etc.) you choose as the script is setup to determine using a file pattern. Just make sure you download the file formatted for McGuider (which is currently a tab-deliminated text file which McGuider does not support without conversion).

Hope this is useful for you McGuider users.

p.s. obviously this release does NOT contain the camera database as these are © PGPSW.
Back to top
View user's profile Send private message
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 11:24 am    Post subject: Reply with quote

I know there are already scripts to do this, but my script is a "one4all" in that it does not matter which version of the database you use from PGPSW as long as it follows their naming convention "pocketgps_*.txt".
Back to top
View user's profile Send private message
scarymonkey
Lifetime Member


Joined: May 09, 2007
Posts: 454
Location: Worcestershire

PostPosted: Tue Mar 10, 2009 11:31 am    Post subject: Reply with quote

Not checked the results yet but I would expect you to have no icons on the screen with the script as you have specified a path to the bmp file, where the command line syntax for the poiconvertor program just needs the filename itself (I think it embeds the path into the UPI file itself).
Back to top
View user's profile Send private message Visit poster's website
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 11:40 am    Post subject: Reply with quote

Nope - works perfectly. Tested on the drive home from work yesterday (including the beauty that won me lifetime membership :D)
Back to top
View user's profile Send private message
scarymonkey
Lifetime Member


Joined: May 09, 2007
Posts: 454
Location: Worcestershire

PostPosted: Tue Mar 10, 2009 11:42 am    Post subject: Reply with quote

Had a chance to check now and I was right, all the icons show as grey question marks as the icon file cannot be found.

If you change the convert line to
Code:
for %%i in (.\in\pocketgps_*.txt) do echo - Converting %%~ni.txt to %%~ni.upi & convert.exe .\in\%%~ni.txt %%~ni.bmp .\out\%%~ni.upi


it will produce a valid UPI file with icons.

Good script though adn much better than the batch files I have been using (note to self - learn scripting!)
Back to top
View user's profile Send private message Visit poster's website
scarymonkey
Lifetime Member


Joined: May 09, 2007
Posts: 454
Location: Worcestershire

PostPosted: Tue Mar 10, 2009 11:43 am    Post subject: Reply with quote

djbenson wrote:
Nope - works perfectly. Tested on the drive home from work yesterday (including the beauty that won me lifetime membership :D)


What path do you use for the bmp files, and what device? I have just tested on my Touch HD and hd to make the change to the script I detailed above before I got working icons (I put all the icons into the res/icons folder)

Edit to add after a little more testing

I've just converted one of the text files created by your version of the script and it says

Bitmap name in 'Icons' directory is .\in\pocketgps_uk_mobile_20.bmp

Based on this you would need your bmp files to be in res\icons\in\ I believe.


Last edited by scarymonkey on Tue Mar 10, 2009 11:52 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 11:51 am    Post subject: Reply with quote

N95-8GB. TXT and BMP files in same directory (\in\)

Got the database yesterday, ran it though my batch file and it produced valid UPI's with icons.

Screenshot of latest PGPSW database converted using this batch:


EDIT: Taking out .\in\ from the front of the BMP file in the batch file (as per your quote above) points it to an invalid location - there are no BMP files in the root, they should be in the .\in\ folder.
Back to top
View user's profile Send private message
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 11:55 am    Post subject: Reply with quote

...and running convert.exe in command line mode (convert.exe /?) shows the syntax as;

input file - icon file - output file Confused

Bizarre.
Back to top
View user's profile Send private message
scarymonkey
Lifetime Member


Joined: May 09, 2007
Posts: 454
Location: Worcestershire

PostPosted: Tue Mar 10, 2009 11:56 am    Post subject: Reply with quote

djbenson wrote:
N95-8GB. TXT and BMP files in same directory (\in\)

Got the database yesterday, ran it though my batch file and it produced valid UPI's with icons.

EDIT: Taking out .\in\ from the front of the BMP file in the batch file (as per your quote above) points it to an invalid location - there are no BMP files in the root, they should be in the .\in\ folder.


I meant on the bmp location on your device not on your PC. The Sygic POI Convertor program doesn't actually need the bmp file to be present to create a UPI file when it is run from the command line (not checked when done from the GUI).
Back to top
View user's profile Send private message Visit poster's website
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 11:57 am    Post subject: Reply with quote

Unless one of us is confused, or the WinMob version works differently to the Symbian version - you don't copy ANY icon files to the device - the icons are embedded within the UPI file Confused

The only files in my map directory are the UPI files - no BMP files at all.


Last edited by djbenson on Tue Mar 10, 2009 11:58 am; edited 1 time in total
Back to top
View user's profile Send private message
scarymonkey
Lifetime Member


Joined: May 09, 2007
Posts: 454
Location: Worcestershire

PostPosted: Tue Mar 10, 2009 11:57 am    Post subject: Reply with quote

djbenson wrote:
...and running convert.exe in command line mode (convert.exe /?) shows the syntax as;

input file - icon file - output file Confused

Bizarre.


I remember having fun when I fist created batch files as I was using the full path in the bmp file format and only ever saw grey question marks. When I changed to just the file name for the bmp file, the icons started appearing on my device.
Back to top
View user's profile Send private message Visit poster's website
scarymonkey
Lifetime Member


Joined: May 09, 2007
Posts: 454
Location: Worcestershire

PostPosted: Tue Mar 10, 2009 12:00 pm    Post subject: Reply with quote

djbenson wrote:
Unless one of us is confused, or the WinMob version works differently to the Symbian version - you don't copy ANY icon files to the device - the icons are embedded within the UPI file Confused


I am guessing the Win Mobile version is different then as you have to put the icons into a Res/icon directory on the storage card - not in the map/gbr directory though.

Out of interest (and in case there is a different version of McGuider around), what version of the software are you running?
Back to top
View user's profile Send private message Visit poster's website
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 12:04 pm    Post subject: Reply with quote

Oh I know what's going on here - there's a POI bug in 2009 (v7.7) - a patch was released for the Symbian version put was pulled for the WinMob platform.

So this will only work on the latest Symbian version until Sygic/McGuider update all platforms to cure the POI bug.

UPI is a self contained format and when it works properly (as per the patched Symbian version) you do not need any external image files.
Back to top
View user's profile Send private message
scarymonkey
Lifetime Member


Joined: May 09, 2007
Posts: 454
Location: Worcestershire

PostPosted: Tue Mar 10, 2009 12:07 pm    Post subject: Reply with quote

djbenson wrote:
Oh I know what's going on here - there's a POI bug in 2009 (v7.7) - a patch was released for the Symbian version put was pulled for the WinMob platform.

So this will only work on the latest Symbian version until Sygic/McGuider update all platforms to cure the POI bug.


You were one of the few that managed to get the Symbian update before TA pulled it then Razz and now I can see what they changed to fix it. Fortunately for WinMobile users there is no bug for POI in the current software (at least nothing like the one that affected Symbian users). I am also wondering when TA will authorise the update ot be released again as it is still not showing in McGuider Assistant for me.

For anyone who tries your script though, the change I highlighted above works fine for WinMobile using 7.7 as currently released. The BMP files need to be put into the icon directory as well. This is explained in the help pdf sygic supply with the poi convertor.
Back to top
View user's profile Send private message Visit poster's website
djbenson
Lifetime Member


Joined: Jul 12, 2006
Posts: 15

PostPosted: Tue Mar 10, 2009 12:10 pm    Post subject: Reply with quote

Out of curiosity, I made the amendment, uploaded the files to my device, and as I thought, it broke it:


I will add some more code to ask which platform the files are destined for...that way the resulting files should always work. Will you give it a go once I've uploaded it?
Back to top
View user's profile Send private message







Posted: Today    Post subject: Pocket GPS Advertising

Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pocket GPS World Forum Index -> Sygic McGuider/Mobile Maps All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Make a Donation



CamerAlert Database

Click here for the PocketGPSWorld.com Speed Camera Database

Download Speed Camera Database
22.034 (27 Mar 24)



WORLDWIDE SPEED CAMERA SPOTTERS WANTED!

Click here to submit camera positions to the PocketGPSWorld.com Speed Camera Database


12mth Subscriber memberships awarded every week for verified new camera reports!

Submit Speed Camera Locations Now


CamerAlert Apps



iOS QR Code






Android QR Code







© Terms & Privacy


GPS Shopping