I am using GDAL to transfrom ortho from one EPSG to other EPSG. In my case I have used EPSG:32610 which is in (m) and transformed into EPSG:2227 which is in (us-ft). I am able to transform it using below script:
def convert_ortho_into_user_epsg(input_file, output_file, source_epsg, target_epsg):
import os
from osgeo import gdal
dataset = gdal.Open(input_file)
gdal.Warp(output_file, dataset, srcSRS='EPSG:{}'.format(source_epsg), dstSRS='EPSG:{}'.format(target_epsg))
print("Successfully converted ortho from EPSG {} to EPSG {}.".format(source_epsg, target_epsg))
# Close dataset
dataset = None
But when I use gdalinfo int output_file it changes the pixel size. Is it expected?
Moreover the origin and size that I get from the input file is: Size is 10053, 11080 Origin = (608158.944684999994934,4171303.732194999698550)
when I transformed it into 2227 then I get: Size is 10345, 11344 Origin = (6193167.632184272632003,2073506.717460004147142)
I also tried to transformed the origin of input file manually using different code from 32610 to 2227, there I get the origin as: 6193187.041177868, 2073506.717459998
.
What could be the possible reason?