[Liblas-commits] hg: 5 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Aug 24 08:57:32 EDT 2010


changeset 2209a8867c3a in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=2209a8867c3a
summary: Added geotiff_dir_printer functor and accompanying GeoTiffPrintMethod function compatible with GTIFPrintMethod prototype declared by libgeotiff.

changeset a86ec600a9ff in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=a86ec600a9ff
summary: Missing entry for file_ptr_stream.hpp

changeset 5340711730ef in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=5340711730ef
summary: Missing entry for file_ptr_stream.hpp

changeset 9ade3c7ce7c8 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=9ade3c7ce7c8
summary: Removed use of temporary files for the sake of printing GeoTIFF directory in SpatialReference::GetGTIFFText. Instead, use custom print method buffering directory in string. Simplified multi-line #ifdef. Tidy up.

changeset f6fdb3dc46d0 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f6fdb3dc46d0
summary: Missing boost/cstdint.hpp and boost namespace import.

diffstat:

 include/liblas/detail/utility.hpp |  27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diffs (37 lines):

diff -r 487bd4e821e5 -r f6fdb3dc46d0 include/liblas/detail/utility.hpp
--- a/include/liblas/detail/utility.hpp	Tue Aug 24 12:57:41 2010 +0100
+++ b/include/liblas/detail/utility.hpp	Tue Aug 24 13:57:30 2010 +0100
@@ -434,6 +434,33 @@
 # pragma warning(push)
 #endif
 
+// Utility functor with accompanying to print GeoTIFF directory.
+struct geotiff_dir_printer
+{
+    geotiff_dir_printer() {}
+
+    std::string output() const { return m_oss.str(); }
+    std::string::size_type size() const { return m_oss.str().size(); }
+
+    void operator()(char* data, void* aux)
+    {
+        if (0 != data)
+        {
+            m_oss << data;
+        }
+    }
+
+private:
+    std::ostringstream m_oss;
+};
+
+extern "C" int GeoTiffPrintMethod(char* data, void* aux)
+{
+    geotiff_dir_printer* printer = reinterpret_cast<geotiff_dir_printer*>(aux);
+    (*printer)(data, 0);
+    return static_cast<int>(printer->size());
+}
+
 }} // namespace liblas::detail
 
 #endif // LIBLAS_DETAIL_UTILITY_HPP_INCLUDED


More information about the Liblas-commits mailing list