[GIS] Extract Administrative Boundaries into OSM poly Format

administrative-boundariesopenstreetmap

I need to extract some administrative boundaries from big OSM extract, and put them in .poly file.
Are there any tools for this task?

I've tried Perl script by Gary68 (http://svn.openstreetmap.org/applications/utils/gary68/boundaries.pl), but it returned something like
ERROR: at least one needed node missing in osm file.
ERROR: at least one needed way missing in osm file.
ERROR: at least one needed node or way missing.

Also I've installed osmium, but I don't see tool for my task.

What would you advise me?

(Basically I need to get a list of all houses on all streets of a certain city, and do it automatically for number of cities)

Best Answer

The perl script by Gary68 is outdated, because Openstreetmap has skipped the 32bit limit on node numbers, and Gary68 does not maintain his scripts anymore.

You can use osmconvert and osmfilter to query extracts, or use Overpass API to request the live database. The Openstreetmap wiki will guide you through both.


EDIT

http://wiki.openstreetmap.org/wiki/.poly#Converting_to.2Ffrom_POLY_format links several programmes which can convert to .poly format. I have not used them lately

Related Question