POST
|
Thanks Chris. I found a solution! Despite searching thoroughly before posting, I hadn't seen the following: https://community.esri.com/message/80678#80678 I applied the advice in the last comment. I dropped the "Pan_Input" variable described and illustrated in my original post. Instead, I modified the expression in "Calculate Value (1)" from "%Name%".replace("m20","p10_1") to "D:\SomePath\%Name%".replace("m20","p10_1") and changed the data type from string to Raster Dataset. Lastly, the output of "Calculate Value (1)" was the direct input into the pan sharpen tool.
... View more
08-05-2015
02:42 PM
|
1
|
0
|
405
|
POST
|
I'm trying to figure out why I can't point to a raster as input (for pan sharpening) using inline variable substitution? I have no problem using inline variable sub as part of the output raster name. I'm using ModelBuilder to iterating over a collection of multispectral rasters to be fed into the pansharpen tool. I'm using inline variable sub for the pan image input (actually as input into Make Raster Layer first): D:\SomePath\%PanImageName%.tif where %PanImageName% is the name of the Pan image that matches the current Multispectral image being processed by the Iterate Raster tool. To hopefully be more clear, the Name variable coming off the Iterate Raster tool is passed through the Calculate Value tool with this expression... "%Name%".replace("m20","p10_1"), giving me the value PanImageName used to identify the matching pan image. I have added preconditions where the seemed necessary, but I just can't figure this one out. I get the following error: ERROR 000732 Panchromatic Image: Dataset D:\SomePath\%PanImageName%.tif does not exist or is not supported. Hoping somebody can help, thanks!
... View more
08-05-2015
01:28 PM
|
0
|
2
|
3092
|
POST
|
Here's what I've got so far. I'm relatively new to python & have learned by trial & error & reading through these forums. What the below seems to do is rename the 'Default' label class. How do I add a new label class?
# Create Label Class for Single Layer Forested polys
for lyr in arcpy.mapping.ListLayers (mxd):
if lyr.name == MAPSHEET:
if lyr.supports("LABELCLASSES"):
for lblclass in lyr.labelClasses:
lblclass.showClassLabels = True
lblclass.className = "FLsingle"
lblclass.SQLQuery = "\"CANLAY\" = 'S' AND \"US2CANLAY\" IS NULL"
lblclass.expression = "\"{0}\" + [CANLAY] + \" - CC:\" + [CC] + \"{1}\"".format("<CLR red='0' blue='255' green='0'><FNT size = '11'>","</FNT></CLR>") # expression is currently incomplete
lyr.showLabels = True
arcpy.RefreshActiveView()
... View more
10-17-2014
07:40 AM
|
0
|
0
|
308
|
POST
|
Within a forest inventory I want to label certain types of forest polygons differently, as well as wetlands and other non-forest features. How do I post my python script!? (this is my first time posting a question here!)
... View more
10-16-2014
03:22 PM
|
0
|
2
|
308
|
POST
|
Unsuccessfully trying to create a new label class using python. Forums have been helpful for figuring out python for the label class SQL query & expression, but now I want to add another class with a new query & expression.
... View more
10-16-2014
12:56 PM
|
0
|
4
|
4229
|
Title | Kudos | Posted |
---|---|---|
1 | 08-05-2015 02:42 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|