[pdal] writers.gdal produces "corrupt" PNGs?

Howard Butler howard at hobu.co
Sat Jul 8 13:09:05 PDT 2017


Vladimir,

You need to be specific about what you mean by "cannot view the PNG with Firefox...".

The output of writers.gdal with the configuration you've provided is a 2-band PNG. That's probably not what you are expecting. Presumably you will want a colorized PNG or something? In that case, write out only the idw band as a PNG, and then use a GDAL VRT plus a color interpretation to convert that to a PNG that would be viewable in a way you'd expect in Firefox.

Hope this helps,

Howard

> On Jul 7, 2017, at 9:17 PM, Adam Steer <Adam.Steer at anu.edu.au> wrote:
> 
> HI Vladimir - can you check whether a PNG with just one ‘band’ (ie ‘max’ OR ‘idw’ but not both) works?
> 
> That’s all I can think of… I actually need to test this as well :) Next week…
> 
> Cheers
> 
> Adam
> 
> 
>> On 8 Jul 2017, at 3:18 am, Vladimir Sandoval <vladimir.sandoval at yandex.com> wrote:
>> 
>> Trying to make a PNG from a .laz file to display in Firefox.
>> 
>> {
>>  "pipeline":[
>>    "somefile.laz",
>>    {
>>     "type":"writers.gdal",
>>      "resolution": 1,
>>      "output_type":"idw",
>>      "output_type":"max",
>>       "gdalopts":"of=PNG,outsize=128 128",
>>       "gdalopts":"co=WRITE_METADATA_AS_TEXT=NO",
>>      "filename":"outputfile.png"
>>    }
>>  ]
>> }
>> 
>> The pipeline runs and produces a PNG. I cannot view the PNG with Firefox, MS Paint, or Windows Photo Viewer, HOWEVER, I can open it and view it in Opticks (https://sourceforge.net/projects/opticks/).
>> 
>> Opticks shows a single band grey scale image, probably representative of the original .laz.
>> 
>> Anything I'm doing wrong here producing the "corrupted" PNG?
>> _______________________________________________
>> pdal mailing list
>> pdal at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/pdal
> 
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pdal



More information about the pdal mailing list