|
@@ -28,7 +28,6 @@ public class VisionServiceImpl implements IVisionService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public List<GeoPoint> getPointLatAndLon(String num) {
|
|
public List<GeoPoint> getPointLatAndLon(String num) {
|
|
- List<Map<String, Object>> list = Lists.newArrayList();
|
|
|
|
String visionTxt = fYunFileService.getFileContent(String.format(UploadFilePath.IMG_VIEW_PATH, num) + "vision.txt");
|
|
String visionTxt = fYunFileService.getFileContent(String.format(UploadFilePath.IMG_VIEW_PATH, num) + "vision.txt");
|
|
JSONObject visionJson = JSON.parseObject(visionTxt);
|
|
JSONObject visionJson = JSON.parseObject(visionTxt);
|
|
if(!visionJson.containsKey("sweepLocations")){
|
|
if(!visionJson.containsKey("sweepLocations")){
|
|
@@ -42,26 +41,23 @@ public class VisionServiceImpl implements IVisionService {
|
|
Long uuid = sweepItem.getLong("uuid");
|
|
Long uuid = sweepItem.getLong("uuid");
|
|
JSONObject ggaLocation = sweepItem.getJSONObject("ggaLocation");
|
|
JSONObject ggaLocation = sweepItem.getJSONObject("ggaLocation");
|
|
GeoPoint geoPoint = new GeoPoint();
|
|
GeoPoint geoPoint = new GeoPoint();
|
|
|
|
+ geoPoint.setId(id);
|
|
|
|
+ geoPoint.setUuid(uuid);
|
|
if (Objects.nonNull(ggaLocation)
|
|
if (Objects.nonNull(ggaLocation)
|
|
&& StrUtil.isNotEmpty(ggaLocation.getString("lon"))
|
|
&& StrUtil.isNotEmpty(ggaLocation.getString("lon"))
|
|
&& StrUtil.isNotEmpty(ggaLocation.getString("lat"))
|
|
&& StrUtil.isNotEmpty(ggaLocation.getString("lat"))
|
|
&& StrUtil.isNotEmpty(ggaLocation.getString("alt"))) {
|
|
&& StrUtil.isNotEmpty(ggaLocation.getString("alt"))) {
|
|
- Map<String, Object> item = new HashMap<>();
|
|
|
|
- item.put("id", id);
|
|
|
|
- item.put("uuid", uuid);
|
|
|
|
- list.add(item);
|
|
|
|
Double[] ggaLocationGps = new Double[3];
|
|
Double[] ggaLocationGps = new Double[3];
|
|
- ggaLocationGps[0] = ggaLocation.getDouble("lon");
|
|
|
|
- ggaLocationGps[1] = ggaLocation.getDouble("lat");
|
|
|
|
- ggaLocationGps[2] = ggaLocation.getDouble("alt");
|
|
|
|
-
|
|
|
|
- geoPoint.setId(id);
|
|
|
|
- geoPoint.setUuid(uuid);
|
|
|
|
|
|
+ if(Objects.nonNull(ggaLocation.getDouble("lon"))
|
|
|
|
+ && Objects.nonNull(ggaLocation.getDouble("lat"))
|
|
|
|
+ && Objects.nonNull(ggaLocation.getDouble("alt"))){
|
|
|
|
+ ggaLocationGps[0] = ggaLocation.getDouble("lon");
|
|
|
|
+ ggaLocationGps[1] = ggaLocation.getDouble("lat");
|
|
|
|
+ ggaLocationGps[2] = ggaLocation.getDouble("alt");
|
|
|
|
+ }
|
|
geoPoint.setCoordinates(ggaLocationGps);
|
|
geoPoint.setCoordinates(ggaLocationGps);
|
|
geoPoint.setStatusIndicator(ggaLocation.getInteger("StatusIndicator"));
|
|
geoPoint.setStatusIndicator(ggaLocation.getInteger("StatusIndicator"));
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
if (sweepItem.containsKey("puck")){
|
|
if (sweepItem.containsKey("puck")){
|
|
JSONObject puck = sweepItem.getJSONObject("puck");
|
|
JSONObject puck = sweepItem.getJSONObject("puck");
|