|
POST
|
Please don't post code as screenshots. https://community.esri.com/t5/community-help-documents/how-to-insert-code-in-your-post/ta-p/914552
... View more
06-18-2021
09:28 PM
|
0
|
0
|
921
|
|
POST
|
It rescales the pixel values to 0-1. Imagine you have a raster with pixel values from 1-10. raster.minimum is 1 raster.maximum is 10. A pixel with a value of 1 will get rescaled to (1-1) / (10-1) = 0, 2 gets rescaled to (2-1)/(10-1) = 0.111 etc . 10 gets rescaled to (10-1)/(10-1) = 1
... View more
05-18-2021
04:15 AM
|
0
|
0
|
923
|
|
POST
|
It would help if you posted the actual error message. But a wild stab in the dark is that you have an undeclared variable.. You declare the dbf as Output_Table_dbf and then attempt to use Output_Stat_Table_dbf
... View more
05-16-2021
09:07 PM
|
1
|
0
|
3973
|
|
BLOG
|
The normalize function is shown a couple of times in @DanPatterson_Retired code, look in the code blocks for "def normalize(etc..." The np is a very common shorthand for numpy - import numpy as np
... View more
05-14-2021
05:59 PM
|
0
|
0
|
1833
|
|
POST
|
a Raster object has maximum and minimum properties (if statistics have been calculated). for calc in projected_rast:
print(calc)
raster = arcpy.Raster(calc)
minLSTresult = raster.minimum
maxLSTresult = raster.maximum
standardised = ((raster - minLSTresult)/(maxLSTresult-minLSTresult))
standardised.save()
... View more
05-14-2021
05:54 PM
|
1
|
1
|
2400
|
|
POST
|
I couldn't get your desired behaviour with a script tool. But it just works™ with a python toolbox. ¯\_(ツ)_/¯
... View more
05-14-2021
05:46 PM
|
0
|
0
|
4231
|
|
POST
|
Ahhh script tool, not python toolbox. Apologies, I misunderstood you. Wonder why the behaviour is different...? Will have a look.
... View more
05-13-2021
04:16 PM
|
1
|
0
|
4252
|
|
IDEA
|
I so didn't check the date on this one, I was just searching for something else layout related and stumbled across this. But thanks @KoryKramer, I've never even noticed those little lock icons before 🤣
... View more
05-13-2021
05:43 AM
|
0
|
0
|
2035
|
|
IDEA
|
If you're suggesting this for desktop/ArcMap, I wish you luck, there's not going to be any more ArcMap releases, 10.8.1 is it... https://support.esri.com/en/arcmap-esri-plan (presumably why there's no ArcMap ArcGIS Ideas page anymore). For Pro, I agree that could be useful. Make layout elements selectable/unselectable just like you can for layers in a map. A decent workaround and one that I now use exclusively (though it is a considerable change to workflow/muscle memory) is to make sure my elements are properly named and use the contents pane to select exactly which element/s I want to do something with instead of clicking around in the layout.
... View more
05-12-2021
10:18 PM
|
0
|
0
|
2043
|
|
POST
|
Mike, can you provide a bit more of your script? I can't reproduce (using Pro 2.6.1). With the following script (not using a validator, but just setting the parameters) I get your desired behaviour: class Tool(object):
def __init__(self):
"""Define the tool (tool name is the name of the class)."""
self.label = "Tool"
self.description = ""
self.canRunInBackground = False
def getParameterInfo(self):
"""Define parameter definitions"""
param0 = arcpy.Parameter(
displayName="Input Features",
name="in_features",
datatype="GPString",
parameterType="Required",
direction="Input",
multiValue=True)
param0.filter.type = "ValueList"
valueList = ['Montreal', 'Toronto', 'Vancouver', 'British Columbia', 'Ontario', 'Quebec']
param0.filter.list = valueList
param0.values = param0.filter.list
return [param0] If I don't set /comment out param0.values = param0.filter.list then I get a very similar result , just without anything selected:
... View more
05-12-2021
07:32 PM
|
2
|
1
|
4274
|
|
POST
|
Deleted original reply. Desired behaviour can be achieved with a python toolbox (.pyt) instead of a script tool in a custom toolbox (.tbx).
... View more
05-09-2021
04:13 PM
|
1
|
1
|
1994
|
|
POST
|
arcpy.subpackage.Tool and arcpy.Tool_subpackage works in both Pro and Desktop.
... View more
05-06-2021
04:01 PM
|
1
|
0
|
10276
|
|
POST
|
Just use the layer object returned by the MakeFeatureLayer result: layer = arcpy.management.MakeFeatureLayer(fc, "lyr")[0]
layer
<arcpy._mp.Layer object at 0x0000023785BDD080>
layer.name
'lyr' I don't have access to Desktop/ArcMap to test if the `[0]` indexing works like it does in Pro, but you could have used something like the following in ArcMap instead of casting: layer = arcpy.MakeFeatureLayer_management(fc, "lyr").getOutput(0)
... View more
05-06-2021
12:01 AM
|
2
|
3
|
10302
|
|
IDEA
|
It's called "focus stealing" and it's very annoying.
... View more
05-05-2021
01:58 AM
|
0
|
0
|
4244
|
|
POST
|
They are a UUID (Universal Unique Identifier): GlobalID [ESRI software] A field of type UUID (Universal Unique Identifier) in which values are automatically assigned by the geodatabase when a row is created. Universally unique identifier (UUID): A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. The term globally unique identifier (GUID) is also used, often in software created by Microsoft. When generated according to the standard methods, UUIDs are, for practical purposes, unique. Their uniqueness does not depend on a central registration authority or coordination between the parties generating them, unlike most other numbering schemes. While the probability that a UUID will be duplicated is not zero, it is close enough to zero to be negligible. They look like windows registry numbers, because Microsoft uses UUIDs (they call them GUIDs).
... View more
05-04-2021
05:25 AM
|
3
|
0
|
9755
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-24-2022 03:08 PM | |
| 1 | 07-30-2025 03:00 PM | |
| 1 | 06-10-2025 08:06 PM | |
| 5 | 05-20-2025 07:56 PM | |
| 1 | 05-04-2025 10:34 PM |