There is a missing part in example 3. self is unknown. As @KHibma stated, it might be a part of a bigger project, probably a Python tool.
I am not able to test right now, but removing selfs and specifying aprx would solve the problem if you don't make a python tool.
Try in this way:
aprx = arcpy.mp.ArcGISProject(r"C:\path\to\file.aprx")...
This question is typically answered by using the Cost Distance tool, it allows you to measure distance taking into consideration other cost surfaces, in your case your DEM. The help file has much information on how to run these tools and their inputs.
The correct way to perform shortest path is to use Travelling Salesman algorithm, ( as per FelixIP comment) - which has been implemented in ArcGIS in the Network Analyst extension.
You would need to create some network data first though, this could ...
The Intelligence toolbar is an additional Esri Solution that you can choose to install when installing ArcGIS Pro (but which is not installed by default). According to this Esri documentation while going through the installation process for Pro there should be an option to also choose to install ArcGIS Pro Intelligence.
An alternative repeatable process is to using the Spatial Analyst tool Euclidean Allocation
Convert you vector network dataset into a raster using the Polyline to Raster tool. The value field should be the field that is grouping your polylines into their respective sub-networks, i.e. the field you are colour coding your data by. Use a sensible cell size, I ...
What steps or tools could I use to create a point that lies within that polygon and is as far as possible from the edges of that polygon?
I can think of two workarounds but a better solution likely exists.
Run a Euclidean Distance from the Polygon at 1 m or less resolution (convert to a line is likely needed). Then Extract by Mask the euclidean distance ...
ArcGIS Pro keyboard shortcuts also has a link to a PDF you can print out:
This is a complete list of keyboard shortcuts available in ArcGIS Pro
and is updated at every software release. A PDF version can be
downloaded from https://links.esri.com/arcgis-pro-shortcuts but may
not include the most recent updates.
The field names contain spaces, which are non standard characters. Those special characters often cause problems, so you should either completely remove the space between X/Y and Coordinates, or replace it with "_" e.g. XCoordinates or X
As Vince noted, the raster has the wrong CRS attached to it. Looking at the extents, one can guess that the values are in degrees and not in meters and they actually correspond to the extents of Colorado which is 37 to 41 N and 102 to 109W. The solution is to attach a geographic coordinate system to the raster such as WGS84 (or GRS1980) and then reproject to ...
You want to use the Con (Conditional) tool, either standalone or within the Raster Calculator to put together a statement roughly like Con(elevation<1000 AND landuse==X, true_output, false output). There are a handful of different ways you can phrase the same query depending on which tool you use, so treat my syntax with a grain of salt. This Esri blog ...
Edited casting m.listLayers to variable l, just directly used m.listlayers (line 1). Also needed to utilize the sym.updateRenderer function to change the layer symbology. Code below.
for lyr in m.listLayers():
sym = lyr.symbology
if hasattr(sym, 'renderer'):
if sym.renderer.type ...
If you Union the two layers you will have a new layer with separate polygons for each combination of soil and watershed. As a simple example, three soil layers spread across two neighboring watersheds would results in six new polygons: SoilA_WaterA, SoilA_WaterB, SoilB_WaterA, SoilB_WaterB, SoilC_WaterA, and SoilC_WaterB.
You can then calculate the area of ...
"Old-style" search cursors are an artifact of the past. All supported versions of ArcGIS Desktop and Server offer Data Access cursors, which are faster and more Pythonic (list-oriented).
This is one way to rewrite your code, though there are options for faster runtime execution if you know that the number of IDs to be added is a relatively small ...