Spatial Reference System container for libLAS. More...
#include <lasspatialreference.hpp>
Public Types | |
| enum | WKTModeFlag { eHorizontalOnly = 1, eCompoundOK = 2 } |
Public Member Functions | |
| SpatialReference () | |
| Default constructor. | |
| ~SpatialReference () | |
| Destructor. | |
| SpatialReference (const std::vector< VariableRecord > &vlrs) | |
| Constructor creating SpatialReference instance from given Variable-Length Record. | |
| SpatialReference (SpatialReference const &other) | |
| Copy constryctor. | |
| SpatialReference & | operator= (SpatialReference const &rhs) |
| Assignment operator. | |
| const GTIF * | GetGTIF () |
| Returns a pointer to the internal GTIF*. | |
| void | SetGTIF (const GTIF *pgtiff, const ST_TIFF *ptiff) |
| std::string | GetWKT (WKTModeFlag mode_flag=eHorizontalOnly) const |
| Returns the OGC WKT describing Spatial Reference System. | |
| void | SetWKT (std::string const &v) |
| Sets the SRS using GDAL's OGC WKT. | |
| void | SetVerticalCS (int verticalCSType, std::string const &citation="", int verticalDatum=-1, int verticalUnits=9001) |
| Sets the vertical coordinate system using geotiff key values. | |
| void | SetFromUserInput (std::string const &v) |
| Sets the SRS using GDAL's SetFromUserInput function. | |
| std::string | GetProj4 () const |
| Returns the Proj.4 string describing the Spatial Reference System. | |
| void | SetProj4 (std::string const &v) |
| Sets the Proj.4 string describing the Spatial Reference System. | |
| void | SetVLRs (const std::vector< VariableRecord > &vlrs) |
| Set the LASVLRs for the SpatialReference. | |
| void | AddVLR (const VariableRecord &vlr) |
| Add a VLR representing GeoTIFF keys to the SRS. | |
| std::vector< VariableRecord > | GetVLRs () const |
| Return a copy of the LASVLRs that SpatialReference maintains. | |
Spatial Reference System container for libLAS.
| liblas::SpatialReference::SpatialReference | ( | ) |
Default constructor.
| liblas::SpatialReference::~SpatialReference | ( | ) |
Destructor.
If libgeotiff is enabled, deallocates libtiff and libgeotiff objects used internally.
| liblas::SpatialReference::SpatialReference | ( | const std::vector< VariableRecord > & | vlrs | ) |
Constructor creating SpatialReference instance from given Variable-Length Record.
| liblas::SpatialReference::SpatialReference | ( | SpatialReference const & | other | ) |
Copy constryctor.
| void liblas::SpatialReference::AddVLR | ( | const VariableRecord & | vlr | ) |
Add a VLR representing GeoTIFF keys to the SRS.
| const GTIF* liblas::SpatialReference::GetGTIF | ( | ) |
Returns a pointer to the internal GTIF*.
Only available if you have libgeotiff linked in.
| std::string liblas::SpatialReference::GetProj4 | ( | ) | const |
Returns the Proj.4 string describing the Spatial Reference System.
If GDAL is linked, it uses GDAL's operations and methods to determine the Proj.4 string -- otherwise, if libgeotiff is linked, it uses that. Note that GDAL's operations are much more mature and support more coordinate systems and descriptions.
| std::vector<VariableRecord> liblas::SpatialReference::GetVLRs | ( | ) | const |
Return a copy of the LASVLRs that SpatialReference maintains.
| std::string liblas::SpatialReference::GetWKT | ( | WKTModeFlag | mode_flag = eHorizontalOnly |
) | const |
Returns the OGC WKT describing Spatial Reference System.
If GDAL is linked, it uses GDAL's operations and methods to determine the WKT. If GDAL is not linked, no WKT is returned.
| mode_flag | May be eHorizontalOnly indicating the WKT will not include vertical coordinate system info (the default), or eCompoundOK indicating the the returned WKT may be a compound coordinate system if there is vertical coordinate system info available. |
| SpatialReference& liblas::SpatialReference::operator= | ( | SpatialReference const & | rhs | ) |
Assignment operator.
| void liblas::SpatialReference::SetFromUserInput | ( | std::string const & | v | ) |
Sets the SRS using GDAL's SetFromUserInput function.
If GDAL is not linked, this operation has no effect.
| v | - a string containing the definition (filename, proj4, wkt, etc). |
| void liblas::SpatialReference::SetProj4 | ( | std::string const & | v | ) |
Sets the Proj.4 string describing the Spatial Reference System.
If GDAL is linked, it uses GDAL's operations and methods to determine the Proj.4 string -- otherwise, if libgeotiff is linked, it uses that. Note that GDAL's operations are much more mature and support more coordinate systems and descriptions.
| v | - a string containing the Proj.4 string. |
| void liblas::SpatialReference::SetVerticalCS | ( | int | verticalCSType, | |
| std::string const & | citation = "", |
|||
| int | verticalDatum = -1, |
|||
| int | verticalUnits = 9001 | |||
| ) |
Sets the vertical coordinate system using geotiff key values.
This operation should normally be done after setting the horizontal portion of the coordinate system with something like SetWKT(), SetProj4(), SetGTIF() or SetFromUserInput()
| verticalCSType | - An EPSG vertical coordinate system code, normally in the range 5600 to 5799, or -1 if one is not available. | |
| citation | - a textual description of the vertical coordinate system or an empty string if nothing is available. | |
| verticalDatum | - the EPSG vertical datum code, often in the range 5100 to 5299 - implied by verticalCSType if that is provided, or -1 if no value is available. | |
| verticalUnits | - the EPSG vertical units code, often 9001 for Metre. |
| void liblas::SpatialReference::SetVLRs | ( | const std::vector< VariableRecord > & | vlrs | ) |
Set the LASVLRs for the SpatialReference.
SetVLRs will only copy VLR records that pertain to the GeoTIFF keys, and extraneous VLR records will not be copied.
| vlrs | - A list of VLRs that contains VLRs describing GeoTIFF keys |
| void liblas::SpatialReference::SetWKT | ( | std::string const & | v | ) |
Sets the SRS using GDAL's OGC WKT.
If GDAL is not linked, this operation has no effect.
| v | - a string containing the WKT string. |
1.6.1