[Liblas-commits] r1254 - in trunk: . apps
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon May 4 16:28:48 EDT 2009
Author: hobu
Date: Mon May 4 16:28:47 2009
New Revision: 1254
URL: http://liblas.org/changeset/1254
Log:
las2oci stuff
Added:
trunk/apps/las2oci.cpp
- copied, changed from r1251, /trunk/apps/lasindex.cpp
Modified:
trunk/apps/ (props changed)
trunk/apps/Makefile.am
trunk/configure.ac
Modified: trunk/apps/Makefile.am
==============================================================================
--- trunk/apps/Makefile.am (original)
+++ trunk/apps/Makefile.am Mon May 4 16:28:47 2009
@@ -10,7 +10,11 @@
SPATIALINDEX_CPPFLAGS = @SPATIALINDEX_INC@/spatialindex @SPATIALINDEX_INC@ -DHAVE_SPATIALINDEX=1
endif
-AM_CPPFLAGS = $(GEOTIFF_CPPFLAGS) $(GDAL_CPPFLAGS) $(SPATIALINDEX_CPPFLAGS) -I../include/liblas/capi -I../include
+if OCI_IS_CONFIG
+OCI_CPPFLAGS = @ORACLE_OCI_CFLAGS@ -DHAVE_ORACLE=1
+endif
+
+AM_CPPFLAGS = $(GEOTIFF_CPPFLAGS) $(GDAL_CPPFLAGS) $(SPATIALINDEX_CPPFLAGS) $(OCI_CPPFLAGS) -I../include/liblas/capi -I../include
lasinfo_SOURCES = lasinfo.c lascommon.c
las2las_SOURCES = las2las.c lascommon.c
@@ -20,13 +24,20 @@
ts2las_SOURCES = ts2las.cpp
lasindex_SOURCES = lasindex.cpp
-
bin_PROGRAMS = lasinfo las2las lasmerge las2txt txt2las ts2las
if SPATIALINDEX_IS_CONFIG
bin_PROGRAMS += lasindex
endif
+if OCI_IS_CONFIG
+if GDAL_IS_CONFIG
+AM_CPPFLAGS += -Igeoraster
+las2oci_SOURCES = las2oci.cpp georaster/oci_wrapper.cpp
+bin_PROGRAMS += las2oci
+endif
+endif
+
bin_SCRIPTS = liblas-config
if GDAL_IS_CONFIG
Copied: trunk/apps/las2oci.cpp (from r1251, /trunk/apps/lasindex.cpp)
==============================================================================
--- /trunk/apps/lasindex.cpp (original)
+++ trunk/apps/las2oci.cpp Mon May 4 16:28:47 2009
@@ -1,49 +1,9 @@
-#include <liblas/cstdint.hpp>
-#include <liblas/detail/utility.hpp>
+#include "oci_wrapper.h"
-#include <liblas/laswriter.hpp>
-#include <liblas/laspoint.hpp>
-#include <liblas/lascolor.hpp>
-#include <liblas/lasreader.hpp>
-#include <liblas/lasheader.hpp>
-#include <liblas/lasindex.hpp>
-#include <iostream>
-#include <fstream>
-#include <vector>
-
-#ifdef _WIN32
-#define compare_no_case(a,b,n) _strnicmp( (a), (b), (n) )
-#else
-#define compare_no_case(a,b,n) strncasecmp( (a), (b), (n) )
-#endif
-
-std::istream* OpenInput(std::string filename)
-{
- std::ios::openmode const mode = std::ios::in | std::ios::binary;
- std::istream* istrm;
- if (compare_no_case(filename.c_str(),"STDIN",5) == 0)
- {
- istrm = &std::cin;
- }
- else
- {
- istrm = new std::ifstream(filename.c_str(), mode);
- }
-
- if (!istrm->good())
- {
- delete istrm;
- throw std::runtime_error("Reading stream was not able to be created");
- exit(1);
- }
- return istrm;
-}
void usage() {}
-using namespace liblas;
-
int main(int argc, char* argv[])
{
int rc = 0;
@@ -97,28 +57,6 @@
}
}
- std::cout << "input: " << input<< " output: " <<output<<std::endl;
-
- std::istream* istrm = OpenInput(input);
- LASReader* reader = new LASReader(*istrm);
- reader->Index(input);
-
- LASHeader header = reader->GetHeader();
- std::cout << "number of points: " << header.GetPointRecordsCount() << std::endl;
-
- for (int i=0; i< header.GetPointRecordsCount(); i++) {
- bool read = reader->ReadPointAt(i);
- LASPoint p = reader->GetPoint();
- std::cout.precision(2);
- std::cout.setf(std::ios_base::fixed);
- // std::cout << "x: " << p.GetX() << " y: " << p.GetY() << std::endl;
- }
-
- LASIndex* idx = reader->GetIndex();
-
- std::vector<liblas::uint32_t>* ids = idx->intersects(289815.12,4320979.06, 289818.01,4320982.59);
-
- std::cout << "Vec length" << ids->size() << std::endl;
- delete reader;
- delete istrm;
+ OWConnection* con = new OWConnection("lidar","lidar","ubuntu/crrel.local");
+ if (con->Succed()) printf("succeded");
}
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Mon May 4 16:28:47 2009
@@ -258,6 +258,11 @@
AX_LIB_ORACLE_OCI($ORACLE_OCI_REQ_VERSION)
AM_CONDITIONAL([OCI_IS_CONFIG], [test ! x$HAVE_ORACLE_OCI = xno])
+if test "${HAVE_ORACLE_OCI}" != "no" ; then
+ LIBS="$ORACLE_OCI_LDFLAGS $LIBS"
+fi
+
+
dnl #########################################################################
dnl Determine other features of compiler
More information about the Liblas-commits
mailing list