This guide will take you step by step through downloading OSM data (Step 2) and converting it to either a shapefile (Step 3) or an AutoCAD DWG file using software FME Quick Translator (Step 4) or Global Mapper (Step 5). You will need to access the library's GIS terminals to access FME Quick Translator and Global Mapper.
PDF version of this help guide: Working with OpenStreetMap
OpenStreetMap (OSM) is an open source mapping project which is collaboratively edited by users all over the world. The open source nature of the project means that anyone can download spatial data from it for free!
Step 1: Get OpenStreetMap data depending on the size of your area of interest
- Download very small area (e.g.: neighbourhood, small town): OpenStreetMap (directions in Step 2a, below)
- Download small area (e.g.: city): BBBike or HOT OSM export (requires free OSM account)
- Download large area: GeoFabrik (continent or country) or PlanetOSM (entire planet)
- API instructions: OpenStreetMap Wiki
Step 2a: If you're downloading a very small area (e.g.: neighbourhood) directly from OpenStreetMap.org
-
Type your location of interest in the search box (Ex: “Rome, Italy”).
-
Next, select the exact location from the “Search results” list that appears beside the search box. Once you select a location from this list, the map will automatically zoom to this location.
-
Use the mouse to pan and zoom in/out to locate a specific area of the city.
-
Export the data: Once you have your area , click the “Export Data” link on the left of the screen. You can export the entire window view or you can “Manually select a different area” if you only want a portion of the displayed view. If you select the manual option, you use the box that pops up to specify the area to export.
-
Next, click on the “Export” button to export the data. This will save the file as an “OpenStreetMap XML Data” (.osm).
-
NOTE: If you try to export an area that is too large, then OpenStreetMap will give the error “You requested too many nodes" (limit is 50,000). Either request a smaller area or use one of the links listed in Step 1 to find data at city, state, province, national, or continental level.
Step 2b: If you downloaded data from a site that is not OpenStreetMap (e.g.: any of the other links in Step 1)
- If your downloaded file is in a zipped folder, you need to unzip it as the conversion to shapefile (Step 3) or AutoCAD DWG (Step 4) won't be successful until it's unzipped. You may also have multiple OSM files in the folder so it's a good idea to familarize yourself with what's there.
Step 3: Convert OpenStreetMap (.osm) data to Shapefiles (.shp)
-
ArcGIS Pro cannot read the .osm file format. Therefore you must convert it to shapefiles using a program called FME Quick Translator, which can be found on the desktop of the GIS workstations in the library.
-
When FME opens, go to the File tab and select the “Translate” option. The “Set Translation Parameters” window will appear.
-
Translation Parameters for converting to Shapefiles (.shp):
-
In the “Reader Format” use the drop down menu to select “OpenStreetMap (OSM) XML”. If the option is not in the dropdown menu, just start typing it in and it will fill in the rest.
-
In the “Reader Dataset”, click on the “…” button to open a file directory and navigate to the .osm file.
-
In the “WriterFormat” use the drop down menu to select “ESRI Shape”. If the option is not in the dropdown menu, just start typing it in and it will fill in the rest.
-
In the “Writer Dataset”, click on the “…” button to open a file directory and navigate to the location where you want the shapefiles to output to.
-
Press “OK” once you are done to start the translation.
-
-
Once FME is finished the translation it will say “Translation was SUCCESSFUL….Translation finished” . The newly created shapefiles will be in your folder and you can add them to ArcMap using the Add Data button.
Step 4: Convert OpenStreetMap (.osm) data to AutoCAD (.dwg) using FME Quick Translator
You can use FME Quick Translator to also convert .osm files to .dwg files for use in AutoCAD. However, you will want to define the coordinate system to a projected coordinate system, such as Universal Transverse Mercator (UTM). The UTM coordinate system splits the world up into 60 zones which each cover 6° of longitude. This means that you will have to locate your UTM zone in order to project data into a UTM projection.
If you do not project your files then you will not be able to measure any sort of feature geometry (i.e. length, area, height) in familiar units like metres, kilometres, etc. Instead, all your measurements will be in decimal degrees, which is not ideal.
-
Follow the link below to download the “Universal Transverse Mercator (UTM)-EPSG Codes” index: https://www.library.carleton.ca/sites/default/files/find/gis/indexes/UTM_Index_WGS84.kml
-
Open the index file in Google Earth or Google Earth Pro.
-
Pan to or search for your location (ex. Rome). The 5-digit label in the grid is the EPSG code which is a unique code given to each WSG 84 UTM zone. Make note of the code because you will use it in the next step.
-
Open FME Quick Translator, which can be found on the desktop of the GIS workstations in the library.
-
Under File, select Translate.
-
Use the following parameters in the "Set Translation Parameters" dialog box:
-
In the “Reader Format” use the drop down menu to select “OpenStreetMap (OSM) XML”. If the option is not in the dropdown menu, just start typing it in and it will fill in the rest.
-
In the “Reader Dataset” click on the “…” button to open a file directory and navigate to the .osm file.
-
In the “WriterFormat” use the drop down menu to select “Autodesk AutoCAD DWG/DXF”. If the option is not in the dropdown menu, just start typing it in and it will fill in the rest.
-
In the “Writer Dataset”, click on the “…” button to open a file directory and navigate to the location where you want the .dwg files to output to and give the file a name.
-
Important: To set the coordinate system, type in the EPSG code exactly as shown in the example image (below) but substitute your own code numbers from Step 3, above.
-
Press OK once you're done to start the translation.
-
-
Once FME is finished the translation it will say “Translation was SUCCESSFUL….Translation finished” . The newly created DWG file will be in the output folder you specified.
-
Common errors when opening the DWG file in AutoCAD: When viewing the file in AutoCAD or other CAD software for the first time, beware that you may get an error that essentially informs you that the file was not created in CAD software. That is fine - you still want to open it. You may also need to zoom to the extent if there doesn't seem to be any data in the CAD window.
Step 5: Convert OpenStreetMap (.osm) data to AutoCAD (.dwg) using Global Mapper
You can also use Global Mapper to convert .osm files to .dwg files for use in AutoCAD. However, you will want to define the coordinate system to a projected coordinate system, such as Universal Transverse Mercator (UTM). The UTM coordinate system splits the world up into 60 zones which each cover 6° of longitude. This means that you will have to locate your UTM zone in order to project data into a UTM projection.
If you do not project your files then you will not be able to measure any sort of feature geometry (i.e. length, area, height) in familiar units like metres, kilometres, etc. Instead, all your measurements will be in decimal degrees, which is not ideal.
-
Follow the link below to download the “Universal Transverse Mercator (UTM)-EPSG Codes” index: https://www.library.carleton.ca/sites/default/files/find/gis/indexes/UTM_Index_WGS84.kml
-
Open the index file in Google Earth or Google Earth Pro.
-
Pan to or search for your location (ex. Rome). The 5-digit label in the grid is the EPSG code which is a unique code given to each WSG 84 UTM zone. Make note of the code because you will use it in the next step.
-
Open Global Mapper
-
Click Open Data Files and browse to your .osm file. Click Open.
-
Click Tools > Configure
-
Click the Projection radio button
-
Click Search by EPSG Code and enter the 5-digit label (in this example it's a Gatineau dataset so the code is 32618), then OK. You may notice that the data adjusts slightly - that's okay.
-
To export, click File > Export > Export Vector/Lidar Format...
-
Select DWG in the Select Export Format dropdown, then click OK
-
In the DWG Export Options dialog box, select your preferred DWG version and any other properties you'd like. Click OK.
-
Browse to where you'd like to save the file, name it, and click OK
-
Common errors when opening the DWG file in AutoCAD: When viewing the file in AutoCAD or other CAD software for the first time, beware that you may get an error that essentially informs you that the file was not created in CAD software. That is fine - you still want to open it. You may also need to zoom to the extent if there doesn't seem to be any data in the CAD window.