|
POST
|
It will work after you comment out the following line: registry.byId("locate").on("click", locate); Also, here is an update to the previous code I sent using the new "dojo/on" module if you're interested: on(dom.byId("address"), "keyup", function(event){
if (event.keyCode == 13 && this.value.length > 0) {
locate();
}
}) You will need to add "dojo/on" and "on" to require and function.
... View more
02-11-2014
09:42 AM
|
0
|
0
|
2727
|
|
POST
|
Do you have the field 'Address_ID' in the feature class?
... View more
02-11-2014
09:28 AM
|
0
|
0
|
3303
|
|
POST
|
Hi Keisuke, Try adding the following before the locate() function: dojo.connect(dom.byId("address"), 'onkeyup', function(event) {
if (event.keyCode == 13 && this.value.length > 0) {
locate();
}
});
... View more
02-11-2014
09:04 AM
|
0
|
0
|
2727
|
|
POST
|
Open up the Python window in ArcMap and then execute the tool. Any errors reported?
... View more
02-11-2014
07:50 AM
|
0
|
0
|
3303
|
|
POST
|
Hi Mark, I was working with a customer who was also using the Citizen Service Request app. The app was used by the public to enter requests. We created a web map in ArcGIS.com, and then an application using the Edit template for the staff to update the requests. One option you could do is to create a web map and apply a filter for the requests User B needs to update. Save this web map, and then convert it to the edit application. You can easily remove the editor widget, so when user B logs in to the application they will only see and update the requests they are assigned. The same steps can be applied for User C. One drawback is that there will be a couple applications rather than just one.
... View more
02-11-2014
06:36 AM
|
0
|
0
|
1774
|
|
POST
|
Hi Tony, Since you are working with a Personal Geodatabase, you will not need to start an edit session. Try the following: def onMouseDownMap(self, x, y, button, shift):
arcpy.env.workspace = r"C:\temp\test.mdb"
fc = "Point"
list = []
with arcpy.da.SearchCursor(fc, ["Address_ID"]) as cursor:
for row in cursor:
list.append(row[0])
del cursor
list.sort()
Address_ID = list[-1] + 1
row_values = [(x, y, (x, y), Address_ID)]
cursor = arcpy.da.InsertCursor(fc, ["X_Coord", "Y_Coord", "SHAPE@XY", "ADDRESS_ID"])
for row in row_values:
cursor.insertRow(row)
del cursor
arcpy.RefreshActiveView()
... View more
02-11-2014
06:01 AM
|
0
|
0
|
3303
|
|
POST
|
Hi Mark, Here is an example on how to do this using the arcpy.da.UpdateCursor (10.1 or beyond is required): import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" fc = "featureClass" with arcpy.da.UpdateCursor(fc, ["field1", "field2"]) as cursor: for row in cursor: if row[0] == 1: row[1] = 'Woodland' if row[0] == 2: row[1] = 'Arable' ...... ..... cursor.updateRow(row) del cursor, row
... View more
02-11-2014
03:06 AM
|
0
|
0
|
1066
|
|
POST
|
If there is a match it then updates the feature class(fc) based on the match from the table(not sure if that makes sense). You can accomplish by simply Joining the table to the feature class using the 'Add Join' function. Next, run the 'Calculate Field' function to update the required fields. Else: the unmatched records from the table (Table1) are new, so it takes these new records You can get the unmatched records by comparing a list of Incident IDs from the feature class and table, and then selecting the incidents that are unmatched. Ex: fc = "fc"
table = "table1"
fcIncident = []
tableIncident = []
with arcpy.da.SearchCursor(fc, ["INCIDENT_ID"]) as cursor:
for row in cursor:
fcIncident.append(row[0])
del row, cursor
with arcpy.da.SearchCursor(table, ["INCIDENT_ID"]) as cursor:
for row in cursor:
if not row[0] in fcIncident:
tableIncident.append(row[0])
del row, cursor
arcpy.MakeTableView_management(table, "tblView")
for ID in tableIncident:
arcpy.SelectLayerByAttribute_management("tblView", "ADD_TO_SELECTION", "INCIDENT_ID = " + str(ID)) which should also add XY fields and a spatialjoin of the geocode result with 3 polygon feature classes (ccd, ced, scd) and updates the necessary fields(ccd_name, ccd_desc, ced_name, ced_desc , scd_name and scd_desc) in the feature class(fc) based on the spatialjoin You can now geocode the "tblView", create the Spatial Join, and update the required fields: arcpy.GeocodeAddresses_geocoding("tblView", .....)
FCs = [ccd, ced, scd]
for fc1 in FCs:
arcpy.SpatialJoin_analysis(fc1, geocodeResult, fc1 + "_join")
arcpy.MakeFeatureLayer_management(fc, "fcLyr")
arcpy.MakeFeatureLayer_management(fc1, "fc1Lyr")
arcpy.AddJoin_management("fcLyr", "INCIDENT_ID", "fc1Lyr", "INCIDENT_ID", "KEEP_COMMON")
arcpy.CalculateField_management("fcLyr", "fc.ccd_name", ....)
arcpy.CalculateField_management("fcLyr", "fc.ccd_desc", ....)
.... Note: the field name will change when a join is present. The field name will begin with the feature class/table name. i.e. "parcels.ccd_name"
... View more
02-10-2014
11:04 AM
|
0
|
0
|
1867
|
|
POST
|
You can select only the features that you would like buffered, and then execute the tool. Be sure to use the dropdown to select the input feature. The selection will be honored, and only these features will be buffered.
... View more
02-10-2014
09:38 AM
|
0
|
0
|
7725
|
|
POST
|
Hi Tim, It looks like you are not calling a couple modules: "dojo/dom" "dojo/dom-construct" Add these, and the appropriate key words to the function: dom, domConstruct And the application should work.
... View more
02-10-2014
07:47 AM
|
0
|
0
|
1077
|
|
POST
|
Hi Nathanael, What are the two coordinate sytems that your map is using? You may need to apply a datum transformation using the ProjectParameters class.
... View more
02-07-2014
10:24 AM
|
0
|
0
|
1020
|
|
POST
|
Can you post the entire script? It's tough to troubleshoot without knowing what the variables are.
... View more
02-07-2014
07:54 AM
|
0
|
0
|
2439
|
|
POST
|
Hi Kyle, This is located in Data Management Tools > Fields. Also, if you have trouble finding a tool you can open the 'Search' window and search for the tool there. [ATTACH=CONFIG]31235[/ATTACH]
... View more
02-07-2014
07:30 AM
|
0
|
0
|
2494
|
|
POST
|
I believe the problem is when you run the Near analysis. You are still running this on the SDE feature class. Try the following instead: arcpy.Near_analysis(ws + "\\" + gdb_fc, gdb_asset_name, "#", "#", "ANGLE")
... View more
02-07-2014
07:28 AM
|
0
|
0
|
2439
|
|
POST
|
Hi Matt, Not sure what is causing the error (may need to contact Tech Support), but you can continue to execute the rest of your script using a try/except. Ex: try:
arcpy.RasterToPolygon_conversion(inRaster, outPolygons, "NO_SIMPLIFY")
except ExecuteError:
pass
... View more
02-07-2014
06:35 AM
|
0
|
0
|
799
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 12:27 PM | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|