From OpenStreetMap Wiki
(Redirected from Shapefile)
Jump to navigation Jump to search

The shapefile is a common standard for representing geospatial vector data. There are several ways of working with Openstreetmap data and shapefiles.

About Shapefiles

Developed and regulated by Esri as a (mostly) open specification, the shapefile format spatially describes geometries as either 'points', 'polylines', or 'polygons'. In OpenStreetMap terms these can be considered as 'nodes', 'ways' and 'closed ways', respectively. Each geometry has a set of associated attributes. Broadly speaking these are a bit like OSM's tags.

The shapefile is in fact a grouping of several files formatted to represent different aspects of geodata:

  • .shp — shape format; the feature geometry itself.
  • .shx — shape index format; a positional index of the feature geometry to allow seeking forwards and backwards quickly.
  • .dbf — attribute format; columnar attributes for each shape, in dBase IV format.

There are also several optional files in the shapefile format. The most significant of these is the .prj file which describes the coordinate system and projection information used. Although not part of the Esri shapefile standard, the .lyr file is often included as it contains specifications of how to display the data (colour, labelling, etc) in ArcGIS software.

NOTE: Shapefiles have many limitations, like cutting attribute names. This page explains way and shows better alternatives like GeoJSON or vector GeoPackage.

For more info about Shapefiles see Wikipedia

Obtaining shapefiles from OSM data

Download shapefiles

Pre-made shapefile downloads
  • download shapefiles created by Geofabrik, updated daily (usually) with a global extract and some countries. Shapefiles with the following are provided: buildings, landuse, natural, places, point, railways, roads and waterways.
  • has shapefiles for coastlines, water polyons, land polygons and icesheets, updated daily.
  • download shapefiles from Coastline and icesheet data. Replaced by
  • Metro Extracts service by Mapzen offers shapefiles for major cities, updated weekly, with either every tag in one shapefile each for points, lines and polygons, or separate shapefiles for different tags
  • offers global and continental extracts. Shapefiles are generated for buildings, roads, landuse, places, POI, natural, hydrography and vegetation. Updated every two weeks.
  • here you can download openstreetmap data in shapefiles format. Data divided by regions: North and South America, Australia and Oceania, Africa, Europa and Asia.61 layers for download. Data filtered by "Map Features" conditions.
  • extract service offers shape files for more than 200 cities and regions worldwide, updated weekly. Separate shapefiles for points, places, waterways, roads, railways, landuse and buildings with relevant tags, then shapefiles with all points, lines and polygons together.
Services generating custom shapefile downloads
  • HOT Exports service ( (code) - custom export based on tag files (or all tags) in certain developing world regions, with data about an hour old
  • extract service offers shapefiles for an area of your choosing, updated weekly. Separate shapefiles for points, places, waterways, roads, railways, landuse and buildings with relevant tags, then shapefiles with all points, lines and polygons together.
  • OSMaxx extract service, export to Shapefile (and GeoPackage etc.) based on bounding box for whole world with data about a day old.
  • OSM2GIS - Simple tool developed by User:Arnaud974, one shapefile each with all tags for points, lines and polygons
  • Landcover Database Shapefile Download individual layers not only from OSM by a bounding box.
  • Boundaries Map offers worldwide shapefiles of all administrative boundaries. Database will be updated at midnight, german time. Created by User:wambacher

Create your own shapefiles

Obtaining OSM data from shapefiles

Whilst you may want to convert shapefiles into .osm format for some other reason (e.g. to work with OpenStreetMap related tools) such conversion is normally done as part of an import process. See Import/Shapefile for details.

Working with shapefiles

Using GIS

Main article: GIS software

There's lots of GIS software which works with shapefiles.

Other tools and tricks