
Hi programmers, sorry, maybe too many parallel threads in my head... I'd like to commit the attached patch to trunk as a first step. The 2nd step would be to modify display tool. The 3rd is to change the branch so that display tool works with both mkgmap binaries. I am desperately searching for good names for the new / changed classes. Trunk has now (RoadDef) List<Numbers> with Numbers containing a set of fields for the left and the right side which describe the house numbers. The attached patch implements (RoadDef) List<RoadAddrInfo> -> AddrInfo->Numbers with left/right only in RoadAddrInfo, the planned fields for zip / city names will be added to AddrInfo. The suffix "Info" is not very informative, and the prefix Road is a bit misleading, as it applies to one part of a road with one or more line segments. In trunk we don't separate between routing arcs and these number arcs, but in the branch we have the so called "number node". I think of a road in these terms: A road has n points where a point is a Coord instance (a pair of lat/lon plus some bit flags) The line segment between two consecutive points is a "road segment". If needed, two different points can have the same lat/lon values, the road segment between those is what I call a zero-length-segment. Each point may or may not have the attribute "number node", which means that we have address information (housenumbers, in the future also zip code or city) for the part of the road that follows. The address information is stored So, I think of such a part of the road as a "address segment" or "maybe better "address arc". For routable maps we also need points with the attribute "route node", such a route node is at the start and end of road and at each other point that is shared with other roads. These points have an additional attribute (an id), so we use class CoordNode first and later RouteNode. The part of the road between two "route nodes" is a "route arc" and is described with the class RouteArc. A "route arc" can also have a zero length, for example when OSM data says that there is a 1.0 m segment with stairs within a way, the 1.0 m is below the Garmin resolution. We cannot display the segment, but we can change routing attributes here. The old class Numbers described the housenumbers for both sides of one "address arc", the new class RoadAddrInfo does the same and wil, the class AddrInfo describes a single side of such an "address arc" and will be extended by the city and zip code, and (new) Numbers which just describes the house numbers (three fields). So, maybe we should keep the name Numbers for the topmost class as it also coresponds to the name in the polish format? Gerd

I'm all for using Numbers as the top level class name. You probably noticed that I added a check for negative and zero number in netcheck. Found a few in a UK map, so good catch. ..Steve
So, maybe we should keep the name Numbers for the topmost class as it also coresponds to the name in the polish format?
Gerd
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Steve, okay, fine. Any ideas for the names of the sub classes? I am not so sure that we should call 0 an invalid number, I think I read somewhere that 0 is used. Taginfo also reports that, but that doesn't mean they are correct, as I also see -1 in Canvec imports. Gerd Steve Ratcliffe wrote
I'm all for using Numbers as the top level class name.
You probably noticed that I added a check for negative and zero number in netcheck. Found a few in a UK map, so good catch.
..Steve
So, maybe we should keep the name Numbers for the topmost class as it also coresponds to the name in the polish format?
Gerd
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/Patch-v2-and-thoughts-about-class-names-tp584... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On 22/04/15 16:34, GerdP wrote:
I am not so sure that we should call 0 an invalid number, I think I read somewhere
I meant for the Garmin format. But I could be wrong, I don't really think there is anything actually preventing 0 (or negative) numbers, but will mapsource display them? I've changed my mind on my patch, and I will check right.style == NONE instead. ..Steve
participants (3)
-
Gerd Petermann
-
GerdP
-
Steve Ratcliffe