@@ -0,0 +1,591 @@
+from _helpers import cursor_wrap, dump%0A%0A%0A@cursor_wrap%0Adef main(cursor):%0A    sql = %22%22%22%0A        SELECT r.osm_id, c.name AS country, r.name AS region, ST_AsGeoJSON(r.way)%0A        FROM osm_polygon c%0A        LEFT JOIN osm_polygon r ON ST_Contains(c.way, r.way)%0A        WHERE c.osm_id = -59065 AND r.admin_level = '4'%0A        AND r.osm_id IN (-59189, -59506, -59161, -59275, -59195, -59752, -59162)%0A    %22%22%22%0A    cursor.execute(sql)%0A    dump(__file__, sorted(cursor.fetchall(), key=lambda item: item%5B1:3%5D),%0A         ('osmid', 'country', 'region', 'geojson'))%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

add country regions borders