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;
|
}
|
|
|
|
}
|
}
|
|
}
|