1. 首页
  2. 编程语言
  3. Java
  4. 判断点是否在封闭图形

判断点是否在封闭图形

上传者: 2018-12-20 21:15:12上传 JAVA文件 7.07KB 热度 87次
封闭图形是有一串左边表示,判断一个坐标是在封闭图形什么位置 String s5="[{\"mapLat\":1,\"mapLng\":2},{\"mapLat\":3,\"mapLng\":5},{\"mapLat\":8,\"mapLng\":5},{\"mapLat\":5,\"mapLng\":3},{\"mapLat\":8,\"mapLng\":2},{\"mapLat\":4,\"mapLng\":1}]"; System.out.println(judger1.isInPolygon("3", "2", s5)); System.out.println(judger1.isInPolygon("4", "5", s5)); System.out.pr intln(judger1.isInPolygon("2", "1", s5)); System.out.println(judger1.isInPolygon("6", "2", s5)); System.out.println(judger1.isInPolygon("7", "3", s5));
下载地址
用户评论