I have a map of the US of which I know the longitude and latitude of all 4 corners. What I want to do is to be able to plot a city based on its longitude and latitude, inside my program obviously. I'm having trouble finding a way to do this. Any ideas?
4/15/2008 12:56:33 AM
What program and what format map (image, array, shapefile, etc...)?
4/15/2008 1:05:42 AM
The map is a .gif of the US and I'm writing the program myself. The problem is obviously the longitude and latitude lines bend, so I can't use an offset from one side of the map.
4/15/2008 1:15:42 AM
use math
4/15/2008 1:19:50 AM
Do you know the projection of the map?
4/15/2008 1:20:00 AM
It doesn't really matter what map I use, so long as it is an image file of the US. So if you know one that is more conducive to this application, I'm all for it. What it really boils down to is I have a list of cities, their latitude and longitude, and I need to graph them in some algorithmic way.
4/15/2008 1:27:25 AM
4/15/2008 2:01:35 AM
this might come in handy: http://en.wikipedia.org/wiki/Haversine_formula
4/15/2008 2:08:01 AM
^^^ Fine a map with a rectilinear projection so you can just use the offset from one side of the map.
4/15/2008 12:26:44 PM
< HIJACKING THREAD >Anyone know how to find the distance in feet between two points of long/latThanks!
4/15/2008 1:51:02 PM
^http://jan.ucc.nau.edu/~cvm/latlongdist.htmlI assume you can convert from miles to feet.[Edited on April 15, 2008 at 2:00 PM. Reason : auto-link FTL]
4/15/2008 1:58:37 PM
^^^^ Any suggestions on where I can find a map like that? A google search for rectilinear projection map didn't yield anything useful.
4/15/2008 2:17:47 PM
^you could create one by transforming an existing map.
4/15/2008 2:52:12 PM
^Suggestions on how to start? I'm no cartographer.
4/15/2008 3:02:20 PM
google image search: equirectangularOtherwise, generate the map you need using ArcGIS.[Edited on April 15, 2008 at 5:03 PM. Reason : more info]
4/15/2008 5:02:25 PM
I have some code that will do this at home. Used it for a mapping mashup for gmaps before they released a public API.My method is a estimation function, but it's accurate to about 50ft and pretty fast for large data sets. It's in PHP, but that should be easily portable to whatever you are coding in. I'll try to remember it tonight when I get home.
4/15/2008 7:11:17 PM
That would be great. I really only need for it to get me in the right part of the state, as I'm graphing a point that represents a city.
4/15/2008 8:26:00 PM
^^^ Is this the correct type of map?http://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Usa-equidistant.png/800px-Usa-equidistant.png
4/15/2008 9:37:10 PM
^ That's correct. It has the following bounds: 125° - 66° W, 50° - 24° N
4/15/2008 9:45:20 PM
Now these points of data make a beautiful line
4/15/2008 9:48:06 PM
^^Excellent! I think this solves my problem then. Thanks a lot. I was beginning to get worried about this
4/15/2008 9:52:39 PM
In case you were wondering what I was trying to plot, it was the network topology of Level 3. Here it is if you want to see it:http://www4.ncsu.edu/~albeam/topology.pngI know its nasty, but that is how it is supposed to look.
4/18/2008 2:41:12 AM