Changeset 1614:5a1467085fe5
- Timestamp:
- 03/05/10 11:14:54 (5 months ago)
- Branch:
- default
- Location:
- include
- Files:
-
- 11 edited
- 1 copied
-
Makefile.am (modified) (1 diff)
-
liblas/compatibility.hpp (copied) (copied from include/liblas/liblas.hpp) (2 diffs)
-
liblas/detail/fwd.hpp (modified) (1 diff)
-
liblas/lasclassification.hpp (modified) (1 diff)
-
liblas/lascolor.hpp (modified) (1 diff)
-
liblas/lasformat.hpp (modified) (1 diff)
-
liblas/lasheader.hpp (modified) (1 diff)
-
liblas/laspoint.hpp (modified) (1 diff)
-
liblas/lasreader.hpp (modified) (1 diff)
-
liblas/lasspatialreference.hpp (modified) (1 diff)
-
liblas/lasvariablerecord.hpp (modified) (1 diff)
-
liblas/laswriter.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
include/Makefile.am
r1601 r1614 2 2 3 3 nobase_las_HEADERS = \ 4 liblas/compatibility.hpp \ 4 5 liblas/cstdint.hpp \ 5 6 liblas/exception.hpp \ -
include/liblas/compatibility.hpp
r1613 r1614 3 3 * 4 4 * Project: libLAS - http://liblas.org - A BSD library for LAS format data. 5 * Purpose: LAS include file6 * Author: Mateusz Loskot, mateusz@loskot.net5 * Purpose: LAS compatibility header 6 * Author: Howard Butler, hobu.inc@gmail.com 7 7 * 8 8 ****************************************************************************** 9 * Copyright (c) 2008, Mateusz Loskot 10 * Copyright (c) 2008, Phil Vachon 11 * Copyright (c) 2008, Howard Butler 9 * Copyright (c) 2010, Howard Butler 12 10 * 13 11 * All rights reserved. … … 43 41 44 42 45 #ifndef LIBLAS_ HPP_INCLUDED46 #define LIBLAS_ HPP_INCLUDED43 #ifndef LIBLAS_COMPATIBILITY_HPP_INCLUDED 44 #define LIBLAS_COMPATIBILITY_HPP_INCLUDED 47 45 48 #include <liblas/cstdint.hpp>49 46 #include <liblas/detail/fwd.hpp> 50 #include <fstream>51 #include <string>52 47 53 /// Namespace grouping all elements of libLAS public interface.54 /// \note55 /// User's may notice there is namespace \em detail nested56 /// in the \em liblas namespace. The \em detail should be considered as private57 /// namespace dedicated for implementation details, so libLAS users are not58 /// supposed to access it directly, nor included headers from the \em detail59 /// subdirectory of \em liblas include folder.60 48 namespace liblas 61 49 { 62 50 63 /// Open file to read in binary mode. 64 /// The input file is also attached to input stream. 65 /// \param ifs - reference to input file stream to 66 /// which opened file is attached 67 /// \param filename - name of file to open 68 /// \return true if file has been opened with success, false otherwise 69 /// \exception No throw 70 /// 71 inline bool Open(std::ifstream& ifs, std::string const& filename) // throw() 72 { 73 ifs.open(filename.c_str(), std::ios::in | std::ios::binary); 74 return ifs.is_open(); 75 } 76 77 /// Create file and open to write in binary mode. 78 /// The output file is also attached to output stream. 79 /// \param ofs - reference to output file stream to 80 /// which created file is attached 81 /// \param filename - name of file to open 82 /// \return true if file has been create with success, false otherwise 83 /// \exception No throw 84 /// 85 inline bool Create(std::ofstream& ofs, std::string const& filename) // throw() 86 { 87 ofs.open(filename.c_str(), std::ios::out | std::ios::binary); 88 return ofs.is_open(); 89 } 90 91 /// Check if GDAL support has been built in to libLAS. 92 inline bool IsGDALEnabled() 93 { 94 #ifdef HAVE_GDAL 95 return true; 96 #else 97 return false; 98 #endif 99 } 100 101 /// Check if GeoTIFF support has been built in to libLAS. 102 inline bool IsLibGeoTIFFEnabled() 103 { 104 #ifdef HAVE_LIBGEOTIFF 105 return true; 106 #else 107 return false; 108 #endif 109 } 110 111 /// Check if libspatialindex support has been built in to libLAS. 112 inline bool IsLibSpatialIndexEnabled() 113 { 114 #ifdef HAVE_SPATIALINDEX 115 return true; 116 #else 117 return false; 118 #endif 119 } 120 121 /// Range of allowed ASPRS LAS file format versions. 122 enum FormatVersion 123 { 124 eVersionMajorMin = 1, ///< Minimum of major component 125 eVersionMajorMax = 1, ///< Maximum of major component 126 eVersionMinorMin = 0, ///< Minimum of minor component 127 eVersionMinorMax = 2 ///< Maximum of minor component 128 }; 129 130 /// Versions of point record format. 131 enum PointFormatName 132 { 133 ePointFormat0 = 0, ///< Point Data Format \e 0 134 ePointFormat1 = 1, ///< Point Data Format \e 1 135 ePointFormat2 = 2, ///< Point Data Format \e 2 136 ePointFormat3 = 3, ///< Point Data Format \e 3 137 ePointFormatUnknown = -99 ///< Point Data Format is unknown 138 }; 139 140 /// Number of bytes of point record storage in particular format. 141 enum PointSize 142 { 143 ePointSize0 = 20, ///< Size of point record in data format \e 0 144 ePointSize1 = 28, ///< Size of point record in data format \e 1 145 ePointSize2 = 26, ///< Size of point record in data format \e 2 146 ePointSize3 = 34 ///< Size of point record in data format \e 3 147 148 }; 149 150 151 class ReaderI 152 { 153 public: 154 155 virtual Header const& ReadHeader() = 0; 156 virtual Point const& ReadNextPoint(const Header& header) = 0; 157 virtual Point const& ReadPointAt(std::size_t n, const Header& header) = 0; 158 159 virtual void Reset(const Header& header) = 0; 160 virtual void SetInputSRS(const SpatialReference& srs) = 0; 161 virtual void SetOutputSRS(const SpatialReference& srs, const Header& header) = 0; 162 163 virtual ~ReaderI() {}; 164 }; 165 166 class WriterI 167 { 168 public: 169 170 virtual Header const& WriteHeader(const Header& header) = 0; 171 virtual void UpdateHeader(const Header& header) = 0; 172 virtual void WritePoint(const Point& point, const Header& header) = 0; 173 174 virtual void SetInputSRS(const SpatialReference& srs) = 0; 175 virtual void SetOutputSRS(const SpatialReference& srs, const Header& header) = 0; 176 177 virtual ~WriterI() {}; 178 179 }; 180 51 typedef liblas::Writer LASWriter; 52 typedef liblas::Reader LASReader; 53 typedef liblas::Point LASPoint; 54 typedef liblas::SpatialReference LASSpatialReference; 55 typedef liblas::VariableRecord LASVariableRecord; 56 typedef liblas::Header LASHeader; 57 typedef liblas::Classification LASClassification; 58 typedef liblas::Color LASColor; 59 typedef liblas::Point LASPoint; 181 60 182 61 -
include/liblas/detail/fwd.hpp
r1613 r1614 53 53 class SpatialReference; 54 54 class PointFormat; 55 class Classification; 56 class VariableRecord; 55 57 56 58 namespace detail { -
include/liblas/lasclassification.hpp
r1613 r1614 268 268 } 269 269 270 // typedef liblas::Classification LASClassification ;271 272 273 270 } // namespace liblas 274 271 -
include/liblas/lascolor.hpp
r1613 r1614 167 167 } 168 168 169 // typedef liblas::Color LASColor;170 171 169 } // namespace liblas 172 170 -
include/liblas/lasformat.hpp
r1613 r1614 154 154 } 155 155 156 typedef liblas::PointFormat LASPointFormat ;157 156 } // namespace liblas 158 157 -
include/liblas/lasheader.hpp
r1613 r1614 379 379 }; 380 380 381 // typedef liblas::Header LASHeader ;382 381 } // namespace liblas 383 382 -
include/liblas/laspoint.hpp
r1613 r1614 361 361 } 362 362 363 // typedef liblas::Point LASPoint;364 365 363 } // namespace liblas 366 364 -
include/liblas/lasreader.hpp
r1613 r1614 157 157 158 158 159 // typedef liblas::Reader LASReader;160 159 161 160 } // namespace liblas -
include/liblas/lasspatialreference.hpp
r1613 r1614 202 202 }; 203 203 204 // typedef liblas::SpatialReference LASSpatialReference;205 204 } // namespace liblas 206 205 -
include/liblas/lasvariablerecord.hpp
r1613 r1614 156 156 } 157 157 158 // typedef liblas::VariableRecord LASVariableRecord ;159 160 158 } // namespace liblas 161 159 -
include/liblas/laswriter.hpp
r1613 r1614 110 110 }; 111 111 112 // typedef liblas::Writer LASWriter ;113 114 112 } // namespace liblas 115 113
Note: See TracChangeset
for help on using the changeset viewer.
