The Rambam · Sefer Zemanim
הלכות שבת כ״חSabbath 28
Chapter 28 of 30 in Sabbath — 19 halachot
Halacha 1א׳
כָּל בֵּית דִּירָה שֶׁהוּא יוֹצֵא מִן הַמְּדִינָה אִם הָיָה בֵּינוֹ וּבֵין הַמְּדִינָה שִׁבְעִים אַמָּה וּשְׁנֵי שְׁלִישֵׁי אַמָּה שֶׁהוּא צֶלַע בֵּית סָאתַיִם הַמְרֻבַּעַת אוֹ פָּחוֹת מִזֶּה הֲרֵי זֶה מִצְטָרֵף לִמְדִינָה וְנֶחְשָׁב מִמֶּנָּה. וּכְשֶׁמּוֹדְדִין לָהּ אַלְפַּיִם אַמָּה לְכָל רוּחַ מוֹדְדִין חוּץ מִבֵּית דִּירָה זֶה:
[Regarding] any house of residence that is outside of the city: If there was seventy and two thirds ells—which is one side of two beit seah squared—or less between it and the city, it is surely combined to the city and considered to be a part of it. And when we measure two thousand ells to each side of [the city], we measure outwards from this house of residence.
Halacha 2ב׳
הָיָה בַּיִת זֶה קָרוֹב לַמְּדִינָה בְּשִׁבְעִים אַמָּה וּבַיִת שֵׁנִי קָרוֹב לְבַיִת רִאשׁוֹן בְּשִׁבְעִים אַמָּה וּבַיִת שְׁלִישִׁי קָרוֹב לַשֵּׁנִי בְּשִׁבְעִים אַמָּה וְכֵן עַד מַהֲלַךְ כַּמָּה יָמִים הֲרֵי הַכּל כִּמְדִינָה אַחַת וּכְשֶׁמּוֹדְדִין מוֹדְדִין מִחוּץ לַבַּיִת הָאַחֲרוֹן. וְהוּא שֶׁיִּהְיֶה בֵּית דִּירָה זֶה אַרְבַּע אַמּוֹת עַל אַרְבַּע אַמּוֹת אוֹ יֶתֶר:
[If] this house was seventy ells adjacent from the city and a second house was seventy ells adjacent from the first house and a third house was seventy ells adjacent from the second house and so on for a journey of several days, it is surely all like one city. And when we measure, we measure from the last house. And that is so long as the house has four ells by four ells or more.
Halacha 3ג׳
וְכֵן בֵּית הַכְּנֶסֶת שֶׁיֵּשׁ בּוֹ בֵּית דִּירָה לְחַזָּנִין וּבֵית עֲבוֹדַת כּוֹכָבִים וּמַזָּלוֹת שֶׁיֵּשׁ בּוֹ בֵּית דִּירָה לְכֹהֲנֵיהֶם וְהָאוֹצָרוֹת שֶׁיֵּשׁ בָּהֶן בֵּית דִּירָה וְהַגֶּשֶׁר וְהַקֶּבֶר שֶׁיֵּשׁ בָּהֶן בֵּית דִּירָה וְשָׁלֹשׁ מְחִצּוֹת שֶׁאֵין עָלֶיהָ תִּקְרָה וְיֵשׁ בָּהֶן אַרְבַּע עַל אַרְבַּע אַמּוֹת וְהַבֻּרְגָּנִין וְהַבַּיִת הַבָּנוּי בַּיָּם וּשְׁתֵּי מְחִצּוֹת שֶׁיֵּשׁ עֲלֵיהֶן תִּקְרָה וּמְעָרָה שֶׁיֵּשׁ בִּנְיָן עַל פִּיהָ וְיֵשׁ בָּהּ בֵּית דִּירָה. כָּל אֵלּוּ מִצְטָרְפִין עִמָּהּ אִם הָיוּ בְּתוֹךְ שִׁבְעִים אַמָּה וְשִׁירַיִם. וּמֵאוֹתוֹ הַבַּיִת הַיּוֹצֵא רוֹאִין כְּאִלּוּ חוּט מָתוּחַ עַל פְּנֵי כָּל הַמְּדִינָה וּמוֹדְדִין חוּץ לְאוֹתוֹ הַחוּט אַלְפַּיִם אַמָּה:
And likewise a synagogue that has a house in it for the cantors; a house of idolatry that has a house in it for its priests; storehouses that have a house of residence in them; a bridge or a graveyard that has a house of residence in them; three partitions without a roof upon them but with four by four ells; guardhouses; a house built on the sea; two partitions that have a roof upon them; and a cave that has a building at its mouth and a house of residence in it—all of these combine to [the city], if they were within seventy ells and a bit. And we see it as if a string was extended from that house to the edges of all of the city; and we measure two thousand ells from that string outwards.
Mishneh Torah, Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Edition, tr. R. Francis Nataf, 2019 — CC BY