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

I'm working on a project that downloads data from openstreetmap with R-Studio.

Fehler in check_for_error(doc) : General overpass server error; returned: The data included in this document is from The data is made available under ODbL. runtime error: Query timed out in "query" at line 5 after 26 seconds.

But every time I try to download data, I get this Error-code. Could you explain to me, what it means and how I could fix the problem. I would really appreciative, if you could help me.

asked 16 Apr '21, 16:24

Michael23's gravatar image

accept rate: 0%


Your query could ask for too many data. Why don't you post the relevant bit of code with the query?

(17 Apr '21, 10:15) TZorn

In the answer section you can find my script. It would really help me out, if you could help me to find the problem.

(17 Apr '21, 14:15) Michael23

Here is the script as far as it goes, until I receive the error-code. If you could make out the problem, that would be really helpful.


# Reading Data 

# Funktion to Convert from wgs84 to UTM<-function(long, lat,{
  if(length({, length(long))}
  coords=data.frame(long, lat)
  #prepare map for conversion to UTM:
  coords@proj4string=CRS("+proj=longlat +datum=WGS84")
  #deterine parameters of the transformation:
  transf.param=unlist(lapply(, function(x){
    CRS(paste("+proj=utm +zone=", x ," +datum=WGS84", sep=""))
  #... and transform it to UTM
  new.coords=lapply(1:length(coords), function(x){
    spTransform(coords[x,], transf.param[[x]])@coords
  }), ncol=2, byrow=T))
  names(new.coords)=c("long", "lat")

#### UTM-Koordinaten for the letters$long, lat=LostLetterFairtrade0221$lat,"33N")


api_list <- c('')
api_to_use <- sample(1:length(api_list), 1)


#### Waldflächen ziehen
forest <- opq(bbox = "bb") %>%
  add_osm_feature(key = 'landuse', value = "forest") %>%
  osmdata_sf () %>%
  trim_osmdata ("bb")

permanent link

answered 17 Apr '21, 14:14

Michael23's gravatar image

accept rate: 0%

edited 17 Apr '21, 16:19

H_mlet's gravatar image



I don't know any R programming, but the bbox = "bb" looks problematic. You need to specify coordinates. Or maybe it's a placeholder ?

If you try to load every landuse=forest in the world, it will fail without doubt.

Using overpass, you can load either really specific data (by name, or reference for exemple) worldwide, or specify a small bounding box. Exceeding one or the other limit will meet the timeout.

You should try your overpass requests with overpass-turbo IMHO. You'll understand much more easily what is going on under the hood.

For example this query does what you're wishing, I think. I just used the convenient Assistant. Try to load it in your area of interest, to see if it works.

Also, you should be aware that natural=wood is nearly a synonym to landuse=forest, so you should probably load both, like in this query. See the wiki for more details.

If you want to make worldwide, or even countrywide, analysis, you'll have to download the raw osm data, and work locally.


permanent link

answered 17 Apr '21, 16:33

H_mlet's gravatar image

accept rate: 13%

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: 16 Apr '21, 16:24

question was seen: 2,800 times

last updated: 17 Apr '21, 16:33

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