Section 57. A crime committed on or within one hundred rods of the boundary line of two counties may be alleged to have been committed, and may be prosecuted and punished, in either county; and if committed on or within fifty rods of the boundary line of two judicial districts, it may be alleged to have been committed, and may be prosecuted and punished, in either district. A crime committed upon the sea within one league of the shore may be prosecuted and punished in an adjacent county.