geobox.py
def compute_tuple(lat, lon, resolution, slice):
  """Computes the tuple Geobox for a coordinate with a resolution and slice."""
  decimal.getcontext().prec = resolution + 3
  lat = decimal.Decimal(str(lat))
  lon = decimal.Decimal(str(lon))
  slice = decimal.Decimal(str(1.0 * slice * 10 ** -resolution))
  
  adjusted_lat = _round_slice_down(lat, slice)
  adjusted_lon = _round_slice_down(lon, slice)
  return (adjusted_lat, adjusted_lon - slice,
          adjusted_lat - slice, adjusted_lon)
Computes the tuple Geobox for a coordinate with a resolution and slice.
Computes the tuple Geobox for a coordinate with a resolution and slice.
Computes the tuple Geobox for a coordinate with a resolution and slice .
def compute_tuple(lat, lon, resolution, slice):
  decimal.getcontext().prec = resolution + 3
  lat = decimal.Decimal(str(lat))
  lon = decimal.Decimal(str(lon))
  slice = decimal.Decimal(str(1.0 * slice * 10 ** -resolution))
  adjusted_lat = _round_slice_down(lat, slice)
  adjusted_lon = _round_slice_down(lon, slice)
  return (adjusted_lat, adjusted_lon - slice,
          adjusted_lat - slice, adjusted_lon)
def compute_tuple ( lat , lon , resolution , slice ) : decimal . getcontext ( ) . prec = resolution + 3 lat = decimal . Decimal ( str ( lat ) ) lon = decimal . Decimal ( str ( lon ) ) slice = decimal . Decimal ( str ( 1.0 * slice * 10 ** - resolution ) ) adjusted_lat = _round_slice_down ( lat , slice ) adjusted_lon = _round_slice_down ( lon , slice ) return ( adjusted_lat , adjusted_lon - slice , adjusted_lat - slice , adjusted_lon )
Computes the tuple Geobox for a coordinate with a resolution and slice.
Computes the tuple Geobox for a coordinate with a resolution and slice .
"""Computes the tuple Geobox for a coordinate with a resolution and slice."""
lat
lon
resolution
slice