How to do it...

The steps you need to follow to complete this recipe are as follows:

  1. Download an .osm file from the OpenStreetMap website (https://www.openstreetmap.org/#map=5/21.843/82.795).
    1. Go to the OpenStreetMap website.
    2. Select the area of interest for which you want to export data. You should not select a large area, as the live export from the website is limited to 50,000 nodes.
If you want to export larger areas, you should consider downloading the whole database, built daily at planet.osm (250 GB uncompressed and 16 GB compressed). At planet.osm, you may also download extracts that contain OpenstreetMap data for individual continents, countries, and metropolitan areas.
    1. If you want to get the same dataset used for this recipe, ...

Get PostGIS Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.