如何使用Python计算kml文件中图像每个像素的纬度和经度?
我正在使用 .kml 文件,该文件指向覆盖图像(大概在 UTM 投影中?)。 KML 文件使用“LatLonBox”标签提供边界框的纬度和经度。
我需要计算该图像中每个像素的纬度和经度。
Python 中是否有任何预先存在的库可以为我执行此操作?
I am using .kml file which points to an overlay image (presumably in UTM projection?).
The KML file provides the latitudes and longitudes of the bounding box using the "LatLonBox" tag.
I need to calculate the latitudes and longitudes of each pixel in this image.
Are there any pre-existing libraries in Python that would do this for me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
kml 文件引用的叠加图像采用标准地理投影。
这意味着图像中的纬度和经度呈线性变化。
考虑到我们已经知道 LatLonBox 标签属性提供的图像的纬度/经度范围,计算每个像素的纬度和经度就变成了一个简单的插值案例。
The overlay image referenced by the kml file was in standard geographic projection.
This means that the latitudes and longitudes vary linearly within the image.
Calculating the latitude and longitude of each pixel became a trivial case of interpolation given that we already known the lat/lon bounds of the image provided by the LatLonBox tag attributes.