Commit 71f20dcc authored by Julien Osman's avatar Julien Osman

FIX: Remove hard coded path

parent 5b0d5d36
Pipeline #7236 failed with stages
in 91 minutes and 34 seconds
This diff is collapsed.
......@@ -40,7 +40,6 @@ platform_position[4]ephemeris.position: (-211215.549626422,-4807103.54584084,53
platform_position[4]ephemeris.velocity: (-2242.74289199728,-5301.198083286,-4877.50945094166)
platform_positions_count: 5
product_georeferenced_flag: false
product_xml_filename: /home/julien/Projects/orfeo-toolbox/misc/OTB-LargeInput/RADARSAT2/ALTONA/Fine_Quad-Pol_Dataset/PK6621_DK406_FQ9_20080405_124900_HH_VV_HV_VH_SLC_Altona/product.xml
rect: 0 0 2821 12952
ref_point.col: 0
ref_point.distance: 890636.095102868
......
......@@ -30,6 +30,7 @@
// useful constants
#include <otbMath.h>
#include "otbXMLMetadataSupplier.h"
#include <boost/filesystem.hpp>
namespace otb
{
......@@ -305,10 +306,10 @@ void Radarsat2ImageMetadataInterface::ParseGeom(const MetadataSupplierInterface
m_Imd.Add(MDStr::SensorID, "SAR");
// Product file
std::string ProductFilePath = mds.GetAs<std::string>("", "product_xml_filename");
auto ProductFilePath = boost::filesystem::path(mds.GetResourceFile());
if (!ProductFilePath.empty())
{
XMLMetadataSupplier ProductMS(ProductFilePath);
XMLMetadataSupplier ProductMS((ProductFilePath.remove_filename() /= "product.xml").string());
m_Imd.Add(MDStr::Mission, ProductMS.GetAs<std::string>("product.sourceAttributes.satellite"));
m_Imd.Add(MDNum::NumberOfLines, ProductMS.GetAs<int>("product.imageAttributes.rasterAttributes.numberOfLines"));
m_Imd.Add(MDNum::NumberOfColumns, ProductMS.GetAs<int>("product.imageAttributes.rasterAttributes.numberOfSamplesPerLine"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment