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

RuntimeError: writers.gdal: Grid width out of range. #142

Closed
CROdominik opened this issue Jan 11, 2023 · 1 comment
Closed

RuntimeError: writers.gdal: Grid width out of range. #142

CROdominik opened this issue Jan 11, 2023 · 1 comment

Comments

@CROdominik
Copy link

CROdominik commented Jan 11, 2023

PUNKTSKY_1km_6220_611.laz.zip

I noticed when I run a pipeline to convert laz to tiff files using gdal Gtiff driver, and filtering only building points (classificaiton 6) that often gdal writer provides a following error (in the title).

in_laz = (your input laz file path)
out_tif = (output tif file path)

        json="""{
                "pipeline": [
                    {
                        "filename": "%s",
                        "type":"readers.las",
                        "default_srs":"EPSG:25832+5799"
                    },
                    {
                        "type":"filters.range",
                        "limits":"Classification[6:6]"
                    },
                    {
                        "filename":"%s",
                        "gdaldriver":"GTiff",
                        "pdal_metadata":"true",
                        "output_type":"mean",
                        "default_srs":"EPSG:25832+5799",
                        "resolution":"0.4",
                        "radius":"0.4",
                        "type": "writers.gdal"
                    }
                ]
            }""" % (in_laz, out_tif)


        pipeline=pdal.Pipeline( json )
        count=pipeline.execute()
        arrays=pipeline.arrays
        metadata=pipeline.metadata
        log=pipeline.log

Using the attached laz file, and this pipeline, it will result in a following error: "RuntimeError: writers.gdal: Grid width out of range." in the pipeline.execute() row.

If I'm not mistaken, this file corresponds to this small island: https://goo.gl/maps/Wg6MEUPfxSTQv4R68

As I can see a few buildings on the island, there is no reason not to be able to filter only the building points.
Furthermore, if I use the same pipeline, but keep points [6:7], then it will work.

The same pipeline worked for many different laz files with the same metadata, but in 2-3% of the laz files I tried to convert, I get the following error.

pdal version is 2.4.2.

@abellgithub
Copy link
Collaborator

abellgithub commented Jan 12, 2023 via email

@hobu hobu closed this as completed Jan 17, 2023
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

No branches or pull requests

3 participants