|
@@ -26,17 +26,17 @@ public class GeoToolsUtil {
|
|
|
* @param pointLocal
|
|
|
*/
|
|
|
private static Point createPoint(ObjectNode pointLocal){
|
|
|
- Long x =0L;
|
|
|
- Long y =0L;
|
|
|
- Long z =0L;
|
|
|
+ double x =0.0D;
|
|
|
+ double y =0.0D;
|
|
|
+ double z =0.0D;
|
|
|
if(pointLocal.get("x") != null){
|
|
|
- x = pointLocal.get("x").longValue();
|
|
|
+ x = pointLocal.get("x").asDouble();
|
|
|
}
|
|
|
if(pointLocal.get("y") != null){
|
|
|
- y = pointLocal.get("y").longValue();
|
|
|
+ y = pointLocal.get("y").asDouble();
|
|
|
}
|
|
|
if(pointLocal.get("z") !=null){
|
|
|
- z = pointLocal.get("z").longValue();
|
|
|
+ z = pointLocal.get("z").asDouble();
|
|
|
}
|
|
|
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
|
|
|
Coordinate coord = new Coordinate(x, y,z);
|
|
@@ -52,17 +52,17 @@ public class GeoToolsUtil {
|
|
|
GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();
|
|
|
List<Coordinate> objects = new ArrayList<>();
|
|
|
for (ObjectNode outLine : outLines) {
|
|
|
- Long x = 0L;
|
|
|
- Long y = 0L;
|
|
|
- Long z = 0L;
|
|
|
+ double x = 0.0D;
|
|
|
+ double y = 0.0D;
|
|
|
+ double z = 0.0D;
|
|
|
if(outLine.get("x") != null){
|
|
|
- x =outLine.get("x").longValue();
|
|
|
+ x =outLine.get("x").asDouble();
|
|
|
}
|
|
|
if(outLine.get("y") != null){
|
|
|
- y = outLine.get("y").longValue();
|
|
|
+ y = outLine.get("y").asDouble();
|
|
|
}
|
|
|
if(outLine.get("z") !=null){
|
|
|
- z = outLine.get("z").longValue();
|
|
|
+ z = outLine.get("z").asDouble();
|
|
|
}
|
|
|
Coordinate coordinate = new Coordinate(x, y, z);
|
|
|
objects.add(coordinate);
|