diff --git a/src/main/java/osm/surveyor/task/tools/Jpmesh.java b/src/main/java/osm/surveyor/task/tools/Jpmesh.java index 6306c69..f079f3b 100644 --- a/src/main/java/osm/surveyor/task/tools/Jpmesh.java +++ b/src/main/java/osm/surveyor/task/tools/Jpmesh.java @@ -16,6 +16,7 @@ * @param level 取得するメッシュコードのレベル[1,2,3] * @return */ + @SuppressWarnings("deprecation") public static String getMesh(double lon, double lat, int level) { if (level < 1) { return null; diff --git a/src/main/java/osm/surveyor/task/tools/MeshlistConverter.java b/src/main/java/osm/surveyor/task/tools/MeshlistConverter.java index 5b7d8b8..c92af33 100644 --- a/src/main/java/osm/surveyor/task/tools/MeshlistConverter.java +++ b/src/main/java/osm/surveyor/task/tools/MeshlistConverter.java @@ -48,6 +48,7 @@ * @param args * @throws IOException */ + @SuppressWarnings({ "deprecation", "removal" }) private void proc(String sourceName) throws IOException { ObjectMapper mapper = new ObjectMapper(); JsonNode node = mapper.readTree(Paths.get(sourceName).toFile()); diff --git a/src/main/java/osm/surveyor/task/tools/model/JsonMesh.java b/src/main/java/osm/surveyor/task/tools/model/JsonMesh.java index 38eef9c..828ccdc 100644 --- a/src/main/java/osm/surveyor/task/tools/model/JsonMesh.java +++ b/src/main/java/osm/surveyor/task/tools/model/JsonMesh.java @@ -19,6 +19,30 @@ private Long meshcode; + public Long getCitycode() { + return citycode; + } + + public void setCitycode(Long citycode) { + this.citycode = citycode; + } + + public String getCityname() { + return cityname; + } + + public void setCityname(String cityname) { + this.cityname = cityname; + } + + public Long getMeshcode() { + return meshcode; + } + + public void setMeshcode(Long meshcode) { + this.meshcode = meshcode; + } + public String toString() { StringBuffer sb = new StringBuffer(); boolean c = false; diff --git a/src/main/java/osm/surveyor/task/tools/model/JsonPref.java b/src/main/java/osm/surveyor/task/tools/model/JsonPref.java index 8097798..1818890 100644 --- a/src/main/java/osm/surveyor/task/tools/model/JsonPref.java +++ b/src/main/java/osm/surveyor/task/tools/model/JsonPref.java @@ -18,8 +18,32 @@ private String prefname; + public int getPrefcode() { + return prefcode; + } + + public Point getPoint() { + return point; + } + + public void setPoint(Point point) { + this.point = point; + } + + public void setPrefcode(int prefcode) { + this.prefcode = prefcode; + } + private Point point; + public String getPrefname() { + return prefname; + } + + public void setPrefname(String prefname) { + this.prefname = prefname; + } + public String toString() { StringBuffer sb = new StringBuffer(); boolean c = false; diff --git a/src/main/java/osm/surveyor/task/tools/model/MeshlistJson.java b/src/main/java/osm/surveyor/task/tools/model/MeshlistJson.java index 34f0dff..dc18246 100644 --- a/src/main/java/osm/surveyor/task/tools/model/MeshlistJson.java +++ b/src/main/java/osm/surveyor/task/tools/model/MeshlistJson.java @@ -26,10 +26,31 @@ public class MeshlistJson extends JsonTemple { private Long prefcode; + public void setPrefcode(Long prefcode) { + this.prefcode = prefcode; + } + + public void setPrefname(String prefname) { + this.prefname = prefname; + } + + public void setMeshlist(List meshlist) { + this.meshlist = meshlist; + } + + public Long getPrefcode() { + return this.prefcode; + } private String prefname; + public String getPrefname() { + return this.prefname; + } private List meshlist = new ArrayList<>(); + public List getMeshlist() { + return this.meshlist; + } public String toString() { StringBuffer sb = new StringBuffer(); diff --git a/src/main/java/osm/surveyor/task/tools/model/PreflistJson.java b/src/main/java/osm/surveyor/task/tools/model/PreflistJson.java index 32727c9..75e9a1f 100644 --- a/src/main/java/osm/surveyor/task/tools/model/PreflistJson.java +++ b/src/main/java/osm/surveyor/task/tools/model/PreflistJson.java @@ -28,6 +28,14 @@ return sb.toString(); } + public List getPreflist() { + return preflist; + } + + public void setPreflist(List preflist) { + this.preflist = preflist; + } + public void parse(JsonNode node) { JsonNode f = node.get("preflist"); if (f != null) { diff --git a/src/main/java/osm/surveyor/task/util/Geojson.java b/src/main/java/osm/surveyor/task/util/Geojson.java index 9ae0c21..1304db1 100644 --- a/src/main/java/osm/surveyor/task/util/Geojson.java +++ b/src/main/java/osm/surveyor/task/util/Geojson.java @@ -13,9 +13,24 @@ public class Geojson extends JsonTemple { private String type = "FeatureCollection"; + public void setType(String v) { + this.type = v; + } + public JsonCrs getCrs() { + return crs; + } + + public void setCrs(JsonCrs crs) { + this.crs = crs; + } + private JsonCrs crs; + public List getFeatures() { + return features; + } + private List features = new ArrayList<>(); public String toString() { diff --git a/src/main/java/osm/surveyor/task/util/JsonCrs.java b/src/main/java/osm/surveyor/task/util/JsonCrs.java index 643e210..15a1e68 100644 --- a/src/main/java/osm/surveyor/task/util/JsonCrs.java +++ b/src/main/java/osm/surveyor/task/util/JsonCrs.java @@ -18,7 +18,11 @@ public class JsonCrs extends JsonTemple { private String type = "name"; + private JsonProperties properties; + public void setProperties(JsonProperties prop) { + this.properties = prop; + } public String toString() { StringBuffer sb = new StringBuffer(); @@ -39,4 +43,8 @@ this.properties.parse(node1); } } + + public void setType(String type) { + this.type = type; + } } diff --git a/src/main/java/osm/surveyor/task/util/JsonFeature.java b/src/main/java/osm/surveyor/task/util/JsonFeature.java index ab9d05c..1d28ea2 100644 --- a/src/main/java/osm/surveyor/task/util/JsonFeature.java +++ b/src/main/java/osm/surveyor/task/util/JsonFeature.java @@ -32,6 +32,38 @@ @Getter @Setter public class JsonFeature extends JsonTemple { + public JsonGeometryPoint getGeometryPoint() { + return geometryPoint; + } + + public void setGeometryPoint(JsonGeometryPoint geometryPoint) { + this.geometryPoint = geometryPoint; + } + + public JsonGeometryLine getGeometryLine() { + return geometryLine; + } + + public void setGeometryLine(JsonGeometryLine geometryLine) { + this.geometryLine = geometryLine; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public JsonProperties getProperties() { + return properties; + } + + public void setProperties(JsonProperties properties) { + this.properties = properties; + } + private JsonGeometryPoint geometryPoint; private JsonGeometryLine geometryLine; diff --git a/src/main/java/osm/surveyor/task/util/JsonGeometryLine.java b/src/main/java/osm/surveyor/task/util/JsonGeometryLine.java index 982e981..94b5f10 100644 --- a/src/main/java/osm/surveyor/task/util/JsonGeometryLine.java +++ b/src/main/java/osm/surveyor/task/util/JsonGeometryLine.java @@ -32,6 +32,10 @@ private String type = "LineString"; + public String getType() { + return type; + } + public void setMeshcode(String code) { DirectPosition2D ret = Jpmesh.getPosition(code); putPoint(ret.getX(), ret.getY()); diff --git a/src/main/java/osm/surveyor/task/util/JsonGeometryPoint.java b/src/main/java/osm/surveyor/task/util/JsonGeometryPoint.java index 059601e..3b3ee3a 100644 --- a/src/main/java/osm/surveyor/task/util/JsonGeometryPoint.java +++ b/src/main/java/osm/surveyor/task/util/JsonGeometryPoint.java @@ -40,4 +40,12 @@ this.coordinates.parse(node1); } } + + public Point getCoordinates() { + return coordinates; + } + + public void setCoordinates(Point coordinates) { + this.coordinates = coordinates; + } } diff --git a/src/main/java/osm/surveyor/task/util/JsonProperties.java b/src/main/java/osm/surveyor/task/util/JsonProperties.java index 30c8a36..078c4ac 100644 --- a/src/main/java/osm/surveyor/task/util/JsonProperties.java +++ b/src/main/java/osm/surveyor/task/util/JsonProperties.java @@ -14,14 +14,64 @@ * } */ private String name; + public void setName(String str ) { + this.name = str; + } + + public void setCitycode(Long citycode) { + this.citycode = citycode; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + private String path; private String id; private String version; + private Long prefcode; + public long getPrefcode() { + return this.prefcode.longValue(); + } + public void setPrefcode(long code) { + this.prefcode = Long.valueOf(code); + } + private String prefname; + public String getPrefname() { + return this.prefname; + } + public void setPrefname(String v) { + this.prefname = v; + } + + public void setMeshcode(Long meshcode) { + this.meshcode = meshcode; + } + + public void setCityname(String cityname) { + this.cityname = cityname; + } + private Long citycode; + public long getCitycode() { + return this.citycode.longValue(); + } + private String cityname; + public String getCityname() { + return this.cityname; + } + private Long meshcode; + public long getMeshcode() { + return this.meshcode.longValue(); + } public String toString() { StringBuffer sb = new StringBuffer(); diff --git a/src/main/java/osm/surveyor/task/util/Point.java b/src/main/java/osm/surveyor/task/util/Point.java index e813ccc..c2dc148 100644 --- a/src/main/java/osm/surveyor/task/util/Point.java +++ b/src/main/java/osm/surveyor/task/util/Point.java @@ -21,10 +21,19 @@ this.lng = str; } + @SuppressWarnings("deprecation") public void setLng(double d) { setLng(new BigDecimal(d).setScale(5, BigDecimal.ROUND_HALF_UP)); } + public String getLng() { + return lng; + } + + public String getLat() { + return lat; + } + public void setLng(BigDecimal dec) { this.lng = dec.toString(); } @@ -33,6 +42,7 @@ this.lat = str; } + @SuppressWarnings("deprecation") public void setLat(double d) { setLat(new BigDecimal(d).setScale(6, BigDecimal.ROUND_HALF_UP)); }