@staticmethod<EOL><INDENT>def toposimplify(geojson, p):<DEDENT>
proc_out = subprocess.run(<EOL>["<STR_LIT>"],<EOL>input=bytes(json.dumps(geojson), "<STR_LIT:utf-8>"),<EOL>stdout=subprocess.PIPE,<EOL>)<EOL>proc_out = subprocess.run(<EOL>["<STR_LIT>", "<STR_LIT>", p],<EOL>input=proc_out.stdout,<EOL>stdout=subprocess.PIPE,<EOL>stderr=subprocess.DEVNULL,<EOL>)<EOL>topojson = json.loads(proc_out.stdout)<EOL>topojson["<STR_LIT>"]["<STR_LIT>"] = topojson["<STR_LIT>"].pop("<STR_LIT:->")<EOL>return topojson<EOL>
Convert geojson and simplify topology.

geojson is a dict representing geojson.
p is a simplification threshold value between 0 and 1.