POST
|
Hi Mappers, I've written a script that periodically overwrites the feature classes housed on our server with feature layers from our ArcGIS Online account. It works well except with one of the layers titled CustomerEndpoint. I get this warning: This geodatabase does not support this client or operation [This geodatabase does not support this client or operation [This geodatabase does not support this client or operation][CustomerEndpoint.objectid_12]] The resulting feature class is missing several fields, and the ObjectID and GlobalID fields have different names than those on our AGOL account (no features seems to be missing though). It's obvious that there is an issue with the unique ID fields but I don't know what that issue is. Any brainy mappy thoughts/suggestions would be appreciated. Script below with any sensitive info edited out... def backup_weblayers_to_server(): ## info for logging doc logging.basicConfig(filename='update_log.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') ## connect to AGOL gis = GIS('home') ## filepath to server db connection DB_CONNECTION = filepath to db connection ## item IDs for each web layer to be backed up D_VALVES_ID = agol item id ENDPOINT_ID = agol item id D_LINE_ID = agol item id T_LINE_ID = agol item id T_VALVES_ID = agol item id S_LINES_ID = agol item id IDS = [D_VALVES_ID, ENDPOINT_ID, D_LINE_ID, T_LINE_ID, T_VALVES_ID, S_LINES_ID] for id in IDS: msg = f"Accessing web layer..." print(msg) logging.info(msg) item = gis.content.get(id) # AGOL item msg =f"Converting {item.title} web layer to feature set..." print(msg) logging.info(msg) feat_set = item.layers[0].query(as_df = True) # feature set of web layer msg = f"{item.title} feature set contains {len(feat_set)} records." print(msg) logging.info(msg) # # establish dataset in which to save feature set if "Transmission" in item.title: dataset = 'Transmission_Dataset' elif item.title == 'Distribution Valves': dataset = 'Distribution_Assets' else: dataset = 'Distribution_Network' # clean up title to be used for feature class name fc_name = item.title.replace(" ","_") # complete file path where to save the feature class location = os.path.join(DB_CONNECTION,dataset, fc_name) msg = f"Overwriting {fc_name} feature class on server..." print(msg) logging.info(msg) try: # convert feature set to a spatially enabled dataframe # and save it as a feature class in the db on the server feat_set.spatial.to_featureclass(location = location, overwrite=True) msg = f"{item.title} successfully backed up on server. Path: {os.path.join(dataset, fc_name)}\n" print(msg) logging.info(msg) except Exception as e: msg = f"{item.title} not able to be backed up. Moving to next layer See Exception below:\n{e}" print(msg) logging.info(msg) continue return backup_weblayers_to_server()
... View more
01-31-2024
08:48 AM
|
1
|
1
|
502
|
IDEA
|
The title says is all. I'd appreciate being able to maintain null values when converting a SeDF to a featureclass in a gdb. I've used pandas.fillna() with fillers like a space before, but sometimes a null value is there for a reason, and I'd prefer to leave it null.
... View more
01-24-2024
02:01 PM
|
1
|
1
|
410
|
POST
|
I'm having the same problem. I'd rather not fill my null values, I prefer null to spaces or other fillers. I'm going to submit an idea in ArcGIS Ideas.
... View more
01-24-2024
01:56 PM
|
0
|
0
|
484
|
IDEA
|
I would love to be able to resize the map (or maybe even the entire survey area) for geo questions in the web app for Survey123. Another option would be to allow the user to make the map full screen, like a popup. Right now, my geoshape question is pretty inaccessible to my end users, many of whom are older and/or have bad eyes and/or aren't the most tech savvy. Look how teeny tiny that map is (screenshot below)! It's barely accessible to me, and I'm a map & tech professional.
... View more
01-17-2024
02:33 PM
|
2
|
3
|
693
|
POST
|
Hey all, I'm trying to automatically change the filter on a layer on a web map based on the date. For example, I only want points collected in January to show up, but starting in February I only want points collected in February, etc. I thought about scheduling a notebook, but I don't think you can manipulate an online map with python the way you can with the mapping module in Pro. I also wrote an attribute expression that returns true if the month of my 'location_timestamp' field is equal to the current month, but I don't see a way to incorporate attribute expressions into a filter. I assumed that was an option, which is why I wrote the expression. This is obviously not a huge deal but I love a clutter-free map and I love automating things (I picked the right profession!) so I'd love to hear your thoughts!
... View more
01-10-2024
02:05 PM
|
2
|
3
|
518
|
POST
|
I haven't tested this so you may have to mess with it a bit but I believe the logic is solid
... View more
11-15-2023
01:10 PM
|
0
|
1
|
715
|
POST
|
Hello, I'm looking for the most efficient way to convert a stand-alone table to a pandas data frame. This table will ultimately be geocoded and saved as a feature class, but I need to manipulate the data and fields quite a bit before that. I find pandas to the easiest and most efficient way to do the data manipulation. Currently, I am using arcpy.conversion.TableToTable() to first convert the table to a csv file, and then pandas.read_csv() to convert to a data frame. The table has roughly 63,000 records and it is taking over an hour to do the TableToTable portion of the conversion. Is there a better way to do this? Pandas is so quick so read the csv and I so wish I could read the table directly into pandas without the intermediate of a csv. Many Thanks
... View more
11-15-2023
12:04 PM
|
1
|
4
|
2865
|
POST
|
Hello, I'm looking for the most efficient way to convert a stand-alone table to a pandas data frame. This table will ultimately be geocoded and saved as a feature class, but I need to manipulate the data and fields quite a bit before that. I find pandas to the easiest and most efficient way to do the data manipulation. Currently, I am using arcpy.conversion.TableToTable() to first convert the table to a csv file, and then pandas.read_csv() to convert to a data frame. The table has roughly 63,000 records and it is taking over an hour to do the TableToTable portion of the conversion. Is there a better way to do this? Pandas is so quick so read the csv and I so wish I could read the table directly into pandas without the intermediate of a csv. Many Thanks
... View more
11-15-2023
09:54 AM
|
0
|
1
|
736
|
POST
|
Hmm, ok. It seems like I might have to shift directions and just make it a repeat rather than having the user use a separator. Thanks so much for your help!
... View more
07-19-2022
10:06 AM
|
0
|
0
|
383
|
POST
|
Hi Zach, Thanks so much for your reply. Your solution is *almost* perfect for what I'm trying to do except that when appearance is set as numbers, there is no comma available on the number pad that displays. Any thoughts on a workaround for that? Thanks again!
... View more
07-19-2022
09:29 AM
|
0
|
1
|
389
|
POST
|
Hey all, I'm trying to figure out how to allow only digits (0-9) and a separator (preferably commas) in a text field in Survey123. It would ideally also show up as a number pad even though it's a text field. I've previously set the appearance to numbers but this only allows for integers or decimals, aka no commas or spaces. Thanks!
... View more
07-18-2022
08:30 AM
|
0
|
4
|
408
|
POST
|
I'm having the same issue off and on. I'll overwrite a feature service and the view layer loses all its data, I then overwrite it again and the data is back. A couple of times I've had to overwrite a service 5-10 times before its view layer was restored. Once I even just remade the view layer and started over. Any solutions to this bug??
... View more
12-10-2021
01:00 PM
|
0
|
0
|
1988
|
POST
|
Hi all, I am trying to format a legend in ArcGIS Pro to look like a table. Essentially, all I need is to add lines between each item and between the items and their descriptions. This is a template for a map that will change frequently so I want the table to adjust size when the descriptions for the items change. If it was static I would simply draw the lines in. This is the table I'm trying to approximately replicate: This is as close as I have been able to get so far: Any help would be appreciated. Thanks!
... View more
09-15-2021
07:26 AM
|
0
|
1
|
458
|
Title | Kudos | Posted |
---|---|---|
1 | 05-09-2024 07:05 AM | |
1 | 11-15-2023 12:04 PM | |
1 | 02-27-2024 08:23 AM | |
1 | 05-30-2024 01:23 PM | |
1 | 05-03-2024 12:50 PM |
Online Status |
Offline
|
Date Last Visited |
07-04-2024
09:39 AM
|