Skip to content

Commit

Permalink
update and enhance GeoTiff object documents
Browse files Browse the repository at this point in the history
1. Support #48
2. Also reorganize the function struture in geotiff.save_geotiff, to prepare GeoTiff.save_geotiff inner function for #46
  • Loading branch information
HowcanoeWang committed Dec 19, 2022
1 parent 4635271 commit dd5bf82
Show file tree
Hide file tree
Showing 12 changed files with 714 additions and 158 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/locale/zh_CN/LC_MESSAGES/python_api.po
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ msgstr ""
#: easyidp.geotiff.GeoTiff.crop:1:<autosummary>:1
#: easyidp.geotiff.GeoTiff.save_geotiff:1 of
msgid "Save cropped region to geotiff file"
msgstr "Geotiff文件的保存路径"
msgstr "保存切块的区域为Geotiff文件"

#: easyidp.geotiff.GeoTiff.crop:3 of
msgid ""
Expand Down Expand Up @@ -924,7 +924,7 @@ msgstr "读取las文件"

#: easyidp.pointcloud.read_las:3 of
msgid "The path to las file"
msgstr "Geotiff文件的路径"
msgstr "Las文件的路径"

#: easyidp.pointcloud.read_las:6 of
msgid "points, colors, normals of given point cloud data"
Expand Down
9 changes: 4 additions & 5 deletions docs/python_api/autodoc/easyidp.geotiff.GeoTiff.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
.. autosummary::

~GeoTiff.__init__
~GeoTiff.create_grid
~GeoTiff.crop
~GeoTiff.crop_polygon
~GeoTiff.crop_rectangle
~GeoTiff.crop_rois
~GeoTiff.geo2pixel
~GeoTiff.has_data
~GeoTiff.math_polygon
~GeoTiff.pixel2geo
~GeoTiff.point_query
~GeoTiff.polygon_math
~GeoTiff.read_geotiff
~GeoTiff.save
~GeoTiff.save_geotiff



Expand Down
6 changes: 6 additions & 0 deletions docs/python_api/autodoc/easyidp.geotiff.point_query.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
easyidp.geotiff.point\_query
============================

.. currentmodule:: easyidp.geotiff

.. autofunction:: point_query
6 changes: 6 additions & 0 deletions docs/python_api/autodoc/easyidp.geotiff.save_geotiff.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
easyidp.geotiff.save\_geotiff
=============================

.. currentmodule:: easyidp.geotiff

.. autofunction:: save_geotiff
4 changes: 2 additions & 2 deletions docs/python_api/cvtools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

.. currentmodule:: easyidp.cvtools

This is a package for simple imarray operations without scikit-image.
Mainly about creating binary masks from given polygon coordinates.
This is a package for simple imarray operations.
Mainly about creating binary masks and cropping image parts from given polygon coordinates.

It is a submodule for the ``GeoTiff`` class.

Expand Down
8 changes: 6 additions & 2 deletions docs/python_api/geotiff.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ A summary of class ``GeoTiff``
Functions
=========

This module (``easyidp.geotiff``) also contains the following standard-alone functions for preocessing GeoTiff file directly.

.. caution::

The :class:`easyidp.GeoTiff <easyidp.geotiff.GeoTiff>` class is an advanced wrapper around the following functions, which is generally sufficient for most simple application cases, please don't use the following functions unless you really need to.
The :class:`easyidp.GeoTiff <easyidp.geotiff.GeoTiff>` class is an advanced wrapper around the following functions, which is generally sufficient for most simple application cases, please don't use the following functions unless you really need them.

.. autosummary::
:toctree: autodoc
Expand All @@ -29,4 +31,6 @@ Functions
get_imarray
geo2pixel
pixel2geo
tifffile_crop
tifffile_crop
point_query
save_geotiff
2 changes: 1 addition & 1 deletion docs/python_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The EasyIDP package have the following modules:
- :doc:`Point cloud Module <./pointcloud>` : read, write, check and crop operation.
- :doc:`GeoTiff Module <./geotiff>` : read, write, crop, and statistics operation.

- :doc:`cvtools Submodule <./cvtools>` : processing ndarray images without install scikit-image.
- :doc:`cvtools Submodule <./cvtools>` : processing ndarray images.

- :doc:`ROI Module <./roi>` : read region of interest from shp and txt file.

Expand Down
2 changes: 1 addition & 1 deletion easyidp/cvtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def imarray_crop(imarray, polygon_hv, outside_value=0):


def poly2mask(image_shape, poly_coord, engine="skimage"):
"""convert vector polygon to raster masks, aim to avoid using skimage package
"""convert vector polygon to raster masks
Parameters
----------
Expand Down
Loading

0 comments on commit dd5bf82

Please sign in to comment.