[英]Transform Geodetic to Image Coordinate System based on RPC
I am looking for the rasterio function that does forward transformation from geodetic coordinate system to image coordinate system based on RPC.我正在寻找基于 RPC 从大地坐标系到图像坐标系的正向变换的光栅 function。 Can anyone help me within this context?
任何人都可以在这种情况下帮助我吗?
rasterio
currently doesn't support using RPCs to transform from world coordinates to image coordinates, like GDAL does. rasterio
目前不支持使用 RPC 从世界坐标转换为图像坐标,就像 GDAL 一样。 See the discussion on this topic here: https://github.com/mapbox/rasterio/issues/410请参阅此处有关此主题的讨论: https://github.com/mapbox/rasterio/issues/410
However, I can recommend a python library that implements a vectorized transform to/from world/image coordinates: https://github.com/cmla/rpcm但是,我可以推荐一个 python 库,它实现与世界/图像坐标的矢量化变换: https://github.com/cmla/rpcm
The README of this library only shows the command-line usage of the tool, but you can call it directly in python:这个库的 README 只显示了该工具的命令行用法,但您可以直接在 python 中调用它:
import numpy as np
from rpcm import rpc_from_geotiff
rpc = rpc_from_geotiff("path_to_your_file.tiff")
lon = np.array([..., ...])
lat = np.array([..., ...])
x, y = rpc.projection(lon, lat)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.