Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error when using numpy array input #33

Copy link
Copy link
@chrislcs

Description

@chrislcs
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.