pycensus.census.countries.israel.geography¶
Boundary fetching shared by every Israel census source.
Technical aspects
Real boundaries, no fabrication. Two live, unauthenticated ArcGIS
endpoints are used (verified 2026-08-19/2026-08-20, see
:mod:pycensus.israel.constants for exact URLs and field
cross-checks):
- CBS's own hosted ArcGIS Online layer (
STAT_AREAS_2022_URL) for statistical-area polygons. - The Israel Planning Administration's (iplan.gov.il) ArcGIS Server
layer (
IPLAN_JURISDICTION_URL) for municipal jurisdiction (locality) polygons, whichdistrict/nationare built by dissolving.
IMPLEMENTED_LEVELS is only nation/district/locality/
statistical_area -- subdistrict/street/block have no
verified real boundary source and raise ValueError rather than
fabricate placeholder polygons (the old module's
np.random.seed(hash(region)) fabrication is gone).
West Bank exclusion: both real sources were queried live for a known
West Bank settlement (Ariel) and returned zero features from either --
neither ever exposes West Bank geometry/attributes. Machoz values
in :data:pycensus.israel.constants.EXCLUDED_MACHOZ are still
filtered out defensively.
Open caveat (not resolved): the iplan Machoz field's "Northern"
(צפון) district, as Israel administers it, includes the Golan
Heights -- also not internationally recognized as sovereign Israeli
territory, same category as the West Bank. No verified
locality-level Golan/non-Golan classification was found to filter it
out, so level="district" region "1"/"Northern" and
level="nation" currently include Golan Heights polygon area.
locality/statistical_area results for any specific non-Golan
locality (e.g. Beersheba) are unaffected.
Every boundary fetch here is stateless - persistence is handled
entirely by :mod:pycensus.cache, one level higher in the call stack
(in each source's loader.py), not by this module.
Source
https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/gvulot_retzef/MapServer/1 https://services8.arcgis.com/JcXY3lLZni6BK4El/arcgis/rest/services/statistical_areas_2022/FeatureServer/0
districts_in_aoi(aoi, year=2022)
¶
Return the CBS codes of every district intersecting aoi.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aoi
|
GeoDataFrame
|
Area of interest, any CRS. |
required |
year
|
int
|
Geographic data vintage year (default 2022, only vintage available). |
2022
|
Returns:
| Type | Description |
|---|---|
List[str]
|
List of one-digit district codes. |
localities_in_aoi(aoi)
¶
Return the CR_LAMAS codes of every locality intersecting aoi.
Chunks the real jurisdiction-layer query per-district (using a cheap
bbox pre-filter, :func:_districts_by_bbox) rather than issuing one
unchunked whole-country query, which the iplan MapServer 500s/times
out on (see module docstring).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aoi
|
GeoDataFrame
|
Area of interest, any CRS. |
required |
Returns:
| Type | Description |
|---|---|
List[str]
|
List of locality codes ( |
load_boundaries(level, region=None, year=2022, erase_water=None)
¶
Fetch real boundaries for one Israel geography level.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
str
|
Standard geometry level name, resolved through
:data: |
required |
region
|
Optional[str]
|
Region code (district code, locality code/name, etc). If None, returns all geometries at this level for the entire country/level (may be slow -- see module docstring on pagination). |
None
|
year
|
int
|
Vintage year (default 2022, only vintage available). |
2022
|
erase_water
|
Optional[bool]
|
Unused (kept for interface parity) -- no verified inland-water-erasure source is wired up here. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with a |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
load_boundaries_multi(level, regions=None, year=2022, erase_water=None, aoi=None)
¶
Fetch and concatenate boundaries across one or more regions, optionally clipped to an AOI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
str
|
Standard geometry level name. |
required |
regions
|
Optional[Union[str, List[str]]]
|
Region code(s). If None, returns every region at this level. |
None
|
year
|
int
|
Vintage year (default 2022). |
2022
|
erase_water
|
Optional[bool]
|
Unused, kept for interface parity. |
None
|
aoi
|
Optional[GeoDataFrame]
|
If given, the result is filtered to geometries intersecting it. |
None
|
Returns:
| Type | Description |
|---|---|
GeoDataFrame
|
GeoDataFrame with a |
states_in_aoi(aoi, year=2022)
¶
Return the CBS codes of every district intersecting aoi.
Kept for naming parity with other pyCensus countries -- Israel's equivalent of "states" is districts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aoi
|
GeoDataFrame
|
Area of interest, any CRS. |
required |
year
|
int
|
Geographic data vintage year (default 2022). |
2022
|
Returns:
| Type | Description |
|---|---|
List[str]
|
List of one-digit district codes. |