<div dir="ltr"><div><div><div><div><div>All,<br><br></div>I answered my last question above:<br><span style="color:rgb(0,0,255)"><br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="color:rgb(11,83,148)"><u><b>However, I can't set the values of Window and Slope</b></u> - 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?</span>
<br></blockquote><br></div>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?<br><br></div>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 (<a href="https://www.pdal.io/stages/filters.assign.html#filters-assign">https://www.pdal.io/stages/filters.assign.html#filters-assign</a>).<br><br></div><div>Thanks, everyone! I'll get back to work and stop spamming your inboxes.<br></div><div><br></div>Regards,<br></div>Eric<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 14, 2018 at 7:38 PM, Eric Robeck <span dir="ltr"><<a href="mailto:erobeck@gmail.com" target="_blank">erobeck@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>PDAL team -<br><br>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.<br><br></div>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 <b>info --stats</b> 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.<br><br></div>If I insert more <b>filters.assign</b> stages in the pipeline, I can set values multiple dimensions, but only if they are the last listed in each stage.<br><br></div><u><b>However, I can't set the values of Window and Slope</b></u> - 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?<br><br></div>Thanks in advance.<br><br></div>Regards,<br></div>Eric<br><div><div><div><div><div><div><div><div><div><div><div><b><br><br></b></div><div><font size="4"><u><b>Pipeline (limited to the first 100,000 points for testing). File is LAZ 1.4 format:</b></u></font><br></div><div><br><span style="font-family:monospace,monospace">{<br> "pipeline":<br> [<br> {<br> "filename":"C:/data/forest_<wbr>park/forest_park_orig_dtm.laz"<wbr>,<br> "type":"readers.las",<br> "extra_dims":"<wbr>OldClassification=uint8, DTM=float",<br> "count":100000<br> },<br> {<br> "type":"filters.ferry",<br> "tag":"filtersferry",<br> "dimensions":"=>Window, =>Slope"<br> },<br> {<br> "inputs":"filtersferry",<br> "type":"filters.assign",<br> "tag":"filtersassign",<br><span style="background-color:rgb(255,255,0)"> "assignment":"Classification[:<wbr>]=0",<br> "assignment":"Window[:]=12",<br> "assignment":"Slope[:]=0_50",<br> "assignment":"GpsTime[:]=3000"<wbr>,<br> "assignment":"Red[:]=255"</span><br> },<br> {<br> "inputs":"filtersassign",<br> "type":"filters.smrf",<br> "tag":"filterssmurf",<br> "cell":1.00,<br> "cut":0,<br> "scalar":1.25,<br> "slope":0.05,<br> "threshold":0.50,<br> "window":12<br> },<br> {<br> "inputs":"filterssmurf",<br> "type":"writers.las",<br> "minor_version":"4",<br> "compression":"true",<br> "extra_dims":"<wbr>OldClassification=uint8, DTM=float, Window=uint8, Slope=float",<br> "scale_x":"0.01",<br> "scale_y":"0.01",<br> "scale_z":"0.01",<br> "offset_x":"auto",<br> "offset_y":"auto",<br> "offset_z":"auto",<br> "filename":"C:/data/forest_<wbr>park/smrf/forest_park (window-12, slope-0_05).laz"<br> }<br> ]<br>}<br><br></span></div><div><font size="4"><span style="font-family:arial,helvetica,sans-serif"><u><b>info -stats JSON output:</b></u></span></font><span style="font-family:monospace,monospace"><br><br>{<br> "filename": "C:\\data\\forest_park\\smrf\\<wbr>forest_park (window-12, slope-0_05).laz",<br> "pdal_version": "1.7.1 (git-version: Release)",<br> "stats":<br> {<br> "bbox":<br> {<br> "EPSG:4326":<br> {<br> "bbox":<br> {<br> "maxx": -90.26228629,<br> "maxy": 38.63885582,<br> "maxz": 231.3,<br> "minx": -90.26674834,<br> "miny": 38.63740345,<br> "minz": 146.26<br> },<br> "boundary": {<br> "coordinates" : [<br> [<br> [ -90.266748340000007, 38.637506649999999 ],<br> [ -90.266697059999998, 38.638855820000003 ],<br> [ -90.262286290000006, 38.638752609999997 ],<br> [ -90.262337650000006, 38.637403450000001 ],<br> [ -90.266748340000007, 38.637506649999999 ]<br> ]<br> ],<br> "type" : "Polygon"<br>}<br><br> },<br> "native":<br> {<br> "bbox":<br> {<br> "maxx": 738284.32,<br> "maxy": 4280246,<br> "maxz": 231.3,<br> "minx": 737900.01,<br> "miny": 4280096.12,<br> "minz": 146.26<br> },<br> "boundary": {<br> "coordinates" : [<br> [<br> [ 737900.01000000001, 4280096.1200000001 ],<br> [ 737900.01000000001, 4280246 ],<br> [ 738284.31999999995, 4280246 ],<br> [ 738284.31999999995, 4280096.1200000001 ],<br> [ 737900.01000000001, 4280096.1200000001 ]<br> ]<br> ],<br> "type" : "Polygon"<br>}<br><br> }<br> },<br> "statistic":<br> [<br> {<br> "average": 738047.8528,<br> "count": 100000,<br> "kurtosis": -1.058617353e+21,<br> "maximum": 738284.32,<br> "minimum": 737900.01,<br> "name": "X",<br> "position": 0,<br> "skewness": 5.819331476e+21,<br> "stddev": 2335.463392,<br> "variance": 5454389.253<br> },<br> {<br> "average": 4280180.736,<br> "count": 100000,<br> "kurtosis": 1.110237075e+20,<br> "maximum": 4280246,<br> "minimum": 4280096.12,<br> "name": "Y",<br> "position": 1,<br> "skewness": 5.833279928e+21,<br> "stddev": 13535.46299,<br> "variance": 183208758.5<br> },<br> {<br> "average": 172.814753,<br> "count": 100000,<br> "kurtosis": -1.151862193e+17,<br> "maximum": 231.3,<br> "minimum": 146.26,<br> "name": "Z",<br> "position": 2,<br> "skewness": 4.786721963e+16,<br> "stddev": 24.75900268,<br> "variance": 613.0082139<br> },<br> {<br> "average": 13627.78624,<br> "count": 100000,<br> "kurtosis": -9.799196037e+11,<br> "maximum": 65520,<br> "minimum": 48,<br> "name": "Intensity",<br> "position": 3,<br> "skewness": 2.271591546e+11,<br> "stddev": 11494.12826,<br> "variance": 132114984.4<br> },<br> {<br> "average": 1.16788,<br> "count": 100000,<br> "kurtosis": -3.136035307e+15,<br> "maximum": 7,<br> "minimum": 1,<br> "name": "ReturnNumber",<br> "position": 4,<br> "skewness": 2.081955413e+15,<br> "stddev": 0.4458118459,<br> "variance": 0.198748202<br> },<br> {<br> "average": 1.33647,<br> "count": 100000,<br> "kurtosis": 2.44020564e+16,<br> "maximum": 7,<br> "minimum": 1,<br> "name": "NumberOfReturns",<br> "position": 5,<br> "skewness": 5.819448528e+15,<br> "stddev": 0.6329627186,<br> "variance": 0.4006418031<br> },<br> {<br> "average": 0.50087,<br> "count": 100000,<br> "kurtosis": -2.000079167,<br> "maximum": 1,<br> "minimum": 0,<br> "name": "ScanDirectionFlag",<br> "position": 6,<br> "skewness": -0.003486625756,<br> "stddev": 0.5000250321,<br> "variance": 0.2500250328<br> },<br> {<br> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> "name": "EdgeOfFlightLine",<br> "position": 7,<br> "stddev": 0,<br> "variance": 0<br> },<br> {<br> "average": 1.69919,<br> "count": 100000,<br> "kurtosis": -1.16609259e+16,<br> "maximum": 2,<br> "minimum": 1,<br> "name": "Classification",<br> "position": 8,<br> "skewness": 1.912221988e+15,<br> "stddev": 0.4586301939,<br> "variance": 0.2103416548<br> },<br> {<br> "average": -2.09112,<br> "count": 100000,<br> "kurtosis": 6.331454949e+15,<br> "maximum": 6,<br> "minimum": -7,<br> "name": "ScanAngleRank",<br> "position": 9,<br> "skewness": -1.275371659e+15,<br> "stddev": 3.14954445,<br> "variance": 9.919630242<br> },<br> {<br> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> "name": "UserData",<br> "position": 10,<br> "stddev": 0,<br> "variance": 0<br> },<br> {<br> "average": 45,<br> "count": 100000,<br> "kurtosis": 99997,<br> "maximum": 45,<br> "minimum": 45,<br> "name": "PointSourceId",<br> "position": 11,<br> "skewness": 5.833372669e+21,<br> "stddev": 0.1423032062,<br> "variance": 0.0202502025<br> },<br> {<br><span style="background-color:rgb(255,255,0)"> "average": 255,<br> "count": 100000,<br> "kurtosis": 99997,<br> "maximum": 255,<br> "minimum": 255,<br> <b>"name": "Red",</b><br> "position": 12,<br> "skewness": 5.833372669e+21,<br> "stddev": 0.8063848353,<br> "variance": 0.6502565026</span><br> },<br> {<br> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> "name": "Green",<br> "position": 13,<br> "stddev": 0,<br> "variance": 0<br> },<br> {<br> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> "name": "Blue",<br> "position": 14,<br> "stddev": 0,<br> "variance": 0<br> },<br> {<br><span style="background-color:rgb(255,255,0)"> "average": 172254001,<br> "count": 100000,<br> "kurtosis": -3.202512756e+16,<br> "maximum": 172254002.3,<br> "minimum": 172253999.8,<br> <b>"name": "GpsTime",</b><br> "position": 15,<br> "skewness": 5.833372669e+21,<br> "stddev": 544717.7005,<br> "variance": 2.967173733e+11</span><br> },<br> {<br> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> "name": "ScanChannel",<br> "position": 16,<br> "stddev": 0,<br> "variance": 0<br> },<br> {<br> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> "name": "ClassFlags",<br> "position": 17,<br> "stddev": 0,<br> "variance": 0<br> },<br> {<br> "average": 18.01678,<br> "count": 100000,<br> "kurtosis": -1.884682428e+10,<br> "maximum": 66,<br> "minimum": 1,<br> "name": "OldClassification",<br> "position": 18,<br> "skewness": 7910529149,<br> "stddev": 28.56978029,<br> "variance": 816.2323461<br> },<br> {<br> "average": 153.4204378,<br> "count": 100000,<br> "kurtosis": -3.477613714e+20,<br> "maximum": 156.4029999,<br> "minimum": 146.477005,<br> "name": "DTM",<br> "position": 19,<br> "skewness": 1.411306933e+20,<br> "stddev": 1.666234469,<br> "variance": 2.776337307<br> },<br> {<br><span style="background-color:rgb(255,255,0)"> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> <b>"name": "Window",</b><br> "position": 20,<br> "stddev": 0,<br> "variance": 0</span><br> },<br> {<br><span style="background-color:rgb(255,255,0)"> "average": 0,<br> "count": 100000,<br> "maximum": 0,<br> "minimum": 0,<br> <b>"name": "Slope",</b><br> "position": 21,<br> "stddev": 0,<br> "variance": 0</span><br> }<br> ]<br> }<br>}<br><br></span></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div>