Just started processing Shetland shape file. There are 549 polygons. There are 201,158 co-ordinates. Updated process:
- Prepare a Word text file called Shetland.js which contains only var shetland = [ ];
- In a copy of the file containing the data for Shetland, replace all ] ], [ [ with two <new line> in Word. Save.
- In the same file, replace all ], [ with <new line> in Word. Save.
- Get rid of dross at beginning and end of file. Save. You now have just co-ordinates, with a double <new line> between the set for each island.
- Find first double <new line>.
- Cut all co-ordinates preceding this. Save – you don’t want to risk doing this set twice.
- Paste the clipboard into the online batch converter, then convert.
- Copy the converted data into TextMate. Save.
- Do the first RegEx to get rid of the dross from the conversion step. Save.
- Do the second RegEx to replace all <new line>s with ], [, then save.
- Add , [ [ to the beginning of the Textmate file, and ] ] at the end. Save.
- Copy the whole of the TextMate file and paste it into shetland.js just before ]; (For the first set, you don’t need the initial comma.) Save.
- Refresh the map webpage – another island will have been highlighted.