Monday, 22 October 2018

coordinate system - Batch convert lat longs to UTM?


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?



Answer




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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...