def cf_xy_coord_names(crs):
    """ Returns appropriate names for coordinates given CRS

    Parameters
    ----------
    crs : rasterio.crs.CRS
        Coordinate reference system

    Returns
    -------
    str : x_coord_name
        X coordinate name
    str : y_coord_name
        Y coordinate name

    Examples
    --------
    >>> cf_crs_attrs(CRS.from_epsg(4326))  # WGS84
    ('longitude', 'latitude')
    >>> cf_crs_attrs(CRS.from_epsg(32619))  # UTM19N
    ('x', 'y')
    """
    if crs.is_geographic:
        return 'longitude', 'latitude'
    elif crs.is_projected:
        return 'x', 'y'
    else:
        raise ValueError('CRS must either be geographic or projected')
