|
POST
|
You may get better results by flipping it around (I suspect the problem is to do with "== null"): If((document.getElementById("eMail").value) && document.getElementById("eMail").value != "")
... View more
05-01-2015
11:35 AM
|
2
|
3
|
2694
|
|
POST
|
sendEmail takes one parameter, but you pass none inside the else block. Although, you never actually use 'ev', so you may as well remove it.
... View more
05-01-2015
11:23 AM
|
2
|
0
|
2694
|
|
POST
|
If I understand correctly, your first step is to import your coordinates into ArcMap (for example, from an Excel worksheet). Make sure you specify the coordinate system in which your points were recorded (probably either UTM or WGS84). From there your tasks depend on what exactly you want to do - draw sector polygons, add a field to the polygons to link to sightings, etc.
... View more
05-01-2015
10:41 AM
|
0
|
1
|
1361
|
|
POST
|
I believe you've got your update and search cursors mixed up. The way it is now, you are calling updateRow not once per empty cell in mSoils, but once per empty cell in mSoils times the number of rows in mLanduse_SpatialJoin. As a side effect, all empty cells in mSoils will get the last value in mLanduse_SpatialJoin. Do you want all of the blank cells to be the same value? If not, when you loop through the search cursor (as the inside loop) you need to evaluate the equivalency of some value in the update cursor to some matching value in the search cursor.
... View more
05-01-2015
09:28 AM
|
1
|
0
|
2045
|
|
POST
|
Alternatively, you can do the following in the field calculator. I'm not sure what the performance implications of creating a one-row Search Cursor for every row in your data would be, but it works. def addition(fid):
fc = "points"
myField = "prior2_3"
fieldList = []
fieldList.append(myField )
hitsFields = arcpy.ListFields(fc,"Hits*")
for hitsField in hitsFields:
fieldList.append(hitsField.name)
with arcpy.da.SearchCursor(fc,fieldList,' "FID" = ' + str(fid)) as cursor:
for row in cursor:
sum = 0
for field in range(1,len(fieldList)):
sum += int(row[field])
return sum the expression would be: addition(!FID!)
... View more
04-30-2015
04:14 PM
|
0
|
0
|
1540
|
|
POST
|
If you're open to bypassing the field calculator completely, you can do this with an Update Cursor and plain old Arcpy. >>> fc = "points" # your feature layer
... myField = "prior2_3" # the field name
... fieldList = [] # empty list
... fieldList.append(myField ) # add the known field name to the list
... hitsFields = arcpy.ListFields(fc,"Hits*") # find all the fields starting with "Hits"
... for hitsField in hitsFields:
... fieldList.append(hitsField.name) # add the hits field names to the list
... with arcpy.da.UpdateCursor(fc,fieldList) as cursor:
... for row in cursor:
... sum = 0
... for field in range(1,len(fieldList)): # loop through all hits fields
... sum += int(row[field]) # add the values
... row[0] = sum # store the value in the known field, first in the list
... cursor.updateRow(row) # update the field
... View more
04-30-2015
03:57 PM
|
1
|
1
|
1540
|
|
POST
|
In ArcCatalog, go into the feature class properties. Delete and recreate the spatial index. Fixes some random geometry problems.
... View more
04-30-2015
01:44 PM
|
0
|
1
|
2859
|
|
POST
|
Just a note that this is a field calculator expression, not label expression, which is quite different. Of course, you could calculate the label to a new field, but that's an added step.
... View more
04-30-2015
10:14 AM
|
1
|
0
|
2947
|
|
POST
|
There are a few tricky little things, so here goes. I don't believe there is such thing as !<, use >= instead. You can't concatenate numbers to strings, cast to string using str(). You'll have to decide if you really mean "if, if, if" or "if, elif, elif" - either can be used if you know what it means. def FindLabel ( [Field1] , [Field2] ):
if [Field1] > 0 and [Field2] < 0:
return "text: " + str( [Field1] )+ " text: " + str( [Field2] )
if [Field1] > 0 and [Field2] >= 0:
text = "text: " + str([Field1] )
return text
if [Field1] <= 0 and [Field2] < 0:
return "text: " + str( [Field2] )
... View more
04-30-2015
10:09 AM
|
2
|
0
|
2947
|
|
POST
|
Please refer to this help page as a start for building label expressions, and this post for posting code blocks.
... View more
04-30-2015
09:42 AM
|
3
|
0
|
2947
|
|
POST
|
You do most of your task using Spatial Join on the point file itself, as both Target and Join Features, ONE_TO_MANY, WITHIN your distance. In the output, select and delete points where TARGET_FID = JOIN_FID (that is the point joined to itself). You can then select the matching rows which meet your criteria, and count using Summary Statistics, grouping on TARGET_FID.
... View more
04-30-2015
09:18 AM
|
2
|
1
|
4648
|
|
POST
|
The first parameter for ListFeatureClasses is a wildcard, so it is searching for a feature class equal to your workspace path. Try: fc = arcpy.ListFeatureClasses()
... View more
04-28-2015
10:57 AM
|
2
|
1
|
1473
|
|
POST
|
You are talking about sorting columns, not rows, correct? For example, in your spreadsheet, "Armenian" would always come first.
... View more
04-28-2015
09:29 AM
|
0
|
2
|
2570
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|