zsh_root
2024-01-02 7b595546af704983dbafcd0d385c8768ddacefc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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);
        }
 
    }
 
}