Skip to content

Failed rasterization #79

@Vicent-Ribas

Description

@Vicent-Ribas

Hello,

Thank you for putting this together. I am running a script to generate percentile 95th output of a LAS file. This is my code:

print("Computing rasterization of the prepared las file. Requires laspy 1.7") tile = pyfor.cloud.Cloud(lasin) tile.crs = src grid = tile.grid(cell_size=20) # this function utilizes Z as the variable pct95ht = pyfor.metrics.grid_percentile (grid, 95) pct95ht.write(rstat)

It works most of the times, but it is the second time I get this error:

File "myfile.py", line 130, in rasterdomht pct95ht = pyfor.metrics.grid_percentile (grid, 95) File "mypath\pyfor\metrics.py", line 77, in grid_percentile return grid.raster(lambda z: np.percentile(z, percentile), "z") File "mypath\pyfor\rasterizer.py", line 55, in raster array[bin_summary["bins_y"], bin_summary["bins_x"]] = bin_summary[dim] IndexError: index 78 is out of bounds for axis 1 with size 78

I have Python 3.8.1 in a Conda environment.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions