Batch convert lat longs to UTM?

With arcmap,
add the csv and use the lat longs to create an event table. (right click layer> "Display XY Data")

This creates an event layer with the table and a point layer (not a real point layer, it needs to be exported later)

display xy

set the document projection (data frame properties) to the desired output of the file. (right click layers "in the TOC">properties> coordinate system tab).

Doc prop

desired projection

right click the layer in TOC > Export Data

export

Use the option to "use the same coordinate system as: the data frame"

export


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 gdaltransform:

gdaltransform -s_srs epsg:4326 -t_srs epsg:25832 < space-delimited-coordinates.txt

And if you need more programmatic access to the results, check out geographika's answer using pyroj for a related question.


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:

<OGRVRTDataSource>
    <OGRVRTLayer name="test">
        <SrcDataSource>test.csv</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="RW" y="HW"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

And then run ogr2ogr for reprojection:

ogr2ogr -s_srs "epsg:31466" -t_srs "epsg:25832" -f "CSV" -lco GEOMETRY=AS_XY -sql "SELECT PNR FROM test" temp_dir test.vrt

You'll need to replace epsg:31466 with the appropriate EPSG code for your UTM coordinate system.