Skip to content

Commit

Permalink
Merge pull request #85 from oscarmartinezrubi/master
Browse files Browse the repository at this point in the history
Add las2pg and las2col
  • Loading branch information
hobu committed Jul 4, 2016
2 parents 77b2fc0 + 13c5196 commit 1dcd6f5
Show file tree
Hide file tree
Showing 4 changed files with 1,678 additions and 36 deletions.
98 changes: 74 additions & 24 deletions LICENSE.txt
@@ -1,7 +1,7 @@
libLAS Main License
==============================================================================

Copyright (c) 2007, Martin Isenburg, isenburg at cs.unc.edu
Copyright (c) 2007, Martin Isenburg, isenburg at cs.unc.edu

Copyright (c) 2008, Howard Butler, hobu.inc at gmail.com

Expand All @@ -13,34 +13,38 @@ Copyright (c) 2008, Frank Warmerdam, warmerdam at pobox.com

Copyright (c) 2008, Martin Rodriguez, mrodriguez at stereocarto.com

Copyright (c) 2016, Oscar Martinez Rubi o.rubi at esciencecenter.nl

Copyright (c) 2016, Romulo Goncalves r.goncalves at esciencecenter.nl

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following
conditions are met:

* Redistributions of source code must retain the above copyright
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided
with the distribution.
* Neither the name of the Martin Isenburg or Iowa Department
of Natural Resources nor the names of its contributors may be
used to endorse or promote products derived from this software
* Neither the name of the Martin Isenburg or Iowa Department
of Natural Resources nor the names of its contributors may be
used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.

include/liblas/cstdint.hpp
Expand All @@ -58,7 +62,7 @@ modified for libLAS purposes.
(C) Copyright Jens Mauer 2001

(C) Copyright Beman Dawes 1999

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
Expand Down Expand Up @@ -139,7 +143,7 @@ include/liblas/detail/sharedptr.hpp
==============================================================================

The SharedPtr class is based on implementation of CountedPtr
from the book "The C++ Standard Library - A Tutorial and Reference". It is
from the book "The C++ Standard Library - A Tutorial and Reference". It is
released under the main libLAS licensing terms.

(C) Copyright Nicolai M. Josuttis 1999
Expand Down Expand Up @@ -245,4 +249,50 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
DEALINGS IN THE SOFTWARE.

apps/las2pg.c
==============================================================================

Copyright (c) 2016, Oscar Martinez Rubi o.rubi at esciencecenter.nl

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

apps/las2col.c
==============================================================================

Copyright (c) 2016, Romulo Goncalves r.goncalves at esciencecenter.nl

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
40 changes: 28 additions & 12 deletions apps/CMakeLists.txt
@@ -1,6 +1,6 @@
###############################################################################
#
# apps/CMakeLists.txt controls building of libLAS utilities
# apps/CMakeLists.txt controls building of libLAS utilities
#
# Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
#
Expand All @@ -20,6 +20,8 @@ set(LAS2TXT las2txt)
set(TXT2LAS txt2las)
set(TS2LAS ts2las)
set(LASBLOCK lasblock )
set(LAS2COL las2col )
set(LAS2PG las2pg )

set(BIGFILE_TEST bigfile_test)
set(LASINDEX_TEST lasindex_test)
Expand All @@ -28,7 +30,7 @@ if(Boost_IOSTREAMS_FOUND)
set(BIGFILE_BIO_TEST bigfile_boost_iostreams_test)
endif()

# Set the build type to release if it is not explicitly set by the user and
# Set the build type to release if it is not explicitly set by the user and
# isn't in the cache yet
if (NOT CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE "Release")
Expand All @@ -41,8 +43,8 @@ endif()


set(LIBLAS_UTILITIES
${LASINFO} ${LAS2LAS} ${TXT2LAS}
${LAS2OGR} ${LAS2LAS} ${LASBLOCK} ${TS2LAS} ${LAS2TXT} )
${LASINFO} ${LAS2LAS} ${TXT2LAS} ${LAS2COL} ${LAS2PG}
${LAS2OGR} ${LAS2LAS} ${LASBLOCK} ${TS2LAS} ${LAS2TXT})

# TODO: Experimental and requires testing --mloskot
# Generate user-specific settings for Visual Studio project
Expand Down Expand Up @@ -90,14 +92,28 @@ if(LAS2TXT)
add_executable( ${LAS2TXT} las2txt.cpp laskernel.cpp )
target_link_libraries(${LAS2TXT} ${APPS_CPP_DEPENDENCIES} )
endif()

# Build txt2las
if(TXT2LAS)
set(TXT2LAS_SRC lascommon.c ${TXT2LAS}.c)
add_executable(${TXT2LAS} ${TXT2LAS_SRC})
target_link_libraries(${TXT2LAS} ${LIBLAS_C_LIB_NAME})
endif()

# Build las2col
if(LAS2COL)
set(LAS2COL_SRC lascommon.c ${LAS2COL}.c)
add_executable(${LAS2COL} ${LAS2COL_SRC})
target_link_libraries(${LAS2COL} ${LIBLAS_C_LIB_NAME})
endif()

# Build las2pg
if(LAS2PG)
set(LAS2PG_SRC lascommon.c ${LAS2PG}.c)
add_executable(${LAS2PG} ${LAS2PG_SRC})
target_link_libraries(${LAS2PG} ${LIBLAS_C_LIB_NAME})
endif()

if(TS2LAS)
add_executable(${TS2LAS} ts2las.cpp laskernel.cpp)
target_link_libraries(${TS2LAS} ${APPS_CPP_DEPENDENCIES} )
Expand All @@ -124,12 +140,12 @@ endif()

if (LASINDEX_TEST)
add_executable(${LASINDEX_TEST} lasindex_test.cpp)
target_link_libraries(${LASINDEX_TEST} ${APPS_CPP_DEPENDENCIES})
target_link_libraries(${LASINDEX_TEST} ${APPS_CPP_DEPENDENCIES})
endif()

if(BIGFILE_BIO_TEST)
add_executable(${BIGFILE_BIO_TEST} bigfile_boost_iostreams_test.cpp)
target_link_libraries(${BIGFILE_BIO_TEST} ${APPS_CPP_DEPENDENCIES} )
target_link_libraries(${BIGFILE_BIO_TEST} ${APPS_CPP_DEPENDENCIES} )
endif()

###############################################################################
Expand Down Expand Up @@ -160,7 +176,7 @@ if(UNIX)
INSTALL_RPATH "${LIBLAS_UTILS_RPATH}")

if(WITH_PKGCONFIG)

set(PKGCFG_PREFIX "${CMAKE_INSTALL_PREFIX}")
set(PKGCFG_INC_DIR "${LIBLAS_INCLUDE_SUBDIR}")
set(PKGCFG_LIB_DIR "${LIBLAS_LIB_SUBDIR}")
Expand All @@ -182,25 +198,25 @@ if(UNIX)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblas.pc
DESTINATION ${LIBLAS_LIB_DIR}/pkgconfig
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)

else()

# Autoconf compatibility variables to use the same script source.
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin)
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)

GET_DIRECTORY_PROPERTY(LIBLAS_DEFINITIONS DIRECTORY ${libLAS_SOURCE_DIR}/ COMPILE_DEFINITIONS)
GET_DIRECTORY_PROPERTY(LIBLAS_DEFINITIONS DIRECTORY ${libLAS_SOURCE_DIR}/ COMPILE_DEFINITIONS)

set(LIBLAS_CONFIG_DEFINITIONS "")
foreach(definition ${LIBLAS_DEFINITIONS})
set(LIBLAS_CONFIG_DEFINITIONS "${LIBLAS_CONFIG_DEFINITIONS} -D${definition}")
endforeach()


configure_file(${CMAKE_CURRENT_SOURCE_DIR}/liblas-config.in
${CMAKE_CURRENT_BINARY_DIR}/liblas-config @ONLY)

install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/liblas-config
DESTINATION bin)

Expand Down

0 comments on commit 1dcd6f5

Please sign in to comment.