raster_stream_buffer.py
def length_of_degree(lat):
    """Calculate the length of a degree in meters."""
    m1 = 111132.92
    m2 = -559.82
    m3 = 1.175
    m4 = -0.0023
    p1 = 111412.84
    p2 = -93.5
    p3 = 0.118
    lat_rad = lat * numpy.pi / 180
    latlen = (
        m1 + m2 * numpy.cos(2 * lat_rad) + m3 * numpy.cos(4 * lat_rad) +
        m4 * numpy.cos(6 * lat_rad))
    longlen = abs(
        p1 * numpy.cos(lat_rad) + p2 * numpy.cos(3 * lat_rad) + p3 *
        numpy.cos(5 * lat_rad))
    return max(latlen, longlen)
Calculate the length of a degree in meters.
Calculate the length of a degree in meters.
Calculate the length of a degree in meters .
def length_of_degree(lat):
    m1 = 111132.92
    m2 = -559.82
    m3 = 1.175
    m4 = -0.0023
    p1 = 111412.84
    p2 = -93.5
    p3 = 0.118
    lat_rad = lat * numpy.pi / 180
    latlen = (
        m1 + m2 * numpy.cos(2 * lat_rad) + m3 * numpy.cos(4 * lat_rad) +
        m4 * numpy.cos(6 * lat_rad))
    longlen = abs(
        p1 * numpy.cos(lat_rad) + p2 * numpy.cos(3 * lat_rad) + p3 *
        numpy.cos(5 * lat_rad))
    return max(latlen, longlen)
def length_of_degree ( lat ) : m1 = 111132.92 m2 = - 559.82 m3 = 1.175 m4 = - 0.0023 p1 = 111412.84 p2 = - 93.5 p3 = 0.118 lat_rad = lat * numpy . pi / 180 latlen = ( m1 + m2 * numpy . cos ( 2 * lat_rad ) + m3 * numpy . cos ( 4 * lat_rad ) + m4 * numpy . cos ( 6 * lat_rad ) ) longlen = abs ( p1 * numpy . cos ( lat_rad ) + p2 * numpy . cos ( 3 * lat_rad ) + p3 * numpy . cos ( 5 * lat_rad ) ) return max ( latlen , longlen )
Calculate the length of a degree in meters.
Calculate the length of a degree in meters .
"""Calculate the length of a degree in meters."""
lat