Draw a map with gps markers and save this image to

2019-03-30 16:58发布

I have some GPS position recordings, which I want to draw into a map (e.g. OpenStreetMap) and save this as an image file.

I'm using python. I've found osm-gps-map as a candidate library to do the visualization, but apparantly the API lacks some functionality to satisfy all of my needs. What I need is a library that does:

  • draw stuff into a map (e.g. an OSM-based map), i.e. a list of GPS positions.
  • automatically adjust view (scale/position) to fit in all drawn positions
  • save this view to an image file

I seriously want to avoid being forced to manually make a screenshot from a widget or a browser window. And if possible I also want to avoid to implement the necessary projection functionality by myself (as in here). Does anyone know a library/toolchain that provides the desired functionality (if possible for use by Python)?

2条回答
神经病院院长
2楼-- · 2019-03-30 17:51

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

查看更多
走好不送
3楼-- · 2019-03-30 17:53

You may want to consider using Basemap for matplotlib. Here is a blog post describing how to use this package with OSM.

查看更多
登录 后发表回答