POST
|
Needed to save the output to a .gdb to get it to clip correctly.
... View more
03-23-2015
04:27 PM
|
1
|
0
|
187
|
POST
|
Can't seem to get this to clip to the geometry boundary of the .shp file. Instead, its clipping to the max extent. Can anyone tell me why? import arcpy shp = r'C:\Users\Robby\Desktop\Project_3\hydrologic_unitsHUC8\wbdhu12_a_al089.shp' raster = r'C:\Users\Robby\Desktop\Test\final_mosaic.tif' arcpy.Clip_management (raster, in_template_dataset = shp, out_raster = r'C:\Users\Robby\Desktop\Test1\newclip2.tif', clipping_geometry = True)
... View more
03-23-2015
11:37 AM
|
0
|
2
|
3825
|
POST
|
After hitting "Enter", it simply returns to >>> without doing anything.
... View more
03-23-2015
08:46 AM
|
0
|
0
|
465
|
POST
|
Trying to get this script to find all .tif and .shp files and reproject them as shown. Having trouble getting it to run. import sys, arcpy, os mypath = r'C:\input ' Images = [] arcpy.env.workspace = mypath for ThisFile in os.listdir(mypath): thisName,thisExt = os.path.splitext(ThisFile) if thisExt.upper == ".TIF": Images.append(ThisFile) out_workspace = r'C:\output' OutSR = arcpy.SpatialReference(26916) for ThisFile in Images: desc = arcpy.Describe(ThisFile) SR = desc.spatialReference if SR.factoryCode != 26916: arcpy.ProjectRaster_management(ThisFile,out_workspace + "\\" + ThisFile,OutSR) ShapeFiles = [] for ThisFile in os.listdir(mypath): thisName,thisExt = os.path.splitext(ThisFile) if thisExt.upper == ".SHP": ShapeFiles.append(ThisFile) for ThisFile in ShapeFiles: desc = arcpy.Describe(ThisFile) SR = desc.spatialReference if SR.factoryCode != 26916: arcpy.Project_management(ThisFile,out_workspace + "\\" + ThisFile,OutSR)
... View more
03-23-2015
08:41 AM
|
0
|
5
|
4009
|
Title | Kudos | Posted |
---|---|---|
1 | 03-23-2015 04:27 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|