The GDAL reader reads GDAL readable raster data sources as point clouds.
Each pixel is given an X and Y coordinate (and corresponding PDAL dimensions) that are center pixel, and each band is represented by "band-1", "band-2", or "band-n". The user must know what the bands correspond to, and use filters.ferry
to copy data into known dimensions
as needed.
Note
filters.ferry
is needed to map GDAL output to typical dimensions
names. For output to formats such as LAS <writers.las>
, this mapping is required.
Simply writing every pixel of a JPEG to a text file is not very useful.
{
"pipeline":[
{
"type":"readers.gdal",
"filename":"./pdal/test/data/autzen/autzen.jpg"
},
{
"type":"writers.text",
"filename":"outputfile.txt"
}
]
}
The following example assigns the bands from a JPG to the RGB values of an ASPRS LAS file using writers.las
.
{
"pipeline":[
{
"type":"readers.gdal",
"filename":"./pdal/test/data/autzen/autzen.jpg"
},
{
"type":"filters.ferry",
"dimensions":"band-1=Red, band-2=Green, band-3=Blue",
},
{
"type":"writers.text",
"filename":"outputfile.txt"
}
]
}
- filename
GDALOpen 'able raster file to read [Required]
- count
Maximum number of points to read [Optional]
- header
A comma-separated list of
dimensions
IDs to map bands to. The length of the list must match the number of bands in the raster.