code: def latlon_round(latlon, spacing=1000):
      '''round to nearest grid corner'''
      g = latlon_to_grid(latlon)
      g.easting = (g.easting // spacing) * spacing
      g.northing = (g.northing // spacing) * spacing
      return g.latlon(f latlon_round(latlon, spacing=1000):
      '''round to nearest grid corner'''
      g = latlon_to_grid(latlon)
      g.easting = (g.easting // spacing) * spacing
      g.northing = (g.northing // spacing) * spacing
      return g.latlon()
docs: round to nearest grid corner