Preloader of nacis natural earth shapefiles
Project description
README
This package is a preloader for nacis (North American Cartographic Information Society) shapefiles. It is intended to supplement python applications making use of cartopy shapefiles (which are downloaded from nacis servers). By using this preloader, the nacis download can be replaced with loading shapefiles from s3 instead (where available).
Currently includes:
- 10m roads
- 10m, 50m, 110m countries
- 10m, 50m, 110m states_provinces
- 10m, 50m, 110m coastline
- 10m, 50m, 110m rivers_lake_centerlines
see http://www.naturalearthdata.com/downloads/ for more information about available shapefiles (those not provided by this preloader). see also https://gist.github.com/DanielJWood/b71237cc200831acf8e637c05ce2c375#file-natural_earth_s3_links-md for alternate download location for the source shapefile zips.
How to i use it?
from nacis.preloader import Preloader preloader = Preloader('yours3bucket','yours3prefix')
preload roads, countries, coastlines:
preloader.preload('roads','cultural','10m') preloader.preload('countries','cultural','10m') preloader.preload('coastline','physical','10m')
make a chart:
import matplotlib.pyplot as plt import cartopy import cartopy.crs as ccrs
fig = plt.figure(figsize=(7,7)) ax = plt.axes(projection=ccrs.PlateCarree()) ax.coastlines(resolution='10m', color = 'black', linewidth=1.0) cartopy.feature.NaturalEarthFeature('cultural','countries','10m') cartopy.feature.NaturalEarthFeature('cultural','roads','10m') ax.set_extent([-180,180,-90,90]) plt.savefig('out.png') plt.close()
How do I get set up?
#For development on the package, setup your work space with virtualenv:
source env/bin/activate pip install -r requirements.txt
How do i build this?
install the build package
python -m pip install --upgrade build
build
python -m build
install twine to upload package
python -m pip install --upgrade twine
python -m twine upload --repository testpypi dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nacispreloader-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74799328d0e47c846fb934f10f4d61b1c22723227c89ada7c67920d0744196ff |
|
MD5 | 920f0710b7a2187d367e66d3726d75cf |
|
BLAKE2b-256 | 3481220a41be1a884395303053b7a7b40cf7f8e7b6b356d20b11c273b3ace172 |