Thursday, February 23, 2017

Fighting Eleven #19: Okay, It's Almost Dallas

Thanks to your e-mail, I've figured out there are plenty of ways to do this.

I also figured out that because of a certain amount of map distortion in almost every map, there was a bit of brute force that was going to be absolutely necessary.

What I decided to do was find a map with a liberal number of cities located on the map, then recorded pixel-exact coordinates for those cities, which I added to the .csv file containing latitude/longitude.

So, for 250 cities or so, I have both longitude/latitude and exact pixel locations. These 250 cities are anchor points.

When I want to find a location for a city that's not an anchor city, I find the nearest anchor cities to that city (based on longitude/latitude), then find intermediate pixel values for the city based on the anchor cities.

I still have some things to figure out (boy, don't I always), but I tested the approach and it works very well, and if there's a point where a city is poorly located, I just need to add a closer anchor city and it improves the accuracy.

Next week, Dallas will be Dallas again. I hope.

Site Meter