簡體   English   中英

解釋 gis 中的邊界框

[英]Interpreting bounding box in gis

我正在嘗試了解地理 static 分析

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())

以上代碼 output 如下圖所示

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'

我的問題是 output 2 中的邊界框left=683715.3266400001 and left=-61.287001876638215之間的關系是什么?如何解釋這個? 請幫助

您的數據集test_img_msk有一個投影坐標系, EPSG:32620具體使用米坐標單位。

第二個邊界框似乎在不同的坐標系中,可能是地理坐標系,其中坐標單位是十進制度。

所以最后,你的left是同一個位置,只是在不同的坐標系中。

有關投影與地理坐標系的更多信息, 請查看本文

編輯

查看COGReader.info的源代碼可以發現,邊界框坐標是使用transform_bounds從原生投影轉換到 GCS WGS84 的。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM