POST
|
Thanks Mathew, I am using ArcGIS 9.2/Python 2.4 IDLE, CPython Windows XP.
import arcgisscripting
gp = arcgisscripting.create()
gp.OverWriteOutput = 'True'
...
...
gp.workspace = startFromFolder # d:\projects\New\DaTa
workspaces = gp.ListWorkspaces(dataFolders, "Folder") ## part_01
"""
When using a 9.2-version geoprocessor,
ListWorkspaces returns an enumeration instead of a Python List.
""""
for workspace in workspaces:
...
...
What's the difference between enumeration and Python List ?
... View more
04-10-2012
01:38 PM
|
0
|
0
|
370
|
POST
|
Please help me to correct this error:
....
....
....
# List all FOLDERS in master workspace
workspaces = gp.ListWorkspaces(dataFolders, "Folder")
# Iterate through the workspaces one at a time
for workspace in workspaces:
# Error:iteration over non-sequence
...
...
...
... View more
04-08-2012
08:40 PM
|
0
|
4
|
958
|
POST
|
Hy nodd, Try to do the following for part of checking: 1- make sure your shape file has data, (it seems you have an empty DBF file, means not data there !) 2- Open your shape file which has data in ArcView 3- Write down the coordinates of some feature data 4- Compare the coordinates, with any similar or close coordinates from other shapes, and try to figure out an approximate projection. My own decision, it is impossible to know the correct projection, without a help from your the source of the data.
... View more
04-07-2012
12:10 PM
|
0
|
0
|
392
|
POST
|
Thanks Darren I included zip-file 'p4605430_flt.zip' with files 'p4605430.flt' and 'p4605430.hdr', and i am still facing the same error, after changing the line to: arcpy.FloatToRaster_conversion("p4605430.flt", "p4605430.tif") Where it does work properly with full_path_name without workspace environment.
... View more
04-06-2012
01:56 PM
|
0
|
0
|
873
|
POST
|
Yes Daren, there is two files: d:\test\14605430.flt, d:\test\14605430.hdr Besides that, this script with replacing arcpy by arcgisscripting, and with small editing, was run succefully on ArcGIS 9.2 and 9.3 .
... View more
04-05-2012
01:10 PM
|
0
|
0
|
873
|
POST
|
Thanks Stacy for help, but i still have ERROR
import arcpy
import arcpy.mapping
arcpy.env.workspace = "d:\\test"
arcpy.env.overwriteOutput = True
try:
arcpy.FloatToRaster_conversion(
"14605430.flt",
"14605430.tif")
except:
print arcpy.GetMessages()
""" ERROR 010158: Unable to open file \14605430.flt. ERROR 010067: Error in executing grid expression. """
... View more
04-05-2012
01:23 AM
|
0
|
0
|
873
|
POST
|
Hy Katrina, Just a notice: did you include the next line:
import arcpy # or argisscripting
# ...
... View more
04-01-2012
11:49 AM
|
0
|
0
|
254
|
POST
|
arcpy.env.workspace doest not work when we use barename for input file ? # arcpy10.py # CPython 2.6, ArcGIS 10, IDLE, windows_XP import arcpy, sys import arcpy.mapping from arcpy import env arcpy.env.overwriteOutput = True arcpy.env.workspace = "d:\\test" # Fullpath of input file. arcpy.FloatToRaster_conversion( "d:\\test\\14605430.flt", "14605430.tif") try: # No fullpath of input file. arcpy.FloatToRaster_conversion( "14605430.flt", "14605430.img") except: print arcpy.GetMessages() sys.exit() """ Converting floating point file to grid ... Executing: FloatToRaster 14605430.flt d:\test\14605430.img Start Time: Sun Apr 01 12:58:49 2012 Failed to execute. Parameters are not valid. ERROR 000865: Input floating point raster file: 14605430.flt does not exist. Failed to execute (FloatToRaster). Failed at Sun Apr 01 12:58:49 2012 (Elapsed Time: 0.00 seconds) """
... View more
04-01-2012
04:14 AM
|
1
|
7
|
1930
|
Title | Kudos | Posted |
---|---|---|
1 | 04-01-2012 04:14 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|