<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 30, 2020, at 1:26 PM, Stephen Knox <<a href="mailto:stephenknox73@gmail.com" class="">stephenknox73@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">I have another question.<div class=""><br class=""></div><div class="">I am reading a LAS 1.2 file (laz compressed), trying to overlay it with a geopackage with 64bit integer ids, and then save it out to a LAZ again.</div><div class=""><br class=""></div><div class="">Full pipeline is:</div><div class=""><br class=""></div><div class="">[<br class="">    "/data/input.LAZ",<br class="">    {<br class="">      "type":"filters.range",<br class="">      "limits":"Classification[6:6]"<br class="">    },<br class="">    {<br class="">      "type":"filters.ferry",<br class="">      "dimensions":"=> BldId"<br class="">     },<br class="">    {<br class="">      "type":"filters.overlay",<br class="">      "dimension":"BldId",<br class="">      "datasource":"/data/all_tiles_extract.gpkg",<br class="">      "column":"bld_id", (gdal reads as Integer64)<br class="">      "layer":"layer_name" <br class="">    },<br class="">    {<br class="">      "type":"filters.range",<br class="">      "limits":"BldId[1:18446744073709551615]"<br class="">    },<br class="">     {<br class="">        "type":"writers.las",<br class="">        "filename":"/data/blds_filter_then_overlaylaz",<br class="">        "extra_dims":"all",<br class="">        "minor_version":4<br class="">    }<br class="">]<br class=""></div><div class=""><br class=""></div><div class="">My resulting BldId dimension has a max value of 2147483647,, which is the signed 32 bit integer max. The schema is:</div><div class=""><br class=""></div><div class="">      {<br class="">        "name": "BldId",<br class="">        "size": 8,<br class="">        "type": "double" (or unsigned)<br class="">      }<br class=""></div><div class=""><br class=""></div><div class="">Things I have tried:</div><div class="">- Converting the 1.2 LAZ to 1.4 before making the conversion</div><div class="">- Changing the code so that default double is an unsigned int (as above)</div><div class="">- Using the name of an "known" uint64 field, e.g. ShotNumber</div><div class="">- reading the file with --readers.las.extra_dims=BldId=uint64</div><div class="">- writing as a 1.2 LAS and using the --readers.las.use_eb_vlr=true</div><div class="">- copying an existing field e.g.       </div><div class="">"type":"filters.ferry",</div>"dimensions":"Z=> BldId"<div class=""><br class=""></div><div class="">None of these seem to work<br class=""><div class=""><br class=""></div><div class="">Can anyone help me to map 64 bit integer ids into a LAS file?</div></div></div></div></blockquote><br class=""></div><div>Stephen,</div><div><br class=""></div><div>Looking at the code, it seems we are clamping to an int32_t when we call OGR_F_GetFieldAsInteger in the OverlayFilter code. I also </div><div><br class=""></div><div><a href="https://github.com/PDAL/PDAL/blob/master/filters/OverlayFilter.cpp#L122" class="">https://github.com/PDAL/PDAL/blob/master/filters/OverlayFilter.cpp#L122</a></div><div><br class=""></div><div>This likely would need to be updated to use the OGR_F_GetFieldAsInteger64 method when/if it is available. Please file a ticket on this, and feel free to provide a pull request that implements such a thing.</div><div><br class=""></div><div>The RangeFilter is also using a double for its comparison </div><div><br class=""></div><div><a href="https://github.com/PDAL/PDAL/blob/master/filters/private/DimRange.cpp#L152" class="">https://github.com/PDAL/PDAL/blob/master/filters/private/DimRange.cpp#L152</a></div><div><br class=""></div><div>so I'm not sure your filters.range limits statement would always work.</div><div><br class=""></div><div>Are the BldId actually in the range > 32 bits? If not, you could probably use some OGR sql to downcast them into a new column. Otherwise, some patches to PDAL are going to be needed.</div><div><br class=""></div><div>Howard</div><div><br class=""></div><div> </div><br class=""></body></html>