Skip to content

Commit

Permalink
Merge branch 'point-context-schema'
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Aug 29, 2014
2 parents 386e697 + 9e56719 commit deea04f
Show file tree
Hide file tree
Showing 40 changed files with 251 additions and 416 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -116,6 +116,7 @@ option(ENABLE_CTEST "Enable CTest to support submissions of results to CDash at
#------------------------------------------------------------------------------

if(WIN32)
add_definitions(-DWIN32_LEAN_AND_MEAN)
if(MSVC)
option(PDAL_USE_STATIC_RUNTIME "Use the static runtime" FALSE)

Expand Down
28 changes: 24 additions & 4 deletions doc/apps.txt
Expand Up @@ -6,7 +6,7 @@ PDAL Applications

:Author: Howard Butler
:Contact: hobu.inc at gmail dot com
:Date: 10/21/2013
:Date: 9/1/2014

PDAL contains a single `git`_-style application, called *pdal*. The `pdal`
application currently contains six commands:
Expand All @@ -26,18 +26,38 @@ command name:
$ pdal info myfile.las
$ pdal translate input.las output.las
$ pdal pipeline --stdin < myxml.xml

.. note::

The :ref:`pcl` command is only available if PCL is linked.

Help about each command can be retrieved via the ``--help`` switch,
and the ``--drivers`` and ``--options`` switches can tell you more about
particular drivers and their options
Help about each command can be retrieved via the ``--help`` switch.
The ``--drivers`` and ``--options`` switches can tell you more about
particular drivers and their options:

::

$ pdal info --help
$ pdal translate --drivers
$ pdal pipeline --options drivers.las.writer

Additional, driver-specific options may be specified by using a
namespace-prefixed option name. For example, it is possible to
set the LAS day of year at translation time with the following
option:

::

$ pdal translate \
--drivers.las.writer.creation_doy="42" \
input.las
output.las

.. note::

Driver specific options can be identified using the
``pdal info --options`` invocation.

.. _`git`: http://git-scm.com/


Expand Down
2 changes: 1 addition & 1 deletion include/pdal/Log.hpp
Expand Up @@ -111,7 +111,7 @@ class PDAL_DLL Log
/// If the logging level asked for with
/// pdal::Log::get is less than the logging level of the pdal::Log instance
/// an ostream with a boost::iostreams::null_sink is returned.
std::ostream& get(LogLevel::Enum level = LogLevel::INFO);
std::ostream& get(LogLevel::Enum level = LogLevel::Info);

/// Sets the floating point precision
void floatPrecision(int level);
Expand Down
9 changes: 2 additions & 7 deletions include/pdal/Metadata.hpp
Expand Up @@ -553,13 +553,8 @@ class PDAL_DLL MetadataNode
return MetadataNode();
}

std::string toJSON() const
{ return m_impl->toJSON(); }

inline boost::property_tree::ptree toPTree() const
{
return m_impl->toPTree();
}
std::string toJSON() const;
boost::property_tree::ptree toPTree() const;

private:
MetadataNodeImplPtr m_impl;
Expand Down
2 changes: 1 addition & 1 deletion include/pdal/Utils.hpp
Expand Up @@ -236,7 +236,7 @@ class PDAL_DLL Utils
static void wordWrap(std::string const& inputString,
std::vector<std::string>& outputString,
unsigned int lineLength);

static std::string& escapeJSON(std::string &s);
static std::string demangle(const std::string& s);

template<typename T>
Expand Down
16 changes: 8 additions & 8 deletions include/pdal/drivers/sqlite/SQLiteCommon.hpp
Expand Up @@ -182,11 +182,11 @@ class SQLite
, m_statement(0)
, m_position(-1)
{
m_log->get(LogLevel::DEBUG3) << "Setting up config " << std::endl;
m_log->get(LogLevel::Debug3) << "Setting up config " << std::endl;
sqlite3_shutdown();
sqlite3_config(SQLITE_CONFIG_LOG, log_callback, this);
sqlite3_initialize();
m_log->get(LogLevel::DEBUG3) << "Set up config " << std::endl;
m_log->get(LogLevel::Debug3) << "Set up config " << std::endl;
}

~SQLite()
Expand All @@ -207,7 +207,7 @@ class SQLite
{
std::ostringstream oss;
oss << "SQLite code: " << num << " msg: '" << msg << "'";
m_log->get(LogLevel::DEBUG) << oss.str() << std::endl;
m_log->get(LogLevel::Debug) << oss.str() << std::endl;
}

static void log_callback(void *p, int num, char const* msg)
Expand All @@ -227,12 +227,12 @@ class SQLite
int flags = SQLITE_OPEN_NOMUTEX;
if (bWrite)
{
m_log->get(LogLevel::DEBUG3) << "Connecting db for write"<< std::endl;
m_log->get(LogLevel::Debug3) << "Connecting db for write"<< std::endl;
flags |= SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE;
}
else
{
m_log->get(LogLevel::DEBUG3) << "Connecting db for read"<< std::endl;
m_log->get(LogLevel::Debug3) << "Connecting db for read"<< std::endl;
flags |= SQLITE_OPEN_READONLY;
}

Expand All @@ -247,7 +247,7 @@ class SQLite
{
if (!m_session)
throw sqlite_driver_error("Session not opened!");
m_log->get(LogLevel::DEBUG3) << "Executing '" << sql <<"'"<< std::endl;
m_log->get(LogLevel::Debug3) << "Executing '" << sql <<"'"<< std::endl;

int code = sqlite3_exec(m_session, sql.c_str(), NULL, NULL, NULL);
if (code != SQLITE_OK)
Expand Down Expand Up @@ -278,7 +278,7 @@ class SQLite
m_data.clear();
sqlite3_reset(m_statement);

m_log->get(LogLevel::DEBUG3) << "Querying '" << query.c_str() <<"'"<< std::endl;
m_log->get(LogLevel::Debug3) << "Querying '" << query.c_str() <<"'"<< std::endl;

char const* tail = 0; // unused;
int res = sqlite3_prepare_v2(m_session,
Expand Down Expand Up @@ -396,7 +396,7 @@ class SQLite
static_cast<int>(statement.size()),
&m_statement,
0);
m_log->get(LogLevel::DEBUG3) << "Inserting '" << statement <<"'"<< std::endl;
m_log->get(LogLevel::Debug3) << "Inserting '" << statement <<"'"<< std::endl;

if (res != SQLITE_OK)
{
Expand Down
5 changes: 2 additions & 3 deletions include/pdal/kernel/Info.hpp
Expand Up @@ -69,7 +69,7 @@ class PDAL_DLL Info : public Application
void addSwitches(); // overrride
void validateSwitches(); // overrride

void dump(PointBufferPtr buf);
void dump(PointContext ctx, PointBufferPtr buf);

void dumpPoints(PointBufferPtr buf) const;
void dumpStats();
Expand Down Expand Up @@ -97,8 +97,7 @@ class PDAL_DLL Info : public Application
boost::uint64_t m_numPointsToWrite;
std::string m_pipelineFile;
bool m_showSample;
MetadataNode m_meta;
//ABELL

std::unique_ptr<boost::property_tree::ptree> m_tree;
std::unique_ptr<PipelineManager> m_manager;
};
Expand Down
18 changes: 9 additions & 9 deletions include/pdal/pdal_types.hpp
Expand Up @@ -62,15 +62,15 @@ namespace LogLevel
{
enum Enum
{
ERROR = 0,
WARNING,
INFO,
DEBUG,
DEBUG1,
DEBUG2,
DEBUG3,
DEBUG4,
DEBUG5
Error = 0,
Warning,
Info,
Debug,
Debug1,
Debug2,
Debug3,
Debug4,
Debug5
};
} // namespace LogLevel

Expand Down
10 changes: 3 additions & 7 deletions scripts/ci/before_install.sh
Expand Up @@ -3,13 +3,10 @@
source ./scripts/ci/common.sh

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 16126D3A3E5C1192
sudo mv /etc/apt/sources.list.d/pgdg-source.list* /tmp
sudo apt-get -qq remove postgis
sudo apt-get update -qq
sudo apt-get update -y
sudo apt-get install software-properties-common -y
sudo apt-get install python-software-properties -y
# sudo add-apt-repository ppa:ubuntugis/ppa -y
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y
sudo add-apt-repository ppa:ubuntugis/ppa -y
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
if [[ $PDAL_EMBED_BOOST == "OFF" ]]
then
Expand Down Expand Up @@ -48,7 +45,6 @@ fi

if [[ $PDAL_OPTIONAL_COMPONENTS == "all" ]]
then
sudo apt-get install libgdal1h libgdal-dev libhdf5-serial-dev
sudo apt-get install \
libgdal1h \
libgdal-dev \
Expand All @@ -58,7 +54,7 @@ then
python-numpy \
libxml2-dev \
libflann-dev \
libtiff4-dev
libtiff4-dev

# install libgeotiff from sources
wget http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.4.0.tar.gz
Expand Down

0 comments on commit deea04f

Please sign in to comment.