Skip to content

Instantly share code, notes, and snippets.

@jsanz
Last active May 8, 2017 18:02
Show Gist options
  • Save jsanz/bc808f44745cb4f0fc96cb375e803c47 to your computer and use it in GitHub Desktop.
Save jsanz/bc808f44745cb4f0fc96cb375e803c47 to your computer and use it in GitHub Desktop.
CARTO & OSM: Using Overpass Turbo to create CARTO Sync Tables

Steps to create a synchronized table in CARTO that queries OSM for specific data.

  1. Navigate to Overpass Turbo web interface and put on the map on the right the area you wnat to query
  2. You can use the wizard or simply put this code and adapt it to your desired tags. Use the Map Features page from the OSM wiki to look for your desired tags.
[out:xml][timeout:25];
(
  node["amenity"="school"]({{bbox}});
);
out body;
>;
out skel qt;
  1. Run the query and check if it's working, you should see points or lines being rendered on top of your basemap.
  2. Open the Export interface and copy the link from Data ▶️ Raw data directly from Overpass API

  1. Put that link on the URL text box on CARTO Connect new dataset interface and click on SUBMIT
  2. Here you can choose to put a frequency and create a sync table or select Never and create a standard table

  1. Several tables will be created, some with none geometries, some with your data depending on the geometry type you are importing.

That's it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment