[GIS] Changing image projection using Python

coordinate systempython

Image corner coordinates are known:

  • Top left: (70.20315, 20.92749)
  • Top right: (70.20315, 31.45240)
  • Bottom left: (59.70571, 20.92749)
  • Bottom right: (59.70571, 31.45240)

(Basically map over Finland and a little bit of Sweden/Norway/Russia)

I am not sure what is current projection name; +1 in latitude and longitude is constant distance in image (which is not the case with Mercator projection).

I couldn't find a way to change image projection to Google maps overlay image, preferably using Python. Python isn't mandatory, but command line interface is.

It's possible to do that with pyproj and PIL, but I wasn't able to figure out how to do that. I also found GDAL, and more specifically gdalwarp, but couldn't find options for changing projection in a correct way.

Example image

Best Answer

One solution is to use gdalwarp, as -s_srs and -t_srs options you can use the definitions or EPSG codes found in this site.

Since you don't know the source srs you can try some options and check the results with another reliable data. But is more recommended that you trace the source of this image and try to find it's srs definition.

If the image is a geotiff, it may already contain the srs definition. You can check it with gdalinfo. GDAL.

Related Question