Skip to main content
# address2img
A python module to convert addresses to map images using open source map data sources and mapnik.
## Installation
address2img works on any system with mapnik 2.x or newer.

Mapnik must be installed before proceeding with install.
To test for mapnik, run
```bash
mapnik-config -v # Should return a version 2.x or newer
```

Use pip to install address2img
```bash
sudo python -m pip install address2img
```

## Basic Usage
To use address2img, the configuration file and mapnik xml file must be configured.
The configuration file is [config.ini](config.ini) by default. To configure the mapnik xml file, see [here](https://github.com/mapnik/mapnik/wiki/XMLConfigReference).

After the config and xml files are configured, usage is as simple as importing the module and calling the function.
```python
# importing map_maker file from address2img
from address2img import map_maker

# defining addresses for which render maps, must be a list
addresses = [
'Piazza del Duomo, 56126 Pisa PI, Italy',
'1600 Pennsylvania Ave NW, Washington, DC 20500',
]

# instantiating Map_Maker class with addresses
worker = map_maker.Map_Maker(addresses)

# calling make_map method of the Map_Maker instance
worker.make_map()

```

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

address2img-1.1.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file address2img-1.1.tar.gz.

File metadata

  • Download URL: address2img-1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for address2img-1.1.tar.gz
Algorithm Hash digest
SHA256 e1753798c536ce1e0688ef5acc7040deb5b5b7ebfcb67ece9b3d5586421c45f7
MD5 353efa992b783bcb30557eb03d747b3f
BLAKE2b-256 3bf140d8b733d364867f5a01f3959cf6fc26c30bca4d7ae165d4aef69402df6d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1 This release

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page