|
POST
|
I agree token should not be used in your case which is IWA authentication. If Python API generated that REST request, then it seems a small bug of the API itself. I'd suggest you contact ESRI support to confirm it.
... View more
08-30-2018
04:56 PM
|
0
|
0
|
2440
|
|
POST
|
According to my understanding, If you are using IWA authentication, you will be using so called Web-tier authentication, and this is an alternative authentication method to token-based ArcGIS Server authentication. Simply put, in your case there are no token involved in authentication. That's why you can connect to your GIS but you can't get token using the following property. gis._con.token Anyway, I am no expert on Portal security, please read the following document --- I could be very wrong. Configuring ArcGIS Server's authentication tier—ArcGIS Server Administration (Windows) | ArcGIS Enterprise The reason you can't list the federated servers could be that the server settings don't permit admin operations through web adapter, you can talk to the administrator to confirm this. You should be able to work on the content though.
... View more
08-29-2018
10:44 PM
|
0
|
2
|
2440
|
|
POST
|
The following code works for me, and my environment is Python API version 1.5.0 from arcgis.gis import GIS
from arcgis import extract_data
gis=GIS(profile="agol_simoprofile")
# test_item is a feature service item
test_item=gis.content.get("<my item id>")
result=extract_data(test_item.layers,output_name="test_extract_data"
,data_format="SHAPEFILE")
result
... View more
08-29-2018
06:20 PM
|
2
|
1
|
2297
|
|
POST
|
If this is the answer, can you please mark it as the "correct answer"? by doing so it will appear at the top and help people with same question to find the correct answer quicker. Thanks.
... View more
08-27-2018
11:17 PM
|
0
|
1
|
4227
|
|
POST
|
Hope the following code snippet gives you some clue: from arcgis.gis import GIS
from arcgis.features import FeatureSet, Feature
gis = GIS(url="",username="",password="")
fs=gis.content.get(itemId)
# assume the first layer is the layer you want to update
fl=fs.layers[0]
# set return_geometry false will save you time and data
features=fl.query(where=sql_where,out_fields='OBJECTID,FieldName'
,return_geometry=False)
for feature in features:
# Calculate the new value and assign it to the field in the current record
feature.set_value('FieldName',NewValue)
# update the features in AGOL
results = fl.edit_features(updates=features)
... View more
08-27-2018
11:06 PM
|
3
|
7
|
3681
|
|
POST
|
I tested the following code in Python API 1.5.0, it works. from arcgis.gis import GIS
gis=GIS(url="https://orgname.maps.arcgis.com",username="abc")
# get the CategoryManager for this GIS
cs=gis.admin.category_schema
# get the item you want to work on
item1=gis.content.get("<item ID>")
# assign the item to the desired categories
# you may need to create the categories first in AGOL
cs.categorize_item(item1,['/Categories/People', '/Categories/Boundaries'])
... View more
08-26-2018
10:04 PM
|
3
|
7
|
10774
|
|
POST
|
The following code should do the trick if you are using the latest Python API, version 1.5.0. from arcgis.gis import GIS
gis=GIS(url="https://www.arcgis.com",username="username")
item1=gis.content.get("<item ID>")
# content_status accept "authoritative","deprecated" or None
item1.content_status="authoritative"
... View more
08-26-2018
07:30 PM
|
5
|
2
|
4227
|
|
POST
|
Auto-populating / pre-populating data in the collection form could be misleading requirements from users which should be carefully evaluated and verified by the business analyst and designer. Please allow me to explain using my past experience. A few years back when ArcGIS Collector was just released, I was assigned a project to digitise some field data collection forms using ArcGIS Collector. It is easy right? to turn the paper-based forms into excel-like digital forms and install them on a smart device, then job done. Sure... until things like mobile data collection, offline/ editing, sync, cloud storage, history keeping and archiving, reporting, dashboard monitoring, etc these system components come up into the picture, people started realising it was actually a new system solution for a specific field work, not just changing the media of the forms from paper to pixels. This is important to let you think out of the box and only focus on their desired result and not restricted too much to their existing ways of doing things in the field. Now let's talk about the auto-populate / pre-populate fields. My customer's field work involved property damage assessment, in their forms they needed to fill the information of the property (house, land or business) they were about to assess, many of those fields were repetitive on different forms and that was a time consuming process in the field. To make things worse, their use case was in a disaster response circumstance and the forms really were supposed to be filled quickly. So they wanted those repetitive fields and as many as possible other fields to be auto-populated in the digital forms. It is a valid and reasonable requirement from a user's point of view, right? Of course it is because the forms are the interfaces between users and the system, and they want some fields in the form to be magically auto-populated. But when we analyse the requirements and design the system, we have to ask what that mean? what they really want? In my case, the users wanted to auto-populate the following category of the information: The residential property information (location, rooms, building material info, capital value, owner info etc.) Business details (business register number, business name, value, contact details etc.) Assessor info For point 3, it was not a problem for Collector. because when you enable tracking for the hosted feature layer, collector will fill out this information with the named user's information. see the following link if you don't know how. Manage hosted feature layers—ArcGIS Help | ArcGIS For point 1 and 2, what did the users really want? what did auto-populate mean here? for the users, in this case they only wanted contextual information for the subject of the assessment, and auto-populating is only one way to bring in the contextual information about these properties and businesses that were about to be assessed. Most importantly, these information should already exist somewhere, why should the users (mainly field works) collect them again? What if we replacing auto-populating with popping up? After discussing these questions with the users, we agreed upon: Some fields in the original forms did not have to be in the digital form as long as they could get the contextual information for the assessed subject. Only the assessor and assessment timestamp were the fields which needed to be auto-populated. Locations and associated contextual information were prepared (pre-populated), which gave another benefits such as reducing the human errors in data collection, avoiding data redundancy and maintaining information consistency. Remove any fields that were not absolutely necessary for the mobile data collection. The most common mistake I’ve seen in data collection is that users are too “greedy”, they want to put all the fields in the final report in the data collection form, this will cause disastrous consequences in the mobile data collection, which need to be light-weighted and the less fields the better. This is not only from technical consideration, but also an operational consideration. Generate the report at the system backend and do it in the office where we had access to the internal database, and we had all the other information needed to create any sort of reports required. As a result, most of the auto-populated fields were replace with contextual information when assessing the object: Contextual info for the house Contextual info for the business: If there is one word you'd like to give away, It will be: don’t auto-populate existing data, make reference or link to it instead.
... View more
08-24-2018
12:01 AM
|
0
|
0
|
3792
|
|
POST
|
I assume you are using AGOL, or you are using Portal with a public interface for the public to access; and your layer is a hosted feature layer. My suggestion is: Don't copy the hosted feature layer, create a read-only view instead. here is a pretty good article written by Paul Barker: Getting started with hosted feature layer views For the instruction on the latest version: Create hosted feature layer views—Portal for ArcGIS | ArcGIS Enterprise
... View more
08-23-2018
09:59 PM
|
1
|
1
|
2025
|
|
POST
|
There are some questions: Are you using Portal or AGOL? Are you using Built-in or enterprise Identity store? I did a very easy test on AGOL using the OAuth2 method according to ESRI instruction and it works. The following is the instruction: Working with different authentication schemes | ArcGIS for Developers
... View more
08-23-2018
04:54 PM
|
0
|
0
|
872
|
|
POST
|
Microsoft Visual Studio IDE is definitely NOT my favorite python scripting IDE, it's counter-intuitive, cumbersome, slow and looks too old, but when it comes to debugging Script Tools I've been developing for ArcGIS Pro (current version 2.2.1), I feel like no other choice. and as every developer knows, debugging is arguably the most important feature you need when coding just because there are very few genius who can type away their code without leaving any logical or syntax errors /bugs. MS Visual Studio is the only IDE that can be invoked from ArcGIS Pro to debug your script tools and tool validation code by attaching the running Pro process to the IDE. Debug Python code—ArcPy Get Started | ArcGIS Desktop I wish more IDEs with great debug features will be supported by ArcGIS Pro in the future.
... View more
08-22-2018
05:41 PM
|
2
|
0
|
836
|
|
POST
|
There's no obvious benefit to run notebook as a backstage task. you can copy all the code into a python script file (.py) then run it in the task scheduler.
... View more
08-21-2018
04:51 PM
|
2
|
15
|
6629
|
|
POST
|
It seems you installed ArcGIS Python API 1.5.0 on the copy of the ArcGIS Pro python environment. Something went wrong when you were upgrading the pre-installed Python API to the lastest version 1.5.0. and the problem you have in the arcgis/mapview validation is an indication that the old Python API was not fully removed or it's only the configuration not updated properly. What you can do, at least give it a try at the moment is: Remove the arcgis/mapview extension entry in the <your user home folder>\.jupyter\nbconfig, then restart the Jupyter server and see if it works. If not, uninstall ArcGIS Python API using conda remove -c esri arcgis and reinstall it using conda install -c esri arcigs
... View more
08-21-2018
04:39 PM
|
0
|
0
|
5355
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-28-2019 05:13 PM | |
| 1 | 02-25-2019 04:54 PM | |
| 1 | 03-05-2019 02:08 PM | |
| 1 | 03-12-2019 10:20 PM | |
| 1 | 11-27-2024 04:36 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-17-2025
07:39 AM
|