Admin Boundary Extraction Service

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Admin Boundary Extraction Service

Samuel Aiyeoribe-2
Hello HOTties,

Please does anyone know of a service for extracting/downloading OSM Admin Boundary that one can fork and host myself and also available on github.

Looking forward to your reply.

Cheers
 
Samuel

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Blake Girardot HOT/OSM
Hi Samuel,

I have used overpass-turbo.eu to extract just admin boundaries before
and it seems to work well.

I then have to pass the results over to JOSM and download the missing
members to get all the points and ways that make up the boundaries,
but that is probably because I do not know overpass-turbo well enough
to have it grab all the elements automatically.

overpass-turbo consists of 2 major parts, the web front (Overpass
Turbo) and the Overpass-API which handles searching OSM data, both are
available from GitHub. Overpass-API works with local .osm.gz files so
it can take a full OSM Planet file and minutely updates and run
totally locally.

http://overpass-api.de/
https://github.com/tyrasd/overpass-turbo

Probably not the easiest solution to your question, but at least you
can try out Overpass-Turbo and make sure it does what you want before
you try and run it locally.

Here is one I used last week for one of our contacts who needed admin
boundaries for Serbia: http://overpass-turbo.eu/s/cx8

Like, I said, there might be simpler (I hope) answers to your
question, but Overpass is one I think.

Cheers,
blake

On Sun, Nov 8, 2015 at 6:00 AM, Samuel Aiyeoribe
<[hidden email]> wrote:

> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading OSM Admin
> Boundary that one can fork and host myself and also available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
> _______________________________________________
> HOT mailing list
> [hidden email]
> https://lists.openstreetmap.org/listinfo/hot
>



--
----------------------------------------------------
Blake Girardot
Humanitarian OpenStreetMap Team
Vice President, HOT Board of Directors
skype: jblakegirardot
HOT Core Team Contact: [hidden email]

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Samuel Aiyeoribe-2
Thank you Blake,

This looks promising. Even though i use Overpass turbo several times, i haven't looked into the overpass api.

I will be happy to receive other suggestions and people's experiences.

Cheers
 
Samuel Aiyeoribe



On Sunday, 8 November 2015, 12:53, Blake Girardot <[hidden email]> wrote:


Hi Samuel,

I have used overpass-turbo.eu to extract just admin boundaries before
and it seems to work well.

I then have to pass the results over to JOSM and download the missing
members to get all the points and ways that make up the boundaries,
but that is probably because I do not know overpass-turbo well enough
to have it grab all the elements automatically.

overpass-turbo consists of 2 major parts, the web front (Overpass
Turbo) and the Overpass-API which handles searching OSM data, both are
available from GitHub. Overpass-API works with local .osm.gz files so
it can take a full OSM Planet file and minutely updates and run
totally locally.

http://overpass-api.de/
https://github.com/tyrasd/overpass-turbo

Probably not the easiest solution to your question, but at least you
can try out Overpass-Turbo and make sure it does what you want before
you try and run it locally.

Here is one I used last week for one of our contacts who needed admin
boundaries for Serbia: http://overpass-turbo.eu/s/cx8

Like, I said, there might be simpler (I hope) answers to your
question, but Overpass is one I think.

Cheers,
blake

On Sun, Nov 8, 2015 at 6:00 AM, Samuel Aiyeoribe
<[hidden email]> wrote:

> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading OSM Admin
> Boundary that one can fork and host myself and also available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
> _______________________________________________
> HOT mailing list
> [hidden email]
> https://lists.openstreetmap.org/listinfo/hot

>



--
----------------------------------------------------
Blake Girardot
Humanitarian OpenStreetMap Team
Vice President, HOT Board of Directors
skype: jblakegirardot
HOT Core Team Contact: [hidden email]




_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Augustin Doury-2
Hi Samuel,

This expression in the Wizard : type:relation AND admin_level=4 AND is_in='Burkina Faso'
gives you all the relation type=boundary with an admin_level=4.

It gives you this query :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
);
out body;
>;
out skel qt;

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.

If you want the members to, and avoid JOSM, add :
>>; to get all members
node(r); to get the nodes
way(r); to get all the ways
relation(r); for relations

Example for all members :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
 >>;
);
out body;
>;
out skel qt;
Good luck

Augustin

Yo

On 08/11/2015 12:04, Samuel Aiyeoribe wrote:
Thank you Blake,

This looks promising. Even though i use Overpass turbo several times, i haven't looked into the overpass api.

I will be happy to receive other suggestions and people's experiences.

Cheers
 
Samuel Aiyeoribe



On Sunday, 8 November 2015, 12:53, Blake Girardot [hidden email] wrote:


Hi Samuel,

I have used overpass-turbo.eu to extract just admin boundaries before
and it seems to work well.

I then have to pass the results over to JOSM and download the missing
members to get all the points and ways that make up the boundaries,
but that is probably because I do not know overpass-turbo well enough
to have it grab all the elements automatically.

overpass-turbo consists of 2 major parts, the web front (Overpass
Turbo) and the Overpass-API which handles searching OSM data, both are
available from GitHub. Overpass-API works with local .osm.gz files so
it can take a full OSM Planet file and minutely updates and run
totally locally.

http://overpass-api.de/
https://github.com/tyrasd/overpass-turbo

Probably not the easiest solution to your question, but at least you
can try out Overpass-Turbo and make sure it does what you want before
you try and run it locally.

Here is one I used last week for one of our contacts who needed admin
boundaries for Serbia: http://overpass-turbo.eu/s/cx8

Like, I said, there might be simpler (I hope) answers to your
question, but Overpass is one I think.

Cheers,
blake

On Sun, Nov 8, 2015 at 6:00 AM, Samuel Aiyeoribe
<[hidden email]> wrote:
> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading OSM Admin
> Boundary that one can fork and host myself and also available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
> _______________________________________________
> HOT mailing list
> [hidden email]
> https://lists.openstreetmap.org/listinfo/hot

>



--
----------------------------------------------------
Blake Girardot
Humanitarian OpenStreetMap Team
Vice President, HOT Board of Directors
skype: jblakegirardot
HOT Core Team Contact: [hidden email]





_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot


_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Augustin Doury-2
Here is a link : http://overpass-turbo.eu/s/cxc (click Run to run the query)
The query gets all admin_level=4 in Burkina Faso and their way members

On 08/11/2015 12:35, [hidden email] wrote:
Hi Samuel,

This expression in the Wizard : type:relation AND admin_level=4 AND is_in='Burkina Faso'
gives you all the relation type=boundary with an admin_level=4.

It gives you this query :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
);
out body;
>;
out skel qt;

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.

If you want the members to, and avoid JOSM, add :
>>; to get all members
node(r); to get the nodes
way(r); to get all the ways
relation(r); for relations

Example for all members :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
 >>;
);
out body;
>;
out skel qt;
Good luck

Augustin

Yo

On 08/11/2015 12:04, Samuel Aiyeoribe wrote:
Thank you Blake,

This looks promising. Even though i use Overpass turbo several times, i haven't looked into the overpass api.

I will be happy to receive other suggestions and people's experiences.

Cheers
 
Samuel Aiyeoribe



On Sunday, 8 November 2015, 12:53, Blake Girardot [hidden email] wrote:


Hi Samuel,

I have used overpass-turbo.eu to extract just admin boundaries before
and it seems to work well.

I then have to pass the results over to JOSM and download the missing
members to get all the points and ways that make up the boundaries,
but that is probably because I do not know overpass-turbo well enough
to have it grab all the elements automatically.

overpass-turbo consists of 2 major parts, the web front (Overpass
Turbo) and the Overpass-API which handles searching OSM data, both are
available from GitHub. Overpass-API works with local .osm.gz files so
it can take a full OSM Planet file and minutely updates and run
totally locally.

http://overpass-api.de/
https://github.com/tyrasd/overpass-turbo

Probably not the easiest solution to your question, but at least you
can try out Overpass-Turbo and make sure it does what you want before
you try and run it locally.

Here is one I used last week for one of our contacts who needed admin
boundaries for Serbia: http://overpass-turbo.eu/s/cx8

Like, I said, there might be simpler (I hope) answers to your
question, but Overpass is one I think.

Cheers,
blake

On Sun, Nov 8, 2015 at 6:00 AM, Samuel Aiyeoribe
<[hidden email]> wrote:
> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading OSM Admin
> Boundary that one can fork and host myself and also available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
> _______________________________________________
> HOT mailing list
> [hidden email]
> https://lists.openstreetmap.org/listinfo/hot

>



--
----------------------------------------------------
Blake Girardot
Humanitarian OpenStreetMap Team
Vice President, HOT Board of Directors
skype: jblakegirardot
HOT Core Team Contact: [hidden email]





_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot



_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Johan Emilsson
I prefer using user Wambacher's boundaries map at https://osm.wno-edv-service.de/boundaries/

Regards,
 Johan

On 8 November 2015 at 13:37, <[hidden email]> wrote:
Here is a link : http://overpass-turbo.eu/s/cxc (click Run to run the query)
The query gets all admin_level=4 in Burkina Faso and their way members


On 08/11/2015 12:35, [hidden email] wrote:
Hi Samuel,

This expression in the Wizard : type:relation AND admin_level=4 AND is_in='Burkina Faso'
gives you all the relation type=boundary with an admin_level=4.

It gives you this query :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
);
out body;
>;
out skel qt;

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.

If you want the members to, and avoid JOSM, add :
>>; to get all members
node(r); to get the nodes
way(r); to get all the ways
relation(r); for relations

Example for all members :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
 >>;
);
out body;
>;
out skel qt;
Good luck

Augustin

Yo

On 08/11/2015 12:04, Samuel Aiyeoribe wrote:
Thank you Blake,

This looks promising. Even though i use Overpass turbo several times, i haven't looked into the overpass api.

I will be happy to receive other suggestions and people's experiences.

Cheers
 
Samuel Aiyeoribe



On Sunday, 8 November 2015, 12:53, Blake Girardot [hidden email] wrote:


Hi Samuel,

I have used overpass-turbo.eu to extract just admin boundaries before
and it seems to work well.

I then have to pass the results over to JOSM and download the missing
members to get all the points and ways that make up the boundaries,
but that is probably because I do not know overpass-turbo well enough
to have it grab all the elements automatically.

overpass-turbo consists of 2 major parts, the web front (Overpass
Turbo) and the Overpass-API which handles searching OSM data, both are
available from GitHub. Overpass-API works with local .osm.gz files so
it can take a full OSM Planet file and minutely updates and run
totally locally.

http://overpass-api.de/
https://github.com/tyrasd/overpass-turbo

Probably not the easiest solution to your question, but at least you
can try out Overpass-Turbo and make sure it does what you want before
you try and run it locally.

Here is one I used last week for one of our contacts who needed admin
boundaries for Serbia: http://overpass-turbo.eu/s/cx8

Like, I said, there might be simpler (I hope) answers to your
question, but Overpass is one I think.

Cheers,
blake

On Sun, Nov 8, 2015 at 6:00 AM, Samuel Aiyeoribe
<[hidden email]> wrote:
> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading OSM Admin
> Boundary that one can fork and host myself and also available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
> _______________________________________________
> HOT mailing list
> [hidden email]
> https://lists.openstreetmap.org/listinfo/hot

>



--
----------------------------------------------------
Blake Girardot
Humanitarian OpenStreetMap Team
Vice President, HOT Board of Directors
skype: jblakegirardot
HOT Core Team Contact: [hidden email]





_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot



_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot



_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Jo-2
In reply to this post by Augustin Doury-2
Hi Samuel,

is_in has been deprecated several years ago. The Overpass API has a better solution:

area[name="Burkina Faso"]->.b;
(
  relation(area.b)["admin_level"];
  way(r);
);

out body;
>;
out skel qt;

If you want to use the result in JOSM:

You can select File/Download from Overpass directly, but with a different query:

[timeout:100];
area[name="Burkina Faso"]->.b;
(
  relation(area.b)["admin_level"];
  way(r);
);

out meta;
>;
out meta qt;

You have to additionally set a bounding box though.

It is also possible to save this query in a text file, if you need it more than once, then call it as follows:

"C:\Program Files (x86)\GnuWin32\bin\wget.exe" --timeout 0 --header="accept-encoding: gzip" -O "PT_De_Lijn.osm.zip" --post-file="boundaries.overpass" "http://overpass-api.de/api/interpreter"

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.

You can drag and drop the .zip file on JOSM directly, if you like.

Polyglot

2015-11-08 13:37 GMT+01:00 <[hidden email]>:
Here is a link : http://overpass-turbo.eu/s/cxc (click Run to run the query)
The query gets all admin_level=4 in Burkina Faso and their way members


On 08/11/2015 12:35, [hidden email] wrote:
Hi Samuel,

This expression in the Wizard : type:relation AND admin_level=4 AND is_in='Burkina Faso'
gives you all the relation type=boundary with an admin_level=4.

It gives you this query :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
);
out body;
>;
out skel qt;

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.

If you want the members to, and avoid JOSM, add :
>>; to get all members
node(r); to get the nodes
way(r); to get all the ways
relation(r); for relations

Example for all members :
[out:json][timeout:25];
(
  relation["admin_level"="4"]["is_in:country"="Burkina Faso"]({{bbox}});
 >>;
);
out body;
>;
out skel qt;
Good luck

Augustin

Yo

On 08/11/2015 12:04, Samuel Aiyeoribe wrote:
Thank you Blake,

This looks promising. Even though i use Overpass turbo several times, i haven't looked into the overpass api.

I will be happy to receive other suggestions and people's experiences.

Cheers
 
Samuel Aiyeoribe



On Sunday, 8 November 2015, 12:53, Blake Girardot [hidden email] wrote:


Hi Samuel,

I have used overpass-turbo.eu to extract just admin boundaries before
and it seems to work well.

I then have to pass the results over to JOSM and download the missing
members to get all the points and ways that make up the boundaries,
but that is probably because I do not know overpass-turbo well enough
to have it grab all the elements automatically.

overpass-turbo consists of 2 major parts, the web front (Overpass
Turbo) and the Overpass-API which handles searching OSM data, both are
available from GitHub. Overpass-API works with local .osm.gz files so
it can take a full OSM Planet file and minutely updates and run
totally locally.

http://overpass-api.de/
https://github.com/tyrasd/overpass-turbo

Probably not the easiest solution to your question, but at least you
can try out Overpass-Turbo and make sure it does what you want before
you try and run it locally.

Here is one I used last week for one of our contacts who needed admin
boundaries for Serbia: http://overpass-turbo.eu/s/cx8

Like, I said, there might be simpler (I hope) answers to your
question, but Overpass is one I think.

Cheers,
blake

On Sun, Nov 8, 2015 at 6:00 AM, Samuel Aiyeoribe
<[hidden email]> wrote:
> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading OSM Admin
> Boundary that one can fork and host myself and also available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
> _______________________________________________
> HOT mailing list
> [hidden email]
> https://lists.openstreetmap.org/listinfo/hot

>



--
----------------------------------------------------
Blake Girardot
Humanitarian OpenStreetMap Team
Vice President, HOT Board of Directors
skype: jblakegirardot
HOT Core Team Contact: [hidden email]





_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot



_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot



_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Rafael Avila Coya
In reply to this post by Samuel Aiyeoribe-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, Samuel:

Here you have an overpass query to get all boundary relations for all
states, LGA's and wards of Nigeria, with the admin_centre's and label
of each relation when available: http://overpass-turbo.eu/s/cxp

If you want Nigeria country boundary relation too, just change "4|6|8"
by "2|4|6|8". In case you want for example only states and LGA's, just
do "4|6", and so on.

In case you want only the boundaries for a certain state, you can use
this query (this example is for Kano state):
http://overpass-turbo.eu/s/cxt

In case you don't want the admin_centre's nor labels nodes of any
relation, you have to run a different query. This one is for Kano:
http://overpass-turbo.eu/s/cxs

Whenever possible, I advise to use area codes instead names. For
example, Niger is the name of a state in Central Nigeria, but it's
also the name of Nigerias north neighbour country: Niger.

Getting the area code is simple: go to osm.org, search for the area
you are interested in (example Niger), get the relation id we want (in
our case, let's say we want Nigeria's Niger state relation id, so we
click in "State Boundary Niger, Nigeria" link, not in "country,
Niger"), and then we copy it's id (in our example 3718384), and we add
3600000000 + 3718384 = 3603718384 to get the Niger state area code for
overpass queries: (area:3603718384)

To avoid a query to overload your web browser, instead of hitting
"run" button, click in "Export" button instead. There, go to "Query"
and then click on "compact" in the "convert to (compact) OverpassQL"
link. That will open a new window with a compact OverpassQL link.
Click on it and it will make the query and download directly in your
file system the result of the query. For example, for the last example
query (Kano state boundaries without admin_centre's nor labels), the
link is like this one:
http://overpass-api.de/api/interpreter?data=%5Btimeout%3A250%5D%3B%28relation%5B%22boundary%22%3D%22administrative%22%5D%5B%22admin%5Flevel%22%7E%224%7C6%7C8%22%5D%28area%3A3603710302%29%3B%29%2D%3E%2ErelBoundary%3B%28way%28r%2ErelBoundary%29%3B%29%2D%3E%2EwaysBoundary%3B%28node%28w%2EwaysBoundary%29%3B%29%2D%3E%2EnodesBoundary%3B%28%2ErelBoundary%3B%2EwaysBoundary%3B%2EnodesBoundary%3B%29%3Bout%20meta%3B%0A

If you need any more sofisticated query, just let us know:

Cheers,

Rafael.

On 08/11/15 12:00, Samuel Aiyeoribe wrote:

> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading
> OSM Admin Boundary that one can fork and host myself and also
> available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
>
> _______________________________________________ HOT mailing list
> [hidden email] https://lists.openstreetmap.org/listinfo/hot
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJWP7DwAAoJEB3niTly2pPQP+sP/2WFMgo990RaSG6ife1M10a/
TyNPjyUBRTcx1S3dU6bmp30kpyqq2GwsQckKbvJ4yKPhVwWCtouERtpAQyuSfoOy
GUwyjVuCbwZLaAlszUi0xKomkFpHbBA7UDYLbIkzh7Ppi3wM6qQEWgOLw5hUHevS
QreoACoMPoShAH+K+I1g+tQpfy2T0vF7KdQTL14UnN1YrKNe4YWlwklj7K/Zr9jF
+Tpi3H8nKQE3Be7oHa+R5gYC7uKzae6dgsy2QrV0RZ257yYXCKbkPaDL8vRxvIVb
HsAZWiD+qMbwaXVQ1/uLucu8YuFZdIdn8N6Jtt/0NgMBYTiVvexc72lrS1fVtpkr
IvzuLohJueL4a0aNVNyxnRn31jJO32tAqESej2SWDRVJ7k8NQl+6l72Y8Y2foHpy
6ZyI+dV1v0ktqHCKiAndbS7B9a56NezkOztoChYR5nJNmyCOZApD50NYJQCaapmp
Bh+sqPiu1RpWrTPwkRu5UCtPHfk3mCT+lu04+82xNZRcepDPJBuuUf5n4dVvAtjr
yilxbAZjkopOV/a6fIQ8jdJw4VhG2V79fUky37HvHvvEeWbmQCPwr7fwWo0h4oqj
X2SZgs4yjSfQjM/5Eztn7Fl7sewxwdRDHX8nW6H87TCGE+x2Vo9foQs3UQGTxVjz
TCA06fdas1+Ab7kSOYSa
=PcRn
-----END PGP SIGNATURE-----

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Dale Kunce
Samuel,
There is this service I discovered a few days ago. 


Can't speak to its quality yet though.

Dale

On Sun, Nov 8, 2015 at 3:30 PM, Rafael Avila Coya <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, Samuel:

Here you have an overpass query to get all boundary relations for all
states, LGA's and wards of Nigeria, with the admin_centre's and label
of each relation when available: http://overpass-turbo.eu/s/cxp

If you want Nigeria country boundary relation too, just change "4|6|8"
by "2|4|6|8". In case you want for example only states and LGA's, just
do "4|6", and so on.

In case you want only the boundaries for a certain state, you can use
this query (this example is for Kano state):
http://overpass-turbo.eu/s/cxt

In case you don't want the admin_centre's nor labels nodes of any
relation, you have to run a different query. This one is for Kano:
http://overpass-turbo.eu/s/cxs

Whenever possible, I advise to use area codes instead names. For
example, Niger is the name of a state in Central Nigeria, but it's
also the name of Nigerias north neighbour country: Niger.

Getting the area code is simple: go to osm.org, search for the area
you are interested in (example Niger), get the relation id we want (in
our case, let's say we want Nigeria's Niger state relation id, so we
click in "State Boundary Niger, Nigeria" link, not in "country,
Niger"), and then we copy it's id (in our example 3718384), and we add
3600000000 + 3718384 = <a href="tel:3603718384" value="+13603718384">3603718384 to get the Niger state area code for
overpass queries: (area:<a href="tel:3603718384" value="+13603718384">3603718384)

To avoid a query to overload your web browser, instead of hitting
"run" button, click in "Export" button instead. There, go to "Query"
and then click on "compact" in the "convert to (compact) OverpassQL"
link. That will open a new window with a compact OverpassQL link.
Click on it and it will make the query and download directly in your
file system the result of the query. For example, for the last example
query (Kano state boundaries without admin_centre's nor labels), the
link is like this one:
http://overpass-api.de/api/interpreter?data=%5Btimeout%3A250%5D%3B%28relation%5B%22boundary%22%3D%22administrative%22%5D%5B%22admin%5Flevel%22%7E%224%7C6%7C8%22%5D%28area%3A3603710302%29%3B%29%2D%3E%2ErelBoundary%3B%28way%28r%2ErelBoundary%29%3B%29%2D%3E%2EwaysBoundary%3B%28node%28w%2EwaysBoundary%29%3B%29%2D%3E%2EnodesBoundary%3B%28%2ErelBoundary%3B%2EwaysBoundary%3B%2EnodesBoundary%3B%29%3Bout%20meta%3B%0A

If you need any more sofisticated query, just let us know:

Cheers,

Rafael.

On 08/11/15 12:00, Samuel Aiyeoribe wrote:
> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading
> OSM Admin Boundary that one can fork and host myself and also
> available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
>
> _______________________________________________ HOT mailing list
> [hidden email] https://lists.openstreetmap.org/listinfo/hot
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJWP7DwAAoJEB3niTly2pPQP+sP/2WFMgo990RaSG6ife1M10a/
TyNPjyUBRTcx1S3dU6bmp30kpyqq2GwsQckKbvJ4yKPhVwWCtouERtpAQyuSfoOy
GUwyjVuCbwZLaAlszUi0xKomkFpHbBA7UDYLbIkzh7Ppi3wM6qQEWgOLw5hUHevS
QreoACoMPoShAH+K+I1g+tQpfy2T0vF7KdQTL14UnN1YrKNe4YWlwklj7K/Zr9jF
+Tpi3H8nKQE3Be7oHa+R5gYC7uKzae6dgsy2QrV0RZ257yYXCKbkPaDL8vRxvIVb
HsAZWiD+qMbwaXVQ1/uLucu8YuFZdIdn8N6Jtt/0NgMBYTiVvexc72lrS1fVtpkr
IvzuLohJueL4a0aNVNyxnRn31jJO32tAqESej2SWDRVJ7k8NQl+6l72Y8Y2foHpy
6ZyI+dV1v0ktqHCKiAndbS7B9a56NezkOztoChYR5nJNmyCOZApD50NYJQCaapmp
Bh+sqPiu1RpWrTPwkRu5UCtPHfk3mCT+lu04+82xNZRcepDPJBuuUf5n4dVvAtjr
yilxbAZjkopOV/a6fIQ8jdJw4VhG2V79fUky37HvHvvEeWbmQCPwr7fwWo0h4oqj
X2SZgs4yjSfQjM/5Eztn7Fl7sewxwdRDHX8nW6H87TCGE+x2Vo9foQs3UQGTxVjz
TCA06fdas1+Ab7kSOYSa
=PcRn
-----END PGP SIGNATURE-----

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot



--
sent from my mobile device

Dale Kunce


_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Satoshi IIDA

Hello,

What about Mapzen's boundary extract?
Format is GeoJSON.

https://mapzen.com/data/borders/

Regards,



2015-11-09 6:13 GMT+09:00 Dale Kunce <[hidden email]>:
Samuel,
There is this service I discovered a few days ago. 


Can't speak to its quality yet though.

Dale

On Sun, Nov 8, 2015 at 3:30 PM, Rafael Avila Coya <[hidden email]> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, Samuel:

Here you have an overpass query to get all boundary relations for all
states, LGA's and wards of Nigeria, with the admin_centre's and label
of each relation when available: http://overpass-turbo.eu/s/cxp

If you want Nigeria country boundary relation too, just change "4|6|8"
by "2|4|6|8". In case you want for example only states and LGA's, just
do "4|6", and so on.

In case you want only the boundaries for a certain state, you can use
this query (this example is for Kano state):
http://overpass-turbo.eu/s/cxt

In case you don't want the admin_centre's nor labels nodes of any
relation, you have to run a different query. This one is for Kano:
http://overpass-turbo.eu/s/cxs

Whenever possible, I advise to use area codes instead names. For
example, Niger is the name of a state in Central Nigeria, but it's
also the name of Nigerias north neighbour country: Niger.

Getting the area code is simple: go to osm.org, search for the area
you are interested in (example Niger), get the relation id we want (in
our case, let's say we want Nigeria's Niger state relation id, so we
click in "State Boundary Niger, Nigeria" link, not in "country,
Niger"), and then we copy it's id (in our example 3718384), and we add
3600000000 + 3718384 = <a href="tel:3603718384" value="+13603718384" target="_blank">3603718384 to get the Niger state area code for
overpass queries: (area:<a href="tel:3603718384" value="+13603718384" target="_blank">3603718384)

To avoid a query to overload your web browser, instead of hitting
"run" button, click in "Export" button instead. There, go to "Query"
and then click on "compact" in the "convert to (compact) OverpassQL"
link. That will open a new window with a compact OverpassQL link.
Click on it and it will make the query and download directly in your
file system the result of the query. For example, for the last example
query (Kano state boundaries without admin_centre's nor labels), the
link is like this one:
http://overpass-api.de/api/interpreter?data=%5Btimeout%3A250%5D%3B%28relation%5B%22boundary%22%3D%22administrative%22%5D%5B%22admin%5Flevel%22%7E%224%7C6%7C8%22%5D%28area%3A3603710302%29%3B%29%2D%3E%2ErelBoundary%3B%28way%28r%2ErelBoundary%29%3B%29%2D%3E%2EwaysBoundary%3B%28node%28w%2EwaysBoundary%29%3B%29%2D%3E%2EnodesBoundary%3B%28%2ErelBoundary%3B%2EwaysBoundary%3B%2EnodesBoundary%3B%29%3Bout%20meta%3B%0A

If you need any more sofisticated query, just let us know:

Cheers,

Rafael.

On 08/11/15 12:00, Samuel Aiyeoribe wrote:
> Hello HOTties,
>
> Please does anyone know of a service for extracting/downloading
> OSM Admin Boundary that one can fork and host myself and also
> available on github.
>
> Looking forward to your reply.
>
> Cheers
>
> Samuel
>
>
> _______________________________________________ HOT mailing list
> [hidden email] https://lists.openstreetmap.org/listinfo/hot
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJWP7DwAAoJEB3niTly2pPQP+sP/2WFMgo990RaSG6ife1M10a/
TyNPjyUBRTcx1S3dU6bmp30kpyqq2GwsQckKbvJ4yKPhVwWCtouERtpAQyuSfoOy
GUwyjVuCbwZLaAlszUi0xKomkFpHbBA7UDYLbIkzh7Ppi3wM6qQEWgOLw5hUHevS
QreoACoMPoShAH+K+I1g+tQpfy2T0vF7KdQTL14UnN1YrKNe4YWlwklj7K/Zr9jF
+Tpi3H8nKQE3Be7oHa+R5gYC7uKzae6dgsy2QrV0RZ257yYXCKbkPaDL8vRxvIVb
HsAZWiD+qMbwaXVQ1/uLucu8YuFZdIdn8N6Jtt/0NgMBYTiVvexc72lrS1fVtpkr
IvzuLohJueL4a0aNVNyxnRn31jJO32tAqESej2SWDRVJ7k8NQl+6l72Y8Y2foHpy
6ZyI+dV1v0ktqHCKiAndbS7B9a56NezkOztoChYR5nJNmyCOZApD50NYJQCaapmp
Bh+sqPiu1RpWrTPwkRu5UCtPHfk3mCT+lu04+82xNZRcepDPJBuuUf5n4dVvAtjr
yilxbAZjkopOV/a6fIQ8jdJw4VhG2V79fUky37HvHvvEeWbmQCPwr7fwWo0h4oqj
X2SZgs4yjSfQjM/5Eztn7Fl7sewxwdRDHX8nW6H87TCGE+x2Vo9foQs3UQGTxVjz
TCA06fdas1+Ab7kSOYSa
=PcRn
-----END PGP SIGNATURE-----

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot



--
sent from my mobile device

Dale Kunce


_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot




--
Satoshi IIDA
mail: [hidden email]
twitter: @nyampire

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Rafael Avila Coya
In reply to this post by Dale Kunce
That website link is the same that Johan Emilsson gave in a previous
email in this same thread ;)

It's good that this service let's you choose between several different
output formats (although, very surprising, not osm format!)

But it's very inconvenient if you want for example to download, let's
say a Nigerian state with all LGA's (districts) + all wards
(municipalities) of each LGA. Or at least I couldn't see the way, except
selecting one by one every boundary you want to download, something very
time consuming if you have to select 75 districts and around 15 wards
for each of those districts.

Plus, I am not sure how often it updates the data.

Cheers,

Rafael.

On 08/11/15 22:13, Dale Kunce wrote:

> Samuel,
> There is this service I discovered a few days ago.
>
> https://osm.wno-edv-service.de/boundaries/
>
> Can't speak to its quality yet though.
>
> Dale
>
> On Sun, Nov 8, 2015 at 3:30 PM, Rafael Avila Coya <[hidden email]
> <mailto:[hidden email]>> wrote:
>
> Hi, Samuel:
>
> Here you have an overpass query to get all boundary relations for all
> states, LGA's and wards of Nigeria, with the admin_centre's and label
> of each relation when available: http://overpass-turbo.eu/s/cxp
>
> If you want Nigeria country boundary relation too, just change "4|6|8"
> by "2|4|6|8". In case you want for example only states and LGA's, just
> do "4|6", and so on.
>
> In case you want only the boundaries for a certain state, you can use
> this query (this example is for Kano state):
> http://overpass-turbo.eu/s/cxt
>
> In case you don't want the admin_centre's nor labels nodes of any
> relation, you have to run a different query. This one is for Kano:
> http://overpass-turbo.eu/s/cxs
>
> Whenever possible, I advise to use area codes instead names. For
> example, Niger is the name of a state in Central Nigeria, but it's
> also the name of Nigerias north neighbour country: Niger.
>
> Getting the area code is simple: go to osm.org <http://osm.org>,
> search for the area
> you are interested in (example Niger), get the relation id we want (in
> our case, let's say we want Nigeria's Niger state relation id, so we
> click in "State Boundary Niger, Nigeria" link, not in "country,
> Niger"), and then we copy it's id (in our example 3718384), and we add
> 3600000000 + 3718384 = 3603718384 <tel:3603718384> to get the Niger
> state area code for
> overpass queries: (area:3603718384 <tel:3603718384>)
>
> To avoid a query to overload your web browser, instead of hitting
> "run" button, click in "Export" button instead. There, go to "Query"
> and then click on "compact" in the "convert to (compact) OverpassQL"
> link. That will open a new window with a compact OverpassQL link.
> Click on it and it will make the query and download directly in your
> file system the result of the query. For example, for the last example
> query (Kano state boundaries without admin_centre's nor labels), the
> link is like this one:
> http://overpass-api.de/api/interpreter?data=%5Btimeout%3A250%5D%3B%28relation%5B%22boundary%22%3D%22administrative%22%5D%5B%22admin%5Flevel%22%7E%224%7C6%7C8%22%5D%28area%3A3603710302%29%3B%29%2D%3E%2ErelBoundary%3B%28way%28r%2ErelBoundary%29%3B%29%2D%3E%2EwaysBoundary%3B%28node%28w%2EwaysBoundary%29%3B%29%2D%3E%2EnodesBoundary%3B%28%2ErelBoundary%3B%2EwaysBoundary%3B%2EnodesBoundary%3B%29%3Bout%20meta%3B%0A
>
> If you need any more sofisticated query, just let us know:
>
> Cheers,
>
> Rafael.
>
> On 08/11/15 12:00, Samuel Aiyeoribe wrote:
>> Hello HOTties,
>
>> Please does anyone know of a service for extracting/downloading
>> OSM Admin Boundary that one can fork and host myself and also
>> available on github.
>
>> Looking forward to your reply.
>
>> Cheers
>
>> Samuel
>
>
>> _______________________________________________ HOT mailing list
>> [hidden email] <mailto:[hidden email]>
> https://lists.openstreetmap.org/listinfo/hot
>
>
>     _______________________________________________
>     HOT mailing list
>     [hidden email] <mailto:[hidden email]>
>     https://lists.openstreetmap.org/listinfo/hot
>
>
>
>
> --
> sent from my mobile device
>
> Dale Kunce
> http://normalhabit.com
>

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot
Reply | Threaded
Open this post in threaded view
|

Re: Admin Boundary Extraction Service

Rafael Avila Coya
In reply to this post by Satoshi IIDA
Hi, Satoshi:

The good thing I see is that it is really easy to get the file (no
need of writing any query).

But it updates the files only once in a month, that can be a problem
for people who want the updated OSM boundaries. Also, being only
geojson is maybe not what many people want.

Cheers, and have a nice week,

Rafael.

On 09/11/15 00:16, Satoshi IIDA wrote:

>
> Hello,
>
> What about Mapzen's boundary extract? Format is GeoJSON.
>
> https://mapzen.com/data/borders/
>
> Regards,
>
>
>
> 2015-11-09 6:13 GMT+09:00 Dale Kunce <[hidden email]
> <mailto:[hidden email]>>:
>
> Samuel, There is this service I discovered a few days ago.
>
> https://osm.wno-edv-service.de/boundaries/
>
> Can't speak to its quality yet though.
>
> Dale
>
> On Sun, Nov 8, 2015 at 3:30 PM, Rafael Avila Coya
> <[hidden email] <mailto:[hidden email]>> wrote:
>
> Hi, Samuel:
>
> Here you have an overpass query to get all boundary relations for
> all states, LGA's and wards of Nigeria, with the admin_centre's
> and label of each relation when available:
> http://overpass-turbo.eu/s/cxp
>
> If you want Nigeria country boundary relation too, just change
> "4|6|8" by "2|4|6|8". In case you want for example only states and
> LGA's, just do "4|6", and so on.
>
> In case you want only the boundaries for a certain state, you can
> use this query (this example is for Kano state):
> http://overpass-turbo.eu/s/cxt
>
> In case you don't want the admin_centre's nor labels nodes of any
> relation, you have to run a different query. This one is for Kano:
> http://overpass-turbo.eu/s/cxs
>
> Whenever possible, I advise to use area codes instead names. For
> example, Niger is the name of a state in Central Nigeria, but it's
> also the name of Nigerias north neighbour country: Niger.
>
> Getting the area code is simple: go to osm.org <http://osm.org>,
> search for the area you are interested in (example Niger), get the
> relation id we want (in our case, let's say we want Nigeria's Niger
> state relation id, so we click in "State Boundary Niger, Nigeria"
> link, not in "country, Niger"), and then we copy it's id (in our
> example 3718384), and we add 3600000000 + 3718384 = 3603718384
> <tel:3603718384> to get the Niger state area code for overpass
> queries: (area:3603718384 <tel:3603718384>)
>
> To avoid a query to overload your web browser, instead of hitting
> "run" button, click in "Export" button instead. There, go to
> "Query" and then click on "compact" in the "convert to (compact)
> OverpassQL" link. That will open a new window with a compact
> OverpassQL link. Click on it and it will make the query and
> download directly in your file system the result of the query. For
> example, for the last example query (Kano state boundaries without
> admin_centre's nor labels), the link is like this one:
> http://overpass-api.de/api/interpreter?data=%5Btimeout%3A250%5D%3B%28relation%5B%22boundary%22%3D%22administrative%22%5D%5B%22admin%5Flevel%22%7E%224%7C6%7C8%22%5D%28area%3A3603710302%29%3B%29%2D%3E%2ErelBoundary%3B%28way%28r%2ErelBoundary%29%3B%29%2D%3E%2EwaysBoundary%3B%28node%28w%2EwaysBoundary%29%3B%29%2D%3E%2EnodesBoundary%3B%28%2ErelBoundary%3B%2EwaysBoundary%3B%2EnodesBoundary%3B%29%3Bout%20meta%3B%0A
>
>  If you need any more sofisticated query, just let us know:
>
> Cheers,
>
> Rafael.
>
> On 08/11/15 12:00, Samuel Aiyeoribe wrote:
>> Hello HOTties,
>
>> Please does anyone know of a service for extracting/downloading
>> OSM Admin Boundary that one can fork and host myself and also
>> available on github.
>
>> Looking forward to your reply.
>
>> Cheers
>
>> Samuel
>
>
>> _______________________________________________ HOT mailing list
>> [hidden email] <mailto:[hidden email]>
> https://lists.openstreetmap.org/listinfo/hot
>
>
> _______________________________________________ HOT mailing list
> [hidden email] <mailto:[hidden email]>
> https://lists.openstreetmap.org/listinfo/hot
>
>
>
>
> -- sent from my mobile device
>
> Dale Kunce http://normalhabit.com
>
>
> _______________________________________________ HOT mailing list
> [hidden email] <mailto:[hidden email]>
> https://lists.openstreetmap.org/listinfo/hot
>
>
>
>
> -- Satoshi IIDA mail: [hidden email]
> <mailto:[hidden email]> twitter: @nyampire

_______________________________________________
HOT mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/hot