• Stars
    star
    161
  • Rank 233,470 (Top 5 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created almost 11 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OpenStreetMap image tiles in Python

Smopy

New: you may be interested in Folium for interactive maps with Leaflet.js

Give a box in geographical coordinates (latitude/longitude) and a zoom level, Smopy returns an OpenStreetMap tile image!

import smopy
map = smopy.Map((42., -1., 55., 3.), z=4)
map.show_ipython()

Europe map

You can also import the map in matplotlib and convert from geographical coordinates to pixels easily.

x, y = map.to_pixels(48.86151, 2.33474)
ax = map.show_mpl(figsize=(8, 6))
ax.plot(x, y, 'or', ms=10, mew=2);

Europe map

Alternative OSM tile servers can be used as well. An example is in the example notebook.

See the example notebook

Installation

Smopy currently requires:

  • Pillow
  • NumPy
  • matplotlib
  • IPython (optional)

To install Smopy run pip install smopy.

For IPython support run pip install smopy[ipython].

To install Smopy directly from the repository run:

git clone git@github.com:rossant/smopy.git
cd smopy
python setup.py develop

Terms of use

This module fetches image maps from OpenStreetMap's servers. See the usage policy. In particular, be careful not to retrieve large maps as this can overload the servers.

More Repositories

1

awesome-math

A curated list of awesome mathematics resources
Python
7,684
star
2

ipymd

Use the IPython notebook as an interactive Markdown editor
Python
479
star
3

ipython-minibook

UPDATE (2015): This is an old repo, go here for the new edition
Python
203
star
4

awesome-scientific-python

A curated list of awesome scientific Python resources
Python
194
star
5

galry

[deprecated] High-performance interactive visualization in Python
Python
187
star
6

ipycache

Defines a %%cache cell magic in the IPython notebook to cache results of long-lasting computations in a persistent pickle file
Python
139
star
7

playdoh

UNMAINTAINED - USE AT YOUR OWN RISKS
Python
67
star
8

euroscipy2014

IPython advanced tutorial: introducing the interactive features of the IPython Notebook
43
star
9

h5view

Command-line tool in Python to explore a HDF5 file
Python
19
star
10

programming-yin-yang

A list of antonyms commonly used in programming
12
star
11

datagit

Random notes about data science workflows with Python, git, and the Jupyter notebook
7
star
12

rossant.github.io

HTML
6
star
13

phd-thesis-template

LaTeX template for a thesis
TeX
6
star
14

qtools

Some Python tools for Qt
Python
5
star
15

pipo

CLI helper for setuptools
Python
4
star
16

website

JavaScript
2
star
17

spiky

THIS REPOSITORY IS OUTDATED, the new one is:
Python
2
star
18

mdconvert

Convert Markdown documents in HTML, LaTeX and PDF
Python
2
star
19

collatepdf

A simple Python script to collate multiple PDFs into a single PDF.
Python
2
star
20

eye

Python
1
star
21

kwiklib2

1
star
22

odt-linux-mag

GitHub repository superseding the gist https://gist.github.com/rossant/99a2316465c84192b630
Python
1
star
23

yam

Command-line remote controller for Yamaha AV network systems
Python
1
star
24

rust-emscripten-passes

LLVM passes for compiling Rust code with Emscripten
C++
1
star
25

easy_profiler

Easy-to-use profiler in Python
Python
1
star
26

synthesizer

Python
1
star
27

brian-modelfitting-tutorial

Python
1
star