Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS: Possibility of Creating LAZ Files on iPhone? #1374

Open
zeitlerv opened this issue Nov 4, 2024 · 1 comment
Open

IOS: Possibility of Creating LAZ Files on iPhone? #1374

zeitlerv opened this issue Nov 4, 2024 · 1 comment

Comments

@zeitlerv
Copy link

zeitlerv commented Nov 4, 2024

Hello,

I'm working on a project that requires creating LAZ files directly on an iPhone, and I was wondering if you could provide any guidance on achieving this. I’ve encountered some challenges with existing libraries and would appreciate any suggestions or pointers you might have.

Here’s what I’ve tried so far:

LibLas: Unfortunately, LibLas only supports LAS up to version 1.3, which doesn’t meet my needs for LAZ file creation.

LasZip: I've managed to build it, but it only generates .dylib files, which aren’t easily compatible with iOS. Ideally, I would need a static library that could integrate smoothly with an iOS project.

PDAL: I also attempted to build a static library with PDAL, but I was unable to produce a version that works on iOS.

If you know of any solutions or could point me in the right direction for enabling LAZ file creation on iOS, I would be extremely grateful!

Thank you for your time and any help you can provide.

Best regards,
Viktor

@matlabbe
Copy link
Member

matlabbe commented Nov 5, 2024

I tried building PDAL for iOS and got many issues with the dependencies. On main dependency is gdal, you may try this repo: https://github.com/BeinerChes/gdalios, though I could not make it work on my system.

LibLAS worked, though I didn't try building it with laszip dependency.

# LAS
if [ ! -e $prefix/include/liblas ]
then
if [ ! -e libLAS ]
then
git clone https://github.com/libLAS/libLAS.git
fi
cd libLAS
sed -i '' 's/SHARED/STATIC/g' src/CMakeLists.txt
mkdir -p build
cd build
cmake -G Xcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_SYSROOT=$sysroot -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_FIND_ROOT_PATH=$prefix -DWITH_UTILITIES=OFF -DWITH_TESTS=OFF -DWITH_GEOTIFF=OFF ..
cmake --build . --config Release -- CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
cmake --build . --config Release --target install -- CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED="NO" CODE_SIGN_ENTITLEMENTS="" CODE_SIGNING_ALLOWED="NO"
cd $pwd
fi

It seems 2.0.1 is required with liblas: https://github.com/LASzip/LASzip/tree/2.0.1 . Maybe it can be compiled in a similar way than liblas above, then enable it as dependency to liblas to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants