[pdal] Setting SRS on las file

Matthew Hanson mhanson at appliedgeosolutions.com
Wed Feb 11 12:37:11 PST 2015


I've got a follow-up question with this.

I've got a pipeline XML file to generate the output TIF, and set the input
and output filenames on the command line like so:

pdal pipeline -i density.xml --writers.p2g.filename=aal_232_9752_class
--readers.las.filename=aal_232_9752_class.las

Is there a way to set the output srs at the same time?  I don't want to
reproject it, just assign it.  For example, something like this (although
this didn't work):

pdal pipeline -i density.xml --writers.p2g.filename=aal_232_9752_class
--readers.las.filename=aal_232_9752_class.las -v4
--writers.p2g.out_srs=EPSG:32750


Thanks for all the help so far,

matt






Matthew Hanson
Applied GeoSolutions
(603) 659-3363 x91
http://appliedgeosolutions.com
mhanson at appliedgeosolutions.com


On Mon, Feb 9, 2015 at 11:48 AM, Matthew Hanson <
mhanson at appliedgeosolutions.com> wrote:

> Thanks to you both, this is indeed helpful
>
> Matthew Hanson
> Applied GeoSolutions
> (603) 659-3363 x91
> http://appliedgeosolutions.com
> mhanson at appliedgeosolutions.com
>
>
> On Sun, Feb 8, 2015 at 10:55 AM, Howard Butler <howard at hobu.co> wrote:
>
>>
>> > On Feb 6, 2015, at 2:13 PM, Matthew Hanson <
>> mhanson at appliedgeosolutions.com> wrote:
>> >
>> >
>> > We have las files that have no spatial reference embedded in the file.
>>  For one, I'm not sure it's necessary to actually add the spatial reference
>> to the las file.  We want to create DEM's, so perhaps it's better to just
>> leave them as is then set the SRS on the final GeoTiffs.
>> >
>> > However, for the moment assuming that this makes sense, when I run pdal
>> translate
>> > $ pdal translate -i input.las -o output.las -a_srs EPSG:XXXXX
>> >
>> > I get a file that is bigger than the original because it's seemed to
>> add 4 new dimensions: Time, Red, Green, Blue.   The original file did not
>> have them, although I notice that lasinfo reports min and max for all those
>> fields in both files, even though they are missing from the original.
>> >
>> > Are these standard dimensions in las files, and is there any way to
>> control if they are added or not?
>>
>> Control it with the "format" option, and set it to 0 if you don't want
>> Time or RGB. It defaults to 3, which includes those dimensions.
>>
>> > $ pdal translate -i input.las -o output.las -a_srs EPSG:XXXXX
>> --writers.las.format=0
>>
>>
>> >  If we want to add the SRS to files, I'd rather not increase the size
>> of them all.  Although maybe this is moot since, as per above, it just
>> doesn't make sense to add the SRS anyway.
>>
>> It is probably easiest to leave the SRS alone until the final GeoTIFF
>> write (and then set it with a GDAL VRT). The only advantage of setting it
>> on the file before processing is so you don't have to do it in a later step.
>>
>> Another problem here is setting the SRS is going to cause a rewrite of
>> the entire file due to the VLRs needing to be modified. This is one entire
>> extra i/o step that's not needed.
>>
>> Hope this helps,
>>
>> Howard
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20150211/02f8077a/attachment.html>


More information about the pdal mailing list