Fish Habitat Tool

4231
6
02-01-2015 06:23 AM
JodyCamille
New Contributor II

In ArcToolbox, there is a Fish Habitat toolbox with a SnapAndSplit tool, but when I open that tool I get the message "This tool has no parameters." I was hoping I would be able to use this tool to measure distances between successive tracking locations for a fish along several rivers where the fish's movement was tracked.

 

Thanks for any help you can give.

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

That toolbox is not one that comes with arcmap.  It is a custom toolbox that is obviously in need of repair by the person that created it.  If there is a python script, and you are adept in things pythonesque, you could probably edit the toolbox to provide the parameters needed by examine the script.  If not, contact the person that created it or...just remove it since it will be of no use to you

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Hi Jody,

The SnapAndSplit tool (Fish Habitat Toolbox) is a customized tool, where the model doesn't have a parameter defined.

You could try opening it in a model builder by following the necessary steps.

1. In ArcCatalog, go to the drive location of the Fish Habitat Toolbox (*Check its properties).

2. Expand the toolbox > Right-click on SnapAndSplit Tool > Edit

Once it is open in a model builder, you could make the necessary changes, and run the tool.

Thanks,

Jay



Think Location
0 Kudos
JayantaPoddar
MVP Esteemed Contributor

To calculate the distance of successive points (I assume they are in order, and your location points are in projected coordinate system), you could follow the given steps.

1. Add a field in Attribute Table (Datatype: Double).

2. Open Field Calculator (Make sure none of the features selected).

3. Parser > Click on Python

4. Check Show Codeblock

5. Under pre-logic script code, paste the following code.

count = 0
def dist(shape):
  global prev
  global count
  point = arcpy.PointGeometry(shape.getPart(0))
  if count > 0:
       distance = point.distanceTo(prev)
  else:
       distance = 0
  prev = point
  count = count+1
  return distance

6. Under <Fieldname> = , paste the following code.

dist( !Shape! )

Hope it works as you desire (It worked fine with ArcMap 10.1).

Thanks,

Jay



Think Location
0 Kudos
DanPatterson_Retired
MVP Emeritus

Your code requires proper indentation, use the advanced editor and select python syntax after highlightlng the code block

JodyCamille
New Contributor II

Thanks, Jay. The fish location points are in order and they are in a projected coordinate system. The river (polyline) is in the same projected coordinate system.

If I calculate in a distance field of the fish location attribute table using your code, is a Euclidean distance calculated? I need to calculate the distance between successive points along the river.

Jody

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Hi Jody,

For this you can use linear referencing. First convert the River polylines to routes using the create Route tool ArcGIS Help (10.2, 10.2.1, and 10.2.2) , and then use the Locate features along routes tool ArcGIS Help (10.2, 10.2.1, and 10.2.2) to write the route and measure information to a new event table.

Note: Use the measurements same as the unit of the coordinate system of your map.

Thanks,

Jay



Think Location
0 Kudos