#!/usr/bin/env python import json with open("data.geojson") as file: j = json.load(file) for feature in j["features"]: id = feature["id"] name = "h:" + id[5:] coords = feature["geometry"]["coordinates"] print "set " + name + " '" + json.dumps(feature) + "'" print "geoadd hotels " + str(coords[0]) + " " + str(coords[1]) + " " + name