<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to map a tif-file to a las-file. So far I have had no luck with it and I suspect there’s a bug in the gdal-reader somewhere. I’m using a pipeline xml with filters.ferry to map the first band of the tif-file as the Z-value in
the output las-file. After running the pipeline I get a las-file where all Z-values are zero. Am I correct in assuming that this is unexpected behavior?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here’s the pipeline description:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">C:\Temp\pdal_gdal_reader>cat tif2las.xml<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"><?xml version="1.0"?><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"><Pipeline version="1.0"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> <Writer type="writers.las"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> <Option name="filename"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> out.las<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> </Option><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> <Filter type="filters.ferry"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> <Option name="dimensions"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> band-1=Z<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> </Option><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> <Reader type="readers.gdal"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> <Option name="filename"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> dtm_1km_6172_717.tif<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> </Option><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> </Reader><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> </Filter><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> </Writer><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"></Pipeline></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">And the the tif-file has the following info, tif2las.xml:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">C:\Temp\pdal_gdal_reader>gdalinfo dtm_1km_6172_717.tif<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Driver: GTiff/GeoTIFF<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Files: dtm_1km_6172_717.tif<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Size is 2500, 2500<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Coordinate System is:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">PROJCS["ETRS89 / UTM zone 32N",<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> GEOGCS["ETRS89",<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> DATUM["European_Terrestrial_Reference_System_1989",<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> SPHEROID["GRS 1980",6378137,298.2572221010002,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> AUTHORITY["EPSG","7019"]],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> TOWGS84[0,0,0,0,0,0,0],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> AUTHORITY["EPSG","6258"]],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> PRIMEM["Greenwich",0],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> UNIT["degree",0.0174532925199433],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> AUTHORITY["EPSG","4258"]],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> PROJECTION["Transverse_Mercator"],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> PARAMETER["latitude_of_origin",0],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> PARAMETER["central_meridian",9],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> PARAMETER["scale_factor",0.9996],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> PARAMETER["false_easting",500000],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> PARAMETER["false_northing",0],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> UNIT["metre",1,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> AUTHORITY["EPSG","9001"]],<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> AUTHORITY["EPSG","25832"]]<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Origin = (717000.000000000000000,6173000.000000000000000)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Pixel Size = (0.400000000000000,-0.400000000000000)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Metadata:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> AREA_OR_POINT=Area<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Image Structure Metadata:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> COMPRESSION=DEFLATE<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> INTERLEAVE=BAND<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Corner Coordinates:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Upper Left ( 717000.000, 6173000.000) ( 12d26'57.82"E, 55d39'15.45"N)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Lower Left ( 717000.000, 6172000.000) ( 12d26'54.98"E, 55d38'43.16"N)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Upper Right ( 718000.000, 6173000.000) ( 12d27'54.93"E, 55d39'13.84"N)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Lower Right ( 718000.000, 6172000.000) ( 12d27'52.07"E, 55d38'41.55"N)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span lang="DA" style="font-size:9.0pt;font-family:Consolas">Center ( 717500.000, 6172500.000) ( 12d27'24.95"E, 55d38'58.50"N)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">Band 1 Block=256x256 Type=Float32, ColorInterp=Gray<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> NoData Value=-9999<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Running<o:p></o:p></p>
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">C:\Temp\pdal_gdal_reader>pdal pipeline tif2las.xml<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">produces out.las that has Z=0 for all points:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">C:\Temp\pdal_gdal_reader>pdal info --summary out.las<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">{<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "filename": "out.las",<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "pdal_version": "1.1.0 (git-version: 64ca76)",<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "summary":<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "bounds":<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "X":<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "max": 717999.8,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "min": 717000.2<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> },<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "Y":<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "max": 6172999.8,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "min": 6172000.2<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> },<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "Z":<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "max": 0,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "min": 0<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> },<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "dimensions": "X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, ScanAngleRank, UserData, PointSourceId,
GpsTime, Red, Green, Blue",<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "num_points": 6250000,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> "spatial_reference": "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\"]]"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:9.0pt;font-family:Consolas">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal">It seems like the band-1 dimension is not read properly in this case. Is this in fact a bug, or am I creating my pipeline incorrectly?<o:p></o:p></p>
<p class="MsoNormal">I am using PDAL version 1.1.0 (git-version: 64ca76) from OSGeo4W.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Another thing I’ve run into is that pdal crashes when trying to apply the same filter via the command line like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas">C:\Temp\pdal_gdal_reader>pdal translate -f ferry --filters.ferry.dimensions=band-1=Z -r readers.gdal -w writers.las -i dtm_1km_6172_717.tif -o out.las<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Consolas"><o:p> </o:p></span></p>
<p class="MsoNormal">Probably a separate issue though. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#004080">Kristian Evers</span></b><span style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#004080">
<br>
Geophysicist</span><span style="font-size:8.0pt"> </span><span style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#004080"><br>
Geographical references</span><span style="font-size:8.0pt"> <u><span style="color:blue"><br>
</span></u></span><a href="mailto:kreve@gst.dk"><span style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:blue">kreve@gst.dk</span></a><span style="font-size:8.0pt;font-family:"Tahoma","sans-serif";color:#004080"><br>
<br>
Danish Ministry of Energy, Utilities and Climate<br>
Agency for Data Supply and Efficiency</span><span style="font-size:8.0pt;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>