Planet OSM?


I am seeking to obtain data for urban areas in Bangladesh using the method described in the PDF document entitled: “osmar: OpenStreetMap and R” and it seems that the coverage for Bangladeshi cities really is not that great. The document however also mentions something called “Planet OSM”, might this constitute a more up to date data source?

Thank you,


“planet.osm” is “all the data for all countries” and is at .

If you just want Bangladesh I’d suggest that you use an extract such as listed on .

The PDF seems to be written in “academic” rather than English and doesn’t explain what format of data you want. You’ve got essentially two choices:

  1. .pbf (which most things that process OSM data can use) which is a compressed format. It’s 17Mb for Bangladesh

  2. .osm.bz2 (33Mb for Bangladesh) which is compressed XML data. When you uncompress it it’ll be significantly larger, but you’ll be able to see the raw XML elements in it with a file viewer.

Note that “all the data” means “all the data that OSM knows about”. If a road exists in Bangladesh and it has not yet been added to OSM, it won’t be in any OSM download for Bangladesh.

Thank you for that,

Couple of follow up questions however:

“Does the get_osm” derive the data from the same source as planet osm? I say this because in a 10km x 10km bounding box around the centre of Chittagong, the second largest city, there are no data nodes/ways etc when I use get_osm. Can I deduce from this that planet file also has nothin gin Chittagong etc.

Do you know of any resource explaing how to read in and analyse an osm file?

Thank you,


I cannot seem to find a resource which says how to read in an osm file into R, they all seem to start out with defining a bounding box once in R.

I’m not sure what “get_osm” is but there is some information in Chittagong, for example . Quite a lot of roads seem to have been traced from imagery (e.g. ), so I wouldn’t expect a lot of POI information yet.

What are you actually looking for and what are you actually trying to do?

If you’re just looking to search for POI data, then I’d suggest using taginfo + overpass.

Go to and search for a tag name or value (such as “hospital”). The screen you see shows the where that appears as a tag; click “values” to see where it appears as a value. Click on “hospital” to the right of “key amenity, value hospital”. Click Overpass turbo. Search for Chittagong and select the first one. Zoom in to your area of interest. Click run.

You can click entries on the map or select “data” to see some JSON data.

Repeat for anything else that you might be interested in. For command line stuff, see the entries in (particularly osmfilter, osmconvert and osmosis). You can also throw the data at a database and do databasey selections on it. There might be some relevant previous questions at .

The level of detail of mapping in a country depends on how many local people are prepared to volunteer their time to contributing data to the map. Unfortunately, it tends only to be in first world countries that many volunteers come forwards.

Where Asian and African countries get mapped, it is is usually by Western ex-patriots, which may explain why all the names in Chittagong appear to be in the Latin alphabet. They should be represented as actually present on the signs on the ground, or at least as they would appear in a map intended for a local man in the street. (Having an English speaking elite doing most of the mapping, may be another factor.)

The only other time when mapping tends to happen in such countries is when there has been a natural disaster, when a lot of armchair mapping happens, again in Western countries, based on Bing’s satellite and aerial images.

Basically, if you want more detailed mapping, you need to encourage Bangladeshi residents to get out their GPS enable mobile phones and start adding to the map.

What I am trying to do is establish if there is a causal relationship between satellite luminosity. I do however have a few more queries:

  1. Does the osmsource_api have the same data as the big planet osm file, if I can access osmsource_api just fine is there any point in trying to access it via planning osm?

  2. A lot of data from Dhaka have the tag: JOSM, which I have read has something to do with JAVA, is there anything I can do in Java which cannot be done in R. (R is the only coding language I am familiar with).

Thank you for your help.

Sorry, I was not particularly specific with regard to what I am trying to do. I have luminosity data of an approximately 1km x 1km resolution, and I am trying to see if in these cities in countries like Bangladesh it can be deduced that indicators of development, eg commercial buidling, hospitals and if these places appear brighter at night.

Thanks Tom

I have no idea what “osmsource_api” is, nor “planning osm”. They seem to be something to do with “osmar”, so you’ll have to talk to whoever pointed you at that.

“the big planet osm file” is all the data in the world. The Bangladesh extract I mentioned above is “all the data in Bangladesh”.

Before going any further, I’d suggest that you read so that you understand what data you are dealing with, and (if you haven’t already) signing up to OSM and adding a couple of features near to you, so you are familiar with the editing process.

Taking the example cricket field I mentioned before , from there you can see that it was added 2 years ago, and who by. Additions to OSM are grouped into changesets, in this case .

That changeset has a tag “created_by=iD 1.3.1” on it. Here, “iD” is the editor used. On changesets added using the “JOSM” editor you may see “created_by=JOSM” or similar. You may also see “created_by=JOSM” on individual elements (nodes, ways or relations) but that’s becomin less common.

To confirm that the Bangladesh extract has data around Chittagong you could open it with JOSM. It should because lot of streets are already mapped there.

Maybe some filter in your data processing flow is clearing that area…

Sorry, by planning osm I meant planet osm.

Given his application, I think the problem he is seeing is that people haven’t mapped land use, let alone buildings, when he actually needs buildings.

Even in the Western world, mapping of individual buildings is very patchy, and is often armchair mapping from aerial imagery.

The Chittagong data doesn’t seem to have many way names either (and as I noted above, those there are probably in the wrong language).

Thank you once again for your help:

In response to the point made regarding what is osmsource_api in R, it is simply a command which I have used from a tutorial an the R osmar package. My point is, will it have exactly the same data as the planet osm file? If I can quite simply access the nodes and tags using osmsource_api is there any need to attempt to access the planet_osm file or its Bangladesh specific subsidiary?

Cheers guys, Tom

I doubt that anyone here is familiar with that package. However to see what is is in planet.osm in any particular area, simply go to, zoom into a reasonably small area of interest, and click the Export button, then click Export again. This will be slightly more up to date than planet.osm, but unless there have been very recent changes, will not differ significantly. At the time of writing, planet.osm will be approximately 1 day behind.

Running JOSM (or even iD or Potlach) on the area will also give you an indication of what is present, as they obtain their working data the same way that the above procedure does.

I just did a search on your API and it looks like it is just a language binding for the web API that the above export procedure uses, so it will be up to 7 days more up to date than the latest planet.osm and you will have the same restrictions on area downloaded as you have with the opentreetmap web site’s export function. It will provide you the most complete current data for the area selected.

Again, your problem with lack of detail reflects on the low level of contribution to the map in Bangladesh rather than the way that you are accessing the data.

(The API allows access to historic information, in terms of the history of making the map, whereas planet.osm is only a current snapshot.)