Fix centroid field from list

This commit is contained in:
Fabio Sinibaldi 2022-10-24 17:45:13 +02:00
parent 908fb4fa31
commit 1f4afcad4b
1 changed files with 6 additions and 1 deletions

View File

@ -38,6 +38,7 @@ import org.geojson.Point;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@Slf4j
@ -216,7 +217,11 @@ public class SDIIndexerPlugin extends SDIAbstractPlugin implements IndexerPlugin
if(!foundValues.isEmpty()) {
// NB CSV for multiple values
StringBuilder b=new StringBuilder();
foundValues.forEach(v->b.append(v+","));
foundValues.forEach(o-> {
// Parser returns list of list
if (o instanceof Collection) ((Collection<?>) o).forEach(v ->b.append(v + ","));
else b.append(o+",");
});
b.deleteCharAt(b.length()-1);
toSetValue = b.toString();
}