GDAL & PROJ Command-Line Coordinate Conversion Tutorial

GDAL & PROJ Command Cheat Sheet

Automate spatial coordinate transformations for massive GIS datasets using native C++ command line utilities.

1. Transform Vector Files with ogr2ogr

Convert a Shapefile or GeoJSON from WGS84 to UTM Zone 18N (EPSG:32618):

ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:32618 output_utm.geojson input_wgs84.geojson

2. Reproject GeoTIFF Rasters with gdalwarp

Reproject satellite raster imagery into Web Mercator (EPSG:3857) using bilinear resampling:

gdalwarp -s_srs EPSG:4326 -t_srs EPSG:3857 -r bilinear input.tif output_web_mercator.tif

3. Point Coordinate Conversion with cs2cs

Convert latitude/longitude directly to UTM Zone 54N coordinates on stdout:

echo 139.6917 35.6895 | cs2cs +proj=latlong +datum=WGS84 +to +proj=utm +zone=54 +datum=WGS84

Interactive Batch Coordinate Conversion

Need to transform multiple coordinates directly in your browser without writing CLI scripts?

Batch Coordinate Converter Pro