POST
|
I had a problem where my .tif rasters were not appearing when zoomed out. A friend recommended that I go into Properties-->Display-->Resample during display using: and change this to "Majority". Solved my problem. Hope this helps someone.
... View more
11-16-2011
09:30 AM
|
0
|
0
|
1240
|
POST
|
Thanks for the speedy reply. I'll give that a try. Erica
... View more
10-11-2011
09:10 AM
|
0
|
0
|
2556
|
POST
|
I have gotten to the point where I am using an iterator to rename the end products in my model (eg. clip_%name%), but if I batch run the model, only the first item in the batch list is named properly, and everything else ends up named "raster##" and dumped into a default folder. Any ideas??
... View more
10-11-2011
05:44 AM
|
0
|
0
|
2556
|
POST
|
Thanks Patrick, I did a version your first suggestion by hand before posting, I was just hoping there was an easier way; I'm using arc 10 so your second solution may be moot. I'm just completely flabbergasted that there isn't an easier way to do this. I ended up exporting the file to photoshop and zooming in to use the ruler to find the approximate locations I needed. This would be a great feature in a future version! Thanks again for your answers! Erica
... View more
09-29-2011
05:21 PM
|
0
|
0
|
2551
|
POST
|
Is there any (simple) way to find the row and column number of a pixel in a raster? Not the VALUE of the pixel, simply its location in terms of rows and columns. Thank you!
... View more
09-27-2011
01:23 PM
|
0
|
3
|
8840
|
POST
|
Hi there, I have been trying to find a way to tell GIS to look in a folder and get me all .jpg files without the string _TIR in it. So far I have tried iterating through the folder using "iterate rasters" in model builder, but I don't know how to specify a wildcard to be NOT something rather than something, and whenever I try to test it using a wildcard to find TIR, it only spits out one raster that it places in the TOC (I want all of them). Another way to do it would be to use python listRasters and arcpy.CopyFeatures_management to move the files I want to a new folder and then import them all together, but I still can't figure out how to specify that I don't want something in the text string. Can anyone help? I feel like it is a really simple solution, but I just can't find it! Thanks so much.
... View more
09-14-2011
09:59 AM
|
0
|
0
|
383
|
POST
|
[HTML]
Apparently I just wasn't waiting long enough. The second code (below) works for both.
import arcpy
arcpy.env.workspace = r"C:/GIS/NDVI/Georef_27_21_TIFFs/test"
rasters = arcpy.ListRasters("*", "TIF")
for raster in rasters:
print raster
outraster = raster.rpartition(".")[0]+"_olp.tif"
arcpy.ProjectRaster_management(raster, outraster, "MNR_LAMBERT_PROJECTION_3161.prj", "NEAREST", "30", "WGS_1984_(ITRF00)_To_NAD_1983", "#", r"C:/Program Files/ArcGIS/Desktop10.0/Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 16N.prj")
[/HTML]
... View more
08-10-2011
09:09 AM
|
0
|
0
|
665
|
POST
|
Sorry, the first script only has one indent for "print raster" The second script is indented at "print raster" and all following lines.
... View more
08-09-2011
06:01 PM
|
0
|
0
|
665
|
POST
|
There is one final tweak that I can't seem to figure out with this script. Both of the following only return one reprojected file, not both that are in the "test" folder. Any ideas on how to get it to process both .tif files? import arcpy arcpy.env.workspace = r"C:/GIS/NDVI/Georef_27_21_TIFFs/test" rasters = arcpy.ListRasters("*", "All") for raster in rasters: print raster outraster = raster.rpartition(".")[0]+"_olp.tif" arcpy.ProjectRaster_management(raster, outraster, "MNR_LAMBERT_PROJECTION_3161.prj", "NEAREST", "30", "WGS_1984_(ITRF00)_To_NAD_1983", "#", r"C:/Program Files/ArcGIS/Desktop10.0/Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 16N.prj") import arcpy arcpy.env.workspace = r"C:/GIS/NDVI/Georef_27_21_TIFFs/test" rasters = arcpy.ListRasters("*", "TIF") for raster in rasters: print raster outraster = raster.rpartition(".")[0]+"_olp.tif" arcpy.ProjectRaster_management(raster, outraster, "MNR_LAMBERT_PROJECTION_3161.prj", "NEAREST", "30", "WGS_1984_(ITRF00)_To_NAD_1983", "#", r"C:/Program Files/ArcGIS/Desktop10.0/Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 16N.prj")
... View more
08-09-2011
04:45 PM
|
0
|
0
|
665
|
POST
|
Perfect. Thanks to both of you very much. Now I can keep going ! Erica
... View more
08-09-2011
08:33 AM
|
0
|
0
|
665
|
POST
|
THANK YOU!!! I thought it must have been a simple solution, but being very new to this, I have been working on it for days. I'm still having a problem with the file name (it renames the files as originalfilename.tif_olp.tif - need to fix that to originalfilename_olp.tif but I think I can figure that out - here is the final script that properly reprojects the tif. ... import arcpy ... arcpy.env.workspace = r"C:/GIS/NDVI/Georef_27_21_TIFFs/test" ... rasterList = arcpy.ListRasters("*", "All") ... for raster in rasterList: ... print raster ... outraster = raster+"_olp.tif" ... arcpy.ProjectRaster_management(raster, outraster, "MNR_LAMBERT_PROJECTION_3161.prj", "NEAREST", "30", "WGS_1984_(ITRF00)_To_NAD_1983", "#", r"C:/Program Files/ArcGIS/Desktop10.0/Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 16N.prj") ... L5027021_02119850802_B30.TIF LT5027021008516650_B3.tif
... View more
08-09-2011
08:01 AM
|
0
|
0
|
665
|
POST
|
Hi there, I am new to python and attempting to set up a batch process to reproject rasters in a folder. This is the script and error message I am getting. I defined the projection of the rasters in the folder to WGS 1984 UTM Zone 16N before starting. >>> import arcpy ... arcpy.env.workspace = r"C:/GIS/NDVI/Georef_27_21_TIFFs/test" ... rasterList = arcpy.ListRasters("*", "All") ... for raster in rasterList: ... print raster ... outraster = raster+"_ontlambproj" ... arcpy.ProjectRaster_management("raster", "outraster", "MNR_LAMBERT_PROJECTION_3161.prj", "NEAREST", "30", "WGS_1984_(ITRF00)_To_NAD_1983", "#", r"C:/Program Files/ArcGIS/Desktop10.0/Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 16N.prj") ... L5027021_02119850802_B30.TIF LT5027021008516650_B3.tif Runtime error <class 'arcgisscripting.ExecuteError'>: Undefined coordinate system for input dataset. Can anyone help me determine why I am getting this error? Thank you so much! Erica
... View more
08-09-2011
07:19 AM
|
0
|
9
|
2155
|
POST
|
I'm sorry Tom, I have no experience with mosaic datasets... Erica
... View more
05-30-2011
10:23 AM
|
0
|
0
|
1804
|
POST
|
I've been working on a solution to this problem for a while now so thought I'd post the workaround that I found. I am importing landsat bands and attempting to reclassify the DN Values 0-255 into two new classes, for example 0 and 1. For most bands, using the reclassify function works. However, for some band files, reclassifying either does not work and I get an error message, The input raster minimum/maximum (huge number) is out of range. To ensure a correct reclassification, edit ranges or use a different precision settings in the reclassification dialog box. Sometimes the reclassify tool works, but my output is incorrect - an image showing vertical lines or bands with values 0 and no data. I tried to calculate statistics first because I noticed that this file, unlike the other files I worked with, did not have statistics calculated, but when I tried that I get the error message, Invalid drop item: One or more dropped items were invalid and will not be added to the control. My solution: Build an attribute table for the raster data set. Build Statistics by clicking the symbology tab "discrete color". Reclassify the raster by using the tool "reclass by table". I built the table in the reclassify tool - it's easy there to create and save a table based on your preferences for the reclass function. This successfully built a correctly reclassed image for me. Hope this helps someone struggling with the same problems!
... View more
05-20-2011
08:42 AM
|
0
|
2
|
11211
|
POST
|
I am also having this issue, but only for some rasters out of a set of very similar files. The raster can build an attribute table but when I try to reclassify, it fails because the raster statistics cannot be built. I cannot build them in ArcCatalog or in ArcMap. I'd appreciate any help on this issue too! It seems to be related to an incorrectly classified minimum and maximum - I have DN values ranging from 0-255 and the error messages say: The input raster minimum (A huge number) is out of range. To ensure a correct reclassificaiton, edit ranges or use a different precision settings in the reclassification dialog box. It also says this about the maximum. WHY!??
... View more
05-20-2011
07:07 AM
|
0
|
0
|
730
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|