Skip to content

Commit

Permalink
Merge branch 'master' into task/log_json_geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega authored Sep 25, 2024
2 parents a957ce8 + d6e9e78 commit a6d9cb3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
3 changes: 2 additions & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- [cygnus-ngsi][arcgis] Log json geometry before create instance and in errors related
- [cygnus-ngsi][arcgis] Fix CygnusRuntimeError due to Cannot invoke "java.util.List.size()" because "serverFeatures" is null (#2413)
- [cygnus-common][arcgis] toString of complex geometry is not returning equivalent input (#2418)
- [cygnus-ngsi][arcgis] Fix CygnusRuntimeError due to Cannot invoke "java.util.List.size()" because "serverFeatures" is null (#2413)
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,16 @@ public static Geometry createInstanceFromJson(JsonObject json) throws ArcgisExce
*/
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{ \"points\": [");
sb.append("[");
for (int i = 0; i < this.points.size(); i++) {
sb.append("[");
double[] array = points.get(i);
double[] array = points.get(i);
for (double value : array) {
sb.append(" ").append(value).append(",");
}
sb.setLength(sb.length() - 2);
sb.append(" ],");
}
sb.setLength(sb.length() - 2);
sb.append(" ]}");
sb.append(" ]");
return sb.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,21 @@ public static Geometry createInstanceFromJson(JsonObject json) throws ArcgisExce
*/
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{ \"paths\": [");
sb.append("[");
for (int i = 0; i < this.paths.size(); i++) {
List<double[]> innerList = this.paths.get(i);
sb.append("[");
for (int j = 0; j < innerList.size(); j++) {
sb.append(" [");
sb.append("[");
double[] array = innerList.get(j);
for (double value : array) {
sb.append(" ").append(value).append(",");
}
sb.append(" ]");
sb.setLength(sb.length() - 2);
sb.append(" ],");
}
sb.append(" ]");
}
sb.setLength(sb.length() - 2);
sb.append(" ]}");
sb.append(" ]");
return sb.toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,23 +144,21 @@ public static Geometry createInstanceFromJson(JsonObject json) throws ArcgisExce
*/
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{ \"rings\": [");
sb.append("[");
for (int i = 0; i < this.rings.size(); i++) {
List<double[]> innerList = this.rings.get(i);
sb.append("[");
for (int j = 0; j < innerList.size(); j++) {
sb.append(" [");
sb.append("[");
double[] array = innerList.get(j);
for (double value : array) {
sb.append(" ").append(value).append(",");
}
sb.append(" ]");
sb.setLength(sb.length() - 2);
sb.append(" ],");
}
sb.append(" ]");
}
sb.setLength(sb.length() - 2);
sb.append(" ]}");
sb.append(" ]");
return sb.toString();
}

Expand Down

0 comments on commit a6d9cb3

Please sign in to comment.