laspy


Namelaspy JSON
Version 2.5.3 PyPI version JSON
download
home_pagehttps://github.com/laspy/laspy
SummaryNative Python ASPRS LAS read/write library
upload_time2024-01-04 14:12:51
maintainer
docs_urlhttps://pythonhosted.org/laspy/
authorGrant Brown, Thomas Montaigu
requires_python>=3.8
licenseBSD
keywords gis lidar las
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Laspy

Laspy is a python library for reading, modifying and creating LAS LiDAR
files.

Laspy is compatible with Python  3.8+.

## Features

- LAS support.
- LAZ support via `lazrs` or `laszip` backend.
- LAS/LAZ streamed/chunked reading/writting.
- [COPC] support over files.
- [COPC] support over https with `requests` package.
- CRS support via `pyproj` package.


[COPC]: https://github.com/copcio/copcio.github.io


## Examples

Directly read and write las
```Python
import laspy

las = laspy.read('filename.las')
las.points = las.points[las.classification == 2]
las.write('ground.laz')
```


Open data to inspect header (opening only reads the header and vlrs)

```Python
import laspy

with laspy.open('filename.las') as f:
    print(f"Point format:       {f.header.point_format}")
    print(f"Number of points:   {f.header.point_count}")
    print(f"Number of vlrs:     {len(f.header.vlrs)}")
```
Use the 'chunked' reading & writing features

```Python
import laspy

with laspy.open('big.laz') as input_las:
    with laspy.open('ground.laz', mode="w", header=input_las.header) as ground_las:
        for points in input_las.chunk_iterator(2_000_000):
            ground_las.write_points(points[points.classification == 2])

```

Appending points to existing file

```Python
import laspy

with laspy.open('big.laz') as input_las:
    with laspy.open('ground.laz', mode="a") as ground_las:
        for points in input_las.chunk_iterator(2_000_000):
            ground_las.append_points(points[points.classification == 2])
```

API Documentation and tutorials are available at
[ReadTheDocs](https://laspy.readthedocs.io/en/latest/).

## Installation

Laspy can be installed either with `pip`:

```
pip install laspy # without LAZ support
# Or
pip install laspy[laszip] # with LAZ support via LASzip
# Or
pip install laspy[lazrs] # with LAZ support via lazrs
```

## Changelog

See [CHANGELOG.md](CHANGELOG.md)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/laspy/laspy",
    "name": "laspy",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/laspy/",
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "gis lidar las",
    "author": "Grant Brown, Thomas Montaigu",
    "author_email": "grant.brown73@gmail.com, thomas.montaigu@laposte.net",
    "download_url": "https://files.pythonhosted.org/packages/e1/2d/7d850b1f06988e998aed5f5b03bf3ba0d43758aa8b2fedd0f2519b1e23c5/laspy-2.5.3.tar.gz",
    "platform": null,
    "description": "# Laspy\n\nLaspy is a python library for reading, modifying and creating LAS LiDAR\nfiles.\n\nLaspy is compatible with Python  3.8+.\n\n## Features\n\n- LAS support.\n- LAZ support via `lazrs` or `laszip` backend.\n- LAS/LAZ streamed/chunked reading/writting.\n- [COPC] support over files.\n- [COPC] support over https with `requests` package.\n- CRS support via `pyproj` package.\n\n\n[COPC]: https://github.com/copcio/copcio.github.io\n\n\n## Examples\n\nDirectly read and write las\n```Python\nimport laspy\n\nlas = laspy.read('filename.las')\nlas.points = las.points[las.classification == 2]\nlas.write('ground.laz')\n```\n\n\nOpen data to inspect header (opening only reads the header and vlrs)\n\n```Python\nimport laspy\n\nwith laspy.open('filename.las') as f:\n    print(f\"Point format:       {f.header.point_format}\")\n    print(f\"Number of points:   {f.header.point_count}\")\n    print(f\"Number of vlrs:     {len(f.header.vlrs)}\")\n```\nUse the 'chunked' reading & writing features\n\n```Python\nimport laspy\n\nwith laspy.open('big.laz') as input_las:\n    with laspy.open('ground.laz', mode=\"w\", header=input_las.header) as ground_las:\n        for points in input_las.chunk_iterator(2_000_000):\n            ground_las.write_points(points[points.classification == 2])\n\n```\n\nAppending points to existing file\n\n```Python\nimport laspy\n\nwith laspy.open('big.laz') as input_las:\n    with laspy.open('ground.laz', mode=\"a\") as ground_las:\n        for points in input_las.chunk_iterator(2_000_000):\n            ground_las.append_points(points[points.classification == 2])\n```\n\nAPI Documentation and tutorials are available at\n[ReadTheDocs](https://laspy.readthedocs.io/en/latest/).\n\n## Installation\n\nLaspy can be installed either with `pip`:\n\n```\npip install laspy # without LAZ support\n# Or\npip install laspy[laszip] # with LAZ support via LASzip\n# Or\npip install laspy[lazrs] # with LAZ support via lazrs\n```\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Native Python ASPRS LAS read/write library",
    "version": "2.5.3",
    "project_urls": {
        "Homepage": "https://github.com/laspy/laspy"
    },
    "split_keywords": [
        "gis",
        "lidar",
        "las"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e12d7d850b1f06988e998aed5f5b03bf3ba0d43758aa8b2fedd0f2519b1e23c5",
                "md5": "76886af0f65d18f27bd5103b33603d60",
                "sha256": "4ad698914358ea5a096da52e69bceccd320d9ddfb367480a5c2b5e086db812b7"
            },
            "downloads": -1,
            "filename": "laspy-2.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "76886af0f65d18f27bd5103b33603d60",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1567114,
            "upload_time": "2024-01-04T14:12:51",
            "upload_time_iso_8601": "2024-01-04T14:12:51.292582Z",
            "url": "https://files.pythonhosted.org/packages/e1/2d/7d850b1f06988e998aed5f5b03bf3ba0d43758aa8b2fedd0f2519b1e23c5/laspy-2.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-04 14:12:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "laspy",
    "github_project": "laspy",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "laspy"
}
        
Elapsed time: 0.18853s