Changeset 10165 in josm for trunk/src/org
- Timestamp:
- 2016-04-29T13:57:56+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java
r8839 r10165 3 3 4 4 import java.io.StringWriter; 5 import java.math.BigDecimal; 6 import java.math.RoundingMode; 5 7 import java.util.HashMap; 6 8 import java.util.Iterator; … … 68 70 JsonObjectBuilder object = Json.createObjectBuilder() 69 71 .add("type", "FeatureCollection") 70 .add("crs", Json.createObjectBuilder().add("type", "name").add("name", projection.toCode())) 72 .add("crs", Json.createObjectBuilder().add("type", "name").add( 73 "properties", Json.createObjectBuilder().add("name", projection.toCode()))) 71 74 .add("generator", "JOSM"); 72 75 appendLayerBounds(layer.data, object); … … 119 122 120 123 private static JsonArrayBuilder getCoorArray(JsonArrayBuilder builder, EastNorth c) { 121 return builder.add(c.getX()).add(c.getY()); 124 return builder 125 .add(BigDecimal.valueOf(c.getX()).setScale(11, RoundingMode.HALF_UP)) 126 .add(BigDecimal.valueOf(c.getY()).setScale(11, RoundingMode.HALF_UP)) 127 ; 122 128 } 123 129
Note:
See TracChangeset
for help on using the changeset viewer.