I've got a .csv file that contains a long list of latitude and longitude points. Is there an efficient way to batch convert the list into a projected UTM coordinate system? Thanks.
|
Perhaps the simplest way is using something like QGIS and its delimited text plugin to import and then export the data. If you're looking for something commandline and scalable, then the VRT approach Sasa mentioned is a good one. You can also do it with file inputs and outputs using
And if you need more programmatic access to the results, check out geographika's answer using pyroj for a related question. |
|||||||
|
|
With arcmap, This creates an event layer with the table and a point layer (not a real point layer, it needs to be exported later)
set the document projection (data frame properties) to the desired output of the file. (right click layers "in the TOC">properties> coordinate system tab).
right click the layer in TOC > Export Data
Use the option to "use the same coordinate system as: the data frame"
|
|||
|
|
|
ogr2ogr should be able to handle this (you can download FWTools for a quick install). This thread illustrates how to reproject CSV data. To summarize, you'll need to create a VRT file that contains references to the CSV columns:
And then run ogr2ogr for reprojection:
You'll need to replace epsg:31466 with the appropriate EPSG code for your UTM coordinate system. |
|||
|
|
|
Corpscon, a free tool from the US Army Corps of Engineers will allow you to batch convert lat/long to/from UTM. Note that it is limited to the United States, and may work in Canada. |
|||
|
|
|
There are working spreadsheets and other source code (Fortran, C++, etc.) at http://www.gpsy.com/gpsinfo/geotoutm/ Great resource for 1996 (and still works)! |
|||
|
|
|
We have a commercial (but affordable) standalone desktop application that will allow you to batch convert your coordinates. More information can be found at: http://geomaticsolutions.com/products/geo-suite/geo-calc You can also use our free online service to perform single point transformations. http://georepository.com/home.html |
|||
|
|
|
As I understand it, you do not want to simply reproject a file, you want to convert the coordinates themselves and have a new file with the new coordinates. If you Google "convert lat/lon to utm" you should find excel spreadsheets that will do this conversion (e.g. at the University of Wisconsin Green Bay or in whuber's answer above). Or, you can purchase software like AllTrans or Franson Coordtrans, which batch convert to and from many different coordinate systems. Or, less simple but more educational, is to learn syntax for gdal or FWTools. |
|||
|
|
|
For a scripting solution, you could use pyproj:
|
|||
|
|
|
The following new site converts files online. (It uses pyproj) It also generates KML and the input file can often be left 'as is' and not reformatted to suite the conversion program.
Please cut and paste the link to follow it. |
||||
|
|
