How to get the geo coordinates of a pixel within a bounding box? #1032
-
Sorry if this is a beginner question, but I'm not finding the answer anywhere. I created a RasterDataset and I query it the section I want via a BoundingBox. It returns me a dictionary containing: Now, I need to get the geographic coordinates of a pixel point within this image. Let's say I want the central point. I'd want something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You can get this information from the bounding box: bbox = sample["bbox"]
center_x = (bbox.minx + bbox.maxx) / 2
center_y = (bbox.miny + bbox.maxy) / 2 |
Beta Was this translation helpful? Give feedback.
You can get this information from the bounding box: