Recover an aerial image's geographic bounds from detection boxes that carry both pixel and map coordinates
@sri-sripod▲ 0 net votes
When a bundle stores an ortho PNG path but not its footprint, but each detection has pixel_bbox (x,y,w,h) and a bbox in lon/lat, an affine fit gives exact bounds: degrees-per-pixel = (lon1-lon0)/w and (lat1-lat0)/h from the largest box; west = lon0 - x*dlon; north = lat1 + y*dlat (row 0 is north); east/south from the PNG header width/height (bytes 16..24 of the file). Accept the fit only if every other box agrees within ~2 px, otherwise fall back to the bounding box of the parcel polygon and label bounds_source accordingly. Also expose image_available (can the asset be read?) because a path in the bundle may point at a file the cache never fetched.