Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Apr 27, 2018
2 parents b994af7 + 75e8dcc commit 31c96d3
Show file tree
Hide file tree
Showing 14 changed files with 292 additions and 100 deletions.
25 changes: 25 additions & 0 deletions HOWTORELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,28 @@ Release Process
::

http://upload.osgeo.org/cgi-bin/osgeo4w-promote.sh

12) Update Alpine package

- The PDAL Alpine package lives at
https://github.com/alpinelinux/aports/blob/master/testing/pdal/APKBUILD.
Pull requests can be made against the alpinelinux/aports repository. If the
build configuration alone is changing, with no version increase, simply
increment the build number `pkgrel`. If the `pkgver` is changing, then
reset `pkgrel` to 0.
- Pull requests should have a commit message of the following form
`testing/pdal: <description>`.

13) Update Conda package

- For PDAL releases that bump version number, but do not change dependencies
or build configurations, the `regro-cf-autotick-bot` should automatically
create a pull request at https://github.com/conda-forge/pdal-feedstock.
Once the builds succeed, the PR can be merged and the updated package will
soon be available in the `conda-forge` channel. If the PR does not build
successfully, updates to the PR can be pushed to the bot's branch. Version
bumps should reset the build number to zero.
- Updates that alter the build configuration but do not bump the version
number should be submitted as PRs from a fork of the
https://github.com/conda-forge/pdal-feedstock repository. In these cases,
the build number should be incremented.
53 changes: 12 additions & 41 deletions apps/pdal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class App
void outputOptions();
void outputOptions(const std::string& stageName,std::ostream& strm);
void addArgs(ProgramArgs& args);
std::string findKernel();

std::ostream& m_out;

Expand Down Expand Up @@ -114,7 +113,7 @@ void App::outputHelp(const ProgramArgs& args)
// Load all kernels so that we can report the names.
StageFactory f;
PluginManager<Kernel>::loadAll();
outputCommands(" -");
outputCommands(" - ");
m_out << std::endl;
m_out << "See http://pdal.io/apps/ for more detail" << std::endl;
}
Expand Down Expand Up @@ -160,7 +159,6 @@ void App::outputDrivers()
}
else
{

Json::Value array(Json::arrayValue);
for (auto name : stages)
{
Expand All @@ -172,9 +170,7 @@ void App::outputDrivers()
node["link"] = link;
array.append(node);
}

m_out << array;

}
}

Expand All @@ -183,8 +179,13 @@ void App::outputCommands(const std::string& leader)
{
StageFactory f;
PluginManager<Kernel>::loadAll();
std::string kernelbase("kernels.");
for (auto name : PluginManager<Kernel>::names())
{
if (Utils::startsWith(name, kernelbase))
name = name.substr(kernelbase.size());
m_out << leader << name << std::endl;
}
}


Expand All @@ -200,7 +201,6 @@ void App::outputOptions(std::string const& stageName, std::ostream& strm)
return;
}


ProgramArgs args;
s->addAllArgs(args);

Expand All @@ -226,7 +226,6 @@ void App::outputOptions(std::string const& stageName, std::ostream& strm)
object[stageName] = array;

strm << object;

}
}

Expand All @@ -245,7 +244,8 @@ void App::outputOptions()
outputOptions(n, m_out);
m_out << std::endl;
}
} else
}
else
{
std::ostringstream strm;
Json::Value options (Json::arrayValue);
Expand All @@ -260,7 +260,6 @@ void App::outputOptions()

strm.str("");
}

m_out << options;
}
}
Expand Down Expand Up @@ -303,35 +302,6 @@ int main(int argc, char* argv[])
}


std::string App::findKernel()
{
StringList loadedKernels;

auto kernelSurname = [](const std::string& name)
{
StringList names = Utils::split2(name, '.');
return names.size() == 2 ? names[1] : std::string();
};

StageFactory f(true);
// Discover available kernels without plugins, and test to see if
// the positional option 'command' is a valid kernel
loadedKernels = PluginManager<Kernel>::names();
for (auto& name : loadedKernels)
if (m_command == kernelSurname(name))
return name;

// Force loading of plugins.
StageFactory f2(false);
loadedKernels = PluginManager<Kernel>::names();
for (auto& name : loadedKernels)
if (m_command == kernelSurname(name))
return name;

return std::string();
}


int App::execute(StringList& cmdArgs, LogPtr& log)
{
ProgramArgs args;
Expand Down Expand Up @@ -374,12 +344,13 @@ int App::execute(StringList& cmdArgs, LogPtr& log)
if (!m_command.empty())
{
int ret = 0;
std::string name(findKernel());
if (name.size())
std::string name("kernels." + m_command);

Kernel *kernel = PluginManager<Kernel>::createObject(name);
if (kernel)
{
if (m_help)
cmdArgs.push_back("--help");
Kernel *kernel = PluginManager<Kernel>::createObject(name);
// This shouldn't throw. If it does, it's something awful, so
// not cleaning up seems inconsequential.
log->setLeader("pdal " + m_command);
Expand Down
2 changes: 1 addition & 1 deletion cmake/cpack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ list(APPEND CPACK_SOURCE_IGNORE_FILES "/doc/build/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/doc/presentations/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/doc/_static/logo/dongle/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/cmake/examples/")
list(APPEND CPACK_SOURCE_IGNORE_FILES "/include/pdal/pdal_defines.h")
list(APPEND CPACK_SOURCE_IGNORE_FILES "pdal_features.hpp")
list(APPEND CPACK_SOURCE_IGNORE_FILES ".gz2")
list(APPEND CPACK_SOURCE_IGNORE_FILES ".bz2")

Expand Down
13 changes: 13 additions & 0 deletions cmake/modules/FindGEOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,19 @@ IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
SET(GEOS_FOUND TRUE)
ENDIF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)

if (NOT GEOS_INCLUDE_DIR OR NOT GEOS_LIBRARY)
include(SelectLibraryConfigurations)
select_library_configurations(GEOS)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GEOS REQUIRED_VARS GEOS_LIBRARY GEOS_INCLUDE_DIR)
if(GEOS_FOUND)
set(GEOS_INCLUDE_DIRS ${GEOS_INCLUDE_DIR})
if(NOT GEOS_LIBRARIES)
set(GEOS_LIBRARIES ${GEOS_LIBRARY})
endif()
endif()
endif()

IF (GEOS_FOUND)

IF (NOT GEOS_FIND_QUIETLY)
Expand Down
22 changes: 20 additions & 2 deletions doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ FAQ
The proper spelling of the project name is PDAL, in uppercase. It is
pronounced to rhyme with "GDAL".

.. it is properly pronounced like the dog though :)
.. it is properly pronounced like the dog though :) -- hobu
|
* Why do I get the error "Couldn't create ... stage of type ..."?

Expand Down Expand Up @@ -44,6 +44,8 @@ FAQ
sizes before PDAL can process the data. Furthermore, some operations
(notably :ref:`DEM creation<writers.gdal>`) can use large amounts of
additional memory during processing before the output can be written.
Depending on the operation, PDAL will attempt operate in "stream mode" to
limit memory consumption when possible.
|
* What is PDAL's relationship to PCL?

Expand Down Expand Up @@ -72,7 +74,7 @@ FAQ
|
* Are there any command line tools in PDAL similar to LAStools?

Yes. The ``pdal`` command provides a wide range of features which go
Yes. The :ref:`pdal <apps>` command provides a wide range of features which go
far beyond basic LIDAR data processing. Additionally, PDAL is licensed
under an open source license (this applies to the whole library and
all command line tools).
Expand All @@ -88,3 +90,19 @@ FAQ
focus on usability and readability. You will find that the ``pdal``
command has several well-organized subcommands such as ``info``
or ``translate`` (see :ref:`apps`).

* I get GeoTIFF errors. What can I do about them?

::

(readers.las Error) Geotiff directory contains key 0 with short entry and more than one value.

If :ref:`readers.las` is outputting error messages about GeoTIFF, this means
the keys that were written into your file were incorrect or at least not
readable by `libgeotiff`_. Rewrite the file using PDAL to fix the issue:

::

pdal translate badfile.las goodfile.las --writers.las.forward=all

.. _`libgeotiff`: https://trac.osgeo.org/geotif
74 changes: 47 additions & 27 deletions package.sh
Original file line number Diff line number Diff line change
@@ -1,51 +1,71 @@
#!/bin/bash


# Build PDAL package, including RC number of specified
# Build PDAL package
# ./package.sh
# ./package.sh RC1

RC=$1

GITSHA="$(git rev-parse HEAD)"

version=`./bin/pdal-config --version`
echo "Cutting release for SHA $GITSHA"

package_name="PDAL-"$version"-src"
HERE=`pwd`
CONTAINER="pdal/dependencies"
DOCKER="docker"
CONTAINERRUN="$DOCKER run -it -d --entrypoint /bin/sh -v $HERE:/data $CONTAINER"


CONTAINERID=`$CONTAINERRUN`
echo "Starting container: " $CONTAINERID
cat > docker-package.sh << "EOF"
#!/bin/sh
if [[ "$OSTYPE" == "linux-gnu" ]]; then
MD5="md5sum"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
MD5="md5"
fi
git clone https://github.com/PDAL/PDAL.git;
cd /PDAL;
EOF

echo "git checkout $GITSHA" >> docker-package.sh

cat >> docker-package.sh << "EOF"
mkdir build; cd build;
cmake .. ;
make dist
PDAL_VERSION=$(./bin/pdal-config --version)
OUTPUTDIR="/data/release-$PDAL_VERSION"
mkdir $OUTPUTDIR
extensions=".tar.gz .tar.bz2"
for ext in $extensions
do
filename=$package_name$ext
if [ -n "$RC" ]; then

rcname="PDAL-"$version$RC$ext
echo $rcname
cp $filename $rcname
`$MD5 $rcname > $rcname.md5`
fi
echo "$MD5 $filename > $filename.md5"
`$MD5 $filename > $filename.md5`
for filename in $(ls *$ext)
do
`md5sum $filename > $filename.md5`
`sha256sum $filename > $filename.sha256sum`
`sha512sum $filename > $filename.sha512sum`
cp $filename $OUTPUTDIR
cp $filename.md5 $OUTPUTDIR
cp $filename.sha256sum $OUTPUTDIR
cp $filename.sha512sum $OUTPUTDIR
done
done
# name=`echo $filename|cut -d'.' -f1-3`
# extension=`echo $filename|cut -d'.' -f4-`
# echo $name
EOF

chmod +x docker-package.sh
docker cp docker-package.sh $CONTAINERID:/docker-package.sh

docker exec -it $CONTAINERID /docker-package.sh

# run this to halt into the container
#docker exec -it $CONTAINERID bash

command="$DOCKER stop $CONTAINERID"
echo $command
$command

# newname="$name$RC.$extension"
# mv $filename "$newname"
# `md5sum $newname > $newname.md5`
Loading

0 comments on commit 31c96d3

Please sign in to comment.