Skip to content

Error when using numpy array input #33

Closed

Description

@chrislcs

Great to see the 2.2.0 update has been pushed to conda-forge. However I am now running into a different issue.

Again I am trying to use a numpy structured array as input:

>>> point_cloud[0:1]
array([(122312.202, 489447.885, -0.23, 8, 1, 1, 1, 2, 30817)], dtype=[('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('Intensity', '<u2'), ('ReturnNumber', 'u1'), ('NumberOfReturns', 'u1'), ('Classification', 'u1'), ('UserData', 'u1'), ('PointSourceId', '<u2')])

If I try to use the following pdal pipeline:

PDAL_PIPELINE = """
{
  "pipeline": [
    {
      "type": "filters.eigenvalues",
      "knn": 10
    }
  ]
}
"""

pipeline = pdal.Pipeline(
    PDAL_PIPELINE,
    arrays=[point_cloud]
 )
pipeline.validate()
pipeline.execute()
result = pipeline.arrays

It returns:

pdal/libpdalpython.pyx in pdal.libpdalpython.PyPipeline.validate()

RuntimeError: readers.memoryview: Can't provide `shape` option when Fields contain X, Y and Z.

I am trying to figure out what's going wrong, but I'm a bit lost. As far as I know I am not providing a shape as I am using a structured array with an X, Y, and Z column.

I am using a conda environment on ubuntu with python 3.7, PDAL 2.0.1, python-pdal 2.2.0, numpy 1.16.4.

Activity

  1. abellgithub commented on Sep 9, 2019

    @abellgithub
    Collaborator

    Seems like a bug ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy