[pdal] Scaling of dimensions when writing to las
Chris Foster
chris.foster at roames.com.au
Thu Jun 27 20:13:06 PDT 2013
On 28 June 2013 00:59, Howard Butler <hobu.inc at gmail.com> wrote:
> On Jun 26, 2013, at 11:46 PM, Chris Foster <chris.foster at roames.com.au> wrote:
>
>> One thing which isn't clear to me is how quantization works when
>> output to las is desired.
>
> The drivers.las.writer will take the first "X" dimension it finds in the
> schema (in this case it is the X dimension of double's from the
> drivers.faux.reader), cast it to a int32_t, and write that into the file.
Ah I see now - the raw buffer data is interpreted as int32_t via
getField<int32_t>() in las/Writer.cpp, but I've supplied it with doubles in
the buffer so bad things are obviously going to happen.
It would be nice for this error to be more transparent to the end user. Would
modifying las::Writer::writeBufferBegin() or las::Writer::writeBuffer() to
check that the types are consistent be the right thing? I'm happy to submit a
pull request for this.
> For example, the following pipeline will set the scale for the X, Y, Z
> dimensions to 0.1, and set the offset to 2.0. The drivers.faux.reader will
> simply return doubles between 0-10 for X, Y, and 0-2 for Z.
>
> Make sure to take a peek at the pipeline xml files in test/data for
> inspiration on filters and operations to try.
>
> Hope this helps,
Very much. Thanks.
~Chris
More information about the pdal
mailing list