def get_shapefile_srs_from_ds(datasource):
    """Get the spatial reference object of the shapefile
    :param datasource: The shapefile datasource
    :return: The spatial reference object
    """
    layer = datasource.GetLayerByIndex(0)
    spatial_ref = layer.GetSpatialRef()
    return spatial_ref