Hi! We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
But as we’re losing ad-revenue from this then why not make a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
Joined: Dec 27, 2006 Posts: 998 Location: South Lincs, UK.
Posted: Mon Jan 30, 2017 12:44 pm Post subject:
Privateer wrote:
Resulting .csv as displayed by TextWranger and TextEdit
Code:
-2.084050,49.169190,"M&S and most southerly Post Office in British Isles, St Clement}441534732881"
-2.136071,49.224944,"Hamptonne Country Life Museum car park, St Lawrence [TBC]"
-2.120090,49.251890,Bonne Nuit Bay
-2.081410,49.240370,Bouley Bay
-2.035830,49.195730,"Jersey Pottery, Grouville [MIA 2011]"
-2.169680,49.167360,"Batterie Lothringen, Noirmont Point, St Brelade"
You'll notice that neither Bonne Nuit Bay nor Bouley Bay are encased in double quotes.
The reason that neither Bonne Nuit Bay nor Bouley Bay are encased in double quotes is because their description doesn't contain a comma, if you look at the other examples given their descriptions all contain commas and therefore need to be enclosed in quotes in order that the csv file knows that the description is a single field rather than several different fields. _________________ Paul
Joined: 30/12/2002 17:36:20 Posts: 4918 Location: Oxfordshire, England, UK
Posted: Wed Feb 01, 2017 1:25 pm Post subject:
Kremmen wrote:
Can I suggest using Windows
Of course you can, and you just have! Windows would of course be the obvious answer but I've moved over to Mac and being obstinate I'm going to stay with Mac a little longer!
pcaouolte wrote:
The reason that neither Bonne Nuit Bay nor Bouley Bay are encased in double quotes is because their description doesn't contain a comma, if you look at the other examples given their descriptions all contain commas and therefore need to be enclosed in quotes in order that the csv file knows that the description is a single field rather than several different fields.
Paul (pcaouolte) has found the reason. I've checked all of the other locations that aren't encased in double quotes (which I haven't listed) and none of them contain a comma. All of the locations that are encased in double quotes contain a comma.
So many thanks to Paul for spotting that reason!
When I first started to make TomTom POIs, I read the online TomTom Navigator SDK manual, which states:
TomTom Navigator SDK manual wrote:
The input file should be a text file (extension ASC is recommended) that should simply contain lines of text. Any line starting with a semi−colon will be ignored. Empty lines will also be ignored. All other lines are expected to represent points of interest. Such a line should specify a longitude, a latitude and a name, seperated by commas. It is recommended that the name is put between double quotes. A name should not contain double quotes. Longitudes and latitudes may be specified either as degrees and fractions of degrees, or in degrees, minutes and seconds. Both colons and single−quote/double−quote notation may be used for minutes and seconds. So, all the following lines are all equivalent:
Code:
53.5 , 4 , "Truckers Restaurant La Bamba"
53.5000000 , 4.00000000 , "Truckers Restaurant La Bamba"
53’30"00 , 4’00"00 , "Truckers Restaurant La Bamba"
53’30 , 4’0 , "Truckers Restaurant La Bamba"
OK, so now we know why some of my location names in the .csv file are not encased in double quotes. We also know that double quotes are recommended for .asc files but as many editors don't recognise .asc files nowadays we have to use .csv files, so the next questions are:
Does it cause a problem if one or more location names are not encased in double quotes, in a .csv file?
If it does, how to make sure all location names are encased in double quotes? A simple solution would be to include a comma at the end of each name - although a more elegant solution would be preferable.
Regards, _________________ Robert.
iPhone 6s Plus, iOS 14.0.1: iOS CamerAlert v2.0.7
TomTom GO Mobile iOS 2.3.1; TomTom (UK & ROI and Europe) iOS apps v1.29
Garmin Camper 770 LMT-D
Joined: Dec 27, 2006 Posts: 998 Location: South Lincs, UK.
Posted: Wed Feb 01, 2017 1:35 pm Post subject:
Privateer wrote:
Does it cause a problem if one or more location names are not encased in double quotes, in a .csv file?
It does not normally cause a problem. Excel contains some internal logic that will add the double quotes when needed and strip them when they are not needed, so any time that you save the file in Excel you will get the result that you are seeing.
Try whatever software you intend to use to read the csv files and see if its a problem.
As far as I know the Excel logic can only be defeated by using VBA macros. _________________ Paul
Joined: Mar 03, 2006 Posts: 7149 Location: Reading
Posted: Wed Feb 01, 2017 2:18 pm Post subject:
Yep
As long as the problem elements/characters are known then a VBA Macro can sort that.
It looks like column 3 data needs the quotes removing, but before that, if the data in column 3 has a comma between the quotes then that needs sorting.
The joy of coding _________________ DashCam:
Viofo A119 V3
Joined: 30/12/2002 17:36:20 Posts: 4918 Location: Oxfordshire, England, UK
Posted: Fri Feb 03, 2017 7:10 pm Post subject:
Before I go down the route of identifying the rows without commas, which therefore possibly may need to be encased with double quotes, I have temporarily added commas just for testing.
2. Apostrophe S ('s) is substituted with \'s, e.g.:
Bonny's Country Garden becomes Bonny\'s Country Garden
I've saved the .csv file as "CSV UTF-8 (Comma delimited) (.csv) " format as that is the only format that sets to cope with accented characters. I then save the .csv file as Line breaks = Windows (CRLF) and Encoding = Unicode (UTF-8, with BOM) using TextWrangler.
Unfortunately, I've not used http://www.POIEditor.com with my Windows PC so I don't know if it correctly converts a Windows .csv file with characters that have accents and Apostrophes correctly.
Could somebody with a Windows PC please try converting a test .csv file to an .ov2 file?
Code:
-2.177754,49.171974,"Portelet Bay Café (pedestrian), St Brelade"
-2.078990,49.173480,"Samarès Manor, St Clement"
-2.114604,49.219068,"Bonny's Country Garden, St John"
Thanks, _________________ Robert.
iPhone 6s Plus, iOS 14.0.1: iOS CamerAlert v2.0.7
TomTom GO Mobile iOS 2.3.1; TomTom (UK & ROI and Europe) iOS apps v1.29
Garmin Camper 770 LMT-D
Joined: Mar 03, 2006 Posts: 7149 Location: Reading
Posted: Fri Feb 03, 2017 7:56 pm Post subject:
Typical
Last knockings on a Friday
I reckon if you have 2 examples as a sort of 'before' CSV (presumably the example you've just posted) and 'after' OV2 requirement I can see if I can work something out.
Will have to be Monday now though. _________________ DashCam:
Viofo A119 V3
Joined: 30/12/2002 17:36:20 Posts: 4918 Location: Oxfordshire, England, UK
Posted: Sun Feb 05, 2017 9:46 pm Post subject:
Oldboy wrote:
I copied your text into a csv file. Converted the csv with MakeOV2 and the OV2 file opened in POIEdit as below.
Richard, thanks for that. I would expect MakeOV2 to work properly and also POIEdit to display OK in those circumstances. Many thanks for confirming thing that.
pcaouolte wrote:
Converted your sample file using the online POI Editor: http://www.POIEditor.com and a Windows PC.
When the file is uploaded to the online editor the accents are displayed correctly but the apostrophe gets a backslash in front of it.
When the online editor saves an ov2 file the accents and the apostrophe in the ov2 file all appear correctly.
Paul, thanks for doing that. It shows that in with Windows files, POIEdit works well.
Even though the apostrophes and accents were wacky on my Mac. I downloaded the .ov2 file and loaded it into the TomTom app with the following results:
1. Apostrophes show OK (i.e. with no backslash)
2. Letters with accents are still weird (i.e. Samarès becomes Samarès)
Kremmen wrote:
Typical
Last knockings on a Friday
I reckon if you have 2 examples as a sort of 'before' CSV (presumably the example you've just posted) and 'after' OV2 requirement I can see if I can work something out.
Will have to be Monday now though.
At least the apostrophes seem to be working. I think that the whole thing is the Mac Excel and CRLF thing with a little bit of twisted lookup table for accented characters.
Could you PM me with a suitable email address that I could send you a few files?
I need to work out which type of .csv file to use.
Nb Note to self: Need to always re-save .csv file via TextWrangler with "Line breaks: Windows (CRLF)"
I have to say that with everybody's help things have progressed well. I am now able to use a master .xlsx file to create a POI .ov2 file which works except for displaying accented characters strangely.
I'm sure that there is a way to get the accented characters to display correctly in http://www.poieditor.com and when we've worked it out I will write up a step by step set of instructions.
Many thanks, _________________ Robert.
iPhone 6s Plus, iOS 14.0.1: iOS CamerAlert v2.0.7
TomTom GO Mobile iOS 2.3.1; TomTom (UK & ROI and Europe) iOS apps v1.29
Garmin Camper 770 LMT-D
Joined: 30/12/2002 17:36:20 Posts: 4918 Location: Oxfordshire, England, UK
Posted: Sun Feb 19, 2017 9:12 pm Post subject:
Problem solved (I think )
TextEdit
I have discovered that the Mac TextEdit program can be set to save a file as UTF-8, which you need to be able to use diacritics (i.e. accents on characters, e.g. à, á, ç, è, é, etc). This is done in TextEdit, by:
Preferences… | Open and Save | Plain Text File Encodeing, Saving Files is set to "Unicode (UTF-8)"
GPSBabel
I first tried GPSBabel a few weeks ago. For some reason I don't think that I installed it correctly on the Mac - we'll call this operator error!
Well, yesterday, I tried again and the installation of GPSBabel worked.
After a few false starts, I discovered that the GPSBabel input file format needs to be set to "Universal csv with field structure in first line"
The process - basic
I'm now able to use diacritics in my POI names. I can also include telephone numbers in my POI details, however I'm trying to determine whether I can include telephone numbers via GPSBabel or if I need to use a longer method to do so. Therefore, for the time being, I'm not including telephone numbers for TomTom .ov2 files. The process is:
1. Create an MS Excel .xlsx spreadsheet with columns headings: Longitude (column A); Latitude (column B); Name (column C). If you do want phone numbers in your TomTom .ov2 file then in column C and right at the end of the name of the POI, add the Greater Than Sign followed by telephone in international format. Save file as .xlsx file. This is your master file.
2. Use MS Excel to open .xlsx master file and save as .csv file. This is your input file.
3. Open .csv file in TextEdit and then save file. This should convert the input file to UTF-8 format.
4. Launch GPSBabel and point to the .csv file as the input, with input format as "Universal csv with field structure in first line" and the output file as "TomTom POI file (.ov2)"
5. Copy the .ov2 to your TomTom device in the usual manner.
NB: I still have made sure that all of my POI names are encased in "double quotes" by adding a comma to the name. I will try without commas at some point.
I prefer to keep the POI name and POI telephone number in separate columns. I do have an Excel function that concatenates the two columns IF there is telephone number. I haven't discussed that function here as the function and method is a bit fiddly and I'm hoping that I can get GPSBabel to do it which would make the process and therefore the instructions much easier.
As you will gather, I have much more testing to do but I'm hoping to come up with a solution that uses Excel spreadsheet as a master file which can then be converted to a .csv file which can then be converted to not just TomTom .ov2 file but to any SatNav format by GPSBabel.
You may be able to use another spreadsheet instead of MS Excel but that may or may not work.
The reason that I wish to use Excel .xlsx as the master file is that you can see things neater and the formatting is kept.
Finally, I would like to thank everybody especially (in no particular order): abre, MaFt, M8TJT, Kremmen, pcaouolte, and Oldboy for all of your help. Thanks guys.
p.s. When I have things working as I want and I've done all of the testing, I'll do another write up.
Regards, _________________ Robert.
iPhone 6s Plus, iOS 14.0.1: iOS CamerAlert v2.0.7
TomTom GO Mobile iOS 2.3.1; TomTom (UK & ROI and Europe) iOS apps v1.29
Garmin Camper 770 LMT-D
Joined: Mar 03, 2006 Posts: 7149 Location: Reading
Posted: Mon Feb 20, 2017 4:53 am Post subject:
From my brief testing I found the change to Unicode to be the key. But that was running through a Windows command prompt. _________________ DashCam:
Viofo A119 V3
Posted: Today Post subject: Pocket GPS Advertising
We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
Have you considered making a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
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
Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!
Hi! We see you’re using an ad-blocker. We’re fine with that and won’t stop you visiting the site.
But as we’re losing ad-revenue from this then why not make a donation towards website running costs?. Or you could disable your ad-blocker for this site. We think you’ll find our adverts are not overbearing!