[Liblas-commits] laszip: 3 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Sat Dec 11 16:26:00 EST 2010


changeset 835d4fdaeb9b in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=835d4fdaeb9b
summary: remove gzip usage; elide some windows warnings

changeset cf76d7769d6f in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=cf76d7769d6f
summary: VS2010 lint

changeset afc43d3fa954 in /Volumes/Data/www/liblas.org/laszip
details: http://hg.liblas.orglaszip?cmd=changeset;node=afc43d3fa954
summary: stub out a stake in the ground for "liblaszip" exported interface

diffstat:

 .hgignore                    |   9 ++++++++
 include/laszip/liblaszip.hpp |  47 ++++++++++++++++++++++++++++++++++++++++++++
 src/CMakeLists.txt           |   2 +
 src/liblaszip.cpp            |  24 ++++++++++++++++++++++
 tools/lasdiff.cpp            |  35 +++++---------------------------
 tools/laszip.cpp             |  21 ++++--------------
 6 files changed, 93 insertions(+), 45 deletions(-)

diffs (224 lines):

diff -r 29f7d17058cc -r afc43d3fa954 .hgignore
--- a/.hgignore	Wed Dec 01 09:50:10 2010 -0600
+++ b/.hgignore	Sat Dec 11 13:24:30 2010 -0800
@@ -68,3 +68,12 @@
 .DS_Store
 laszip-config
 tools/laszip
+
+# stuff generated by VS2010
+*.ipch
+*.vcxproj
+*.vcxproj.filters
+laszip.opensdf
+laszip.sdf
+laszip.sln
+laszip/laszip.sdf
diff -r 29f7d17058cc -r afc43d3fa954 include/laszip/liblaszip.hpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/laszip/liblaszip.hpp	Sat Dec 11 13:24:30 2010 -0800
@@ -0,0 +1,47 @@
+/******************************************************************************
+ *
+ * Project:  laszip - http://liblas.org -
+ * Purpose:
+ * Author:   Michael P. Gerlek (mpg at flaxen.com)
+ *
+ ******************************************************************************
+ * Copyright (c) 2010, Michael P. Gerlek
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Licence as published
+ * by the Free Software Foundation.
+ *
+ * See the COPYING file for more information.
+ *
+ ****************************************************************************/
+
+#ifndef LASZIP_H
+#define LASZIP_H
+
+// These are the public interfaces exported out for use by by liblas.
+// For now, they just wrap the "native" LASreader/LASwriter classes.
+
+class LASreader;
+class LASwriter;
+
+class LasZipReader
+{
+public:
+  LasZipReader(const char* file);
+  ~LasZipReader();
+
+private:
+    LASreader* m_reader;
+};
+
+class LasZipWriter
+{
+public:
+  LasZipWriter(const char* file);
+  ~LasZipWriter();
+
+private:
+   LASwriter* m_writer;
+};
+
+#endif
diff -r 29f7d17058cc -r afc43d3fa954 src/CMakeLists.txt
--- a/src/CMakeLists.txt	Wed Dec 01 09:50:10 2010 -0600
+++ b/src/CMakeLists.txt	Sat Dec 11 13:24:30 2010 -0800
@@ -40,6 +40,7 @@
   ${LASZIP_HEADERS_DIR}/lasreader.hpp
   ${LASZIP_HEADERS_DIR}/laspointreader3raw.hpp
   ${LASZIP_HEADERS_DIR}/laswriter.hpp
+  ${LASZIP_HEADERS_DIR}/liblaszip.hpp
 )
 
 set(LASZIP_CPP
@@ -69,6 +70,7 @@
     rangeintegercompressor.cpp
     laspointwriter0compressed.cpp
     rangemodel.cpp
+    liblaszip.cpp
 )
 
 set(LASZIP_SOURCES
diff -r 29f7d17058cc -r afc43d3fa954 src/liblaszip.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/liblaszip.cpp	Sat Dec 11 13:24:30 2010 -0800
@@ -0,0 +1,24 @@
+/******************************************************************************
+ *
+ * Project:  laszip - http://liblas.org -
+ * Purpose:
+ * Author:   Martin Isenburg
+ *           isenburg at cs.unc.edu
+ *
+ ******************************************************************************
+ * Copyright (c) 2010, Michael P. Gerlek (mpg at flaxen.com)
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU Lesser General Licence as published
+ * by the Free Software Foundation.
+ *
+ * See the COPYING file for more information.
+ *
+ ****************************************************************************/
+
+#include "liblaszip.hpp"
+
+
+#include <stdlib.h>
+#include <string.h>
+
diff -r 29f7d17058cc -r afc43d3fa954 tools/lasdiff.cpp
--- a/tools/lasdiff.cpp	Wed Dec 01 09:50:10 2010 -0600
+++ b/tools/lasdiff.cpp	Sat Dec 11 13:24:30 2010 -0800
@@ -31,15 +31,16 @@
 ===============================================================================
 */
 
+#ifdef _WIN32
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
 #include "lasreader.hpp"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef _WIN32
-extern "C" FILE* fopenGzipped(const char* filename, const char* mode);
-#endif
 
 void usage(bool wait=false)
 {
@@ -124,19 +125,7 @@
   FILE* file_in1 = 0;
   if (file_name_in1)
   {
-    if (strstr(file_name_in1, ".gz"))
-    {
-#ifdef _WIN32
-      file_in1 = fopenGzipped(file_name_in1, "rb");
-#else
-      fprintf(stderr, "ERROR: no support for gzipped input\n");
-      byebye(argc==1);
-#endif
-    }
-    else
-    {
-      file_in1 = fopen(file_name_in1, "rb");
-    }
+    file_in1 = fopen(file_name_in1, "rb");
     if (file_in1 == 0)
     {
       fprintf (stderr, "ERROR: could not open file '%s'\n", file_name_in1);
@@ -159,19 +148,7 @@
   FILE* file_in2 = 0;
   if (file_name_in2)
   {
-    if (strstr(file_name_in2, ".gz"))
-    {
-#ifdef _WIN32
-      file_in2 = fopenGzipped(file_name_in2, "rb");
-#else
-      fprintf(stderr, "ERROR: no support for gzipped input\n");
-      byebye(argc==1);
-#endif
-    }
-    else
-    {
-      file_in2 = fopen(file_name_in2, "rb");
-    }
+    file_in2 = fopen(file_name_in2, "rb");
     if (file_in2 == 0)
     {
       fprintf (stderr, "ERROR: could not open file '%s'\n", file_name_in2);
diff -r 29f7d17058cc -r afc43d3fa954 tools/laszip.cpp
--- a/tools/laszip.cpp	Wed Dec 01 09:50:10 2010 -0600
+++ b/tools/laszip.cpp	Sat Dec 11 13:24:30 2010 -0800
@@ -31,6 +31,10 @@
 ===============================================================================
 */
 
+#ifdef _WIN32
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
 #include <time.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -39,9 +43,6 @@
 #include "lasreader.hpp"
 #include "laswriter.hpp"
 
-#ifdef _WIN32
-extern "C" FILE* fopenGzipped(const char* filename, const char* mode);
-#endif
 
 void usage(bool wait=false)
 {
@@ -173,19 +174,7 @@
   FILE* file_in = 0;
   if (file_name_in)
   {
-    if (strstr(file_name_in, ".gz"))
-    {
-#ifdef _WIN32
-      file_in = fopenGzipped(file_name_in, "rb");
-#else
-      fprintf(stderr, "ERROR: no support for gzipped input\n");
-      byebye(argc==1);
-#endif
-    }
-    else
-    {
-      file_in = fopen(file_name_in, "rb");
-    }
+    file_in = fopen(file_name_in, "rb");
     if (file_in == 0)
     {
       fprintf(stderr, "ERROR: could not open '%s'\n",file_name_in);


More information about the Liblas-commits mailing list