|
POST
|
This was extremely helpful and I was able to modify it for my purposes. However, there is an error in the script posted. When you loop through the "for i in range" part, you have to put in [i] as the index. I am reposting the script with my fix. ## f1 is temporary feature class with todays date, output by other processes.
f1 = "RSE20190328"
fields = ['L_StName','L_StDir','L_StTypP','L_StTypS','L_PlName'] ## street name, street direction, street type prefix, street type suffix and place name
with arcpy.da.SearchCursor(f1,fields, sql_clause=('DISTINCT','ORDER BY L_PlName, L_StName, L_StTypS')) as cursor1:
for row1 in cursor1:
street_name = row1[0]
street_direction = row1[1]
street_prefix = row1[2]
street_suffix = row1[3]
street_place_name = row1[4]
## some street names have apostrophes in them - make the search replace that with a % because no combination I tried of escaping or backslashing the quote seemed to work correctly
where2 = "L_StName = '" + street_name.replace("'","%") + "'"
if street_direction is not None:
where2 += " and L_StDir = '" + street_direction + "' "
if street_prefix is not None:
where2 += " and L_StTypP = '" + street_prefix + "'"
if street_suffix is not None:
where2 += " and L_StTypS = '" + street_suffix + "'"
## some place names have apostrophes in them - make the search replace that with a % because no combination I tried of escaping or backslashing the quote seemed to work correctly
if street_place_name is not None:
where2 += " and L_PlName = '" + street_place_name.replace("'","%") + "'"
## work with left and right sides separately as they may have 0,0 ranges in different spots.
fields2 = ['L_LADD','L_HADD','ID'] ## left low address and left high address
list2 = [] ## put results into list so we can easily compare each row to the previous row -- hard to do in a cursor
with arcpy.da.SearchCursor(f1, fields2, where2, sql_clause=(None,'ORDER BY L_LADD, L_HADD')) as cursor2:
for row2 in cursor2:
if row2[0] == 0 and row2[1] == 0: ## ignore 0,0 ranges for my purposes
continue
list2.append([row2[0], row2[1], row2[2]])
for i in range (0, len(list2)-1):
if list2[i][1] == list2[i+1][0] - 2: ## if there is a gap of exactly 2 there is no gap or overlap
##print "1: Good"
continue
elif list2[i][1] <= list2[i+1][0]:
print "2:Gap" ## print results for now - eventually I will put the results into a separate list, and do an update cursor on them to
print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list2)
continue
elif list2[i][1] > list2[i+1][0] - 2 :
print "3:Overlap"
print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list2)
continue
fields3 = ['R_LADD','R_HADD','ID'] ## right low address and right high address
list3 = []
with arcpy.da.SearchCursor(f1, fields3, where2, sql_clause=(None,'ORDER BY R_LADD, R_HADD')) as cursor3:
for row3 in cursor3:
if row3[0] == 0 and row3[1] == 0: ## ignore 0,0 ranges for my purposes
continue
list3.append([row3[0], row3[1], row3[2]])
for i in range (0, len(list3)-1):
if list3[i][1] == list3[i+1][0] - 2:
##print "1: Good"
continue
elif list3[i][1] <= list3[i+1][0]:
print "2:Gap"
print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list3)
continue
elif list3[i][1] > list3[i+1][0] - 2 :
print "3:Overlap"
print street_name + " " + street_suffix + " " + street_place_name + ": " + str(list3)
continue
... View more
04-15-2022
12:30 PM
|
0
|
0
|
3265
|
|
POST
|
I am struggling with this, too. I have an open support case with no resolution after weeks and weeks (includes the non-updating of Field Maps data when the data is updated using this method). I started doing the delete and append in Notebook on AGOL to try to avoid connection errors, but it still fails sometimes. I was hoping to automate it with Notebook when that functionality comes online next week but if it's still going to fail half the time that won't work either.
... View more
04-06-2021
09:52 AM
|
0
|
0
|
3291
|
|
POST
|
Thanks for the response, @ColinLawrence. When I follow the pull-down menus on support, under Apps and Mobile Apps, there is no option for Field Maps. I will try to call or choose Online. It happens on other map areas, too. When I went back to my device just now after a day, it showed an update available for the map area I've been working with, which I downloaded. But the data are still stale. The map doesn't show up in Collector as an option.
... View more
01-29-2021
01:03 PM
|
0
|
1
|
2269
|
|
POST
|
1) I don't seem to be able to pick ArcGIS Field Maps as a product on the Esri Support page. How do I start a support case online? 2) I set up a hosted feature layer and view which are sync enabled. I found some API for Python code to empty the feature layer using delete_features and append, since truncate doesn't work on sync enabled layers AFAIK. (The data are for viewing, not editing.) I also have it set to refresh the map areas through the Map Area interface daily, and have done it manually, too. Everything looks good on a feature with changed attributes, including searches in the Map Area interface, on the hosted feature layer and view in Map Viewer, and bringing the layers into Pro. However, ArcGIS Field Maps (on two different iOS devices) refuses to show updates. Even if I remove the area and re-download, the stale data remain. And on ArcGIS Online, the edit date for the layer is showing the original upload date, even though my script runs daily to delete/append. It's like AGOL is not registering the changes made through the API for Python and passing on that bad info to FieldMaps. Any suggestions?
... View more
01-28-2021
10:35 AM
|
1
|
3
|
2297
|
|
IDEA
|
Still not available? I want another user to be able to add records to a table that updates a dashboard without logging in as me and uploading a new excel file. I set up edit views with limited permissions for the tables but can't add a new record so I'm stymied in my workflow.
... View more
08-24-2020
06:14 AM
|
0
|
0
|
9191
|
|
IDEA
|
Any update on COGO Report/Calculator/Measure now that we're at 2.5?
... View more
03-10-2020
08:39 AM
|
0
|
1
|
2798
|
|
POST
|
Thanks for the response, John. I see in reading your original answer more carefully that you had specified the collection of continuous points. As you note, it doesn't make any sense to have that variable for a line/polygon. I will mull things over as I start testing and let you know if I have any questions. Another option for my use case is simply to collect points at the surface change locations and manipulate my existing lines (generally from aerial photos) instead of trying to collect centerlines at the same time.
... View more
02-28-2020
12:14 PM
|
0
|
0
|
4873
|
|
POST
|
Hi JHasthorpe-esristaff I'm interested in the Direction of Travel variable you reference. In the documentation, I only see direction of travel as a variable for point features. The only ones listed for lines and polygons are Variable Description Compatible field type username Currently signed in user name. Text positionSourceType Category of the position source. Potential results are Unknown (0), User (1), System Location (2), External Device(3), and Network Device (4). Integer startTime Date and time the button is activated. Date endTime Date and time the button is deactivated. Date Can you confirm that having a field for Direction in a polyline layer will record a direction? It seems like you might have to collect continuous points instead? How would this work? My use case is collecting road centerlines. The driver could be in the right lane fully, or for some of the narrow back roads, actually on the centerline. We would be using QC buttons to distinguish surface types for lines and I was thinking I could specify whether there is an offset. Thanks, Heather
... View more
02-26-2020
10:44 AM
|
0
|
2
|
4873
|
|
POST
|
Chris, can you give an update on radial curve support in the Parcel Drafter? I'm looking at implementing this and I'm not sure I can get what I need without it. Thanks!
... View more
02-05-2020
07:40 AM
|
1
|
0
|
1602
|
|
IDEA
|
When I click "Create webmap" in Hub from a data page, it opens a new web map with a default symbology where the user has to choose an attribute to symbolize. It seems to pick a field at random, and it happens to pick one with "counts and amounts". This seems overly complicated for an initial behavior. I would prefer that it symbolized by "location only" by default.
... View more
01-31-2020
11:48 AM
|
0
|
0
|
573
|
|
IDEA
|
I have recently learned how to script my web layer updates using the arcpy.sharing module. This is great, as I can update my parcel data every morning. However, every time the script runs, the thumbnail on AGOL is replaced with a generic one. I have a thumbnail specified in the aprx map, but it gets overwritten unless I publish directly from Pro. Now that I am publishing my data in a data hub/open data site, this lack of a proper (custom) thumbnail matters. I don't want to have to reupload my thumbnail every day. I would like a property for getWebLayerSharingDraft to specify a thumbnail, as you can do with the summary and description. For my use case, the following idea would also work (the ability to create a default overlay for a thumbnail, with branding). Create default overlay for thumbnails
... View more
12-12-2019
10:46 AM
|
8
|
1
|
1103
|
|
POST
|
I can confirm that I see the Attribute Transfer tool in the Tools Gallery at 2.4 and you can transfer attributes between feature types. Thank you!
... View more
07-02-2019
07:50 AM
|
1
|
1
|
6421
|
|
IDEA
|
I think this is a great idea. It has a name that could be used in a dynamic text tag. Please implement.
... View more
04-24-2019
07:42 AM
|
1
|
0
|
6088
|
|
BLOG
|
That's the error I got when I tried to use a source that was not a hosted feature layer (it was a map image layer published from ArcGIS Server). It doesn't have an object $map because it's not the right kind of source.
... View more
01-03-2019
06:31 AM
|
0
|
0
|
32455
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2026 06:14 AM | |
| 1 | 01-21-2026 01:38 PM | |
| 3 | 01-07-2026 09:09 AM | |
| 2 | 11-19-2025 10:15 AM | |
| 1 | 03-10-2025 11:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|