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

I have downloaded the pbf file of OpenStreet Map historical data from this site https://planet.openstreetmap.org/planet/full-history . How can I plot the graph using python?

asked 12 Apr '20, 08:49

Satabdi's gravatar image

Satabdi
21114
accept rate: 0%

edited 12 Apr '20, 08:52


For maps, we don't use the term "plot a graph" - we speak of "rendering a map". While plotting a graph usually involves nothing more than saying "here's a bunch of numbers, please draw this" (and perhaps adding "... with a blue line"), rendering a map is vastly more complicated, as you will need drawing styles for every single feature, and potentially on different zoom levels.

To make matters even more complicated, the history file not only contains different map features, but timestamps as well. You cannot (easily) render a map that shows different times; you will first have to decide which date you want to draw a map for, so you'll want to use the osmium command line tool to extract the data for a specific date. Then you can proceed with rendering it; if you want to render the map for the whole planet you might need to load the data into a PostgreSQL data base with osm2pgsql then render with a tile server (Mapnik, renderd), or if you only want a small area then you can again use osmium to excerpt that area from the history file and render it with something like Maperitive or even QGIS.

You will need to tell us more about what you want to do in order for us to help you better!

permanent link

answered 12 Apr '20, 11:08

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

I want to work with a particular country/small place Like Bangladesh. How can I do that? Do you have any tutorial link? so that I can get some help from there

(12 Apr '20, 11:17) Satabdi
1

Are you looking to make a web map, a printed map, or what? And do you want current data or old (historic) data?

(12 Apr '20, 17:06) Frederik Ramm ♦

I want to work with the data from 2014-2020. I want to work with the changes in the road network of a place in Python environment.

(13 Apr '20, 06:35) Satabdi

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×362
×78
×18

question asked: 12 Apr '20, 08:49

question was seen: 2,508 times

last updated: 13 Apr '20, 06:35

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