import math


def wgs84_to_spherical_mercator(lon, lat):
    """Converts lon-lat-coordinates (WGS84, EPSG:4326) to cartesian coordinates in EPSG:900913 (spherical mercator).
    Note that distances can be very inaccurate with this projection, see
    https://gis.stackexchange.com/questions/184648/whats-the-accuracy-of-web-mercator-epsg3857.

    Args:
        lon (float): longitude data of the point.
        lat (float): latitude data of the point.

    Returns:
        list: the x- and y-coordinate of the point in a list.
    """
    x = lon * 20037508.34 / 180;
    y = math.log(math.tan((90 + lat) * math.pi / 360)) / (math.pi / 180);
    y = y * 20037508.34 / 180;
    return [x, y]