Planet.osm
source link: https://wiki.openstreetmap.org/wiki/Planet.osm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Planet.osm is the OpenStreetMap data in one file: all the nodes, ways and relations that make up our map. A new version is released every week. It's a big file (on 2021-01-01, the plain OSM XML variant takes over 1352.6 GB when uncompressed from the 97.9 GB bzip2-compressed or 55.0 GB PBF-compressed downloaded data file).
There are also files called Extracts which contain OpenStreetMap Data for individual continents, countries, and metropolitan areas.
Format
The two main formats used are PBF or bzip2-compressed OSM XML. PBF (Protocol Buffer Format) is a compact binary format that is smaller to download and much faster to process and should be used when possible. Most common tools using OSM data support PBF.
For an overview over all osm file formats and conversion tools have a look at OSM file formats.
If you are using traditional GIS tools you may want to look at Processed data providers.
Downloading
See downloading data for tools to make downloading easier, including an option to use all mirrors at once, automatically do md5 hash validation, and other features.
BitTorrent
As of Nov/2020, official torrents have now been implemented!
If you have any BitTorrent client installed, just go to the folder you're interested in (like pbf/) and click on the .torrent file!
(Historical information has been moved to talk page)
Planet.osm mirrors
For security reasons, consider using HTTPS sources if available, rather than HTTP or FTP. Some Internet users may experience problems with IPv4-only sources when their Internet access (notably mobile accesses) offers native routing only though IPv6, and where IPv4 is only supported by their ISP using temporary NAT sessions via proxies (which may not be reliable for very large file downloads, even if HTTPS is used).
Mirrors are encouraged to support connections from IPv6, and to support secured protocols to reliably authenticate their sources (encryption is not required as the data is published, so this should not be a performance issue on servers, but this requires installing server-side certificates and renew them regularly before they expire). The support of RSYNC on these sources is also useful to allow fast incremental synchronization to other local mirrors, and it should be secured as well. Some mirrors also support peer-to-peer delivery with BitTorrent protocol.
All files also come with a .md5 signature file. Use it to check your downloads (especially when using FTP: using RSYNC or Torrent will generally avoid download issues such as truncated files) ! You should first check for the existence of the .md5 file before trying to download actual data (which may sometimes be in a transient state while a mirror is being synchronized with a recent dump). Also make sure your browser or downloader client supports the transfer of large files over 2 GB, as well as your local OS and file system for storing such files.
Mirror
Available data
Network protocols Preferred URL
Loc
Updated
Diffs
.osm.pbf
.osm.bz2
HTTP
HTTPS
FTP
RSYNC
Torrent
IPv6 planet.openstreetmap.org/ (original source, use another mirror below as much as possible)
GB
(Source)
yes yes yes
no yes yes yes yes yes ftp5.gwdg.de/pub/misc/openstreetmap/planet.openstreetmap.org/
DE
Daily
yes yes yes
yes yes yes yes yes yes free.nchc.org.tw/osm.planet/ (source: gwdg.de)
TW
Daily
yes yes yes
yes yes yes yes yes yes download.openstreetmap.fr/
FR
Minutely
yes no no
yes yes no no no yes ftpmirror.your.org/pub/openstreetmap/
US
Daily
yes yes yes
yes yes yes yes yes yes ftp.fau.de/osm-planet/
DE
Daily
no yes no
yes yes yes yes yes yes mirror.init7.net/openstreetmap/
CH
Daily
no yes yes
yes yes no yes yes yes osm.openarchive.site (source: ftp.dau.de). No `.torrent` files, but acting as torrent webseed.
DE,SG & US
Daily
no yes no
yes yes no no yes no ftp.snt.utwente.nl/pub/misc/openstreetmap/
NL
Weekly
no yes yes
yes yes yes yes no yes ftp.spline.de/pub/openstreetmap/
DE
Weekly
no yes yes
yes yes yes yes yes no ftp.osuosl.org/pub/openstreetmap/
US
Weekly
no yes yes
yes yes yes yes no yes download.bbbike.org/osm/planet/
DE
Weekly
no yes yes
no yes no no no no downloads.opencagedata.com/planet/
DE
Weekly
no yes yes
yes yes no no yes no ftp.nluug.nl/maps/planet.openstreetmap.org/
NL
Weekly
no yes yes
yes yes yes no no yes planet.passportcontrol.net/pbf/
JP
Weekly
no yes no
no yes no no no no archive.org/details/osmdata (Internet Archive, available under various items: you will lose time browsing every icon to find what you are looking for! Select the list view instead, and enable details below titles to see dates of initial publication instead of date of last synchronization. Can't find any planet file newer than 2018. Is it still synced ?)
US
none since 2018.
no no no
yes yes no no yes no osm.cquest.org/torrents/ Provides alternate torrents, but with same infohash. pbf files are hidden
FR
Weekly but in test and manual update.
no yes no
yes yes no no yes no planet.osm-hr.org Last 30 days
HR
Daily
no yes yes
yes yes no no yes yes
Country and area extracts
Worldwide extract sources
Mirror
Area
Updated
Diffs
HTTPS
Metadata included www.overpass-api.de
Overpass API excerpts up to ~300MB uncompressed
Minutely
yes, since v0.7.50
yes
Optional download.openstreetmap.fr/
Minutely diffs and daily extracts in PBF:
- Entire continents
- Many countries in all continents
- Sub-country admin regions for several countries
Minutely
yes
yes
Daily extracts in PBF stripped from personal metadata (user names, user IDs, changeset IDs):
- Entire continents
- Most countries
- Sub-country admin regions for Brasil, Canada, France, Germany, Italy, Japan, Poland, Russia, UK, US
Note: Extracts are not suitable for editing.
Daily
yes
yes
Version and timestamp only osm-internal.download.geofabrik.de
Same as download.geofabrik.de but with full personal metadata:
- Weekly full history extracts for all regions mentioned above (no diffs)
Note: Login with OSM account required. Files are subject to data protection regulation.
Daily
yes
yes
All fields download.bbbike.org/osm/
Different extracts offered:
- more than 200 cities and regions worldwide
- extract your own individual area
Note: Extracts are not suitable for editing OSM, because they omit metadata such as version number. See the FAQ.
Weekly
no
yes
No metadata protomaps.com/extracts
Extracts up to ~100 million nodes in PBF
- extract rectangular area or draw polygon
- updated minutely
- Does not include metadata
Minutely
no
yes
Version for all objects; Timestamp for ways, relations and tagged nodes
Regional extract sources
Mirror
Area
Updated
Diffs
HTTPS
Metadata included osm.kewl.lu/luxembourg.osm/
Luxembourg (beta)
Hourly
Yes but not Osmosis/Pyosmium compatible directory structure
yes
Partially planet.osm.ch
Swiss extract from the Swiss OpenStreetMap association. Including all lakes crossing the Swiss boundary and a few km of the surrounding countries.
Hourly
yes
yes
All fields osm.kyblsoft.cz/archiv/
Daily
no
no
version and timestamp only
Global thematic extracts
- OpenStreetMapData provides shapefiles of global coastlines, land polygons or water polygons.
- osmdata.xyz provides monthly, global GeoPackages of each primary feature key.
- (currently not working, contains incomplete and outdated files only) A weekly mirror of the continents-files from download.geofabrik.de is made available on IPFS at `/ipns/ipfs.placebazaar.org`, Accessible with any IPFS client, or via a gateway. For example ipfs.io/ipns/ipfs.placebazaar.org. A server is dedicated to seeding this data for a week.
Original source
The originating URL is https://planet.openstreetmap.org/. Please use a mirror or BitTorrent if you can.
Update frequency
A new version of planet.osm is released weekly (currently every Wednesday morning). We have these, going back to the start of April 2006.
The size of a planet.osm file is about can be seen in the header information on the planet download page. Planet files are very large (tens of GBs) so please check the size before starting to download.
The weekly dump normally starts at around 01:10am UK time on Monday morning and is guaranteed to contain all updates prior to that time. The dump is constructed from a database dump using conversion software, and the result should ensure referential integrity. Please note that this doesn't always apply to extracts. The dump and conversion normally takes around 48 hours to complete, in total, and the result is usually ready on Wednesday morning.
Note: The timestamp of the file is recorded in it like this : <osm version="0.6" generator="OpenStreetMap planet.c" (...) timestamp="2013-01-02T01:10:14Z"> it will be useful to decide what "diffs" to use if you want them :
Additionally we offer regular diffs. These are produced daily (under the 'daily' subdirectory) and more recently we also offer hourly diffs and minutely diffs. These have been produced with Osmosis and can be used to reconstruct the full dataset (see examples at OSM Wiki pages Osmosis and osmupdate). Since these only contain the differences, they are much smaller files; A daily diff is generally about 40 MB compressed. For more information please see Planet.osm/diffs
Technical notes
Small region OSM DB-only copy
Q: I would like to set up a copy of OSM DB only for a small region and then keep it up to date with the replicates
You will need to apply the full diffs and afterwards cut off anything you're not interested in.
If you intend to do it for a rather small area then it is really quite easy and performs well with Osmosis. Assuming you have a current extract of your area in "current.osm" and you have the Osmosis replication set up properly (--rrii), then you simply run
osmosis --rri --simc --rx current.osm --ac --bb left=42 right=42 top=42 bottom=42 clipIncompleteEntities=yes --wx new.osm && mv new.osm current.osm
as often as you like (adapt the 42's in the bounding box).
Processing the file
See Databases and data access APIs#Database Schemas for loading a planet file into a database.
See OSM file formats#Map-data for a list of tools which are able to manipulate osm files.
See Frameworks for accessing osm files from your software.
Unpacking .bz2 files
Osmosis and osm2pgsql allow you to use the files in bz2-compressed form. If you need to unpack it from bz2 format, use 7-zip on Windows; on Linux just type bzip2 -d planet.osm.bz2; or your OS may support double-click unpacking. See Wikipedia's list of compression programs.
If you are handling the compression yourself with libbzip2, then note that the files are compressed with pbzip2 and contain multiple streams that need to be handled as described in section 3.4.8 of the bzip2 documentation.
During download, the network will be your bottleneck. Once you have the file you will need to unpack it, and then disk I/O will be your bottleneck. Or you can work with the bzip'ed file, but then the CPU will be your bottleneck. If you have sufficient space to unpack the full planet file, you can save a lot of time and disk thrashing by unpacking it on the fly while downloading it: try curl -L https://planet.openstreetmap.org/planet_latest.osm.bz2 | pbzip2 -cd >planet_latest.osm
.
In most cases, using import tools supporting the PBF format will be a faster and more efficient solution, they can be processed directly without unpacking it to plain OSM XML format and PBF-compressed OSM files are always smaller than bzip2-compressed OSM files and faster to download.
Additional technical notes
wget: Alternatively to curl, wget -O -
may be used. Due to the size of the planet files, older distributions of wget may fail to work since they may not support file sizes larger than 2 GiB, and attempting to download files larger than that will report a negative file size and fail.
pbzip2: may be replaced by the single-threaded bzip2 -cd
/ bzcat
as well.
Refences
Missing nodes
Note that planet download have ways that reference nodes that are not in the same file.
Due to performance reasons it isn't possibly to get a fully consistent snapshot of the database. Although the dump is run in a transaction, the isolation level required for a "snapshot"-style dump dramatically increases the running time. You might find that, if you have been editing while the export has been running, that the way may be in there but the nodes are not. You can take a planet file and apply the daily diffs using Osmosis to create a consistent planet file (however you may still have some problems with old bad data in OpenStreetMap from before the introduction of the API 0.6).
country extracts
Country extract may have ways that reference nodes that are not in the same file.
This is perfectly normal depending on the settings used in the extraction process. There are two options; either the ways at the boundary have been truncated (such as in the GeoFabrik downloads), or the nodes are just missed out and the ways are left as is (for example the CloudMade downloads).
Handling missing references
This really depends on what you are doing with the data. You can either drop the node references or you can go to another data source, such as the API, to fetch the missing nodes.
Other planet files
- GPS Traces can be found in planet.gpx
- Old versions of the planet file are available at https://planet.openstreetmap.org/ and the mirrors as well.
- An experimental full history file is available, containing every revision of each object.
License
Planet files remain licensed under the same license as the master OpenStreetMap geo-database from which they are extracted - currently this is the Open Database License. Planet files from before September 12, 2012 have a Creative Commons Attribution-ShareAlike 2.0 license.
Recommend
-
65
-
81
Planet Monsters(行星巨兽),去年和@guodong 一块弄的小片子,带点儿克苏鲁梗,历时一个半月。给大家拜早年,祝各位今年都能赢。
-
79
Researchers are sounding the alarm after an analysis showed that buying a new smartphone consumes as much energy as using an existing phone for an entire decade.
-
67
During my decades as a database application developer, I never imagined in my wildest dreams that I would ever have access to a transactional, planet-scale, distributed database, much less that I would be comparing many of the...
-
5
Solderable OSM module showcases i.MX8M Plus Jan 14, 2022 — by Eric Brown 115 views
-
4
体验 正式发布 的OSM v1.0.0 版本 2021年10月份发布了OSM 1.0 RC[1],在过去的几个...
-
2
Solderable OSM module taps i.MX8M Mini Feb 18, 2022 — by Eric Brown 274 views
-
6
osm.el - OpenStreetMap viewer for Emacs The map data is © OpenStreetMap contributors, licensed under the ODbL The...
-
1
Querying OSM places data in python For updates on other blogs, we have: CRIME De-Coder, Using data to establish reasonableness in...
-
2
OpenStreetMap surveyor appThis app fin...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK