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
49
50
51
package fence;
import java.awt.geom.Point2D;
 
import PbuliClass.IsPtInPoly;
import tag.Tag;
import tag.Tag_Dell;
import tbDataModel.TbFence;
import urt.Dell_gps;
 
/**GPSÇл»ÇøÓò*/
public class PointIsInGps {
 
    /**±êÇ©½øÈëÁËÇл»ÇøÓò*/
    public static void tag_in_gps_fence(String tagid,String intime,Point2D.Double point,String floor) {
        //Èç¹û¸Ã±êÇ©²»´øGPS¶¨Î»¹¦ÄÜÔò·µ»Ø
        if(Dell_gps.get_tb_gps(tagid) ==null) {
            return;
        }
        //Èç¹ûGPSÇл»ÇøÓò´æÔÚ
        int size=Fences.get_fence_vector("Çл»ÇøÓò").size();
        if(size!=0) {            
            for(int i=0;i<size;i++) {
                TbFence tbfenc=Fences.get_fence_vector("Çл»ÇøÓò").get(i);
 
                //ÅжÏID×ø±êÊÇ·ñÔÚΧÀ¸ÇøÓòÄÚ
                boolean ingps=IsPtInPoly.inPoly(point, tbfenc.getPts());
                Tag tag=Tag_Dell.get_tag(tagid);
                
                //±êÇ©ÊÇ·ñÔÚÊÒÄÚ¶¨Î»ÇøÓò
                int indoor=tag.getTag_indoor_dingwei();
                
                //Èç¹û±êÇ©½øÈëÁËGPSÇл»ÇøÓò
                if(ingps) {
                    tag.setTag_in_gpsqiehuan(1);
                    //Èç¹û±êÇ©½øÈëGPSÇл»ÇøÓò֮ǰÔÚÊÒÄÚÇøÓò¾ÍÐèÒª¿ªÆôGPS¶¨Î»¹¦ÄÜͬʱ½«ÔÚÊÒÄÚÇøÓòÇл»Îª0
                    if(indoor==1) {                        
                        tag.setTag_indoor_dingwei(0);
                    }
                }else {
                    tag.setTag_in_gpsqiehuan(0);
                }
                tag=null;
                tbfenc=null;
            }
 
 
 
        }
    }
 
}