API概述¶
EasyIDP包包含以下模块:
Data Module : Download and provide path to example files.
点云模块: 读取、写入、检查和裁剪操作。
GeoTiff模块: 读取、写入、裁剪和统计操作。
cvtools子模块: 处理ndarray图像。
ROI模块: 从shp和txt文件中读取感兴趣区域。
shp子模块: 读取shape (*.shp)文件。
jsonfile子模块: 读取和写入json和geojson文件。
geotools子模块: 转换地理坐标。
reconstruct模块: 处理3D重建软件项目。
Pix4D子模块: 处理Pix4D项目。
Metashape子模块: 处理Metashape项目。
visualize Module : Draw visualization figures for the output.
每一个模块都由一些底层函数(如 easyidp.geotiff.* )和一个高级封装的类(如 easyidp.GeoTiff )组成。大部分情况下,除非特别需要,请使用大写的高级封装的类而不是小写的底层函数
例如,下面这个函数可以用来读取geotiff的元信息:
>>> import easyidp as idp
>>> header = idp.geotiff.get_header("one_geotiff_file.tif")
但是大部分情况下更推荐使用高级封装:
>>> geo = idp.GeoTiff("one_geotiff_files.tif")
>>> header = geo.header
尽管看上去代码数量变多了,但是高级封装有更方便使用的函数,而不用关心具体的数据结构细节。大部分的例子也使用高级封装的类
小心
The easyidp.Container object, its child objects, and objects contains this object, like easyidp.ROI , ProjectPool , easyidp.Recons , easyidp.Pix4D , easyidp.Metashape, can not be saved by pickle.
Please check this link for more details What can be pickled and unpickled .