package fence;
|
import java.awt.geom.Point2D;
|
import java.util.Vector;
|
|
import Method.BaoWenShow;
|
import PbuliClass.IsPtInPoly;
|
import person.Person;
|
import person.person_Dell;
|
import tbDataModel.TbFence;
|
|
/**ÅжϵãÊDz»ÊÇÔÚGPS×ø±êµÄÊÒÄÚ*/
|
public class Point_inshinei_gps {
|
//ÊÒÄÚÇøÓòµÄ¼¯ºÏ
|
static Vector<TbFence> shinei_fence_vc=Fences.get_fence_vector("ÊÒÄÚÇøÓò");
|
static int snsize=shinei_fence_vc.size();
|
|
|
public static void is_in_shinei(
|
String tagid,
|
double jd,
|
double wd) {
|
|
if(snsize !=0) {
|
Person person=person_Dell.get_Person(tagid);
|
if(person==null) {
|
return;
|
}
|
Point2D.Double point=new Point2D.Double(jd,wd);
|
//Èç¹ûÊÒÄÚÇøÓò´æÔÚ
|
for(int i=0;i<snsize;i++) {
|
TbFence tbfenc=shinei_fence_vc.get(i);
|
String fencename=tbfenc.getName();
|
//ÅжÏID×ø±êÊÇ·ñÔÚΧÀ¸ÇøÓòÄÚ
|
boolean isin=IsPtInPoly.inPoly(point, tbfenc.getPts());
|
if(isin) {
|
String hex=tagid+",ÔÚ"+fencename+"ÊÒÄÚ"+jd+", "+wd;
|
BaoWenShow.ok_tagid("2", "debug",hex, "127.0.0.1",tagid);
|
return;
|
}
|
}
|
|
String hex=tagid+",ÊÒÍâ"+jd+", "+wd;
|
BaoWenShow.ok_tagid("2", "debug",hex, "127.0.0.1",tagid);
|
}
|
|
}
|
|
}
|