[Liblas-commits] hg: more compilation doc work
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu May 20 16:57:41 EDT 2010
changeset 2832af382b4c in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=2832af382b4c
summary: more compilation doc work
diffstat:
doc/compilation.txt | 249 +++++++++++++++++++++++++++++++++++++++++++++++----
doc/download.txt | 5 +-
doc/index.txt | 4 +-
3 files changed, 234 insertions(+), 24 deletions(-)
diffs (truncated from 345 to 300 lines):
diff -r 5dfcb15cc06d -r 2832af382b4c doc/compilation.txt
--- a/doc/compilation.txt Thu May 20 13:24:43 2010 -0500
+++ b/doc/compilation.txt Thu May 20 15:57:34 2010 -0500
@@ -6,8 +6,6 @@
.. contents::
:depth: 3
- :backlinks: top
-
:Author: Mateusz Loskot
@@ -32,25 +30,108 @@
This tutorial will describe how to build libLAS using CMake on both a
Unix platform and a Windows platform.
+.. note::
+ The only supported build environment libLAS moving forward from the 1.6
+ release is `CMake`_. `Autoconf`_ configuration will be phased out and will
+ no longer be updated after the 1.6 release.
+
+Prerequisites
+..............................................................................
-* Get the source code. See :ref:`source` for how to obtain the latest
- development version or visit :ref:`download` to get the latest released
- version.
+In addition to `CMake`_ 2.8.1+, you also need a C/C++ compiler. The
+following compilers are known to work:
-* Prepare a build directory. CMake allows you to generate different builders
- for a project, and in this example, we are going to generate both "Unix Makefiles"
- and "Xcode" builders for libLAS on Mac OS X.
+* MSVC 2003 (VC 7.1) (not all optional libraries work with 2003)
+* MSVC 2005 (VC 8.0)
+* MSVC 2008 (VC 9.0)
+* MSVC 2010
+* GCC 4.0
+* GCC 4.2
+* LLVM 4.2
+
+Optional libraries
+..............................................................................
+
+The base libLAS library can work without optional libraries to read and
+write LAS files, but linking in libraries like `GDAL`_, `libgeotiff`_, and
+`libspatialindex`_ will provide a boost in functionality to libLAS.
+libLAS linkage of GDAL and libgeotiff enhances spatial coordinate system
+description and provides data reprojection support. libLAS linkage of
+libspatialindex allows libLAS to use an `R-tree`_ for bounds queries and
+filtering operations. By linking `OCI`_ with the `Oracle Instant Client`_,
+libLAS can be used to load LAS data into `Oracle Point Cloud`_ -enabled
+Oracle tables.
+
+Building these libraries is beyond the scope of this document, but all except
+'OCI`_ can be built from source and installed at your leisure.
+
+`GDAL`_
+------------------------------------------------------------------------------
+
+Obtain `GDAL`_ via whatever method is convenient. Linux platforms such as
+`Debian`_ have `DebianGIS`_, Mac OS X has the `KyngChaos`_ software frameworks,
+and Windows has the `OSGeo4W`_ platform.
+
+
+`libgeotiff`_
+------------------------------------------------------------------------------
+
+Obtain `libgeotiff`_ from the same place you got `GDAL`_.
+
+.. note::
+ `GDAL` surreptitiously embeds a copy of `libgeotiff`_ in its library build
+ but there is no way for you to know this. In addition to embedding
+ libgeotiff, it also strips away the library symbols that libLAS needs,
+ meaning that libLAS can't simply link against `GDAL`_. If you are
+ building both of these libraries yourself, make sure you build GDAL
+ using the "External libgeotiff" option, which will prevent the
+ insanity that can ensue on some platforms. `OSGeo4W`_ users, including
+ those using that platform to link and build libLAS themselves, do
+ not need to worry about this issue.
+
+.. _`libgeotiff`: http://www.remotesensing.org/geotiff/geotiff.html
+.. _`7/28/2008`: http://lists.maptools.org/pipermail/geotiff/2008-July/000501.html
+.. _`proj.4`: http://proj.maptools.org/
+.. _`GDAL`: http://www.gdal.org
+.. _`libspatialindex`: http://trac.gispython.org/spatialindex/wiki
+.. _`Oracle Instant Client`: http://www.oracle.com/technology/tech/oci/instantclient/index.html
+.. _`OCI`: http://www.oracle.com/technology/tech/oci/index.html
+.. _`R-tree`: http://en.wikipedia.org/wiki/R-tree
+.. _`Oracle Point Cloud`: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28400/sdo_pc_pkg_ref.htm
+.. _`DebianGIS`: http://wiki.debian.org/DebianGis
+.. _`Debian`: http://www.debian.org
+.. _`KyngChaos`: http://www.kyngchaos.com/software/unixport
+.. _`OSGeo4W`: http://trac.osgeo.org/osgeo4w/
+
+
+
+
+
+Using "Unix Makefiles"
+..............................................................................
+
+Get the source code
+------------------------------------------------------------------------------
+
+See :ref:`source` for how to obtain the latest development version or visit
+:ref:`download` to get the latest released version.
+
+Prepare a build directory
+------------------------------------------------------------------------------
+
+CMake allows you to generate different builders for a project, and in this
+example, we are going to generate both "Unix Makefiles" and "Xcode" builders
+for libLAS on Mac OS X.
::
$ cd liblas
$ mkdir makefiles
-
-CMake with "Unix Makefiles"
-..............................................................................
+Configure base library
+------------------------------------------------------------------------------
-* Configure the basic core library for the "Unix Makefiles" target:
+Configure the basic core library for the "Unix Makefiles" target:
::
@@ -74,7 +155,11 @@
-- Generating done
-- Build files have been written to: /Users/hobu/hg/liblas-cmake/makefiles
-* Run `make`
+Issue the `make` command
+------------------------------------------------------------------------------
+
+This will build a base build of the library, with no extra libraries being
+configured.
::
@@ -97,20 +182,143 @@
...
[100%] Built target txt2las
-* Run 'ccmake ../' for the `Curses`_ interface or 'cmake-gui ../' for a
- GUI version.
+Run ``make install`` and test your installation with a :ref:`lasinfo` command
+------------------------------------------------------------------------------
+
+``make install`` will install the :ref:`utilities <utilities>` in the location
+that was specified for 'CMAKE_INSTALL_PREFIX'. Once installed, ensure that
+you can run lasinfo.
+
+::
+
+ $ lasinfo -c ../test/data/TO_core_last_zoom.las
+
+ ---------------------------------------------------------
+ Header Summary
+ ---------------------------------------------------------
+ File Name: ../test/data/TO_core_last_zoom.las
+ Version: 1.0
+ Source ID: 0
+ Reserved: 0
+ Project ID/GUID: '00000000-0000-0000-0000-000000000000'
+ System Identifier: ''
+ Generating Software: 'TerraScan'
+ File Creation Day/Year: 0/0
+ Header Size 227
+ Offset to Point Data 229
+ Number Var. Length Records 0
+ Point Data Format 1
+ Point Data Record Length 28
+ Number of Point Records 213093
+ Number of Points by Return 128621 84472 0 0 0
+ Scale Factor X Y Z 0.01 0.01 0.01
+ Offset X Y Z -0.000000 -0.000000 -0.000000
+ Min X Y Z 630250.000000 4834500.000000 46.830000
+ Max X Y Z 630500.000000 4834750.000000 170.650000
+ Spatial Reference
+ Geotiff_Information:
+ Version: 1
+ Key_Revision: 1.0
+ Tagged_Information:
+ End_Of_Tags.
+ Keyed_Information:
+ End_Of_Keys.
+ End_Of_Geotiff.
+
+ ---------------------------------------------------------
+ Point Inspection Summary
+ ---------------------------------------------------------
+ Header Point Count: 213093
+ Actual Point Count: 213093
+
+ Minimum and Maximum Attributes (min,max)
+ ---------------------------------------------------------
+ Min X,Y,Z: 630250.000000,4834500.000000,46.830000
+ Max X,Y,Z: 630500.000000,4834750.000000,170.650000
+ Bounding Box: 630250.00,4834500.00,630500.00,4834750.00
+ Time: 413162.560400,414095.322000
+ Return Number: 1,2
+ Return Count: 1,2
+ Flightline Edge: 0,0
+ Intensity: 10,50200
+ Scan Direction Flag: 0,0
+ Scan Angle Rank: 0,0
+ Classification: 1,1
+ Point Source Id: 0,0
+ Minimum Color: 0 0 0
+ Maximum Color: 0 0 0
+
+ Number of Points by Return
+ ---------------------------------------------------------
+ (0) 128621 (1) 84472 (2) 0 (3) 0 (4) 0
+ Total Points: 213093
+
+ Number of Returns by Pulse
+ ---------------------------------------------------------
+ (1) 128621 (2) 84472 (3) 0 (4) 0 (5) 0 (6) 0 (7) 0
+ Total Pulses: 213093
+
+ Point Classifications
+ ---------------------------------------------------------
+ 213093 Unclassified (1)
+
+
+
+Configure your `Optional Libraries`_.
+------------------------------------------------------------------------------
+
+By checking the "on" button for each, CMake may find your installations of
+these libraries, but in case it does not, set the following variables,
+substituting accordingly, to values that match your system layout.
+
+.. csv-table::
+
+ "`GDAL`_","GDAL_CONFIG", "/usr/local/bin/gdal-config"
+ "","GDAL_INCLUDE_DIR", "/usr/local/include"
+ "","GDAL_LIBRARY", "/usr/local/lib/libgdal.so"
+ "`libgeotiff`_","GEOTIFF_INCLUDE_DIR","/usr/local/include"
+ "","GEOTIFF_LIBRARY","/usr/local/lib/libgeotiff.so"
+ "`libspatialindex`_","SPATIALINDEX_INCLUDE_DIR","/usr/local/include"
+ "","SPATIALINDEX_LIBRARY","/usr/local/lib/libspatialindex_c.so"
+ "`OCI`_","ORACLE_INCLUDE_DIR","/home/oracle/sdk/include"
+ "","ORACLE_NNZ_LIBRARY","/home/oracle/libnnz10.so"
+ "","ORACLE_OCCI_LIBRARY","/home/oracle/libocci.so"
+ "","ORACLE_OCIEI_LIBRARY","/home/oracle/libociei.so"
+ "","ORACLE_OCI_LIBRARY","/home/oracle/libclntsh.so"
+
+
+
+.. note::
+ While `CMake`_ can be run from the command-line, and this is the preferred
+ way for many individuals, it can be much easier to run CMake from a GUI.
+ Now that we have a basic library building, we will use CMake's GUIs to
+ help us configure the rest of the optional components of the library. Run
+ ``ccmake ../`` for the `Curses`_ interface or ``cmake-gui ../`` for a GUI
+ version.
-.. figure:: ./images/ccmake-osx-start.png
- :alt: Running CCMake in OS X
+ .. figure:: ./images/ccmake-osx-start.png
+ :alt: Running CCMake in OS X
+
+ Running the `Curses`_ `CMake`_ interface. This interface is available to
+ all unix-like operating systems.
+
+ .. note::
+ If your arrow keys are not working with in CCMake, use CTRL-N and
+ CTRL-P to move back and forth between the options.
-.. figure:: ./images/cmake-gui-osx-start.png
- :alt: Running cmake-gui in OS X
+ .. figure:: ./images/cmake-gui-osx-start.png
+ :alt: Running cmake-gui in OS X
+
+ Running the cmake-gui `CMake`_ interface. This interface is available
+ on Linux, Windows, and Mac OS X.
+
CMake using XCode
..............................................................................
::
+
$ cd liblas
$ mkdir xcode
$ cd xcode/
@@ -196,4 +404,5 @@
.. _`CDash`: http://www.cdash.org/
.. _`continuous integration`: http://en.wikipedia.org/wiki/Continuous_integration
.. _`libLAS CDash`: http://my.cdash.org/index.php?project=libLAS
-.. _`Curses`: http://en.wikipedia.org/wiki/Curses_%28programming_library%29
\ No newline at end of file
More information about the Liblas-commits
mailing list