|
DOC
|
Modified script from James Tedrick that will run in ArcPro. Only changes the way urllib2 is imported and encodes string to 'utf-8' where urlencode is used. Also in Py3 dictionary.iteritems() is replaced by dictionary.items() did not have this in the original post so just open the script and alter...
... View more
09-02-2020
09:45 AM
|
3
|
0
|
1625
|
|
BLOG
|
I am running the script using python 3x. The main things I ran into has to do with urllib2. In Py3 needs to be imported a little differently. from urllib.request import urlopen
from urllib.parse import urlencode Then of course remove anything using urllib2. also where urlencode is being used it needs to be explicity encoded as bytes or 'utf-8' (at least the error I got was a 'TypeError' where the parameters for the url were being treated as string.) urlencode(replicaParameters).encode("utf-8") I did not really have any other issue that I can remember aside from those differences in using urllib.... Thanks again for all your work on this James this script has held up over the years!
... View more
08-27-2020
01:59 PM
|
0
|
0
|
8129
|
|
DOC
|
Try using a service Item ID that you are familiar with. Like one that is in your own AGOL organization do not try using the default Item ID. The error you are getting is basically saying it is not finding a feature service based on the ID you are giving it.
... View more
06-15-2020
08:32 AM
|
0
|
0
|
11042
|
|
POST
|
I ran into this issue. Oddly enough the tool I have makes edits to a service and it fails if I start with an empty service or one that does not contain a feature that was created in AGOL or Pro. Once I add a point that was created in AGOL or Pro I do not get the error anymore. Not ideal.
... View more
05-05-2020
08:13 AM
|
0
|
0
|
2869
|
|
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
|
8744
|
|
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
|
2129
|
|
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
|
2268
|
|
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
|
2041
|
|
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
|
3331
|
|
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
|
468
|
|
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
|
33374
|
|
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
|
3872
|
|
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
|
1666
|
|
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
|
1768
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-14-2023 03:56 PM | |
| 1 | 03-24-2025 08:51 AM | |
| 12 | 03-11-2025 12:44 PM | |
| 1 | 09-14-2023 09:40 AM | |
| 1 | 09-02-2020 09:45 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-24-2025
12:28 PM
|