python 2.7 - How to get pixel coordinates as latlng from a jpg image -


i have map image jpg format. trying calculate latitude , longitude each pixel. have 3 points coordinate pixel row , column.

at first used python utm library , calculated distance difference between 2 points using lat , lng. used: diff_meters_x / diff_pixels_x diff_meters_y / diff_pixels_y after found 1 pixel difference in x-axis , y-axis, tried test third point shows different point 100 km tolerated pixels , lat lngs correct.

then tried use gdal library calculates .tif extension images. using python 2.7 if there way, can use platform matlab. me way figure problem out?

map image

here 3 points:

blk: latlng: 39.760751, 27.840443 || utm_meters: 571990.1817772812, 4401541.17886532 || zone/band: 35, 's' || pixel: [210, 247]

kut: latlng: 39.495730, 29.997087 || utm_meters: 757725.0341605131, 4376079.988600584 || utm_zone/band: 35, 's' || pixel: [288, 260]

usak: latlng: 38.754252, 29.337908 || utm_meters: 703154.2913673887, 4292101.594408637 || utm_zone/band: 35, 's' || pixel: [265, 296]

ttake @ basemap python package matplotlib: http://matplotlib.org/basemap/users/mapcoords.html

lat/long calculation heavily depend on projection of picture , basemap you.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -