One day, I was working on a project for work and noticed that, when describing the distance of one of our parks from Philadelphia, Baltimore, and Washington, somehow the Google Maps algorithm gave the same exact driving time for all three cities. I do not know if this was simply just due to the time when I entered the trips into Google Maps, since I know it will provide the fastest route at the time, instead of the fastest route in general (i.e. it factors in current traffic conditions, or if you manually set the time, it provides an estimate of traffic conditions). However, I wanted to see which locations in Delaware were certainly equidistant (by road) from the three cities of Philadelphia, Baltimore, and Washington.
I figured that I would have some fun with the Google Maps API and write a program to help me out. I started by generating a point map file in QGIS that had a point every half mile heading south and every half mile heading east, starting at the Chesapeake and Delaware Canal at the Delaware's western border with Maryland and ending at Fenwick Island at Delaware's southern border with Maryland. Then, I pulled the coordinates for each of these points (using the WGS84 coordinate system, which appears to be what Google Maps uses) and placed them into a CSV file. I then made a Python program that would tap into the Google Maps directions API and provide the distance of each set of coordinates to match with Philadelphia, Baltimore, and Washington and then place them into the CSV file I provided.
Note: You need to provide a Google Maps API key in order to use this program. You can sign up for one using the Google Cloud Platform. Also, you need to have the pandas library for Python installed.
There are two ways in which this works, presented by the program's first prompt. You may either enter a place name manually, or pull the data from a CSV file. Entering the place name manually, as shown below, will cause the program to simply return the distances from the three cities to the specified location.
Using a CSV file involves a file formatted like this one (using WGS84 coordinates), which basically takes the manual process and does it as a batch. Simply provide the CSV file's location at the start (wrapping the path and filename in quotes) and then provide an output at the end (again wrapping it in quotes).
The results for this project can be found in a CSV file here. The CSV file provides some background into the calculations used to determine where, if anywhere, in Delaware is equidistant from Philadelphia, Baltimore, and Washington. Counterintuitively, starting from the right, the columns titled X and Y provide the coordinates in question. Then, going back to the left, the columns named for each city show the driving distance, in miles, from the city to the coordinates. The column titled AvgDistFromDC-Balt averages the distance from Baltimore and from Washington to the point, as for all the points that actually could be close, Baltimore and Washington are extremely similar in distance from the destination point, almost always within a 1 mile difference. Last, the column titled DCBaltMinusPhilly is literally what it sounds like, the averaged distance from Baltimore and Washington to the point minus the distance from Philadelphia to the point. This figure is used to develop the map described below.
Using the DCBaltMinusPhilly figure, any positive values represent that the location is closer to Philadelphia and any negative values represent that the location is closer to Baltimore and Washington. Speaking another way, positive values are further from Baltimore and Washington, but negative values are further from Philadelphia. The maps may be viewed below (clicking them will open in full resolution, they are approximately 5-6 MB in size each). Anything with less than a 1 mile difference between the Baltimore/Washington average distance and the Philadelphia distance was considered "approximately the same."
The statewide map is to the left. The zoomed in map is to the right, which focuses on areas which are approximately equidistant from Philadelphia, Baltimore, and Washington. These maps were generated using QGIS.
In summary, the following locations in Delaware were approximately equidistant from Philadelphia, Baltimore, and Washington, from northwest to southeast: