diff --git a/include/usgscsm/Utilities.h b/include/usgscsm/Utilities.h index a661a354a130336dae895ff90f7ad409e136fd30..f1106299a48f361967f5e81c213e2f2c37b5a229 100644 --- a/include/usgscsm/Utilities.h +++ b/include/usgscsm/Utilities.h @@ -199,10 +199,6 @@ void applyRotationTranslationToXyzVec(ale::Rotation const& r, ale::Vec3d const& // to a calendar time string, such as 2000-01-01T00:16:40Z. std::string ephemTimeToCalendarTime(double ephemTime); -std::vector<double> getGeoTransform(nlohmann::json isd); - -std::string getProjectionString(nlohmann::json isd); - std::vector<double> pixelToMeter(double line, double sample, std::vector<double> geoTransform); std::vector<double> meterToPixel(double meter_x, double meter_y, std::vector<double> geoTransform); diff --git a/src/UsgsAstroProjectedLsSensorModel.cpp b/src/UsgsAstroProjectedLsSensorModel.cpp index b08de14f57c456251f654ae3451f6b2371833397..4dfed487b199512ebed6b53fca2ecb50bab4ba8f 100644 --- a/src/UsgsAstroProjectedLsSensorModel.cpp +++ b/src/UsgsAstroProjectedLsSensorModel.cpp @@ -775,8 +775,8 @@ std::string UsgsAstroProjectedLsSensorModel::constructStateFromIsd( json lsState = json::parse(UsgsAstroLsSensorModel::constructStateFromIsd(imageSupportData, warnings)); json state = json::parse(imageSupportData); - lsState["m_geoTransform"] = getGeoTransform(state); - lsState["m_projString"] = getProjectionString(state); + lsState["m_geoTransform"] = ale::getGeoTransform(state); + lsState["m_projString"] = ale::getProjectionString(state); MESSAGE_LOG( spdlog::level::trace, "m_geoTransform: {} " diff --git a/src/Utilities.cpp b/src/Utilities.cpp index 039885d29fbedfbe0072970e6e5dc2269b6ae0f9..5599c252995bd5b394eb387afc4f130a3d2ec690 100644 --- a/src/Utilities.cpp +++ b/src/Utilities.cpp @@ -1529,28 +1529,6 @@ std::string ephemTimeToCalendarTime(double ephemTime) { return buffer; } -std::vector<double> getGeoTransform(json isd) { - std::vector<double> transform = {}; - try { - transform = isd.at("geo_transform").get<std::vector<double>>(); - } catch (std::exception &e) { - std::string originalError = e.what(); - std::string msg = "Could not parse the geo_transform. ERROR: " + originalError + isd.dump(); - throw std::runtime_error(msg); - } - return transform; -} - -std::string getProjectionString(json isd) { - std::string projection_string = ""; - try { - projection_string = isd.at("proj_string"); - } catch (...) { - throw std::runtime_error("Could not parse the projection string."); - } - return projection_string; -} - std::vector<double> pixelToMeter(double line, double sample, std::vector<double> geoTransform) { double meter_x = (sample * geoTransform[1]) + geoTransform[0]; double meter_y = (line * geoTransform[5]) + geoTransform[3];