Date
1 - 3 of 3
Convert BoundingBox data into lat/lon
toku2288@...
Hi Guillaume,
Thanks, It worked. I previously tried using the CRS EPSG:3857 using that method, and it returned lat/lon values out of range. Is there some way to get the EPSG:3857 values? |
|
Guillaume Lostis <g.lostis@...>
Hi, The rasterio.warp.transform_bounds function should do what you want: https://rasterio.readthedocs.io/en/latest/api/rasterio.warp.html#rasterio.warp.transform_bounds Pass it the CRS of your dataset as src_crs, CRS({'init': 'EPSG:4326'}) as dst_crs, and your bounds, and you will get your bounds in lon/lat as output. Regards, Guillaume Lostis Hi, I need to convert the bounding box data of a TIF file to lat/lon co-ordinates so I can request data from another API |
|
toku2288@...
Hi, I need to convert the bounding box data of a TIF file to lat/lon co-ordinates so I can request data from another API
GridTIF.bounds returns a BoundingBox object like the following: BoundingBox(left=-2638055.0614613006, bottom=340165.4847189281, right=2410944.9385386994, top=5922165.484718928) Is there some way to convert this to lat/lon of the two corners in it's current CRS?
|
|