POST
|
I am using the gis.users.create() function to create a new user in my AGOL organization. I am logged into the org as an administrator. I can get the create() function to create the user but am not able to enter the 'description' property of the user. I am following the instructions here: Accessing and managing users | ArcGIS for Developers Here's my code from the Jupyter Notebook: demo_user1 = gis.users.create(username = 'testdemo_user1xx', password = 'P@ssw0rd', firstname = 'demo', lastname = 'user', email = 'python@esri.com', description = 'Demonstrating how to create users using ArcGIS Python API', role = 'org_viewer', level = '1', provider = 'arcgis') Everything works except the 'description property'.When I print out the properties of that user, the description is None.
... View more
07-11-2017
02:36 PM
|
0
|
0
|
359
|
POST
|
Rohit, Thanks for responding. Geoanalytics is not supported in my installation. I was just looking for some way in the Python API to do a spatial join. That’s where I got into the geoanalytics module. Is there a spatial join function anywhere else in the Python API? Thanks, Charlie Ware
... View more
05-19-2017
08:15 AM
|
0
|
1
|
3332
|
POST
|
Sarah, I am using join_features from within the Python API in a standalone Python script running on my local PC. The input data is coming from AGOL but everything else is running locally. I’m not sure how that fits in with what environments geoanalytics is supposed to work in. Charlie
... View more
05-18-2017
03:47 PM
|
0
|
0
|
3332
|
POST
|
Sarah, I am running the geoanalytics tools against services in our corporate ArcGIS Online account. I’m not sure how to check to see if geoanalytics is enabled there. As a test, I did run the get_datastores() function and it did not give me the error. However, it did return . Charlie
... View more
05-18-2017
03:23 PM
|
0
|
2
|
3332
|
POST
|
I'm trying to use the join_features tool or any of the tools in the summarize_data submodule of the geoanalytics module. Whatever tool I try, I always get this error: 'PropertyMap" instance has no attribute 'geoanalytics' The import statment for the arcgis.geoanalytics module works just fine but when I try to use it, I get the above error.
... View more
05-18-2017
02:53 PM
|
0
|
9
|
4973
|
POST
|
Well that works - thanks. I also got it to work using the calculate() function on the feature layer. What is the intended use of the set_value() function? Is there a method to push changes from in_memory?
... View more
04-24-2017
04:45 PM
|
0
|
1
|
681
|
POST
|
I'm trying to use the set_value function on a feature in a feature layer hosted on AGOL. The set_value function seems to work and does not return an error but when I query the feature service none of the features have the updated values. I set up a layer: dataSearch = gis.content.search("pointService", "feature service") for layer in dataSearch[0].layers: if layer.properties.name == "pointService": pointLayer = layer Then I get the feature set for that layer: updateFeatures = pointLayer.query() Then I try to set the values of some attributes: for feature in updateFeatures.features feature.set_value('RegionID', 1) feature.set_value('RegionNm', "SouthEast") The updated attributes show up when I use get_value() print(str(feature.get_value('RegionNm'))) <SouthEast> But when I query the feature service from the REST endpoint or download it as a shapefile, the attributes are empty. I have tried using the refresh() method on the feature layer manager but it had no effect.
... View more
04-24-2017
03:54 PM
|
0
|
3
|
1545
|
POST
|
Thanks! That worked. I did have to enclose the string of coordinates in quotes. Is this in the documentation somewhere? I can't seem to find it.
... View more
04-20-2017
02:52 PM
|
0
|
1
|
2199
|
POST
|
I have a python API script that creates a web map from a feature service. I would like to set the initial extent of the map to zoom into the features in the feature service. I can set the initial extent in the Settings tab of the ArcGIS Online UI but cannot find the setting in the web map specification for setting the initial extent through code.
... View more
04-20-2017
01:50 PM
|
2
|
4
|
3624
|
POST
|
I got it to work but it's somewhat convoluted. I created a web map from the hosted feature layer, read that into a web map object and then output it's layerDefinitions to a text file. I then copy/pasted the layerDefinition key from the text file into the web_map_simple.json file from the sample in the example Jupyter notebook. I then read that into the web map object for the new web map and now the features show up.
... View more
04-18-2017
02:31 PM
|
0
|
5
|
2330
|
POST
|
Thanks for getting back so quickly. When I view my web map as a web map object, the operational layers are missing the entire 'layerDefinition' key (along with some others). I'm now looking into how to copy in a layerDefinition from one map into mine or create one from scratch and then publish that.
... View more
04-18-2017
12:46 PM
|
0
|
0
|
2330
|
POST
|
I can see the attribute tables for the layers in the hosted feature layer. The source data for the layer is a hosted feature layer published from a file geodatabase that I uploaded to AGOL as a zip file. There never was any symbology for those features. However, when I click on the hosted feature layer in My Content, it displays the features with some sort of default symbology. I assumed that symbology would carry forward into the web map. Maybe I need to assign symbology to the features. Is there a sample for that? I replaced the data in the sample with my own hosted feature layer. The sample used a Map Service. I did it both from within a Jupyter Notebook and as a standalone python script and had the same result with both.
... View more
04-18-2017
10:04 AM
|
0
|
0
|
2330
|
POST
|
The feature service is shared to the organization. It's the same organization in which I created the Web Map.
... View more
04-18-2017
09:39 AM
|
0
|
0
|
2330
|
POST
|
I am using the Python API to publish a web map using a hosted feature service that I published from a file geodatabase in My Content. I am following the example in the Python API sample Jupyter Notebook 'Publishing Web Maps and Web Scenes' in the '05 Content Publishers' group of notebooks. The map publishes fine, the basemap displays correctly but the features in the feature service do not show up when I view the web map in the Map Viewer. They are listed in the Details window correctly but do not have any symbology. When I click on the Legend button it says there is no legend. If I create a web map from with ArcGIS Online using the same feature service, the features show up correctly.
... View more
04-18-2017
09:25 AM
|
0
|
13
|
5891
|
Title | Kudos | Posted |
---|---|---|
1 | 04-18-2017 03:01 PM | |
2 | 04-20-2017 01:50 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|