Spatial Reference System container for libLAS.
More...
#include <spatialreference.hpp>
Spatial Reference System container for libLAS.
Enumerator |
---|
eGeoTIFF |
|
eOGRWKT |
|
Enumerator |
---|
eHorizontalOnly |
|
eCompoundOK |
|
liblas::SpatialReference::SpatialReference |
( |
| ) |
|
liblas::SpatialReference::~SpatialReference |
( |
| ) |
|
Destructor.
If libgeotiff is enabled, deallocates libtiff and libgeotiff objects used internally.
liblas::SpatialReference::SpatialReference |
( |
std::vector< VariableRecord > const & |
vlrs | ) |
|
Constructor creating SpatialReference instance from given Variable-Length Record.
Add a VLR representing GeoTIFF keys to the SRS.
void liblas::SpatialReference::ClearVLRs |
( |
GeoVLRType |
eType | ) |
|
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.
liblas::property_tree::ptree liblas::SpatialReference::GetPTree |
( |
| ) |
const |
std::vector<VariableRecord> liblas::SpatialReference::GetVLRs |
( |
| ) |
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.
- Parameters
-
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. |
std::string liblas::SpatialReference::GetWKT |
( |
WKTModeFlag |
mode_flag, |
|
|
bool |
pretty |
|
) |
| const |
bool liblas::SpatialReference::operator!= |
( |
const SpatialReference & |
other | ) |
const |
|
inline |
bool liblas::SpatialReference::operator== |
( |
const SpatialReference & |
other | ) |
const |
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.
- Parameters
-
v | - a string containing the definition (filename, proj4, wkt, etc). |
void liblas::SpatialReference::SetGTIF |
( |
GTIF * |
pgtiff, |
|
|
ST_TIFF * |
ptiff |
|
) |
| |
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.
- Parameters
-
v | - a string containing the Proj.4 string. |
void liblas::SpatialReference::SetVerticalCS |
( |
int32_t |
verticalCSType, |
|
|
std::string const & |
citation = std::string(0) , |
|
|
int32_t |
verticalDatum = -1 , |
|
|
int32_t |
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()
- Parameters
-
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 |
( |
std::vector< VariableRecord > const & |
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.
- Parameters
-
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.
- Parameters
-
v | - a string containing the WKT string. |
The documentation for this class was generated from the following file: