[PATCH] Reworked road name pois now supports both OSM and PM files

Hi, I have moved the POI faking code out of the OSM loader into the level above so it should work with both OSM and PM source files. You no longer require the extra line in the points file. enable with the --road-name-pois option. By default, it uses Garmin type 0x640a for the pois. If you want to use a different type, specify it as the option value: --road-name-pois=0x1234 The patch is for SVN 859. All feedback appreciated. Cheers, Mark

Minor tweaks (no change in functionality).

This fixes a bug in the joining function that would cause it to not join all the segments of a road that has 4 or more segments.

Folks, Undeterred by the lack of comment or feedback, I offer this new patch for your consideration. This version suffixes the road names with the name of the nearest "city". That helps when finding a road by name as you can differentiate between the roads that have the same name but are in different cities. To minimise space, I tried creating POIRecords to reference the cities but neither gpsmapedit or my etrex seemed to pay any attention to those so I fell back to simply suffixing the names of the roads with the city name. Cheers, Mark

Mark Burton escribió:
Folks,
Undeterred by the lack of comment or feedback, I offer this new patch for your consideration.
This version suffixes the road names with the name of the nearest "city". That helps when finding a road by name as you can differentiate between the roads that have the same name but are in different cities.
To minimise space, I tried creating POIRecords to reference the cities but neither gpsmapedit or my etrex seemed to pay any attention to those so I fell back to simply suffixing the names of the roads with the city name. I hadn't time to test your patch till now. It's great. Now I can search by any street name in the map. Thanks Mark. I think it would be good to get it merged in trunk as a workaround for the "Find address" function not working till now. Regards Carlos

Hi Carlos,
I hadn't time to test your patch till now. It's great. Now I can search by any street name in the map. Thanks Mark. I think it would be good to get it merged in trunk as a workaround for the "Find address" function not working till now.
Thanks for the feedback - please do say if you think it could be improved. At the moment, it finds the city nearest to the road name poi but that doesn't always give the "best" result. Consider, you could have a road that lies mostly near city A but, by chance, the poi ends up nearer some other city (B). In that case, the road name will be suffixed with B rather than A as you would expect. I am not sure it's worth the effort to fix this. Yes, until (if ever) the "find address" function is implemented, it does provide a basic street search capability and it will work on any gps that supports find poi by name. Cheap and cheerful, as they say. Cheers, Mark

Mark Burton escribió:
Hi Carlos,
I hadn't time to test your patch till now. It's great. Now I can search by any street name in the map. Thanks Mark. I think it would be good to get it merged in trunk as a workaround for the "Find address" function not working till now.
Thanks for the feedback - please do say if you think it could be improved.
I have to test it further, maybe fake points could appear less visible on screen, they can confuse someone.
At the moment, it finds the city nearest to the road name poi but that doesn't always give the "best" result. Consider, you could have a road that lies mostly near city A but, by chance, the poi ends up nearer some other city (B). In that case, the road name will be suffixed with B rather than A as you would expect. I am not sure it's worth the effort to fix this.
I think this case won't be very often. Could be used is-in instead of near as criteria to name road pois?
Yes, until (if ever) the "find address" function is implemented, it does provide a basic street search capability and it will work on any gps that supports find poi by name. Cheap and cheerful, as they say.
Cheers,
Mark

Hi Carlos,
I have to test it further, maybe fake points could appear less visible on screen, they can confuse someone.
Agreed, but you can specify the Garmin type code to use for the points:
By default, it uses Garmin type 0x640a for the pois. If you want to use a different type, specify it as the option value: --road-name-pois=0x1234
So, if you find a better code to use, please say.
At the moment, it finds the city nearest to the road name poi but that doesn't always give the "best" result. Consider, you could have a road that lies mostly near city A but, by chance, the poi ends up nearer some other city (B). In that case, the road name will be suffixed with B rather than A as you would expect. I am not sure it's worth the effort to fix this.
I think this case won't be very often. Could be used is-in instead of near as criteria to name road pois?
I don't know how the is-in test would be done. Also, on my maps, there are lots of small villages/hamlets - some have named roads nearby but you wouldn't necessarily say that the road was in the nearest village, even though it is useful to suffix the road name with the nearest village name to distinguish it from other roads with the same name. Near here, there is at least 5 "Mill Lanes". Cheers, Mark

Hi I too think that this will be useful to people, so lets add it in.
Yes, until (if ever) the "find address" function is implemented, it does provide a basic street search capability and it will work on any gps that supports find poi by name. Cheap and cheerful, as they say.
On the other hand I would encourage anyone that is interested to have a look at the global index work in the display svn as I think we are very close to being able to attempt to create one. Of course it may take months to work out the last few details, but the details of how to represent cities and streets is now fairly clear. ..Steve
participants (3)
-
Carlos Dávila
-
Mark Burton
-
Steve Ratcliffe