
    6i                        S r 0 SS_SS_SS_SS_S	S
_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS _S!S"_0 S#S$_S%S&_S'S(_S)S*_S+S,_S-S._S/S0_S1S2_S3S4_S5S6_S7S8_S9S:_S;S<_S=S>_S?S@_SASB_SCSD_E0 SESF_SGSH_SISJ_SKSL_SMSN_SOSP_SQSR_SSST_SUSV_SWSX_SYSZ_S[S\_S]S^_S_S`_SaSb_ScSd_SeSf_E0 SgSh_SiSj_SkSl_SmSn_SoSp_SqSr_SsSt_SuSv_SwSx_SySz_S{S|_S}S~_SS_SS_SS_SS_SS_E0 SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_E0 SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_ESSSSSSSSSSSSSSS.ErS\S\4S jrS r\S:X  a|  SSKr\" \R                  5      S:  aB  \R                  S   S:X  a  \" 5         g\R                  S   r	 \" \	5      r
\" S\	 S\
 35        g\" S5        \" S5        \" S5        \" 5         gg! \ a  r\" S\ 35         SrCgSrCff = f)a  
Registry of Geofabrik download URLs for OSM PBF files.

Geofabrik URL Pattern:
https://download.geofabrik.de/{region}/{subregion}/{name}-latest.osm.pbf

Examples:
- US States: https://download.geofabrik.de/north-america/us/alabama-latest.osm.pbf
- Countries: https://download.geofabrik.de/asia/india-latest.osm.pbf
- Egypt: https://download.geofabrik.de/africa/egypt-latest.osm.pbf
alabamaznorth-america/us/alabamaalaskaznorth-america/us/alaskaarizonaznorth-america/us/arizonaarkansasznorth-america/us/arkansas
californiaznorth-america/us/californiacoloradoznorth-america/us/coloradoconnecticutznorth-america/us/connecticutdelawareznorth-america/us/delawarefloridaznorth-america/us/floridageorgiaznorth-america/us/georgiahawaiiznorth-america/us/hawaiiidahoznorth-america/us/idahoillinoisznorth-america/us/illinoisindianaznorth-america/us/indianaiowaznorth-america/us/iowakansasznorth-america/us/kansaskentuckyznorth-america/us/kentucky	louisianaznorth-america/us/louisianamaineznorth-america/us/mainemarylandznorth-america/us/marylandmassachusettsznorth-america/us/massachusettsmichiganznorth-america/us/michigan	minnesotaznorth-america/us/minnesotamississippiznorth-america/us/mississippimissouriznorth-america/us/missourimontanaznorth-america/us/montananebraskaznorth-america/us/nebraskanevadaznorth-america/us/nevadaznew-hampshireznorth-america/us/new-hampshirez
new-jerseyznorth-america/us/new-jerseyz
new-mexicoznorth-america/us/new-mexicoznew-yorkznorth-america/us/new-yorkznorth-carolinaznorth-america/us/north-carolinaznorth-dakotaznorth-america/us/north-dakotaohioznorth-america/us/ohiooklahomaznorth-america/us/oklahomaoregonznorth-america/us/oregonpennsylvaniaznorth-america/us/pennsylvaniazrhode-islandznorth-america/us/rhode-islandzsouth-carolinaznorth-america/us/south-carolinazsouth-dakotaznorth-america/us/south-dakota	tennesseeznorth-america/us/tennesseetexasznorth-america/us/texasutahznorth-america/us/utahvermontznorth-america/us/vermontvirginiaznorth-america/us/virginia
washingtonznorth-america/us/washingtonzwest-virginiaznorth-america/us/west-virginia	wisconsinznorth-america/us/wisconsinwyomingznorth-america/us/wyomingzdistrict-of-columbiaz%north-america/us/district-of-columbiaegyptzafrica/egyptzsouth-africazafrica/south-africakenyazafrica/kenyanigeriazafrica/nigeriamoroccozafrica/moroccoindiaz
asia/indiathailandzasia/thailandchinaz
asia/chinajapanz
asia/japan	indonesiazasia/indonesiavietnamzasia/vietnamphilippineszasia/philippinesmalaysiazasia/malaysia	singaporezasia/singaporepakistanzasia/pakistan
bangladeshzasia/bangladeshzsouth-koreazasia/south-koreataiwanzasia/taiwangermanyzeurope/germanyfrancezeurope/franceitalyzeurope/italyspainzeurope/spainzunited-kingdomzeurope/great-britainpolandzeurope/polandnetherlandszeurope/netherlandsbelgiumzeurope/belgiumgreecezeurope/greeceportugalzeurope/portugalswedenzeurope/swedennorwayzeurope/norwayfinlandzeurope/finlanddenmarkzeurope/denmarkswitzerlandzeurope/switzerlandaustriazeurope/austriazbaden-wuerttembergz!europe/germany/baden-wuerttembergbayernzeurope/germany/bayernberlinzeurope/germany/berlinbrandenburgzeurope/germany/brandenburgbremenzeurope/germany/bremenhamburgzeurope/germany/hamburghessenzeurope/germany/hessenzmecklenburg-vorpommernz%europe/germany/mecklenburg-vorpommernniedersachsenzeurope/germany/niedersachsenznordrhein-westfalenz"europe/germany/nordrhein-westfalenzrheinland-pfalzzeurope/germany/rheinland-pfalzsaarlandzeurope/germany/saarlandsachsenzeurope/germany/sachsenzsachsen-anhaltzeurope/germany/sachsen-anhaltzschleswig-holsteinz!europe/germany/schleswig-holstein
thueringenzeurope/germany/thueringenbrazilzsouth-america/brazilzsouth-america/argentinazsouth-america/colombiazsouth-america/chilezsouth-america/peruznorth-america/mexicoznorth-america/canadazaustralia-oceania/australiazaustralia-oceania/new-zealandzasia/india/central-zonezasia/india/eastern-zonezasia/india/north-eastern-zonezasia/india/northern-zonezasia/india/southern-zonezasia/india/western-zone)	argentinacolombiachileperumexicocanada	australiaznew-zealandzindia-central-zonezindia-eastern-zonezindia-north-eastern-zonezindia-northern-zonezindia-southern-zonezindia-western-zonelocationreturnc           
          U R                  5       n U [        ;  aP  SR                  [        [        R	                  5       5      SS 5      n[        SU  SU S[        [        5       35      e[        U    nSU S3$ )	z
Get the Geofabrik download URL for a location.

Args:
    location: Location name (e.g., 'ohio', 'egypt', 'india')
    
Returns:
    Full download URL for the PBF file
    
Raises:
    ValueError: If location not found in registry
z, N
   z
Location 'z6' not found in registry.
Available locations include: z...
Total locations: zhttps://download.geofabrik.de/z-latest.osm.pbf)lowerGEOFABRIK_REGISTRYjoinsortedkeys
ValueErrorlen)r[   	availablepaths      ,/data2/heatmap/scripts/geofabrik_registry.pyget_geofabrik_urlri      s     ~~H))IIf%7%<%<%>?DE	
 #,,5; 7  #$6 78:
 	
 h'D+D6AA    c                     [        S5        [        S5        0 n [        [        R                  5       5       H5  u  pUR	                  S5      S   nX0;  a  / X'   X   R                  U5        M7     [        U R                  5       5       HI  u  p4[        SUR                  5       R                  SS5       S35        U H  n[        S	U 35        M     MK     [        S
[        [        5       S35        [        S5        g)z.Print all available locations in the registry.u0   
📍 Available Locations in Geofabrik Registry:z<============================================================/    
- :z  - u   
📊 Total: z
 locationsN)	printrb   r`   itemssplitappendupperreplacere   )regionsr[   rg   region	locationslocs         rh   list_available_locationsr|      s    	
=>	(O G !3!9!9!;<C#  GOx(	 = $GMMO46<<>))#s34A67CD,  5
 
N3123:
>?	(Orj   __main__rm   N   listzURL for z: zError: zUsage:z+  python -m scripts.geofabrik_registry listz1  python -m scripts.geofabrik_registry <location>)__doc__r`   strri   r|   __name__sysre   argvr[   urlrr   rd   e rj   rh   <module>r      s'  
F)F 'F )	F
 +F /F +F 1F +F )F )F 'F %F +F )F  #!F" '#F$ +%F& -'F( %)F* ++F, 5-F. +/F0 -1F2 13F4 +5F6 )7F8 +9F: ';F< 5=F> /?F@ /AFB +CFD 7EFF 3GFH #IFJ +KFL 'MFN 3OFP 3QFR 7SFT 3UFV -WFX %YFZ #[F\ )]F^ +_F` /aFb 5cFd -eFf )gFh CiFn ^oFp )qFr ^sFt uFv wF| \}F~ F@ \AFB \CFD !EFF ~GFH %IFJ KFL !MFN OFP #QFR %SFT mUFZ [F\ o]F^ ^_F` ^aFb ,cFd oeFf 'gFh iFj okFl !mFn ooFp oqFr sFt uFv 'wFx yF~ =F@ %AFB %CFD /EFF %GFH 'IFJ %KFL EMFN 3OFP ?QFR 7SFT )UFV 'WFX 5YFZ =[F\ -]Fb $cFd +("  %$ /2 43 ?553KF RB B B6, z
388}q88A;& $&xx{H%'1
"SE23 	h;<AB "#   %sm$$%s   )G! !G<'G77G<