[mkgmap-dev] Patch v2 and thoughts about class names
From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Apr 22 10:16:41 BST 2015
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150422/3b9873ad/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: numbers-v2.patch Type: application/octet-stream Size: 30948 bytes Desc: not available URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150422/3b9873ad/attachment-0001.obj>
- Previous message: [mkgmap-dev] error in NumberPreparer?
- Next message: [mkgmap-dev] Patch v2 and thoughts about class names
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list