|
POST
|
Thanks for pointing the is out, Kellner . For now try this code to import survey123 and make an instance of the SurveyManager: from arcgis.apps.survey123._survey import SurveyManager, Survey
survey_mgr = SurveyManager(gis=<your_gis>)
... View more
11-16-2018
03:04 PM
|
0
|
0
|
748
|
|
POST
|
If I understand you correctly, Chan , you're asking about how you connect through the API using the authentication scheme of your organization. Take a look at the Working with different authentication schemes guide to find out which scheme you're using. The syntax for connecting with the scheme should be illustrated in the guide.
... View more
11-08-2018
04:43 PM
|
2
|
0
|
3183
|
|
POST
|
Hi Joshua Chan The attached script is what we showed in San Diego. Let me know if you have any questions.
... View more
10-18-2018
09:48 AM
|
4
|
3
|
3183
|
|
POST
|
Hi Eli Safra - The geometry.from_geo_coordinate_string function calls the Geometry Service fromGeoCoordinateString operation. The operation takes an array of strings where each string in the array represents a coordinate pair matching the value of the conversion type parameter. The service operation (nor the Python API function) will take a WKT string. For example, wk_str = []
wk_str.append("10.000 25.000")
wk_str.append("20.000 50.000")
from arcgis.geometry import from_geo_coordinate_string
geom = from_geo_coordinate_string(spatial_reference=4326, strings=wk_str, conversion_type='DD') The output would read: {'coordinates': [[25, 10], [50, 20]]} We'll work on getting some samples into the documentation that illustrate the function. If you have access to arcpy, the arcpy.FromWKT works to output a geometry object from a WKT string: wkt_string = 'MULTILINESTRING((124.00678253 56.47257614000001,123.25955963 56.656185149999985,123.84651947000002 57.523410800000015,123.69512177000001 57.64451981000001,124.06873322 57.79924392999999,123.95178986 58.1575737,124.53096771 58.44784926999999,124.82568359 58.80451583999997,125.51399994 59.0811882,125.53484344000002 59.33229445999999,127.29485320999999 58.78646468999999,127.81623077000002 58.9095192,128.01678467 58.77035141000001,128.53341675 58.78424454000002,128.53704834 58.91536331,128.91760254 58.622577670000005,129.90759277 58.53979111,130.29953003 58.706462860000016,130.7567749 58.661472320000016,130.87231445 58.938129430000004,131.7276001 58.99814224,132.16204834 59.249240880000016,133.17398071 59.42424393000002,133.31869507 59.67869185999998,134.79998779 60.52523422000001,135.32453918 60.46199416999999,135.13108826 60.76705169999999,135.51799011 60.930740360000016,135.74488831 61.22502899,135.73236084 61.44282150000002,135.54908752 61.49490355999998,135.73988342 61.687004090000016,135.39465332 61.81887436000001,135.7434845 61.88880920000001,135.9664917 62.12140656,135.86676025 62.246337889999985,136.08499146 62.34053801999998,135.7492981 62.72190094000001,134.99543762 62.72866440000002,134.38049316 62.94245148,134.16654968 63.220806120000006,133.48997498 63.12572478999999,133.33387756 63.2064209,133.43275452 63.443740840000004,131.06343079 63.35163498,129.59127808 63.546485900000015))'
geom = arcpy.FromWKT(wkt_string, arcpy.SpatialReference(4326))
... View more
09-07-2018
03:46 PM
|
1
|
0
|
2145
|
|
BLOG
|
The ArcGIS API for Python Version 1.5 is here. You've waited for the Map Widget to use the JavaScript 4x, and the wait is finally over. It's all happening. Fully supported Web Scenes in the Jupyter Notebook no longer reside in a galaxy far, far away - they are now at your front door with all the 3D visualization you can handle. Not just old-faithful Jupyter notebooks, either...there's full support for JupyterLab. Take a look here! You can also specify autocast JavaScript renderers, export your maps from notebooks to HTML, and set up an external JavaScript CDN for use in a disconnected environment. We can't hardly stand what you're about to do with the new capabilities in this API. The wicked flexible Spatial Dataframe turns up the volume with a new accessor-based implementation that allows for access to spatial operations as a property on the steady, reliable Pandas Dataframe. Just use the sdf property and you're all set. With this new way of working with the Spatial Dataframe comes improved rendering and projection support along with enabling Arcade expressions. And you know that's not all, so head on over to the API for Python Guide Release Notes to scope out the details...and then stay tuned for an awesome new series of blogs coming soon to the ArcGIS Blog that will highlight intense new workflows incorporating these new features!
... View more
08-16-2018
06:04 PM
|
0
|
1
|
1552
|
|
POST
|
No, I am referring to add the path to the conda executables to PATH if the activate command is not found when running it at the command prompt.
... View more
07-30-2018
10:23 AM
|
0
|
0
|
1564
|
|
POST
|
Hi Angela Deegan Try opening a command prompt and navigating to a directory where you know you have write privileges. Then activate the environment you created: activate myarcgispro-py3 (If you receive an error that the command cannot be found, add the path to the conda executables to your PATH environment variable. It should be in C:\Program Files\ArcGIS\Pro\bin\Python\Scripts.) After the environment is activated, then type jupyter notebook Once in the browser create a new notebook and attempt to add the map. Does that work?
... View more
07-30-2018
10:06 AM
|
0
|
2
|
1564
|
|
POST
|
Hi Allen Guan, You can return a list of users sorted by the created or modified attributes as mentioned above like: org_users = g.users.search(query="NOT fullName: esri*", sort_field="modified", sort_order="desc") You can then use Python's datetime and calendar modules to inspect lastLogin based on various time values: from datetime import datetime, timedelta
# create a datetime object for right now
now = datetime.now()
# create a datetime object for 2 hours ago
dt_2hrs_ago = now - timedelta(hours=2)
# convert the datetime object from 2 hrs ago into Unix epoch time in seconds
etime_2hrs_ago = calendar.timegm(dt_2hrs_ago.timetuple())
# use a list comprehension to get list of users who have logged in within the last 2 hrs
usr_within_2hrs = [usr for usr in org_users if usr.lastLogin/1000 > etime_2hrs_ago]
usr_within_2hrs
... View more
07-20-2018
11:41 AM
|
1
|
2
|
6468
|
|
POST
|
Hi Chris Beaudette - You can find the ArcGIS API for Python version from the Jupyter notebook with the following code: import arcgis
arcgis.__version__ If a user doesn't have values for the firstName or lastName attributes, the error you observe is returned. At version 1.4.1, you can use the user.update(first_name='first', last_name='last') function to add that information and then your code would return values. You can get around this by checking for the existence of that attribute: for user in user_accounts:
try:
print(user.firstName)
except AttributeError:
print("{} has no firstName attribute.".format(user.username))
... View more
05-30-2018
03:48 PM
|
3
|
2
|
2874
|
|
POST
|
Hi thomas - the first_name and last_name parameters were added to the update() function at API release 1.4.0. Can you test that release of the API?
... View more
05-29-2018
04:20 PM
|
1
|
0
|
1701
|
|
POST
|
Hi @kmsmikrud - Change the upper case GIS in the link to a lower case gis and that will take you to the correct guide page.
... View more
04-25-2018
09:13 AM
|
0
|
1
|
1785
|
|
POST
|
Hi Shawn Hibbs - Open a command prompt and type: conda info -e This will output a list of all your environments and the path to where they are stored. You can also search for the arcgis package in a specific environment with the following command: conda list -n myenv arcgis
... View more
04-19-2018
09:17 AM
|
1
|
1
|
5356
|
|
POST
|
Hey Eric van Rees Check out the System Requirements page - map widget issues typically occur when the ipywidgets and/or widgetsnbextension packages are not at the right release. If the versions are in the correct range, try running this before opening the notebook: jupyter nbextension enable --py --sys-prefix arcgis
... View more
03-19-2018
10:44 AM
|
0
|
0
|
1186
|
|
POST
|
Hey treg - I'm seeing similiar behavior to what you've documented with the FeatureLayerCollection.manager. We've logged this issue internally and are investigating the featurelayercollection.manager.overwrite() method. Will the item.publish(overwrite=True) work in your scenario?
... View more
03-19-2018
09:50 AM
|
1
|
3
|
2907
|
|
POST
|
Hi 1_MagNess - As I mentioned I'm reproducing what you see. We've corrected the problem with the group.update() method for the next release of the API. I don't have a timeline yet for the next release, but currently you could use the REST API directly to update the group programmatically.
... View more
03-19-2018
09:14 AM
|
0
|
0
|
1711
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-14-2023 11:49 AM | |
| 1 | 06-26-2023 09:44 AM | |
| 1 | 07-18-2023 09:42 AM | |
| 4 | 01-30-2023 09:33 AM | |
| 2 | 01-11-2019 03:06 PM |
| Online Status |
Offline
|
| Date Last Visited |
04-08-2025
04:37 PM
|