I have: a specific map image covering the US, with an arbitrary size, and many latitude, longitude pairs I want to plot on that map. I want to convert them to x, y pixel pairs and plot. But the coordinates or pixels on the map don’t correspond to any real world system. All my searches mostly come up with stuff that uses the earth’s radius or that latitude is +/- 90 deg and longitude +/- 180. But I don’t want to plot the whole world. It’s a 2D projection, does the type matter? Mercator-ish. I assume I can do it with one or probably two reference points where I know both the l, l and x, y coordinates. Unfortunately I can’t get the 1, 1 coordinates with any accuracy because they’re in the ocean, so I can only approximate any 2 random places on the map.
I realize that projection requires some sacrifices, and all my points may not be exact especially on opposite ends of the map. I’m okay with some wiggle room. But the math I’m running doesn’t even put my test points in the remotely correct locations.
Yes, it would be best to figure out what the projection of the map is (what you called the “type” — you guessed “Mercator-ish”). If you can’t, do you have to use that particular map? Can you use a map whose projection you DO know?
If you must use that map: If you have access to a GIS software — QGIS is a freeware, and the free version of ArcGIS Online has some tools — you would do what’s called georeference your image file (which has arbitrary pixel “location” values). You start a GIS project with a known projection you decide on (doesn’t really matter which), display a base map from the GIS files that include stuff (coastlines, roads, towns, whatever) that’s also on your image file, and then by hand you click on several (five to ten) pairs of corresponding locations common to both. Then you press a button, and the software “rubber sheets” your image file — now, it has a known projection. You can now easily upload your lat long coordinates, specifying to the GIS exactly what they represent, and they’ll be displayed in the correct locations.
To clarify: as you “display a base map from the GIS files that include stuff (coastlines, roads, towns, whatever) that’s also on your image file,” you also display your image file. At first, your image file will display at a random location on your screen. You click on the first pair of points that represent a common location (say, a crossroads) — one on your image, the other on the known-projection base map. Your image will now be displayed closer to its proper location, but still with the wrong scale and possibly tilted. Now, click for the next pair (best to choose a common location far from the first one — very much like tightening bolts after changing a wheel). Now, the two maps should “snap into place,” more or less. But you should still do at least five more pairs, to make the resulting “rubber sheeted” version of your image more accurate. (More than ten pairs is usually useless).
By the way, your now-projected image map is a “raster” file - cells with color values (like pixels). The lat-long points you display afterwards will be a “vector” file (points, lines, or polygons - in this case, points). Any GIS can display both file types at the same time (published maps usually include layers of each), but if you were to get into more involved analysis and stuff, you’d have to convert one of the files to the others’ type.
I’m ancient. 31 years now. Before it was even called GIS. Simply called it Computer Mapping, or AMFM (automated mapping/Facilities management). Been with the same County Gov for 28 years now. Started with Intergraph and main frames. All ESRI now (actually saw an ESRI commercial on TV the other night, blew me away).
Ha! My first GIS experience was with Intergraph as well — a course taught by Canadian pioneer John Radke at U. Of California in 1993. Didn’t really use it professionally until around 1999 — ArcView and a bit of satellite imagery processing, in Mexico. Wouldn’t have called myself anything close to an expert until around 2006, during doctoral studies and research.
A Doper (current? former?) named Mr. Dibble is more of an expert than I am. Probably several others are as well.
Cool. Way back when, nobody understood spatial analysis. “The whosa what then?”
I wrote some training documents and taught staff just what the heck it is. Today, most people understand it as well as they understand a refrigerator gets cold (not dissing people, GIS can be pretty freaky). But that’s something at least.
I manage an SQL SDE DB for the County I work for. A lot of stuff wants to go to the cloud now though. I’m trying to figure out how to balance that out. ESRI AGOL and Portal mostly.
Thanks, I’m trying that and can’t get it to work but I’ll play with it. y ends up negative due the log but pixel values should be positive. How do I determine R without a scale? I guess that’s the crucial missing element, I just was thinking a reference point or two would help.
Map is generated from this website, you can save a copy at the bottom right. I don’t need this particular map but I need a map with county lines.
The final product is important, but also I’d rather avoid external software and it’s just a non-essential project I wanted to try. But if GIS is unavoidable and can get me a map or some constants I’ll try it out.
To create simple, small local maps, most geologist and similar professionals use UTM - Universal Transverse Mercator. Basically, put the 1,1 at the center of the map you want, then assume the map is a cylindrical (Mercator) projection - as if the light source for the projection were at the center of the earth.
To convert to X,Y from a globe, you need to know the projection used to convert. Mercator is like a tube wrapped around the earth, infinite to the north and south. The light that projects our imaginary transparent globe onto this tube is located at the center of the earth. Obviously, the further north or south, the more distorted. Mercator’s map was popular (except in extreme north latitudes) because any compass heading was a straight line. (Ignoring “magnetic north pole not actual north pole” issues).
For your case of the whole (continental?) USA - is this a Mercator or cylindrical projection? Are the “straight” lines on the globe (i.e.49th parallel, most obvious example) straight lines on your map, or curved? Is the lat/long grid straight lines? What is the purpose of the map - is area most important, or consistency of distance measurements on the map, or headings? If it’s just for illustrative purposes, put your 0,0 point near the geographical center of the continental USA (i.e. Kansas City) and simply use lat and long difference from there as x and y. (60 seconds to a minute, 60 minutes to a degree -easy to translate to x,y). Google Earth can give you L,L to excruciating detail.
R? You’re have trouble with the value of R? What is R?
If you told us what you are trying to map, it would help. What is this data from/for?
Must it be located on your current map? Or would a different basemap work? How many points are you looking at? 10, 100 or 1,000,000? What is your goal? Is it for display, or crunching data?
I’m guessing not data, since you seem to be ok if it’s sort of accurate. A thematic map then.
Excuse the interrogation, but this stuff is my job.
There was mention of county boundaries. If the main goal is to colour in those counties where, let’s guess your data, ultra-high cheese purchases took place, then it would be a lot easier to get a county map of the US that you could infill in MS-Paint.
As others have pointed out, while your data is in lat-long pairs, there is no guarantee that your “specific map image covering the US, with an arbitrary size” is actually a proper projection (UTM Mercator or otherwise) where 1 degree of longitude on the west coast also measures 1 degree on the east coast.
I mean, NYC is roughly 40.661, -73.944. LA is 34.05, -118.25.
Not sure what you mean by “real world.”
Coloring in is plausible, but boring. There are also 3000+ counties. Look at Texas for one.
If I have to provide corrections for one coast, that’s maybe fine. UTM might be pretty good because it has smaller subsections, but there’s quite a few of those.