[pdal] losing precision in PDAL pipeline

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

[pdal] losing precision in PDAL pipeline

Karl North

Good morning once again PDAL’ers.  It’s a new day, and a new issue…

 

I’m running a multi-step process using several executions of “pdal translate” and at the end assembling the various parts ( multiple LAS files ) from these executions into a final point cloud ( LAS file ) for delivery.  All of the “pdal translate” commands include the string : --writers.las.forward="all" in order to preserve the precision of the source data.

 

My problem is that at the final step where I use “pdal pipeline” to merge the various parts, my file precision gets truncated from 0.001 to 0.01 units.

 

Below is a simple minimalist sample JSON file that I am running through “pdal pipeline” to do the merge operation.  I have checked and all the input LAS files have 0.001 precision but the output LAS has only 0.01 precision.  I expected the forward=all line to preserve scales and offsets.

 

Please help.  What am I missing?

 

{

    "pipeline":[

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step01b",

            "filename":"WT_4447_596_step01b.las"

        },

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step02",

            "filename":"WT_4447_596_step02.las"

        },

        {

            "type":"writers.las",

            "inputs":["WT_4447_596_step01b","WT_4447_596_step02"],

            "forward":"all",

            "filename":"WT_4447_596_step03.las"

        }

    ]

}

 

Karl

 


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

Re: [pdal] losing precision in PDAL pipeline

TKambi
Hello Karl,

By default the scale value used in PDAL is 0.01. So if you need higher precision you may want to provide "scale_x", "scale_y" and "scale_z" parameters in your input and output.

Warm Regards,
Thejus


On Thu, Aug 8, 2019 at 10:29 AM Karl North <[hidden email]> wrote:

Good morning once again PDAL’ers.  It’s a new day, and a new issue…

 

I’m running a multi-step process using several executions of “pdal translate” and at the end assembling the various parts ( multiple LAS files ) from these executions into a final point cloud ( LAS file ) for delivery.  All of the “pdal translate” commands include the string : --writers.las.forward="all" in order to preserve the precision of the source data.

 

My problem is that at the final step where I use “pdal pipeline” to merge the various parts, my file precision gets truncated from 0.001 to 0.01 units.

 

Below is a simple minimalist sample JSON file that I am running through “pdal pipeline” to do the merge operation.  I have checked and all the input LAS files have 0.001 precision but the output LAS has only 0.01 precision.  I expected the forward=all line to preserve scales and offsets.

 

Please help.  What am I missing?

 

{

    "pipeline":[

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step01b",

            "filename":"WT_4447_596_step01b.las"

        },

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step02",

            "filename":"WT_4447_596_step02.las"

        },

        {

            "type":"writers.las",

            "inputs":["WT_4447_596_step01b","WT_4447_596_step02"],

            "forward":"all",

            "filename":"WT_4447_596_step03.las"

        }

    ]

}

 

Karl

 

_______________________________________________
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] losing precision in PDAL pipeline

andrew.bell.ia@gmail.com
In reply to this post by Karl North
I suspect the scale of your input files differs. If this is the case, the scale values aren't forwarded. You'll have to set them manually.

,

On Thu, Aug 8, 2019, 11:29 AM Karl North <[hidden email]> wrote:

Good morning once again PDAL’ers.  It’s a new day, and a new issue…

 

I’m running a multi-step process using several executions of “pdal translate” and at the end assembling the various parts ( multiple LAS files ) from these executions into a final point cloud ( LAS file ) for delivery.  All of the “pdal translate” commands include the string : --writers.las.forward="all" in order to preserve the precision of the source data.

 

My problem is that at the final step where I use “pdal pipeline” to merge the various parts, my file precision gets truncated from 0.001 to 0.01 units.

 

Below is a simple minimalist sample JSON file that I am running through “pdal pipeline” to do the merge operation.  I have checked and all the input LAS files have 0.001 precision but the output LAS has only 0.01 precision.  I expected the forward=all line to preserve scales and offsets.

 

Please help.  What am I missing?

 

{

    "pipeline":[

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step01b",

            "filename":"WT_4447_596_step01b.las"

        },

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step02",

            "filename":"WT_4447_596_step02.las"

        },

        {

            "type":"writers.las",

            "inputs":["WT_4447_596_step01b","WT_4447_596_step02"],

            "forward":"all",

            "filename":"WT_4447_596_step03.las"

        }

    ]

}

 

Karl

 

_______________________________________________
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] losing precision in PDAL pipeline

andrew.bell.ia@gmail.com
This is caused by a bug that writes metadata for LAS scale/offset with excess precision.  I've opened this issue to address the problem:  https://github.com/PDAL/PDAL/issues/2663

On Thu, Aug 8, 2019 at 11:55 AM Andrew Bell <[hidden email]> wrote:
I suspect the scale of your input files differs. If this is the case, the scale values aren't forwarded. You'll have to set them manually.

,

On Thu, Aug 8, 2019, 11:29 AM Karl North <[hidden email]> wrote:

Good morning once again PDAL’ers.  It’s a new day, and a new issue…

 

I’m running a multi-step process using several executions of “pdal translate” and at the end assembling the various parts ( multiple LAS files ) from these executions into a final point cloud ( LAS file ) for delivery.  All of the “pdal translate” commands include the string : --writers.las.forward="all" in order to preserve the precision of the source data.

 

My problem is that at the final step where I use “pdal pipeline” to merge the various parts, my file precision gets truncated from 0.001 to 0.01 units.

 

Below is a simple minimalist sample JSON file that I am running through “pdal pipeline” to do the merge operation.  I have checked and all the input LAS files have 0.001 precision but the output LAS has only 0.01 precision.  I expected the forward=all line to preserve scales and offsets.

 

Please help.  What am I missing?

 

{

    "pipeline":[

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step01b",

            "filename":"WT_4447_596_step01b.las"

        },

        {

            "type":"readers.las",

            "tag":"WT_4447_596_step02",

            "filename":"WT_4447_596_step02.las"

        },

        {

            "type":"writers.las",

            "inputs":["WT_4447_596_step01b","WT_4447_596_step02"],

            "forward":"all",

            "filename":"WT_4447_596_step03.las"

        }

    ]

}

 

Karl

 

_______________________________________________
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