NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello. I have a coordinates of a place and I want to get a corresponding section of map as an image. I know that it possible in Overpass Turbo ("Export" button), but can I do this from my code using Overpass API for Python?

asked 20 Nov '21, 12:19

Sertyhopss's gravatar image

accept rate: 0%

edited 20 Nov '21, 12:20

What overpass does when you export to an image, is to download individual tiles and place your query result on top. Since you do not seem to even need to export data, Overpass is the wrong tool. You can either download the individual tiles with Python and paste them together - see e.g. or for inspiration in PHP - or you can use a hosted "Static map" service ( Whichever you choose, understand that you are using someone else's computing resources for this, and that you cannot use this massively without causing harm. So before you publish something that you expect to be very widely used, check with the operators of the respective servers you are relying on.

permanent link

answered 20 Nov '21, 21:57

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Thank you for your answer. I want to use this for my bachelor's thesis and for only one city, without publishing the program. It contains a factor analysis of traffic accidents at intersections. I have the database which include coordinates of crashes, time, weather, information about cars etc. Also I want to add information about road: tile, priorities, traffic lights, max speed and maybe something else. Most of this information i can get using queries to Overpass API, but not tiles. Thanks for links, I'll see it.

(21 Nov '21, 08:50) Sertyhopss

@Serlyhopss I'd look at QGIS which can show tiles in the background (XYZ Tile layers) and pull data from OSM via Overpass-like queries (or just save the geojson from the queries). I do this all the time.

(21 Nov '21, 14:16) SK53 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 20 Nov '21, 12:19

question was seen: 2,281 times

last updated: 21 Nov '21, 14:16

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum