<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Steve,<br><br>attached is a patch for trunk that implements the structures. <br>(I've omitted display tool for now)<br><br>I think they will work with the new data as well.<br>Maybe you have better names for the classes?<br><br>Gerd<br><br><div><hr id="stopSpelling">From: gpetermann_muenchen@hotmail.com<br>To: mkgmap-dev@lists.mkgmap.org.uk<br>Date: Mon, 20 Apr 2015 13:26:33 +0200<br>Subject: Re: [mkgmap-dev] class Numbers<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">Hi Steve, <br>what about the structures below? <br>My intent is not to save space here, but more<br>to allow loops to iterate like this:<br>for (int side = 0; side < 2; side++){<br> boolean left = (side==0);<br> x = blabla.getxyz(left);<br>...<br> blabla.set(left, 4711)<br> }<br><br>Gerd<br><br>RoadDef:<br>List<AddrRoadInfo> addrList;<br><br>class AddrRoadInfo {<br> int nodeNumber; // n-th number node in road<br> AddrData left,right;<br><br> getAddrData(boolean left){<br> return (left)? left:right;<br> }<br>}<br><br>class AddrData{<br> String zipCode; <br> CityInfo city;<br> Numbers numbers; <br>}<br><br>class Numbers {<br> int start,end;<br> NumberStyle style;<br>}<br> <br><br><div>> Date: Mon, 20 Apr 2015 11:55:25 +0100<br>> From: steve@parabola.me.uk<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: Re: [mkgmap-dev] class Numbers<br>> <br>> On 20/04/15 10:31, Gerd Petermann wrote:<br>> > just noticed that img file starts with optional zip code info, followed<br>> > by optional city info,<br>> > followed by numbers.<br>> > So, maybe it is not a good idea to combine them in one class?<br>> <br>> It makes a lot of sense to keep them separate I agree. A road with<br>> more than one city does not even need any road numbers, or there may<br>> be no road numbers at the point where the city changes.<br>> <br>> > Would that make reading difficult?<br>> It would make reading a little more difficult since you would have to<br>> merge the two streams, but we don't need to read it for map making<br>> purposes, only for display. Writing is already pretty difficult, so<br>> it wouldn't make much difference there ;)<br>> <br>> So if it saved a lot of space it would be possible, but I'm not sure<br>> that it would. Most roads will have one city, so having the two pointers<br>> for each segment would be wasted space.<br>> <br>> > My current thinking is that we should have the number of RoadNumbers<br>> > before we start to read them (because we have the number of "Number nodes").<br>> > So, it should be possible to allocate an array of RoadNumbers instances<br>> > and fill those whenever we have data for one node.<br>> <br>> I do think that is a upper bound to the number you will need.<br>> <br>> ..Steve<br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div>                                            </div>
<br>_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</div>                                            </div></body>
</html>