Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.09 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.09 KB

woeplanet py-woeplanet-uri

The Really Short Version

Forking GeoPlanet one place type at a time.

The Short Version

WoePlanet is Where On Earth (AKA WOE, also AKA GeoPlanet) data, smushed up with coordinate and boundary data from Flickr Shapes, Quattroshapes and Natural Earth Data (that's fancy talk for polygons) as well as concordances and other metadata rescued from woe.spum.org before it died and went offline.

The Longer Version

Tools for working with URIs for WoePlanet documents.

Installation

sudo pip install .

Usage

Simple Usage

import woeplanet.utils.uri

fname = '12695836.geojson'
woeplanet.utils.uri.is_woe_file('12695836.geojson')
True

id = 12695836
root = '/var/data/woeplanet-data'
woeplanet.utils.uri.id2abspath(root, id)
'/var/data/woeplanet-data/126/958/36/12695836.geojson'

woeplanet.utils.uri.id2relpath(id)
'126/958/36/12695836.geojson'

woeplanet.utils.uri.id2path(id)
'126/958/36'

woeplanet.utils.uri.id2fname(id)
'12695836.geojson'