1

I downloaded Sentinel-2 Imagery from AWS & I'm using rasterio to read/manipulate the data. I want to find the row/column coordinate of a latitude/longitude point that I initially used to search for the imagery (using sentinelhub). Here's what I've tried to do:

# read image
image_data = rasterio.open('Sentinel-2/32NPP,2019-02-24,0/R10m/B02.jp2')

image_data.count, image_data.transform, image_data.crs, image_data.width, image_data.height
>> (1, Affine(10.0, 0.0, 600000.0,
        0.0, -10.0, 900000.0), CRS.from_epsg(32632), 10980, 10980)

# Get pixel coordinates from map coordinates
py, px = data.index(7.351308199999999, 10.285550099999998)
print('Pixel Y, X coords: {}, {}'.format(py, px))
>> Pixel Y, X coords: 89998, -79998

My TileInfo.json Content:

{
  "path" : "tiles/32/N/PP/2019/2/24/0",
  "timestamp" : "2019-02-24T09:59:33.186Z",
  "utmZone" : 32,
  "latitudeBand" : "N",
  "gridSquare" : "PP",
  "datastrip" : {
    "id" : "S2A_OPER_MSI_L2A_DS_SGS__20190224T141029_S20190224T094938_N02.11",
    "path" : "products/2019/2/24/S2A_MSIL2A_20190224T094031_N0211_R036_T32NPP_20190224T141029/datastrip/0"
  },
  "tileGeometry" : {
    "type" : "Polygon",
    "crs" : {
      "type" : "name",
      "properties" : {
        "name" : "urn:ogc:def:crs:EPSG:8.8.1:32632"
      }
    },
    "coordinates" : [ [ [ 600000.0, 900000.0 ], [ 709800.0, 900000.0 ], [ 709800.0, 790200.0 ], [ 600000.0, 790200.0 ], [ 600000.0, 900000.0 ] ] ]
  },
  "tileDataGeometry" : {
    "type" : "Polygon",
    "crs" : {
      "type" : "name",
      "properties" : {
        "name" : "urn:ogc:def:crs:EPSG:8.8.1:32632"
      }
    },
    "coordinates" : [ [ [ 600001.0, 899999.0 ], [ 663199.0, 899999.0 ], [ 663199.0, 899901.0 ], [ 663149.0, 899900.0 ], [ 663149.0, 899671.0 ], [ 663109.0, 899670.0 ], [ 663099.0, 899441.0 ], [ 663059.0, 899440.0 ], [ 663059.0, 899261.0 ], [ 663019.0, 899250.0 ], [ 663019.0, 899081.0 ], [ 663009.0, 899031.0 ], [ 662969.0, 899020.0 ], [ 662969.0, 898861.0 ], [ 662959.0, 898841.0 ], [ 662919.0, 898840.0 ], [ 662919.0, 898631.0 ], [ 662909.0, 898611.0 ], [ 662879.0, 898610.0 ], [ 662869.0, 898421.0 ], [ 662829.0, 898420.0 ], [ 662829.0, 898221.0 ], [ 662819.0, 898191.0 ], [ 662779.0, 898190.0 ], [ 662779.0, 898001.0 ], [ 662769.0, 897961.0 ], [ 662739.0, 897960.0 ], [ 662729.0, 897771.0 ], [ 662689.0, 897770.0 ], [ 662689.0, 897591.0 ], [ 662679.0, 897551.0 ], [ 662639.0, 897540.0 ], [ 662639.0, 897371.0 ], [ 662629.0, 897351.0 ], [ 662599.0, 897350.0 ], [ 662589.0, 897141.0 ], [ 662579.0, 897121.0 ], [ 662549.0, 897120.0 ], [ 662549.0, 896961.0 ], [ 662539.0, 896941.0 ], [ 662509.0, 896940.0 ], [ 662509.0, 896781.0 ], [ 662489.0, 896711.0 ], [ 662459.0, 896710.0 ], [ 662459.0, 896551.0 ], [ 662439.0, 896471.0 ], [ 662409.0, 896470.0 ], [ 662399.0, 896291.0 ], [ 662369.0, 896290.0 ], [ 662369.0, 896141.0 ], [ 662349.0, 896061.0 ], [ 662319.0, 896060.0 ], [ 662319.0, 895911.0 ], [ 662309.0, 895871.0 ], [ 662269.0, 895870.0 ], [ 662269.0, 895681.0 ], [ 662259.0, 895641.0 ], [ 662229.0, 895640.0 ], [ 662219.0, 895451.0 ], [ 662179.0, 895450.0 ], [ 662169.0, 895221.0 ], [ 662139.0, 895220.0 ], [ 662129.0, 895041.0 ], [ 662089.0, 895040.0 ], [ 662079.0, 894821.0 ], [ 662039.0, 894810.0 ], [ 662029.0, 894601.0 ], [ 662019.0, 894571.0 ], [ 661999.0, 894570.0 ], [ 661999.0, 894471.0 ], [ 661979.0, 894391.0 ], [ 661949.0, 894390.0 ], [ 661949.0, 894251.0 ], [ 661929.0, 894161.0 ], [ 661899.0, 894160.0 ], [ 661899.0, 894021.0 ], [ 661889.0, 893981.0 ], [ 661859.0, 893970.0 ], [ 661859.0, 893841.0 ], [ 661839.0, 893800.0 ], [ 661839.0, 893751.0 ], [ 661809.0, 893740.0 ], [ 661799.0, 893581.0 ], [ 661789.0, 893551.0 ], [ 661759.0, 893550.0 ], [ 661759.0, 893401.0 ], [ 661739.0, 893321.0 ], [ 661719.0, 893320.0 ], [ 661719.0, 893231.0 ], [ 661689.0, 893140.0 ], [ 661689.0, 893091.0 ], [ 661669.0, 893090.0 ], [ 661649.0, 892911.0 ], [ 661629.0, 892910.0 ], [ 661629.0, 892821.0 ], [ 661609.0, 892780.0 ], [ 661599.0, 892691.0 ], [ 661579.0, 892670.0 ], [ 661559.0, 892501.0 ], [ 661529.0, 892490.0 ], [ 661519.0, 892321.0 ], [ 661489.0, 892260.0 ], [ 661469.0, 892101.0 ], [ 661459.0, 892071.0 ], [ 661439.0, 892070.0 ], [ 661429.0, 891911.0 ], [ 661409.0, 891841.0 ], [ 661389.0, 891840.0 ], [ 661389.0, 891731.0 ], [ 661349.0, 891610.0 ], [ 661319.0, 891421.0 ], [ 661299.0, 891420.0 ], [ 661299.0, 891331.0 ], [ 661269.0, 891191.0 ], [ 661249.0, 891190.0 ], [ 661239.0, 891051.0 ], [ 661229.0, 891011.0 ], [ 661209.0, 891010.0 ], [ 661209.0, 890911.0 ], [ 661189.0, 890870.0 ], [ 661179.0, 890781.0 ], [ 661159.0, 890780.0 ], [ 661139.0, 890591.0 ], [ 661119.0, 890590.0 ], [ 661119.0, 890501.0 ], [ 661099.0, 890460.0 ], [ 661089.0, 890371.0 ], [ 661069.0, 890360.0 ], [ 661069.0, 890281.0 ], [ 661039.0, 890141.0 ], [ 661019.0, 890130.0 ], [ 661019.0, 890051.0 ], [ 660999.0, 889951.0 ], [ 660979.0, 889940.0 ], [ 660979.0, 889861.0 ], [ 660959.0, 889820.0 ], [ 660949.0, 889731.0 ], [ 660929.0, 889710.0 ], [ 660909.0, 889541.0 ], [ 660899.0, 889521.0 ], [ 660879.0, 889520.0 ], [ 660879.0, 889401.0 ], [ 660859.0, 889360.0 ], [ 660859.0, 889311.0 ], [ 660839.0, 889290.0 ], [ 660819.0, 889131.0 ], [ 660809.0, 889111.0 ], [ 660789.0, 889110.0 ], [ 660789.0, 888991.0 ], [ 660769.0, 888950.0 ], [ 660769.0, 888901.0 ], [ 660749.0, 888880.0 ], [ 660749.0, 888811.0 ], [ 660719.0, 888720.0 ], [ 660719.0, 888671.0 ], [ 660699.0, 888640.0 ], [ 660679.0, 888491.0 ], [ 660669.0, 888461.0 ], [ 660649.0, 888460.0 ], [ 660639.0, 888301.0 ], [ 660609.0, 888230.0 ], [ 660589.0, 888071.0 ], [ 660579.0, 888041.0 ], [ 660559.0, 888040.0 ], [ 660559.0, 887941.0 ], [ 660529.0, 887811.0 ], [ 660509.0, 887810.0 ], [ 660509.0, 887711.0 ], [ 660489.0, 887621.0 ], [ 660469.0, 887620.0 ], [ 660469.0, 887521.0 ], [ 660449.0, 887480.0 ], [ 660439.0, 887391.0 ], [ 660419.0, 887390.0 ], [ 660419.0, 887301.0 ], [ 660389.0, 887210.0 ], [ 660389.0, 887161.0 ], [ 660369.0, 887160.0 ], [ 660359.0, 887021.0 ], [ 660349.0, 886981.0 ], [ 660329.0, 886980.0 ], [ 660319.0, 886841.0 ], [ 660299.0, 886761.0 ], [ 660279.0, 886740.0 ], [ 660269.0, 886621.0 ], [ 660239.0, 886560.0 ], [ 660239.0, 886491.0 ], [ 660189.0, 886330.0 ], [ 660159.0, 886141.0 ], [ 660139.0, 886140.0 ], [ 660129.0, 886011.0 ], [ 660109.0, 885970.0 ], [ 660109.0, 885921.0 ], [ 660079.0, 885840.0 ], [ 660059.0, 885701.0 ], [ 660029.0, 885620.0 ], [ 660029.0, 885571.0 ], [ 659999.0, 885490.0 ], [ 659979.0, 885351.0 ], [ 659949.0, 885270.0 ], [ 659889.0, 884951.0 ], [ 659759.0, 884420.0 ], [ 659749.0, 884321.0 ], [ 659729.0, 884280.0 ], [ 659649.0, 883861.0 ], [ 659499.0, 883230.0 ], [ 659459.0, 882991.0 ], [ 659439.0, 882950.0 ], [ 659349.0, 882491.0 ], [ 659269.0, 882180.0 ], [ 659259.0, 882081.0 ], [ 659239.0, 882040.0 ], [ 659159.0, 881611.0 ], [ 659139.0, 881570.0 ], [ 659139.0, 881521.0 ], [ 659119.0, 881510.0 ], [ 659119.0, 881431.0 ], [ 659059.0, 881200.0 ], [ 659049.0, 881101.0 ], [ 659029.0, 881090.0 ], [ 659019.0, 880961.0 ], [ 658999.0, 880920.0 ], [ 658999.0, 880871.0 ], [ 658979.0, 880860.0 ], [ 658979.0, 880781.0 ], [ 658959.0, 880691.0 ], [ 658939.0, 880670.0 ], [ 658919.0, 880501.0 ], [ 658889.0, 880440.0 ], [ 658869.0, 880281.0 ], [ 658849.0, 880260.0 ], [ 658849.0, 880181.0 ], [ 658829.0, 880140.0 ], [ 658819.0, 880051.0 ], [ 658799.0, 880030.0 ], [ 658789.0, 879911.0 ], [ 658749.0, 879790.0 ], [ 658749.0, 879731.0 ], [ 658709.0, 879610.0 ], [ 658709.0, 879551.0 ], [ 658659.0, 879380.0 ], [ 658629.0, 879191.0 ], [ 658609.0, 879190.0 ], [ 658609.0, 879101.0 ], [ 658589.0, 879060.0 ], [ 658549.0, 878831.0 ], [ 658539.0, 878791.0 ], [ 658519.0, 878780.0 ], [ 658509.0, 878651.0 ], [ 658479.0, 878570.0 ], [ 658449.0, 878391.0 ], [ 658429.0, 878360.0 ], [ 658429.0, 878301.0 ], [ 658379.0, 878130.0 ], [ 658259.0, 877541.0 ], [ 658239.0, 877520.0 ], [ 658229.0, 877411.0 ], [ 658199.0, 877330.0 ], [ 658179.0, 877191.0 ], [ 658149.0, 877110.0 ], [ 658149.0, 877061.0 ], [ 658119.0, 876980.0 ], [ 658099.0, 876841.0 ], [ 658069.0, 876760.0 ], [ 658069.0, 876711.0 ], [ 658039.0, 876630.0 ], [ 658039.0, 876581.0 ], [ 658009.0, 876500.0 ], [ 658009.0, 876451.0 ], [ 657979.0, 876370.0 ], [ 657979.0, 876321.0 ], [ 657859.0, 875830.0 ], [ 657679.0, 874931.0 ], [ 657639.0, 874800.0 ], [ 657609.0, 874611.0 ], [ 657589.0, 874610.0 ], [ 657589.0, 874521.0 ], [ 657569.0, 874480.0 ], [ 657519.0, 874211.0 ], [ 657499.0, 874190.0 ], [ 657489.0, 874071.0 ], [ 657409.0, 873770.0 ], [ 657269.0, 873071.0 ], [ 657249.0, 873030.0 ], [ 657239.0, 872941.0 ], [ 657219.0, 872940.0 ], [ 657209.0, 872791.0 ], [ 657179.0, 872710.0 ], [ 657169.0, 872611.0 ], [ 657069.0, 872210.0 ], [ 657009.0, 871881.0 ], [ 656989.0, 871870.0 ], [ 656989.0, 871791.0 ], [ 656959.0, 871700.0 ], [ 656949.0, 871601.0 ], [ 656929.0, 871560.0 ], [ 656919.0, 871471.0 ], [ 656899.0, 871450.0 ], [ 656899.0, 871381.0 ], [ 656849.0, 871220.0 ], [ 656839.0, 871111.0 ], [ 656809.0, 871040.0 ], [ 656809.0, 870981.0 ], [ 656759.0, 870810.0 ], [ 656739.0, 870671.0 ], [ 656729.0, 870631.0 ], [ 656709.0, 870620.0 ], [ 656709.0, 870541.0 ], [ 656639.0, 870290.0 ], [ 656639.0, 870241.0 ], [ 656509.0, 869710.0 ], [ 656359.0, 868981.0 ], [ 656339.0, 868950.0 ], [ 656319.0, 868801.0 ], [ 656169.0, 868200.0 ], [ 656059.0, 867651.0 ], [ 656039.0, 867610.0 ], [ 656039.0, 867561.0 ], [ 655879.0, 866890.0 ], [ 655869.0, 866791.0 ], [ 655799.0, 866520.0 ], [ 655619.0, 865621.0 ], [ 655599.0, 865620.0 ], [ 655579.0, 865431.0 ], [ 655559.0, 865390.0 ], [ 655529.0, 865201.0 ], [ 655509.0, 865200.0 ], [ 655509.0, 865101.0 ], [ 655479.0, 864971.0 ], [ 655459.0, 864970.0 ], [ 655459.0, 864871.0 ], [ 655419.0, 864740.0 ], [ 655389.0, 864551.0 ], [ 655369.0, 864550.0 ], [ 655369.0, 864461.0 ], [ 655339.0, 864370.0 ], [ 655339.0, 864321.0 ], [ 655319.0, 864320.0 ], [ 655319.0, 864231.0 ], [ 655299.0, 864131.0 ], [ 655279.0, 864130.0 ], [ 655269.0, 863991.0 ], [ 655249.0, 863911.0 ], [ 655229.0, 863900.0 ], [ 655229.0, 863821.0 ], [ 655209.0, 863780.0 ], [ 655209.0, 863731.0 ], [ 655189.0, 863720.0 ], [ 655189.0, 863651.0 ], [ 655159.0, 863560.0 ], [ 655159.0, 863511.0 ], [ 655139.0, 863490.0 ], [ 655109.0, 863301.0 ], [ 655089.0, 863300.0 ], [ 655089.0, 863201.0 ], [ 655069.0, 863160.0 ], [ 655019.0, 862891.0 ], [ 654999.0, 862880.0 ], [ 654999.0, 862801.0 ], [ 654979.0, 862760.0 ], [ 654969.0, 862671.0 ], [ 654949.0, 862650.0 ], [ 654949.0, 862581.0 ], [ 654929.0, 862540.0 ], [ 654929.0, 862491.0 ], [ 654909.0, 862470.0 ], [ 654909.0, 862401.0 ], [ 654859.0, 862240.0 ], [ 654839.0, 862091.0 ], [ 654829.0, 862051.0 ], [ 654809.0, 862050.0 ], [ 654799.0, 861911.0 ], [ 654779.0, 861870.0 ], [ 654739.0, 861641.0 ], [ 654719.0, 861630.0 ], [ 654719.0, 861561.0 ], [ 654669.0, 861380.0 ], [ 654669.0, 861331.0 ], [ 654629.0, 861220.0 ], [ 654629.0, 861161.0 ], [ 654609.0, 861120.0 ], [ 654509.0, 860621.0 ], [ 654479.0, 860540.0 ], [ 654469.0, 860441.0 ], [ 654439.0, 860380.0 ], [ 654439.0, 860311.0 ], [ 654389.0, 860140.0 ], [ 654269.0, 859551.0 ], [ 654239.0, 859470.0 ], [ 654109.0, 858831.0 ], [ 654069.0, 858710.0 ], [ 653949.0, 858101.0 ], [ 653929.0, 858070.0 ], [ 653889.0, 857821.0 ], [ 653839.0, 857650.0 ], [ 653649.0, 856711.0 ], [ 653609.0, 856580.0 ], [ 653609.0, 856521.0 ], [ 653579.0, 856401.0 ], [ 653559.0, 856400.0 ], [ 653559.0, 856291.0 ], [ 653519.0, 856170.0 ], [ 653489.0, 855981.0 ], [ 653469.0, 855980.0 ], [ 653459.0, 855841.0 ], [ 653439.0, 855800.0 ], [ 653439.0, 855751.0 ], [ 653419.0, 855750.0 ], [ 653419.0, 855661.0 ], [ 653399.0, 855620.0 ], [ 653399.0, 855571.0 ], [ 653379.0, 855560.0 ], [ 653379.0, 855481.0 ], [ 653359.0, 855440.0 ], [ 653349.0, 855351.0 ], [ 653329.0, 855330.0 ], [ 653329.0, 855261.0 ], [ 653309.0, 855171.0 ], [ 653289.0, 855150.0 ], [ 653259.0, 854941.0 ], [ 653239.0, 854910.0 ], [ 653209.0, 854731.0 ], [ 653189.0, 854730.0 ], [ 653179.0, 854591.0 ], [ 653149.0, 854510.0 ], [ 653119.0, 854331.0 ], [ 653099.0, 854310.0 ], [ 653099.0, 854241.0 ], [ 653049.0, 854080.0 ], [ 653049.0, 854021.0 ], [ 653009.0, 853900.0 ], [ 653009.0, 853841.0 ], [ 652879.0, 853310.0 ], [ 652849.0, 853121.0 ], [ 652819.0, 853060.0 ], [ 652809.0, 852941.0 ], [ 652779.0, 852860.0 ], [ 652749.0, 852671.0 ], [ 652729.0, 852640.0 ], [ 652729.0, 852581.0 ], [ 652679.0, 852410.0 ], [ 652559.0, 851821.0 ], [ 652539.0, 851810.0 ], [ 652529.0, 851691.0 ], [ 652509.0, 851650.0 ], [ 652469.0, 851421.0 ], [ 652449.0, 851390.0 ], [ 652449.0, 851331.0 ], [ 652299.0, 850720.0 ], [ 652199.0, 850221.0 ], [ 652169.0, 850140.0 ], [ 652149.0, 849991.0 ], [ 651999.0, 849370.0 ], [ 651829.0, 848521.0 ], [ 651819.0, 848481.0 ], [ 651799.0, 848470.0 ], [ 651789.0, 848341.0 ], [ 651769.0, 848300.0 ], [ 651729.0, 848071.0 ], [ 651709.0, 848060.0 ], [ 651709.0, 847981.0 ], [ 651689.0, 847940.0 ], [ 651679.0, 847851.0 ], [ 651659.0, 847830.0 ], [ 651659.0, 847761.0 ], [ 651639.0, 847661.0 ], [ 651619.0, 847640.0 ], [ 651589.0, 847431.0 ], [ 651569.0, 847410.0 ], [ 651569.0, 847341.0 ], [ 651549.0, 847241.0 ], [ 651529.0, 847220.0 ], [ 651509.0, 847051.0 ], [ 651479.0, 846990.0 ], [ 651459.0, 846821.0 ], [ 651429.0, 846810.0 ], [ 651429.0, 846681.0 ], [ 651409.0, 846640.0 ], [ 651409.0, 846591.0 ], [ 651389.0, 846580.0 ], [ 651369.0, 846411.0 ], [ 651359.0, 846391.0 ], [ 651339.0, 846390.0 ], [ 651339.0, 846271.0 ], [ 651319.0, 846230.0 ], [ 651319.0, 846181.0 ], [ 651309.0, 846161.0 ], [ 651289.0, 846160.0 ], [ 651289.0, 846051.0 ], [ 651269.0, 845971.0 ], [ 651249.0, 845970.0 ], [ 651249.0, 845871.0 ], [ 651219.0, 845741.0 ], [ 651199.0, 845740.0 ], [ 651179.0, 845561.0 ], [ 651149.0, 845560.0 ], [ 651149.0, 845431.0 ], [ 651129.0, 845390.0 ], [ 651129.0, 845341.0 ], [ 651109.0, 845320.0 ], [ 651089.0, 845171.0 ], [ 651079.0, 845141.0 ], [ 651059.0, 845140.0 ], [ 651059.0, 845041.0 ], [ 651039.0, 844951.0 ], [ 651019.0, 844950.0 ], [ 651019.0, 844861.0 ], [ 650989.0, 844780.0 ], [ 650989.0, 844731.0 ], [ 650969.0, 844720.0 ], [ 650959.0, 844601.0 ], [ 650939.0, 844541.0 ], [ 650919.0, 844540.0 ], [ 650909.0, 844381.0 ], [ 650879.0, 844300.0 ], [ 650849.0, 844121.0 ], [ 650829.0, 844120.0 ], [ 650819.0, 843981.0 ], [ 650799.0, 843940.0 ], [ 650799.0, 843891.0 ], [ 650779.0, 843890.0 ], [ 650779.0, 843801.0 ], [ 650759.0, 843760.0 ], [ 650759.0, 843711.0 ], [ 650739.0, 843700.0 ], [ 650739.0, 843621.0 ], [ 650719.0, 843580.0 ], [ 650709.0, 843481.0 ], [ 650689.0, 843470.0 ], [ 650689.0, 843391.0 ], [ 650669.0, 843350.0 ], [ 650669.0, 843301.0 ], [ 650649.0, 843290.0 ], [ 650649.0, 843211.0 ], [ 650599.0, 843050.0 ], [ 650579.0, 842901.0 ], [ 650569.0, 842871.0 ], [ 650549.0, 842870.0 ], [ 650529.0, 842671.0 ], [ 650509.0, 842640.0 ], [ 650479.0, 842451.0 ], [ 650459.0, 842450.0 ], [ 650459.0, 842361.0 ], [ 650439.0, 842320.0 ], [ 650429.0, 842231.0 ], [ 650409.0, 842220.0 ], [ 650409.0, 842141.0 ], [ 650389.0, 842100.0 ], [ 650389.0, 842051.0 ], [ 650369.0, 842030.0 ], [ 650369.0, 841961.0 ], [ 650319.0, 841800.0 ], [ 650299.0, 841651.0 ], [ 650289.0, 841621.0 ], [ 650269.0, 841620.0 ], [ 650259.0, 841471.0 ], [ 650229.0, 841390.0 ], [ 650199.0, 841201.0 ], [ 650179.0, 841200.0 ], [ 650169.0, 841061.0 ], [ 650149.0, 841020.0 ], [ 650109.0, 840801.0 ], [ 650089.0, 840780.0 ], [ 650089.0, 840701.0 ], [ 650069.0, 840660.0 ], [ 650059.0, 840571.0 ], [ 650039.0, 840550.0 ], [ 650039.0, 840481.0 ], [ 650019.0, 840440.0 ], [ 650019.0, 840391.0 ], [ 649999.0, 840370.0 ], [ 649979.0, 840211.0 ], [ 649969.0, 840181.0 ], [ 649949.0, 840180.0 ], [ 649949.0, 840081.0 ], [ 649919.0, 839951.0 ], [ 649899.0, 839950.0 ], [ 649899.0, 839851.0 ], [ 649879.0, 839771.0 ], [ 649859.0, 839760.0 ], [ 649839.0, 839591.0 ], [ 649809.0, 839530.0 ], [ 649779.0, 839351.0 ], [ 649759.0, 839350.0 ], [ 649759.0, 839291.0 ], [ 649719.0, 839190.0 ], [ 649659.0, 838950.0 ], [ 649649.0, 838851.0 ], [ 649579.0, 838630.0 ], [ 649559.0, 838431.0 ], [ 649499.0, 838190.0 ], [ 649459.0, 837881.0 ], [ 649439.0, 837860.0 ], [ 649419.0, 837681.0 ], [ 649389.0, 837680.0 ], [ 649389.0, 837551.0 ], [ 649369.0, 837451.0 ], [ 649349.0, 837450.0 ], [ 649329.0, 837271.0 ], [ 649299.0, 837260.0 ], [ 649299.0, 837141.0 ], [ 649259.0, 837030.0 ], [ 649229.0, 836861.0 ], [ 649209.0, 836850.0 ], [ 649209.0, 836781.0 ], [ 649139.0, 836511.0 ], [ 649109.0, 836450.0 ], [ 648959.0, 835850.0 ], [ 648909.0, 835431.0 ], [ 648899.0, 835411.0 ], [ 648879.0, 835410.0 ], [ 648869.0, 835211.0 ], [ 648859.0, 835181.0 ], [ 648839.0, 835180.0 ], [ 648819.0, 835001.0 ], [ 648789.0, 834990.0 ], [ 648789.0, 834871.0 ], [ 648769.0, 834830.0 ], [ 648769.0, 834781.0 ], [ 648749.0, 834760.0 ], [ 648729.0, 834591.0 ], [ 648699.0, 834580.0 ], [ 648699.0, 834451.0 ], [ 648679.0, 834361.0 ], [ 648669.0, 834341.0 ], [ 648649.0, 834340.0 ], [ 648649.0, 834221.0 ], [ 648629.0, 834161.0 ], [ 648609.0, 834160.0 ], [ 648599.0, 834001.0 ], [ 648579.0, 833931.0 ], [ 648559.0, 833930.0 ], [ 648559.0, 833841.0 ], [ 648539.0, 833810.0 ], [ 648529.0, 833741.0 ], [ 648509.0, 833740.0 ], [ 648509.0, 833661.0 ], [ 648489.0, 833541.0 ], [ 648469.0, 833510.0 ], [ 648449.0, 833331.0 ], [ 648419.0, 833320.0 ], [ 648419.0, 833191.0 ], [ 648399.0, 833150.0 ], [ 648399.0, 833101.0 ], [ 648369.0, 833090.0 ], [ 648359.0, 832921.0 ], [ 648329.0, 832910.0 ], [ 648329.0, 832781.0 ], [ 648309.0, 832740.0 ], [ 648309.0, 832691.0 ], [ 648279.0, 832680.0 ], [ 648269.0, 832511.0 ], [ 648239.0, 832440.0 ], [ 648219.0, 832281.0 ], [ 648209.0, 832261.0 ], [ 648189.0, 832260.0 ], [ 648189.0, 832151.0 ], [ 648159.0, 832031.0 ], [ 648139.0, 832030.0 ], [ 648139.0, 831931.0 ], [ 648119.0, 831890.0 ], [ 648119.0, 831841.0 ], [ 648099.0, 831840.0 ], [ 648099.0, 831751.0 ], [ 648069.0, 831660.0 ], [ 648069.0, 831611.0 ], [ 648049.0, 831610.0 ], [ 648029.0, 831431.0 ], [ 647999.0, 831420.0 ], [ 647999.0, 831301.0 ], [ 647979.0, 831211.0 ], [ 647959.0, 831190.0 ], [ 647939.0, 831021.0 ], [ 647909.0, 831010.0 ], [ 647909.0, 830891.0 ], [ 647889.0, 830801.0 ], [ 647869.0, 830780.0 ], [ 647849.0, 830621.0 ], [ 647839.0, 830591.0 ], [ 647819.0, 830590.0 ], [ 647819.0, 830481.0 ], [ 647789.0, 830361.0 ], [ 647769.0, 830360.0 ], [ 647759.0, 830211.0 ], [ 647749.0, 830171.0 ], [ 647729.0, 830170.0 ], [ 647719.0, 830051.0 ], [ 647659.0, 829890.0 ], [ 647639.0, 829771.0 ], [ 647569.0, 829550.0 ], [ 647509.0, 829171.0 ], [ 647419.0, 828760.0 ], [ 647419.0, 828701.0 ], [ 647399.0, 828690.0 ], [ 647399.0, 828591.0 ], [ 647359.0, 828460.0 ], [ 647359.0, 828401.0 ], [ 647339.0, 828360.0 ], [ 647329.0, 828271.0 ], [ 647309.0, 828270.0 ], [ 647309.0, 828181.0 ], [ 647289.0, 828140.0 ], [ 647279.0, 828051.0 ], [ 647259.0, 828040.0 ], [ 647239.0, 827871.0 ], [ 647219.0, 827860.0 ], [ 647219.0, 827781.0 ], [ 647189.0, 827641.0 ], [ 647169.0, 827630.0 ], [ 647149.0, 827451.0 ], [ 647119.0, 827440.0 ], [ 647109.0, 827271.0 ], [ 647079.0, 827210.0 ], [ 647059.0, 827041.0 ], [ 647049.0, 827021.0 ], [ 647029.0, 827020.0 ], [ 647029.0, 826911.0 ], [ 646999.0, 826791.0 ], [ 646979.0, 826790.0 ], [ 646959.0, 826611.0 ], [ 646939.0, 826610.0 ], [ 646929.0, 826471.0 ], [ 646909.0, 826391.0 ], [ 646889.0, 826370.0 ], [ 646889.0, 826311.0 ], [ 646849.0, 826190.0 ], [ 646819.0, 825981.0 ], [ 646799.0, 825960.0 ], [ 646799.0, 825881.0 ], [ 646779.0, 825840.0 ], [ 646769.0, 825751.0 ], [ 646749.0, 825730.0 ], [ 646749.0, 825661.0 ], [ 646729.0, 825561.0 ], [ 646709.0, 825540.0 ], [ 646709.0, 825471.0 ], [ 646659.0, 825310.0 ], [ 646629.0, 825121.0 ], [ 646609.0, 825120.0 ], [ 646609.0, 825031.0 ], [ 646589.0, 824990.0 ], [ 646539.0, 824721.0 ], [ 646519.0, 824710.0 ], [ 646509.0, 824581.0 ], [ 646489.0, 824540.0 ], [ 646449.0, 824321.0 ], [ 646429.0, 824290.0 ], [ 646429.0, 824231.0 ], [ 646399.0, 824140.0 ], [ 646399.0, 824091.0 ], [ 646379.0, 824060.0 ], [ 646379.0, 824001.0 ], [ 646339.0, 823870.0 ], [ 646309.0, 823671.0 ], [ 646289.0, 823640.0 ], [ 646279.0, 823531.0 ], [ 646259.0, 823461.0 ], [ 646239.0, 823460.0 ], [ 646229.0, 823301.0 ], [ 646199.0, 823220.0 ], [ 646179.0, 823071.0 ], [ 646169.0, 823041.0 ], [ 646149.0, 823040.0 ], [ 646139.0, 822881.0 ], [ 646119.0, 822811.0 ], [ 646099.0, 822810.0 ], [ 646099.0, 822701.0 ], [ 646079.0, 822621.0 ], [ 646059.0, 822620.0 ], [ 646059.0, 822521.0 ], [ 646039.0, 822480.0 ], [ 646029.0, 822391.0 ], [ 646009.0, 822390.0 ], [ 645999.0, 822251.0 ], [ 645979.0, 822210.0 ], [ 645939.0, 821981.0 ], [ 645919.0, 821970.0 ], [ 645909.0, 821841.0 ], [ 645889.0, 821800.0 ], [ 645889.0, 821751.0 ], [ 645869.0, 821740.0 ], [ 645869.0, 821661.0 ], [ 645849.0, 821581.0 ], [ 645829.0, 821560.0 ], [ 645829.0, 821491.0 ], [ 645799.0, 821400.0 ], [ 645799.0, 821351.0 ], [ 645779.0, 821320.0 ], [ 645759.0, 821171.0 ], [ 645749.0, 821141.0 ], [ 645729.0, 821140.0 ], [ 645729.0, 821031.0 ], [ 645689.0, 820910.0 ], [ 645659.0, 820721.0 ], [ 645639.0, 820720.0 ], [ 645639.0, 820621.0 ], [ 645619.0, 820580.0 ], [ 645609.0, 820491.0 ], [ 645589.0, 820490.0 ], [ 645579.0, 820341.0 ], [ 645569.0, 820311.0 ], [ 645549.0, 820310.0 ], [ 645549.0, 820201.0 ], [ 645519.0, 820071.0 ], [ 645499.0, 820070.0 ], [ 645489.0, 819921.0 ], [ 645479.0, 819891.0 ], [ 645459.0, 819890.0 ], [ 645459.0, 819781.0 ], [ 645439.0, 819691.0 ], [ 645429.0, 819661.0 ], [ 645409.0, 819660.0 ], [ 645409.0, 819551.0 ], [ 645389.0, 819471.0 ], [ 645359.0, 819470.0 ], [ 645359.0, 819331.0 ], [ 645339.0, 819251.0 ], [ 645319.0, 819240.0 ], [ 645299.0, 819071.0 ], [ 645289.0, 819051.0 ], [ 645269.0, 819050.0 ], [ 645269.0, 818931.0 ], [ 645249.0, 818841.0 ], [ 645239.0, 818821.0 ], [ 645219.0, 818820.0 ], [ 645219.0, 818701.0 ], [ 645199.0, 818611.0 ], [ 645179.0, 818590.0 ], [ 645169.0, 818471.0 ], [ 645149.0, 818411.0 ], [ 645129.0, 818410.0 ], [ 645119.0, 818251.0 ], [ 645089.0, 818170.0 ], [ 645059.0, 817991.0 ], [ 645039.0, 817990.0 ], [ 645039.0, 817901.0 ], [ 645009.0, 817810.0 ], [ 645009.0, 817761.0 ], [ 644989.0, 817760.0 ], [ 644989.0, 817671.0 ], [ 644969.0, 817630.0 ], [ 644969.0, 817581.0 ], [ 644949.0, 817570.0 ], [ 644949.0, 817491.0 ], [ 644929.0, 817450.0 ], [ 644919.0, 817351.0 ], [ 644899.0, 817340.0 ], [ 644889.0, 817221.0 ], [ 644869.0, 817151.0 ], [ 644849.0, 817150.0 ], [ 644849.0, 817041.0 ], [ 644809.0, 816920.0 ], [ 644779.0, 816741.0 ], [ 644759.0, 816740.0 ], [ 644749.0, 816601.0 ], [ 644729.0, 816560.0 ], [ 644729.0, 816511.0 ], [ 644709.0, 816510.0 ], [ 644709.0, 816421.0 ], [ 644689.0, 816380.0 ], [ 644689.0, 816331.0 ], [ 644669.0, 816320.0 ], [ 644659.0, 816201.0 ], [ 644619.0, 816090.0 ], [ 644619.0, 816031.0 ], [ 644589.0, 815950.0 ], [ 644499.0, 815511.0 ], [ 644479.0, 815490.0 ], [ 644479.0, 815421.0 ], [ 644379.0, 815030.0 ], [ 644269.0, 814491.0 ], [ 644179.0, 814141.0 ], [ 643979.0, 813580.0 ], [ 643919.0, 813341.0 ], [ 643829.0, 813090.0 ], [ 643739.0, 812720.0 ], [ 643549.0, 811711.0 ], [ 643279.0, 810610.0 ], [ 643279.0, 810541.0 ], [ 643209.0, 810190.0 ], [ 643179.0, 809901.0 ], [ 643029.0, 809240.0 ], [ 642979.0, 808821.0 ], [ 642839.0, 808041.0 ], [ 642819.0, 808000.0 ], [ 642769.0, 807721.0 ], [ 642749.0, 807680.0 ], [ 642629.0, 807091.0 ], [ 642499.0, 806560.0 ], [ 642489.0, 806461.0 ], [ 642429.0, 806240.0 ], [ 642279.0, 805501.0 ], [ 642219.0, 805290.0 ], [ 642119.0, 804761.0 ], [ 642069.0, 804600.0 ], [ 642069.0, 804531.0 ], [ 642049.0, 804490.0 ], [ 642009.0, 804251.0 ], [ 641979.0, 804180.0 ], [ 641959.0, 804021.0 ], [ 641929.0, 803950.0 ], [ 641909.0, 803791.0 ], [ 641889.0, 803770.0 ], [ 641879.0, 803651.0 ], [ 641839.0, 803530.0 ], [ 641839.0, 803461.0 ], [ 641809.0, 803370.0 ], [ 641789.0, 803221.0 ], [ 641769.0, 803180.0 ], [ 641769.0, 803131.0 ], [ 641749.0, 803120.0 ], [ 641749.0, 803041.0 ], [ 641699.0, 802880.0 ], [ 641679.0, 802731.0 ], [ 641659.0, 802700.0 ], [ 641659.0, 802641.0 ], [ 641629.0, 802550.0 ], [ 641629.0, 802501.0 ], [ 641609.0, 802470.0 ], [ 641599.0, 802361.0 ], [ 641579.0, 802281.0 ], [ 641559.0, 802280.0 ], [ 641549.0, 802131.0 ], [ 641519.0, 802050.0 ], [ 641489.0, 801871.0 ], [ 641469.0, 801870.0 ], [ 641469.0, 801781.0 ], [ 641399.0, 801520.0 ], [ 641399.0, 801471.0 ], [ 641379.0, 801450.0 ], [ 641379.0, 801381.0 ], [ 641139.0, 800420.0 ], [ 641069.0, 800041.0 ], [ 641049.0, 800010.0 ], [ 641049.0, 799941.0 ], [ 641029.0, 799900.0 ], [ 641029.0, 799851.0 ], [ 641009.0, 799830.0 ], [ 641009.0, 799761.0 ], [ 640939.0, 799530.0 ], [ 640939.0, 799481.0 ], [ 640919.0, 799440.0 ], [ 640919.0, 799391.0 ], [ 640819.0, 798971.0 ], [ 640799.0, 798940.0 ], [ 640789.0, 798861.0 ], [ 640719.0, 798640.0 ], [ 640619.0, 798051.0 ], [ 640589.0, 797970.0 ], [ 640559.0, 797791.0 ], [ 640539.0, 797790.0 ], [ 640539.0, 797691.0 ], [ 640519.0, 797650.0 ], [ 640469.0, 797381.0 ], [ 640449.0, 797370.0 ], [ 640429.0, 797201.0 ], [ 640409.0, 797190.0 ], [ 640409.0, 797101.0 ], [ 640389.0, 797060.0 ], [ 640379.0, 796961.0 ], [ 640359.0, 796950.0 ], [ 640339.0, 796781.0 ], [ 640309.0, 796770.0 ], [ 640309.0, 796651.0 ], [ 640289.0, 796581.0 ], [ 640269.0, 796580.0 ], [ 640269.0, 796461.0 ], [ 640249.0, 796420.0 ], [ 640249.0, 796371.0 ], [ 640239.0, 796351.0 ], [ 640219.0, 796350.0 ], [ 640219.0, 796231.0 ], [ 640199.0, 796171.0 ], [ 640169.0, 796170.0 ], [ 640159.0, 795961.0 ], [ 640149.0, 795941.0 ], [ 640129.0, 795940.0 ], [ 640129.0, 795831.0 ], [ 640109.0, 795751.0 ], [ 640079.0, 795750.0 ], [ 640079.0, 795611.0 ], [ 640069.0, 795561.0 ], [ 640039.0, 795560.0 ], [ 640039.0, 795431.0 ], [ 640019.0, 795331.0 ], [ 639989.0, 795330.0 ], [ 639989.0, 795191.0 ], [ 639979.0, 795151.0 ], [ 639939.0, 795150.0 ], [ 639939.0, 794961.0 ], [ 639899.0, 794960.0 ], [ 639899.0, 794771.0 ], [ 639889.0, 794731.0 ], [ 639849.0, 794730.0 ], [ 639849.0, 794551.0 ], [ 639799.0, 794550.0 ], [ 639799.0, 794311.0 ], [ 639759.0, 794310.0 ], [ 639759.0, 794131.0 ], [ 639709.0, 794130.0 ], [ 639709.0, 793941.0 ], [ 639659.0, 793940.0 ], [ 639659.0, 793711.0 ], [ 639619.0, 793710.0 ], [ 639619.0, 793531.0 ], [ 639569.0, 793530.0 ], [ 639569.0, 793341.0 ], [ 639529.0, 793340.0 ], [ 639529.0, 793111.0 ], [ 639479.0, 793110.0 ], [ 639479.0, 792921.0 ], [ 639429.0, 792920.0 ], [ 639429.0, 792691.0 ], [ 639389.0, 792690.0 ], [ 639389.0, 792511.0 ], [ 639339.0, 792510.0 ], [ 639339.0, 792321.0 ], [ 639289.0, 792320.0 ], [ 639289.0, 792091.0 ], [ 639249.0, 792090.0 ], [ 639249.0, 791901.0 ], [ 639199.0, 791900.0 ], [ 639199.0, 791721.0 ], [ 639149.0, 791720.0 ], [ 639149.0, 791491.0 ], [ 639109.0, 791490.0 ], [ 639109.0, 791301.0 ], [ 639059.0, 791300.0 ], [ 639059.0, 791071.0 ], [ 639019.0, 791070.0 ], [ 639019.0, 790881.0 ], [ 638969.0, 790880.0 ], [ 638969.0, 790701.0 ], [ 638919.0, 790700.0 ], [ 638919.0, 790471.0 ], [ 638879.0, 790470.0 ], [ 638879.0, 790281.0 ], [ 638829.0, 790280.0 ], [ 638829.0, 790201.0 ], [ 600001.0, 790201.0 ], [ 600001.0, 899999.0 ] ] ]
  },
  "tileOrigin" : {
    "type" : "Point",
    "crs" : {
      "type" : "name",
      "properties" : {
        "name" : "urn:ogc:def:crs:EPSG:8.8.1:32632"
      }
    },
    "coordinates" : [ 600000.0, 900000.0 ]
  },
  "dataCoveragePercentage" : 46.49,
  "cloudyPixelPercentage" : 0.0,
  "productName" : "S2A_MSIL2A_20190224T094031_N0211_R036_T32NPP_20190224T141029",
  "productPath" : "products/2019/2/24/S2A_MSIL2A_20190224T094031_N0211_R036_T32NPP_20190224T141029"
}

I'm not sure If I made a mistake during data collection (imagery doesn't correspond to latitude/longitude), or that I'm not making use of transform or crs to correct georeferencing.

Any Hint?


Update

I found a mistake that is related to imagery collection using SentinelHub — In my Code:

search_bbox = BBox(bbox=[min_lat, min_lon, max_lat, max_lon], crs=CRS.WGS84)

In the documentation for [min_x,min_y,max_x,max_y]:

In case of constants.CRS.WGS84 axis x represents longitude and axis y represents latitude

I hope that I can extract pixel location with new Imagery.

  • are you sure your projection is 32632? did you remember that Y is -ve in rasters and are you sure you have lat/lon the right way around? – Ian Turton Jul 9 at 13:38
  • @IanTurton I didn't change the projection configuration (nor do I understand it, I'm new to Geospatial analysis), I just downloaded the imagery using SentinelHub & loaded it with rasterio, my final goal is to extract a small patch (1 hectares) around lat/lon of interest to do computer vision, I updated my question to include Imagery Info from AWS. – shakib tsouli Jul 9 at 13:47
1

You have to specify x and y in the same coordinate reference system as the image. You can check the image_data.crs attribute to find this coordinate reference system.

In this case you have your x and y in, presumably, the WGS84 CRS and the image data in the local UTM CRS (Zone 32N, EPSG:32632). You must convert your WGS84 x and y into UTM x and y before attempting to find the corresponding row and column. You can do this with rasterio.warp.transform:

import rasterio as rio
from rasterio.warp import transform

# read image
image_data = rio.open('Sentinel-2/32NPP,2019-02-24,0/R10m/B02.jp2')

# get crs objects for conversion
to_crs = image_data.crs
from_crs = rio.crs.CRS.from_epsg(4326)

new_x,new_y = transform(from_crs,to_crs, [10.285550099999998],[7.351308199999999])

# transform returns lists so unpack
new_x = new_x[0]
new_y = new_y[0]

# get row and col
row, col = image_data.index(new_x,new_y)
  • Gives Back -60000 for cols, is the error related to my question update (bad search box) ? – shakib tsouli Jul 9 at 14:29
  • 1
    Your image is using EPSG:32632 and your x,y coordinates are (presumably) in WGS4(EPSG:4326) – Ali Jul 9 at 14:57
  • I've updated my answer in line with my comment above. – Ali Jul 9 at 15:24
  • Thank you for your help! – shakib tsouli Jul 9 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.