diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 20e4f8fd8..8e9eb07ae 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1 +1,2 @@ - [cygnus-arcgis] Insert null attribute as is in feature table (#2376) +- [cygnus-arcgis] force null geometry when invalid geo:json format or type is found instead of Point(0,0) (#2379) diff --git a/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/sinks/NGSIArcgisFeatureTableSink.java b/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/sinks/NGSIArcgisFeatureTableSink.java index ace13d628..c1b754b3a 100644 --- a/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/sinks/NGSIArcgisFeatureTableSink.java +++ b/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/sinks/NGSIArcgisFeatureTableSink.java @@ -636,12 +636,14 @@ protected void jsonElementToFeatureAttr(String attrName, String attrType, JsonEl LOGGER.warn( "[NGSIArcgisAggregator] Unquoted String attribute: " + attrName + ":" + attrValue); // If all fails, insert as String, except if null - if (attrValue != null) { + if (attrValue != null && + !attrValue.isJsonNull() && + !attrValue.toString().equals("null") ) { String strValue = URLDecoder.decode(attrValue.toString()); feature.addAttribute(attrName, strValue); } else { - // Insert null as is - feature.addAttribute(attrName, attrValue); + // Insert null + feature.addAttribute(attrName, null); } }