| | |
| | | func GetPolygons(cameraId string) []protomsg.CameraPolygon { |
| | | var cameraPolygons []protomsg.CameraPolygon |
| | | cameraPolygons = cache.GetPolygonsByCameraId(cameraId) |
| | | |
| | | logger.Debug("------=======查看下全部区域:",cameraPolygons) |
| | | return cameraPolygons |
| | | } |
| | | |
| | |
| | | // 将字符串格式的坐标序列化为Point格式 |
| | | func Json2points(areaPoints string) []Point { |
| | | var pts []Point |
| | | logger.Error("=========打印下区域数据:",areaPoints) |
| | | if areaPoints == "" { |
| | | if areaPoints == "[]" { |
| | | logger.Error("=====================此区域为全部区域") |
| | | pts = append(pts, Point{0, 0}) |
| | | pts = append(pts, Point{0, 540}) |