Skip to main content

Simple offline map plot utility, for country borders, elevation, water

Project description

SimpleGeoMap

Given a center latitude, longitude and a zoom level simply plot all country boundaries, rivers, lakes, elevation contour lines that fit on the map, using offline data. This package is self-contained, it does not need net connectivity to get its data.

Each land feature can be enabled through its API call.

Installation

pip install simplegeomap

How To Use

import matplotlib.pyplot as plt
import simplegeomap

clat,clon=41,14; zoom = 1.0

simplegeomap.plot_countries(clat,clon,zoom)

simplegeomap.plot_water(clat,clon,zoom)

simplegeomap.plot_elevation(clat,clon,zoom)

plt.savefig('map.jpg',quality=30)

Regions can be plotted by passing polygon points in an N x 2 numpy array to the plot_region call. This call assumes the last point connects to the first point, hence creating a closed region. If we want the points to represent a curve/line, without the end connecting to its beginning, then plot_line can be used.

Datafiles, Preprocessing

Preprocessing when necessary has already been executed, their result are already placed inside the package. Listed below are sources, steps just in case, if one wants to preprocess with different parameters, so on.

Country Border Datafile comes from here

For water regions the lake/river data from NOAA was used.

In order to regenerate the water file from its raw sources, see util.preprocess_GSHHS, assuming the data is unzipped under /tmp it will recreate the datafile.

Cities. The only addition here was a new column for asciified city names using import unidecode; unidecode.unidecode(..).

Elevation Data is taken from NOAA, datafile is from here download "all files in on zip", extract zip under /tmp, then run util.preprocess_GLOBE. GLOBE means Global Land One-kilometer Base Elevation, meaning the resolution of each grid is 1 km square.

Links

Programming Articles on Python, IT

Linear Algebra, Calculus

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

simplegeomap-0.0.37.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplegeomap-0.0.37-py3-none-any.whl (66.6 MB view details)

Uploaded Python 3

File details

Details for the file simplegeomap-0.0.37.tar.gz.

File metadata

  • Download URL: simplegeomap-0.0.37.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.50.2 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.6.9

File hashes

Hashes for simplegeomap-0.0.37.tar.gz
Algorithm Hash digest
SHA256 8f120c23bb68549c88e46786d727c8c5e03cf8e8a3771ba1b41dfff0f4647444
MD5 764b667e4360ab685a10009c8ef69c63
BLAKE2b-256 0326b87ada18a65e9a471a107dc3a3173fb481813f3325027655e4ff2d2aebcd

See more details on using hashes here.

File details

Details for the file simplegeomap-0.0.37-py3-none-any.whl.

File metadata

  • Download URL: simplegeomap-0.0.37-py3-none-any.whl
  • Upload date:
  • Size: 66.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.50.2 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.6.9

File hashes

Hashes for simplegeomap-0.0.37-py3-none-any.whl
Algorithm Hash digest
SHA256 c8ac5584185759763c23844193ed2aa2981b7b02aeef78115635b223115f7d34
MD5 1dd40477d941e07eaf58a412d6bbfaa0
BLAKE2b-256 776a5885a2e61b5544035363567387143d83a6423af7d8344fd4c6ade6318628

See more details on using hashes here.

Supported by

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