POST
|
I am in the midst of doing the same thing. Very simple thing to apply feature edits via python but when it comes to attachments the parameter itself appears to be invalid even though it is in the documentation. If anyone gets this to work that would be great. Thanks for the example above
... View more
04-17-2020
04:51 PM
|
0
|
1
|
5326
|
POST
|
Hey Josh - wanted to provide a UI for users of certain notebooks is all really. It's not a huge deal but would be nice. If there is another package you are aware of that can accomplish this using the runtime's available in AGOL I am open to suggestions. I was thinking along the lines of taking an input from dropbox and add, publish, append etc an item.
... View more
04-16-2020
12:16 PM
|
0
|
1
|
1474
|
POST
|
Keep getting this error when trying to use tkinter in arcgis notebooks hosted in ArcGIS Online. TclError: no display name and no $DISPLAY environment variable From what I have seen it this is an environment variable that needs to be set in the docker image. Using %env DISPLAY= does change variable but doesn't seem to clear up the issue. I will then get this error: TclError: couldn't connect to display ":0.0" Since I do not have the control to alter these docker images used for Notebooks in ArcGIS Online I am wondering if someone from ESRI can look into this so tkinter works in notebooks for AGOL. My program runs fine when I run it from a jupyter notebook on my local machine. ArcGIS Notebooks Beta - Online
... View more
04-13-2020
03:24 PM
|
0
|
3
|
1613
|
BLOG
|
We are using Collector and Survey123 together and updating the feature class with the status from the most recent inspection which is stored in a related table I have done by querying the related table and updating the features accordingly. Still our set up is definitely more straightforward. # create dataframe from the asset point layer
df = itemObject.layers[0].query().sdf
# create dataframe from related table of inspections
relatedtblDF = itemObject.tables[0].query().sdf
# get the GlobalId for each feature in asset point layer
for id in df['GlobalID']:
# get the last recorded status in related table of inspections
status = relatedtblDF.loc[relatedtblDF['ParentID'] == id, 'Status'].to_list()
lateststatus = status[-1]
# update the asset point dataframe with the latest status from the related table of inspections
df.loc[df['GlobalID'] == id, 'assetStatus']=lateststatus
... View more
11-07-2019
09:11 AM
|
0
|
0
|
1712
|
BLOG
|
We create tile packages for field workers fairly frequently so they can have additional maps available to them when they go offline in the field. Typically this process has involved several different tools depending on the particular map or imagery that is needing to be tiled. Generally, I have found the ManageTileCache and ExportTileCache GP tools to be most reliable. So recently I started thinking about combining them along with the Python API so we could have one tool to use for publishing TPK's to our AGOL Org. Any feedback or suggestions would be greatly appreciated. Basic outline of what the tool does: Make connection and get a token from your portal with whatever credentials are being used in Pro Take an input raster dataset Create a new folder for outputs in the same directory as the input dataset Allow user to name output dataset Run ManageTileCache tool to create a local tile cache ( by default the entire extent of the input dataset is used and LOD's are created based off of the input data source pixel information) Run ExportTileCache tool to create local tpk file Report file size info back via arcpy Messages Add tpk item to portal Attempt to publish the tpk as hosted tile layer Publishing a tpk item seemed to need the additional step of making a POST via the REST api to actually unpack and publish the tiles using '/updateTiles' contained in the tpk this is done using requests.post just simply using publish() with the python api tended to fail at going beyond creating the hosted tile layer. Uses urllib to get additional info about the hosted tile layer and LOD's being published. This tool has been handy in certain situations for us and I hope it is for someone else too. Still I am always interested if someone has a better way of doing this.
... View more
10-21-2019
12:39 PM
|
2
|
0
|
2557
|
POST
|
Jingjing Li I am running into issues publishing a tpk item as a hosted tile layer as well. Except I am getting an error related to LOD. Since the tpk item does not have tiles built for all LOD's it goes as far as creating the hosted tile layer but fails to actually publish the tiles. There must be a place to specify min and max scales in the publish() parameters? I am using 1.6.1
... View more
10-16-2019
08:03 AM
|
0
|
0
|
285
|
BLOG
|
Ismael Chivite Is there an easier way to break out the responses to a Select Multiple question type? For instance if you require 3 choices from a choice list is there a way to use a regex expression to separate the responses and populate three other fields with those actual responses, not 1,0 or true,false? I do not want to have a separate field for all the choices in my list. I need to be able to write each choice into Keyword1, Keyword2 and Keyword3 fields. Seems like in order to do this if I understand the suggested procedure correctly would be to use if(selected{$question},'choice'),'choice','') for every value in my list which is over 100 choices long. This seems prohibitive.
... View more
12-20-2018
09:26 AM
|
1
|
0
|
26358
|
POST
|
James is there an example of this calculation somewhere? I know it should be pretty straightforward to apply the utcoffset to now() but I am confused as to formatting of these values.
... View more
07-30-2018
12:54 PM
|
0
|
7
|
2212
|
POST
|
What about using add_layer() to add a hosted Tile Layer published from a TPK to a web map? The API docs say to reference TileLayer (MapImageLayer does not display tiled images. To display tiled map service layers, see TileLayer.) but I cannot find anything that helps... When I add the item with add_layer() it zooms to the extent of the item but the tiles don't render.
... View more
06-12-2018
10:24 AM
|
0
|
0
|
708
|
POST
|
They make very little mention of needing to establish these relationships. It is implied in the documentation that for Web Map Items in particular it is done in the background. I only get empty results on any of the three methods.
... View more
03-20-2018
03:08 PM
|
1
|
0
|
1025
|
POST
|
Ok thanks Mikie. I put it here Add-Attachments/Add_Attachments_GlobalID.ipynb I am not very familiar with GitHub and posting things so if its worthwhile for me to change anything let me know. Thanks
... View more
01-08-2018
08:46 AM
|
2
|
1
|
1613
|
POST
|
Hi Michael - Issue was each object ID and its attachments writes to a separate list when you attachments.get_list(oid). Maybe that is obvious but it was what created the issue for me. So in order to catch all of the existing attachments I had to first create a comprehensive list before going to check against the files I wanted to attach. Earlier I could not understand why it would catch some existing ones and attach others. Thanks for getting back to me. This is not a super common work flow for us but it is something that does come up so being able to batch add attachments to appropriate features of a feature layer is helpful. Thanks for your time! Rob
... View more
01-05-2018
02:19 PM
|
0
|
3
|
1613
|
POST
|
We have had issues with sync failing at times when our inspectors return from the field. This seems to happen for various reasons. When it does we have to do quite a bit of manual loading of data to our data collection layers in Arc Online. The biggest hassle is with the attachments. I can add attachments using the global id of the feature in the service in AGOL and related global id of the attachments once they are taken from the runtime GDB to a local folder. My issue currently is with handling features that already have the necessary attachments. Especially those features that have more than one attachment. I am not a python expert but have gotten this far using the API it would be nice to have something to automate this task when we have this issue.Michael Kelly any thoughts would be much appreciated. Currently the script runs fine when there are no attachments or it needs to add only one more attachment to a feature. The issue comes when multiple attachments already exist. Whatever I am doing is not iterating past the first attachment it finds so it adds duplicates. In particular lines 34-37. It finds the name of the existing attachment and matches it to the filename but only for the first attachment of a particular feature. I am hoping this is just something simple I am missing. General pointers on organization of for and if statements would be greatly appreciated.
... View more
12-13-2017
10:18 AM
|
0
|
5
|
2026
|
DOC
|
Add attachments from a folder to a existing features in a hosted feature layer. For this to work properly it is assumed the attachments are coming from a replica FGDB. The attachments are saved to a folder using the method recommended here: How To: Batch export attachments from a feature class Alter that script to rename the attachments using the GlobalID in the naming convention. From there you can run the notebook in jupyter by pointing to the appropriate feature layer ID and folder where you saved your attachments.
... View more
11-21-2017
02:45 PM
|
0
|
0
|
1711
|
Title | Kudos | Posted |
---|---|---|
1 | 09-14-2023 09:40 AM | |
1 | 09-02-2020 09:45 AM | |
1 | 12-20-2018 09:26 AM | |
2 | 09-02-2020 09:45 AM | |
2 | 10-21-2019 12:39 PM |
Online Status |
Offline
|
Date Last Visited |
Thursday
|