Directory of European Campsites

Introduction

I used to try to maintain a list of campsites in western Europe, with location, website links and contact information. But the list changed so frequently that it was too much work to maintain. Instead I now describe how you can get this information for yourself. Some Linux tools are employed but you can often find tools online to do the same step.

Prologue

  1. Install GPSBabel.

Getting data from overpass-turbo.eu

  1. Go to the Overpass Turbo website.
  2. Paste the following text into the left panel of that web page, replacing any text already there:
    [out:json][timeout:60][bbox:{{bbox}}];
    
    node["tourism"="camp_site"];
    out;
    
    way["tourism"="camp_site"];
    out center;
    
    relation["tourism"="camp_site"];
    out center;

    For those interested, that means:

    1. the output from the program should be in JSON format (note that we’ll export the data in GPX format),
    2. searches that do not complete in 60 seconds should be terminated,
    3. the area to search is that that is visible on the map on the right part of the screen,
    4. from the data for the search area, points (“nodes”) noted as campsites should be filtered for and then outputted,
    5. from the data for the search area, lines (“ways”) noted as the perimeters of campsites should be searched for and then their centre outputted,
    6. from the data for the search area, lines made of smaller lines (“relations”) that are noted as the perimeters of campsites should be searched for and then their centre outputted.

    (More information about the Overpass query language can be found here.)

  3. Pan and zoom the map to cover the area you want.
  4. Press the ‘Run’ button and wait for the search to complete. If you get a timeout then adjust to map to cover a smaller area and try again.
  5. Verify that you can see the campsites marked on the map.
  6. Press the ‘Export’ button and then click ‘GPX download’, saving the data to filename file1.gpx.
  7. If you want data about more campsites in other areas then repeatedly:
    1. adjust the map,
    2. press the ‘Run’ button,
    3. press the ‘Export button and then click ‘download as GPX’, saving the data to a new filename (e.g. export1.gpx, export2.gpx, export3.gpx).

Merging those files into one and removing duplicate campsites

If you only downloaded one file then there is no merging or deduplicating to do. However, in order to make the name of the one file that you do have comply with what this procedure expects, you should complete this section anyway!

  1. Run the command:
    gpsbabel -i gpx -f export1.gpx -f export2.gpx ... \
             -x duplicate,location \
             -o gpx -F deduplicated.gpx

    For those interested, that means:

    1. the backslashes are just continuation characters; they can be omitted if you pack the entire command on one line,
    2. the format of the input files is GPX,
    3. the first input file is file1.gpx, the second file is file2.gpx, etc,
    4. apply the ‘duplicate’ filter with the ‘location’ option to remove points with duplicate locations,
    5. the format of the output file should be GPX,
    6. the output file should be deduplicated.gpx.
    7. Remove file1.gpx, file2.gpx, etc. (or safer: move to a temporary directory that you will later remove)
    8. You should now have only deduplicated.gpx.

    (More information about GPSBabel’s many options and filters can be found here.)

Ignore camps too far from route

If you already have a route in a GPX file then you can remove from your list of campsites those campsites that are too far away from your route.

  1. For the purposes of finding campsites within a certain distance of the route, the route file needs to be converted to arc format:
    gpsbabel -i gpx -f my-route.gpx \
             -o arc -F my-route.arc
  2. Filter the campsites file, which we assume is called deduplicated.gpx, with the command:
    gpsbabel -i gpx -f deduplicated.gpx \
             -x arc,file=my-route.arc,distance=50K \
             -o gpx -F filtered.gpx

    (In that example ’50K’ sets distance beyond which campsites are to be filtered out is set to 50Km, see the documentation for gpsbabel’s  arc filter for more details.)

  3. Load the original route into a GPX viewer/editor and then load filtered.gpx and verify it looks correct.

Reformatting the data

Often it is necessary to manually edit the GPX file. This is a lot easier if line breaks are added between fields. 

  1. Install Tidy.
  2. Run the command:
    tidy -q -xml -i filtered.gpx > tidied.gpx
  3. For those interested, that means:
    1. suppress nonessential output
    2. the input format is XML (GPX is an XML schema)
    3. indent element content

    (More information about Tidy’s many options and filters can be found here.)

Viewing/editing the data

There are many applications and websites to do this. My favourite is GORP, but it is only available in German.

See also