Commit 40e15141 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: replace GetfieldAs... by GetValue<..>

No related merge requests found
Showing with 3 additions and 3 deletions
+3 -3
......@@ -243,7 +243,7 @@ inline int
TrainVectorBase<float, int>
::GetFeatureField(const ogr::Feature & feature, int fieldIndex)
{
return(feature.ogr().GetFieldAsInteger( fieldIndex ));
return(feature[fieldIndex].GetValue<int>());
}
template <class TInputValue, class TOutputValue>
......@@ -251,7 +251,7 @@ inline TOutputValue
TrainVectorBase<TInputValue, TOutputValue>
::GetFeatureField(const ogr::Feature & feature, int fieldIndex)
{
return(feature.ogr().GetFieldAsDouble( fieldIndex ));
return(feature[fieldIndex].GetValue<double>());
}
template <class TInputValue, class TOutputValue>
......@@ -310,7 +310,7 @@ TrainVectorBase<TInputValue, TOutputValue>
MeasurementType mv;
mv.SetSize( m_FeaturesInfo.m_NbFeatures );
for( unsigned int idx = 0; idx < m_FeaturesInfo.m_NbFeatures; ++idx )
mv[idx] = feature.ogr().GetFieldAsDouble( featureFieldIndex[idx] );
mv[idx] = feature[featureFieldIndex[idx]].GetValue<double>();
input->PushBack( mv );
......
Supports Markdown
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