<div dir="ltr"><div><div><div><div><div><div><div>Hi Samuel,<br><br></div>is_in has been deprecated several years ago. The Overpass API has a better solution:<br><br>area[name="Burkina Faso"]->.b;<br>(<br>  relation(area.b)["admin_level"];<br>  way(r);<br>);<br><br>out body;<br>>;<br>out skel qt;<br><br></div>If you want to use the result in JOSM:<br><br></div>You can select File/Download from Overpass directly, but with a different query:<br><br>[timeout:100];<br>area[name="Burkina Faso"]->.b;<br>(<br>  relation(area.b)["admin_level"];<br>  way(r);<br>);<br><br>out meta;<br>>;<br>out meta qt;<br><br></div>You have to additionally set a bounding box though.<br><br></div>It is also possible to save this query in a text file, if you need it more than once, then call it as follows:<br><br>"C:\Program Files (x86)\GnuWin32\bin\wget.exe" --timeout 0 --header="accept-encoding: gzip" -O "PT_De_Lijn.osm.zip" --post-file="boundaries.overpass" "<a href="http://overpass-api.de/api/interpreter">http://overpass-api.de/api/interpreter</a>"<br><br></div>Which you can save as a .cmd file (On Windows), or .sh on Linux (then simply use wget). To get wget.exe on Windows, you need to install gnutools.<br><br></div><div>You can drag and drop the .zip file on JOSM directly, if you like.<br></div><div><br></div>Polyglot<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-11-08 13:37 GMT+01:00  <span dir="ltr"><<a href="mailto:augustindoury@gmail.com" target="_blank">augustindoury@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Here is a link : <a href="http://overpass-turbo.eu/s/cxc" target="_blank">http://overpass-turbo.eu/s/cxc</a> (click Run to run
    the query)<br>
    The query gets all admin_level=4 in Burkina Faso and their way
    members<div><div class="h5"><br>
    <br>
    <div>On 08/11/2015 12:35,
      <a href="mailto:augustindoury@gmail.com" target="_blank">augustindoury@gmail.com</a> wrote:<br>
    </div>
    <blockquote type="cite">
      
      Hi Samuel,<br>
      <br>
      This expression in the Wizard : type:relation AND admin_level=4
      AND is_in='Burkina Faso' <br>
      gives you all the relation type=boundary with an admin_level=4.<br>
      <br>
      It gives you this query :<br>
      <blockquote>[out:json][timeout:25];<br>
        (<br>
          relation["admin_level"="4"]["is_in:country"="Burkina
        Faso"]({{bbox}});<br>
        );<br>
        out body;<br>
        >;<br>
        out skel qt;<br>
      </blockquote>
      <br>
      If you just want the polygons it's ok to extract this. But you
      won't extract the OSM objects members of relations, and their tags
      neither as Blake said.<br>
      <br>
      If you want the members to, and avoid JOSM, add :<br>
      >>; to get all members<br>
      node(r); to get the nodes<br>
      way(r); to get all the ways<br>
      relation(r); for relations<br>
      <br>
      Example for all members : <br>
      <blockquote>[out:json][timeout:25];<br>
        (<br>
          relation["admin_level"="4"]["is_in:country"="Burkina
        Faso"]({{bbox}});<br>
         >>;<br>
        );<br>
        out body;<br>
        >;<br>
        out skel qt;<br>
      </blockquote>
      Good luck<br>
      <br>
      Augustin<br>
      <br>
      Yo<br>
      <br>
      <div>On 08/11/2015 12:04, Samuel Aiyeoribe
        wrote:<br>
      </div>
      <blockquote type="cite">
        <div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:24px">
          <div><span>Thank you Blake,</span></div>
          <div><span><br>
            </span></div>
          <div><span>This looks
              promising. Even though i use Overpass turbo several times,
              i haven't looked into the overpass api.</span></div>
          <div><span><br>
            </span></div>
          <div><span>I will be happy to
              receive other suggestions and people's experiences.</span></div>
          <div><span><br>
            </span></div>
          <div><span>Cheers</span></div>
          <div> </div>
          <div>Samuel

            Aiyeoribe</div>
          <br>
          <div><br>
            <br>
          </div>
          <div style="display:block">
            <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:24px">
              <div style="font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif;font-size:16px">
                <div dir="ltr"> <font face="Arial" size="2"> On Sunday,
                    8 November 2015, 12:53, Blake Girardot <a href="mailto:blake.girardot@hotosm.org" target="_blank"><blake.girardot@hotosm.org></a>
                    wrote:<br>
                  </font> </div>
                <br>
                <br>
                <div>Hi Samuel,<br clear="none">
                  <br clear="none">
                  I have used <a href="http://overpass-turbo.eu" target="_blank">overpass-turbo.eu</a> to extract just admin
                  boundaries before<br clear="none">
                  and it seems to work well.<br clear="none">
                  <br clear="none">
                  I then have to pass the results over to JOSM and
                  download the missing<br clear="none">
                  members to get all the points and ways that make up
                  the boundaries,<br clear="none">
                  but that is probably because I do not know
                  overpass-turbo well enough<br clear="none">
                  to have it grab all the elements automatically.<br clear="none">
                  <br clear="none">
                  overpass-turbo consists of 2 major parts, the web
                  front (Overpass<br clear="none">
                  Turbo) and the Overpass-API which handles searching
                  OSM data, both are<br clear="none">
                  available from GitHub. Overpass-API works with local
                  .osm.gz files so<br clear="none">
                  it can take a full OSM Planet file and minutely
                  updates and run<br clear="none">
                  totally locally.<br clear="none">
                  <br clear="none">
                  <a shape="rect" href="http://overpass-api.de/" target="_blank">http://overpass-api.de/</a><br clear="none">
                  <a shape="rect" href="https://github.com/tyrasd/overpass-turbo" target="_blank">https://github.com/tyrasd/overpass-turbo</a><br clear="none">
                  <br clear="none">
                  Probably not the easiest solution to your question,
                  but at least you<br clear="none">
                  can try out Overpass-Turbo and make sure it does what
                  you want before<br clear="none">
                  you try and run it locally.<br clear="none">
                  <br clear="none">
                  Here is one I used last week for one of our contacts
                  who needed admin<br clear="none">
                  boundaries for Serbia: <a shape="rect" href="http://overpass-turbo.eu/s/cx8" target="_blank">http://overpass-turbo.eu/s/cx8</a><br clear="none">
                  <br clear="none">
                  Like, I said, there might be simpler (I hope) answers
                  to your<br clear="none">
                  question, but Overpass is one I think.<br clear="none">
                  <br clear="none">
                  Cheers,<br clear="none">
                  blake<br clear="none">
                  <div><br clear="none">
                    On Sun, Nov 8, 2015 at 6:00 AM, Samuel Aiyeoribe<br clear="none">
                    <<a shape="rect" href="mailto:olubunmi4ever@yahoo.co.uk" target="_blank">olubunmi4ever@yahoo.co.uk</a>>

                    wrote:<br clear="none">
                    > Hello HOTties,<br clear="none">
                    ><br clear="none">
                    > Please does anyone know of a service for
                    extracting/downloading OSM Admin<br clear="none">
                    > Boundary that one can fork and host myself and
                    also available on github.<br clear="none">
                    ><br clear="none">
                    > Looking forward to your reply.<br clear="none">
                    ><br clear="none">
                    > Cheers<br clear="none">
                    ><br clear="none">
                    > Samuel<br clear="none">
                    ><br clear="none">
                    > _______________________________________________<br clear="none">
                    > HOT mailing list<br clear="none">
                    > <a shape="rect" href="mailto:HOT@openstreetmap.org" target="_blank">HOT@openstreetmap.org</a><br clear="none">
                    > <a shape="rect" href="https://lists.openstreetmap.org/listinfo/hot" target="_blank">https://lists.openstreetmap.org/listinfo/hot</a></div>
                  <br clear="none">
                  ><br clear="none">
                  <br clear="none">
                  <br clear="none">
                  <br clear="none">
                  -- <br clear="none">
                  ----------------------------------------------------<br clear="none">
                  Blake Girardot<br clear="none">
                  Humanitarian OpenStreetMap Team<br clear="none">
                  Vice President, HOT Board of Directors<br clear="none">
                  skype: jblakegirardot<br clear="none">
                  HOT Core Team Contact: <a shape="rect" href="mailto:info@hotosm.org" target="_blank">info@hotosm.org</a>
                  <div><br clear="none">
                  </div>
                  <br>
                  <br>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
        <fieldset></fieldset>
        <br>
        <pre>_______________________________________________
HOT mailing list
<a href="mailto:HOT@openstreetmap.org" target="_blank">HOT@openstreetmap.org</a>
<a href="https://lists.openstreetmap.org/listinfo/hot" target="_blank">https://lists.openstreetmap.org/listinfo/hot</a>
</pre>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
HOT mailing list<br>
<a href="mailto:HOT@openstreetmap.org">HOT@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/hot" rel="noreferrer" target="_blank">https://lists.openstreetmap.org/listinfo/hot</a><br>
<br></blockquote></div><br></div>