Hi,
Thanks for working on this. Since I can’t participate in the Russian discussion, I hope you won’t mind me posting here. I tried to generate a map of Ireland using this method. Your script very quickly produced what looks like a complete and valid .mp file. Feeding this to the cGPSmapper web service didn’t produce a working map, but it looks like it may have come very close. The problem seems to be that my data contained routing nodes that were closer together than 5.4m, and cGPSmapper appears not to like this. I got quite a few of the same errror, but here’s the tail end of it:
Distance is below 5.4, NODID1: 33771, NODID2: 13433 RgnID: 24005
Distance is below 5.4, NODID1: 14121, NODID2: 32874 RgnID: 24043
Distance is below 5.4, NODID1: 34106, NODID2: 35454 RgnID: 24112
Error R011: NODID points cannot be closer than 5.4 meter!
ERROR: Resulting IMG file ‘35301972.img’ not found
I’ve investigated some of the problem cases. At least one of the examples I found really did have nodes that close (and it was possible to fix it). Other cases seem less easy to fix without local knowledge. Also, it would take a long time.
I’ve been looking into the code and it seems like it should be possible to avoid this case by lying a little to cGPSmapper. If we could detect when two nodes are too close to make any difference, we would report only one node. Does this seem a valid approach? I’m guessing that CPAN can provide a distance measurement module, though I’m sure that what I have in mind will slow things down.
Is it valid to do this only for the Nod entries or should I try to simplify the entire polyline?
Dermot