''

def save(self, out, format):

    if (format == 'WKT'):
        if ('wkt' in self.content['crs']):
            out.write(self.content['crs']['wkt'])
        else:
            out.write(_sref_4326().ExportToWkt())
        return
    if (format in ('GeoJSON', 'GeoBSON', 'GeoAMF')):
        content = self.content
        if ('wkt' in content['crs']):
            content['crs'] = {'type': 'link', 'properties': {'href': '0.wkt', 'type': 'ogcwkt'}}
        else:
            del content['crs']
    elif (format in ('ArcJSON', 'ArcBSON', 'ArcAMF')):
        content = reserialize_to_arc(self.content, (format == 'ArcAMF'))
    else:
        raise KnownUnknown(('Vector    response    only    saves    .geojson,    .arcjson,    .geobson,    .arcbson,    .geoamf,    .arcamf    and    .wkt    tiles,    not    "%s"' % format))
    if (format in ('GeoJSON', 'ArcJSON')):
        indent = ((self.verbose and 2) or None)
        encoded = JSONEncoder(indent=indent).iterencode(content)
        float_pat = compile('^-?\\d+\\.\\d+$')
        for atom in encoded:
            if float_pat.match(atom):
                piece = (('%%.%if' % self.precision) % float(atom))
            else:
                piece = atom
            out.write(piece.encode('utf8'))
    elif (format in ('GeoBSON', 'ArcBSON')):
        import bson
        encoded = bson.dumps(content)
        out.write(encoded)
    elif (format in ('GeoAMF', 'ArcAMF')):
        import pyamf
        for class_name in pyamf_classes.items():
            pyamf.register_class(*class_name)
        encoded = pyamf.encode(content, 0).read()
        out.write(encoded)
