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
|
1280
|
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
|
1330
|
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
|
817
|
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
|
817
|
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
|
3395
|
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
|
1741
|
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
|
913
|
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
|
982
|
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
|
3124
|
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
|
620
|
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
|
1740
|
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
|
947
|
POST
|
Hi Guillaume Arnaud and Magaly CLEMENT - I'm reproducing what you report. Let me investigate for a workaround and I'll update you when I can.
... View more
03-08-2018
07:14 AM
|
1
|
0
|
947
|
POST
|
Hi mjimenez@prvectorcontrol.org_prvectorcontrol - The syntax for the `out_statistics` parameter is the same as the REST API. What data type is the `structureid` field? What's the error message you receive?
... View more
03-05-2018
01:01 PM
|
0
|
1
|
697
|
BLOG
|
What’s new in the ArcGIS API for Python v1.4 We've released the next version of the ArcGIS API for Python - version 1.4. Click here for instructions on how to upgrade, and view the whole range of release notes. There's a ton to be excited about it in this latest offering, and just in time for the 2018 Esri Developer Summit. Let's highlight some of the new features so you can make the most of what this API has to offer. You wanted the option to install the ArcGIS API for Python with pip, so we've responded and made a pip package available through PyPi, allowing you to install the API according to your needs. See the documentation here for full details on using the pip package manager to install the API, differences between installing with pip and conda, and much more! We've also added options to the connection experience for using your Web GIS. You now have the ability to initialize a GIS object from a token created externally. The token generated from apps or sessions elsewhere will allow you to connect with the API and access Enterprise or Organization resources. Also upon connecting, we've enabled the persistence of profiles so that you can store your credentials locally in a secure manner and log into the GIS using the name of a profile instead of entering credentials. You're even able to store multiple profiles and use them simultaneously. Check out more details in the Guide for Working with different authentication schemes. We're really pleased with improvements we've made to the Spatial DataFrame. Incorporation of the shapely package enhances the interoperability of the ArcGIS API for Python. Working with shapely and other geospatial data science packages like GeoPandas and fiona allows the ArcGIS API for Python to read and write almost any geospatial format on any platform. Improvements to the plotting method of the Spatial DataFrame provide an extensive range of symbology options for visualizing data with the Map widget. We've also added upload management functionality to the Feature Layer Collection object so you have more ways to attach information where it's most useful in your GIS. And with more functions added in the raster functions module, the future is bright for all kinds of analysis, visualization and data management with the ArcGIS API for Python. At 1.4, the API has a wider range of symbology options. Take a look: df.plot(kind='map',
map_widget=m,
colors='Reds_r',
marker_size=10,
outline_color='Blues',
symbol_style='d') The Python API in Jupyter notebooks is great for exploratory data analysis. You can quickly visualize data using symbology from matplotlib. With the new graphing capability for displaying a complex raster chain analysis, you can clearly visualize your workflows: Interested in learning and using the Python API? We encourage you to consider making it priority number one. Check out this video recording of the GeoDev Webinar Series to get a broad perspective of what you can do with the API. Also, add the ArcGIS for Developers Sample Notebooks and Dev Labs to your to-do list to inspect the capabilities of the ArcGIS API for Python for yourself. Sessions galore for you to explore at The Developer Summit in Palm Springs - We'll see you there! Title Date & Time Room Repeat Date & Time Repeat Room ArcGIS API for Python: Administering Your Web GIS Tuesday, Mar. 6 5:30 – 6:30 pm Primrose B Thursday, Mar. 8 5:30 – 6:30 pm Primrose B ArcGIS API for Python: Introduction to Scripting Your Web GIS Tuesday Mar. 6 1:00 – 2:00 pm Primrose B Thursday, Mar. 8 9:00 – 10:00 am Primrose B ArcGIS API for Python for Analysts and Data Scientists Thursday, Mar. 8 4:00 – 5:00 pm Mesquite G-H Friday, Mar. 9 10:00 – 11:00 am Mesquite C ArcGIS API for Python: Advanced Scripting Wednesday, Mar. 7 2:30 – 3:30 pm Catalina/Madera Friday, Mar. 9 1:00 – 2:00 pm Mesquite B ArcGIS API for Python: Mapping, Visualization, and Analysis Thursday, Mar. 8 2:30 – 3:30 pm Catalina/Madera ArcGIS API for Python: Cloning your GIS Wednesday, Mar. 7 11:00 – 11:30 am Demo Theatre 3: Oasis 1-2 ArcGIS Online: Using the Python API for Transportation Network Analysis Thursday, Mar. 8 10:30 – 11:30 am Santa Rosa ArcGIS API for Python: ArcGIS in a Notebook Tuesday, Mar. 6 5:30 – 6:00 pm Demo Theatre 3: Oasis 1-2 Distributed Image Analysis Using the ArcGIS API for Python Friday, Mar. 9 10:00 – 11:00 am San Jacinto
... View more
03-02-2018
10:35 AM
|
0
|
0
|
1161
|
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 |
06-18-2024
05:32 PM
|