POST
|
I would like to find an appropriate kernel size for evaluation of mean for my raster DEM in Focal Statistics. Is there a way to select the best kernel size statistically without looking into the data?
... View more
12-09-2015
06:11 AM
|
0
|
3
|
3003
|
POST
|
On my computer only combination of: 1) allow previously unused ActiveX controls to run without prompt, 2) resetting an ArcGIS application profile, 3) rebooting of the computer works. Thank you all for help!
... View more
11-17-2015
12:21 AM
|
2
|
0
|
1198
|
POST
|
I am using windows 8.1. From the link below it seems that this error occurs due to the Internet Explorer security settings, and in more detail "Allow previously unused ActiveX controls to run without prompt" https://gisnuts.com/terra/blog/2013/01/22/arcgis-geoprocessing-tools-scripting-error
... View more
11-16-2015
06:00 AM
|
2
|
3
|
2387
|
POST
|
Thank you Luke (again)! I see that it is not the problem of my script, and that it happens after checking "Item Description" of any tool provided by ArcGIS (at least on my computer). Here I have found also more detailed description of the problem ArcGIS Geoprocessing Tools Scripting Error | GISNuts.com
... View more
11-16-2015
05:22 AM
|
2
|
0
|
1198
|
POST
|
A part of my script is here How to add a path to default database in ArcPy script? I am using only Focal Statistics, and Map Algebra, in my script.
... View more
11-16-2015
03:12 AM
|
0
|
1
|
2388
|
POST
|
I already checked my script several times, and I do not see anything what could invoked this error. But I realized that the error occurs after I click on my toolbox and open "Item Description" - then something in ArcMap changes, the Fonts are bigger and blurred, see the imaged attached below. After the error I cannot any toolbox (not only mine). Can it occurs because of my script?
... View more
11-16-2015
02:25 AM
|
1
|
3
|
2388
|
POST
|
I have built an ArcGIS toolbox for ArcMap 10.3. The tool works fine. However, sometimes I am receiving an error (attached below) and to enable the use of the toolbox I have to restart ArcMap and import the toolbox again. I do not know what is wrong in line 47 in the script - which is according to the message responsible for the error, because when I added few additional lines in the code the error still appear in line 47 (doesn't matter what is in this line). Does anyone know what should I do to correct this error?
... View more
11-16-2015
01:32 AM
|
2
|
14
|
13882
|
POST
|
Yes, you are right. Thank you for explanation. Now I understand it better, and my toolbox works like I expected.
... View more
11-13-2015
08:20 AM
|
0
|
0
|
801
|
POST
|
Thank you. Now the script works fine. In the code I changed the line 24 from: ourMinus = inRaster - outFocalStatistics to inRaster2 = Raster("DEM_mean")
outMinus = inRaster - inRaster2 and it also works. I did this, because if in default database will be some other raster with the name outFocalStatictics then this raster can be take into evaluation, am I right? I have also one more question. How to delete intermediate results (DEM_mean) from default database? I have found the it can be done using the code below, but in my case it is not deleting anything. # Clean up
del outFocalStatistics
... View more
11-13-2015
01:06 AM
|
0
|
2
|
801
|
POST
|
I am trying to build a toolbox where at first I am evaluating Focal Statistics from DEM (raster) and then I am subtracting (Raster Calculator) both rasters. That I why I need a path to the results from my first evaluation. # Import arcpy module
import os
import arcpy
from arcpy import env
from arcpy.sa import *
# Set the input data
inRaster = arcpy.GetParameterAsText(0)
# Set the output data
outRaster = arcpy.GetParameterAsText(1)
# Set the path to workspace location
path = arcpy.env.workspace
print path
# Evaluate mean DEM
inRaster = "DEM.tif"
neighborhood = NbrRectangle(3, 3, "CELL")
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")
# Execute FocalStatistics
outFocalStatistics = FocalStatistics(inRaster, neighborhood, "MEAN","")
# Save the output
outFocalStatistics.save("DEM_mean")
#
# Subtraction
inRaster1 = Raster("DEM")
inRaster2 = Raster("DEM_mean")
# Execute Minus
outMinus = inRaster1 - inRaster2
# Save the output
outMinus.save("result")
... View more
11-12-2015
09:42 AM
|
0
|
4
|
2930
|
POST
|
Okay, thanks for answer. But then how to use the output file as an input in the next step of my script? I have to tell the script where the file is located right?
... View more
11-12-2015
09:16 AM
|
0
|
6
|
2930
|
POST
|
Thank you for suggestion, but I think it is not what I am looking for. I would like to build a python toolbox which run like standard ArcGIS toolboxes - when you open the toolbox and do not specify the path then the results are automatically saved in default geodatabase.
... View more
11-12-2015
09:01 AM
|
0
|
0
|
2930
|
POST
|
Thank you for your answer. Yes, I am trying to reference to my default geodatabase. From your link I have found that I should use: arcpy.env.workspace = path but here I also have to specify the path to the "path". How to do this? When I change the computer the script will not work, because the "path" will be different.
... View more
11-12-2015
08:28 AM
|
0
|
11
|
2930
|
POST
|
I would like to add a path to default database in Arcpy script. The path will be a place where the results from evaluation will be saved. However, I do not want to add a full path, but a relative path, which enable to apply my script also in another computer. How to add relative path to default database?
... View more
11-12-2015
07:33 AM
|
0
|
14
|
10471
|
POST
|
Thank you for the answer. I added a line with data type. Now I do not have any syntax error, but the script still does not work, so I do not know what can still be wrong. # First parameter
param1 = arcpy.Parameter(
displayName="Input Raster Dataset",
name="in_rasterdataset",
datatype=["DERasterDataset","DERasterCatalog"],
parameterType="Required",
direction="Input")
param1.filter.type = "ValueList"
param1.filter.list = ['Raster']
... View more
11-12-2015
05:31 AM
|
0
|
0
|
1045
|
Title | Kudos | Posted |
---|---|---|
1 | 04-10-2015 01:13 AM | |
1 | 12-15-2016 11:16 PM | |
1 | 11-16-2015 02:25 AM | |
1 | 01-23-2015 12:28 AM | |
1 | 04-05-2016 10:31 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|