Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A site-package created by Esri to expose ArcGIS Desktop (ArcMap and ArcGIS Pro) geoprocessing, mapping, etc, to Python.
0
votes
3
answers
18k
views
Selecting files with matching names and then executing a process
outraster)
else:
print('Done')
So basically if the file names in list 1 match those in list 2 I want to execute my process otherwise print done
Edit:
New code being tried is:
import arcpy …
1
vote
2
answers
988
views
ArcGIS desktop won't import arcpy
(x86)\arcgis\desktop10.3\arcpy\arcpy\arcobjects\__init__.py", line 19, in <module>
arcobjectconversion.initialize_conversion_mapping()
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy … import logcall, ArgAdaptor
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\utils.py", line 17, in <module>
import inspect
ImportError: No module named inspect …
2
votes
1
answer
1k
views
ERROR 000271: Cannot open the input datasets Failed to execute (CompositeBands) (arcpy)
The code I am using is:
import arcpy
#set environment
arcpy.env.workspace=r'F:\Sheyenne\Atmospherically Corrected Landsat\hank_masked\NDVI'
#path to band 3
band3 = arcpy.ListRasters("*band3*")
#path to …
1
vote
1
answer
4k
views
ERROR 000824: The tool is not licensed from arcpy.gp.ExtractByMask_sa()? [duplicate]
I know I have spatial analyst licensed and the tool works fine within ArcMap but when I try to run this code snippet:
import arcpy
arcpy.CheckExtension('Spatial') # which returns 'Available'
arcpy.gp.ExtractByMask_sa …
1
vote
1
answer
10k
views
Using Loop with Raster Calculator in ArcPy?
I am trying to loop through multiple rasters and extract cells that are above 0.1 The code I am trying to use is:
import arcpy
arcpy.CheckOutExtension('Spatial')
arcpy.env.workspace=r'F:\Sheyenne\Atmospherically … I am trying to use:
import arcpy
from arcpy.sa import *
arcpy.CheckOutExtension('Spatial')
arcpy.env.workspace=r'D:\Sheyenne\Atmospherically Corrected Landsat\Indices\Main\NDWI\main_master'
#pathway …
0
votes
2
answers
3k
views
Batch Zonal Statistics as table?
What I am trying is:
import arcpy, os
arcpy.env.workspace=r'F:\Sheyenne\Atmospherically Corrected Landsat\Indices\Main\NDWI\main_master'
#zones to calculate stats on
inpoly=r'F:\Sheyenne\SNG_sections.shp … \arcpy\geoprocessing\_base.py", line 498, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 999999: Error executing function. …
3
votes
2
answers
3k
views
Batch Extract by Mask, but customize individual output names
Edit:
This is the exact code I am trying:
import arcpy
import glob
import os
arcpy.CheckOutExtension('Spatial')
"""folder containing only input rasters and nothing else"""
indir = r'D:\Sheyenne\Atmospherically … Edit:
I got it to work using this code:
import arcpy
arcpy.env.workspace='D:\Sheyenne\Practice_bands'
arcpy.CheckOutExtension('Spatial')
"""absolute path to your mask layer"""
mask = r'D:\Sheyenne\ …