Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create STAC Item for .las (and .laz) pointclouds #71

Closed
wants to merge 4 commits into from
Closed

Create STAC Item for .las (and .laz) pointclouds #71

wants to merge 4 commits into from

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Mar 12, 2021

Related issue(s): #44

Description: API function and CLI tool to create STAC Items from pointclouds. We're using PDAL, which will enable us to (eventually) support formats other than la{s|z}. However, right now the STAC item is built from fields from the las header, so other formats are explicitly denied for now.

@gadomski gadomski marked this pull request as draft March 12, 2021 16:24
@hobu
Copy link

hobu commented Mar 12, 2021

Another option to get network-aware las reading is to dig through the other Python las implementations and see if one is good with networks (or write Yet Another Las Header Reader)

This code lives in Entwine. We could put it to the preview() method of PDAL I suppose. Let's not write another Python LAS library 😄

@cholmes cholmes linked an issue Mar 18, 2021 that may be closed by this pull request
@gadomski gadomski changed the title [WIP] Create STAC Item for .las (and .laz) pointclouds Create STAC Item for .las (and .laz) pointclouds Apr 16, 2021
@gadomski gadomski marked this pull request as ready for review April 16, 2021 20:15
@gadomski gadomski requested a review from lossyrob April 16, 2021 20:15
@gadomski
Copy link
Member Author

gadomski commented Apr 16, 2021

Turns out I'm dumb and the PDAL Python reader does support network access. So this is ready for review.

@gadomski gadomski removed the request for review from lossyrob May 11, 2021 12:19
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2021

Codecov Report

Merging #71 (6b360f7) into master (576e4d8) will increase coverage by 0.17%.
The diff coverage is 90.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
+ Coverage   85.40%   85.58%   +0.17%     
==========================================
  Files          83       87       +4     
  Lines        2474     2566      +92     
==========================================
+ Hits         2113     2196      +83     
- Misses        361      370       +9     
Impacted Files Coverage Δ
...actools_pointcloud/stactools/pointcloud/version.py 0.00% <0.00%> (ø)
stactools_pointcloud/stactools/pointcloud/stac.py 90.90% <90.90%> (ø)
...ctools_pointcloud/stactools/pointcloud/commands.py 93.10% <93.10%> (ø)
...ctools_pointcloud/stactools/pointcloud/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 576e4d8...6b360f7. Read the comment docs.

gadomski added 4 commits June 9, 2021 08:58
Adds `stactools.pointcloud.create_item`, which takes a single `href`
and creates a STAC item. Also adds a command line tool to execute.
Design decisions:

- By default, only read the header of the file (as best as we can).
  An argument, `calculate_statistics`, can optionally instruct
  `create_item` to read the entire file and calculate statistics.
- Uses [PDAL](https://pdal.io) to read the file, which in theory
  will enable building STAC items from other flavors of pointcloud
  (anything readable by PDAL). We can't just drop in any file right
  away, though, because we use LAS header values to build the item.
  Support for other pointcloud formats will require writing some sort
  of converter from format-specific metadata values to STAC values.
@gadomski
Copy link
Member Author

Closed in favor of https://github.com/stactools-packages/stactools-pointcloud as a part of #111.

@gadomski gadomski closed this Jun 10, 2021
@gadomski gadomski deleted the issues/44-pointcloud branch June 10, 2021 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert pointcloud .las to STAC
3 participants