block by jacquestardie ba32c3304bbe7d8e85b5

A (shitty) way to transform a list of coordinates in UTM to Long/Lat, using gdaltransform.

Reprojecting a list of coordinates to a web-friendly GeoJSON file

First of all, why?

The regulatory community in Maine uses and projects it’s data as UTM Zone 19. That’s fine, except that it can be painful to get that data into WGS84, which seems to be far and away the preferred format for mapping applications on the web. The process I’m describing is certainly not beautiful, but so far it’s the best I’ve come up with. If you have any suggestions, email me please!

We’ll be using 2 tools to get this done. The first, gdaltransform is a part of… GDAL! Install that however is best for your OS. The second, csv2geojson is a nice way to transform csvs to, you guessed it, geojson. Install it with npm install -g csv2geojson.

Before you tell me this would be easier in ArcMap or whatever gui solution you typically use, yes, it might be for a one off conversion. But I’d rather stay out of gui’s, click less, and automate more. Keeping it cli helps me do that :)

cleaned.csv

converted.txt

finished.geojson

initial-dataset.txt