--- /srv/rebuilderd/tmp/rebuilderd55yl4o/inputs/python-laspy-doc_2.5.4-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderd55yl4o/out/python-laspy-doc_2.5.4-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2024-07-01 14:06:42.000000 debian-binary │ -rw-r--r-- 0 0 0 2932 2024-07-01 14:06:42.000000 control.tar.xz │ --rw-r--r-- 0 0 0 153564 2024-07-01 14:06:42.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 152924 2024-07-01 14:06:42.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./control │ │ │ @@ -1,13 +1,13 @@ │ │ │ Package: python-laspy-doc │ │ │ Source: python-laspy │ │ │ Version: 2.5.4-1 │ │ │ Architecture: all │ │ │ Maintainer: Debian Python Team │ │ │ -Installed-Size: 2043 │ │ │ +Installed-Size: 2002 │ │ │ Section: doc │ │ │ Priority: optional │ │ │ Multi-Arch: foreign │ │ │ Homepage: https://github.com/laspy/laspy │ │ │ Description: Library for working with LAS LiDAR files (Documentation) │ │ │ Laspy is a Python library for reading, modifying, and creating LAS LiDAR │ │ │ files. The ASPRS LAS format is a sequential binary file format used to store │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -69,45 +69,45 @@ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/_static/js/ │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2024-06-16 14:34:33.000000 ./usr/share/doc/python-laspy-doc/html/_static/minus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2024-06-16 14:34:33.000000 ./usr/share/doc/python-laspy-doc/html/_static/plus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 4929 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/_static/pygments.css │ │ │ -rw-r--r-- 0 root (0) root (0) 324 2024-06-19 17:10:25.000000 ./usr/share/doc/python-laspy-doc/html/_static/style.css │ │ │ -rw-r--r-- 0 root (0) root (0) 19505 2024-06-19 17:10:25.000000 ./usr/share/doc/python-laspy-doc/html/_static/tutorial_histogram.png │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/ │ │ │ --rw-r--r-- 0 root (0) root (0) 121261 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/index.html │ │ │ --rw-r--r-- 0 root (0) root (0) 46247 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.compression.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38564 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.copc.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14037 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.errors.html │ │ │ --rw-r--r-- 0 root (0) root (0) 47813 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.header.html │ │ │ --rw-r--r-- 0 root (0) root (0) 12780 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasappender.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41595 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasdata.html │ │ │ --rw-r--r-- 0 root (0) root (0) 10553 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasmmap.html │ │ │ --rw-r--r-- 0 root (0) root (0) 28460 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasreader.html │ │ │ --rw-r--r-- 0 root (0) root (0) 24614 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.laswriter.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41379 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lib.html │ │ │ --rw-r--r-- 0 root (0) root (0) 36399 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.point.format.html │ │ │ --rw-r--r-- 0 root (0) root (0) 41894 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.point.record.html │ │ │ --rw-r--r-- 0 root (0) root (0) 97861 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.known.html │ │ │ --rw-r--r-- 0 root (0) root (0) 14359 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.vlr.html │ │ │ --rw-r--r-- 0 root (0) root (0) 27819 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.vlrlist.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 119099 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/index.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 45635 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.compression.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 34713 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.copc.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13910 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.errors.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 42111 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.header.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 12040 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasappender.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38301 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasdata.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 10186 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasmmap.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 25891 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lasreader.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 21804 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.laswriter.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 39217 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.lib.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 32725 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.point.format.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 40561 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.point.record.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 90000 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.known.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 13638 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.vlr.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 24794 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.vlrlist.html │ │ │ -rw-r--r-- 0 root (0) root (0) 29595 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/basic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 6782 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/changelog.html.gz │ │ │ -rw-r--r-- 0 root (0) root (0) 35036 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/complete_tutorial.html │ │ │ -rw-r--r-- 0 root (0) root (0) 9128 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/contributing.html │ │ │ -rw-r--r-- 0 root (0) root (0) 42316 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/examples.html │ │ │ -rw-r--r-- 0 root (0) root (0) 62086 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/genindex.html │ │ │ -rw-r--r-- 0 root (0) root (0) 17168 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 14198 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/installation.html │ │ │ -rw-r--r-- 0 root (0) root (0) 23174 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/intro.html │ │ │ -rw-r--r-- 0 root (0) root (0) 19836 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/lessbasic.html │ │ │ -rw-r--r-- 0 root (0) root (0) 29947 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/migration.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3403 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/objects.inv │ │ │ -rw-r--r-- 0 root (0) root (0) 6495 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/py-modindex.html │ │ │ -rw-r--r-- 0 root (0) root (0) 4812 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/search.html │ │ │ --rw-r--r-- 0 root (0) root (0) 93236 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/searchindex.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 93243 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/searchindex.js │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc-base/ │ │ │ -rw-r--r-- 0 root (0) root (0) 262 2024-07-01 14:06:42.000000 ./usr/share/doc-base/python-laspy-doc.python-laspy-doc │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/_static/css/badge_only.css -> ../../../../../sphinx_rtd_theme/static/css/badge_only.css │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/_static/css/theme.css -> ../../../../../sphinx_rtd_theme/static/css/theme.css │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/_static/doctools.js -> ../../../../javascript/sphinxdoc/1.0/doctools.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/_static/fonts/Lato-Bold.ttf -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.ttf │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2024-07-01 14:06:42.000000 ./usr/share/doc/python-laspy-doc/html/_static/fonts/Lato-Bold.woff2 -> ../../../../../sphinx_rtd_theme/static/fonts/Lato-Bold.woff2 │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/index.html │ │ │ @@ -140,18 +140,18 @@ │ │ │ >>> las.classification │ │ │ <SubFieldView([1 1 1 ... 1 1 1])> │ │ │ │ │ │ │ │ │
│ │ │
Parameters:
│ │ │
    │ │ │ -
  • source (str or io.BytesIO) – The source to read data from

  • │ │ │ +
  • source (str or io.BytesIO) – The source to read data from

  • │ │ │
  • laz_backend (Optional, the backend to use when the file is as LAZ file.) – By default laspy will find the backend to use by itself. │ │ │ Use if you want a specific backend to be used

  • │ │ │ -
  • closefd (bool) – if True and the source is a stream, the function will close it │ │ │ +

  • closefd (bool) – if True and the source is a stream, the function will close it │ │ │ after it is done reading

  • │ │ │
  • decompression_selection (DecompressionSelection,) – see laspy.open()

  • │ │ │
│ │ │
│ │ │
Returns:
│ │ │

The object you can interact with to get access to the LAS points & VLRs

│ │ │
│ │ │ @@ -165,15 +165,15 @@ │ │ │
│ │ │ │ │ │ │ │ │
│ │ │

laspy.open

│ │ │
│ │ │
│ │ │ -laspy.open(source, mode='r', closefd=True, laz_backend=None, header=None, do_compress=None, encoding_errors: str = 'strict', read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES) LasReader | LasWriter | LasAppender
│ │ │ +laspy.open(source, mode='r', closefd=True, laz_backend=None, header=None, do_compress=None, encoding_errors: str = 'strict', read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES) LasReader | LasWriter | LasAppender │ │ │

The laspy.open opens a LAS/LAZ file in one of the 3 supported │ │ │ mode:

│ │ │
│ │ │
    │ │ │
  • “r” => Reading => a laspy.LasReader will be returned

  • │ │ │
  • “w” => Writing => a laspy.LasWriter will be returned

  • │ │ │
  • “a” => Appending => a laspy.LasAppender will be returned

  • │ │ │ @@ -203,39 +203,39 @@ │ │ │ >>> f.closed │ │ │ True │ │ │
│ │ │ │ │ │
│ │ │
Parameters:
│ │ │
    │ │ │ -
  • source (str or bytes or io.BytesIO) – if source is a str it must be a filename

  • │ │ │ +
  • source (str or bytes or io.BytesIO) – if source is a str it must be a filename

  • │ │ │
  • mode (Optional, the mode to open the file:) –

      │ │ │
    • “r” for reading (default)

    • │ │ │
    • ”w” for writing

    • │ │ │
    • ”a” for appending

    • │ │ │
    │ │ │

  • │ │ │
  • laz_backend (Optional, laspy.LazBackend, the LAZ backend to use to handle decompression/compression) – By default available backends are detected, see LazBackend to see the │ │ │ preference order when multiple backends are available

  • │ │ │
  • header (The header to use when opening in write mode.) –

  • │ │ │ -
  • do_compress (optional, bool, only meaningful in writing mode:) –

      │ │ │ +
    • do_compress (optional, bool, only meaningful in writing mode:) –

        │ │ │
      • None (default) guess if compression is needed using the file extension │ │ │ or if a laz_backend was explicitely provided

      • │ │ │
      • True compresses the file

      • │ │ │
      • False do not compress the file

      • │ │ │
      │ │ │

    • │ │ │ -
    • closefd (optional, bool, True by default) – Whether the stream/file object shall be closed, this only work │ │ │ +

    • closefd (optional, bool, True by default) – Whether the stream/file object shall be closed, this only work │ │ │ when using open_las in a with statement. An exception is raised if │ │ │ closefd is specified and the source is a filename

    • │ │ │ -
    • encoding_errors (str, default 'strict') – Only used in writing and appending mode. │ │ │ +

    • encoding_errors (str, default 'strict') – Only used in writing and appending mode. │ │ │ How encoding errors should be treated. │ │ │ Possible values and their explanation can be seen here: │ │ │ https://docs.python.org/3/library/codecs.html#error-handlers.

    • │ │ │ -
    • read_evlrs (bool, default True) –

      Only applies to ‘r’ mode.

      │ │ │ +
    • read_evlrs (bool, default True) –

      Only applies to ‘r’ mode.

      │ │ │

      If True the evlrs will be read during the __init__ / file opening │ │ │ along with the LasHeader.

      │ │ │

      It is fine for most of the cases, │ │ │ but can be problematic when opening file from a data stream like │ │ │ AWS S3 as EVLRs are located at the end of the files, thus │ │ │ will require to pull the whole file.

      │ │ │

      Does nothing if the input file does not support │ │ │ @@ -254,15 +254,15 @@ │ │ │

│ │ │ │ │ │
│ │ │
│ │ │

laspy.create

│ │ │
│ │ │
│ │ │ -laspy.create(*, point_format: PointFormat | int | None = None, file_version: Version | str | None = None)
│ │ │ +laspy.create(*, point_format: PointFormat | int | None = None, file_version: Version | str | None = None) │ │ │

Function to create a new empty las data object

│ │ │
│ │ │

Note

│ │ │

If you provide both point_format and file_version │ │ │ an exception will be raised if they are not compatible

│ │ │
│ │ │
>>> las = create_las(point_format=6,file_version="1.2")
│ │ │ @@ -343,16 +343,16 @@
│ │ │  laspy.errors.LaspyException: Point format 6 is not compatible with file version 1.2
│ │ │  
│ │ │
│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │
  • source_las (laspy.lasdatas.base.LasBase) – The source data to be converted

  • │ │ │ -
  • point_format_id (int, optional) – The new point format id (the default is None, which won’t change the source format id)

  • │ │ │ -
  • file_version (str, optional,) – The new file version. None by default which means that the file_version │ │ │ +

  • point_format_id (int, optional) – The new point format id (the default is None, which won’t change the source format id)

  • │ │ │ +
  • file_version (str, optional,) – The new file version. None by default which means that the file_version │ │ │ may be upgraded for compatibility with the new point_format. The file version will not │ │ │ be downgraded.

  • │ │ │
│ │ │
│ │ │
Return type:
│ │ │

laspy.lasdatas.base.LasBase

│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -50,31 +50,31 @@ │ │ │ │ || GGPPSS__TTIIMMEE || RRGGBB || NNIIRR || WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS)_ │ │ │ │ Entry point for reading las data in laspy │ │ │ │ Reads the whole file into memory. │ │ │ │ >>> las = read_las("tests/data/simple.las") │ │ │ │ >>> las.classification │ │ │ │ │ │ │ │ Parameters: │ │ │ │ - * ssoouurrccee (_ss_tt_rr oorr _ii_oo_.._BB_yy_tt_ee_ss_II_OO) – The source to read data from │ │ │ │ + * ssoouurrccee (ssttrr oorr iioo..BByytteessIIOO) – The source to read data from │ │ │ │ * llaazz__bbaacckkeenndd (OOppttiioonnaall,, tthhee bbaacckkeenndd ttoo uussee wwhheenn tthhee ffiillee iiss aass │ │ │ │ LLAAZZ ffiillee..) – By default laspy will find the backend to use by │ │ │ │ itself. Use if you want a specific backend to be used │ │ │ │ - * cclloosseeffdd (_bb_oo_oo_ll) – if True and the source is a stream, the │ │ │ │ + * cclloosseeffdd (bbooooll) – if True and the source is a stream, the │ │ │ │ function will close it after it is done reading │ │ │ │ * ddeeccoommpprreessssiioonn__sseelleeccttiioonn (_DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn,,) – see │ │ │ │ _l_a_s_p_y_._o_p_e_n_(_) │ │ │ │ Returns: │ │ │ │ The object you can interact with to get access to the LAS points & │ │ │ │ VLRs │ │ │ │ Return type: │ │ │ │ laspy.LasData │ │ │ │ New in version 2.4: The decompression_selection parameter. │ │ │ │ ******** llaassppyy..ooppeenn_? ******** │ │ │ │ laspy.open(ssoouurrccee, mmooddee==''rr'', cclloosseeffdd==TTrruuee, llaazz__bbaacckkeenndd==NNoonnee, hheeaaddeerr==NNoonnee, │ │ │ │ - ddoo__ccoommpprreessss==NNoonnee, eennccooddiinngg__eerrrroorrss:: _ss_tt_rr == ''ssttrriicctt'', rreeaadd__eevvllrrss:: _bb_oo_oo_ll == TTrruuee, │ │ │ │ + ddoo__ccoommpprreessss==NNoonnee, eennccooddiinngg__eerrrroorrss:: ssttrr == ''ssttrriicctt'', rreeaadd__eevvllrrss:: bbooooll == TTrruuee, │ │ │ │ ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == │ │ │ │ DDeeccoommpprreessssiioonnSSeelleeccttiioonn..XXYY__RREETTUURRNNSS__CCHHAANNNNEELL || ZZ || CCLLAASSSSIIFFIICCAATTIIOONN || FFLLAAGGSS || │ │ │ │ IINNTTEENNSSIITTYY || SSCCAANN__AANNGGLLEE || UUSSEERR__DDAATTAA || PPOOIINNTT__SSOOUURRCCEE__IIDD || GGPPSS__TTIIMMEE || RRGGBB || NNIIRR || │ │ │ │ WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS) → _L_a_s_R_e_a_d_e_r | _L_a_s_W_r_i_t_e_r | _L_a_s_A_p_p_e_n_d_e_r_ │ │ │ │ The laspy.open opens a LAS/LAZ file in one of the 3 supported mode: │ │ │ │ * “r” => Reading => a laspy.LasReader will be returned │ │ │ │ * “w” => Writing => a laspy.LasWriter will be returned │ │ │ │ @@ -94,16 +94,16 @@ │ │ │ │ True │ │ │ │ >>> f = open('tests/data/simple.las', mode='rb') │ │ │ │ >>> with open_las(f) as flas: │ │ │ │ ... las = flas.read() │ │ │ │ >>> f.closed │ │ │ │ True │ │ │ │ ******** llaassppyy..ccrreeaattee_? ******** │ │ │ │ - laspy.create(**, ppooiinntt__ffoorrmmaatt:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt || _ii_nn_tt || _NN_oo_nn_ee == NNoonnee, ffiillee__vveerrssiioonn:: │ │ │ │ - VVeerrssiioonn || _ss_tt_rr || _NN_oo_nn_ee == NNoonnee)_ │ │ │ │ + laspy.create(**, ppooiinntt__ffoorrmmaatt:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt || iinntt || NNoonnee == NNoonnee, ffiillee__vveerrssiioonn:: │ │ │ │ + VVeerrssiioonn || ssttrr || NNoonnee == NNoonnee)_ │ │ │ │ Function to create a new empty las data object │ │ │ │ Note │ │ │ │ If you provide both point_format and file_version an exception will be │ │ │ │ raised if they are not compatible │ │ │ │ >>> las = create_las(point_format=6,file_version="1.2") │ │ │ │ Traceback (most recent call last): │ │ │ │ ... │ │ │ │ @@ -161,18 +161,18 @@ │ │ │ │ Traceback (most recent call last): │ │ │ │ ... │ │ │ │ laspy.errors.LaspyException: Point format 6 is not compatible with file │ │ │ │ version 1.2 │ │ │ │ Parameters: │ │ │ │ * ssoouurrccee__llaass (llaassppyy..llaassddaattaass..bbaassee..LLaassBBaassee) – The source data to │ │ │ │ be converted │ │ │ │ - * ppooiinntt__ffoorrmmaatt__iidd (_ii_nn_tt,, ooppttiioonnaall) – The new point format id │ │ │ │ + * ppooiinntt__ffoorrmmaatt__iidd (iinntt,, ooppttiioonnaall) – The new point format id │ │ │ │ (the default is None, which won’t change the source format │ │ │ │ id) │ │ │ │ - * ffiillee__vveerrssiioonn (_ss_tt_rr,, ooppttiioonnaall,,) – The new file version. None by │ │ │ │ + * ffiillee__vveerrssiioonn (ssttrr,, ooppttiioonnaall,,) – The new file version. None by │ │ │ │ default which means that the file_version may be upgraded for │ │ │ │ compatibility with the new point_format. The file version │ │ │ │ will not be downgraded. │ │ │ │ Return type: │ │ │ │ laspy.lasdatas.base.LasBase │ │ │ │ ********** RRee--eexxppoorrtteedd ccllaasssseess_? ********** │ │ │ │ * _L_a_s_H_e_a_d_e_r │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.compression.html │ │ │ @@ -115,15 +115,15 @@ │ │ │
│ │ │

laspy.compression module

│ │ │
│ │ │

LazBackend

│ │ │
│ │ │
│ │ │ class laspy.compression.LazBackend(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
│ │ │ -

Bases: ILazBackend, Enum

│ │ │ +

Bases: ILazBackend, Enum

│ │ │

Supported backends for reading and writing LAS/LAZ

│ │ │
│ │ │
│ │ │ LazrsParallel = 0
│ │ │

lazrs in multi-thread mode

│ │ │
│ │ │ │ │ │ @@ -137,28 +137,28 @@ │ │ │
│ │ │ Laszip = 2
│ │ │

laszip backend

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -classmethod detect_available() Tuple[LazBackend, ...][source]
│ │ │ +classmethod detect_available() Tuple[LazBackend, ...][source] │ │ │

Returns a tuple containing the available backends in the current │ │ │ python environment

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │

DecompressionSelection

│ │ │
│ │ │
│ │ │ class laspy.compression.DecompressionSelection(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
│ │ │ -

Bases: IntFlag

│ │ │ +

Bases: IntFlag

│ │ │

Holds which fields to decompress or not.

│ │ │

Only used for files with version >= 1.4 && point format id >= 6.

│ │ │

Ignored on other cases.

│ │ │

Each flag in the enum has a corresponding decompress_$name and │ │ │ skip_$name methods to easily create a selection.

│ │ │
>>> import laspy
│ │ │  >>> # Creating a selection that decompresses the base + z field
│ │ │ @@ -281,20 +281,20 @@
│ │ │  
│ │ │
│ │ │ to_lazrs() lazrs.DecompressionSelection[source]
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -to_laszip() int[source]
│ │ │ +to_laszip() int[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -is_set(mask) bool
│ │ │ +is_set(mask) bool │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ decompress_all_extra_bytes()
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -36,30 +36,30 @@ │ │ │ │ * laspy.compression module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..ccoommpprreessssiioonn mmoodduullee_? ************ │ │ │ │ ********** LLaazzBBaacckkeenndd_? ********** │ │ │ │ ccllaassss laspy.compression.LazBackend(vvaalluuee, nnaammeess==<>, **vvaalluueess, │ │ │ │ mmoodduullee==NNoonnee, qquuaallnnaammee==NNoonnee, ttyyppee==NNoonnee, ssttaarrtt==11, bboouunnddaarryy==NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: ILazBackend, _E_n_u_m │ │ │ │ + Bases: ILazBackend, Enum │ │ │ │ Supported backends for reading and writing LAS/LAZ │ │ │ │ LazrsParallel == 00_ │ │ │ │ lazrs in multi-thread mode │ │ │ │ Lazrs == 11_ │ │ │ │ lazrs in single-thread mode │ │ │ │ Laszip == 22_ │ │ │ │ laszip backend │ │ │ │ - ccllaassssmmeetthhoodd detect_available() → _T_u_p_l_e[_L_a_z_B_a_c_k_e_n_d, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ + ccllaassssmmeetthhoodd detect_available() → Tuple[_L_a_z_B_a_c_k_e_n_d, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ Returns a tuple containing the available backends in the current │ │ │ │ python environment │ │ │ │ ********** DDeeccoommpprreessssiioonnSSeelleeccttiioonn_? ********** │ │ │ │ ccllaassss laspy.compression.DecompressionSelection(vvaalluuee, nnaammeess==<>, │ │ │ │ **vvaalluueess, mmoodduullee==NNoonnee, qquuaallnnaammee==NNoonnee, ttyyppee==NNoonnee, ssttaarrtt==11, bboouunnddaarryy==NNoonnee) │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _I_n_t_F_l_a_g │ │ │ │ + Bases: IntFlag │ │ │ │ Holds which fields to decompress or not. │ │ │ │ Only used for files with version >= 1.4 && point format id >= 6. │ │ │ │ Ignored on other cases. │ │ │ │ Each flag in the enum has a corresponding decompress_$name and skip_$name │ │ │ │ methods to easily create a selection. │ │ │ │ >>> import laspy │ │ │ │ >>> # Creating a selection that decompresses the base + z field │ │ │ │ @@ -108,16 +108,16 @@ │ │ │ │ ccllaassssmmeetthhoodd base() → _D_e_c_o_m_p_r_e_s_s_i_o_n_S_e_l_e_c_t_i_o_n_[_s_o_u_r_c_e_]_ │ │ │ │ Returns a decompression selection where only the base x, y, return │ │ │ │ number, number of returns and scanner channel will be decompressed │ │ │ │ ccllaassssmmeetthhoodd xy_returns_channel() → _D_e_c_o_m_p_r_e_s_s_i_o_n_S_e_l_e_c_t_i_o_n_[_s_o_u_r_c_e_]_ │ │ │ │ Returns a decompression selection where only the base x, y, return │ │ │ │ number, number of returns and scanner channel will be decompressed │ │ │ │ to_lazrs() → lazrs.DecompressionSelection_[_s_o_u_r_c_e_]_ │ │ │ │ - to_laszip() → _i_n_t_[_s_o_u_r_c_e_]_ │ │ │ │ - is_set(mmaasskk) → _b_o_o_l_ │ │ │ │ + to_laszip() → int_[_s_o_u_r_c_e_]_ │ │ │ │ + is_set(mmaasskk) → bool_ │ │ │ │ decompress_all_extra_bytes()_ │ │ │ │ skip_all_extra_bytes()_ │ │ │ │ is_set_all_extra_bytes()_ │ │ │ │ decompress_classification()_ │ │ │ │ skip_classification()_ │ │ │ │ is_set_classification()_ │ │ │ │ decompress_flags()_ │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.copc.html │ │ │ @@ -113,16 +113,16 @@ │ │ │ │ │ │
│ │ │

laspy.copc module

│ │ │
│ │ │

CopcReader

│ │ │
│ │ │
│ │ │ -class laspy.copc.CopcReader(stream, close_fd: bool = True, http_num_threads: int = 30, _http_strategy: str = 'queue', decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source]
│ │ │ -

Bases: object

│ │ │ +class laspy.copc.CopcReader(stream, close_fd: bool = True, http_num_threads: int = 160, _http_strategy: str = 'queue', decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source] │ │ │ +

Bases: object

│ │ │

Class allowing to do queries over a COPC LAZ

│ │ │

In short, COPC files are LAZ 1.4 files organized in a particular way │ │ │ (Octree) making it possible to do spatial queries │ │ │ as well as queries with a level of details.

│ │ │

CopcReader requires the lazrz backend to work.

│ │ │

Optionaly, if requests is installed, CopcReader can handle │ │ │ Copc files that are on a remote HTTP server

│ │ │ @@ -131,52 +131,52 @@ │ │ │

To create an instance of it you’ll likely │ │ │ want to use the CopcReader.open() constructor

│ │ │
│ │ │

New in version 2.2.

│ │ │
│ │ │
│ │ │
│ │ │ -__init__(stream, close_fd: bool = True, http_num_threads: int = 30, _http_strategy: str = 'queue', decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source]
│ │ │ +__init__(stream, close_fd: bool = True, http_num_threads: int = 160, _http_strategy: str = 'queue', decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source] │ │ │

Creates a CopcReader.

│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │
  • stream (the stream from where data can be read.) – It must have the following file object methods: │ │ │ read, seek, tell

  • │ │ │ -
  • http_num_threads (int, optional, default num cpu * 5) – Number of worker threads to do concurent HTTP requests, │ │ │ +

  • http_num_threads (int, optional, default num cpu * 5) – Number of worker threads to do concurent HTTP requests, │ │ │ ignored when reading non-HTTP file

  • │ │ │
  • close_fd (optional, default bool) – Whether the stream/file object shall be closed, this only work │ │ │ when using the CopcReader in a with statement.

  • │ │ │
  • decompression_selection (DecompressionSelection,) – see laspy.open()

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │

New in version 2.4: The decompression_selection parameter.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -classmethod open(source: str | PathLike | IOBase, http_num_threads: int = 30, _http_strategy: str = 'queue', decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES) CopcReader[source]
│ │ │ +classmethod open(source: str | PathLike | IOBase, http_num_threads: int = 160, _http_strategy: str = 'queue', decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES) CopcReader[source] │ │ │

Opens the COPC file.

│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │ -
  • source (str, io.IOBase, uri or file-like object of the COPC file.) –

    Supported sources are:

    │ │ │ +
  • source (str, io.IOBase, uri or file-like object of the COPC file.) –

    Supported sources are:

    │ │ │
    │ │ │
      │ │ │
    • ’local’ files accesible with a path.

    • │ │ │
    • HTTP / HTTPS endpoints. The pyhon package requests is │ │ │ required in order to be able to work with HTTP endpoints.

    • │ │ │
    • file-like objects, e.g. fsspec io.IOBase objects.

    • │ │ │
    │ │ │
    │ │ │

  • │ │ │ -
  • http_num_threads (int, optional, default num cpu * 5) – Number of worker threads to do concurent HTTP requests, │ │ │ +

  • http_num_threads (int, optional, default num cpu * 5) – Number of worker threads to do concurent HTTP requests, │ │ │ ignored when reading non-HTTP file

  • │ │ │
  • decompression_selection (DecompressionSelection,) – see laspy.open()

  • │ │ │
│ │ │
│ │ │
│ │ │

Opening a local file

│ │ │
from laspy import CopcReader
│ │ │ @@ -197,34 +197,34 @@
│ │ │  
│ │ │

New in version 2.4: The decompression_selection parameter.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -query(bounds: Bounds | None = None, resolution: float | int | None = None, level: int | range | None = None) ScaleAwarePointRecord[source]
│ │ │ +query(bounds: Bounds | None = None, resolution: float | int | None = None, level: int | range | None = None) ScaleAwarePointRecord[source] │ │ │

” │ │ │ Query the COPC file to retrieve the points matching the │ │ │ requested bounds and level.

│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │
  • bounds (Bounds, optional, default None) – The bounds for which you wish to aquire points. │ │ │ If None, the whole file’s bounds will be considered │ │ │ 2D bounds are suported, (No point will be filtered on its Z coordinate)

  • │ │ │ -
  • resolution (float or int, optional, default None) –

    Limits the octree levels to be queried in order to have │ │ │ +

  • resolution (float or int, optional, default None) –

    Limits the octree levels to be queried in order to have │ │ │ a point cloud with the requested resolution.

    │ │ │
      │ │ │
    • The unit is the one of the data.

    • │ │ │
    • If None, the resulting cloud will be at the │ │ │ full resolution offered by the COPC source

    • │ │ │
    • Mutually exclusive with level parameter

    • │ │ │
    │ │ │

  • │ │ │ -
  • level (int or range, optional, default None) –

    The level of detail (LOD).

    │ │ │ +
  • level (int or range, optional, default None) –

    The level of detail (LOD).

    │ │ │
      │ │ │
    • If None, all LOD are going to be considered

    • │ │ │
    • If it is an int, only points that are of the requested LOD │ │ │ will be returned.

    • │ │ │
    • If it is a range, points for which the LOD is within the range │ │ │ will be returned

    • │ │ │
    │ │ │ @@ -237,41 +237,41 @@ │ │ │
    │ │ │
    │ │ │ spatial_query(bounds: Bounds) ScaleAwarePointRecord[source]
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ -level_query(level: int | range) ScaleAwarePointRecord[source]
    │ │ │ +level_query(level: int | range) ScaleAwarePointRecord[source] │ │ │
    │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ class laspy.copc.Bounds(mins: numpy.ndarray, maxs: numpy.ndarray)[source]
│ │ │ -

Bases: object

│ │ │ +

Bases: object

│ │ │
│ │ │
│ │ │ -__init__(mins: ndarray, maxs: ndarray) None
│ │ │ +__init__(mins: ndarray, maxs: ndarray) None │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ mins: ndarray
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ maxs: ndarray
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -overlaps(other: Bounds) bool[source]
│ │ │ +overlaps(other: Bounds) bool[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ ensure_3d(mins: ndarray, maxs: ndarray) Bounds[source]
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -33,54 +33,54 @@ │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.copc module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..ccooppcc mmoodduullee_? ************ │ │ │ │ ********** CCooppccRReeaaddeerr_? ********** │ │ │ │ - ccllaassss laspy.copc.CopcReader(ssttrreeaamm, cclloossee__ffdd:: _bb_oo_oo_ll == TTrruuee, hhttttpp__nnuumm__tthhrreeaaddss:: │ │ │ │ - _ii_nn_tt == 3300, __hhttttpp__ssttrraatteeggyy:: _ss_tt_rr == ''qquueeuuee'', ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: │ │ │ │ + ccllaassss laspy.copc.CopcReader(ssttrreeaamm, cclloossee__ffdd:: bbooooll == TTrruuee, hhttttpp__nnuumm__tthhrreeaaddss:: │ │ │ │ + iinntt == 116600, __hhttttpp__ssttrraatteeggyy:: ssttrr == ''qquueeuuee'', ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: │ │ │ │ _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == DDeeccoommpprreessssiioonnSSeelleeccttiioonn..XXYY__RREETTUURRNNSS__CCHHAANNNNEELL || ZZ || │ │ │ │ CCLLAASSSSIIFFIICCAATTIIOONN || FFLLAAGGSS || IINNTTEENNSSIITTYY || SSCCAANN__AANNGGLLEE || UUSSEERR__DDAATTAA || PPOOIINNTT__SSOOUURRCCEE__IIDD │ │ │ │ || GGPPSS__TTIIMMEE || RRGGBB || NNIIRR || WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + Bases: object │ │ │ │ Class allowing to do queries over a _C_O_P_C LAZ │ │ │ │ In short, COPC files are LAZ 1.4 files organized in a particular way │ │ │ │ (Octree) making it possible to do spatial queries as well as queries with │ │ │ │ a level of details. │ │ │ │ CopcReader rreeqquuiirreess the lazrz backend to work. │ │ │ │ Optionaly, if requests is installed, CopcReader can handle Copc files │ │ │ │ that are on a remote HTTP server │ │ │ │ This class oonnllyy reads COPC files, it does not support normal LAS/LAZ │ │ │ │ files. │ │ │ │ To create an instance of it you’ll likely want to use the _C_o_p_c_R_e_a_d_e_r_._o_p_e_n │ │ │ │ _(_) constructor │ │ │ │ New in version 2.2. │ │ │ │ - __init__(ssttrreeaamm, cclloossee__ffdd:: _bb_oo_oo_ll == TTrruuee, hhttttpp__nnuumm__tthhrreeaaddss:: _ii_nn_tt == 3300, │ │ │ │ - __hhttttpp__ssttrraatteeggyy:: _ss_tt_rr == ''qquueeuuee'', ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: │ │ │ │ + __init__(ssttrreeaamm, cclloossee__ffdd:: bbooooll == TTrruuee, hhttttpp__nnuumm__tthhrreeaaddss:: iinntt == 116600, │ │ │ │ + __hhttttpp__ssttrraatteeggyy:: ssttrr == ''qquueeuuee'', ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: │ │ │ │ _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == DDeeccoommpprreessssiioonnSSeelleeccttiioonn..XXYY__RREETTUURRNNSS__CCHHAANNNNEELL || ZZ │ │ │ │ || CCLLAASSSSIIFFIICCAATTIIOONN || FFLLAAGGSS || IINNTTEENNSSIITTYY || SSCCAANN__AANNGGLLEE || UUSSEERR__DDAATTAA || │ │ │ │ PPOOIINNTT__SSOOUURRCCEE__IIDD || GGPPSS__TTIIMMEE || RRGGBB || NNIIRR || WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS) │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ │ │ Creates a CopcReader. │ │ │ │ Parameters: │ │ │ │ * ssttrreeaamm (tthhee ssttrreeaamm ffrroomm wwhheerree ddaattaa ccaann bbee rreeaadd..) – It │ │ │ │ must have the following file object methods: read, │ │ │ │ seek, tell │ │ │ │ - * hhttttpp__nnuumm__tthhrreeaaddss (_ii_nn_tt,, ooppttiioonnaall,, ddeeffaauulltt nnuumm ccppuu ** 55) – │ │ │ │ + * hhttttpp__nnuumm__tthhrreeaaddss (iinntt,, ooppttiioonnaall,, ddeeffaauulltt nnuumm ccppuu ** 55) – │ │ │ │ Number of worker threads to do concurent HTTP requests, │ │ │ │ ignored when reading non-HTTP file │ │ │ │ * cclloossee__ffdd (ooppttiioonnaall,, ddeeffaauulltt bbooooll) – Whether the stream/ │ │ │ │ file object shall be closed, this only work when using │ │ │ │ the CopcReader in a with statement. │ │ │ │ * ddeeccoommpprreessssiioonn__sseelleeccttiioonn (_DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn,,) – see │ │ │ │ _l_a_s_p_y_._o_p_e_n_(_) │ │ │ │ New in version 2.4: The decompression_selection parameter. │ │ │ │ - ccllaassssmmeetthhoodd open(ssoouurrccee:: _ss_tt_rr || _PP_aa_tt_hh_LL_ii_kk_ee || _II_OO_BB_aa_ss_ee, hhttttpp__nnuumm__tthhrreeaaddss:: _ii_nn_tt │ │ │ │ - == 3300, __hhttttpp__ssttrraatteeggyy:: _ss_tt_rr == ''qquueeuuee'', ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: │ │ │ │ + ccllaassssmmeetthhoodd open(ssoouurrccee:: ssttrr || PPaatthhLLiikkee || IIOOBBaassee, hhttttpp__nnuumm__tthhrreeaaddss:: iinntt │ │ │ │ + == 116600, __hhttttpp__ssttrraatteeggyy:: ssttrr == ''qquueeuuee'', ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: │ │ │ │ _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == DDeeccoommpprreessssiioonnSSeelleeccttiioonn..XXYY__RREETTUURRNNSS__CCHHAANNNNEELL || ZZ │ │ │ │ || CCLLAASSSSIIFFIICCAATTIIOONN || FFLLAAGGSS || IINNTTEENNSSIITTYY || SSCCAANN__AANNGGLLEE || UUSSEERR__DDAATTAA || │ │ │ │ PPOOIINNTT__SSOOUURRCCEE__IIDD || GGPPSS__TTIIMMEE || RRGGBB || NNIIRR || WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS) │ │ │ │ → _C_o_p_c_R_e_a_d_e_r_[_s_o_u_r_c_e_]_ │ │ │ │ Opens the COPC file. │ │ │ │ Opening a local file │ │ │ │ from laspy import CopcReader │ │ │ │ @@ -91,25 +91,25 @@ │ │ │ │ from laspy import CopcReader │ │ │ │ │ │ │ │ url = "https://s3.amazonaws.com/hobu-lidar/autzen- │ │ │ │ classified.copc.laz" │ │ │ │ with CopcReader.open(url) as reader: │ │ │ │ ... │ │ │ │ New in version 2.4: The decompression_selection parameter. │ │ │ │ - query(bboouunnddss:: _BB_oo_uu_nn_dd_ss || _NN_oo_nn_ee == NNoonnee, rreessoolluuttiioonn:: _ff_ll_oo_aa_tt || _ii_nn_tt || _NN_oo_nn_ee == │ │ │ │ - NNoonnee, lleevveell:: _ii_nn_tt || _rr_aa_nn_gg_ee || _NN_oo_nn_ee == NNoonnee) → _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d │ │ │ │ + query(bboouunnddss:: _BB_oo_uu_nn_dd_ss || NNoonnee == NNoonnee, rreessoolluuttiioonn:: ffllooaatt || iinntt || NNoonnee == │ │ │ │ + NNoonnee, lleevveell:: iinntt || rraannggee || NNoonnee == NNoonnee) → _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ │ │ ” Query the COPC file to retrieve the points matching the requested │ │ │ │ bounds and level. │ │ │ │ spatial_query(bboouunnddss:: _BB_oo_uu_nn_dd_ss) → _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d_[_s_o_u_r_c_e_]_ │ │ │ │ - level_query(lleevveell:: _ii_nn_tt || _rr_aa_nn_gg_ee) → _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d_[_s_o_u_r_c_e_]_ │ │ │ │ + level_query(lleevveell:: iinntt || rraannggee) → _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d_[_s_o_u_r_c_e_]_ │ │ │ │ ccllaassss laspy.copc.Bounds(mmiinnss:: nnuummppyy..nnddaarrrraayy, mmaaxxss:: nnuummppyy..nnddaarrrraayy)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ - __init__(mmiinnss:: nnddaarrrraayy, mmaaxxss:: nnddaarrrraayy) → _N_o_n_e_ │ │ │ │ + Bases: object │ │ │ │ + __init__(mmiinnss:: nnddaarrrraayy, mmaaxxss:: nnddaarrrraayy) → None_ │ │ │ │ mins:: nnddaarrrraayy_ │ │ │ │ maxs:: nnddaarrrraayy_ │ │ │ │ - overlaps(ootthheerr:: _BB_oo_uu_nn_dd_ss) → _b_o_o_l_[_s_o_u_r_c_e_]_ │ │ │ │ + overlaps(ootthheerr:: _BB_oo_uu_nn_dd_ss) → bool_[_s_o_u_r_c_e_]_ │ │ │ │ ensure_3d(mmiinnss:: nnddaarrrraayy, mmaaxxss:: nnddaarrrraayy) → _B_o_u_n_d_s_[_s_o_u_r_c_e_]_ │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.errors.html │ │ │ @@ -118,15 +118,15 @@ │ │ │ │ │ │
│ │ │

laspy.errors module

│ │ │

All the custom exceptions types

│ │ │
│ │ │
│ │ │ exception laspy.errors.LaspyException[source]
│ │ │ -

Bases: Exception

│ │ │ +

Bases: Exception

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ exception laspy.errors.UnknownExtraType[source]
│ │ │

Bases: LaspyException

│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -39,15 +39,15 @@ │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.errors module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..eerrrroorrss mmoodduullee_? ************ │ │ │ │ All the custom exceptions types │ │ │ │ eexxcceeppttiioonn laspy.errors.LaspyException_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _E_x_c_e_p_t_i_o_n │ │ │ │ + Bases: Exception │ │ │ │ eexxcceeppttiioonn laspy.errors.UnknownExtraType_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _L_a_s_p_y_E_x_c_e_p_t_i_o_n │ │ │ │ eexxcceeppttiioonn laspy.errors.PointFormatNotSupported_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _L_a_s_p_y_E_x_c_e_p_t_i_o_n │ │ │ │ eexxcceeppttiioonn laspy.errors.FileVersionNotSupported_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _L_a_s_p_y_E_x_c_e_p_t_i_o_n │ │ │ │ eexxcceeppttiioonn laspy.errors.LazError_[_s_o_u_r_c_e_]_ │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.header.html │ │ │ @@ -113,16 +113,16 @@ │ │ │ │ │ │
│ │ │

laspy.header module

│ │ │
│ │ │

LasHeader

│ │ │
│ │ │
│ │ │ -class laspy.header.LasHeader(*, version: Version | str | None = None, point_format: PointFormat | int | None = None)[source]
│ │ │ -

Bases: object

│ │ │ +class laspy.header.LasHeader(*, version: Version | str | None = None, point_format: PointFormat | int | None = None)[source] │ │ │ +

Bases: object

│ │ │

Contains the information from the header of as LAS file │ │ │ with ‘implementation’ field left out and ‘users’ field │ │ │ stored in more ergonomic classes.

│ │ │

This header also contains the VLRs

│ │ │

Examples

│ │ │

Creating a default header:

│ │ │
>>> header = LasHeader()
│ │ │ @@ -151,48 +151,48 @@
│ │ │  
│ │ │ DEFAULT_POINT_FORMAT = <PointFormat(3, 0 bytes of extra dims)>
│ │ │

The default point format Used when None is given to init

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -file_source_id: int
│ │ │ +file_source_id: int │ │ │

File source id

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -uuid: UUID
│ │ │ +uuid: UUID │ │ │

Project ID │ │ │ Initialized to null UUID

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -system_identifier: str | bytes
│ │ │ +system_identifier: str | bytes │ │ │

System identifier │ │ │ Initialized to ‘OTHER’

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -generating_software: str | bytes
│ │ │ +generating_software: str | bytes │ │ │

The software which generated the file │ │ │ Initialized to ‘laspy’

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -creation_date: date | None
│ │ │ +creation_date: date | None │ │ │

Day the file was created, initialized to date.today

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -point_count: int
│ │ │ +point_count: int │ │ │

The number of points in the file

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ scales: ndarray
│ │ │

The numbers used to scale the x,y,z coordinates

│ │ │ @@ -209,46 +209,46 @@ │ │ │ number_of_points_by_return: ndarray │ │ │

Number of points by return │ │ │ for las <= 1.2 only the first 5 elements matters

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -extra_header_bytes: bytes
│ │ │ +extra_header_bytes: bytes │ │ │

Extra bytes between end of header and first vlrs

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -extra_vlr_bytes: bytes
│ │ │ +extra_vlr_bytes: bytes │ │ │

Extra bytes between end of vlr end first point

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -start_of_waveform_data_packet_record: int
│ │ │ +start_of_waveform_data_packet_record: int │ │ │

Las >= 1.3

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -start_of_first_evlr: int
│ │ │ +start_of_first_evlr: int │ │ │

Las >= 1.4 │ │ │ Offset to the first evlr in the file

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -number_of_evlrs: int
│ │ │ +number_of_evlrs: int │ │ │

The number of evlrs in the file

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -evlrs: VLRList | None
│ │ │ +evlrs: VLRList | None │ │ │

EVLRs, even though they are not stored in the ‘header’ │ │ │ part of the file we keep them in this class │ │ │ as they contain same information as vlr. │ │ │ None when the file does not support EVLR

│ │ │
│ │ │ │ │ │
│ │ │ @@ -261,90 +261,90 @@ │ │ │
│ │ │ property version: Version
│ │ │

The version

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property x_scale: float
│ │ │ +property x_scale: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property y_scale: float
│ │ │ +property y_scale: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property z_scale: float
│ │ │ +property z_scale: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property x_offset: float
│ │ │ +property x_offset: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property y_offset: float
│ │ │ +property y_offset: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property z_offset: float
│ │ │ +property z_offset: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property x_max: float
│ │ │ +property x_max: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property y_max: float
│ │ │ +property y_max: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property z_max: float
│ │ │ +property z_max: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property x_min: float
│ │ │ +property x_min: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property y_min: float
│ │ │ +property y_min: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property z_min: float
│ │ │ +property z_min: float │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ property vlrs: VLRList
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -add_extra_dims(params: List[ExtraBytesParams]) None[source]
│ │ │ +add_extra_dims(params: List[ExtraBytesParams]) None[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ add_extra_dim(params: ExtraBytesParams)[source]
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -add_crs(crs: pyproj.CRS, keep_compatibility: bool = True) None[source]
│ │ │ +add_crs(crs: pyproj.CRS, keep_compatibility: bool = True) None[source] │ │ │

Add a Coordinate Reference System VLR from a pyproj CRS object.

│ │ │

The type of VLR created depends on the las version and point format │ │ │ version. Las version >= 1.4 use WKT string, las version < 1.4 and point │ │ │ format < 6 use GeoTiff tags.

│ │ │
│ │ │

Warning

│ │ │

This requires pyproj.

│ │ │ @@ -355,40 +355,40 @@ │ │ │ For example, custom CRS.

│ │ │

Typically, if the CRS has an EPSG code it will be supported.

│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -remove_extra_dim(name: str) None[source]
│ │ │ +remove_extra_dim(name: str) None[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -remove_extra_dims(names: Iterable[str]) None[source]
│ │ │ +remove_extra_dims(names: Iterable[str]) None[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -set_version_and_point_format(version: Version, point_format: PointFormat) None[source]
│ │ │ +set_version_and_point_format(version: Version, point_format: PointFormat) None[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -grow(points: PackedPointRecord) None[source]
│ │ │ +grow(points: PackedPointRecord) None[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -max_point_count() int[source]
│ │ │ +max_point_count() int[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -parse_crs(prefer_wkt=True) pyproj.CRS | None[source]
│ │ │ +parse_crs(prefer_wkt=True) pyproj.CRS | None[source] │ │ │

Method to parse OGC WKT or GeoTiff VLR keys into a pyproj CRS object

│ │ │

Returns None if no CRS VLR is present, or if the CRS specified │ │ │ in the VLRS is not understood.

│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │
  • prefer_wkt (Optional, default True,) – If True the WKT VLR will be preferred in case │ │ │ @@ -415,20 +415,20 @@ │ │ │

│ │ │
│ │ │

Leaves/restores the stream position to where it was before the call

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property major_version: int
│ │ │ +property major_version: int │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property minor_version: int
│ │ │ +property minor_version: int │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -33,17 +33,17 @@ │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.header module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..hheeaaddeerr mmoodduullee_? ************ │ │ │ │ ********** LLaassHHeeaaddeerr_? ********** │ │ │ │ - ccllaassss laspy.header.LasHeader(**, vveerrssiioonn:: VVeerrssiioonn || _ss_tt_rr || _NN_oo_nn_ee == NNoonnee, │ │ │ │ - ppooiinntt__ffoorrmmaatt:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt || _ii_nn_tt || _NN_oo_nn_ee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + ccllaassss laspy.header.LasHeader(**, vveerrssiioonn:: VVeerrssiioonn || ssttrr || NNoonnee == NNoonnee, │ │ │ │ + ppooiinntt__ffoorrmmaatt:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt || iinntt || NNoonnee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ + Bases: object │ │ │ │ Contains the information from the header of as LAS file with │ │ │ │ ‘implementation’ field left out and ‘users’ field stored in more │ │ │ │ ergonomic classes. │ │ │ │ This header also contains the VLRs │ │ │ │ Examples │ │ │ │ Creating a default header: │ │ │ │ >>> header = LasHeader() │ │ │ │ @@ -57,85 +57,85 @@ │ │ │ │ >>> header = LasHeader(version="1.4", point_format=6) │ │ │ │ >>> header │ │ │ │ )> │ │ │ │ DEFAULT_VERSION == ((11,, 22))_ │ │ │ │ The default version used when None is given to init │ │ │ │ DEFAULT_POINT_FORMAT == <>_ │ │ │ │ The default point format Used when None is given to init │ │ │ │ - file_source_id:: _ii_nn_tt_ │ │ │ │ + file_source_id:: iinntt_ │ │ │ │ File source id │ │ │ │ - uuid:: _UU_UU_II_DD_ │ │ │ │ + uuid:: UUUUIIDD_ │ │ │ │ Project ID Initialized to null UUID │ │ │ │ - system_identifier:: _ss_tt_rr || _bb_yy_tt_ee_ss_ │ │ │ │ + system_identifier:: ssttrr || bbyytteess_ │ │ │ │ System identifier Initialized to ‘OTHER’ │ │ │ │ - generating_software:: _ss_tt_rr || _bb_yy_tt_ee_ss_ │ │ │ │ + generating_software:: ssttrr || bbyytteess_ │ │ │ │ The software which generated the file Initialized to ‘laspy’ │ │ │ │ - creation_date:: _dd_aa_tt_ee || _NN_oo_nn_ee_ │ │ │ │ + creation_date:: ddaattee || NNoonnee_ │ │ │ │ Day the file was created, initialized to date.today │ │ │ │ - point_count:: _ii_nn_tt_ │ │ │ │ + point_count:: iinntt_ │ │ │ │ The number of points in the file │ │ │ │ scales:: nnddaarrrraayy_ │ │ │ │ The numbers used to scale the x,y,z coordinates │ │ │ │ offsets:: nnddaarrrraayy_ │ │ │ │ The numbers used to offset the x,y,z coordinates │ │ │ │ number_of_points_by_return:: nnddaarrrraayy_ │ │ │ │ Number of points by return for las <= 1.2 only the first 5 elements │ │ │ │ matters │ │ │ │ - extra_header_bytes:: _bb_yy_tt_ee_ss_ │ │ │ │ + extra_header_bytes:: bbyytteess_ │ │ │ │ Extra bytes between end of header and first vlrs │ │ │ │ - extra_vlr_bytes:: _bb_yy_tt_ee_ss_ │ │ │ │ + extra_vlr_bytes:: bbyytteess_ │ │ │ │ Extra bytes between end of vlr end first point │ │ │ │ - start_of_waveform_data_packet_record:: _ii_nn_tt_ │ │ │ │ + start_of_waveform_data_packet_record:: iinntt_ │ │ │ │ Las >= 1.3 │ │ │ │ - start_of_first_evlr:: _ii_nn_tt_ │ │ │ │ + start_of_first_evlr:: iinntt_ │ │ │ │ Las >= 1.4 Offset to the first evlr in the file │ │ │ │ - number_of_evlrs:: _ii_nn_tt_ │ │ │ │ + number_of_evlrs:: iinntt_ │ │ │ │ The number of evlrs in the file │ │ │ │ - evlrs:: _VV_LL_RR_LL_ii_ss_tt || _NN_oo_nn_ee_ │ │ │ │ + evlrs:: _VV_LL_RR_LL_ii_ss_tt || NNoonnee_ │ │ │ │ EVLRs, even though they are not stored in the ‘header’ part of the │ │ │ │ file we keep them in this class as they contain same information as │ │ │ │ vlr. None when the file does not support EVLR │ │ │ │ pprrooppeerrttyy point_format:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt_ │ │ │ │ The point format │ │ │ │ pprrooppeerrttyy version:: VVeerrssiioonn_ │ │ │ │ The version │ │ │ │ - pprrooppeerrttyy x_scale:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy y_scale:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy z_scale:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy x_offset:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy y_offset:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy z_offset:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy x_max:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy y_max:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy z_max:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy x_min:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy y_min:: _ff_ll_oo_aa_tt_ │ │ │ │ - pprrooppeerrttyy z_min:: _ff_ll_oo_aa_tt_ │ │ │ │ + pprrooppeerrttyy x_scale:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy y_scale:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy z_scale:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy x_offset:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy y_offset:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy z_offset:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy x_max:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy y_max:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy z_max:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy x_min:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy y_min:: ffllooaatt_ │ │ │ │ + pprrooppeerrttyy z_min:: ffllooaatt_ │ │ │ │ pprrooppeerrttyy vlrs:: _VV_LL_RR_LL_ii_ss_tt_ │ │ │ │ - add_extra_dims(ppaarraammss:: _LL_ii_ss_tt[[_EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss]]) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + add_extra_dims(ppaarraammss:: LLiisstt[[_EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss]]) → None_[_s_o_u_r_c_e_]_ │ │ │ │ add_extra_dim(ppaarraammss:: _EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss)_[_s_o_u_r_c_e_]_ │ │ │ │ - add_crs(ccrrss:: ppyypprroojj..CCRRSS, kkeeeepp__ccoommppaattiibbiilliittyy:: _bb_oo_oo_ll == TTrruuee) → _N_o_n_e │ │ │ │ + add_crs(ccrrss:: ppyypprroojj..CCRRSS, kkeeeepp__ccoommppaattiibbiilliittyy:: bbooooll == TTrruuee) → None │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ │ │ Add a Coordinate Reference System VLR from a pyproj CRS object. │ │ │ │ The type of VLR created depends on the las version and point format │ │ │ │ version. Las version >= 1.4 use WKT string, las version < 1.4 and │ │ │ │ point format < 6 use GeoTiff tags. │ │ │ │ Warning │ │ │ │ This requirespyproj. │ │ │ │ Warning │ │ │ │ Not all CRS are supported when adding GeoTiff tags. For example, │ │ │ │ custom CRS. │ │ │ │ Typically, if the CRS has an EPSG code it will be supported. │ │ │ │ - remove_extra_dim(nnaammee:: _ss_tt_rr) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ - remove_extra_dims(nnaammeess:: _II_tt_ee_rr_aa_bb_ll_ee[[_ss_tt_rr]]) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + remove_extra_dim(nnaammee:: ssttrr) → None_[_s_o_u_r_c_e_]_ │ │ │ │ + remove_extra_dims(nnaammeess:: IItteerraabbllee[[ssttrr]]) → None_[_s_o_u_r_c_e_]_ │ │ │ │ set_version_and_point_format(vveerrssiioonn:: VVeerrssiioonn, ppooiinntt__ffoorrmmaatt:: │ │ │ │ - _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ - grow(ppooiinnttss:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ - max_point_count() → _i_n_t_[_s_o_u_r_c_e_]_ │ │ │ │ - parse_crs(pprreeffeerr__wwkktt==TTrruuee) → pyproj.CRS | _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt) → None_[_s_o_u_r_c_e_]_ │ │ │ │ + grow(ppooiinnttss:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → None_[_s_o_u_r_c_e_]_ │ │ │ │ + max_point_count() → int_[_s_o_u_r_c_e_]_ │ │ │ │ + parse_crs(pprreeffeerr__wwkktt==TTrruuee) → pyproj.CRS | None_[_s_o_u_r_c_e_]_ │ │ │ │ Method to parse OGC WKT or GeoTiff VLR keys into a pyproj CRS │ │ │ │ object │ │ │ │ Returns None if no CRS VLR is present, or if the CRS specified in │ │ │ │ the VLRS is not understood. │ │ │ │ Parameters: │ │ │ │ * pprreeffeerr__wwkktt (OOppttiioonnaall,, ddeeffaauulltt TTrruuee,,) – If True the WKT │ │ │ │ VLR will be preferred in case both the WKT and Geotiff │ │ │ │ @@ -146,13 +146,13 @@ │ │ │ │ Reads EVLRs from the stream and sets them in the data property. │ │ │ │ The evlrs are accessed from theevlrsproperty │ │ │ │ Does nothing if either of these is true: │ │ │ │ * The file does not support EVLRS (version < 1.4) │ │ │ │ * The file has no EVLRS │ │ │ │ * The stream does not support seeking │ │ │ │ Leaves/restores the stream position to where it was before the call │ │ │ │ - pprrooppeerrttyy major_version:: _ii_nn_tt_ │ │ │ │ - pprrooppeerrttyy minor_version:: _ii_nn_tt_ │ │ │ │ + pprrooppeerrttyy major_version:: iinntt_ │ │ │ │ + pprrooppeerrttyy minor_version:: iinntt_ │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.lasappender.html │ │ │ @@ -113,20 +113,20 @@ │ │ │ │ │ │
│ │ │

laspy.lasappender

│ │ │
│ │ │

LasAppender

│ │ │
│ │ │
│ │ │ -class laspy.lasappender.LasAppender(dest: BinaryIO, laz_backend: LazBackend | Iterable[LazBackend] | None = None, closefd: bool = True, encoding_errors: str = 'strict')[source]
│ │ │ +class laspy.lasappender.LasAppender(dest: BinaryIO, laz_backend: LazBackend | Iterable[LazBackend] | None = None, closefd: bool = True, encoding_errors: str = 'strict')[source] │ │ │

Allows to append points to and existing LAS/LAZ file.

│ │ │

Appending to LAZ is only supported by the lazrs backend

│ │ │
│ │ │
│ │ │ -append_points(points: PackedPointRecord) None[source]
│ │ │ +append_points(points: PackedPointRecord) None[source] │ │ │

Append the points to the file, the points │ │ │ must have the same point format as the points │ │ │ already contained within the file.

│ │ │
│ │ │
Parameters:
│ │ │

points – The points to append

│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -33,20 +33,20 @@ │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.lasappender │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..llaassaappppeennddeerr_? ************ │ │ │ │ ********** LLaassAAppppeennddeerr_? ********** │ │ │ │ - ccllaassss laspy.lasappender.LasAppender(ddeesstt:: _BB_ii_nn_aa_rr_yy_II_OO, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || │ │ │ │ - _II_tt_ee_rr_aa_bb_ll_ee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || _NN_oo_nn_ee == NNoonnee, cclloosseeffdd:: _bb_oo_oo_ll == TTrruuee, eennccooddiinngg__eerrrroorrss:: │ │ │ │ - _ss_tt_rr == ''ssttrriicctt'')_[_s_o_u_r_c_e_]_ │ │ │ │ + ccllaassss laspy.lasappender.LasAppender(ddeesstt:: BBiinnaarryyIIOO, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || │ │ │ │ + IItteerraabbllee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || NNoonnee == NNoonnee, cclloosseeffdd:: bbooooll == TTrruuee, eennccooddiinngg__eerrrroorrss:: │ │ │ │ + ssttrr == ''ssttrriicctt'')_[_s_o_u_r_c_e_]_ │ │ │ │ Allows to append points to and existing LAS/LAZ file. │ │ │ │ Appending to LAZ is only supported by the lazrs backend │ │ │ │ - append_points(ppooiinnttss:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + append_points(ppooiinnttss:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Append the points to the file, the points must have the same point │ │ │ │ format as the points already contained within the file. │ │ │ │ Parameters: │ │ │ │ ppooiinnttss – The points to append │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.lasdata.html │ │ │ @@ -113,16 +113,16 @@ │ │ │ │ │ │
│ │ │

laspy.lasdata module

│ │ │
│ │ │

LasData

│ │ │
│ │ │
│ │ │ -class laspy.lasdata.LasData(header: LasHeader, points: PackedPointRecord | ScaleAwarePointRecord | None = None)[source]
│ │ │ -

Bases: object

│ │ │ +class laspy.lasdata.LasData(header: LasHeader, points: PackedPointRecord | ScaleAwarePointRecord | None = None)[source] │ │ │ +

Bases: object

│ │ │

Class synchronizing all the moving parts of LAS files.

│ │ │

It connects the point record, header, vlrs together.

│ │ │

To access points dimensions using this class you have two possibilities

│ │ │
las = laspy.read('some_file.las')
│ │ │  las.classification
│ │ │  # or
│ │ │  las['classification']
│ │ │ @@ -160,20 +160,20 @@
│ │ │  
│ │ │
│ │ │ property vlrs: VLRList
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property evlrs: VLRList | None
│ │ │ +property evlrs: VLRList | None │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -add_extra_dim(params: ExtraBytesParams) None[source]
│ │ │ +add_extra_dim(params: ExtraBytesParams) None[source] │ │ │

Adds a new extra dimension to the point record

│ │ │
│ │ │

Note

│ │ │

If you plan on adding multiple extra dimensions, │ │ │ prefer add_extra_dims() as it will │ │ │ save re-allocations and data copy

│ │ │
│ │ │ @@ -182,71 +182,71 @@ │ │ │

params (ExtraBytesParams) – parameters of the new extra dimension to add

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -add_extra_dims(params: List[ExtraBytesParams]) None[source]
│ │ │ +add_extra_dims(params: List[ExtraBytesParams]) None[source] │ │ │

Add multiple extra dimensions at once

│ │ │
│ │ │
Parameters:
│ │ │ -

params (list of parameters of the new extra dimensions to add) –

│ │ │ +

params (list of parameters of the new extra dimensions to add) –

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -remove_extra_dims(names: Iterable[str]) None[source]
│ │ │ +remove_extra_dims(names: Iterable[str]) None[source] │ │ │

Remove multiple extra dimensions from this object

│ │ │
│ │ │
Parameters:
│ │ │

names (iterable,) – names of the extra dimensions to be removed

│ │ │
│ │ │
Raises:
│ │ │

LaspyException – if you try to remove an extra dimension that do not exist.:

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -remove_extra_dim(name: str) None[source]
│ │ │ +remove_extra_dim(name: str) None[source] │ │ │

Remove an extra dimensions from this object

│ │ │
│ │ │

Note

│ │ │

If you plan on removing multiple extra dimensions, │ │ │ prefer remove_extra_dims() as it will │ │ │ save re-allocations and data copy

│ │ │
│ │ │
│ │ │
Parameters:
│ │ │ -

name (str,) – name of the extra dimension to be removed

│ │ │ +

name (str,) – name of the extra dimension to be removed

│ │ │
│ │ │
Raises:
│ │ │

LaspyException – if you try to remove an extra dimension that do not exist.:

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -update_header() None[source]
│ │ │ +update_header() None[source] │ │ │

Update the information stored in the header │ │ │ to be in sync with the actual data.

│ │ │

This method is called automatically when you save a file using │ │ │ laspy.lasdatas.base.LasBase.write()

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -write(destination: str, laz_backend: LazBackend | Sequence[LazBackend] | None = None) None[source]
│ │ │ +write(destination: str, laz_backend: LazBackend | Sequence[LazBackend] | None = None) None[source] │ │ │
│ │ │ -write(destination: BinaryIO, do_compress: bool | None = None, laz_backend: LazBackend | Sequence[LazBackend] | None = None) None
│ │ │ +write(destination: BinaryIO, do_compress: bool | None = None, laz_backend: LazBackend | Sequence[LazBackend] | None = None) None │ │ │

Writes to a stream or file

│ │ │
│ │ │

Note

│ │ │

When destination is a string, it will be interpreted as the path were the file should be written to, │ │ │ and whether the file will be compressed depends on the extension used (case insensitive):

│ │ │
│ │ │
    │ │ │ @@ -255,25 +255,25 @@ │ │ │
│ │ │
│ │ │

And the do_compress option will be ignored

│ │ │
│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │ -
  • destination (str or file object) – filename or stream to write to

  • │ │ │ -
  • do_compress (bool, optional) – Flags to indicate if you want to compress the data

  • │ │ │ +
  • destination (str or file object) – filename or stream to write to

  • │ │ │ +
  • do_compress (bool, optional) – Flags to indicate if you want to compress the data

  • │ │ │
  • laz_backend (optional, the laz backend to use) – By default, laspy detect available backends

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -change_scaling(scales=None, offsets=None) None[source]
│ │ │ +change_scaling(scales=None, offsets=None) None[source] │ │ │

This changes the scales and/or offset used for the x,y,z │ │ │ dimensions.

│ │ │

It recomputes the internal, non-scaled X,Y,Z dimensions │ │ │ to match the new scales and offsets.

│ │ │

It also updates the header with the new values of scales and offsets.

│ │ │
│ │ │
Parameters:
│ │ │ ├── html2text {} │ │ │ │ @@ -34,16 +34,16 @@ │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.lasdata module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..llaassddaattaa mmoodduullee_? ************ │ │ │ │ ********** LLaassDDaattaa_? ********** │ │ │ │ ccllaassss laspy.lasdata.LasData(hheeaaddeerr:: _LL_aa_ss_HH_ee_aa_dd_ee_rr, ppooiinnttss:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd || │ │ │ │ - _SS_cc_aa_ll_ee_AA_ww_aa_rr_ee_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd || _NN_oo_nn_ee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + _SS_cc_aa_ll_ee_AA_ww_aa_rr_ee_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd || NNoonnee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ + Bases: object │ │ │ │ Class synchronizing all the moving parts of LAS files. │ │ │ │ It connects the point record, header, vlrs together. │ │ │ │ To access points dimensions using this class you have two possibilities │ │ │ │ las = laspy.read('some_file.las') │ │ │ │ las.classification │ │ │ │ # or │ │ │ │ las['classification'] │ │ │ │ @@ -59,71 +59,71 @@ │ │ │ │ >>> xyz.shape │ │ │ │ (1065, 3) │ │ │ │ >>> bool(np.all(xyz[..., 0] == las.x)) │ │ │ │ True │ │ │ │ pprrooppeerrttyy points:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd_ │ │ │ │ Returns the point record │ │ │ │ pprrooppeerrttyy vlrs:: _VV_LL_RR_LL_ii_ss_tt_ │ │ │ │ - pprrooppeerrttyy evlrs:: _VV_LL_RR_LL_ii_ss_tt || _NN_oo_nn_ee_ │ │ │ │ - add_extra_dim(ppaarraammss:: _EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + pprrooppeerrttyy evlrs:: _VV_LL_RR_LL_ii_ss_tt || NNoonnee_ │ │ │ │ + add_extra_dim(ppaarraammss:: _EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Adds a new extra dimension to the point record │ │ │ │ Note │ │ │ │ If you plan on adding multiple extra dimensions, prefer │ │ │ │ _a_d_d___e_x_t_r_a___d_i_m_s_(_) as it will save re-allocations and data copy │ │ │ │ Parameters: │ │ │ │ ppaarraammss (_EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss) – parameters of the new extra │ │ │ │ dimension to add │ │ │ │ - add_extra_dims(ppaarraammss:: _LL_ii_ss_tt[[_EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss]]) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + add_extra_dims(ppaarraammss:: LLiisstt[[_EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss]]) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Add multiple extra dimensions at once │ │ │ │ Parameters: │ │ │ │ - ppaarraammss (_ll_ii_ss_tt ooff ppaarraammeetteerrss ooff tthhee nneeww eexxttrraa ddiimmeennssiioonnss ttoo │ │ │ │ + ppaarraammss (lliisstt ooff ppaarraammeetteerrss ooff tthhee nneeww eexxttrraa ddiimmeennssiioonnss ttoo │ │ │ │ aadddd) – │ │ │ │ - remove_extra_dims(nnaammeess:: _II_tt_ee_rr_aa_bb_ll_ee[[_ss_tt_rr]]) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + remove_extra_dims(nnaammeess:: IItteerraabbllee[[ssttrr]]) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Remove multiple extra dimensions from this object │ │ │ │ Parameters: │ │ │ │ nnaammeess (iitteerraabbllee,,) – names of the extra dimensions to be │ │ │ │ removed │ │ │ │ Raises: │ │ │ │ _LL_aa_ss_pp_yy_EE_xx_cc_ee_pp_tt_ii_oo_nn – if you try to remove an extra dimension that │ │ │ │ do not exist.: │ │ │ │ - remove_extra_dim(nnaammee:: _ss_tt_rr) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + remove_extra_dim(nnaammee:: ssttrr) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Remove an extra dimensions from this object │ │ │ │ Note │ │ │ │ If you plan on removing multiple extra dimensions, prefer │ │ │ │ _r_e_m_o_v_e___e_x_t_r_a___d_i_m_s_(_) as it will save re-allocations and data copy │ │ │ │ Parameters: │ │ │ │ - nnaammee (_ss_tt_rr,,) – name of the extra dimension to be removed │ │ │ │ + nnaammee (ssttrr,,) – name of the extra dimension to be removed │ │ │ │ Raises: │ │ │ │ _LL_aa_ss_pp_yy_EE_xx_cc_ee_pp_tt_ii_oo_nn – if you try to remove an extra dimension that │ │ │ │ do not exist.: │ │ │ │ - update_header() → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + update_header() → None_[_s_o_u_r_c_e_]_ │ │ │ │ Update the information stored in the header to be in sync with the │ │ │ │ actual data. │ │ │ │ This method is called automatically when you save a file using │ │ │ │ laspy.lasdatas.base.LasBase.write() │ │ │ │ - write(ddeessttiinnaattiioonn:: _ss_tt_rr, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || _SS_ee_qq_uu_ee_nn_cc_ee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] │ │ │ │ - || _NN_oo_nn_ee == NNoonnee) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ - write(ddeessttiinnaattiioonn:: _BB_ii_nn_aa_rr_yy_II_OO, ddoo__ccoommpprreessss:: _bb_oo_oo_ll || _NN_oo_nn_ee == NNoonnee, │ │ │ │ - llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || _SS_ee_qq_uu_ee_nn_cc_ee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || _NN_oo_nn_ee == NNoonnee) → _N_o_n_e │ │ │ │ + write(ddeessttiinnaattiioonn:: ssttrr, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || SSeeqquueennccee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] │ │ │ │ + || NNoonnee == NNoonnee) → None_[_s_o_u_r_c_e_]_ │ │ │ │ + write(ddeessttiinnaattiioonn:: BBiinnaarryyIIOO, ddoo__ccoommpprreessss:: bbooooll || NNoonnee == NNoonnee, │ │ │ │ + llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || SSeeqquueennccee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || NNoonnee == NNoonnee) → None │ │ │ │ Writes to a stream or file │ │ │ │ Note │ │ │ │ When destination is a string, it will be interpreted as the path │ │ │ │ were the file should be written to, and whether the file will be │ │ │ │ compressed depends on the extension used (case insensitive): │ │ │ │ * .laz -> compressed │ │ │ │ * .las -> uncompressed │ │ │ │ And the do_compress option will be ignored │ │ │ │ Parameters: │ │ │ │ - * ddeessttiinnaattiioonn (_ss_tt_rr oorr ffiillee oobbjjeecctt) – filename or stream │ │ │ │ + * ddeessttiinnaattiioonn (ssttrr oorr ffiillee oobbjjeecctt) – filename or stream │ │ │ │ to write to │ │ │ │ - * ddoo__ccoommpprreessss (_bb_oo_oo_ll,, ooppttiioonnaall) – Flags to indicate if you │ │ │ │ + * ddoo__ccoommpprreessss (bbooooll,, ooppttiioonnaall) – Flags to indicate if you │ │ │ │ want to compress the data │ │ │ │ * llaazz__bbaacckkeenndd (ooppttiioonnaall,, tthhee llaazz bbaacckkeenndd ttoo uussee) – By │ │ │ │ default, laspy detect available backends │ │ │ │ - change_scaling(ssccaalleess==NNoonnee, ooffffsseettss==NNoonnee) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + change_scaling(ssccaalleess==NNoonnee, ooffffsseettss==NNoonnee) → None_[_s_o_u_r_c_e_]_ │ │ │ │ This changes the scales and/or offset used for the x,y,z │ │ │ │ dimensions. │ │ │ │ It recomputes the internal, non-scaled X,Y,Z dimensions to match │ │ │ │ the new scales and offsets. │ │ │ │ It also updates the header with the new values of scales and │ │ │ │ offsets. │ │ │ │ Parameters: │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.lasmmap.html │ │ │ @@ -111,29 +111,29 @@ │ │ │
│ │ │
│ │ │ │ │ │
│ │ │

laspy.lasmmap module

│ │ │
│ │ │
│ │ │ -class laspy.lasmmap.LasMMAP(filename: str | Path)[source]
│ │ │ +class laspy.lasmmap.LasMMAP(filename: str | Path)[source] │ │ │

Bases: LasData

│ │ │

Memory map a LAS file. │ │ │ It works like a regular LasData however the data is not actually read in memory,

│ │ │

Access to dimensions are made directly from the file itself, changes made to the points │ │ │ are directly reflected in the mmap file.

│ │ │

Vlrs cannot be modified.

│ │ │

This can be useful if you want to be able to process a big LAS file

│ │ │
│ │ │

Note

│ │ │

A LAZ (compressed LAS) cannot be mmapped

│ │ │
│ │ │
│ │ │
│ │ │ -close() None[source]
│ │ │ +close() None[source] │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -32,22 +32,22 @@ │ │ │ │ # _l_a_s_p_y_._l_a_s_w_r_i_t_e_r_ _m_o_d_u_l_e │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.lasmmap module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..llaassmmmmaapp mmoodduullee_? ************ │ │ │ │ - ccllaassss laspy.lasmmap.LasMMAP(ffiilleennaammee:: _ss_tt_rr || _PP_aa_tt_hh)_[_s_o_u_r_c_e_]_ │ │ │ │ + ccllaassss laspy.lasmmap.LasMMAP(ffiilleennaammee:: ssttrr || PPaatthh)_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _L_a_s_D_a_t_a │ │ │ │ Memory map a LAS file. It works like a regular LasData however the data │ │ │ │ is not actually read in memory, │ │ │ │ Access to dimensions are made directly from the file itself, changes made │ │ │ │ to the points are directly reflected in the mmap file. │ │ │ │ Vlrs cannot be modified. │ │ │ │ This can be useful if you want to be able to process a big LAS file │ │ │ │ Note │ │ │ │ A LAZ (compressed LAS) cannot be mmapped │ │ │ │ - close() → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + close() → None_[_s_o_u_r_c_e_]_ │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.lasreader.html │ │ │ @@ -113,50 +113,50 @@ │ │ │ │ │ │
│ │ │

laspy.lasreader module

│ │ │
│ │ │

LasReader

│ │ │
│ │ │
│ │ │ -class laspy.lasreader.LasReader(source: BinaryIO, closefd: bool = True, laz_backend: LazBackend | Iterable[LazBackend] | None = None, read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source]
│ │ │ -

Bases: object

│ │ │ +class laspy.lasreader.LasReader(source: BinaryIO, closefd: bool = True, laz_backend: LazBackend | Iterable[LazBackend] | None = None, read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source] │ │ │ +

Bases: object

│ │ │

The reader class handles LAS and LAZ via one of the supported backend

│ │ │
│ │ │
│ │ │ -__init__(source: BinaryIO, closefd: bool = True, laz_backend: LazBackend | Iterable[LazBackend] | None = None, read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source]
│ │ │ +__init__(source: BinaryIO, closefd: bool = True, laz_backend: LazBackend | Iterable[LazBackend] | None = None, read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES)[source] │ │ │

Initialize the LasReader

│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │
  • source (file_object) –

  • │ │ │ -
  • closefd (bool, default True) –

  • │ │ │ -
  • laz_backend (LazBackend or list of LazBackend, optional) –

  • │ │ │ -
  • read_evlrs (bool, default True) – only applies to __init__ phase, and for files │ │ │ +

  • closefd (bool, default True) –

  • │ │ │ +
  • laz_backend (LazBackend or list of LazBackend, optional) –

  • │ │ │ +
  • read_evlrs (bool, default True) – only applies to __init__ phase, and for files │ │ │ that support evlrs

  • │ │ │
  • decompression_selection (optional, DecompressionSelection) – Selection of fields to decompress, only works form point format >= 6 <= 10 │ │ │ Ignored on other point formats

  • │ │ │
  • versionadded: (..) – 2.4: The read_evlrs and decompression_selection parameters.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property evlrs: VLRList | None
│ │ │ +property evlrs: VLRList | None │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ property point_source: IPointReader
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -read_points(n: int) ScaleAwarePointRecord[source]
│ │ │ +read_points(n: int) ScaleAwarePointRecord[source] │ │ │

Read n points from the file

│ │ │

Will only read as many points as the header advertise. │ │ │ That is, if you ask to read 50 points and there are only 45 points left │ │ │ this function will only read 45 points.

│ │ │

If there are no points left to read, returns an empty point record.

│ │ │
│ │ │
Parameters:
│ │ │ @@ -170,15 +170,15 @@ │ │ │ read() LasData[source] │ │ │

Reads all the points that are not read and returns a LasData object

│ │ │

This will also read EVLRS

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -seek(pos: int, whence: int = 0) int[source]
│ │ │ +seek(pos: int, whence: int = 0) int[source] │ │ │

Seeks to the start of the point at the given pos

│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │
  • pos (index of the point to seek to) –

  • │ │ │
  • whence (optional, controls how the pos parameter is interpreted:) – io.SEEK_SET: (default) pos is the index of the point from the beginning │ │ │ io.SEEK_CUR: pos is the point_index relative to the point_index of the last point read │ │ │ @@ -189,15 +189,15 @@ │ │ │

    The index of the point the reader seeked to, relative to the first point

    │ │ │
    │ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -chunk_iterator(points_per_iteration: int) PointChunkIterator[source]
│ │ │ +chunk_iterator(points_per_iteration: int) PointChunkIterator[source] │ │ │

Returns an iterator, that will read points by chunks │ │ │ of the requested size

│ │ │
│ │ │
Parameters:
│ │ │

points_per_iteration – number of points to be read with each iteration

│ │ │
│ │ │
Returns:
│ │ │ @@ -209,15 +209,15 @@ │ │ │
│ │ │
│ │ │ read_evlrs()[source]
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -close() None[source]
│ │ │ +close() None[source] │ │ │

closes the file object used by the reader

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -33,76 +33,76 @@ │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.lasreader module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..llaassrreeaaddeerr mmoodduullee_? ************ │ │ │ │ ********** LLaassRReeaaddeerr_? ********** │ │ │ │ - ccllaassss laspy.lasreader.LasReader(ssoouurrccee:: _BB_ii_nn_aa_rr_yy_II_OO, cclloosseeffdd:: _bb_oo_oo_ll == TTrruuee, │ │ │ │ - llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || _II_tt_ee_rr_aa_bb_ll_ee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || _NN_oo_nn_ee == NNoonnee, rreeaadd__eevvllrrss:: │ │ │ │ - _bb_oo_oo_ll == TTrruuee, ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == │ │ │ │ + ccllaassss laspy.lasreader.LasReader(ssoouurrccee:: BBiinnaarryyIIOO, cclloosseeffdd:: bbooooll == TTrruuee, │ │ │ │ + llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || IItteerraabbllee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || NNoonnee == NNoonnee, rreeaadd__eevvllrrss:: │ │ │ │ + bbooooll == TTrruuee, ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == │ │ │ │ DDeeccoommpprreessssiioonnSSeelleeccttiioonn..XXYY__RREETTUURRNNSS__CCHHAANNNNEELL || ZZ || CCLLAASSSSIIFFIICCAATTIIOONN || FFLLAAGGSS || │ │ │ │ IINNTTEENNSSIITTYY || SSCCAANN__AANNGGLLEE || UUSSEERR__DDAATTAA || PPOOIINNTT__SSOOUURRCCEE__IIDD || GGPPSS__TTIIMMEE || RRGGBB || NNIIRR || │ │ │ │ WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + Bases: object │ │ │ │ The reader class handles LAS and LAZ via one of the supported backend │ │ │ │ - __init__(ssoouurrccee:: _BB_ii_nn_aa_rr_yy_II_OO, cclloosseeffdd:: _bb_oo_oo_ll == TTrruuee, llaazz__bbaacckkeenndd:: │ │ │ │ - _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || _II_tt_ee_rr_aa_bb_ll_ee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || _NN_oo_nn_ee == NNoonnee, rreeaadd__eevvllrrss:: _bb_oo_oo_ll == │ │ │ │ + __init__(ssoouurrccee:: BBiinnaarryyIIOO, cclloosseeffdd:: bbooooll == TTrruuee, llaazz__bbaacckkeenndd:: │ │ │ │ + _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || IItteerraabbllee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || NNoonnee == NNoonnee, rreeaadd__eevvllrrss:: bbooooll == │ │ │ │ TTrruuee, ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == │ │ │ │ DDeeccoommpprreessssiioonnSSeelleeccttiioonn..XXYY__RREETTUURRNNSS__CCHHAANNNNEELL || ZZ || CCLLAASSSSIIFFIICCAATTIIOONN || FFLLAAGGSS │ │ │ │ || IINNTTEENNSSIITTYY || SSCCAANN__AANNGGLLEE || UUSSEERR__DDAATTAA || PPOOIINNTT__SSOOUURRCCEE__IIDD || GGPPSS__TTIIMMEE || RRGGBB │ │ │ │ || NNIIRR || WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS)_[_s_o_u_r_c_e_]_ │ │ │ │ Initialize the LasReader │ │ │ │ Parameters: │ │ │ │ * ssoouurrccee (ffiillee__oobbjjeecctt) – │ │ │ │ - * cclloosseeffdd (_bb_oo_oo_ll,, ddeeffaauulltt TTrruuee) – │ │ │ │ - * llaazz__bbaacckkeenndd (_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd oorr _ll_ii_ss_tt ooff _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd,, │ │ │ │ + * cclloosseeffdd (bbooooll,, ddeeffaauulltt TTrruuee) – │ │ │ │ + * llaazz__bbaacckkeenndd (_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd oorr lliisstt ooff _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd,, │ │ │ │ ooppttiioonnaall) – │ │ │ │ - * rreeaadd__eevvllrrss (_bb_oo_oo_ll,, ddeeffaauulltt TTrruuee) – only applies to │ │ │ │ + * rreeaadd__eevvllrrss (bbooooll,, ddeeffaauulltt TTrruuee) – only applies to │ │ │ │ __init__ phase, and for files that support evlrs │ │ │ │ * ddeeccoommpprreessssiioonn__sseelleeccttiioonn (ooppttiioonnaall,, │ │ │ │ _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn) – Selection of fields to │ │ │ │ decompress, only works form point format >= 6 <= 10 │ │ │ │ Ignored on other point formats │ │ │ │ * vveerrssiioonnaaddddeedd:: (....) – 2.4: The read_evlrs and │ │ │ │ decompression_selection parameters. │ │ │ │ - pprrooppeerrttyy evlrs:: _VV_LL_RR_LL_ii_ss_tt || _NN_oo_nn_ee_ │ │ │ │ + pprrooppeerrttyy evlrs:: _VV_LL_RR_LL_ii_ss_tt || NNoonnee_ │ │ │ │ pprrooppeerrttyy point_source:: IIPPooiinnttRReeaaddeerr_ │ │ │ │ - read_points(nn:: _ii_nn_tt) → _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d_[_s_o_u_r_c_e_]_ │ │ │ │ + read_points(nn:: iinntt) → _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d_[_s_o_u_r_c_e_]_ │ │ │ │ Read n points from the file │ │ │ │ Will only read as many points as the header advertise. That is, if │ │ │ │ you ask to read 50 points and there are only 45 points left this │ │ │ │ function will only read 45 points. │ │ │ │ If there are no points left to read, returns an empty point record. │ │ │ │ Parameters: │ │ │ │ nn (TThhee nnuummbbeerr ooff ppooiinnttss ttoo rreeaadd) – if n is less than 0, this │ │ │ │ function will read the remaining points │ │ │ │ read() → _L_a_s_D_a_t_a_[_s_o_u_r_c_e_]_ │ │ │ │ Reads all the points that are not read and returns a LasData object │ │ │ │ This will also read EVLRS │ │ │ │ - seek(ppooss:: _ii_nn_tt, wwhheennccee:: _ii_nn_tt == 00) → _i_n_t_[_s_o_u_r_c_e_]_ │ │ │ │ + seek(ppooss:: iinntt, wwhheennccee:: iinntt == 00) → int_[_s_o_u_r_c_e_]_ │ │ │ │ Seeks to the start of the point at the given pos │ │ │ │ Parameters: │ │ │ │ * ppooss (iinnddeexx ooff tthhee ppooiinntt ttoo sseeeekk ttoo) – │ │ │ │ * wwhheennccee (ooppttiioonnaall,, ccoonnttrroollss hhooww tthhee ppooss ppaarraammeetteerr iiss │ │ │ │ iinntteerrpprreetteedd::) – io.SEEK_SET: (default) pos is the index │ │ │ │ of the point from the beginning io.SEEK_CUR: pos is the │ │ │ │ point_index relative to the point_index of the last │ │ │ │ point read io.SEEK_END: pos is the point_index relative │ │ │ │ to last point │ │ │ │ Return type: │ │ │ │ The index of the point the reader seeked to, relative to the │ │ │ │ first point │ │ │ │ - chunk_iterator(ppooiinnttss__ppeerr__iitteerraattiioonn:: _ii_nn_tt) → PointChunkIterator_[_s_o_u_r_c_e_]_ │ │ │ │ + chunk_iterator(ppooiinnttss__ppeerr__iitteerraattiioonn:: iinntt) → PointChunkIterator_[_s_o_u_r_c_e_]_ │ │ │ │ Returns an iterator, that will read points by chunks of the │ │ │ │ requested size │ │ │ │ Parameters: │ │ │ │ ppooiinnttss__ppeerr__iitteerraattiioonn – number of points to be read with each │ │ │ │ iteration │ │ │ │ Returns: │ │ │ │ read_evlrs()_[_s_o_u_r_c_e_]_ │ │ │ │ - close() → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + close() → None_[_s_o_u_r_c_e_]_ │ │ │ │ closes the file object used by the reader │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.laswriter.html │ │ │ @@ -112,42 +112,42 @@ │ │ │ │ │ │
│ │ │

laspy.laswriter module

│ │ │
│ │ │

LasWriter

│ │ │
│ │ │
│ │ │ -class laspy.laswriter.LasWriter(dest: BinaryIO, header: LasHeader, do_compress: bool | None = None, laz_backend: LazBackend | Iterable[LazBackend] | None = None, closefd: bool = True, encoding_errors: str = 'strict')[source]
│ │ │ -

Bases: object

│ │ │ +class laspy.laswriter.LasWriter(dest: BinaryIO, header: LasHeader, do_compress: bool | None = None, laz_backend: LazBackend | Iterable[LazBackend] | None = None, closefd: bool = True, encoding_errors: str = 'strict')[source] │ │ │ +

Bases: object

│ │ │

Allows to write a complete LAS/LAZ file to the destination.

│ │ │
│ │ │
│ │ │ -__init__(dest: BinaryIO, header: LasHeader, do_compress: bool | None = None, laz_backend: LazBackend | Iterable[LazBackend] | None = None, closefd: bool = True, encoding_errors: str = 'strict') None[source]
│ │ │ +__init__(dest: BinaryIO, header: LasHeader, do_compress: bool | None = None, laz_backend: LazBackend | Iterable[LazBackend] | None = None, closefd: bool = True, encoding_errors: str = 'strict') None[source] │ │ │
│ │ │
Parameters:
│ │ │
    │ │ │
  • dest (file_object) – file object where the LAS/LAZ will be written

  • │ │ │
  • header (LasHeader) – The header of the file to be written

  • │ │ │ -
  • do_compress (bool, optional) – Whether the file data should be written as LAS (uncompressed) │ │ │ +

  • do_compress (bool, optional) – Whether the file data should be written as LAS (uncompressed) │ │ │ or LAZ (compressed). │ │ │ If None, the file won’t be compressed, unless a laz_backend is provided

  • │ │ │ -
  • laz_backend (LazBackend or list of LazBackend, optional) – The LazBackend to use (or if it is a sequence the LazBackend to try) │ │ │ +

  • laz_backend (LazBackend or list of LazBackend, optional) – The LazBackend to use (or if it is a sequence the LazBackend to try) │ │ │ for the compression

  • │ │ │ -
  • closefd (bool, default True) – should the dest be closed when the writer is closed

  • │ │ │ -
  • encoding_errors (str, default 'strict') – How encoding errors should be treated. │ │ │ +

  • closefd (bool, default True) – should the dest be closed when the writer is closed

  • │ │ │ +
  • encoding_errors (str, default 'strict') – How encoding errors should be treated. │ │ │ Possible values and their explanation can be seen here: │ │ │ https://docs.python.org/3/library/codecs.html#error-handlers.

  • │ │ │
│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -write_points(points: PackedPointRecord) None[source]
│ │ │ +write_points(points: PackedPointRecord) None[source] │ │ │
│ │ │

Note

│ │ │

If you are writing points coming from multiple different input files │ │ │ into one output file, you have to make sure the point record │ │ │ you write all use the same scales and offset of the writer.

│ │ │

You can use LasData.change_scaling() or ScaleAwarePointRecord.change_scaling() │ │ │ to do that.

│ │ │ @@ -161,29 +161,29 @@ │ │ │ the point format of the writer.

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -write_evlrs(evlrs: VLRList) None[source]
│ │ │ +write_evlrs(evlrs: VLRList) None[source] │ │ │

Writes the EVLRs to the file

│ │ │
│ │ │
Parameters:
│ │ │

evlrs (VLRList) – The EVLRs to be written

│ │ │
│ │ │
Raises:
│ │ │

LaspyException – If the file’s version is not >= 1.4

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -close() None[source]
│ │ │ +close() None[source] │ │ │

Closes the writer.

│ │ │

flushes the points, updates the header, making it impossible │ │ │ to write points afterwards.

│ │ │
│ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -33,61 +33,61 @@ │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.laswriter module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..llaasswwrriitteerr mmoodduullee_? ************ │ │ │ │ ********** LLaassWWrriitteerr_? ********** │ │ │ │ - ccllaassss laspy.laswriter.LasWriter(ddeesstt:: _BB_ii_nn_aa_rr_yy_II_OO, hheeaaddeerr:: _LL_aa_ss_HH_ee_aa_dd_ee_rr, │ │ │ │ - ddoo__ccoommpprreessss:: _bb_oo_oo_ll || _NN_oo_nn_ee == NNoonnee, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || _II_tt_ee_rr_aa_bb_ll_ee │ │ │ │ - [[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || _NN_oo_nn_ee == NNoonnee, cclloosseeffdd:: _bb_oo_oo_ll == TTrruuee, eennccooddiinngg__eerrrroorrss:: _ss_tt_rr == │ │ │ │ + ccllaassss laspy.laswriter.LasWriter(ddeesstt:: BBiinnaarryyIIOO, hheeaaddeerr:: _LL_aa_ss_HH_ee_aa_dd_ee_rr, │ │ │ │ + ddoo__ccoommpprreessss:: bbooooll || NNoonnee == NNoonnee, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || IItteerraabbllee │ │ │ │ + [[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || NNoonnee == NNoonnee, cclloosseeffdd:: bbooooll == TTrruuee, eennccooddiinngg__eerrrroorrss:: ssttrr == │ │ │ │ ''ssttrriicctt'')_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + Bases: object │ │ │ │ Allows to write a complete LAS/LAZ file to the destination. │ │ │ │ - __init__(ddeesstt:: _BB_ii_nn_aa_rr_yy_II_OO, hheeaaddeerr:: _LL_aa_ss_HH_ee_aa_dd_ee_rr, ddoo__ccoommpprreessss:: _bb_oo_oo_ll || _NN_oo_nn_ee == │ │ │ │ - NNoonnee, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || _II_tt_ee_rr_aa_bb_ll_ee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || _NN_oo_nn_ee == NNoonnee, │ │ │ │ - cclloosseeffdd:: _bb_oo_oo_ll == TTrruuee, eennccooddiinngg__eerrrroorrss:: _ss_tt_rr == ''ssttrriicctt'') → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + __init__(ddeesstt:: BBiinnaarryyIIOO, hheeaaddeerr:: _LL_aa_ss_HH_ee_aa_dd_ee_rr, ddoo__ccoommpprreessss:: bbooooll || NNoonnee == │ │ │ │ + NNoonnee, llaazz__bbaacckkeenndd:: _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd || IItteerraabbllee[[_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd]] || NNoonnee == NNoonnee, │ │ │ │ + cclloosseeffdd:: bbooooll == TTrruuee, eennccooddiinngg__eerrrroorrss:: ssttrr == ''ssttrriicctt'') → None_[_s_o_u_r_c_e_]_ │ │ │ │ Parameters: │ │ │ │ * ddeesstt (ffiillee__oobbjjeecctt) – file object where the LAS/LAZ will │ │ │ │ be written │ │ │ │ * hheeaaddeerr (_LL_aa_ss_HH_ee_aa_dd_ee_rr) – The header of the file to be │ │ │ │ written │ │ │ │ - * ddoo__ccoommpprreessss (_bb_oo_oo_ll,, ooppttiioonnaall) – Whether the file data │ │ │ │ + * ddoo__ccoommpprreessss (bbooooll,, ooppttiioonnaall) – Whether the file data │ │ │ │ should be written as LAS (uncompressed) or LAZ │ │ │ │ (compressed). If None, the file won’t be compressed, │ │ │ │ unless a laz_backend is provided │ │ │ │ - * llaazz__bbaacckkeenndd (_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd oorr _ll_ii_ss_tt ooff _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd,, │ │ │ │ + * llaazz__bbaacckkeenndd (_LL_aa_zz_BB_aa_cc_kk_ee_nn_dd oorr lliisstt ooff _LL_aa_zz_BB_aa_cc_kk_ee_nn_dd,, │ │ │ │ ooppttiioonnaall) – The LazBackend to use (or if it is a │ │ │ │ sequence the LazBackend to try) for the compression │ │ │ │ - * cclloosseeffdd (_bb_oo_oo_ll,, ddeeffaauulltt TTrruuee) – should thedestbe closed │ │ │ │ + * cclloosseeffdd (bbooooll,, ddeeffaauulltt TTrruuee) – should thedestbe closed │ │ │ │ when the writer is closed │ │ │ │ - * eennccooddiinngg__eerrrroorrss (_ss_tt_rr,, ddeeffaauulltt ''ssttrriicctt'') – How encoding │ │ │ │ + * eennccooddiinngg__eerrrroorrss (ssttrr,, ddeeffaauulltt ''ssttrriicctt'') – How encoding │ │ │ │ errors should be treated. Possible values and their │ │ │ │ explanation can be seen here: _h_t_t_p_s_:_/_/_d_o_c_s_._p_y_t_h_o_n_._o_r_g_/ │ │ │ │ _3_/_l_i_b_r_a_r_y_/_c_o_d_e_c_s_._h_t_m_l_#_e_r_r_o_r_-_h_a_n_d_l_e_r_s. │ │ │ │ - write_points(ppooiinnttss:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + write_points(ppooiinnttss:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Note │ │ │ │ If you are writing points coming from multiple different input │ │ │ │ files into one output file, you have to make sure the point record │ │ │ │ you write all use the same scales and offset of the writer. │ │ │ │ You can use _L_a_s_D_a_t_a_._c_h_a_n_g_e___s_c_a_l_i_n_g_(_) or │ │ │ │ _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d_._c_h_a_n_g_e___s_c_a_l_i_n_g_(_) to do that. │ │ │ │ Parameters: │ │ │ │ ppooiinnttss (_PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd oorr _SS_cc_aa_ll_ee_AA_ww_aa_rr_ee_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) – The │ │ │ │ points to be written │ │ │ │ Raises: │ │ │ │ _LL_aa_ss_pp_yy_EE_xx_cc_ee_pp_tt_ii_oo_nn – If the point format of the points does not │ │ │ │ match the point format of the writer. │ │ │ │ - write_evlrs(eevvllrrss:: _VV_LL_RR_LL_ii_ss_tt) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + write_evlrs(eevvllrrss:: _VV_LL_RR_LL_ii_ss_tt) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Writes the EVLRs to the file │ │ │ │ Parameters: │ │ │ │ eevvllrrss (_VV_LL_RR_LL_ii_ss_tt) – The EVLRs to be written │ │ │ │ Raises: │ │ │ │ _LL_aa_ss_pp_yy_EE_xx_cc_ee_pp_tt_ii_oo_nn – If the file’s version is not >= 1.4 │ │ │ │ - close() → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + close() → None_[_s_o_u_r_c_e_]_ │ │ │ │ Closes the writer. │ │ │ │ flushes the points, updates the header, making it impossible to │ │ │ │ write points afterwards. │ │ │ │ _P_r_e_v_i_o_u_s │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.lib.html │ │ │ @@ -118,15 +118,15 @@ │ │ │ │ │ │
│ │ │

laspy.lib module

│ │ │

‘Entry point’ of the library, Contains the various functions meant to be │ │ │ used directly by a user

│ │ │
│ │ │
│ │ │ -laspy.lib.open_las(source, mode='r', closefd=True, laz_backend=None, header=None, do_compress=None, encoding_errors: str = 'strict', read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES) LasReader | LasWriter | LasAppender[source]
│ │ │ +laspy.lib.open_las(source, mode='r', closefd=True, laz_backend=None, header=None, do_compress=None, encoding_errors: str = 'strict', read_evlrs: bool = True, decompression_selection: DecompressionSelection = DecompressionSelection.XY_RETURNS_CHANNEL | Z | CLASSIFICATION | FLAGS | INTENSITY | SCAN_ANGLE | USER_DATA | POINT_SOURCE_ID | GPS_TIME | RGB | NIR | WAVEPACKET | ALL_EXTRA_BYTES) LasReader | LasWriter | LasAppender[source] │ │ │

The laspy.open opens a LAS/LAZ file in one of the 3 supported │ │ │ mode:

│ │ │
│ │ │
    │ │ │
  • “r” => Reading => a laspy.LasReader will be returned

  • │ │ │
  • “w” => Writing => a laspy.LasWriter will be returned

  • │ │ │
  • “a” => Appending => a laspy.LasAppender will be returned

  • │ │ │ @@ -156,39 +156,39 @@ │ │ │ >>> f.closed │ │ │ True │ │ │
│ │ │
│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │ -
  • source (str or bytes or io.BytesIO) – if source is a str it must be a filename

  • │ │ │ +
  • source (str or bytes or io.BytesIO) – if source is a str it must be a filename

  • │ │ │
  • mode (Optional, the mode to open the file:) –

      │ │ │
    • “r” for reading (default)

    • │ │ │
    • ”w” for writing

    • │ │ │
    • ”a” for appending

    • │ │ │
    │ │ │

  • │ │ │
  • laz_backend (Optional, laspy.LazBackend, the LAZ backend to use to handle decompression/compression) – By default available backends are detected, see LazBackend to see the │ │ │ preference order when multiple backends are available

  • │ │ │
  • header (The header to use when opening in write mode.) –

  • │ │ │ -
  • do_compress (optional, bool, only meaningful in writing mode:) –

      │ │ │ +
    • do_compress (optional, bool, only meaningful in writing mode:) –

        │ │ │
      • None (default) guess if compression is needed using the file extension │ │ │ or if a laz_backend was explicitely provided

      • │ │ │
      • True compresses the file

      • │ │ │
      • False do not compress the file

      • │ │ │
      │ │ │

    • │ │ │ -
    • closefd (optional, bool, True by default) – Whether the stream/file object shall be closed, this only work │ │ │ +

    • closefd (optional, bool, True by default) – Whether the stream/file object shall be closed, this only work │ │ │ when using open_las in a with statement. An exception is raised if │ │ │ closefd is specified and the source is a filename

    • │ │ │ -
    • encoding_errors (str, default 'strict') – Only used in writing and appending mode. │ │ │ +

    • encoding_errors (str, default 'strict') – Only used in writing and appending mode. │ │ │ How encoding errors should be treated. │ │ │ Possible values and their explanation can be seen here: │ │ │ https://docs.python.org/3/library/codecs.html#error-handlers.

    • │ │ │ -
    • read_evlrs (bool, default True) –

      Only applies to ‘r’ mode.

      │ │ │ +
    • read_evlrs (bool, default True) –

      Only applies to ‘r’ mode.

      │ │ │

      If True the evlrs will be read during the __init__ / file opening │ │ │ along with the LasHeader.

      │ │ │

      It is fine for most of the cases, │ │ │ but can be problematic when opening file from a data stream like │ │ │ AWS S3 as EVLRs are located at the end of the files, thus │ │ │ will require to pull the whole file.

      │ │ │

      Does nothing if the input file does not support │ │ │ @@ -215,18 +215,18 @@ │ │ │ >>> las.classification │ │ │ <SubFieldView([1 1 1 ... 1 1 1])> │ │ │ │ │ │ │ │ │

      │ │ │
      Parameters:
      │ │ │
        │ │ │ -
      • source (str or io.BytesIO) – The source to read data from

      • │ │ │ +
      • source (str or io.BytesIO) – The source to read data from

      • │ │ │
      • laz_backend (Optional, the backend to use when the file is as LAZ file.) – By default laspy will find the backend to use by itself. │ │ │ Use if you want a specific backend to be used

      • │ │ │ -
      • closefd (bool) – if True and the source is a stream, the function will close it │ │ │ +

      • closefd (bool) – if True and the source is a stream, the function will close it │ │ │ after it is done reading

      • │ │ │
      • decompression_selection (DecompressionSelection,) – see laspy.open()

      • │ │ │
      │ │ │
      │ │ │
      Returns:
      │ │ │

      The object you can interact with to get access to the LAS points & VLRs

      │ │ │
      │ │ │ @@ -243,15 +243,15 @@ │ │ │
      │ │ │ laspy.lib.mmap_las(filename)[source]
      │ │ │

      MMap a file, much like laspy did

      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -laspy.lib.create_las(*, point_format: PointFormat | int | None = None, file_version: Version | str | None = None)[source]
      │ │ │ +laspy.lib.create_las(*, point_format: PointFormat | int | None = None, file_version: Version | str | None = None)[source] │ │ │

      Function to create a new empty las data object

      │ │ │
      │ │ │

      Note

      │ │ │

      If you provide both point_format and file_version │ │ │ an exception will be raised if they are not compatible

      │ │ │
      │ │ │
      >>> las = create_las(point_format=6,file_version="1.2")
      │ │ │ @@ -329,16 +329,16 @@
      │ │ │  laspy.errors.LaspyException: Point format 6 is not compatible with file version 1.2
      │ │ │  
      │ │ │
      │ │ │
      │ │ │
      Parameters:
      │ │ │
        │ │ │
      • source_las (laspy.lasdatas.base.LasBase) – The source data to be converted

      • │ │ │ -
      • point_format_id (int, optional) – The new point format id (the default is None, which won’t change the source format id)

      • │ │ │ -
      • file_version (str, optional,) – The new file version. None by default which means that the file_version │ │ │ +

      • point_format_id (int, optional) – The new point format id (the default is None, which won’t change the source format id)

      • │ │ │ +
      • file_version (str, optional,) – The new file version. None by default which means that the file_version │ │ │ may be upgraded for compatibility with the new point_format. The file version will not │ │ │ be downgraded.

      • │ │ │
      │ │ │
      │ │ │
      Return type:
      │ │ │

      laspy.lasdatas.base.LasBase

      │ │ │
      │ │ │ ├── html2text {} │ │ │ │ @@ -40,16 +40,16 @@ │ │ │ │ * laspy.lib module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..lliibb mmoodduullee_? ************ │ │ │ │ ‘Entry point’ of the library, Contains the various functions meant to be used │ │ │ │ directly by a user │ │ │ │ laspy.lib.open_las(ssoouurrccee, mmooddee==''rr'', cclloosseeffdd==TTrruuee, llaazz__bbaacckkeenndd==NNoonnee, │ │ │ │ - hheeaaddeerr==NNoonnee, ddoo__ccoommpprreessss==NNoonnee, eennccooddiinngg__eerrrroorrss:: _ss_tt_rr == ''ssttrriicctt'', rreeaadd__eevvllrrss:: │ │ │ │ - _bb_oo_oo_ll == TTrruuee, ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == │ │ │ │ + hheeaaddeerr==NNoonnee, ddoo__ccoommpprreessss==NNoonnee, eennccooddiinngg__eerrrroorrss:: ssttrr == ''ssttrriicctt'', rreeaadd__eevvllrrss:: │ │ │ │ + bbooooll == TTrruuee, ddeeccoommpprreessssiioonn__sseelleeccttiioonn:: _DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn == │ │ │ │ DDeeccoommpprreessssiioonnSSeelleeccttiioonn..XXYY__RREETTUURRNNSS__CCHHAANNNNEELL || ZZ || CCLLAASSSSIIFFIICCAATTIIOONN || FFLLAAGGSS || │ │ │ │ IINNTTEENNSSIITTYY || SSCCAANN__AANNGGLLEE || UUSSEERR__DDAATTAA || PPOOIINNTT__SSOOUURRCCEE__IIDD || GGPPSS__TTIIMMEE || RRGGBB || NNIIRR || │ │ │ │ WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS) → _L_a_s_R_e_a_d_e_r | _L_a_s_W_r_i_t_e_r | _L_a_s_A_p_p_e_n_d_e_r_[_s_o_u_r_c_e_]_ │ │ │ │ The laspy.open opens a LAS/LAZ file in one of the 3 supported mode: │ │ │ │ * “r” => Reading => a laspy.LasReader will be returned │ │ │ │ * “w” => Writing => a laspy.LasWriter will be returned │ │ │ │ * “a” => Appending => a laspy.LasAppender will be returned │ │ │ │ @@ -78,32 +78,32 @@ │ │ │ │ WWAAVVEEPPAACCKKEETT || AALLLL__EEXXTTRRAA__BBYYTTEESS)_[_s_o_u_r_c_e_]_ │ │ │ │ Entry point for reading las data in laspy │ │ │ │ Reads the whole file into memory. │ │ │ │ >>> las = read_las("tests/data/simple.las") │ │ │ │ >>> las.classification │ │ │ │ │ │ │ │ Parameters: │ │ │ │ - * ssoouurrccee (_ss_tt_rr oorr _ii_oo_.._BB_yy_tt_ee_ss_II_OO) – The source to read data from │ │ │ │ + * ssoouurrccee (ssttrr oorr iioo..BByytteessIIOO) – The source to read data from │ │ │ │ * llaazz__bbaacckkeenndd (OOppttiioonnaall,, tthhee bbaacckkeenndd ttoo uussee wwhheenn tthhee ffiillee iiss aass │ │ │ │ LLAAZZ ffiillee..) – By default laspy will find the backend to use by │ │ │ │ itself. Use if you want a specific backend to be used │ │ │ │ - * cclloosseeffdd (_bb_oo_oo_ll) – if True and the source is a stream, the │ │ │ │ + * cclloosseeffdd (bbooooll) – if True and the source is a stream, the │ │ │ │ function will close it after it is done reading │ │ │ │ * ddeeccoommpprreessssiioonn__sseelleeccttiioonn (_DD_ee_cc_oo_mm_pp_rr_ee_ss_ss_ii_oo_nn_SS_ee_ll_ee_cc_tt_ii_oo_nn,,) – see │ │ │ │ _l_a_s_p_y_._o_p_e_n_(_) │ │ │ │ Returns: │ │ │ │ The object you can interact with to get access to the LAS points & │ │ │ │ VLRs │ │ │ │ Return type: │ │ │ │ laspy.LasData │ │ │ │ New in version 2.4: The decompression_selection parameter. │ │ │ │ laspy.lib.mmap_las(ffiilleennaammee)_[_s_o_u_r_c_e_]_ │ │ │ │ MMap a file, much like laspy did │ │ │ │ - laspy.lib.create_las(**, ppooiinntt__ffoorrmmaatt:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt || _ii_nn_tt || _NN_oo_nn_ee == NNoonnee, │ │ │ │ - ffiillee__vveerrssiioonn:: VVeerrssiioonn || _ss_tt_rr || _NN_oo_nn_ee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ + laspy.lib.create_las(**, ppooiinntt__ffoorrmmaatt:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt || iinntt || NNoonnee == NNoonnee, │ │ │ │ + ffiillee__vveerrssiioonn:: VVeerrssiioonn || ssttrr || NNoonnee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ Function to create a new empty las data object │ │ │ │ Note │ │ │ │ If you provide both point_format and file_version an exception will be │ │ │ │ raised if they are not compatible │ │ │ │ >>> las = create_las(point_format=6,file_version="1.2") │ │ │ │ Traceback (most recent call last): │ │ │ │ ... │ │ │ │ @@ -160,18 +160,18 @@ │ │ │ │ Traceback (most recent call last): │ │ │ │ ... │ │ │ │ laspy.errors.LaspyException: Point format 6 is not compatible with file │ │ │ │ version 1.2 │ │ │ │ Parameters: │ │ │ │ * ssoouurrccee__llaass (llaassppyy..llaassddaattaass..bbaassee..LLaassBBaassee) – The source data to │ │ │ │ be converted │ │ │ │ - * ppooiinntt__ffoorrmmaatt__iidd (_ii_nn_tt,, ooppttiioonnaall) – The new point format id │ │ │ │ + * ppooiinntt__ffoorrmmaatt__iidd (iinntt,, ooppttiioonnaall) – The new point format id │ │ │ │ (the default is None, which won’t change the source format │ │ │ │ id) │ │ │ │ - * ffiillee__vveerrssiioonn (_ss_tt_rr,, ooppttiioonnaall,,) – The new file version. None by │ │ │ │ + * ffiillee__vveerrssiioonn (ssttrr,, ooppttiioonnaall,,) – The new file version. None by │ │ │ │ default which means that the file_version may be upgraded for │ │ │ │ compatibility with the new point_format. The file version │ │ │ │ will not be downgraded. │ │ │ │ Return type: │ │ │ │ laspy.lasdatas.base.LasBase │ │ │ │ laspy.lib.write_then_read_again(llaass, ddoo__ccoommpprreessss==FFaallssee, llaazz__bbaacckkeenndd==(())) │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.point.format.html │ │ │ @@ -113,16 +113,16 @@ │ │ │
      │ │ │
      │ │ │ │ │ │
      │ │ │

      laspy.point.format module

      │ │ │
      │ │ │
      │ │ │ -class laspy.point.format.ExtraBytesParams(name: str, type: str | dtype | Type[uint8], description: str = '', offsets: Iterable[number | float | int] | None = None, scales: Iterable[number | float | int] | None = None)[source]
      │ │ │ -

      Bases: object

      │ │ │ +class laspy.point.format.ExtraBytesParams(name: str, type: str | dtype | Type[uint8], description: str = '', offsets: Iterable[number | float | int] | None = None, scales: Iterable[number | float | int] | None = None)[source] │ │ │ +

      Bases: object

      │ │ │

      All parameters needed to create extra bytes

      │ │ │
      │ │ │
      │ │ │ name
      │ │ │

      The name of the extra dimension

      │ │ │
      │ │ │ │ │ │ @@ -150,16 +150,16 @@ │ │ │

      The scales to use if its a ‘scaled dimension’, can be none

      │ │ │
      │ │ │ │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -class laspy.point.format.PointFormat(point_format_id: int)[source]
      │ │ │ -

      Bases: object

      │ │ │ +class laspy.point.format.PointFormat(point_format_id: int)[source] │ │ │ +

      Bases: object

      │ │ │

      Class that contains the informations about the dimensions that forms a PointFormat.

      │ │ │

      A PointFormat has ‘standard’ dimensions (dimensions defined in the LAS standard, each │ │ │ point format has its set of dimensions), but it can also have extra (non-standard) dimensions │ │ │ defined by the user)

      │ │ │
      >>> fmt = PointFormat(3)
      │ │ │  >>> all(dim.is_standard for dim in fmt.dimensions)
      │ │ │  True
      │ │ │ @@ -170,52 +170,52 @@
      │ │ │  0
      │ │ │  >>> dim.num_bits
      │ │ │  5
      │ │ │  
      │ │ │
      │ │ │
      │ │ │
      │ │ │ -property standard_dimensions: Iterable[DimensionInfo]
      │ │ │ +property standard_dimensions: Iterable[DimensionInfo] │ │ │

      Returns an iterable of the standard dimensions

      │ │ │
      >>> fmt = PointFormat(0)
      │ │ │  >>> standard_dims = list(fmt.standard_dimensions)
      │ │ │  >>> len(standard_dims)
      │ │ │  15
      │ │ │  >>> standard_dims[4].name
      │ │ │  'return_number'
      │ │ │  
      │ │ │
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -property extra_dimensions: Iterable[DimensionInfo]
      │ │ │ +property extra_dimensions: Iterable[DimensionInfo] │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -property dimension_names: Iterable[str]
      │ │ │ +property dimension_names: Iterable[str] │ │ │

      Returns the names of the dimensions contained in the point format

      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -property standard_dimension_names: Iterable[str]
      │ │ │ +property standard_dimension_names: Iterable[str] │ │ │

      Returns the names of the extra dimensions in this point format

      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -property extra_dimension_names: Iterable[str]
      │ │ │ +property extra_dimension_names: Iterable[str] │ │ │

      Returns the names of the extra dimensions in this point format

      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -property size: int
      │ │ │ +property size: int │ │ │

      Returns the number of bytes (standard + extra) a point takes

      │ │ │
      >>> PointFormat(3).size
      │ │ │  34
      │ │ │  
      │ │ │
      │ │ │
      >>> fmt = PointFormat(3)
      │ │ │  >>> fmt.add_extra_dimension(ExtraBytesParams("codification", "uint64"))
      │ │ │ @@ -223,27 +223,27 @@
      │ │ │  42
      │ │ │  
      │ │ │
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -property num_standard_bytes: int
      │ │ │ +property num_standard_bytes: int │ │ │

      Returns the number of bytes used by standard dims

      │ │ │
      >>> fmt = PointFormat(3)
      │ │ │  >>> fmt.add_extra_dimension(ExtraBytesParams("codification", "uint64"))
      │ │ │  >>> fmt.num_standard_bytes
      │ │ │  34
      │ │ │  
      │ │ │
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -property num_extra_bytes: int
      │ │ │ +property num_extra_bytes: int │ │ │

      Returns the number of extra bytes

      │ │ │
      >>> fmt = PointFormat(3)
      │ │ │  >>> fmt.add_extra_dimension(ExtraBytesParams("codification", "uint64"))
      │ │ │  >>> fmt.num_extra_bytes
      │ │ │  8
      │ │ │  
      │ │ │
      │ │ │ @@ -253,15 +253,15 @@ │ │ │
      │ │ │ property has_waveform_packet
      │ │ │

      Returns True if the point format has waveform packet dimensions

      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -dimension_by_name(name: str) DimensionInfo[source]
      │ │ │ +dimension_by_name(name: str) DimensionInfo[source] │ │ │

      Returns the dimension info for the dimension by name

      │ │ │

      ValueError is raised if the dimension does not exist un the point format

      │ │ │
      >>> info = PointFormat(2).dimension_by_name('number_of_returns')
      │ │ │  >>> info.name == 'number_of_returns'
      │ │ │  True
      │ │ │  >>> info.num_bits == 3
      │ │ │  True
      │ │ │ @@ -273,21 +273,21 @@
      │ │ │  ValueError: Dimension 'gps_time' does not exist
      │ │ │  
      │ │ │
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -add_extra_dimension(param: ExtraBytesParams) None[source]
      │ │ │ +add_extra_dimension(param: ExtraBytesParams) None[source] │ │ │

      Add an extra, user-defined dimension

      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -remove_extra_dimension(name: str) None[source]
      │ │ │ +remove_extra_dimension(name: str) None[source] │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ dtype()[source]
      │ │ │

      Returns the numpy.dtype used to store the point records in a numpy array

      │ │ │
      │ │ │ ├── html2text {} │ │ │ │ @@ -34,31 +34,31 @@ │ │ │ │ # _l_a_s_p_y_._l_a_s_w_r_i_t_e_r_ _m_o_d_u_l_e │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.point.format module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..ppooiinntt..ffoorrmmaatt mmoodduullee_? ************ │ │ │ │ - ccllaassss laspy.point.format.ExtraBytesParams(nnaammee:: _ss_tt_rr, ttyyppee:: _ss_tt_rr || ddttyyppee || _TT_yy_pp_ee │ │ │ │ - [[uuiinntt88]], ddeessccrriippttiioonn:: _ss_tt_rr == '''', ooffffsseettss:: _II_tt_ee_rr_aa_bb_ll_ee[[nnuummbbeerr || _ff_ll_oo_aa_tt || _ii_nn_tt]] || │ │ │ │ - _NN_oo_nn_ee == NNoonnee, ssccaalleess:: _II_tt_ee_rr_aa_bb_ll_ee[[nnuummbbeerr || _ff_ll_oo_aa_tt || _ii_nn_tt]] || _NN_oo_nn_ee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + ccllaassss laspy.point.format.ExtraBytesParams(nnaammee:: ssttrr, ttyyppee:: ssttrr || ddttyyppee || TTyyppee │ │ │ │ + [[uuiinntt88]], ddeessccrriippttiioonn:: ssttrr == '''', ooffffsseettss:: IItteerraabbllee[[nnuummbbeerr || ffllooaatt || iinntt]] || │ │ │ │ + NNoonnee == NNoonnee, ssccaalleess:: IItteerraabbllee[[nnuummbbeerr || ffllooaatt || iinntt]] || NNoonnee == NNoonnee)_[_s_o_u_r_c_e_]_ │ │ │ │ + Bases: object │ │ │ │ All parameters needed to create extra bytes │ │ │ │ name_ │ │ │ │ The name of the extra dimension │ │ │ │ type_ │ │ │ │ The type of the extra dimension │ │ │ │ description_ │ │ │ │ A description of the extra dimension │ │ │ │ offsets_ │ │ │ │ The offsets to use if its a ‘scaled dimension’, can be none │ │ │ │ scales_ │ │ │ │ The scales to use if its a ‘scaled dimension’, can be none │ │ │ │ - ccllaassss laspy.point.format.PointFormat(ppooiinntt__ffoorrmmaatt__iidd:: _ii_nn_tt)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + ccllaassss laspy.point.format.PointFormat(ppooiinntt__ffoorrmmaatt__iidd:: iinntt)_[_s_o_u_r_c_e_]_ │ │ │ │ + Bases: object │ │ │ │ Class that contains the informations about the dimensions that forms a │ │ │ │ PointFormat. │ │ │ │ A PointFormat has ‘standard’ dimensions (dimensions defined in the LAS │ │ │ │ standard, each point format has its set of dimensions), but it can also │ │ │ │ have extra (non-standard) dimensions defined by the user) │ │ │ │ >>> fmt = PointFormat(3) │ │ │ │ >>> all(dim.is_standard for dim in fmt.dimensions) │ │ │ │ @@ -67,70 +67,70 @@ │ │ │ │ ["classification"] │ │ │ │ >>> dim.max │ │ │ │ 31 │ │ │ │ >>> dim.min │ │ │ │ 0 │ │ │ │ >>> dim.num_bits │ │ │ │ 5 │ │ │ │ - pprrooppeerrttyy standard_dimensions:: _II_tt_ee_rr_aa_bb_ll_ee[[DDiimmeennssiioonnIInnffoo]]_ │ │ │ │ + pprrooppeerrttyy standard_dimensions:: IItteerraabbllee[[DDiimmeennssiioonnIInnffoo]]_ │ │ │ │ Returns an iterable of the standard dimensions │ │ │ │ >>> fmt = PointFormat(0) │ │ │ │ >>> standard_dims = list(fmt.standard_dimensions) │ │ │ │ >>> len(standard_dims) │ │ │ │ 15 │ │ │ │ >>> standard_dims[4].name │ │ │ │ 'return_number' │ │ │ │ - pprrooppeerrttyy extra_dimensions:: _II_tt_ee_rr_aa_bb_ll_ee[[DDiimmeennssiioonnIInnffoo]]_ │ │ │ │ - pprrooppeerrttyy dimension_names:: _II_tt_ee_rr_aa_bb_ll_ee[[_ss_tt_rr]]_ │ │ │ │ + pprrooppeerrttyy extra_dimensions:: IItteerraabbllee[[DDiimmeennssiioonnIInnffoo]]_ │ │ │ │ + pprrooppeerrttyy dimension_names:: IItteerraabbllee[[ssttrr]]_ │ │ │ │ Returns the names of the dimensions contained in the point format │ │ │ │ - pprrooppeerrttyy standard_dimension_names:: _II_tt_ee_rr_aa_bb_ll_ee[[_ss_tt_rr]]_ │ │ │ │ + pprrooppeerrttyy standard_dimension_names:: IItteerraabbllee[[ssttrr]]_ │ │ │ │ Returns the names of the extra dimensions in this point format │ │ │ │ - pprrooppeerrttyy extra_dimension_names:: _II_tt_ee_rr_aa_bb_ll_ee[[_ss_tt_rr]]_ │ │ │ │ + pprrooppeerrttyy extra_dimension_names:: IItteerraabbllee[[ssttrr]]_ │ │ │ │ Returns the names of the extra dimensions in this point format │ │ │ │ - pprrooppeerrttyy size:: _ii_nn_tt_ │ │ │ │ + pprrooppeerrttyy size:: iinntt_ │ │ │ │ Returns the number of bytes (standard + extra) a point takes │ │ │ │ >>> PointFormat(3).size │ │ │ │ 34 │ │ │ │ >>> fmt = PointFormat(3) │ │ │ │ >>> fmt.add_extra_dimension(ExtraBytesParams("codification", │ │ │ │ "uint64")) │ │ │ │ >>> fmt.size │ │ │ │ 42 │ │ │ │ - pprrooppeerrttyy num_standard_bytes:: _ii_nn_tt_ │ │ │ │ + pprrooppeerrttyy num_standard_bytes:: iinntt_ │ │ │ │ Returns the number of bytes used by standard dims │ │ │ │ >>> fmt = PointFormat(3) │ │ │ │ >>> fmt.add_extra_dimension(ExtraBytesParams("codification", │ │ │ │ "uint64")) │ │ │ │ >>> fmt.num_standard_bytes │ │ │ │ 34 │ │ │ │ - pprrooppeerrttyy num_extra_bytes:: _ii_nn_tt_ │ │ │ │ + pprrooppeerrttyy num_extra_bytes:: iinntt_ │ │ │ │ Returns the number of extra bytes │ │ │ │ >>> fmt = PointFormat(3) │ │ │ │ >>> fmt.add_extra_dimension(ExtraBytesParams("codification", │ │ │ │ "uint64")) │ │ │ │ >>> fmt.num_extra_bytes │ │ │ │ 8 │ │ │ │ pprrooppeerrttyy has_waveform_packet_ │ │ │ │ Returns True if the point format has waveform packet dimensions │ │ │ │ - dimension_by_name(nnaammee:: _ss_tt_rr) → DimensionInfo_[_s_o_u_r_c_e_]_ │ │ │ │ + dimension_by_name(nnaammee:: ssttrr) → DimensionInfo_[_s_o_u_r_c_e_]_ │ │ │ │ Returns the dimension info for the dimension by name │ │ │ │ ValueError is raised if the dimension does not exist un the point │ │ │ │ format │ │ │ │ >>> info = PointFormat(2).dimension_by_name('number_of_returns') │ │ │ │ >>> info.name == 'number_of_returns' │ │ │ │ True │ │ │ │ >>> info.num_bits == 3 │ │ │ │ True │ │ │ │ >>> info = PointFormat(2).dimension_by_name('gps_time') │ │ │ │ Traceback (most recent call last): │ │ │ │ ... │ │ │ │ ValueError: Dimension 'gps_time' does not exist │ │ │ │ - add_extra_dimension(ppaarraamm:: _EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + add_extra_dimension(ppaarraamm:: _EE_xx_tt_rr_aa_BB_yy_tt_ee_ss_PP_aa_rr_aa_mm_ss) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Add an extra, user-defined dimension │ │ │ │ - remove_extra_dimension(nnaammee:: _ss_tt_rr) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + remove_extra_dimension(nnaammee:: ssttrr) → None_[_s_o_u_r_c_e_]_ │ │ │ │ dtype()_[_s_o_u_r_c_e_]_ │ │ │ │ Returns the numpy.dtype used to store the point records in a numpy │ │ │ │ array │ │ │ │ Note │ │ │ │ The dtype corresponds to the dtype with sub_fields ppaacckkeedd into │ │ │ │ their composed fields │ │ │ │ laspy.point.format.lost_dimensions(ppooiinntt__ffmmtt__iinn, ppooiinntt__ffmmtt__oouutt)_[_s_o_u_r_c_e_]_ │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.point.record.html │ │ │ @@ -131,15 +131,15 @@ │ │ │
      │ │ │ laspy.point.record.unscale_dimension(array_dim, scale, offset)[source]
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ class laspy.point.record.DimensionNameValidity(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
      │ │ │ -

      Bases: Enum

      │ │ │ +

      Bases: Enum

      │ │ │

      Helper class to make the return value of │ │ │ PackedPointRecord.validate_dimentsion_name more expressive.

      │ │ │
      │ │ │
      │ │ │ Valid = 1
      │ │ │
      │ │ │ │ │ │ @@ -154,15 +154,15 @@ │ │ │
      │ │ │ │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ class laspy.point.record.PackedPointRecord(data: ndarray, point_format: PointFormat)[source]
      │ │ │ -

      Bases: object

      │ │ │ +

      Bases: object

      │ │ │

      In the PackedPointRecord, fields that are a combinations of many sub-fields (fields stored on less than a byte) │ │ │ are still packed together and are only de-packed and re-packed when accessed.

      │ │ │

      This uses of less memory than if the sub-fields were unpacked

      │ │ │
      >>> #return number is a sub-field
      │ │ │  >>> from laspy import PointFormat, PackedPointRecord
      │ │ │  >>> packed_point_record = PackedPointRecord.zeros(10,PointFormat(0))
      │ │ │  >>> return_number = packed_point_record['return_number']
      │ │ │ @@ -178,28 +178,28 @@
      │ │ │  property point_size
      │ │ │  

      Returns the point size in bytes taken by each points of the record

      │ │ │
      │ │ │
      Returns:
      │ │ │

      The point size in byte

      │ │ │
      │ │ │
      Return type:
      │ │ │ -

      int

      │ │ │ +

      int

      │ │ │
      │ │ │
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ static zeros(point_count, point_format)[source]
      │ │ │

      Creates a new point record with all dimensions initialized to zero

      │ │ │
      │ │ │
      Parameters:
      │ │ │
        │ │ │
      • point_format (PointFormat) – The point format id the point record should have

      • │ │ │ -
      • point_count (int) – The number of point the point record should have

      • │ │ │ +
      • point_count (int) – The number of point the point record should have

      • │ │ │
      │ │ │
      │ │ │
      Return type:
      │ │ │

      PackedPointRecord

      │ │ │
      │ │ │
      │ │ │
      │ │ │ @@ -228,44 +228,44 @@ │ │ │
      │ │ │
      │ │ │ classmethod from_buffer(buffer, point_format, count=-1, offset=0)[source]
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -copy_fields_from(other_record: PackedPointRecord) None[source]
      │ │ │ +copy_fields_from(other_record: PackedPointRecord) None[source] │ │ │

      Tries to copy the values of the current dimensions from other_record

      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ copy() PackedPointRecord[source]
      │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -memoryview() memoryview[source]
      │ │ │ +memoryview() memoryview[source] │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -resize(new_size: int) None[source]
      │ │ │ +resize(new_size: int) None[source] │ │ │
      │ │ │ │ │ │
      │ │ │
      │ │ │ -validate_dimension_name(key: str) DimensionNameValidity[source]
      │ │ │ +validate_dimension_name(key: str) DimensionNameValidity[source] │ │ │

      Given a name of a dimension this validates it.

      │ │ │
      │ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -laspy.point.record.apply_new_scaling(record, scales: ndarray, offsets: ndarray) None[source]
│ │ │ +laspy.point.record.apply_new_scaling(record, scales: ndarray, offsets: ndarray) None[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ class laspy.point.record.ScaleAwarePointRecord(array, point_format, scales, offsets)[source]
│ │ │

Bases: PackedPointRecord

│ │ │

A ScaleAwarePointRecord is a point record that knows the scales and offets │ │ │ @@ -306,15 +306,15 @@ │ │ │

│ │ │ static empty(point_format=None, scales=None, offsets=None, header=None)[source]
│ │ │

Creates an empty point record.

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -change_scaling(scales=None, offsets=None) None[source]
│ │ │ +change_scaling(scales=None, offsets=None) None[source] │ │ │

See LasData.change_scaling()

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -45,23 +45,23 @@ │ │ │ │ represented using Numpy’s structured arrays, The PointRecord classes provide a │ │ │ │ few extra things to manage these arrays in the context of Las point data │ │ │ │ laspy.point.record.scale_dimension(aarrrraayy__ddiimm, ssccaallee, ooffffsseett)_[_s_o_u_r_c_e_]_ │ │ │ │ laspy.point.record.unscale_dimension(aarrrraayy__ddiimm, ssccaallee, ooffffsseett)_[_s_o_u_r_c_e_]_ │ │ │ │ ccllaassss laspy.point.record.DimensionNameValidity(vvaalluuee, nnaammeess==<>, │ │ │ │ **vvaalluueess, mmoodduullee==NNoonnee, qquuaallnnaammee==NNoonnee, ttyyppee==NNoonnee, ssttaarrtt==11, bboouunnddaarryy==NNoonnee) │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _E_n_u_m │ │ │ │ + Bases: Enum │ │ │ │ Helper class to make the return value of │ │ │ │ PackedPointRecord.validate_dimentsion_name more expressive. │ │ │ │ Valid == 11_ │ │ │ │ Unsupported == 22_ │ │ │ │ Invalid == 33_ │ │ │ │ ccllaassss laspy.point.record.PackedPointRecord(ddaattaa:: nnddaarrrraayy, ppooiinntt__ffoorrmmaatt:: │ │ │ │ _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _o_b_j_e_c_t │ │ │ │ + Bases: object │ │ │ │ In the PackedPointRecord, fields that are a combinations of many sub- │ │ │ │ fields (fields stored on less than a byte) are still packed together and │ │ │ │ are only de-packed and re-packed when accessed. │ │ │ │ This uses of less memory than if the sub-fields were unpacked │ │ │ │ >>> #return number is a sub-field │ │ │ │ >>> from laspy import PointFormat, PackedPointRecord │ │ │ │ >>> packed_point_record = PackedPointRecord.zeros(10,PointFormat(0)) │ │ │ │ @@ -72,21 +72,21 @@ │ │ │ │ >>> bool(np.all(packed_point_record['return_number'] == 1)) │ │ │ │ True │ │ │ │ pprrooppeerrttyy point_size_ │ │ │ │ Returns the point size in bytes taken by each points of the record │ │ │ │ Returns: │ │ │ │ The point size in byte │ │ │ │ Return type: │ │ │ │ - _i_n_t │ │ │ │ + int │ │ │ │ ssttaattiicc zeros(ppooiinntt__ccoouunntt, ppooiinntt__ffoorrmmaatt)_[_s_o_u_r_c_e_]_ │ │ │ │ Creates a new point record with all dimensions initialized to zero │ │ │ │ Parameters: │ │ │ │ * ppooiinntt__ffoorrmmaatt (_PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt) – The point format id the │ │ │ │ point record should have │ │ │ │ - * ppooiinntt__ccoouunntt (_ii_nn_tt) – The number of point the point │ │ │ │ + * ppooiinntt__ccoouunntt (iinntt) – The number of point the point │ │ │ │ record should have │ │ │ │ Return type: │ │ │ │ _P_a_c_k_e_d_P_o_i_n_t_R_e_c_o_r_d │ │ │ │ ssttaattiicc empty(ppooiinntt__ffoorrmmaatt)_[_s_o_u_r_c_e_]_ │ │ │ │ Creates an empty point record. │ │ │ │ Parameters: │ │ │ │ ppooiinntt__ffoorrmmaatt (llaassppyy..PPooiinnttFFoorrmmaatt) – The point format id the │ │ │ │ @@ -95,24 +95,24 @@ │ │ │ │ _P_a_c_k_e_d_P_o_i_n_t_R_e_c_o_r_d │ │ │ │ ccllaassssmmeetthhoodd from_point_record(ootthheerr__ppooiinntt__rreeccoorrdd:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd, │ │ │ │ nneeww__ppooiinntt__ffoorrmmaatt:: _PP_oo_ii_nn_tt_FF_oo_rr_mm_aa_tt) → _P_a_c_k_e_d_P_o_i_n_t_R_e_c_o_r_d_[_s_o_u_r_c_e_]_ │ │ │ │ Construct a new PackedPointRecord from an existing one with the │ │ │ │ ability to change to point format while doing so │ │ │ │ ccllaassssmmeetthhoodd from_buffer(bbuuffffeerr, ppooiinntt__ffoorrmmaatt, ccoouunntt==--11, ooffffsseett==00) │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ │ │ - copy_fields_from(ootthheerr__rreeccoorrdd:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + copy_fields_from(ootthheerr__rreeccoorrdd:: _PP_aa_cc_kk_ee_dd_PP_oo_ii_nn_tt_RR_ee_cc_oo_rr_dd) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Tries to copy the values of the current dimensions from │ │ │ │ other_record │ │ │ │ copy() → _P_a_c_k_e_d_P_o_i_n_t_R_e_c_o_r_d_[_s_o_u_r_c_e_]_ │ │ │ │ - memoryview() → _m_e_m_o_r_y_v_i_e_w_[_s_o_u_r_c_e_]_ │ │ │ │ - resize(nneeww__ssiizzee:: _ii_nn_tt) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ - validate_dimension_name(kkeeyy:: _ss_tt_rr) → _D_i_m_e_n_s_i_o_n_N_a_m_e_V_a_l_i_d_i_t_y_[_s_o_u_r_c_e_]_ │ │ │ │ + memoryview() → memoryview_[_s_o_u_r_c_e_]_ │ │ │ │ + resize(nneeww__ssiizzee:: iinntt) → None_[_s_o_u_r_c_e_]_ │ │ │ │ + validate_dimension_name(kkeeyy:: ssttrr) → _D_i_m_e_n_s_i_o_n_N_a_m_e_V_a_l_i_d_i_t_y_[_s_o_u_r_c_e_]_ │ │ │ │ Given a name of a dimension this validates it. │ │ │ │ laspy.point.record.apply_new_scaling(rreeccoorrdd, ssccaalleess:: nnddaarrrraayy, ooffffsseettss:: │ │ │ │ - nnddaarrrraayy) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + nnddaarrrraayy) → None_[_s_o_u_r_c_e_]_ │ │ │ │ ccllaassss laspy.point.record.ScaleAwarePointRecord(aarrrraayy, ppooiinntt__ffoorrmmaatt, ssccaalleess, │ │ │ │ ooffffsseettss)_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _P_a_c_k_e_d_P_o_i_n_t_R_e_c_o_r_d │ │ │ │ A ScaleAwarePointRecord is a point record that knows the scales and │ │ │ │ offets to use, and is thus able to get and set the scaled x, y, z │ │ │ │ coordinates │ │ │ │ To create one, use _S_c_a_l_e_A_w_a_r_e_P_o_i_n_t_R_e_c_o_r_d_._z_e_r_o_s_(_) or │ │ │ │ @@ -141,13 +141,13 @@ │ │ │ │ point_format=PointFormat(3)) │ │ │ │ Traceback (most recent call last): │ │ │ │ ValueError: You have to provide all 3: point_format, scale and │ │ │ │ offsets │ │ │ │ ssttaattiicc empty(ppooiinntt__ffoorrmmaatt==NNoonnee, ssccaalleess==NNoonnee, ooffffsseettss==NNoonnee, hheeaaddeerr==NNoonnee) │ │ │ │ _[_s_o_u_r_c_e_]_ │ │ │ │ Creates an empty point record. │ │ │ │ - change_scaling(ssccaalleess==NNoonnee, ooffffsseettss==NNoonnee) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + change_scaling(ssccaalleess==NNoonnee, ooffffsseettss==NNoonnee) → None_[_s_o_u_r_c_e_]_ │ │ │ │ See _L_a_s_D_a_t_a_._c_h_a_n_g_e___s_c_a_l_i_n_g_(_) │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.known.html │ │ │ @@ -130,75 +130,75 @@ │ │ │

laspy.vlrs.known module

│ │ │

The definition of the VLR Header, VLR, the KnownVLRs │ │ │ are in this module.

│ │ │

A KnownVLR is a VLR for which we know how to parse its record_data

│ │ │
│ │ │
│ │ │ class laspy.vlrs.known.IKnownVLR[source]
│ │ │ -

Bases: ABC

│ │ │ +

Bases: ABC

│ │ │

Interface that any KnownVLR must implement. │ │ │ A KnownVLR is a VLR for which we know how to parse its record_data

│ │ │

Implementing this interfaces allows to automatically call the │ │ │ right parser for the right VLR when reading them.

│ │ │
│ │ │
│ │ │ -abstract static official_user_id() str[source]
│ │ │ +abstract static official_user_id() str[source] │ │ │

Shall return the official user_id as described in the documentation

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -abstract static official_record_ids() Tuple[int, ...][source]
│ │ │ +abstract static official_record_ids() Tuple[int, ...][source] │ │ │

Shall return the official record_id for the VLR

│ │ │
│ │ │

Note

│ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │
│ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -abstract record_data_bytes() bytes[source]
│ │ │ +abstract record_data_bytes() bytes[source] │ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -abstract parse_record_data(record_data: bytes) None[source]
│ │ │ +abstract parse_record_data(record_data: bytes) None[source] │ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ class laspy.vlrs.known.BaseKnownVLR(record_id=None, description='')[source]
│ │ │ -

Bases: BaseVLR, IKnownVLR, ABC

│ │ │ +

Bases: BaseVLR, IKnownVLR, ABC

│ │ │

Base Class to factorize common code between the different type of Known VLRs

│ │ │
│ │ │
│ │ │ classmethod from_raw(raw: VLR)[source]
│ │ │
│ │ │ │ │ │
│ │ │ @@ -213,116 +213,116 @@ │ │ │ >>> lookup[2] = "ground" │ │ │ >>> lookup[0] │ │ │ 'never_classified' │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -parse_record_data(record_data: bytes) None[source]
│ │ │ +parse_record_data(record_data: bytes) None[source] │ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -record_data_bytes() bytes[source]
│ │ │ +record_data_bytes() bytes[source] │ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -static official_user_id() str[source]
│ │ │ +static official_user_id() str[source] │ │ │

Shall return the official user_id as described in the documentation

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -static official_record_ids() Tuple[int, ...][source]
│ │ │ +static official_record_ids() Tuple[int, ...][source] │ │ │

Shall return the official record_id for the VLR

│ │ │
│ │ │

Note

│ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │
│ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -class laspy.vlrs.known.LasZipVlr(data: bytes)[source]
│ │ │ +class laspy.vlrs.known.LasZipVlr(data: bytes)[source] │ │ │

Bases: BaseKnownVLR

│ │ │

Contains the information needed by laszip (or any other laz backend) │ │ │ to compress the point records.

│ │ │
│ │ │
│ │ │ -parse_record_data(record_data: bytes) None[source]
│ │ │ +parse_record_data(record_data: bytes) None[source] │ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -record_data_bytes() bytes[source]
│ │ │ +record_data_bytes() bytes[source] │ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -static official_user_id() str[source]
│ │ │ +static official_user_id() str[source] │ │ │

Shall return the official user_id as described in the documentation

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -static official_record_ids() Tuple[int, ...][source]
│ │ │ +static official_record_ids() Tuple[int, ...][source] │ │ │

Shall return the official record_id for the VLR

│ │ │
│ │ │

Note

│ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │
│ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ classmethod from_raw(raw_vlr)[source]
│ │ │ @@ -372,15 +372,15 @@ │ │ │
│ │ │
│ │ │ property max
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property offset: Any | None
│ │ │ +property offset: Any | None │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ property scale
│ │ │
│ │ │ │ │ │ @@ -392,15 +392,15 @@ │ │ │
│ │ │
│ │ │ dtype() dtype[source]
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -num_elements() int[source]
│ │ │ +num_elements() int[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ static size()[source]
│ │ │
│ │ │ │ │ │ @@ -448,37 +448,37 @@ │ │ │

Bases: BaseKnownVLR

│ │ │
│ │ │
│ │ │ parse_record_data(data)[source]
│ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ record_data_bytes()[source]
│ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -type_of_extra_dims() List[ExtraBytesParams][source]
│ │ │ +type_of_extra_dims() List[ExtraBytesParams][source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ static official_user_id()[source]
│ │ │

Shall return the official user_id as described in the documentation

│ │ │
│ │ │ @@ -492,15 +492,15 @@ │ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │ │ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -556,30 +556,30 @@ │ │ │

Bases: BaseKnownVLR

│ │ │
│ │ │
│ │ │ parse_record_data(record_data)[source]
│ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ record_data_bytes()[source]
│ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ static official_record_ids()[source]
│ │ │ @@ -589,15 +589,15 @@ │ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │ │ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ static official_user_id()[source]
│ │ │ @@ -687,30 +687,30 @@ │ │ │

Bases: BaseKnownVLR

│ │ │
│ │ │
│ │ │ parse_record_data(record_data)[source]
│ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ record_data_bytes()[source]
│ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ parse_crs()[source]
│ │ │ @@ -731,15 +731,15 @@ │ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │ │ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ @@ -749,30 +749,30 @@ │ │ │

Stores all of the double valued GeoKeys.

│ │ │
│ │ │
│ │ │ parse_record_data(record_data)[source]
│ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ record_data_bytes()[source]
│ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ static official_user_id()[source]
│ │ │ @@ -788,15 +788,15 @@ │ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │ │ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -809,30 +809,30 @@ │ │ │ the null-terminator ` but `|.

│ │ │
│ │ │
│ │ │ parse_record_data(record_data)[source]
│ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ record_data_bytes()[source]
│ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ static official_user_id()[source]
│ │ │ @@ -848,15 +848,15 @@ │ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │ │ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ @@ -870,30 +870,30 @@ │ │ │
│ │ │
│ │ │
│ │ │ parse_record_data(record_data)[source]
│ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ record_data_bytes()[source]
│ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ static official_user_id()[source]
│ │ │ @@ -909,15 +909,15 @@ │ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │ │ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ @@ -928,30 +928,30 @@ │ │ │ “LAS is not using the “ESRI WKT”

│ │ │
│ │ │
│ │ │ parse_record_data(record_data)[source]
│ │ │

Shall parse the given record_data into a user-friendlier structure

│ │ │
│ │ │
Parameters:
│ │ │ -

record_data (bytes) – The record_data bytes read from the file

│ │ │ +

record_data (bytes) – The record_data bytes read from the file

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ record_data_bytes()[source]
│ │ │

Shall return the bytes corresponding to the record_data part of the VLR │ │ │ as they should be written in the file.

│ │ │
│ │ │
Returns:
│ │ │

The bytes of the vlr’s record_data

│ │ │
│ │ │
Return type:
│ │ │ -

bytes

│ │ │ +

bytes

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ parse_crs()[source]
│ │ │ @@ -972,15 +972,15 @@ │ │ │

Even if the VLR has one record_id, the return type must be a tuple

│ │ │ │ │ │
│ │ │
Returns:
│ │ │

The record_ids this VLR type can have

│ │ │
│ │ │
Return type:
│ │ │ -

tuple of int

│ │ │ +

tuple of int

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ ├── html2text {} │ │ │ │ @@ -50,118 +50,118 @@ │ │ │ │ * laspy.vlrs.known module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..vvllrrss..kknnoowwnn mmoodduullee_? ************ │ │ │ │ The definition of the VLR Header, VLR, the KnownVLRs are in this module. │ │ │ │ A KnownVLR is a VLR for which we know how to parse its record_data │ │ │ │ ccllaassss laspy.vlrs.known.IKnownVLR_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _A_B_C │ │ │ │ + Bases: ABC │ │ │ │ Interface that any KnownVLR must implement. A KnownVLR is a VLR for which │ │ │ │ we know how to parse its record_data │ │ │ │ Implementing this interfaces allows to automatically call the right │ │ │ │ parser for the right VLR when reading them. │ │ │ │ - aabbssttrraacctt ssttaattiicc official_user_id() → _s_t_r_[_s_o_u_r_c_e_]_ │ │ │ │ + aabbssttrraacctt ssttaattiicc official_user_id() → str_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ - aabbssttrraacctt ssttaattiicc official_record_ids() → _T_u_p_l_e[_i_n_t, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ + aabbssttrraacctt ssttaattiicc official_record_ids() → Tuple[int, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ - aabbssttrraacctt record_data_bytes() → _b_y_t_e_s_[_s_o_u_r_c_e_]_ │ │ │ │ + tuple of int │ │ │ │ + aabbssttrraacctt record_data_bytes() → bytes_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ - aabbssttrraacctt parse_record_data(rreeccoorrdd__ddaattaa:: _bb_yy_tt_ee_ss) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + bytes │ │ │ │ + aabbssttrraacctt parse_record_data(rreeccoorrdd__ddaattaa:: bbyytteess) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ ccllaassss laspy.vlrs.known.BaseKnownVLR(rreeccoorrdd__iidd==NNoonnee, ddeessccrriippttiioonn=='''')_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: BaseVLR, _I_K_n_o_w_n_V_L_R, _A_B_C │ │ │ │ + Bases: BaseVLR, _I_K_n_o_w_n_V_L_R, ABC │ │ │ │ Base Class to factorize common code between the different type of Known │ │ │ │ VLRs │ │ │ │ ccllaassssmmeetthhoodd from_raw(rraaww:: _VV_LL_RR)_[_s_o_u_r_c_e_]_ │ │ │ │ ccllaassss laspy.vlrs.known.ClassificationLookupVlr_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ This vlr maps class numbers to short descriptions / names │ │ │ │ >>> lookup = ClassificationLookupVlr() │ │ │ │ >>> lookup[0] = "never_classified" │ │ │ │ >>> lookup[2] = "ground" │ │ │ │ >>> lookup[0] │ │ │ │ 'never_classified' │ │ │ │ - parse_record_data(rreeccoorrdd__ddaattaa:: _bb_yy_tt_ee_ss) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + parse_record_data(rreeccoorrdd__ddaattaa:: bbyytteess) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ - record_data_bytes() → _b_y_t_e_s_[_s_o_u_r_c_e_]_ │ │ │ │ + record_data_bytes() → bytes_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ - ssttaattiicc official_user_id() → _s_t_r_[_s_o_u_r_c_e_]_ │ │ │ │ + bytes │ │ │ │ + ssttaattiicc official_user_id() → str_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ - ssttaattiicc official_record_ids() → _T_u_p_l_e[_i_n_t, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ + ssttaattiicc official_record_ids() → Tuple[int, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ - ccllaassss laspy.vlrs.known.LasZipVlr(ddaattaa:: _bb_yy_tt_ee_ss)_[_s_o_u_r_c_e_]_ │ │ │ │ + tuple of int │ │ │ │ + ccllaassss laspy.vlrs.known.LasZipVlr(ddaattaa:: bbyytteess)_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ Contains the information needed by laszip (or any other laz backend) to │ │ │ │ compress the point records. │ │ │ │ - parse_record_data(rreeccoorrdd__ddaattaa:: _bb_yy_tt_ee_ss) → _N_o_n_e_[_s_o_u_r_c_e_]_ │ │ │ │ + parse_record_data(rreeccoorrdd__ddaattaa:: bbyytteess) → None_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ - record_data_bytes() → _b_y_t_e_s_[_s_o_u_r_c_e_]_ │ │ │ │ + record_data_bytes() → bytes_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ - ssttaattiicc official_user_id() → _s_t_r_[_s_o_u_r_c_e_]_ │ │ │ │ + bytes │ │ │ │ + ssttaattiicc official_user_id() → str_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ - ssttaattiicc official_record_ids() → _T_u_p_l_e[_i_n_t, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ + ssttaattiicc official_record_ids() → Tuple[int, ...]_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ ccllaassssmmeetthhoodd from_raw(rraaww__vvllrr)_[_s_o_u_r_c_e_]_ │ │ │ │ ccllaassss laspy.vlrs.known.ExtraBytesStruct_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: Structure │ │ │ │ NO_DATA_BIT_MASK == 11_ │ │ │ │ MIN_BIT_MASK == 22_ │ │ │ │ MAX_BIT_MASK == 44_ │ │ │ │ SCALE_BIT_MASK == 88_ │ │ │ │ OFFSET_BIT_MASK == 1166_ │ │ │ │ pprrooppeerrttyy no_data_ │ │ │ │ pprrooppeerrttyy min_ │ │ │ │ pprrooppeerrttyy max_ │ │ │ │ - pprrooppeerrttyy offset:: _AA_nn_yy || _NN_oo_nn_ee_ │ │ │ │ + pprrooppeerrttyy offset:: AAnnyy || NNoonnee_ │ │ │ │ pprrooppeerrttyy scale_ │ │ │ │ format_name()_[_s_o_u_r_c_e_]_ │ │ │ │ dtype() → dtype_[_s_o_u_r_c_e_]_ │ │ │ │ - num_elements() → _i_n_t_[_s_o_u_r_c_e_]_ │ │ │ │ + num_elements() → int_[_s_o_u_r_c_e_]_ │ │ │ │ ssttaattiicc size()_[_s_o_u_r_c_e_]_ │ │ │ │ data_type_ │ │ │ │ Structure/Union member │ │ │ │ description_ │ │ │ │ Structure/Union member │ │ │ │ name_ │ │ │ │ Structure/Union member │ │ │ │ @@ -172,34 +172,34 @@ │ │ │ │ unused_ │ │ │ │ Structure/Union member │ │ │ │ ccllaassss laspy.vlrs.known.ExtraBytesVlr_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ parse_record_data(ddaattaa)_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ record_data_bytes()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ - type_of_extra_dims() → _L_i_s_t[_E_x_t_r_a_B_y_t_e_s_P_a_r_a_m_s]_[_s_o_u_r_c_e_]_ │ │ │ │ + bytes │ │ │ │ + type_of_extra_dims() → List[_E_x_t_r_a_B_y_t_e_s_P_a_r_a_m_s]_[_s_o_u_r_c_e_]_ │ │ │ │ ssttaattiicc official_user_id()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ ssttaattiicc official_record_ids()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ ccllaassss laspy.vlrs.known.WaveformPacketStruct_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: Structure │ │ │ │ ssttaattiicc size()_[_s_o_u_r_c_e_]_ │ │ │ │ bits_per_sample_ │ │ │ │ Structure/Union member │ │ │ │ digitizer_gain_ │ │ │ │ Structure/Union member │ │ │ │ @@ -212,31 +212,31 @@ │ │ │ │ waveform_compression_type_ │ │ │ │ Structure/Union member │ │ │ │ ccllaassss laspy.vlrs.known.WaveformPacketVlr(rreeccoorrdd__iidd, ddeessccrriippttiioonn=='''')_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ parse_record_data(rreeccoorrdd__ddaattaa)_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ record_data_bytes()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ + bytes │ │ │ │ ssttaattiicc official_record_ids()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ ssttaattiicc official_user_id()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ ccllaassssmmeetthhoodd from_raw(rraaww__vvllrr)_[_s_o_u_r_c_e_]_ │ │ │ │ ccllaassss laspy.vlrs.known.GeoKeyEntryStruct_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: Structure │ │ │ │ ssttaattiicc size()_[_s_o_u_r_c_e_]_ │ │ │ │ count_ │ │ │ │ @@ -259,141 +259,141 @@ │ │ │ │ number_of_keys_ │ │ │ │ Structure/Union member │ │ │ │ ccllaassss laspy.vlrs.known.GeoKeyDirectoryVlr_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ parse_record_data(rreeccoorrdd__ddaattaa)_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ record_data_bytes()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ + bytes │ │ │ │ parse_crs()_[_s_o_u_r_c_e_]_ │ │ │ │ ssttaattiicc official_user_id()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ ssttaattiicc official_record_ids()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ ccllaassss laspy.vlrs.known.GeoDoubleParamsVlr_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ Stores all of thedoublevalued GeoKeys. │ │ │ │ parse_record_data(rreeccoorrdd__ddaattaa)_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ record_data_bytes()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ + bytes │ │ │ │ ssttaattiicc official_user_id()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ ssttaattiicc official_record_ids()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ ccllaassss laspy.vlrs.known.GeoAsciiParamsVlr_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ Stores all of theASCIIvalued GeoKeys. │ │ │ │ From GeoTIFF’s spec: To avoid problems with naive tiff dump programs the │ │ │ │ separator between geokeys is not the null-terminator` but `|. │ │ │ │ parse_record_data(rreeccoorrdd__ddaattaa)_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ record_data_bytes()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ + bytes │ │ │ │ ssttaattiicc official_user_id()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ ssttaattiicc official_record_ids()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ ccllaassss laspy.vlrs.known.WktMathTransformVlr_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ From the Spec: │ │ │ │ Note that the math transform WKT record is added for completeness, │ │ │ │ and a coordinate system WKT may or may not require a math transform │ │ │ │ WKT record │ │ │ │ parse_record_data(rreeccoorrdd__ddaattaa)_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ record_data_bytes()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ + bytes │ │ │ │ ssttaattiicc official_user_id()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ ssttaattiicc official_record_ids()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ ccllaassss laspy.vlrs.known.WktCoordinateSystemVlr(wwkktt__ssttrriinngg=='''')_[_s_o_u_r_c_e_]_ │ │ │ │ Bases: _B_a_s_e_K_n_o_w_n_V_L_R │ │ │ │ Replaces Coordinates Reference System for new las files (point fmt >= 5) │ │ │ │ “LAS is not using the “ESRI WKT” │ │ │ │ parse_record_data(rreeccoorrdd__ddaattaa)_[_s_o_u_r_c_e_]_ │ │ │ │ Shall parse the given record_data into a user-friendlier structure │ │ │ │ Parameters: │ │ │ │ - rreeccoorrdd__ddaattaa (_bb_yy_tt_ee_ss) – The record_data bytes read from the │ │ │ │ + rreeccoorrdd__ddaattaa (bbyytteess) – The record_data bytes read from the │ │ │ │ file │ │ │ │ record_data_bytes()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the bytes corresponding to the record_data part of the │ │ │ │ VLR as they should be written in the file. │ │ │ │ Returns: │ │ │ │ The bytes of the vlr’s record_data │ │ │ │ Return type: │ │ │ │ - _b_y_t_e_s │ │ │ │ + bytes │ │ │ │ parse_crs()_[_s_o_u_r_c_e_]_ │ │ │ │ ssttaattiicc official_user_id()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official user_id as described in the documentation │ │ │ │ ssttaattiicc official_record_ids()_[_s_o_u_r_c_e_]_ │ │ │ │ Shall return the official record_id for the VLR │ │ │ │ Note │ │ │ │ Even if the VLR has one record_id, the return type must be a tuple │ │ │ │ Returns: │ │ │ │ The record_ids this VLR type can have │ │ │ │ Return type: │ │ │ │ - _t_u_p_l_e of _i_n_t │ │ │ │ + tuple of int │ │ │ │ laspy.vlrs.known.vlr_factory(vvllrr:: _VV_LL_RR)_[_s_o_u_r_c_e_]_ │ │ │ │ Given a vlr tries to find its corresponding KnownVLR class that can parse │ │ │ │ its data. If no KnownVLR implementation is found, returns the input vlr │ │ │ │ unchanged │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.vlr.html │ │ │ @@ -127,38 +127,38 @@ │ │ │ 'MyUserId' │ │ │ >>> int.from_bytes(my_vlr.record_data, byteorder='little') │ │ │ 42 │ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -record_data: bytes
│ │ │ +record_data: bytes │ │ │

The record_data as bytes, length cannot exceed 65_535

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -record_data_bytes() bytes[source]
│ │ │ +record_data_bytes() bytes[source] │ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property description: str | bytes
│ │ │ +property description: str | bytes │ │ │

The description, cannot exceed 32 bytes

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property record_id: int
│ │ │ +property record_id: int │ │ │

The record id

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -property user_id: str
│ │ │ +property user_id: str │ │ │

The user id

│ │ │
│ │ │ │ │ │
│ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -44,20 +44,20 @@ │ │ │ │ ... description="An Example VLR", │ │ │ │ ... record_data=int(42).to_bytes(8, byteorder='little'), │ │ │ │ ... ) │ │ │ │ >>> my_vlr.user_id │ │ │ │ 'MyUserId' │ │ │ │ >>> int.from_bytes(my_vlr.record_data, byteorder='little') │ │ │ │ 42 │ │ │ │ - record_data:: _bb_yy_tt_ee_ss_ │ │ │ │ + record_data:: bbyytteess_ │ │ │ │ The record_data as bytes, length cannot exceed 65_535 │ │ │ │ - record_data_bytes() → _b_y_t_e_s_[_s_o_u_r_c_e_]_ │ │ │ │ - pprrooppeerrttyy description:: _ss_tt_rr || _bb_yy_tt_ee_ss_ │ │ │ │ + record_data_bytes() → bytes_[_s_o_u_r_c_e_]_ │ │ │ │ + pprrooppeerrttyy description:: ssttrr || bbyytteess_ │ │ │ │ The description, cannot exceed 32 bytes │ │ │ │ - pprrooppeerrttyy record_id:: _ii_nn_tt_ │ │ │ │ + pprrooppeerrttyy record_id:: iinntt_ │ │ │ │ The record id │ │ │ │ - pprrooppeerrttyy user_id:: _ss_tt_rr_ │ │ │ │ + pprrooppeerrttyy user_id:: ssttrr_ │ │ │ │ The user id │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/api/laspy.vlrs.vlrlist.html │ │ │ @@ -112,19 +112,19 @@ │ │ │
│ │ │ │ │ │
│ │ │

laspy.vlrs.vlrlist module

│ │ │
│ │ │
│ │ │ class laspy.vlrs.vlrlist.VLRList(*args, **kwargs)[source]
│ │ │ -

Bases: list

│ │ │ +

Bases: list

│ │ │

Class responsible for managing the vlrs

│ │ │
│ │ │
│ │ │ -index(value, start: int = 0, stop: int = None) int[source]
│ │ │ +index(value, start: int = 0, stop: int = None) int[source] │ │ │

Return first index of value.

│ │ │

Raises ValueError if the value is not present.

│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ get_by_id(user_id='', record_ids=(None,))[source]
│ │ │ @@ -145,30 +145,30 @@ │ │ │ >>> las.vlrs.get_by_id(ExtraBytesVlr.official_user_id())[0] │ │ │ <ExtraBytesVlr(extra bytes structs: 5)> │ │ │
│ │ │ │ │ │
│ │ │
Parameters:
│ │ │
    │ │ │ -
  • user_id (str, optional) – the user id

  • │ │ │ -
  • record_ids (iterable of int, optional) – THe record ids of the vlr(s) you wish to get

  • │ │ │ +
  • user_id (str, optional) – the user id

  • │ │ │ +
  • record_ids (iterable of int, optional) – THe record ids of the vlr(s) you wish to get

  • │ │ │
│ │ │
│ │ │
Returns:
│ │ │

a list of vlrs matching the user_id and records_ids

│ │ │
│ │ │
Return type:
│ │ │ -

list

│ │ │ +

list

│ │ │
│ │ │
│ │ │ │ │ │ │ │ │
│ │ │
│ │ │ -get(vlr_type: str) List[IKnownVLR][source]
│ │ │ +get(vlr_type: str) List[IKnownVLR][source] │ │ │

Returns the list of vlrs of the requested type │ │ │ Always returns a list even if there is only one VLR of type vlr_type.

│ │ │
>>> import laspy
│ │ │  >>> las = laspy.read("tests/data/extrabytes.las")
│ │ │  >>> las.vlrs
│ │ │  [<ExtraBytesVlr(extra bytes structs: 5)>]
│ │ │  >>> las.vlrs.get("WktCoordinateSystemVlr")
│ │ │ @@ -180,67 +180,67 @@
│ │ │  [<ExtraBytesVlr(extra bytes structs: 5)>]
│ │ │  >>> las.vlrs.get('ExtraBytesVlr')[0]
│ │ │  <ExtraBytesVlr(extra bytes structs: 5)>
│ │ │  
│ │ │
│ │ │
│ │ │
Parameters:
│ │ │ -

vlr_type (str) – the class name of the vlr

│ │ │ +

vlr_type (str) – the class name of the vlr

│ │ │
│ │ │
Returns:
│ │ │

a List of vlrs matching the user_id and records_ids

│ │ │
│ │ │
Return type:
│ │ │ -

list

│ │ │ +

list

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -extract(vlr_type: str) List[IKnownVLR][source]
│ │ │ +extract(vlr_type: str) List[IKnownVLR][source] │ │ │

Returns the list of vlrs of the requested type │ │ │ The difference with get is that the returned vlrs will be removed from the list

│ │ │
│ │ │
Parameters:
│ │ │ -

vlr_type (str) – the class name of the vlr

│ │ │ +

vlr_type (str) – the class name of the vlr

│ │ │
│ │ │
Returns:
│ │ │

a List of vlrs matching the user_id and records_ids

│ │ │
│ │ │
Return type:
│ │ │ -

list

│ │ │ +

list

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -classmethod read_from(data_stream: BinaryIO, num_to_read: int, extended: bool = False) VLRList[source]
│ │ │ +classmethod read_from(data_stream: BinaryIO, num_to_read: int, extended: bool = False) VLRList[source] │ │ │

Reads vlrs and parse them if possible from the stream

│ │ │
│ │ │
Parameters:
│ │ │
    │ │ │ -
  • data_stream (io.BytesIO) – stream to read from

  • │ │ │ -
  • num_to_read (int) – number of vlrs to be read

  • │ │ │ -
  • extended (bool) – whether the vlrs are regular vlr or extended vlr

  • │ │ │ +
  • data_stream (io.BytesIO) – stream to read from

  • │ │ │ +
  • num_to_read (int) – number of vlrs to be read

  • │ │ │ +
  • extended (bool) – whether the vlrs are regular vlr or extended vlr

  • │ │ │
│ │ │
│ │ │
Returns:
│ │ │

List of vlrs

│ │ │
│ │ │
Return type:
│ │ │

laspy.vlrs.vlrlist.VLRList

│ │ │
│ │ │
│ │ │
│ │ │ │ │ │
│ │ │
│ │ │ -write_to(stream: BinaryIO, as_extended: bool = False, encoding_errors: str = 'strict') int[source]
│ │ │ +write_to(stream: BinaryIO, as_extended: bool = False, encoding_errors: str = 'strict') int[source] │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ @@ -33,17 +33,17 @@ │ │ │ │ _l_a_s_p_y │ │ │ │ * _A_P_I_ _D_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ * laspy.vlrs.vlrlist module │ │ │ │ * _V_i_e_w_ _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ =============================================================================== │ │ │ │ ************ llaassppyy..vvllrrss..vvllrrlliisstt mmoodduullee_? ************ │ │ │ │ ccllaassss laspy.vlrs.vlrlist.VLRList(**aarrggss, ****kkwwaarrggss)_[_s_o_u_r_c_e_]_ │ │ │ │ - Bases: _l_i_s_t │ │ │ │ + Bases: list │ │ │ │ Class responsible for managing the vlrs │ │ │ │ - index(vvaalluuee, ssttaarrtt:: _ii_nn_tt == 00, ssttoopp:: _ii_nn_tt == NNoonnee) → _i_n_t_[_s_o_u_r_c_e_]_ │ │ │ │ + index(vvaalluuee, ssttaarrtt:: iinntt == 00, ssttoopp:: iinntt == NNoonnee) → int_[_s_o_u_r_c_e_]_ │ │ │ │ Return first index of value. │ │ │ │ Raises ValueError if the value is not present. │ │ │ │ get_by_id(uusseerr__iidd=='''', rreeccoorrdd__iiddss==((NNoonnee,,)))_[_s_o_u_r_c_e_]_ │ │ │ │ Function to get vlrs by user_id and/or record_ids. Always returns a │ │ │ │ list even if only one vlr matches the user_id and record_id │ │ │ │ >>> import laspy │ │ │ │ >>> from laspy.vlrs.known import ExtraBytesVlr, │ │ │ │ @@ -57,22 +57,22 @@ │ │ │ │ Traceback (most recent call last): │ │ │ │ IndexError: list index out of range │ │ │ │ >>> las.vlrs.get_by_id(ExtraBytesVlr.official_user_id()) │ │ │ │ [] │ │ │ │ >>> las.vlrs.get_by_id(ExtraBytesVlr.official_user_id())[0] │ │ │ │ │ │ │ │ Parameters: │ │ │ │ - * uusseerr__iidd (_ss_tt_rr,, ooppttiioonnaall) – the user id │ │ │ │ - * rreeccoorrdd__iiddss (iitteerraabbllee ooff _ii_nn_tt,, ooppttiioonnaall) – THe record ids │ │ │ │ + * uusseerr__iidd (ssttrr,, ooppttiioonnaall) – the user id │ │ │ │ + * rreeccoorrdd__iiddss (iitteerraabbllee ooff iinntt,, ooppttiioonnaall) – THe record ids │ │ │ │ of the vlr(s) you wish to get │ │ │ │ Returns: │ │ │ │ a list of vlrs matching the user_id and records_ids │ │ │ │ Return type: │ │ │ │ - _l_i_s_t │ │ │ │ - get(vvllrr__ttyyppee:: _ss_tt_rr) → _L_i_s_t[_I_K_n_o_w_n_V_L_R]_[_s_o_u_r_c_e_]_ │ │ │ │ + list │ │ │ │ + get(vvllrr__ttyyppee:: ssttrr) → List[_I_K_n_o_w_n_V_L_R]_[_s_o_u_r_c_e_]_ │ │ │ │ Returns the list of vlrs of the requested type Always returns a │ │ │ │ list even if there is only one VLR of type vlr_type. │ │ │ │ >>> import laspy │ │ │ │ >>> las = laspy.read("tests/data/extrabytes.las") │ │ │ │ >>> las.vlrs │ │ │ │ [] │ │ │ │ >>> las.vlrs.get("WktCoordinateSystemVlr") │ │ │ │ @@ -81,39 +81,39 @@ │ │ │ │ Traceback (most recent call last): │ │ │ │ IndexError: list index out of range │ │ │ │ >>> las.vlrs.get('ExtraBytesVlr') │ │ │ │ [] │ │ │ │ >>> las.vlrs.get('ExtraBytesVlr')[0] │ │ │ │ │ │ │ │ Parameters: │ │ │ │ - vvllrr__ttyyppee (_ss_tt_rr) – the class name of the vlr │ │ │ │ + vvllrr__ttyyppee (ssttrr) – the class name of the vlr │ │ │ │ Returns: │ │ │ │ a List of vlrs matching the user_id and records_ids │ │ │ │ Return type: │ │ │ │ - _l_i_s_t │ │ │ │ - extract(vvllrr__ttyyppee:: _ss_tt_rr) → _L_i_s_t[_I_K_n_o_w_n_V_L_R]_[_s_o_u_r_c_e_]_ │ │ │ │ + list │ │ │ │ + extract(vvllrr__ttyyppee:: ssttrr) → List[_I_K_n_o_w_n_V_L_R]_[_s_o_u_r_c_e_]_ │ │ │ │ Returns the list of vlrs of the requested type The difference with │ │ │ │ get is that the returned vlrs will be removed from the list │ │ │ │ Parameters: │ │ │ │ - vvllrr__ttyyppee (_ss_tt_rr) – the class name of the vlr │ │ │ │ + vvllrr__ttyyppee (ssttrr) – the class name of the vlr │ │ │ │ Returns: │ │ │ │ a List of vlrs matching the user_id and records_ids │ │ │ │ Return type: │ │ │ │ - _l_i_s_t │ │ │ │ - ccllaassssmmeetthhoodd read_from(ddaattaa__ssttrreeaamm:: _BB_ii_nn_aa_rr_yy_II_OO, nnuumm__ttoo__rreeaadd:: _ii_nn_tt, │ │ │ │ - eexxtteennddeedd:: _bb_oo_oo_ll == FFaallssee) → _V_L_R_L_i_s_t_[_s_o_u_r_c_e_]_ │ │ │ │ + list │ │ │ │ + ccllaassssmmeetthhoodd read_from(ddaattaa__ssttrreeaamm:: BBiinnaarryyIIOO, nnuumm__ttoo__rreeaadd:: iinntt, │ │ │ │ + eexxtteennddeedd:: bbooooll == FFaallssee) → _V_L_R_L_i_s_t_[_s_o_u_r_c_e_]_ │ │ │ │ Reads vlrs and parse them if possible from the stream │ │ │ │ Parameters: │ │ │ │ - * ddaattaa__ssttrreeaamm (_ii_oo_.._BB_yy_tt_ee_ss_II_OO) – stream to read from │ │ │ │ - * nnuumm__ttoo__rreeaadd (_ii_nn_tt) – number of vlrs to be read │ │ │ │ - * eexxtteennddeedd (_bb_oo_oo_ll) – whether the vlrs are regular vlr or │ │ │ │ + * ddaattaa__ssttrreeaamm (iioo..BByytteessIIOO) – stream to read from │ │ │ │ + * nnuumm__ttoo__rreeaadd (iinntt) – number of vlrs to be read │ │ │ │ + * eexxtteennddeedd (bbooooll) – whether the vlrs are regular vlr or │ │ │ │ extended vlr │ │ │ │ Returns: │ │ │ │ List of vlrs │ │ │ │ Return type: │ │ │ │ _l_a_s_p_y_._v_l_r_s_._v_l_r_l_i_s_t_._V_L_R_L_i_s_t │ │ │ │ - write_to(ssttrreeaamm:: _BB_ii_nn_aa_rr_yy_II_OO, aass__eexxtteennddeedd:: _bb_oo_oo_ll == FFaallssee, eennccooddiinngg__eerrrroorrss:: │ │ │ │ - _ss_tt_rr == ''ssttrriicctt'') → _i_n_t_[_s_o_u_r_c_e_]_ │ │ │ │ + write_to(ssttrreeaamm:: BBiinnaarryyIIOO, aass__eexxtteennddeedd:: bbooooll == FFaallssee, eennccooddiinngg__eerrrroorrss:: │ │ │ │ + ssttrr == ''ssttrriicctt'') → int_[_s_o_u_r_c_e_]_ │ │ │ │ _P_r_e_v_i_o_u_s _N_e_x_t │ │ │ │ =============================================================================== │ │ │ │ © Copyright 2018-2024, laspy. │ │ │ │ Built with _S_p_h_i_n_x using a _t_h_e_m_e provided by _R_e_a_d_ _t_h_e_ _D_o_c_s. │ │ ├── ./usr/share/doc/python-laspy-doc/html/searchindex.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -1921,14 +1921,15 @@ │ │ │ │ "149": 17, │ │ │ │ "15": [6, 11, 20, 21], │ │ │ │ "150": 6, │ │ │ │ "1503": 20, │ │ │ │ "152": 17, │ │ │ │ "158": 17, │ │ │ │ "16": [1, 13, 16, 21, 23, 24], │ │ │ │ + "160": 2, │ │ │ │ "17": [12, 17, 20], │ │ │ │ "18": 21, │ │ │ │ "19": 21, │ │ │ │ "1_000_000": 16, │ │ │ │ "1_234_567": 16, │ │ │ │ "2": [0, 1, 2, 4, 6, 8, 10, 11, 12, 13, 16, 18, 20, 21, 22, 24], │ │ │ │ "20": [6, 20, 21], │ │ │ │ @@ -1948,15 +1949,15 @@ │ │ │ │ "25": [20, 21], │ │ │ │ "256": 1, │ │ │ │ "27": 25, │ │ │ │ "28": 21, │ │ │ │ "29": 21, │ │ │ │ "2d": [2, 6, 20], │ │ │ │ "3": [0, 4, 6, 9, 10, 11, 12, 16, 18, 20, 21, 24, 25], │ │ │ │ - "30": [2, 6, 21], │ │ │ │ + "30": [6, 21], │ │ │ │ "300": 6, │ │ │ │ "31": [11, 17], │ │ │ │ "32": [1, 14, 17, 23, 24], │ │ │ │ "33": 25, │ │ │ │ "34": 11, │ │ │ │ "3d": 23, │ │ │ │ "3f8": 24,