[pdal] Filters.assign: not all filters applied

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[pdal] Filters.assign: not all filters applied

Eric Robeck
PDAL team -

I mentioned this in an earlier email but thought it would be better in its own thread. I wrote a pipeline to assign two SMRF variables (window and slope) to separate dimensions, as I eventually want to combine them into a single Postgres database and compare the effectiveness of each iteration.

My pipeline has several stages, as shown below. First I read the file, capturing the non-standard dimensions I created earlier, then I ferry the two new fields. Next reset the classifications (before running SMRF) and assign per-file values to Window and Slope. This is where the process breaks down. Only the last assignment is made. In the pipeline below, I added GpsTime and Red for testing purposes. As shown in the info --stats output (bottom, highlighted text), no changes were made to Window, Slope or GpsTime, but Red is assigned a value of 255. When I remove the Red assignment, GpsTime is assigned the correct value of 3000, but Window and Slope are still unchanged.

If I insert more filters.assign stages in the pipeline, I can set values multiple dimensions, but only if they are the last listed in each stage.

However, I can't set the values of Window and Slope - even if they are last. (I don't care about the others - they are just for testing.) Why can't I assign values to my newly created dimensions? Is it because I don't specify their type until the writer stage?

Thanks in advance.

Regards,
Eric


Pipeline (limited to the first 100,000 points for testing). File is LAZ 1.4 format:

{
  "pipeline":
  [
    {
      "filename":"C:/data/forest_park/forest_park_orig_dtm.laz",
      "type":"readers.las",
      "extra_dims":"OldClassification=uint8, DTM=float",
      "count":100000
    },
    {
      "type":"filters.ferry",
      "tag":"filtersferry",
      "dimensions":"=>Window, =>Slope"
    },
    {
      "inputs":"filtersferry",
      "type":"filters.assign",
      "tag":"filtersassign",
      "assignment":"Classification[:]=0",
      "assignment":"Window[:]=12",
      "assignment":"Slope[:]=0_50",
      "assignment":"GpsTime[:]=3000",
      "assignment":"Red[:]=255"

    },
    {
      "inputs":"filtersassign",
      "type":"filters.smrf",
      "tag":"filterssmurf",
      "cell":1.00,
      "cut":0,
      "scalar":1.25,
      "slope":0.05,
      "threshold":0.50,
      "window":12
    },
    {
        "inputs":"filterssmurf",
      "type":"writers.las",
      "minor_version":"4",
      "compression":"true",
      "extra_dims":"OldClassification=uint8, DTM=float, Window=uint8, Slope=float",
      "scale_x":"0.01",
      "scale_y":"0.01",
      "scale_z":"0.01",
      "offset_x":"auto",
      "offset_y":"auto",
      "offset_z":"auto",
      "filename":"C:/data/forest_park/smrf/forest_park (window-12, slope-0_05).laz"
    }
  ]
}

info -stats JSON output:

{
  "filename": "C:\\data\\forest_park\\smrf\\forest_park (window-12, slope-0_05).laz",
  "pdal_version": "1.7.1 (git-version: Release)",
  "stats":
  {
    "bbox":
    {
      "EPSG:4326":
      {
        "bbox":
        {
          "maxx": -90.26228629,
          "maxy": 38.63885582,
          "maxz": 231.3,
          "minx": -90.26674834,
          "miny": 38.63740345,
          "minz": 146.26
        },
        "boundary": {
   "coordinates" : [
      [
         [ -90.266748340000007, 38.637506649999999 ],
         [ -90.266697059999998, 38.638855820000003 ],
         [ -90.262286290000006, 38.638752609999997 ],
         [ -90.262337650000006, 38.637403450000001 ],
         [ -90.266748340000007, 38.637506649999999 ]
      ]
   ],
   "type" : "Polygon"
}

      },
      "native":
      {
        "bbox":
        {
          "maxx": 738284.32,
          "maxy": 4280246,
          "maxz": 231.3,
          "minx": 737900.01,
          "miny": 4280096.12,
          "minz": 146.26
        },
        "boundary": {
   "coordinates" : [
      [
         [ 737900.01000000001, 4280096.1200000001 ],
         [ 737900.01000000001, 4280246 ],
         [ 738284.31999999995, 4280246 ],
         [ 738284.31999999995, 4280096.1200000001 ],
         [ 737900.01000000001, 4280096.1200000001 ]
      ]
   ],
   "type" : "Polygon"
}

      }
    },
    "statistic":
    [
      {
        "average": 738047.8528,
        "count": 100000,
        "kurtosis": -1.058617353e+21,
        "maximum": 738284.32,
        "minimum": 737900.01,
        "name": "X",
        "position": 0,
        "skewness": 5.819331476e+21,
        "stddev": 2335.463392,
        "variance": 5454389.253
      },
      {
        "average": 4280180.736,
        "count": 100000,
        "kurtosis": 1.110237075e+20,
        "maximum": 4280246,
        "minimum": 4280096.12,
        "name": "Y",
        "position": 1,
        "skewness": 5.833279928e+21,
        "stddev": 13535.46299,
        "variance": 183208758.5
      },
      {
        "average": 172.814753,
        "count": 100000,
        "kurtosis": -1.151862193e+17,
        "maximum": 231.3,
        "minimum": 146.26,
        "name": "Z",
        "position": 2,
        "skewness": 4.786721963e+16,
        "stddev": 24.75900268,
        "variance": 613.0082139
      },
      {
        "average": 13627.78624,
        "count": 100000,
        "kurtosis": -9.799196037e+11,
        "maximum": 65520,
        "minimum": 48,
        "name": "Intensity",
        "position": 3,
        "skewness": 2.271591546e+11,
        "stddev": 11494.12826,
        "variance": 132114984.4
      },
      {
        "average": 1.16788,
        "count": 100000,
        "kurtosis": -3.136035307e+15,
        "maximum": 7,
        "minimum": 1,
        "name": "ReturnNumber",
        "position": 4,
        "skewness": 2.081955413e+15,
        "stddev": 0.4458118459,
        "variance": 0.198748202
      },
      {
        "average": 1.33647,
        "count": 100000,
        "kurtosis": 2.44020564e+16,
        "maximum": 7,
        "minimum": 1,
        "name": "NumberOfReturns",
        "position": 5,
        "skewness": 5.819448528e+15,
        "stddev": 0.6329627186,
        "variance": 0.4006418031
      },
      {
        "average": 0.50087,
        "count": 100000,
        "kurtosis": -2.000079167,
        "maximum": 1,
        "minimum": 0,
        "name": "ScanDirectionFlag",
        "position": 6,
        "skewness": -0.003486625756,
        "stddev": 0.5000250321,
        "variance": 0.2500250328
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "EdgeOfFlightLine",
        "position": 7,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 1.69919,
        "count": 100000,
        "kurtosis": -1.16609259e+16,
        "maximum": 2,
        "minimum": 1,
        "name": "Classification",
        "position": 8,
        "skewness": 1.912221988e+15,
        "stddev": 0.4586301939,
        "variance": 0.2103416548
      },
      {
        "average": -2.09112,
        "count": 100000,
        "kurtosis": 6.331454949e+15,
        "maximum": 6,
        "minimum": -7,
        "name": "ScanAngleRank",
        "position": 9,
        "skewness": -1.275371659e+15,
        "stddev": 3.14954445,
        "variance": 9.919630242
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "UserData",
        "position": 10,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 45,
        "count": 100000,
        "kurtosis": 99997,
        "maximum": 45,
        "minimum": 45,
        "name": "PointSourceId",
        "position": 11,
        "skewness": 5.833372669e+21,
        "stddev": 0.1423032062,
        "variance": 0.0202502025
      },
      {
        "average": 255,
        "count": 100000,
        "kurtosis": 99997,
        "maximum": 255,
        "minimum": 255,
        "name": "Red",
        "position": 12,
        "skewness": 5.833372669e+21,
        "stddev": 0.8063848353,
        "variance": 0.6502565026

      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Green",
        "position": 13,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Blue",
        "position": 14,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 172254001,
        "count": 100000,
        "kurtosis": -3.202512756e+16,
        "maximum": 172254002.3,
        "minimum": 172253999.8,
        "name": "GpsTime",
        "position": 15,
        "skewness": 5.833372669e+21,
        "stddev": 544717.7005,
        "variance": 2.967173733e+11

      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "ScanChannel",
        "position": 16,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "ClassFlags",
        "position": 17,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 18.01678,
        "count": 100000,
        "kurtosis": -1.884682428e+10,
        "maximum": 66,
        "minimum": 1,
        "name": "OldClassification",
        "position": 18,
        "skewness": 7910529149,
        "stddev": 28.56978029,
        "variance": 816.2323461
      },
      {
        "average": 153.4204378,
        "count": 100000,
        "kurtosis": -3.477613714e+20,
        "maximum": 156.4029999,
        "minimum": 146.477005,
        "name": "DTM",
        "position": 19,
        "skewness": 1.411306933e+20,
        "stddev": 1.666234469,
        "variance": 2.776337307
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Window",
        "position": 20,
        "stddev": 0,
        "variance": 0

      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Slope",
        "position": 21,
        "stddev": 0,
        "variance": 0

      }
    ]
  }
}



_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] Filters.assign: not all filters applied

Eric Robeck
All,

I answered my last question above:

However, I can't set the values of Window and Slope - even if they are last. (I don't care about the others - they are just for testing.) Why can't I assign values to my newly created dimensions? Is it because I don't specify their type until the writer stage?

By transferring existing fields with the desired formats with filters.ferry, instead of creating them from scratch, I was able to get them to keep the values subsequently assigned to them using filters.assign. Do I need to force the dimension format (uint8, float, etc.) before it can be assigned values?

However, the same issue still applies: I can only assign values to the last dimension in each filters.assign stage. To assign multiple dimensions, I have to create separate stages for each. This doesn't appear to be an issue in the PDAL.io example (https://www.pdal.io/stages/filters.assign.html#filters-assign).

Thanks, everyone! I'll get back to work and stop spamming your inboxes.

Regards,
Eric


On Sat, Apr 14, 2018 at 7:38 PM, Eric Robeck <[hidden email]> wrote:
PDAL team -

I mentioned this in an earlier email but thought it would be better in its own thread. I wrote a pipeline to assign two SMRF variables (window and slope) to separate dimensions, as I eventually want to combine them into a single Postgres database and compare the effectiveness of each iteration.

My pipeline has several stages, as shown below. First I read the file, capturing the non-standard dimensions I created earlier, then I ferry the two new fields. Next reset the classifications (before running SMRF) and assign per-file values to Window and Slope. This is where the process breaks down. Only the last assignment is made. In the pipeline below, I added GpsTime and Red for testing purposes. As shown in the info --stats output (bottom, highlighted text), no changes were made to Window, Slope or GpsTime, but Red is assigned a value of 255. When I remove the Red assignment, GpsTime is assigned the correct value of 3000, but Window and Slope are still unchanged.

If I insert more filters.assign stages in the pipeline, I can set values multiple dimensions, but only if they are the last listed in each stage.

However, I can't set the values of Window and Slope - even if they are last. (I don't care about the others - they are just for testing.) Why can't I assign values to my newly created dimensions? Is it because I don't specify their type until the writer stage?

Thanks in advance.

Regards,
Eric


Pipeline (limited to the first 100,000 points for testing). File is LAZ 1.4 format:

{
  "pipeline":
  [
    {
      "filename":"C:/data/forest_park/forest_park_orig_dtm.laz",
      "type":"readers.las",
      "extra_dims":"OldClassification=uint8, DTM=float",
      "count":100000
    },
    {
      "type":"filters.ferry",
      "tag":"filtersferry",
      "dimensions":"=>Window, =>Slope"
    },
    {
      "inputs":"filtersferry",
      "type":"filters.assign",
      "tag":"filtersassign",
      "assignment":"Classification[:]=0",
      "assignment":"Window[:]=12",
      "assignment":"Slope[:]=0_50",
      "assignment":"GpsTime[:]=3000",
      "assignment":"Red[:]=255"

    },
    {
      "inputs":"filtersassign",
      "type":"filters.smrf",
      "tag":"filterssmurf",
      "cell":1.00,
      "cut":0,
      "scalar":1.25,
      "slope":0.05,
      "threshold":0.50,
      "window":12
    },
    {
        "inputs":"filterssmurf",
      "type":"writers.las",
      "minor_version":"4",
      "compression":"true",
      "extra_dims":"OldClassification=uint8, DTM=float, Window=uint8, Slope=float",
      "scale_x":"0.01",
      "scale_y":"0.01",
      "scale_z":"0.01",
      "offset_x":"auto",
      "offset_y":"auto",
      "offset_z":"auto",
      "filename":"C:/data/forest_park/smrf/forest_park (window-12, slope-0_05).laz"
    }
  ]
}

info -stats JSON output:

{
  "filename": "C:\\data\\forest_park\\smrf\\forest_park (window-12, slope-0_05).laz",
  "pdal_version": "1.7.1 (git-version: Release)",
  "stats":
  {
    "bbox":
    {
      "EPSG:4326":
      {
        "bbox":
        {
          "maxx": -90.26228629,
          "maxy": 38.63885582,
          "maxz": 231.3,
          "minx": -90.26674834,
          "miny": 38.63740345,
          "minz": 146.26
        },
        "boundary": {
   "coordinates" : [
      [
         [ -90.266748340000007, 38.637506649999999 ],
         [ -90.266697059999998, 38.638855820000003 ],
         [ -90.262286290000006, 38.638752609999997 ],
         [ -90.262337650000006, 38.637403450000001 ],
         [ -90.266748340000007, 38.637506649999999 ]
      ]
   ],
   "type" : "Polygon"
}

      },
      "native":
      {
        "bbox":
        {
          "maxx": 738284.32,
          "maxy": 4280246,
          "maxz": 231.3,
          "minx": 737900.01,
          "miny": 4280096.12,
          "minz": 146.26
        },
        "boundary": {
   "coordinates" : [
      [
         [ 737900.01000000001, 4280096.1200000001 ],
         [ 737900.01000000001, 4280246 ],
         [ 738284.31999999995, 4280246 ],
         [ 738284.31999999995, 4280096.1200000001 ],
         [ 737900.01000000001, 4280096.1200000001 ]
      ]
   ],
   "type" : "Polygon"
}

      }
    },
    "statistic":
    [
      {
        "average": 738047.8528,
        "count": 100000,
        "kurtosis": -1.058617353e+21,
        "maximum": 738284.32,
        "minimum": 737900.01,
        "name": "X",
        "position": 0,
        "skewness": 5.819331476e+21,
        "stddev": 2335.463392,
        "variance": 5454389.253
      },
      {
        "average": 4280180.736,
        "count": 100000,
        "kurtosis": 1.110237075e+20,
        "maximum": 4280246,
        "minimum": 4280096.12,
        "name": "Y",
        "position": 1,
        "skewness": 5.833279928e+21,
        "stddev": 13535.46299,
        "variance": 183208758.5
      },
      {
        "average": 172.814753,
        "count": 100000,
        "kurtosis": -1.151862193e+17,
        "maximum": 231.3,
        "minimum": 146.26,
        "name": "Z",
        "position": 2,
        "skewness": 4.786721963e+16,
        "stddev": 24.75900268,
        "variance": 613.0082139
      },
      {
        "average": 13627.78624,
        "count": 100000,
        "kurtosis": -9.799196037e+11,
        "maximum": 65520,
        "minimum": 48,
        "name": "Intensity",
        "position": 3,
        "skewness": 2.271591546e+11,
        "stddev": 11494.12826,
        "variance": 132114984.4
      },
      {
        "average": 1.16788,
        "count": 100000,
        "kurtosis": -3.136035307e+15,
        "maximum": 7,
        "minimum": 1,
        "name": "ReturnNumber",
        "position": 4,
        "skewness": 2.081955413e+15,
        "stddev": 0.4458118459,
        "variance": 0.198748202
      },
      {
        "average": 1.33647,
        "count": 100000,
        "kurtosis": 2.44020564e+16,
        "maximum": 7,
        "minimum": 1,
        "name": "NumberOfReturns",
        "position": 5,
        "skewness": 5.819448528e+15,
        "stddev": 0.6329627186,
        "variance": 0.4006418031
      },
      {
        "average": 0.50087,
        "count": 100000,
        "kurtosis": -2.000079167,
        "maximum": 1,
        "minimum": 0,
        "name": "ScanDirectionFlag",
        "position": 6,
        "skewness": -0.003486625756,
        "stddev": 0.5000250321,
        "variance": 0.2500250328
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "EdgeOfFlightLine",
        "position": 7,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 1.69919,
        "count": 100000,
        "kurtosis": -1.16609259e+16,
        "maximum": 2,
        "minimum": 1,
        "name": "Classification",
        "position": 8,
        "skewness": 1.912221988e+15,
        "stddev": 0.4586301939,
        "variance": 0.2103416548
      },
      {
        "average": -2.09112,
        "count": 100000,
        "kurtosis": 6.331454949e+15,
        "maximum": 6,
        "minimum": -7,
        "name": "ScanAngleRank",
        "position": 9,
        "skewness": -1.275371659e+15,
        "stddev": 3.14954445,
        "variance": 9.919630242
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "UserData",
        "position": 10,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 45,
        "count": 100000,
        "kurtosis": 99997,
        "maximum": 45,
        "minimum": 45,
        "name": "PointSourceId",
        "position": 11,
        "skewness": 5.833372669e+21,
        "stddev": 0.1423032062,
        "variance": 0.0202502025
      },
      {
        "average": 255,
        "count": 100000,
        "kurtosis": 99997,
        "maximum": 255,
        "minimum": 255,
        "name": "Red",
        "position": 12,
        "skewness": 5.833372669e+21,
        "stddev": 0.8063848353,
        "variance": 0.6502565026

      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Green",
        "position": 13,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Blue",
        "position": 14,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 172254001,
        "count": 100000,
        "kurtosis": -3.202512756e+16,
        "maximum": 172254002.3,
        "minimum": 172253999.8,
        "name": "GpsTime",
        "position": 15,
        "skewness": 5.833372669e+21,
        "stddev": 544717.7005,
        "variance": 2.967173733e+11

      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "ScanChannel",
        "position": 16,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "ClassFlags",
        "position": 17,
        "stddev": 0,
        "variance": 0
      },
      {
        "average": 18.01678,
        "count": 100000,
        "kurtosis": -1.884682428e+10,
        "maximum": 66,
        "minimum": 1,
        "name": "OldClassification",
        "position": 18,
        "skewness": 7910529149,
        "stddev": 28.56978029,
        "variance": 816.2323461
      },
      {
        "average": 153.4204378,
        "count": 100000,
        "kurtosis": -3.477613714e+20,
        "maximum": 156.4029999,
        "minimum": 146.477005,
        "name": "DTM",
        "position": 19,
        "skewness": 1.411306933e+20,
        "stddev": 1.666234469,
        "variance": 2.776337307
      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Window",
        "position": 20,
        "stddev": 0,
        "variance": 0

      },
      {
        "average": 0,
        "count": 100000,
        "maximum": 0,
        "minimum": 0,
        "name": "Slope",
        "position": 21,
        "stddev": 0,
        "variance": 0

      }
    ]
  }
}




_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] Filters.assign: not all filters applied

Howard Butler-3


> On Apr 14, 2018, at 8:15 PM, Eric Robeck <[hidden email]> wrote:
>
> Thanks, everyone! I'll get back to work and stop spamming your inboxes.

On the contrary, keep it up. Your documentation of your learning journey with the tools is helping us find sticky spots that we can document, illustrate, and patch to make them work better.

If you’re spamming us, we will let you know (privately).

Howard

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] Filters.assign: not all filters applied

andrew.bell.ia@gmail.com
A change that was made to filters.ferry for version 1.7 broke dimension creation. I'll fix shortly.

On Sat, Apr 14, 2018, 9:34 PM Howard Butler <[hidden email]> wrote:


> On Apr 14, 2018, at 8:15 PM, Eric Robeck <[hidden email]> wrote:
>
> Thanks, everyone! I'll get back to work and stop spamming your inboxes.

On the contrary, keep it up. Your documentation of your learning journey with the tools is helping us find sticky spots that we can document, illustrate, and patch to make them work better.

If you’re spamming us, we will let you know (privately).

Howard

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] Filters.assign: not all filters applied

andrew.bell.ia@gmail.com
Eric,

I can't recreate the issue with the assignment problems.  I'm a little suspicious of your test because you should get an error with the following
assignments:

      "assignment":"Classification[:]=0",
      "assignment":"Window[:]=12",
      "assignment":"Slope[:]=0_50",
      "assignment":"GpsTime[:]=3000",
      "assignment":"Red[:]=255"

That's because "0_50" isn't a valid value to assign for Slope.  When I run a pipeline with a similar construct, I get:

$ bin/pdal pipeline test.json
PDAL: filters.assign: Invalid value for argument 'assignment'.

Please try to reproduce your issue using a pipeline with limited stages.


On Sat, Apr 14, 2018 at 9:50 PM, Andrew Bell <[hidden email]> wrote:
A change that was made to filters.ferry for version 1.7 broke dimension creation. I'll fix shortly.

On Sat, Apr 14, 2018, 9:34 PM Howard Butler <[hidden email]> wrote:


> On Apr 14, 2018, at 8:15 PM, Eric Robeck <[hidden email]> wrote:
>
> Thanks, everyone! I'll get back to work and stop spamming your inboxes.

On the contrary, keep it up. Your documentation of your learning journey with the tools is helping us find sticky spots that we can document, illustrate, and patch to make them work better.

If you’re spamming us, we will let you know (privately).

Howard

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal



--
Andrew Bell
[hidden email]

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] Filters.assign: not all filters applied

Eric Robeck
Andrew,

I was busy using PDAL for batch exporting, so I just got back to this now. I see my mistake- that should be '0.50'. I hadn't noticed it before because PDAL didn't throw an error. However, when I make that the LAST assignment, I get the same error. So this:

    {
      "type":"filters.assign",
      "assignment":"Classification[:]=0",
      "assignment":"Window[:]=12",
      "assignment":"Slope[:]=0_50"
    },


returns this:

PDAL: filters.assign: Invalid value for argument 'assignment'.

As I said before, my PDAL instance must be skipping all but the last assignment, so it didn't throw an error until I made it the last assignment. Even in the instance above, the Classification and Window assignments are not made.

Even when I strip out everything but the reader, writer, filter and assign stages (as below), PDAL still ignores the Slope value error and fails to assign all but the Red value. I am using PDAL 1.7.1. This isn't an impediment to my workflow, as I got around it using multiple stages with single assignments.

Thanks for your help!

Regards,
Eric

{
  "pipeline":
  [
    {
      "filename":"C:/data/forest_park/forest_park_orig_dtm.laz",
      "type":"readers.las",
      "count":100000
    },
    {
      "type":"filters.ferry",
      "dimensions":"=>Window, =>Slope"
    },
    {
      "type":"filters.assign",
      "assignment":"Classification[:]=0",
      "assignment":"Window[:]=12",
      "assignment":"Slope[:]=0_50",
      "assignment":"GpsTime[:]=3000",
      "assignment":"Red[:]=255"
    },
    {
      "type":"writers.las",
      "minor_version":"4",
      "compression":"true",
      "extra_dims":"Window=uint8, Slope=float",
      "filename":"c:/data/forest_park/filters_assign_test.laz"
    }
  ]
}



On Mon, Apr 16, 2018 at 9:20 AM, Andrew Bell <[hidden email]> wrote:
Eric,

I can't recreate the issue with the assignment problems.  I'm a little suspicious of your test because you should get an error with the following
assignments:

      "assignment":"Classification[:]=0",
      "assignment":"Window[:]=12",
      "assignment":"Slope[:]=0_50",
      "assignment":"GpsTime[:]=3000",
      "assignment":"Red[:]=255"

That's because "0_50" isn't a valid value to assign for Slope.  When I run a pipeline with a similar construct, I get:

$ bin/pdal pipeline test.json
PDAL: filters.assign: Invalid value for argument 'assignment'.

Please try to reproduce your issue using a pipeline with limited stages.


On Sat, Apr 14, 2018 at 9:50 PM, Andrew Bell <[hidden email]> wrote:
A change that was made to filters.ferry for version 1.7 broke dimension creation. I'll fix shortly.

On Sat, Apr 14, 2018, 9:34 PM Howard Butler <[hidden email]> wrote:


> On Apr 14, 2018, at 8:15 PM, Eric Robeck <[hidden email]> wrote:
>
> Thanks, everyone! I'll get back to work and stop spamming your inboxes.

On the contrary, keep it up. Your documentation of your learning journey with the tools is helping us find sticky spots that we can document, illustrate, and patch to make them work better.

If you’re spamming us, we will let you know (privately).

Howard

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal



--
Andrew Bell
[hidden email]


_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] Filters.assign: not all filters applied

andrew.bell.ia@gmail.com
On Wed, Apr 18, 2018 at 11:13 PM, Eric Robeck <[hidden email]> wrote:
Andrew,

I was busy using PDAL for batch exporting, so I just got back to this now. I see my mistake- that should be '0.50'. I hadn't noticed it before because PDAL didn't throw an error. However, when I make that the LAST assignment, I get the same error. So this:

    {
      "type":"filters.assign",
      "assignment":"Classification[:]=0",
      "assignment":"Window[:]=12",
      "assignment":"Slope[:]=0_50"
    },


returns this:

PDAL: filters.assign: Invalid value for argument 'assignment'.

Thanks for your persistence in helping me track this down.  This issue was introduced when we switched from XML pipelines to JSON, which has ambiguous handling for repeated keys.  I've opened the following issue to deal with the problem: 


For the time being, you can create multiple assign filters and get the same behavior.

Thanks,

--
Andrew Bell
[hidden email]

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal