Instruction Manual: Highway data (.wpt) files

 

.wpt Filenames

  • One .wpt file is needed for each highway in each region. Highways crossing into multiple subdivisions of a subdivided country (e.g., states in the USA), or crossing into multiple countries (e.g., Euroroutes in Europe) must be chopped at borders into separate files for each region.
  • Filenames are entirely lowercase and have a .wpt extension.
  • Be sure you can see file extensions in your operating system. Windows hides known file extensions by default, so if you see a ".wpt" extension, the file might actually have something else appended, such as ".wpt.txt". This is no good. In Windows Explorer, you can disable the "Hide extensions for known file types" option in Tools menu > Folder Options > View tab.
  • region.route.wpt is the format for the filename.
    • For undivided countries, the region is the 3-letter ISO alpha-3 country code. See the CIA World Fact Book for a list.
    • For divided countries (USA, CAN, MEX, GBR, RUS, KAZ), the region is an abbreviation for the subdivision rather than for the country. The USA and CAN use the standard postal codes. GBR (United Kingdom) uses WLS, SCT, ENG, NIR. For other countries, ask about the subdivision codes. Some countries (e.g., MEX) have the country code prepended to avoid collisions with subdivision codes of other countries (NL = Newfoundland and Labrador in Canada , MEX-NL = Nuevo León in Mexico).
    • The route is a concatenation of 3-digit zero-padded number designation (e.g., a005, us042, pa343, la3132), the banner if applicable (bus, trk), and the 3-letter Abbrev. if applicable (e.g., cat, pit).
    • Examples:
      • fra.a021.wpt = France A21.
      • pa.pa042trkeag.wpt = Pennsylvania PA 42 Truck (Eagles Mere).
      • grc.a005.wpt = Greece A5 (main piece).
      • grc.a005art.wpt = Greece A5 Arta section.

.wpt Data Format

  • The format is simple. Each line as two fields separated by a space.
    1. Waypoint label. This identifies the waypoint.
    2. OpenStreetMap URL that includes coordinates.
  • For example, the first few lines of PA US 11 (pa.us011.wpt) are:

    MD/PA http://maps.google.com/?ll=39.721085,-77.723851&spn=0.016769,0.021372
    PA163 http://maps.google.com/?ll=39.721316,-77.723851&spn=0.016768,0.021372
    I-81(3) http://maps.google.com/?ll=39.756065,-77.726601&spn=0.015000,0.015000&hl=en&om=1
    PA16 http://maps.google.com/?ll=39.790995,-77.730718&spn=0.016752,0.021372
    PA316 http://maps.google.com/?ll=39.927444,-77.663083&spn=0.016718,0.021372
    US30 http://maps.google.com/?ll=39.936527,-77.660122&spn=0.016716,0.021372
    PA433 http://maps.google.com/?ll=39.979192,-77.624931&spn=0.016706,0.021372
    PA997 http://maps.google.com/?ll=39.992147,-77.607207&spn=0.016702,0.021372

  • No blank or comment lines. The file may end with a final return character.

Getting a coordinate URL

  • Use OpenStreetMap.
  • Zoom into at least zoom level 14 in OpenStreetMap. The zoom level appears in the URL after clicking on "Permalink".
  • Double-click on the center of the interchange or intersection. This centers the map (which is crucial!) and zooms in one more level.
  • Click on "PermaLink" at the lower right. The browser location bar now shows an updated URL with embedded coordinates. Copy it.
  • Paste the URL into the .wpt file and give it a waypoint label.
  • You can also use the Highway Browser (with "highlight=0" manually added to the end of a URL) or Jim's Waypoint File Viewer to grab OpenStreetMap URLs. Do not use commercial mapping sources, such as Google Maps, Yahoo Maps, or Bing Maps.

Multiplexes

  • Concurrent highways (multiplexes) have multiple designations for the same section of highway.
  • The .wpt files of concurrent highways must have the same waypoints with exactly identical coordinates. This will allow my scripts to auto-detect multiplexes and remove duplicated mileage where appropriate.
  • If you encounter a multiplex in your work and the concurrent highways have not been worked out, then proceed normally.
  • If instead the concurrent highway is already worked out, copy the concurrent waypoints from the .wpt file of the concurrent route. Remember to put the waypoints in the correct order, which may be backwards from the order of the concurrent highway. See the secret Data Folder for the latest copies of the .wpt files for completed highways.
  • US 222/US 422 example:

    pa.us222.wpt

    US222Bus_S http://maps.google.com/maps?ll=40.29762,-75.997936&spn=0.004157,0.005343
    PA724 http://maps.google.com/maps?ll=40.313861,-75.995736&spn=0.016624,0.021372
    US422_W http://maps.google.com/maps?ll=40.328585,-75.978141&spn=0.01662,0.021372
    StaHilRd http://maps.google.com/maps?ll=40.337222,-75.967026&spn=0.016618,0.021372
    PapMilRd http://maps.google.com/maps?ll=40.34396,-75.966682&spn=0.016616,0.021372
    PA12 http://maps.google.com/maps?ll=40.349193,-75.961232&spn=0.016615,0.021372
    US422_E http://maps.google.com/maps?ll=40.351973,-75.963593&spn=0.016614,0.021372
    BroRd http://maps.google.com/maps?ll=40.358645,-75.977497&spn=0.016612,0.021372
    VanReedRd http://maps.google.com/maps?ll=40.363288,-75.988827&spn=0.016611,0.021372

    pa.us422e.wpt

    PA419 http://maps.google.com/?ll=40.369959,-76.188426&spn=0.016642,0.02429
    PA724_W http://maps.google.com/?ll=40.325346,-76.015735&spn=0.016653,0.02429
    US222_S http://maps.google.com/maps?ll=40.328585,-75.978141&spn=0.01662,0.021372
    StaHilRd http://maps.google.com/maps?ll=40.337222,-75.967026&spn=0.016618,0.021372
    PapMilRd http://maps.google.com/maps?ll=40.34396,-75.966682&spn=0.016616,0.021372
    PA12 http://maps.google.com/maps?ll=40.349193,-75.961232&spn=0.016615,0.021372
    US222_N http://maps.google.com/maps?ll=40.351973,-75.963593&spn=0.016614,0.021372
    WyoBlvd http://maps.google.com/?ll=40.344189,-75.951705&spn=0.016649,0.02429
    US422Bus http://maps.google.com/?ll=40.335128,-75.939217&spn=0.016651,0.02429

    The waypoints highlighted in blue and green are concurrent, and identical coordinates are used. The waypoints in the green lines have been edited to refer to the correct highway in each file.
  • Sometimes the waypoints are listed in different orders between the concurrent highway files. You might need to flip the waypoint order after pasting the lines into your file. You can use the coordinate converter for this purpose. Select the "Reverse order" option.

Waypoint order

  • In general, put the waypoints in the order normally used by the country. Exit numbers or roadside distance markers often reveal this order.
  • In the US and Canada, most highways should have waypoints in order from west to east or south to north. Some spurs might not follow this as they begin at a parent highway and end away from it (e.g., NC I-795: north (I-95) to south).
  • Euroroutes should run west to east and north to south.
  • Some countries use a major city as the origin and have exit numbers increasing radially outward and circumferentially in a certain direction.



 

CHM Home | Track your cumulative travel | Highway Browser | Traveler Stats | Newly added highways | Concurrency List
Collaboration | Acknowledgments | Report a highway data error | Discussion Forum
Have you traveled on any highways in the United States Select Numbered State Freeways system?