2012/11/26 A.Pirard.Papou <span dir="ltr"><<a href="mailto:A.Pirard.Papou@gmail.com" target="_blank">A.Pirard.Papou@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


  
    
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>On 2012-11-26 16:55, Ben Laenen wrote :<br>
    </div><div>
    <blockquote type="cite"> Also, why the "BE" prefix, these roads are in
      Belgium, no need to duplicate that information on all the roads.<br>
    </blockquote>
    <br></div>
    I'm much interested in this remark.<br>
    For writing POI files, one must determine in which municipality
    (polygonal relation) a street (way) is.<br>
    How can it be done?<br></div></blockquote><div><br></div><div>To keep tabs on what municipality a street belongs to, you can use the associatedStreet relation:<br><br>The road connecting Leuven to Tienen, starts out on the border of 2 'deelgemeentes':<br>
<br>To the north of it the houses are in Kessel-Lo (3010):<br><br><a href="http://www.openstreetmap.org/browse/relation/1490437">http://www.openstreetmap.org/browse/relation/1490437</a><br><br>To the south, near to Leuven the houses are in Heverlee (3001):<br>
<br><a href="http://www.openstreetmap.org/browse/relation/2599890">http://www.openstreetmap.org/browse/relation/2599890</a><br><br>A bit further, still to the south the houses were previously in Korbeek-Lo, but since the fusioning they are now in Leuven (3000):<br>
<br><a href="http://www.openstreetmap.org/browse/relation/2599889">http://www.openstreetmap.org/browse/relation/2599889</a><br><br>Further to the east, the houses are in the part of Korbeek-Lo, which is now part of Bierbeek (3360):<br>
<br><a href="http://www.openstreetmap.org/browse/relation/1518513">http://www.openstreetmap.org/browse/relation/1518513</a><br><br>Still further, they are in Lovenjoel, also part of Bierbeek (3360):<br><br><a href="http://www.openstreetmap.org/browse/relation/2599620">http://www.openstreetmap.org/browse/relation/2599620</a><br>
<br>So every time the postcode or the name of the (deel)gemeente changes a new associatedStreet relation is started to gather those streets and the houses/address nodes belonging to them together. Some streets belong to more than 1 associatedStreet relation. Houses with 2 addresses or a border passing through them can also belong ot more than 1 associatedStreet relation, but that should be exceptional.<br>
<br>When all your associatedStreet relations are complete, you can search for them in JOSM or with the Overpass API, using either the postcode or the name of the (deel)gemeentes you're interested in. You can draw the polygon you want based on that.<br>
<br>Jo<br></div><div><br></div><div> </div></div>