<!-- markdownlint-disable -->

<a href="https://github.com/pypsa-meets-earth/earth-osm/blob/main/earth_osm/gfk_download.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

# <kbd>module</kbd> `gfk_download`





---

<a href="https://github.com/pypsa-meets-earth/earth-osm/blob/main/earth_osm/gfk_download.py#L28"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `download_file`

```python
download_file(url, dir, exists_ok=False)
```

Download file from url to dir 



**Args:**
 
 - <b>`url`</b> (str):  url to download 
 - <b>`dir`</b> (str):  directory to download to 
 - <b>`exists_ok`</b> (bool):  Flag to allow skipping download if file exists. 



**Returns:**
 
 - <b>`str`</b>:  filepath of downloaded file 


---

<a href="https://github.com/pypsa-meets-earth/earth-osm/blob/main/earth_osm/gfk_download.py#L63"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `download_sitemap`

```python
download_sitemap(geom, pkg_data_dir)
```






---

<a href="https://github.com/pypsa-meets-earth/earth-osm/blob/main/earth_osm/gfk_download.py#L73"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `download_pbf`

```python
download_pbf(url, update, data_dir)
```






---

<a href="https://github.com/pypsa-meets-earth/earth-osm/blob/main/earth_osm/gfk_download.py#L97"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `calculate_md5`

```python
calculate_md5(fname)
```






---

<a href="https://github.com/pypsa-meets-earth/earth-osm/blob/main/earth_osm/gfk_download.py#L104"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>function</kbd> `verify_pbf`

```python
verify_pbf(pbf_inputfile, pbf_md5file)
```






