POST
|
The attached zip file contains a Python script tool that calculates zonal mean aspect azimuth, and mean aspect class. The syntax for the fundamental calculation is: math.fmod(360 + (math.atan2(!MeanSin!, !MeanCos!)) * (180 / math.pi), 360)
... View more
12-07-2013
06:23 AM
|
3
|
3
|
3237
|
POST
|
In this case, param[0] is the input raster, param[1] is the input raster's RECLASS field (the field has a dependency on the input raster), and param[2] is the REMAP control itself (has a dependency on both the input raster and on the reclass field). Having said that, I'm still at 10.0, so have not had an opportunity to validate that this (or something like it) works in 10.1. ** For some reason, the indents aren't showing up in the ToolValidator code below... def initializeParameters(self): """Refine the properties of a tool's parameters. This method is called when the tool is opened.""" self.params[1].value = "VALUE" self.params[1].enabled = False self.params[1].parameterDependencies = [0] self.params[2].parameterDependencies = [0, 1] return
... View more
05-08-2013
06:22 AM
|
0
|
0
|
436
|
POST
|
A colleague of mine reports that at 10.1, adding the two parameter dependencies to the remap element under initializeParameters in ToolValidator (instead of updateParameters) was all that was needed to activate the �??Classify�?? and �??Unique�?? buttons and populate the remap table listing. So, there does appear to be hope on the horizon...
... View more
10-29-2012
02:08 PM
|
0
|
0
|
1166
|
POST
|
OK, another rookie mistake on my part. I'd been using the datasetType property without success, but the dataType property of os.path.dirname(feature class) distinguishes between a Folder, a Geodatabase, and a Feature dataset...which is what I needed. Thanks to Wayne and Jake for nudging my pea-brain in the right direction...
... View more
10-25-2012
09:47 AM
|
0
|
0
|
286
|
POST
|
How can I discover if the os.path.dirname of a feature class is a feature dataset or a geodatabase? I need to generate a stand-alone frequency table of values from the feature class, but I can only create that stand-alone table at the geodatabase level, not at the feature dataset level. Thanks...
... View more
10-24-2012
08:19 PM
|
0
|
3
|
540
|
POST
|
RafealR, did you ever resolve how to populate the remap value table automatically?
... View more
09-15-2012
09:03 AM
|
0
|
0
|
1166
|
POST
|
Another option is to create a topology rule for "must not have dangles", and then mass TRIM and EXTEND from the Topology Error Inspector using a reasonable search radius. TRIM and EXTEND will insure original directionality is preserved. Planarize lines if an actual intersection (split line) is required.
... View more
08-22-2011
12:45 PM
|
0
|
0
|
164
|
POST
|
No, I was unable to work it out. The two forms, one running against a shapefile and the other running against an AXF file, produce different results even though their code is identical. It is mysterious and disappointing...
... View more
02-08-2011
04:31 AM
|
0
|
0
|
489
|
POST
|
Quite right. The IDENTITY tool would do the trick, and quite rapidly. Thanks. On a more rhetorical level, however, I'm curious why my script has run successfully on 6 or 7 occassions in 9.2 (on the same PC, using the same dataset) but fails in 9.3.1.
... View more
09-20-2010
08:28 AM
|
0
|
0
|
237
|
POST
|
A Python script cursors through a set of 6,743 measured routes and uses SelectLayerByLocation with the WITHIN argument to select the route's underlying arcs. The script begins normally and produces the desired results, but it eventually wrecks, and never at the same record. In several trial runs, it has successfully processsed anywhere between 582 records on the low end and 1,842 records on the high end. Script coding appears valid, as desired results are consistently produced. I don't think it is a data problem because the script never wrecks in the same place, or near to the same place. In my view, that just leaves a breakdown in processing. Any suggestions or insights would be appreciated.
... View more
09-17-2010
09:05 AM
|
0
|
2
|
345
|
POST
|
Whenever I upgrade, I copy my data folders to an SD card and then reset the device back to factory defaults...essentially re-imaging the device back to its original factory state. Yes, it takes about 15 - 20 minutes to reload my device applications, but I'm always insured of a clean install.
... View more
07-28-2010
07:13 PM
|
0
|
0
|
186
|
POST
|
Just curious, why are you using a text field ("01") instead of a numeric field (1) to represent numeric quantities?
... View more
07-28-2010
06:58 PM
|
0
|
0
|
205
|
POST
|
Something else to consider in the GPS Analyst vs Pathfinder Office debate is (I'm pretty sure) that GPS Analyst does support ArcPad Checkout/Checkin to versioned SDE geodatabases.
... View more
07-28-2010
06:51 PM
|
0
|
0
|
498
|
POST
|
I created a QuickProject, and an AXF checkout. I added a "Get X Coord" button to each of the edit forms. The button's On Click event calls: MessageBox "The X coord is " & EditForm.Fields.Shape.X The AXF form returns a zero. The QuickProject form returns a legitimate X coord. See attached images. I don't know why the two forms produce a different result even though their code is identical.
... View more
07-14-2010
04:16 PM
|
0
|
0
|
489
|
POST
|
A new wrinkle has developed. The code MessageBox EditForm.Fields.Shape.X returns a legitimate X value when called from the OnLoad event of a point shapefile's form .apl that was created as a QuickProject. However, the identical code called from the OnLoad event of an AXF point layer's form returns a zero. Perhaps shapefiles and AXF layers don't behave the same way?
... View more
07-13-2010
06:51 AM
|
0
|
0
|
489
|
Title | Kudos | Posted |
---|---|---|
1 | 09-09-2023 09:43 PM | |
1 | 12-18-2021 09:16 AM | |
1 | 12-15-2021 07:14 PM | |
1 | 05-14-2021 07:12 AM | |
1 | 03-13-2021 04:11 PM |
Online Status |
Offline
|
Date Last Visited |
09-11-2023
08:57 AM
|