]> git.argeo.org Git - gpl/argeo-suite.git/blob - org.argeo.app.core/src/org/argeo/app/geo/GeoJsonUtils.java
Instrument image utils
[gpl/argeo-suite.git] / org.argeo.app.core / src / org / argeo / app / geo / GeoJsonUtils.java
1 package org.argeo.app.geo;
2
3 import java.util.Map;
4
5 import com.fasterxml.jackson.databind.JsonNode;
6 import com.fasterxml.jackson.databind.node.ObjectNode;
7
8 /** Geo data utilities. */
9 public class GeoJsonUtils {
10
11 /** Add these properties to all features. */
12 public static void addProperties(JsonNode tree, Map<String, String> map) {
13 for (JsonNode feature : tree.get("features")) {
14 ObjectNode properties = (ObjectNode) feature.get("properties");
15 for (String key : map.keySet()) {
16 properties.put(key, map.get(key));
17 }
18 }
19 }
20
21 /** Singleton. */
22 private GeoJsonUtils() {
23 }
24 }