[pdal] Bug in readers.gdal?

Kristian Evers kreve at sdfe.dk
Mon Feb 8 08:29:20 PST 2016


Here’s the output. Seems like the reader is not reading the tif properly. I have checked that the tif is not filled with zeros (see gdalinfo output below).

<?xml version="1.0" encoding="utf-8"?>
<Pipeline version="1.0">
    <Writer type="writers.null">
        <Filter type="filters.stats">
            <Metadata name="filters.stats" type="">
                <Metadata name="statistic" type="">
                    <Metadata name="average" type="double">717500</Metadata>
                    <Metadata name="count" type="nonNegativeInteger">6250000</Metadata>
                    <Metadata name="maximum" type="double">717999.8</Metadata>
                    <Metadata name="minimum" type="double">717000.2</Metadata>
                    <Metadata name="name" type="string">X</Metadata>
                    <Metadata name="position" type="nonNegativeInteger">0</Metadata>
                </Metadata>
                <Metadata name="statistic" type="">
                    <Metadata name="average" type="double">6172500</Metadata>
                    <Metadata name="count" type="nonNegativeInteger">6250000</Metadata>
                    <Metadata name="maximum" type="double">6172999.8</Metadata>
                    <Metadata name="minimum" type="double">6172000.2</Metadata>
                    <Metadata name="name" type="string">Y</Metadata>
                    <Metadata name="position" type="nonNegativeInteger">1</Metadata>
                </Metadata>
                <Metadata name="statistic" type="">
                    <Metadata name="average" type="double">0</Metadata>
                    <Metadata name="count" type="nonNegativeInteger">6250000</Metadata>
                    <Metadata name="maximum" type="double">0</Metadata>
                    <Metadata name="minimum" type="double">0</Metadata>
                    <Metadata name="name" type="string">band-1</Metadata>
                    <Metadata name="position" type="nonNegativeInteger">2</Metadata>
                </Metadata>
            </Metadata>
            <Reader type="readers.gdal">
                <Option name="filename">C:\Temp\pdal_gdal_reader/dtm_1km_6172_717.tif</Option>
                <Metadata name="readers.gdal" type="">
                    <Metadata name="comp_spatialreference" type="string">PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.2572221010002,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","25832"]]</Metadata>
                    <Metadata name="spatialreference" type="string">PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.2572221010002,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","25832"]]</Metadata>
                </Metadata>
            </Reader>
        </Filter>
    </Writer>
</Pipeline>



C:\Temp\pdal_gdal_reader>gdalinfo -stats dtm_1km_6172_717.tif
Driver: GTiff/GeoTIFF
Files: dtm_1km_6172_717.tif
       dtm_1km_6172_717.tif.aux.xml
Size is 2500, 2500
Coordinate System is:
PROJCS["ETRS89 / UTM zone 32N",
    GEOGCS["ETRS89",
        DATUM["European_Terrestrial_Reference_System_1989",
            SPHEROID["GRS 1980",6378137,298.2572221010002,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6258"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4258"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","25832"]]
Origin = (717000.000000000000000,6173000.000000000000000)
Pixel Size = (0.400000000000000,-0.400000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=DEFLATE
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  717000.000, 6173000.000) ( 12d26'57.82"E, 55d39'15.45"N)
Lower Left  (  717000.000, 6172000.000) ( 12d26'54.98"E, 55d38'43.16"N)
Upper Right (  718000.000, 6173000.000) ( 12d27'54.93"E, 55d39'13.84"N)
Lower Right (  718000.000, 6172000.000) ( 12d27'52.07"E, 55d38'41.55"N)
Center      (  717500.000, 6172500.000) ( 12d27'24.95"E, 55d38'58.50"N)
Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
  Min=5.707 Max=18.758
  Minimum=5.707, Maximum=18.758, Mean=10.309, StdDev=1.905
  NoData Value=-9999
  Metadata:
    STATISTICS_MAXIMUM=18.757970809937
    STATISTICS_MEAN=10.309048512971
    STATISTICS_MINIMUM=5.706515789032
    STATISTICS_STDDEV=1.9047452870945


Fra: Andrew Bell [mailto:andrew.bell.ia at gmail.com]
Sendt: mandag 08. februar 2016 16:35
Til: Kristian Evers
Cc: pdal at lists.osgeo.org
Emne: Re: [pdal] Bug in readers.gdal?

<?xml version="1.0"?>
<Pipeline version="1.0">
    <Writer type="writers.null">
        <Filter type="filters.stats">
            <Reader type="readers.gdal">
                <Option name="filename">
                    dtm_1km_6172_717.tif
                </Option>
            </Reader>
        </Filter>
    </Writer>
</Pipeline>

Try this with the command:

pdal pipeline <foo.xml>  --pipeline-serialization=foo.out

Take a look at foo.out and see what it shows for band-0 and band-1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20160208/456a6d6e/attachment-0001.html>


More information about the pdal mailing list