From 4bcb211259652adc988e1904121ff3035c5c94d8 Mon Sep 17 00:00:00 2001 From: yjmenezes Date: Wed, 28 Feb 2018 22:45:04 -0300 Subject: [PATCH] gcp_list.txt old and new, both working --- modules/odm_georef/src/Georef.cpp | 9 ++-- tests/test_data/gcp_list.txt | 15 +++--- tests/test_data/gcp_list_README.txt | 67 ++++++++++++--------------- tests/test_data/gcp_list_by_photo.txt | 3 +- 4 files changed, 44 insertions(+), 50 deletions(-) mode change 100755 => 100644 tests/test_data/gcp_list.txt mode change 100644 => 100755 tests/test_data/gcp_list_README.txt diff --git a/modules/odm_georef/src/Georef.cpp b/modules/odm_georef/src/Georef.cpp index 91843162..00bf60c9 100755 --- a/modules/odm_georef/src/Georef.cpp +++ b/modules/odm_georef/src/Georef.cpp @@ -29,7 +29,8 @@ GeorefGCP::~GeorefGCP() void GeorefGCP::extractGCP(std::istringstream &gcpStream) { - gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_ >> idgcp_; +// gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_; + gcpStream >> x_ >> y_ >> z_ >> pixelX_ >> pixelY_ >> image_ >> idgcp_; } Vec3 GeorefGCP::getPos() @@ -682,7 +683,9 @@ void Georef::readGCPs() { std::istringstream istr(gcpString); GeorefGCP gcp; - if ( ! gcpString[0] || gcpString[0] == '#' ) { /* skip comments */ +// if ( ! gcpString[0] || gcpString[0] == '#' ) { /* skip comments */ +//TODO skip empty lines too + if ( istr.peek() == '#' || istr.peek() == '\r' || istr.peek() == '\n' ) { /* skip comments */ continue; } gcp.extractGCP(istr); @@ -690,7 +693,7 @@ void Georef::readGCPs() ++nrGCPs; // log_<<"x_: "<