【问题标题】:Interpreting bounding box in gis解释 gis 中的边界框
【发布时间】:2021-04-30 21:51:33
【问题描述】:

我正在尝试了解地理静态分析

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 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'

我的问题是输出 2 中的边界框 left=683715.3266400001 and left=-61.287001876638215 之间的关系是什么。 如何对此进行干预?请帮忙

【问题讨论】:

    标签: python-3.x geolocation gis raster


    【解决方案1】:

    您的数据集test_img_msk 有一个投影坐标系,EPSG:32620 具体使用米坐标单位。

    第二个边界框似乎在不同的坐标系中,可能是地理坐标系,坐标单位是十进制度。

    所以最后,你的left 边界是同一个位置,只是在不同的坐标系中。

    有关投影与地理坐标系的更多信息,check this article

    编辑

    查看source code of COGReader.info 会发现边界框坐标是使用transform_bounds 从原生投影转换到 GCS WGS84 的。

    【讨论】:

    • 感谢您的意见。如何检查第二个边界框所指的坐标系。
    • 感谢现在提供的信息让我能够理解输出
    猜你喜欢
    • 2019-11-13
    • 2012-09-22
    • 2019-09-13
    • 2016-06-18
    • 1970-01-01
    • 2021-08-18
    • 2017-02-21
    • 1970-01-01
    • 2019-09-04
    相关资源
    最近更新 更多