API概述#
EasyIDP含有下面的几个模块
Data Module : Download and provide path to example files.
Point cloud Module : read, write, check and crop operation.
GeoTiff Module : read, write, crop, and statistics operation.
cvtools Submodule : processing ndarray images.
ROI Module : 从shp或txt文件中读取兴趣区域(ROI)
shp Submodule: read shape (*.shp) file.
jsonfile Submodule: read and write json and geojson file.
geotools Submodule: transform geo-coordinate.
reconstruct Module : process 3D reconstruction software project.
Pix4D Submodule: handle Pix4D projects.
Metashape Submodule: handle Metashape projects.
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 .