'Get mime-type and format by file extension, one of "mvt", "json", "topojson" or "pbf".'

def getTypeByExtension(self, extension):

    if (extension.lower() == 'mvt'):
        return ('application/octet-stream+mvt', 'MVT')
    elif (extension.lower() == 'json'):
        return ('application/json', 'JSON')
    elif (extension.lower() == 'topojson'):
        return ('application/json', 'TopoJSON')
    elif (extension.lower() == 'pbf'):
        return ('application/x-protobuf', 'PBF')
    else:
        raise ValueError(extension)
