POST
|
Hi Stephen, it would be easier to to it with Excel using the GISconnector. In Excel, use search/replace or strip the characters with =right(), =left()... Best Matthias
... View more
08-29-2014
12:49 PM
|
0
|
0
|
4640
|
POST
|
Dear Tammy, The GISconnector for Excel is very good to that; you can get a trial here: Try the GISconnector for Excel! Best regards, Matthias
... View more
08-28-2014
05:01 AM
|
0
|
0
|
228
|
POST
|
Dear David, I am not sure for what purpose you would like to create the variable? But if you would like to create this kind of array you can use the Excel formula "concatenate" to create the array from your column values. If you then like to transfer the Excel data to ArcGIS you can use the GISconnector for Excel. If you afterwards change your data again, in ArcGIS or in Excel, you can synchronize your data again using the GISconnector. ...everythin without Python Best, Matthias
... View more
08-20-2014
04:46 AM
|
0
|
1
|
1404
|
POST
|
Dear David, try the GISconnector for Excel. It will solve all your problems. Best, Matthias
... View more
07-29-2014
03:42 AM
|
0
|
0
|
401
|
POST
|
Dear Amit, there is a perfect solution for you! With the GISconnector for Excel you can work as you desire. You can do all your calculations in Excel and then synchronize with ArcIGS: http://www.gis-connector.com. It is much faster than programming with VBA. Best, Matthias
... View more
07-29-2014
03:36 AM
|
0
|
0
|
324
|
POST
|
Hi Michelle, no, I never got a response nor a solution from our ESRI service contractor. But I figured out the following: The spatial join tool seems not to be able to handle opreration in which many fields are involved - independetly if the features are calculated somehow or only transferred. So I reduced the number of fields / columns to a minimum and rejoined the previously deleted colums afterwards. So far, not all joining has been done....let's hope the best... Do you know 3dr party tools, which are able to perform the same operations? I found none. Yours Matthias
... View more
11-22-2011
12:42 AM
|
0
|
0
|
896
|
POST
|
Hallo JSkinn3, thany, the code works perfectly. Is it possible to loop through a folder, which contains several mxds and store all polygons in one fc? Yours, Matthias
... View more
11-22-2011
12:37 AM
|
0
|
0
|
3163
|
POST
|
Hallo, there are several topics on different forums concerning this matter, but I haven't found a hint how to this in ArcGIS 10. Do you have an idea or a code snippet? Thanx, Matthias
... View more
11-21-2011
08:22 AM
|
0
|
16
|
13248
|
POST
|
Thanx for the hint...but that cannot be the reason. All fields to be joined are numeric (short with values of either 0 or 1). As I said: With "first", it is working; minimum or maximum make the tool fail... I am clueless....but I really need to do the operation! Matthias
... View more
10-24-2011
09:06 AM
|
0
|
0
|
896
|
POST
|
Hallo, I am trying to perform a spatial join. I always get the error 999999 if I set the merge rule of one field to maximum? What could be the reason? If I use first (default); it is working. Matthias
... View more
10-24-2011
08:49 AM
|
0
|
7
|
3126
|
POST
|
Hi StacyRendall, why does every feature in the gdb must have both fields? Is it possible to configure it in a way, so that it just scips features which do not have to given fields? Yours, Matthias
... View more
09-27-2011
03:19 AM
|
0
|
0
|
239
|
POST
|
Hi StacyRendall, two things I have recognized: - the class breaks must contain a last element, which is the upper limit of all values, and so have one element more than the class values. Your code checks if both are equal; if not it interrupts the script...so I changed it to and it is working.... if len(classBreaks)- 1 != len(classValues):
arcpy.AddError('Class Values and Class Breaks must be the same length.') - if I choose a geodatabase or feature dataset and there a features inside which do have the value field but not the class field, the code stops.(also for those which have both fields) If I delete those with only a value field, the code works again. What could be the reason? Yours, Matthias
... View more
09-26-2011
07:56 AM
|
0
|
0
|
239
|
POST
|
Hi StacyRendall, thank you a lot for the hints...I was able to make the scirpt work. Yours Matthias
... View more
09-21-2011
06:53 AM
|
0
|
0
|
554
|
POST
|
Thanx, your points were right; that is the way I could fix the problem. Matthias
... View more
09-13-2011
10:50 PM
|
0
|
0
|
218
|
POST
|
Hi Stacy, thanx, my understanding for python is getting better an better, here is the code...it is not running so far... import arcpy
import arcgisscripting
gp = arcgisscripting.create()
Feature_Class = gp.GetParameterAsText(0) # Location of Geodatabase
classBreaks_str = gp.GetParameterAsText(1) # Break values (comma separated values)
classValues_str = gp.GetParameterAsText(2) # Classes (comma separated values) to be returned, must correspond with the Break values
valueField = gp.GetParameterAsText(3) # Field to be calculated on
classField = gp.GetParameterAsText(4) # Field for results to go in
classBreaks_str = '[' + classBreaks_str + ']' # add square brackets, so they look like lists
classValues_str = '[' + classValues_str + ']'
try: classBreaks = eval(classBreaks_str)
except SyntaxError: arcpy.AddError('Class Breaks was entered incorrectly; values must each seperated by a comma.')
except NameError: arcpy.AddError('Class Breaks was entered incorrectly; values must either be numbers or, if strings, within quotes.')
try: classValues = eval(classValues_str) # I called this classVals in the previous post
except SyntaxError: arcpy.AddError('Class Values was entered incorrectly; values must each seperated by a comma.')
except NameError: arcpy.AddError('Class Values was entered incorrectly; values must either be numbers or, if strings, within quotes.')
if len(classBreaks) != len(classValues):
arcpy.AddError('Class Values and Class Breaks must be the same length.')
def calc(x): # function that does the calculation
'''calc(x) iterates through the classBreaks until it finds the bounding values of the input number, then returns the corresponding value from classVals
'''
for i in xrange(len(classBreaks)-1):
if classBreaks <= x < classBreaks[i+1]:
return classValuess
elif x == classBreaks[-1]: # x equals the last value - wouldn't work above, as it is less than...
return classValues[-1]
return None # return something if the value isn't within the range, can be whatever you want - None will be converted to Arc NULL, but you could have 'No Class' or something like that, if you wanted...
listFCs = arcpy.ListFeatureClasses("*")
for fc in listFCs:
rows = arcpy.UpdateCursor(fc)
for row in rows:
row.classField = calc(row.valueField)
rows.updateRow(row)
try: del row
except NameError: pass
del rows
This is the error message: <type 'exceptions.RuntimeError'>: Row: Field valueField does not exist
Failed to execute (Classify) In the Parameter's dialogue, I configured the input as feature class and value- and classfield as field. But if I start the script and choose a fc, it doesnt read out the available columns (fields)? Is the parameter configuration wrong? If I want to loop through several feature classes and I define as input workspace or feature dataset, I have to input the valuefield and classfield names as string. Is this possible by just setting the parameter type of the script properties to string? Yours, Matthias
... View more
09-09-2011
02:08 AM
|
0
|
0
|
554
|
Online Status |
Offline
|
Date Last Visited |
11-06-2023
07:50 AM
|