| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // 被检测的经纬度点 |
| | | Point point= new Point(126.649261,45.687377); |
| | | // 商业区域(百度多边形区域经纬度集合) |
| | | List<Point> partitionLocation = new ArrayList<>(); |
| | | partitionLocation.add(new Point(126.64459,45.688548)); |
| | | partitionLocation.add(new Point(126.653376,45.68938)); |
| | | partitionLocation.add(new Point(126.645776,45.685048)); |
| | | partitionLocation.add(new Point(126.654184,45.685778)); |
| | | System.out.println(isInPolygon(point,partitionLocation)); |
| | | // // 被检测的经纬度点 |
| | | // Point point= new Point(126.649261,45.687377); |
| | | // // 商业区域(百度多边形区域经纬度集合) |
| | | // List<Point> partitionLocation = new ArrayList<>(); |
| | | // partitionLocation.add(new Point(126.64459,45.688548)); |
| | | // partitionLocation.add(new Point(126.653376,45.68938)); |
| | | // partitionLocation.add(new Point(126.645776,45.685048)); |
| | | // partitionLocation.add(new Point(126.654184,45.685778)); |
| | | // System.out.println(isInPolygon(point,partitionLocation)); |
| | | } |
| | | |
| | | /** |