# data[].attributes.attachment_link.readable_text
# Name: Erase.py # Description: Find areas of suitable vegetation that exclude areas heavily # impacted by major roads # import system modules import arcpy # Set environment settings arcpy.env.workspace = "C:/data/Habitat_Analysis.gdb" # Select suitable vegetation patches from all vegetation veg = "vegtype" suitableVeg = "C:/output/Output.gdb/suitable_vegetation" whereClause = "HABITAT = 1" arcpy.Select_analysis(veg, suitableVeg, whereClause) # Buffer areas of impact around major roads roads = "majorrds" roadsBuffer = "C:/output/Output.gdb/buffer_output" distanceField = "Distance" dissolveField = "Distance" arcpy.Buffer_analysis(roads, roadsBuffer, distanceField, "FULL", "ROUND", "LIST", dissolveField) # Erase areas of impact around major roads from the suitable vegetation patches eraseOutput = "C:/output/Output.gdb/suitable_vegetation_minus_roads" arcpy.Erase_analysis(suitableVeg, roadsBuffer, eraseOutput)

# data[].attributes.attachment_link.description
Name: Erase.py # Description: Find areas of suitable vegetation that exclude areas heavily # impacted by major roads # import system modules import arcpy # Set environment settings arcpy.env.workspace = "C:/data/Habitat_Analysis.gdb" # Select suitable vegetation patches from all vegetation veg = "vegtype" suitableVeg = "C:/output/Output.gdb/suitable_vegetation" whereClause = "HABITAT = 1" arcpy.Select_analysis(veg, suitableVeg, whereClause) # Buffer areas of impact around major roads roads = "majorrds" roadsBuffer = "C:/output/Output.gdb/buffer_output" distanceField = "Distance" dissolveField = "Distance" arcpy.Buffer_analysis(roads, roadsBuffer, distanceField, "FULL", "ROUND", "LIST", dissolveField) # Erase areas of impact around major roads from the suitable vegetation patches eraseOutput = "C:/output/Output.gdb/suitable_vegetation_minus_roads" arcpy.Erase_analysis(suitableVeg, roadsBuffer, eraseOutput)

# data[].attributes.body
Question 3 mentions 'Week 7 handout'. It is actually **WEEK 5** handout

# data[].attributes.headline
Multipart to singlepart lines (Assignment 2: Part 1)

# data[].attributes.subject
Multipart to singlepart lines (Assignment 2: Part 1)

# data[].attributes.attachment_link.readable_text
# Name: MultipartToSinglepart_Example2.py # Description: Break all multipart features into singlepart features, # and report which features were separated. # Import system modules import arcpy # Create variables for the input and output feature classes inFeatureClass = "c:/data/gdb.gdb/vegetation" outFeatureClass = "c:/data/gdb.gdb/vegetation_singlepart" try: # Create list of all fields in inFeatureClass fieldNameList = [field.name for field in arcpy.ListFields(inFeatureClass)] # Add a field to the input this will be used as a unique identifier arcpy.AddField_management(inFeatureClass, "tmpUID", "double") # Determine what the name of the Object ID is OIDFieldName = arcpy.Describe(inFeatureClass).OIDFieldName # Calculate the tmpUID to the OID arcpy.CalculateField_management(inFeatureClass, "tmpUID", "!" + OIDFieldName + "!", "PYTHON") # Run the tool to create a new fc with only singlepart features arcpy.MultipartToSinglepart_management(inFeatureClass, outFeatureClass) # Check if there is a different number of features in the output # than there was in the input inCount = int(arcpy.GetCount_management(inFeatureClass).getOutput(0)) outCount = int(arcpy.GetCount_management(outFeatureClass).getOutput(0)) if inCount != outCount: # If there is a difference, print out the FID of the input # features which were multipart arcpy.Frequency_analysis(outFeatureClass, outFeatureClass + "_freq", "tmpUID") # Use a search cursor to go through the table, and print the tmpUID print("Multipart features from {0}".format(inFeatureClass)) for row in arcpy.da.SearchCursor(outFeatureClass + "_freq", ["tmpUID"], "FREQUENCY > 1"): print(int(row[0])) else: print("No multipart features were found") except arcpy.ExecuteError: print(arcpy.GetMessages()) except Exception as err: print(err.args[0])

# data[].attributes.attachment_link.title
Multipart To Singlepart (Data Management)

# data[].attributes.attachment_link.description
Name: MultipartToSinglepart_Example2.py # Description: Break all multipart features into singlepart features, # and report which features were separated.

# data[].attributes.attachment_link.readable_text
# Name: Dissolve_Example2.py # Description: Dissolve features based on common attributes # Import system modules import arcpy arcpy.env.workspace = "C:/data/Portland.gdb/Taxlots" # Set local variables inFeatures = "taxlots" tempLayer = "taxlotsLyr" expression = arcpy.AddFieldDelimiters(inFeatures, "LANDUSE") + " <> ''" outFeatureClass = "C:/output/output.gdb/taxlots_dissolved" dissolveFields = ["LANDUSE", "TAXCODE"] # Execute MakeFeatureLayer and SelectLayerByAttribute. This is only to exclude # features that are not desired in the output. arcpy.MakeFeatureLayer_management(inFeatures, tempLayer) arcpy.SelectLayerByAttribute_management(tempLayer, "NEW_SELECTION", expression) # Execute Dissolve using LANDUSE and TAXCODE as Dissolve Fields arcpy.Dissolve_management(tempLayer, outFeatureClass, dissolveFields, "", "SINGLE_PART", "DISSOLVE_LINES")

# data[].attributes.attachment_link.description
Name: Dissolve_Example2.py # Description: Dissolve features based on common attributes # Import system modules import arcpy arcpy.env.workspace = "C:/data/Portland.gdb/Taxlots" # Set local variables inFeatures = "taxlots" tempLayer = "taxlotsLyr" expression = arcpy.AddFieldDelimiters(inFeatures, "LANDUSE") + " ''" outFeatureClass = "C:/output/output.gdb/taxlots_dissolved" dissolveFields = ["LANDUSE", "TAXCODE"] # Execute MakeFeatureLayer and SelectLayerByAttribute.

# data[].attributes.body
Create label classes based on fields to label specific features in ArcPro

# data[].attributes.attachment_link.readable_text
You can use label classes to restrict labels to certain features or to specify label fields, symbols, scale ranges, label priorities, and sets of label placement options for groups of labels. For example, for a roads layer, you can use a different text size to label road types based on a field classifying roads by importance. You can also create a query to label only cities with a population greater than 1 million.

Add label classes from symbology layers

You can also create label classes from existing symbology layers in the map. Adding label classes from symbology classes allows you to automatically make label classes for each of the symbology classes you have already defined for a layer. In this way, you can specify label properties for the features in each of the symbology classes you have already defined. For example, you can label cities with a large population in a larger font than those with a smaller population.

After you've created label classes from symbology classes, the label classes are not automatically updated if you change or edit the symbol classes in the Symbology pane. If you change the symbology classes and want to update your label classes to match the change, add the label classes again. When you are prompted, uncheck the option to append to current label classes. Note that overwriting the existing label classes means that the label properties you already defined for these classes are overwritten as well.

1. Ensure that List By Labeling is the active method of displaying the Contents pane. Click the List By Labeling tab .

2. Right-click the feature layer you want to create label classes for and select Create Label Classes From Symbology.

3. Select the symbology classes you want to create label classes from and specify whether the new label classes are to be appended to the current label classes.

4. Specify whether the Scale range and Color settings should be brought from the symbology classes and added to the new label classes.

The color of the text symbol in a label class created in this way derives from the imported symbol. The color will be pulled from the color scheme target. Click the Color scheme options button to see the target for the color scheme. To access this color, the symbol must have a single color-unlocked symbol layer or multiple color-unlocked symbol layers that reference the same color. In any other case, the color of the new label class text symbol is black.

Set scale ranges for label classes

Some labels are most useful within a given scale range. For example, on a city map, a label class of all street names may be useful up to some minimum scale. As you zoom out beyond that scale, the labels become too crowded-or too small if there is a reference scale set-and you may prefer to display a label class that only shows major street names.

Setting a minimum scale for labels can improve the overall redraw performance of your map, making panning and zooming more responsive, as labels are only drawn within the scale range at which they're useful. You can set the minimum and maximum scales in the Visibility Range group on the Labeling tab or on the Visibility Range tab of the Label Class pane. If no scale is set, the labels have the same scale range as the feature layer.

Tip:

If you set some symbol classes to turn off as others turn on, it's a good idea to set your map to draw up to and including the maximum scale in scale ranges to avoid drawing both classes at the interim scale. In the Contents pane, right-click a map and click Properties to open the Map Properties dialog box. On the General tab, ensure that Draw up to and including the maximum scale in scale ranges is not checked, which is the default. Maps created by importing .mxd files have this property checked by default. This property applies to all label classes in a map.

Feedback on this topic?

# data[].attributes.attachment_link.title
Use label classes-ArcGIS Pro | Documentation

# data[].attributes.attachment_link.description
You can use label classes to restrict labels to certain features or to specify label fields, symbols, scale ranges, label priorities, and sets of label placement options for groups of labels. For example, for a roads layer, you can use a different text size to label road types based on a field classifying roads by importance.

# data[].attributes.body
Click to view or download slides from the practical.

# data[].attributes.headline
Remove duplicate labels along a street (for example)

# data[].attributes.subject
Remove duplicate labels along a street (for example)

# data[].attributes.attachment_link.readable_text
Some locations on a map may contain several labels with the same content. For clarity and to make space for other labels, you can use the Maplex Label Engine to remove the redundant labels within a given search area from the map.

After you have labeled the features, you can identify the clusters having the same labels. The next step is to measure the radius of the identified cluster. You will use this distance as the search radius for removing redundant labels.

The search radius is applied to the label classes of the same feature type (point, line, or polygon) that have the Remove all or Remove within fixed distance option specified. The symbology of the label class does not affect its consideration in the search. When a choice is to be made between two labels, the label with the higher priority order will be placed.

Only labels from label classes where it is specified to remove duplicate labels are eligible to be removed. Possibly none of them will be placed if the same label exists in another label class that doesn't specify to remove duplicates.

Label classes that use the Never remove (place overlapping) option will keep one representative label.

The image below shows how Bayshore Boulevard is labeled after the duplicate labels have been removed. Originally, both parts of the dual line feature were labeled in this image. The Remove within fixed distance parameter was set with a limit of 150 map units, so the second label for Bayshore Boulevard was removed.

1. Ensure that the Maplex Label Engine is enabled.

2. Ensure that List By Labeling is the active method of displaying the Contents pane. Click the List By Labeling tab .

3. Choose a label class in the Contents pane and click the Labeling tab.

4. On the Labeling tab, in the Label Placement group, click Label Placement Properties .

5. In the Labeling pane, click Position and click the Conflict resolution tab .

6. Expand Remove duplicate labels.

7. On the Map tab, in the Inquiry group, click the Measure tool to measure the size of the label cluster.

Click near the center of the cluster of labels and drag the Measure tool line to an area outside the congested area of labels. Note the distance in map units.

8. Select the remove duplicate labels type: Remove within fixed distance or Remove all.

If using the Remove within fixed distance option, specify the Search radius and the units in which to measure (map units or page units-millimeters, inches, or points).

This is the distance that was measured using the Measure tool within which duplicate labels should be removed.

Feedback on this topic?

# data[].attributes.attachment_link.title
Remove duplicate labels within a given radius-ArcGIS Pro | Documentation

# data[].attributes.attachment_link.description
Some locations on a map may contain several labels with the same content. For clarity and to make space for other labels, you can use the Maplex Label Engine to remove the redundant labels within a given search area from the map.

# data[].attributes.attachment_link.description
Our collection includes hundreds of geospatial and numeric datasets. We provide assistance finding maps and data and using GIS and statistical software.

# data[].attributes.body
This youtube video shows how to create a map layout in ArcGIS Pro

# data[].attributes.body
A PDF version of the slides from Assignment 1, click to download.

# data[].attributes.body
When I 'turn on' the hydrology layer, why can't I see it?