|
POST
|
This might help give you some ideas: http://forums.arcgis.com/threads/13832-Create-Composite-Line?p=45205&viewfull=1#post45205 Another way would be to use a raster approach - with really small cells. Something like EuclideanDistannce: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z0000001p000000.htm
... View more
01-16-2012
08:47 AM
|
0
|
0
|
13199
|
|
POST
|
Some suggestions: 1. v10.0 map algebra syntax is pretty hokey I think, but it is doable. This post (my own v10.0 flailings) may help: http://forums.arcgis.com/threads/47540-Lookup-function-in-v10.0-Map-Algebra-implementing-dot-notation-in-v10.0 2. Continue to use the pre-v10 raster algebra syntax in v10.0... it's still there just hidden: arcpy.gp.SingleOutputMapAlgebra_sa(blah, blah)
... View more
01-16-2012
08:25 AM
|
0
|
0
|
1550
|
|
POST
|
Either the Merge or Append tools are what you are looking for (accessed via ArcToolbox). There is always a chance of things not going the way we think the will. Make a backup copy.
... View more
01-13-2012
06:18 AM
|
0
|
0
|
748
|
|
POST
|
Okay... I got it to work with the help-system advertised syntax of: Lookup("gnn", "CANCOV") The trick is (which makes sense to me now): Using the RasterCalculator toolbox tool, you MUST first set the workspace (geoprocessing envr. setting) to where the input raster datasets is located. If the Workspace remains set to it's default (that stupid Default.gdb thing), the tool will fail with the error message in my post aabove. Now that I think of it, the error message kinda makes sense now. Prior to v10.0 you did not have to set the Workspace to get the map algebra (executed via ArcMap) to function properly... now you do! I guess this is the difference between a toolbox-exectuted tool (RasterCalculator) and the now defunct pre-v10.0 Raster Calculator that was accesible through the Spatial Analyst toobar. This is the correct syntax then: Con((Lookup("gnn", "CANCOV") >= 70) & (Lookup("gnn", "STNDHGT") >= 23), 1, 0) Too bad it now takes a way longer time to execute now that it has to extract the "CANCOV" and "STNDHGT" fields to seperate grids... When all it actually needs to do is build a cross reference table between the user-specified field value and the "Value" field, which is what the old "dot notation" syntax did. But at least I got it to work... ESRI: Please bring back native dot notation functionality... the kind that builds a crosstabulation table, not this new hokey kind that has to extract the field values out to seperate rasters.
... View more
01-12-2012
03:29 PM
|
0
|
0
|
3641
|
|
POST
|
Hi Jeff, Thanks for the info, but I get the same error when I use the syntax you provided: The expression Lookup(Raster("gnn"), "CANCOV") yeilds this error message: Executing: RasterCalculator Lookup(Raster("gnn"), "CANCOV") C:\Users\csny490\Documents\ArcGIS\Default.gdb\rastercalc3 Start Time: Thu Jan 12 16:40:31 2012 Lookup(Raster("gnn"), Raster(r"CANCOV")) ERROR 000539: Error running expression: rcexec() <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 001000: Lookup field: Field C:\Users\csny490\Documents\ArcGIS\Default.gdb\CANCOV does not exist Failed to execute (Lookup). Failed to execute (RasterCalculator). Failed at Thu Jan 12 16:40:32 2012 (Elapsed Time: 1.00 seconds) An interesting note in that error message is this part: Lookup(Raster("gnn"), Raster(r"CANCOV")) I'm not sure what to make of it other than... why, in the error message, is it putting the "raster()" tag around the field name component? I'm using v10.0 SP3 BTW...
... View more
01-12-2012
02:49 PM
|
0
|
0
|
3641
|
|
POST
|
Aliases can be added/altered/droped via a featurelayer and/or a layer file: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000006p000000 http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Save_To_Layer_File/001700000070000000/ However, I don't think they can be altered/dropped directly via the featureclass in arcpy.
... View more
01-11-2012
01:08 PM
|
0
|
0
|
1765
|
|
POST
|
I have a need to do analysis on a multi-field raster dataset in ArcMap v10.0. I am accustomed to using "dot notation" that was natively supported in ESRi products for the last 20+ years... In this thread (http://forums.arcgis.com/threads/16689-Using-raster-attribute-other-than-value-in-map-algebra), it seems that there is now a function called Lookup(), which you can now use to emulate the old fashioned .notation functionality. Great. However, what I seem to be unable to do is to use the Lookup() function in Map Algebra... It works fine via the toolbox, but not if building complex Map Algebra expresions. So, basically this is an example of a v9.3 SOMA expression I want to use in v10: con([gnn].CANOV >= 70 & [gnn].STNDHGT >= 23, 1, 0) According to the help, this should be the analogous statement in the new Map Algebra con(((Lookup("gnn", "CANCOV")) >= 70) & (Lookup("gnn", "STNDHGHT")) >= 23), 1, 0) But it errors out on the Lookup() command... In fact I can't even run this through the raster calculator: Lookup("gnn", "CANCOV") The error message for both these v10.0 examples is: ERROR 000539: Error running expression: rcexec() <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 001000: Lookup field: Field C:\Users\csny490\Documents\ArcGIS\Default.gdb\CANCOV does not exist Failed to execute (Lookup). Failed to execute (RasterCalculator). ...which is pretty interesting because my raster "gnn" is not stored in the Default.gdb, and, why would it be concatenating the field I want to lookup with the stupid path to Default.gdb anyway! This leads me to belive that either: 1. I am doing something wrong or 2. The Lookup() spatial analyst functiona can't be accessed via the "new and improved" map algebra, even though the Help topic indicates it can. How can I implement this traditional "dot notation" functionality in the new v10.0 Map Algebra?
... View more
01-11-2012
12:10 PM
|
0
|
10
|
8510
|
|
POST
|
Agreed - All these bells and whistles are quite annoying - especially when you can't turn them off! Especially annoying when they affect (even just a little) geoprocessing performance... Verified: Using arcpy.gp.logHistory = False does keep the .xml geoprocessing history files at bay (for Windows 7 stored in C:\Users\<username>\AppData\Roaming\ESRI\Desktop10.0\ArcToolbox\History) However, there doesn't appear to be anyway from writting that dribble to the dataset metadata. SUPER LAME!!!
... View more
01-10-2012
08:38 AM
|
0
|
1
|
4487
|
|
POST
|
Some other things to try: 1. Compact the Default.gdb 2. Delete the geoprocessing history (in Windows 7 the history .xml files are in C:\Users\csny490\AppData\Roaming\ESRI\Desktop10.0\ArcToolbox\History) 3. Turn off/suspend/alter your virus scan software. 4. Delete your normal.mxt template file (make a backup first!!!). This file will autocreate anew when you fire up ArcMap again, but all your settings (toolbars, customizations, etc.) will be removed. In windows 7, C:\Users\csny490\AppData\Roaming\ESRI\Desktop10.0\ArcMap\Templates\Normal.mxt
... View more
01-10-2012
07:12 AM
|
0
|
0
|
1346
|
|
POST
|
If you are down with Python, this code will assign a unique ID to the features that are within a given distance of each other. It relies on a recursive SelectByLocation.
... View more
01-09-2012
07:29 AM
|
0
|
0
|
1457
|
|
POST
|
Right I get it... as Amanda (circa 2007) states, there is no way to do this except to create a concatenated field in the input and output tables. Not that much overhead though really. Another option I use a lot is to populate a Python dictionary such as: relateDictionary = {(1,2) = "cat", (2,2) = "dog"} where 1,2 and 2,2 are unique combinations of the relate keys, but that requires some programming using a search and update cursor...
... View more
01-06-2012
06:07 PM
|
0
|
0
|
1224
|
|
POST
|
Use the SummaryStatistics tool: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00080000001z000000.htm It does everything that Frequecy does and more...
... View more
01-06-2012
02:13 PM
|
0
|
0
|
1224
|
|
POST
|
No doubt gdal is faster for many things, but... 1) Why not just project it in raster format? Since there is no datum transformation, I don't (think?) you would get any meaningfully added precision by converting to point format and projecting that. 2) You listed the .shp file size as being 2,089,840 MB, which is basically the 32-bit 2.1GB file size limit... Are you sure ALL your points made it to the shapefile?
... View more
01-05-2012
03:21 PM
|
0
|
0
|
682
|
|
POST
|
An update cursor in Python would be much easier to format this, but if you wanted to do it in the field calculator, the Python formatted code would look like this ugly thing here: gp.CalculateField_management(myFC, "Start_time", "returnvalue(!Period_Sta!)", "PYTHON", "def returnvalue(periodStaFieldValue):\\n if periodStaFieldValue == '01/01':\\n return '1'\\n elif periodStaFieldValue == "01/04":\\n return '91'\\n elif periodStaFieldValue == "30/09":\\n return '273' \\n elif periodStaFieldValue == "31/12":\\n return '365'") or in an update cursor... updateRows = arcpy.UpdateCursor(myFC)
for updateRow in updateRows:
if updateRow.Period_Sta == '01/01':
updateRow.Start_time = '1'
elif updateRow.Period_Sta == '01/04':
updateRow.Start_time = '91'
elif updateRow.Period_Sta == '30/09':
updateRow.Start_time = '273'
elif updateRow.Period_Sta == '31/12':
updateRow.Start_time = '365'
updateRows.updateRow(updateRow)
del updateRow, updateRows
... View more
01-05-2012
07:21 AM
|
0
|
0
|
1288
|
|
POST
|
I found it's actually: arcpy.gp.logHistory = False and not arcpy.gp.loghistory = False (case sensitivity of v10 matters even though it's from gp... but I guess arcpy.gp) Anyway, go to find that's why I had 4GB of history .xml files in my profile!
... View more
12-16-2011
01:11 PM
|
0
|
0
|
4487
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-25-2014 12:57 PM | |
| 1 | 08-29-2024 08:23 AM | |
| 1 | 08-29-2024 08:21 AM | |
| 1 | 02-13-2012 09:06 AM | |
| 2 | 10-05-2010 07:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-30-2024
12:25 AM
|