# Converting latitude/longitude to Cartesian coordinates?

I want to take a series of latitude, longitude pair like and return Cartesian coordinates for it. HOWEVER, I don't want the origin to be at the center of the earth. Instead, I want it to be an arbitrarily defined point somewhere in the United States (all my coordinates are on the continental US). For example, if we defined Chicago, IL as 0,0 and we had an imaginary city that was 20 miles south and 40 miles east of Chicago, it would be at (40,-20).

• What do you mean by South and East in this context? Oriented relative to what? Also, what are you assuming as the input coordinate spheroid? WGS-84 or some US-specific alternative? Or are you not that fussed, and just want a projected coordinate system, in which case just use epsg.io/2163 Commented Dec 18, 2016 at 4:34
• WGS-84 is fine. I'm not quite sure what you mean by oriented relative to what? I'm just getting started with GIS. I meant south as in towards South America but I assume you're looking for something more precise than that. Commented Dec 18, 2016 at 4:39
• North can be Magnetic or True. Commented Dec 18, 2016 at 11:13

I suggest to put up a custom coordinate system, centered on your place of interest.

If your data is all over the US, try an equirectangular projection. You need to know the lat/lon of your place, and the distance from the equator. The PROJ.4 projection string for Chicago would be:

``````+proj=eqc +lat_ts=41.836944 +lon_0=-87.684722 +x_0=0 +y_0=-4662266 +datum=NAD83 +units=m +no_defs
``````

and the coordinate grid looks like this:

For smaller areas of study, a transverse mercator projection fits as well. You don't need the distance to the equator for that:

``````+proj=tmerc +lat_0=41.836944 +lon_0=-87.684722 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
``````

The y-axis is almost the same, but the x-axis cuts the West Coast at a different point:

Other popular projections, like Albers Equal Area, Lambert Conformal Conic or Equidistant Conic, have basically the same problem.

• Do you happen to know any good .NET/C# libraries that can do equirectangular projections? I can write a Proj.4 wrapper but I don't want to. Commented Dec 19, 2016 at 23:02
• I'm not an expert in programming languages, I use GDAL and QGIS for my tasks. Commented Dec 20, 2016 at 10:07

Welcome to the GIS stack exchange!

It sounds like what you are searching for is a coordinate system in general, and in particular a projected coordinate system. ESRI has a good introduction to coordinate systems here, but I will attempt to summarize which one you should use and why. I would highly suggest reading through the above link if you are attempting a project that requires some sort of coordinate system, however.

• UTM is not a great choice for "all of USA". Commented Dec 18, 2016 at 11:12
• If the map area is the continential US, then there's a standard USGS Albers Equal Area which is available in all GIS software. UTM is ill-suited to mapping the CONUS since it covers ten zones (10-19). I suggest you replace the UTM paragraph with something that could meet the requirements. Commented Dec 18, 2016 at 12:42
• From the question it was unclear if the data was located across the United States or in a specific zone. My intention was to give some examples of projections that vary in spatial extent and use, and stress that it is up to the user to choose the one most appropriate to the data involved. The paragraph has been removed. Commented Dec 18, 2016 at 17:52