[Liblas-commits] hg: use 'liblas' as the VLR id for OGR OGC WKT,
set descriptions...
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Dec 15 12:05:20 EST 2010
changeset f8621a69bd83 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=f8621a69bd83
summary: use 'liblas' as the VLR id for OGR OGC WKT, set descriptions for GeoTIFF tags
diffstat:
src/lasspatialreference.cpp | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (72 lines):
diff -r d086d7325aa5 -r f8621a69bd83 src/lasspatialreference.cpp
--- a/src/lasspatialreference.cpp Wed Dec 15 10:54:05 2010 -0600
+++ b/src/lasspatialreference.cpp Wed Dec 15 11:05:08 2010 -0600
@@ -167,28 +167,29 @@
bool SpatialReference::IsGeoVLR(VariableRecord const& vlr) const
{
- std::string const uid("LASF_Projection");
+ std::string const las_projid("LASF_Projection");
+ std::string const liblas_id("liblas");
// GTIFF_GEOKEYDIRECTORY == 34735
- if (uid == vlr.GetUserId(true).c_str() && 34735 == vlr.GetRecordId())
+ if (las_projid == vlr.GetUserId(true).c_str() && 34735 == vlr.GetRecordId())
{
return true;
}
// GTIFF_DOUBLEPARAMS == 34736
- if (uid == vlr.GetUserId(true).c_str() && 34736 == vlr.GetRecordId())
+ if (las_projid == vlr.GetUserId(true).c_str() && 34736 == vlr.GetRecordId())
{
return true;
}
// GTIFF_ASCIIPARAMS == 34737
- if (uid == vlr.GetUserId(true).c_str() && 34737 == vlr.GetRecordId())
+ if (las_projid == vlr.GetUserId(true).c_str() && 34737 == vlr.GetRecordId())
{
return true;
}
// OGR_WKT?
- if (uid == vlr.GetUserId(true).c_str() && 2112 == vlr.GetRecordId())
+ if (liblas_id == vlr.GetUserId(true).c_str() && 2112 == vlr.GetRecordId())
{
return true;
}
@@ -281,6 +282,7 @@
int i = 0;
record.SetRecordId(34735);
record.SetUserId("LASF_Projection");
+ record.SetDescription("GeoTIFF GeoKeyDirectoryTag");
std::vector<uint8_t> data;
// Shorts are 2 bytes in length
@@ -310,6 +312,8 @@
int i = 0;
record.SetRecordId(34736);
record.SetUserId("LASF_Projection");
+ record.SetDescription("GeoTIFF GeoDoubleParamsTag");
+
std::vector<uint8_t> data;
// Doubles are 8 bytes in length
@@ -344,6 +348,7 @@
int i = 0;
record.SetRecordId(34737);
record.SetUserId("LASF_Projection");
+ record.SetDescription("GeoTIFF GeoAsciiParamsTag");
std::vector<uint8_t> data;
// whoa. If the returned count was 0, it is because there
@@ -385,7 +390,7 @@
const uint8_t* wkt_bytes = reinterpret_cast<const uint8_t*>(m_wkt.c_str());
wkt_record.SetRecordId( 2112 );
- wkt_record.SetUserId("LASF_Projection");
+ wkt_record.SetUserId("liblas");
wkt_record.SetDescription( "OGR variant of OpenGIS WKT SRS" );
// Would you be surprised if this remarshalling of bytes
More information about the Liblas-commits
mailing list