Skip to content

Commit

Permalink
Merge branch 'master' of github.com:PDAL/PDAL
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Mar 2, 2012
2 parents 9724397 + 99542b0 commit 356701c
Show file tree
Hide file tree
Showing 25 changed files with 148 additions and 129 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Expand Up @@ -309,7 +309,8 @@ if(WITH_SWIG_CSHARP OR WITH_SWIG_PYTHON)
endif()
endif()

# if you want to build with libxml2 AND you are not building with GDAL/OSGeo4W, you'll need to supply your own iconv library
# iconv support - optional, default=OFF
# GDAL and libxml2 require iconv. The library is supplied by OSGeo4W.
set(WITH_ICONV FALSE CACHE BOOL "Choose if IConv support should be built")
if(WITH_ICONV)
find_package(ICONV)
Expand All @@ -322,7 +323,7 @@ if(WITH_ICONV)
endif()


# libxml2 support - optional, default=ON
# libxml2 support - optional, default=OFF
set(WITH_LIBXML2 FALSE CACHE BOOL "Choose if libxml2 support should be built ")

if(WITH_LIBXML2)
Expand Down
Binary file added doc/building/media/OSGeo4WInstallOCI.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 17 additions & 5 deletions doc/building/windows.txt
Expand Up @@ -37,24 +37,29 @@ Basic Build Steps
Most users can use this procedure to build PDAL on Windows.
We satisfy all dependencies using OSGeo4W and use the Boost subset that is included with the library.

1. Install OSGeo4W (http://trac.osgeo.org/osgeo4w/) using the "Advanced Install" option and include the following: gdal-dev, laszip, libxml2, iconv.
1. Install OSGeo4W (http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe) using the "Advanced Install" option and include the following: gdal-dev, laszip, libxml2, iconv.

.. figure:: media/OSGeo4WInstallAdvanced.png

Install from Internet
.. figure:: media/OSGeo4WInstallFromInternet.png
Leave the "Root Directory" for the installation unchanged.
.. figure:: media/OSGeo4WInstallRootDirectory.png
Select "gdal-dev".
You can leave the "Select Local Package Directory" and "Internet Connection Type" at the defaults.
Under the "libs" tree, select "gdal-dev" for installation. (Yuo should probably use the latest version, e.g. 1.8pre-6.)
.. figure:: media/OSGeo4WInstallGDALDev.png
Select "laszip".
.. figure:: media/OSGeo4WInstallLASZip.png
Select "libxml2".
.. figure:: media/OSGeo4WInstallLibXML2.png
Select "iconv".
.. figure:: media/OSGeo4WInstallIconv.png
Select "oci".
.. figure:: media/OSGeo4WInstallOCI.png

There are some other required dependencies (libtiff, libgeotiff, oci) but they are installed by default.
There are some other required dependencies (e.g. libtiff, libgeotiff) but they are installed by default.

Select Next to continue on to install the packages.

2. Get the source code for PDAL:
::
Expand All @@ -66,8 +71,15 @@ We satisfy all dependencies using OSGeo4W and use the Boost subset that is inclu

c:\dev\PDAL> config.bat

4. Start Visual Studio and open PDAL.sln.
5. Note that you'll need to include the %OSGeo4W%/bin directory in your %PATH% so that the dependent DLLs are available at run time.
Note that the config.bat file is set up to build PDAL in the "officially supported" configuration -- that is, with
Oracle, and GDAL, and LASzip, and such. If you followed the previous steps, you should be fine to use this default
configuration. You may modify this file if you need to (such as to use a local copy of GDAL or to use NMake instead
of Visual StudiO); see the Advanced steps below for instructions.

4. Modify your system environment to include the %OSGeo4W%/bin directory in your %PATH% so that the dependent DLLs are available at run time.

4. Start Visual Studio and open PDAL.sln. Build the solution (F6).


Advanced Build Steps
--------------------
Expand Down
4 changes: 3 additions & 1 deletion include/pdal/PointBuffer.hpp
Expand Up @@ -350,6 +350,7 @@ inline T PointBuffer::getField(pdal::Dimension const& dim, std::size_t pointInde
assert(offset + sizeof(T) <= m_byteSize * m_capacity);
boost::uint8_t const* p = m_data.get() + offset;

#if 0
// The user could be asking for data from a floating point dimension
// as an integer. In that case, simply returning a casted int from those
// bytes is not the number we want. We don't want to test *every* dimension
Expand All @@ -374,7 +375,8 @@ inline T PointBuffer::getField(pdal::Dimension const& dim, std::size_t pointInde

return *(T const*)( void const*)p;
}

#endif

return convertDimension<T>(dim, (void *)p);


Expand Down
4 changes: 2 additions & 2 deletions include/pdal/Stage.hpp
Expand Up @@ -79,8 +79,8 @@ class PDAL_DLL Stage : public StageBase

virtual bool supportsIterator (StageIteratorType) const = 0;

virtual StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const { return NULL; }
virtual StageRandomIterator* createRandomIterator( PointBuffer& buffer) const { return NULL; }
virtual StageSequentialIterator* createSequentialIterator(PointBuffer&) const { return NULL; }
virtual StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

// for dumping
virtual boost::property_tree::ptree toPTree() const;
Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/ByteSwap.hpp
Expand Up @@ -69,7 +69,7 @@ class PDAL_DLL ByteSwap : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

// returns number of points accepted into the data buffer (which may be less than data.getNumPoints(),
// if we're calling this routine multiple times with the same buffer
Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Color.hpp
Expand Up @@ -70,7 +70,7 @@ class PDAL_DLL Color : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

void processBuffer(PointBuffer& data) const;

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Colorization.hpp
Expand Up @@ -81,7 +81,7 @@ class PDAL_DLL Colorization : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

void processBuffer(PointBuffer& data) const;

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Crop.hpp
Expand Up @@ -67,7 +67,7 @@ class PDAL_DLL Crop : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

// returns number of points accepted into the data buffer (which may be less than data.getNumPoints(),
// if we're calling this routine multiple times with the same buffer
Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Decimation.hpp
Expand Up @@ -65,7 +65,7 @@ class PDAL_DLL Decimation : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

boost::uint32_t getStep() const;

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/InPlaceReprojection.hpp
Expand Up @@ -76,7 +76,7 @@ class PDAL_DLL InPlaceReprojection : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

void processBuffer(PointBuffer& data) const;

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Mosaic.hpp
Expand Up @@ -67,7 +67,7 @@ class PDAL_DLL Mosaic : public MultiFilter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

private:
Mosaic& operator=(const Mosaic&); // not implemented
Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Predicate.hpp
Expand Up @@ -70,7 +70,7 @@ class PDAL_DLL Predicate : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

boost::uint32_t processBuffer(PointBuffer& dstData, const PointBuffer& srcData, pdal::plang::Parser& parser) const;

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Programmable.hpp
Expand Up @@ -71,7 +71,7 @@ class PDAL_DLL Programmable : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

void processBuffer(PointBuffer& data, pdal::plang::Parser& parser) const;

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Reprojection.hpp
Expand Up @@ -75,7 +75,7 @@ class PDAL_DLL Reprojection : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

void processBuffer(PointBuffer& data) const;

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Scaling.hpp
Expand Up @@ -83,7 +83,7 @@ class PDAL_DLL Scaling: public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

std::vector<scaling::Scaler> const& getScalers() const { return m_scalers; }

Expand Down
2 changes: 1 addition & 1 deletion include/pdal/filters/Selector.hpp
Expand Up @@ -69,7 +69,7 @@ class PDAL_DLL Selector: public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return NULL; }
pdal::StageRandomIterator* createRandomIterator(PointBuffer&) const { return NULL; }

void processBuffer(const PointBuffer& srcData, PointBuffer& dstData) const;

Expand Down
20 changes: 10 additions & 10 deletions include/pdal/filters/Stats.hpp
Expand Up @@ -96,18 +96,18 @@ class PDAL_DLL Summary
Summary( boost::uint32_t num_bins=20,
boost::uint32_t sample_size=1000,
boost::uint32_t cache_size=1000,
boost::uint32_t seed=0)
boost::uint32_t seed=0)
: m_histogram( boost::accumulators::tag::density::num_bins = num_bins,
boost::accumulators::tag::density::cache_size = cache_size)
, m_sample_size(sample_size)
, m_distribution(0, cache_size)
{
if (seed != 0)
{
m_rng.seed(seed);
m_distribution.reset();
}
if (seed != 0)
{
m_rng.seed(seed);
m_distribution.reset();
}
return;
}

Expand Down Expand Up @@ -161,7 +161,7 @@ class PDAL_DLL Stats : public Filter
}

pdal::StageSequentialIterator* createSequentialIterator(PointBuffer& buffer) const;
pdal::StageRandomIterator* createRandomIterator(PointBuffer& buffer) const { return 0; } // BUG: add this
pdal::StageRandomIterator* createRandomIterator(PointBuffer& ) const { return 0; } // BUG: add this

void processBuffer(PointBuffer& data) const;

Expand Down Expand Up @@ -208,8 +208,8 @@ class PDAL_DLL Stats : public pdal::FilterSequentialIterator
bool atEndImpl() const;

const pdal::filters::Stats& m_statsFilter;
std::vector<DimensionPtr> m_dimensions;
std::vector<DimensionPtr> m_dimensions;

double getValue(PointBuffer& data, Dimension& dim, boost::uint32_t pointIndex);

Expand Down
5 changes: 5 additions & 0 deletions include/pdal/pdal_internal.hpp
Expand Up @@ -64,4 +64,9 @@
# define PDAL_C_END
#endif


#ifdef PDAL_COMPILER_MSVC
# pragma warning(disable: 4068) // ignore unknown pragmas (due to boost's use of GCC pragmas)
#endif

#endif
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -480,7 +480,7 @@ if (WIN32)
if (CMAKE_VERSION VERSION_GREATER 2.8.7)
target_link_libraries(${APPS_CPP_DEPENDENCIES}
LINK_PRIVATE general ${Boost_LIBRARIES})
endif(CMAKE_VERSION)
endif(CMAKE_VERSION VERSION_GREATER 2.8.7)
else()
target_link_libraries(${APPS_CPP_DEPENDENCIES}
${Boost_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.cpp
Expand Up @@ -138,7 +138,7 @@ boost::uint32_t Utils::getStreamPrecision(double scale)

boost::uint32_t Utils::safeconvert64to32(boost::uint64_t x64)
{
if (x64 > std::numeric_limits<boost::uint32_t>::max())
if (x64 > (std::numeric_limits<boost::uint32_t>::max)())
{
throw pdal_error("cannot support seek offsets greater than 32-bits");
}
Expand Down

0 comments on commit 356701c

Please sign in to comment.