Skip to content

Commit

Permalink
Merge branch 'master' into task/set_geometry_null_value_when_invalid_…
Browse files Browse the repository at this point in the history
…format
  • Loading branch information
AlvaroVega committed Jun 10, 2024
2 parents 9138620 + 22c6c24 commit 0e65f0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
Expand Down

0 comments on commit 0e65f0a

Please sign in to comment.