diff --git a/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/model/Feature.java b/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/model/Feature.java index 266838d0a..559a110a5 100644 --- a/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/model/Feature.java +++ b/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/model/Feature.java @@ -276,7 +276,7 @@ public JsonObject toJson() { JsonObject resultJSON = new JsonObject(); Geometry geo = this.getGeometry(); - if (geo) { + if (geo != null) { resultJSON.add(GEOMETRY_TAG, geo.toJSON()); } 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 4f4e46226..8a637b586 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 @@ -596,6 +596,7 @@ protected void jsonElementToFeatureAttr(String attrName, String attrType, JsonEl } else { LOGGER.warn("Invalid geo:json type, only points allowed: " + location.toString()); + feature.setGeometry(null); } } catch (Exception e) { LOGGER.error("Invalid geo:json format, (sikipped): " + attrValue.toString() + " - Error: "