[gdal-dev] Sample script idea: gdal_srsguess

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Fri Oct 31 05:19:01 PDT 2014


Hi,

This question pops up every now and then in various forums: People have
received dataset in unknown SRS and they ask which coordinate system it
might be using. Most often data are shapefiles without .prj file or image
files with only .tfw file or sometimes scanned paper maps as plain images.

In case of shapefiles and tfw users can always pick a Ground Control Point
(GCP) having coordinates in the unknown system. With scanned maps it may be
possible too because maps have often a printed grid with coordinates.

On the other hand, people usually know roughly the location of data and it
would be easy to capture reference coordinates in EPSG:4326 or EPSG:3857
from world wide map services.

I suppose that it would be quite easy to make a python script that converts
the reference coordinates to all projections which have an EPSG code in the
Proj4 "epsg" file somehow similarly thn cs2cs and gdal_transform do, compute
delta-X, delta-Y and Root Mean Square Error (RMSE) from the converted
coordinates and GCP coordinates that the user gives as input. Finally the
script would print a few best guesses ordered by ascending RMSE.

Hard core developers may feel this too trivial but perhaps we have some GIS
teachers reading this list and wondering what would be their next challenge
for their students.

-Jukka Rahkonen-



More information about the gdal-dev mailing list