def dataset_get_projection_wkt(gdal_ds):
    """returns a gdal dataset's projection in well known text"""
    ds_wkt = gdal_ds.GetProjectionRef()
    if ds_wkt == '':
        ds_wkt = gdal_ds.GetGCPProjection()

    return ds_wkt