Adding Costco Gas Stations to Google Maps

How many time have you gone to search for something on the Internet, and it just wasn’t there?

Many times travelling over the last few years, I’ve wanted to know where there was a Costco gas station along my route. Their gas prices are usually the most competitive in a particular area. Finding a location along your route is hard to do when all you have is a list sorted alphabetically by State and City.

So I took the PDF of Costco Gas Stations from the Costco website, extracted it, massaged the data to import it into a database, converted it into KML, and added it to Google Maps.


View Larger Map

I discovered after importing the data, that Google Maps paginates your data set after 200 entries. Since the original data was sorted by State and the City, all the locations are not shown at once. There are 300 Costco Gas Stations in the list.

A more useful arrangement would be to sort the data by ZIP code, and break it into two sets: East and West. I’ll try to find some time for that in the next week.

There were some data validation problems with the original data set also, mainly having to do with non-plain text characters in the data. For example, 1001 Boul. Jean-Baptiste-Rolland, Saint-Jérôme, Quebec J7Y 4Y7 failed validation. The é and ô had to be changed to e and o.

Disclaimer: I was not asked by Costco to do this, and have no ties other than a common membership.

In what way could this map be improved? Leave your suggestions in the comments.

Creative Commons License
Adding Costco Gas Stations to Google Maps by Jim Bergman is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Permissions beyond the scope of this license may be available at http://jimbergman.net/about.

Posted in featured, website development Tagged with: ,
  • 4bolenbaugh

    Great help. Can you tie it to get directions so I could map my route and see where the Costco’s re located?

  • bruce

    What a GREAT idea, Jim!! I wish Costco and Mapquest would collaborate on this!

  • Yes, you can use it to get directions. Click on the “View Larger Map” link under the map above. Then when you click on one of the gas stations, click on Directions in the pop-up bubble.

  • goso

    An incredibly great tool. I have always thought of mapping Costco gas stations for road trips. I am taking one next week so figured I’d finally try to do it this time and voila! Thank you very much for this!

  • Toby

    Great resource!!! Just returned from a drive from Long Beach CA to Brian Head Utah. I’ve sent this link to my iPhone for future use and set it as a bookmark on my laptop. Thank you. Brilliant idea!!

  • Toby

    Great thinking. (see below) On my iPhone, I click on the “View Larger Map” link but the Directions do not come up in the pop-up bubble. Any suggestions? 1

    Reply

  • Tim

    This is a great idea. I suggest including a date with the last time the gas station list was updated to your file. There is a Costco gas station at the Costco in San Marcos, CA (north San Diego County) that I did not see.

    I am surprised Costco has not thought to have a “Costco gas router” website.

    When our boys were young and we did road trips we purchased AM/PM (ARCO) gas cards ahead of time and my wife used the online AM/PM gas route maker to print out a list of AMPMs along our route. With that printout we determined where we would stop for gas, use the restroom, buy road snacks, switch drivers, etc.

    Tim

    • This map was made for myself prior to making a few cross-country road trips, including one from California to Florida to see a space shuttle launch in 2010. At the time there was no map available.

      The Costco website no longer has the data available to download, so I don’t have a source for additions and changes to the list.

      The version of the latest data is the same as the original date on this blog post (9/2008) and the date is also on the Google Maps data if you click on the “View Larger Map” link just under the map above.

      Now I use the GasBuddy website or iOS/Android app to find specific gas stations, or just the cheapest gas nearby.

  • Kumar

    Thanks Jim for making this public & helping folks like me. Appreciate it!