We have polygon maps of river-bottom type and are interested in determining if particular bottom-feeding fish prefer one bottom type over another. We locate an acoustically tagged fish at a point in time using a boat with an acoustic array. We have a measure of confidence of the location, but the measure of confidence is not a circle; it is more pie-shaped; i.e. we know that the fish is located in front of the boat in a semi-circle of know radius. We would like to create a semi-circular polygon at each location point with the semi-circular diameter perpendicular to the boat heading. We would like to use the resulting semi-circular polygons to clip out pieces of the underlying bottom type map. I am looking for a procedure in ArcGIS that would allow me to create these oriented semicircles given a table of locations and boat headings.

| improve this question | | | | |
  • 1
    Please structure questions as standalone entities for which one correct answer exists. It's okay to reference another question in the body with a link, but each question should be free-standing. "Any thoughts" is too unbounded to be answerable within the GSE Q/A format. – Vince Feb 17 '15 at 19:02
  • 1
    Welcome to gis.stackexchange! Please note that a good question on this site is expected to show some degree of research on your part, i.e. what you have tried and code so far. For more info, you can check our faq. – underdark Feb 17 '15 at 19:49

This arcpy script should get you most of the way there. The basic logic is: for each point in layer "points", create a circular buffer (radius = buffRad) and a slightly larger triangle pointing backwards from the point according to value in "bearing" field. Remove the portion of the circle within the triangle. There is a strong likelihood that you will have to play around with the number of degrees (+/- 90) to fit with your bearings.

>>> import math
... buffs = []
... buffRad = 1000
... sr = arcpy.Describe("points").spatialReference
... with arcpy.da.SearchCursor("points",["SHAPE@","bearing"],spatial_reference=sr) as cursor:
...     for row in cursor:
...         buff = row[0].buffer(buffRad)
...         angFL = row[1]
...         dxFL = math.cos(math.radians(angFL)) * buffRad * 1.5
...         dyFL = math.sin(math.radians(angFL)) * buffRad * 1.5
...         ptFL = arcpy.PointGeometry(arcpy.Point(row[0].centroid.X - dxFL, row[0].centroid.Y - dyFL))
...         angFR = row[1] + 180
...         dxFR = math.cos(math.radians(angFR)) * buffRad * 1.5 
...         dyFR = math.sin(math.radians(angFR)) * buffRad * 1.5 
...         ptFR = arcpy.PointGeometry(arcpy.Point(row[0].centroid.X - dxFR, row[0].centroid.Y - dyFR))
...         angB = row[1] - 90
...         dxB = math.cos(math.radians(angB)) * buffRad * 1.5 
...         dyB = math.sin(math.radians(angB)) * buffRad * 1.5 
...         ptB = arcpy.PointGeometry(arcpy.Point(row[0].centroid.X - dxB, row[0].centroid.Y - dyB))
...         triangle = arcpy.Polygon(arcpy.Array([arcpy.Point(ptFL.centroid.X,ptFL.centroid.Y),arcpy.Point(ptFR.centroid.X,ptFR.centroid.Y),arcpy.Point(ptB.centroid.X,ptB.centroid.Y)]),sr)
...         semicircle = buff.difference(triangle)
...         buffs.append(semicircle)
... arcpy.CopyFeatures_management(buffs,r'in_memory\buffs')

enter image description here

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.