Hi there, I am exploring the use of GIS to map the location of each CCTV camera that is mounted on building. I was able to geocoded each CCTV camera location on 2D map however would like to seek your opinion on the following:Q1: I noticed there is limitation of using ArcGIS desktop to auto create the viewing area (this would be a polygon form) from each planted camera. May I know is there a third party software/any script I can use to generate the viewing coverage from each camera, the viewing coverage looks like a cone shape. Look forward to hearing any further sharing, thanks. See the attached images. [ATTACH=CONFIG]23493[/ATTACH][ATTACH=CONFIG]23494[/ATTACH][ATTACH=CONFIG]23493[/ATTACH]
This is not much unlike mapping Cell Phone Tower quadrants and/or other Radio Antenna broadcast coverage or other viewshed analyses. There is also a plume modeling extension from NOAA called Aloha that you might want to check out as well.
from math import radians, sin, cos import pprint import arcpy arcpy.env.overwriteOutput = True arcpy.env.workspace = r'C:\gis\cellTowers\missedTowers.gdb' def getEndXY(origin_x, origin_y, distance, angle): (disp_x, disp_y) = (distance * sin(radians(angle)),\ distance * cos(radians(angle))) (end_x, end_y) = (origin_x + disp_x, origin_y + disp_y) return end_x, end_y def makeCellSector(startX, startY, azimuth): distance = 15000 offsetAzimuthA = azimuth - (60) offsetAzimuthB = azimuth + (60) arcpy.CreateFeatureclass_management( 'in_memory', 'temp', 'Polygon') cur = arcpy.InsertCursor('in_memory\\temp') polyArray = arcpy.Array() start = arcpy.Point() (start.ID, start.X, start.Y) = (1, startX, startY) polyArray.add(start) a = arcpy.Point() ax , ay = getEndXY(startX, startY, distance, offsetAzimuthA) (a.ID, a.X, a.Y) = (2, ax, ay) polyArray.add(a) b = arcpy.Point() bx, by= getEndXY(startX, startY, distance, offsetAzimuthB) (b.ID, b.X, b.Y) = (3, bx, by) polyArray.add(b) close = arcpy.Point() (close.ID, close.X, close.Y) = (4, startX, startY) polyArray.add(close) feat = cur.newRow() feat.shape = polyArray cur.insertRow(feat) polyArray.removeAll() del cur towers = {} fields = ['CellNumber', 'Sector', 'City', 'Azimuthdeg', 'POINT_X', 'POINT_Y'] with arcpy.da.SearchCursor('missedTowers', fields) as c: for r in c: towers[r[0], r[1], r[2]] = r[3],r[4],r[5] for k, v in towers.iteritems(): print k print v arcpy.MakeFeatureLayer_management('missedTowers', 'towerLyr', '"CellNumber" = ' + str(int(k[0])) + ' AND "City" = ' + "'" + k[2] +"'") arcpy.Buffer_analysis('towerLyr', 'in_memory\\buffer', '1 mile') arcpy.DeleteIdentical_management('in_memory\\buffer', 'Shape') makeCellSector(v[1], v[2], v[0]) print 'made sector' name = k[2] + '_' +str(int(k[0])) + '_' + k[1] arcpy.Intersect_analysis(['in_memory\\buffer', 'in_memory\\temp'], name, 'ONLY_FID', '#', 'INPUT') print 'intersect complete' arcpy.Delete_management('towerLyr') arcpy.Delete_management('in_memory\\temp') arcpy.Delete_management('in_memory\\buffer')
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.