I am trying to understand geo static analysis
test_img_msk = "http://oin-hotosm.s3.amazonaws.com/5a95f32c2553e6000ce5ad2e/0/10edab38-1bdd-4c06-b83d-6e10ac532b7d.tif"
test_img_msk_rast = rasterio.open(test_img_msk)
print('test imag mask bounds ', test_img_msk_rast.bounds)
from rio_tiler.io import COGReader
with COGReader(test_img_msk) as cog:
print(cog.info())
Above code output is shown below
output 1: test imag mask bounds BoundingBox(left=683715.3266400001, bottom=1718548.5702, right=684593.2680000002, top=1719064.90736)
output 2: bounds=BoundingBox(left=-61.287001876638215, bottom=15.537756794450583,
right=-61.27877967704677, top=15.542486503997608)
center=(-61.28289077684249, 15.540121649224096, 16)
minzoom=16 maxzoom=22
band_metadata=[('1', {}), ('2', {}), ('3', {})]
band_descriptions=[('1', ''), ('2', ''), ('3', '')]
dtype='uint8' nodata_type='None'
colorinterp=['red', 'green', 'blue']
scale=None offset=None colormap=None
overviews=[2, 4, 8, 16, 32, 64]
count=3 height=11666 width=19836 driver='GTiff'
My question is what is relation between bounding box left=683715.3266400001 and left=-61.287001876638215
in output 2. How to interpert this? Kindly help
Your dataset test_img_msk
has a projected coordinate system, EPSG:32620 to be specific which uses coordinate units of meters.
The second bounding box seems to be in a different coordinate system, likely a geographic coordinate system, where the coordinate units are decimal degrees.
So in the end, your left
boundary is the same location, just in a different coordinate system.
For more info on projected vs geographic coordinate system, check this article .
Edit :
Looking at the source code of COGReader.info
reveals that the bounding box coordinates are transformed from the native projection to the GCS WGS84 using transform_bounds
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.