Skip to main content

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()

Project details


Download files

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

Source Distribution

nacispreloader-0.2.4.tar.gz (4.4 kB view hashes)

Uploaded source

Built Distribution

nacispreloader-0.2.4-py3-none-any.whl (5.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page