|
POST
|
Hi guys, I'm trying to write a script that will reproject my tiff files(450 of em). The script also includes a loop that will loops through my files in a folder. Here's my code that i've already started off with and i'm not exactly sure where my problem is as I am still fairly new to it. Any pointers, suggestions and solution will be greatly appreciated! Thanks in advance!
import arcpy
try:
arcpy.env.workspace = r"D:Project Scripting\A1-4"
# Get a list of Tiffs in the workspace.
#
rasters = arcpy.ListRasters("*", "TIF")
for raster in rasters:
print "Processing: " + raster
outRaster = raster+"_reprojected"
arcpy.ProjectRaster_management(raster, outRaster,\
"PSAD_1956_UTM_Zone_19S", "NEAREST", "",\
"Peru96_UTM_Zone_19S", "", "")
except:
print "Project Raster example failed."
print arcpy.GetMessages() When i ran the code it gave me the following response..... Project Raster example failed. ERROR 000622: Failed to execute (Project Raster). Parameters are not valid. ERROR 000628: Cannot set input into parameter out_coor_system.
... View more
10-03-2013
05:40 PM
|
0
|
4
|
5933
|
|
POST
|
unfortunately there are no steps missing. I know this for a fact, because there are 70+ watersheds that I have to generate and most of them seem to work with the exception of a few that did not generate properly. It's something that i've been very puzzled about it.
... View more
06-25-2013
12:53 PM
|
0
|
0
|
3869
|
|
POST
|
this is the resulting watershed that i have generated from the accumulation flow. Clearly you can see that it did not generate an upstream or downstream properly
... View more
06-25-2013
09:36 AM
|
0
|
0
|
3869
|
|
POST
|
The reason why I'm asking this is i need to generate a proper flow accumulation so that i can eventually generate watershed in which allows me to determine where the upstream and downstream are. But based on this flow accumulation, it has been causing a lot of problems generating the watershed. The result looks like the attached image. [ATTACH=CONFIG]25472[/ATTACH] Base on this even if there is a small value, it would not be acceptible as I know for a fact that the stream flow through it, but the accumulation does not show.
... View more
06-25-2013
09:34 AM
|
0
|
0
|
3869
|
|
POST
|
Part of me trying to generate a proper flow accumulation is so that i can eventually generate watershed in which allows me to determine where the upstream and downstream are. But based on this flow accumulation, it ended up having problem with generating the watershed. The result looks like the attached image. Base on this even if there is a small value, it would not make sense as i know for a fact that stream flow through it, but the accumulation does not show.
... View more
06-25-2013
09:30 AM
|
0
|
0
|
3869
|
|
POST
|
Can someone explain what are the possible problems to why when i run my flow accumulation processing tool, it does not output the flow accumulation correctly. Let me provide you an image to show you what i'm talking about. As you can see within the attachment there is an image which shows the flow accumulation but it does not show entirely of where all the streams are flowing. The circled area are missing for whatever reason and I can't seem to find out what the reason is and how to solve this problem Thanks in advance!
... View more
06-25-2013
09:02 AM
|
0
|
7
|
6845
|
|
POST
|
Hope anyone can also answer this. What if you want to set the environment syntax based on another file's extent ? How would the syntax look ? I've tried many different ways and it has constantly given me an error as follow. File "iddea.py", line 71, in iddea pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(sys.exc_info()[1]) UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-42: ordinal not in range(128) thanks in advance
... View more
06-24-2013
08:38 AM
|
0
|
0
|
659
|
|
POST
|
Hi there, I like to find out how you can set multiple extents within python scripts. For instance setting one extent for clipping analysis follow by setting a new output extent in another clipping analysis ? Thanks in advance!
... View more
06-21-2013
03:32 PM
|
0
|
3
|
888
|
|
POST
|
Yeah, I actually just thought of that too. But if anyone can confirm that'll be great. I think as long as you convert it back raster with the same properties it should work ?
... View more
06-20-2013
01:25 PM
|
0
|
0
|
2574
|
|
POST
|
Hmmm...to my knowledge not with core software but I could be mistaken. I did find the ARIS GRID Editor for ArcMap at http://www.aris.nl/index.php?option=com_content&view=article&id=210:aris-grid-editor-for-arcmap&catid=64:arcgis-tools&Itemid=161 that would do what you want. An option to consider... Regards, Robert Hey John, I've looked into that already. Unfortunately that option will not work as it requires you to have an official licenece. You are able to edit through the program but can not save that modified layer.
... View more
06-20-2013
12:05 PM
|
0
|
1
|
6179
|
|
POST
|
Hi Robert, My concern with this is that what if I only specifically want to edit only one or two pixel values within theraster image? I'm afraid it won't work since I don't wish to replace all the value within the raster image but only just a couple ones. Thanks, Sam
... View more
06-20-2013
09:44 AM
|
0
|
3
|
6179
|
|
POST
|
Hi guys, This issue has troubled me the last couple days and I'm turning to you guys in the hopes of actually finding out what the best way is to solve this problem. I have a dem file that I'm looking to manually edit specific individual pixel value. However, I'm not sure how to go about it in ArcGIS. IF anyone who has came across this issue or knows how to resolve. Please let me know. Much appreciated!
... View more
06-20-2013
09:29 AM
|
1
|
18
|
33405
|
|
POST
|
Hi guys, Just a quick question as i've been having trouble with my python script that I"ve been trying to implement. The issue here is that everytime when I try to run my script, I keep getting the following error ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute). I believe there's an issue with the following section with its expression, but i'm not very clear how i can fix this. Anythoughts on this would be greatly appreciated! #select layer by attributes arcpy.MakeFeatureLayer_management(unionwtrshd, 'unionwtrshdlyr') exp2 = " \"FIDPAO_" + str(ws_id) + "\" = -1" arcpy.SelectLayerByAttribute_management('unionwtrshdlyr', "NEW_SELECTION", exp2) and fyi, str(wd_id) is already defined. Essentially i'm trying to run a script where it goes through each files and grab their respective field 'FIDPAO_(wd_id)" Thanks!
... View more
05-16-2013
09:30 AM
|
0
|
1
|
2099
|
|
POST
|
I have a linear feature line (Stream line) That i extracted from a stream network, but for some reason I noticed that it did not extract properly as you can see from the image below there are gaps in between the line. My question here is that How about Do i fix this issue so that my line doesn't have gaps ? Thanks in advance! [ATTACH=CONFIG]22530[/ATTACH]
... View more
03-11-2013
04:10 PM
|
0
|
2
|
2483
|
|
POST
|
Hi All! I am having the same issue. The script does not run as it is constantly giving me the ARCGISHOME type error. Does anyone have a solution to this ? Thanks in advance!
... View more
02-20-2013
09:57 AM
|
0
|
0
|
2383
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2013 09:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|