|
POST
|
presuming that the mean in Get Raster Properties is determined from the sum divideded by the number of cells (avg = sum/N), then perhaps you could exploit COLUMNCOUNT * ROWCOUNT to determine N. This would not of course work if there are nodata cells in the raster, and I would suggest that you explore this since there is no indication in the help whether nodata values are accounted for when calculating the statistical properties
... View more
05-10-2010
01:15 PM
|
0
|
0
|
1870
|
|
POST
|
you can have it both ways by directing your messages to a list, then printing them when desired. for example, you can use: messages = [] messages.append("hello") ..... messages.append("another message") ..... etc then use messages.append("finished processing") #print messages printMessages(messages) and it won't matter whether you are running the script from pythonwin or arctoolbox. A note, if you terminate any process using sys.exit() make sure that you throw the printMessages line before exiting and before the geoprocessor (gp) is deleted
def printMessages(messages):
'''provide a list of messages to this method'''
for i in messages:
print i
gp.AddMessage(i)
... View more
05-10-2010
01:03 PM
|
0
|
0
|
1797
|
|
POST
|
check http://arcscripts.esri.com/details.asp?dbid=14127
... View more
05-10-2010
05:30 AM
|
0
|
0
|
2575
|
|
POST
|
you appear to be using arcmap 9.2 or below, the example below is a snippet which demonstrates the differences. In 9.3, python list objects are now returned versus enumerations in previous versions. You will have to modify your code to include the reset and next lines (in two locations) to reflect the differences. try: #9.2 and below
fields.Reset()
field = fields.Next()
while field:
if field.Type in ok_fields:
num_fields.append(field.Name)
field = fields.Next()
except: #9.3 and above
for field in fields:
if field.Type in ok_fields:
num_fields.append(field.Name)
... View more
05-07-2010
09:55 AM
|
0
|
0
|
1320
|
|
POST
|
I agree with Bill's assessment. I would only add that if software is to continue to be awarded, it should not be awarded solely for one's performance in a 6 month period, but should reflect a cumulative contribution over a period of time. This might imply "thresholds" for awards which may be distastful for some, but would encourage and reward others that contribute continuously, but just don't make the "cut" for one MVP period. I can think of numerous contributors to this forum that have provided useful commentary, useful scripts/toolsets and yet have never won so much as a baseball cap (back in the old days, this was a serious MVP prize). Also, "threshold" contributors could be placed on the Beta programs to provide useful commentary before a release, or perhaps, the release of a new forum format.
... View more
05-03-2010
02:57 PM
|
0
|
0
|
815
|
|
POST
|
similar bugs appear with that error number, search on it, this might apply http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDQwNjk3 but there are others
... View more
05-03-2010
03:51 AM
|
0
|
0
|
1159
|
|
POST
|
visual inspection can be deceiving, don't rely on it. during the conversion process, did you ensure that the extent and cell size were explictly set during the conversion process? if not then ESRI defaults will come into play and the cell size and extent and hence counts etc may change. do not rely on anything unless you have check the most important steps. if none of this applies, then you will need to provide concrete screen grabs/zip files of what exactly you mean isn't happening so that others can investigate further Regards
... View more
04-30-2010
03:54 PM
|
0
|
0
|
2566
|
|
POST
|
adding 100 to a grid does not affect the count field, but the class values. The count fields represents the number of cells that belone to a particular class. convert your raster to a grid, assuming it is an integer grid, compare the before and after results of adding 100 to your original grid to confirm
... View more
04-30-2010
01:17 PM
|
0
|
0
|
2566
|
|
POST
|
your coordinates are in decimal degrees, aka Geographic, and need to be projected to a coordinate system that uses feet or meters (ie UTM etc), use the Project tool in Arctoolbox ( http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000007m000000.htm ) or project the data in ArcCatalog. The old forums contain hundreds of posts related to projecting data http://forums.esri.com/forums.asp?c=93 and equivalent help is in the older version help files ( http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1890&pid=1887&topicname=Project_(Data_Management) )
... View more
04-29-2010
09:30 AM
|
0
|
0
|
836
|
|
POST
|
why not use the Times tool (Spatial analyst tools, Math toolset, Times tool
... View more
04-28-2010
04:00 PM
|
0
|
0
|
1282
|
|
POST
|
You can also use sets to remove unwanted fields from lists, then convert back to a list. This removes the need for potentially long if statements. In the example below, the all_fields could be replaced by gp.ListFields. The alternate method not involving sets follows. >>> no_good_fields
['FID', 'Shape', 'OID']
>>> all_fields
['Area', 'Perimeter', 'Shape', 'FID', 'OID']
>>> good_fields = list(set(all_fields) - set(no_good_fields))
>>> for a_field in good_fields:
... print a_field
...
Perimeter
Area
>>> no_good_fields = ['FID', 'Shape', 'OID']
>>> all_fields = ['Area', 'Perimeter', 'Shape', 'FID', 'OID']
>>> for a_field in all_fields:
... if a_field not in no_good_fields:
... print a_field
...
Area
Perimeter
... View more
04-28-2010
10:48 AM
|
0
|
0
|
1320
|
|
POST
|
similar approaches have been proposed before http://forums.esri.com/Thread.asp?c=93&f=982&t=191468&mc=11#569228 however, they require extra cost extensions (ie 3D analyst etc)
... View more
04-23-2010
09:34 AM
|
0
|
0
|
1539
|
|
POST
|
if the points are sequential, then look at ET Geowizards for tools to convert points to poly* features, if the features are not sequential and you want some of the concavity to be maintained then you are looking for a concave hull for which there is no existing tools within the Arc environment. if the pattern is something else, perhaps a illustrative picture might generate some ideas
... View more
04-23-2010
07:22 AM
|
0
|
0
|
1497
|
|
POST
|
http://arcscripts.esri.com/details.asp?dbid=14535 has a variety of containers including convex hull
... View more
04-23-2010
06:02 AM
|
0
|
0
|
1497
|
|
POST
|
As Bill has suggested, this and other issues have been discussed in the past. Many of the solutions are the result of not specifying a working directory/source directory that doesn't contain spaces etc, grid names which exceed 13 characters and/or begin with a number. If you comply with these and set your analysis properties in ArcToolbox or with the SA toolbar options explicitly, then many of the errors "go away". SA has not been updated to reflect newer programming environments in a number of years (ie numeric precision of floating point grids) so the user has to be cautious. Good luck
... View more
04-22-2010
11:54 AM
|
0
|
0
|
1502
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-05-2019 05:21 PM | |
| 1 | 09-02-2016 08:05 AM | |
| 1 | 01-15-2018 01:10 PM | |
| 1 | 09-17-2018 12:48 AM | |
| 1 | 02-20-2020 02:55 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|