That particular location must be near the edge of the image tile, such that getting imagery for 100px either side isn't possible. I think this is my bad on the coding side - make sure all points fall inside the bounds of the image tile you're working with.
If you are using the 2528C tif, the dimension is 35000 by 35000. To fit a 200 by 200 image into that bound, you need to introduce a condition first such that your row and column values are greater 100 and less than 34900.
after: row, col = dataset.index(lon, lat)
You can introduce a condition:
If (row > 100) and (row < 34900) and (col > 100) and (col < 34900).
This way, you can exclude coordinates that can't get the pixel values of points 100 before or after them. And you won't get that error.
That particular location must be near the edge of the image tile, such that getting imagery for 100px either side isn't possible. I think this is my bad on the coding side - make sure all points fall inside the bounds of the image tile you're working with.
If you are using the 2528C tif, the dimension is 35000 by 35000. To fit a 200 by 200 image into that bound, you need to introduce a condition first such that your row and column values are greater 100 and less than 34900.
after: row, col = dataset.index(lon, lat)
You can introduce a condition:
If (row > 100) and (row < 34900) and (col > 100) and (col < 34900).
This way, you can exclude coordinates that can't get the pixel values of points 100 before or after them. And you won't get that error.
Thank you so much for the help guys...u have helped transform it into a much bigger learning experience..kudos to future hackathons as well