def iter_coords(obj):
if isinstance(obj, (tuple, list)):<EOL><INDENT>coords = obj<EOL><DEDENT>elif '<STR_LIT>' in obj:<EOL><INDENT>coords = [geom['<STR_LIT>']['<STR_LIT>'] for geom in obj['<STR_LIT>']]<EOL><DEDENT>elif '<STR_LIT>' in obj:<EOL><INDENT>coords = obj['<STR_LIT>']['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>coords = obj.get('<STR_LIT>', obj)<EOL><DEDENT>for coord in coords:<EOL><INDENT>if isinstance(coord, (float, int)):<EOL><INDENT>yield tuple(coords)<EOL>break<EOL><DEDENT>else:<EOL><INDENT>for f in iter_coords(coord):<EOL><INDENT>yield f<EOL><DEDENT><DEDENT><DEDENT>
Returns all the coordinate tuples from a geometry or feature.