From 110809db132446d2fa5ed2986f1ec2ce755b5b13 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 17 十月 2025 14:11:53 +0800
Subject: [PATCH] 项目管理代码生成,案件分类
---
ruoyi-admin/src/main/java/com/ruoyi/web/util/MainApp.java | 31 -------------------------------
1 files changed, 0 insertions(+), 31 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/util/MainApp.java b/ruoyi-admin/src/main/java/com/ruoyi/web/util/MainApp.java
index e48c99c..0d4805d 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/util/MainApp.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/util/MainApp.java
@@ -8,36 +8,5 @@
import java.util.List;
public class MainApp {
- public static void main(String[] args) {
- double startLat = 39.9042;
- double startLon = 118.4074;
- double endLat = 39.9042;
- double endLon = 119.4074;
- double userLat = 39.9042;
- double userLon = 116.4074;
-
- double radius = 50; // 单位:米
- int segments = 4; // 四段,共 5 个点
- try {
- String routeJson = AmapApiClient.getDrivingRoute(startLat, startLon, endLat, endLon);
- // 转化为json对象
- JSONObject jsonObject = JSONObject.parseObject(routeJson);
- JSONObject route = jsonObject.getJSONObject("route");
- JSONArray paths = route.getJSONArray("paths");
- JSONObject o = (JSONObject)paths.get(0);
- BigDecimal distance = o.getBigDecimal("distance");
- System.err.println( paths);
-
- List<double[]> fivePoints = PathParser.parseAndInterpolate(routeJson, segments,startLat, startLon, endLat, endLon);
-
- if (GeoChecker.isInAnyCircle(userLat, userLon, fivePoints, radius)) {
- System.out.println("✅ 成功!您位于某个圆形电子围栏范围内。");
- } else {
- System.out.println("❌ 失败!您不在任何圆形电子围栏范围内。");
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
}
--
Gitblit v1.7.1