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
package fence;
import java.awt.geom.Point2D;
import java.util.Vector;
 
import PbuliClass.IsPtInPoly;
import person.Person;
import person.person_Dell;
import tbDataModel.TbFence;
 
/**ÅжϵãÊÇ·ñÔÚÊÓÆµÇøÓò*/
public class PointIsInShiping {
    public  static  void is_in_shiping(
            Vector<TbFence> shipingfences,
            int size,
            String tagid,
            String intime,
            int x,
            int y,
            String floor,
            Point2D.Double point
            ) {
 
        //Èç¹û¸Ã±êÇ©²»´øGPS¶¨Î»¹¦ÄÜÔò·µ»Ø
        Person person=person_Dell.get_Person(tagid);
        if(person==null) {
            return;
        }
 
        
        for(int i=0;i<size;i++) {            
            TbFence tbfenc=shipingfences.get(i);            
            //ÅжÏID×ø±êÊÇ·ñÔÚΧÀ¸ÇøÓòÄÚ            
            boolean isin=IsPtInPoly.inPoly(point, tbfenc.getPts());
            String name=tbfenc.getName();
            //ÔÚÇøÓòÄÚÔòÖ´ÐÐ
            if(isin) {                
                person_Dell.alart_shiping(tagid,"1",name);
                return;
            }
        }
        
        person_Dell.alart_shiping(tagid,"0","");
 
    }
}