This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
mapturner
=========

A command line utility for generating topojson from various data sources for fast maps.

Important links:

* Repository: https://github.com/nprapps/mapturner
* Issues: https://github.com/nprapps/mapturner/issues

Install
-------

You will need the following non-Python dependencies installed:

* ogr2ogr (GDAL)
* topojson

User install process:

```sh
pip install mapturner
```

Developer install process:

```sh
git clone git://github.com/nprapps/mapturner.git
cd mapturner
mkvirtualenv mapturner

pip install -r requirements.txt

python setup.py develop
```

Usage
-----

Define a YAML configuration file, for example:

```yaml
bbox: '77.25 24.28 91.45 31.5'
layers:
countries:
type: 'shp'
path: 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip'
id-property: 'NAME'
properties:
- 'country=NAME'

cities:
type: 'shp'
path: 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places_simple.zip'
id-property: 'name'
properties:
- 'featurecla'
- 'city=name'
where: adm0name = 'Nepal' AND scalerank < 8

quakes:
type: 'csv'
path: 'examples/nepal.csv'
all-properties: True
```

(See [test.yaml](https://github.com/nprapps/mapturner/blob/master/test.yaml) for a complete example.)

Then run it!

```sh
mapturner input.yaml output.json
```

How it works
------------

For each layer defined in the configuration file:

* If path is a URL the file will be downloaded and cached locally. (It will not be redownloaded on subsequent runs.)
* If path is to a zipped file it will be unzipped.
* If the layer type is `shp` it will be clipped to the specified bounding box (using ogr2ogr).
* If the layer type is `shp` and a `where` attribute is specified, the layer will be filtered by that clause.
* All fields in the layer *not* specified in the `properties` array will be removed (to reduce file size), unless `all-properties` is specified, in which case all will be kept.
* The layer will be converted to topojson (a form of compression).

After each layer has been processed all of them will be concatenated into a single topojson file. Each layer's key name will be used to identify it in the output.

Notes
-----

The following layer types are currently supported:

* shp
* json
* csv

For a complete explanation of how the `id-property` and `properties` fields work see the [topojson command-line documentation](https://github.com/mbostock/topojson/wiki/Command-Line-Reference)
Release History

Release History

0.1.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mapturner-0.1.4.tar.gz (5.5 kB) Copy SHA256 Checksum SHA256 Source May 15, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting