Skip to content

[lastools] Install serf/geo lookup CSVs when tools feature is used #46796

@maredman

Description

@maredman

Is your feature request related to a problem? Please describe.

When you build the lastools port with the tools feature, some exe's are copied to the installed/tools folder using the snippet below from the portfile.cmake.

if(BUILD_TOOLS)
    vcpkg_copy_tools(TOOL_NAMES las2las64 las2txt64 lascopcindex64 lasdiff64 lasindex64 lasinfo64 lasmerge64 lasprecision64 laszip64 txt2las64  AUTO_CLEAN)
endif()

I noticed when I was running las2las64.exe, that it prints out a warning because I'm using data with an uncommon projection, and it's trying to open serf/geo/pcs.csv to use as a lookup table, but the port doesn't install that CSV. The warning I get is: "cannot open 'pcs.csv' file. check for \LAStools\bin\serf\geo\pcs.csv file. download latest version."

You can see this message if you search this file in the LAStools repo: https://github.com/LAStools/LAStools/blob/b2f578b4f03c9016d519b319cd61c903a74cf744/src/geoprojectionconverter.cpp

Proposed solution

I'd like to add a line to the portfile.cmake to also copy the CSVs when the "tools" feature is used on the lastools port like:

    # Copy CSV files that are used as lookup tables by las2las.
    file(COPY ${SOURCE_PATH}/bin/serf/geo
         DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/serf)

I haven't contributed to vcpkg before. Would this be suitable to submit for a PR?

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:port-featureThe issue is with a library, which is requesting new capabilities that didn’t exist

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions