POST
|
I am doing some large scale attribute accumulation requiring 8-12 hours and have the attributes in multiple fields. Is there a way to setup the attribute accumulation for multiple fields at the same time? Currently, I am doing these by making copies of the feature class and running attribute accumulation separately. Looking for a more efficient way to process these. Thanks.
... View more
07-28-2016
07:16 AM
|
0
|
0
|
1187
|
POST
|
Thanks for your response. Trying to understand your solution...So in my case the "origin" cells are water. I need distance from only urban areas to water. If I create a raster with 1 for water and NoData for everything else, euclidean will calculate distance from every NoData cell to the water. Whereas my interest is only in urban NoData cells to water. Right now I am doing a Con on the output from euclidean raster to filter out euclidean distance for urban cells. Trying to see if euclidean operation can be constrained to only urban cells.
... View more
07-08-2016
09:50 AM
|
0
|
3
|
683
|
POST
|
I have a land use raster and trying to find euclidean distance from specific classes only to source cells. The problem is that the Euclidean operation will find distance from every cell in the raster to the source cells which can be time consuming. The information I need is only for a smaller subset of the cells. Right now my option is to filter the distance values for the specific cells as a post-process step. But wondering if there is a way to constrain the euclidean distance process to specific cells only?
... View more
07-08-2016
09:18 AM
|
0
|
5
|
2724
|
POST
|
Hi, Does anyone know of a readily available USLE LS factor grid for the conterminous US? Thanks, Naresh
... View more
05-22-2014
10:16 AM
|
0
|
0
|
1609
|
POST
|
Hey Erik, Can I get a copy of your script? I am trying to accumulate attributes in a polygon shapefile with 84k records and my estimate is that it will take weeks to complete. Thanks, Naresh
... View more
09-30-2013
06:32 AM
|
0
|
0
|
555
|
POST
|
I would examine the hydrological unit codes closely. In the for loop, try putting: print str(HUC) to see if anything looks unusual. Naresh
... View more
06-05-2012
05:16 PM
|
0
|
0
|
569
|
POST
|
It would be useful to give the forum some code to start with. You may need arcpy.AddField_management and arcpy.CalculateField_management to get started with the loop. Naresh Pai
... View more
04-01-2012
11:53 AM
|
0
|
0
|
511
|
POST
|
Hi Darren, Thanks for your response. Yes, I would like to store all the values in the "Value" field of the table in a variable for categorical raster. The way I do it right now is, k=0 rows = arcpy.SearchCursor(RasterName,"","","Value","") for row in rows: val = row.getValue("Value") k = k + 1 Can this code be reduced? Naresh
... View more
03-30-2012
12:52 PM
|
0
|
0
|
544
|
POST
|
Is there a direct way to store all the unique values in raster attribute table? Right now, I am using a search cursor for attribute table and then, a for-loop to store the values. I wish GetRasterProperties_management would have "UNIQUEVALUES" in addition to the "UNIQUEVALUECOUNT" Thanks, Naresh
... View more
03-30-2012
11:05 AM
|
0
|
3
|
1155
|
POST
|
Alright, I have found a solution that would work (for now):
for i in range(0,800):
arcpy.MakeRasterLayer_management(Mask_Rst,"MaskRst_lyr","Rowid = "+ str(i))
outExtractByMask = ExtractByMask(InRst,"MaskRst_lyr")
outExtractByMask.save(OutDir + "\\rst" + str(i))
... View more
12-20-2011
11:33 AM
|
0
|
0
|
677
|
POST
|
Could you use ExtractByAttributes(in_raster, where_clause) instead of SelectLayerByAttribute_management(in_layer_or_view, {selection_type}, {where_clause})? Thanks for your reply. My Mask Raster has about 800 rows in its attribute column which I want to use sequentially for performing Extract by Mask with In Raster. Your solution would work well except that it would create about 800 additional rasters.
... View more
12-20-2011
11:22 AM
|
0
|
0
|
677
|
POST
|
I tried your suggestion: arcpy.MakeFeatureLayer_management works only for a feature layer (not raster). My overall goal is to perform an Extract by Mask operation in which the Mask is another raster (with specific attributes selected, sequentially, by an SQL query). Is there an alternative to perform this operation?
... View more
12-20-2011
09:29 AM
|
0
|
0
|
677
|
POST
|
I want to replicate something that I can do within ArcMap and model builder. I have a categorical raster with an attribute table consisting of 10 fields "Rowid", "Value", and "Count". I would like to use the SelectLayerByAttribute_Management tool using arcpy. My code so far is: # Import arcpy module import arcpy # define the location of raster titled rstName Rst = "C:/..../rstName" # Select Rowid = 0 arcpy.SelectLayerByAttribute_management(Rst, "NEW_SELECTION", "\"Rowid\" = 0") The error msg I get is: * File "C:\...\abc.py", line 16, in <module> *** arcpy.SelectLayerByAttribute_management(Rst, "NEW_SELECTION", "\"Rowid\" = 0") * File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 4259, in SelectLayerByAttribute *** raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000840: The value is not a Table View. ERROR 000825: The value is not a layer or table view ERROR 000840: The value is not a Mosaic Layer. Failed to execute (SelectLayerByAttribute). ------------------------- Can some help me troubleshoot this issue?
... View more
12-20-2011
08:35 AM
|
0
|
6
|
1151
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|