
    c0i                        d Z i ddddddddd	d
dddddddddddddddddddddd d!d"i d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDi dEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfi dgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddddddi dddddddddddddddddddddddddddddddddddddddddddd	ZdedefdZd Zedk(  rzddlZ eej                        dkD  rAej                  d   dk(  r e        yej                  d   Z		  ee	      Z
 ede	 de
        y ed        ed«        edë        e        yy# e$ rZ ede        Y dZ[ydZ[ww xY w)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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-zealand)	brazil	argentinacolombiachileperumexicocanada	australiaznew-zealandlocationreturnc           
          | j                         } | t        vrPdj                  t        t        j	                               dd       }t        d|  d| dt        t                     t        |    }d| dS )	a  
    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)rQ   	availablepaths      scripts/geofabrik_registry.pyget_geofabrik_urlr_   ~   s     ~~H))IIf%7%<%<%>?DE	
 #,,5; 7  #$6 78:
 	
 h'D+D6AA    c                     t        d       t        d       i } t        t        j                               D ]6  \  }}|j	                  d      d   }|| vrg | |<   | |   j                  |       8 t        | j                               D ]G  \  }}t        d|j                         j                  dd       d       |D ]  }t        d	|         I t        d
t        t               d       t        d       y)z.Print all available locations in the registry.u0   
📍 Available Locations in Geofabrik Registry:z<============================================================/    
- :z  - u   
📊 Total: z
 locationsN)	printrX   rV   itemssplitappendupperreplacer[   )regionsrQ   r]   region	locationslocs         r^   list_available_locationsrr      s    	
=>	(O G !3!9!9!;<$C#  GFOx(	 = $GMMO4	6<<>))#s34A67CD,  5
 
N3123:
>?	(Or`   __main__rc   N   listzURL for z: zError: zUsage:z+  python -m scripts.geofabrik_registry listz1  python -m scripts.geofabrik_registry <location>)__doc__rV   strr_   rr   __name__sysr[   argvrQ   urlrh   rZ   e r`   r^   <module>r~      s  
l)l 'l )	l
 +l /l +l 1l +l )l )l 'l %l +l )l  #!l" '#l$ +%l& -'l( %)l* ++l, 5-l. +/l0 -1l2 13l4 +5l6 )7l8 +9l: ';l< 5=l> /?l@ /AlB +ClD 7ElF 3GlH #IlJ +KlL 'MlN 3OlP 3QlR 7SlT 3UlV -WlX %YlZ #[l\ )]l^ +_l` /alb 5cld -elf )glh Ciln ^olp )qlr ^slt ulv wl| \}l~ l@ \AlB \ClD !ElF ~GlH %IlJ KlL !MlN OlP #QlR %SlT mUlZ [l\ o]l^ ^_l` ^alb ,cld oelf 'glh ilj okll !mln oolp oqlr slt ulv 'wlx yl~ %*("  %$ /2Wl ^B B B6, z
388}q88A;& $&xx{H%'1
"SE23 	h;<AB "#   %sm$$%s   +F# #F=(F88F=