def features_keep_within_radius(obj, center, radius, units):
features_keep = []<EOL>for feature in tqdm(obj['<STR_LIT>']):<EOL><INDENT>if all([getattr(geopy.distance.vincenty((lat,lon), center), units) < radius for (lon,lat) in geojson.utils.coords(feature)]):<EOL><INDENT>features_keep.append(feature)<EOL><DEDENT><DEDENT>obj['<STR_LIT>'] = features_keep<EOL>return obj<EOL>
Filter all features in a collection by retaining only those that
fall within the specified radius.