Commit 5d6795ef authored by Julien Cabieces's avatar Julien Cabieces

fix type filtering

parent 45fe7215
......@@ -198,7 +198,7 @@ private:
OGRFieldType fieldType = feature.ogr().GetFieldDefnRef(iField)->GetType();
if (std::find(typeFilter.begin(), typeFilter.end(), fieldType) != std::end(typeFilter))
if (typeFilter.empty() || std::find(typeFilter.begin(), typeFilter.end(), fieldType) != std::end(typeFilter))
{
std::string tmpKey = "ref.vector.field." + key.substr(0, end - key.begin());
AddChoice(tmpKey, item);
......
......@@ -65,7 +65,7 @@ void VectorPrediction<RegressionMode>::DoUpdateParameters()
std::transform(key.begin(), key.end(), key.begin(), tolower);
auto fieldType = fieldDefn->GetType();
if (std::find(typeFilter.begin(), typeFilter.end(), fieldType) != std::end(typeFilter))
if (typeFilter.empty() || std::find(typeFilter.begin(), typeFilter.end(), fieldType) != std::end(typeFilter))
{
std::string tmpKey = "feat." + key;
AddChoice(tmpKey, item);
......
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