POST
|
I am trying to resample multiple rasters with the "Resample_management" ArcPy function. The code below works perfectly: import arcpy from arcpy import sa arcpy.gp.overwriteOutput=True arcpy.CheckOutExtension("spatial") import glob Input=glob.glob("D:\Freelancer\oDesk\Create-ArcPy-Scripts\TestFiles\*tif") for i in Input: arcpy.Resample_management(i, i+"_1000.tif", "1000 1000", "BILINEAR") But it saves the output files in the same directory with the input ones. To change this, I modified it a bit. import arcpy from arcpy import sa arcpy.gp.overwriteOutput=True arcpy.CheckOutExtension("spatial") import glob Output="D:/Freelancer/oDesk/Create-ArcPy-Scripts/OutputFiles/" Input=glob.glob("D:/Freelancer/oDesk/Create-ArcPy-Scripts/TestFiles/*tif") for i in Input: arcpy.Resample_management(i, "'D:/Freelancer/oDesk/Create-ArcPy-Scripts/OutputFiles/%s_1000.tif' % i", "1000 1000", "BILINEAR") But this throws an error: Traceback (most recent call last): File "D:\Freelancer\oDesk\Create-ArcPy-Scripts\testscript-2.py", line 11, in <module> arcpy.Resample_management(i, "'D:/Freelancer/oDesk/Create-ArcPy-Scripts/OutputFiles/%s_1000.tif' % i", "1000 1000", "BILINEAR") File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 12407, in Resample raise e ExecuteError: ERROR 999999: Error executing function. Failed to execute (Resample). What am I doing wrong?
... View more
04-08-2013
01:48 AM
|
0
|
1
|
273
|
POST
|
Thank you, all! That's what I was looking for. Very good insights, Joshua.
... View more
02-11-2013
12:01 PM
|
0
|
0
|
733
|
POST
|
I know what both do but I see people (with no GIS knowledge) asking for maps to be made in Illustrator which I don't know how to use. But I do know that it is possible to convert ArcGIS maps into Illustrator file. Did anyone do that before? Would that converted file be editable in Illustrator just as it wold be if it was created in Illustrator from scratch? Ardit.
... View more
02-07-2013
01:53 PM
|
0
|
7
|
4462
|
POST
|
Hello, Does anyone know how to do that in a quick way for a big number of raster datasets? A list of counts output would be the best solution.
... View more
12-17-2012
02:53 AM
|
0
|
2
|
2949
|
POST
|
Well, I am answering myself. I guess the problem is that you cannot create an attribute table out of a band layer in ArcGIS.
... View more
11-08-2012
04:10 AM
|
0
|
0
|
145
|
POST
|
I am working with MODIS hdf rasters with multiple bands (layers). I mosaiced 3 tiles in Modis Reprojection Tool (MRT) and clipped my area of interest also in MRT. Once I did that, I uploaded the output image (in hdf) in ArcGIS and tried to symbolize with "Unique Values". A window asks me if I want to create Attribute Table. I say "Yes" but nothing happens. Rather, I can symbolize with "Stretched" and "Classified" but not with Unique Values. I also tried to build an Attribute Table through the "Build Raster Attribute Table" tool but an unidentified error happens. Any ideas please!
... View more
11-07-2012
07:00 AM
|
0
|
1
|
440
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|