Draw a map using gps markers and save this image in a file

I have some GPS location records that I want to draw on a map (e.g. OpenStreetMap) and save this as an image file.

I am using python. I found osm-gps-map as a candidate library for visualization, but the API lacks some functions to satisfy all my needs. I need a library that does:

  • draw material on a map (for example, an OSM-based map), that is, a list of GPS positions.
  • automatically adjust the view (scale / position) to fit in all elongated positions.
  • save this view to image file

I really want you to not be forced to manually take a screenshot from a widget or browser window. And if possible, I also want to avoid implementing the necessary projection functionality (as in here ). Does anyone know a library / toolchain that provides the desired functions (if possible for using Python)?

+4
source share
2 answers

You can use Basemap for matplotlib. Here is a blog post describing how to use this package with OSM.

+9
source

There are examples of how to draw custom GPS points on top of an OSM background map using Matplotlib Basemap, Matplotlib, or Cairo in a GeoTiler project: https://github.com/wrobell/geotiler/tree/master/examples .

+2
source

Source: https://habr.com/ru/post/915908/


All Articles