[pdal] readers.slpk: Failed to fetch info

Andrew Bell andrew.bell.ia at gmail.com
Thu Mar 28 09:26:32 PDT 2019


I have no trouble with this using a conda install of pdal and the
python-pdal extension.  SLPK files are unzipped to temp space before
they're actually read.  If you have no temp space, I could see a failure
like this.  Make sure you have /tmp that has sufficient space to hold the
slpk file (it's not compressed) or the TMP environment variable is set to a
location that has sufficient space.

Here's the script I used, which is yours, slightly modified:

import pdal
import numpy as np
import sys
import getopt


## TEST HARNESS
## TODO: begin placing some components of the test harness into functions
## TODO: Clean up the code in general
## TODO: Make sure to clean up pipeline options specifically and make it
all more flexible and ready for various input
if __name__ == "__main__":

    filepath = "autzen.slpk"

    print("Using {0}".format(filepath))

    pipeline_convert_tif = """
    {{
        "pipeline":[
            {{
                "type":"readers.slpk",
                "filename":"{0}"
            }},
            {{
                "type":"filters.info"
            }}
        ]
    }}""".format(filepath)

    # Start the pipeline work
    pipeline = pdal.Pipeline(pipeline_convert_tif)
    pipeline.validate() # Validate that defined pipeline is OK
    pipeline.loglevel = 8
    count = pipeline.execute()
    arrays = pipeline.arrays
    metadata = pipeline.metadata
    print (metadata)
    log = pipeline.log

Here's the start of the output:

$ python test.py

Using autzen.slpk
{
  "metadata":
  {
    "":
    [
      {
      },
      {
      }
    ],
    "filters.info":
    [
      {
        "bbox":
        {
          "maxx": -123.0628514,
          "maxy": 44.06225365,
          "maxz": 163.62028,
          "minx": -123.0749718,
          "miny": 44.050197,
          "minz": 124.16028
        },
        "dimensions": "X, Y, Z, Intensity, ClassFlags, Flag,
NumberOfReturns, ReturnNumber, UserData, PointSourceId, GpsTime,
ScanAngleRank",
        "num_points": 106,
        "schema":
        {
          "dimensions":
          [
            {
              "name": "X",
              "size": 8,
              "type": "floating"
            },
            {
              "name": "Y",
              "size": 8,
              "type": "floating"
            },
...


On Thu, Mar 28, 2019 at 12:16 PM David Lewis <dlewi146 at gmail.com> wrote:

> I'm running this from a Bash terminal on an Ubuntu operating system.
>
> On Thu, Mar 28, 2019, 12:15 PM Andrew Bell <andrew.bell.ia at gmail.com>
> wrote:
>
>> What platform are you using?
>>
>> On Thu, Mar 28, 2019 at 9:32 AM David Lewis <dlewi146 at gmail.com> wrote:
>>
>>> Attached is the relevant lines of code.
>>>
>>> On Thu, Mar 28, 2019 at 6:52 AM Andrew Bell <andrew.bell.ia at gmail.com>
>>> wrote:
>>>
>>>> It would help if you would post the program that is generating the
>>>> error.
>>>>
>>>> On Wed, Mar 27, 2019, 11:49 PM David Lewis <dlewi146 at gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm trying to run the SLPK reader in a pipeline I've written using the
>>>>> Python API. I'm using the SMALL_AUTZEN_LAS_ALL.slpk file found at
>>>>> https://github.com/PDAL/PDAL/tree/master/test/data/i3s .
>>>>>
>>>>> Whenever I attempt to run this via the Python script, I get an error
>>>>> message :
>>>>> "RuntimeError: readers.slpk: Failed to fetch info: Could not read file
>>>>> /tmp/SMALL_AUTZEN_LAS_ALL/3dSceneLayer.json.gz"
>>>>>
>>>>> After looking at the code on Github, this appears to be something that
>>>>> is called no matter when the SLPK extraction process throws an error,
>>>>> though this could be wrong.
>>>>>
>>>>> I'm not trying to do anything with filters yet, I'm simply trying to
>>>>> read in the SLPK using readers.slpk. Is this a known issue that occurs?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> David Lewis
>>>>> Undergraduate Imaging Science
>>>>> Rochester Institute of Technology
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> pdal mailing list
>>>>> pdal at lists.osgeo.org
>>>>> https://lists.osgeo.org/mailman/listinfo/pdal
>>>>
>>>>
>>
>> --
>> Andrew Bell
>> andrew.bell.ia at gmail.com
>>
>

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20190328/61ca9a35/attachment.html>


More information about the pdal mailing list