|
POST
|
The main issue is that the time value from which you are starting, time.time(), is in a format that needs an additional conversion. str(int(time_in_seconds*1000))) should be str(int(time_in_seconds*1000000))). As ArcGIS Online stores the "uploaded" time in UTC, you probably also want to set your "now" using UTC as well. Your code is using your local time zone. For instance, you might try something like this: from arcgis import GIS
gis = GIS( ... )
import datetime
input_days = input("how many days back do you want to search? ")
now_dt = datetime.datetime.utcnow()
then_dt = now_dt - datetime.timedelta(days=int(input_days))
now = '000000'+str(int(now_dt.timestamp()*1000000))+'000'
then = '000000'+str(int(then_dt.timestamp()*1000000))+'000'
items = gis.content.search(
query = 'uploaded: [' + then + ' TO ' + now + ']',
max_items=10000
)
print('items found: ', len(items))
Also, the default for max_items with gis.content.search is 10, so if the search finds more than ten items, it will only return the first ten results. If you are expecting more than ten results, then you will want to increase max_items appropriately. Hope that helps!
... View more
11-20-2018
01:09 PM
|
1
|
3
|
2563
|
|
BLOG
|
It is indeed a case of practicality. When someone took their Named User license offline, it often resulted in unexpected complications because they didn't remember to check it back in from say their laptop, and then wanted to use Pro on their office computer or a classroom computer, while their laptop with the license was elsewhere. Or, as in Peter Wiringa's example above, which has happened to our users numerous times as well, they lose access to their license altogether, which means a support request to Esri. It then typically takes several days to get things sorted, meanwhile that use has no access. Instead, we recommend giving access to everyone to a Single-Use license instead, then they can choose to use it if they think they might be using Pro offline. Then they don't have to remember to check something back in; however, they do have to remember to update their Single-Use license once a year when the site license renews.
... View more
09-27-2018
05:49 PM
|
1
|
0
|
2680
|
|
POST
|
I wonder if Esri will provide support for making data hosted in ArcGIS Online or accessed via ArcGIS Hub visible to Google Dataset Search? Perhaps there is already a way to attach the necessary markup oneself to a data set's item detail page in AGOL?
... View more
09-06-2018
01:17 PM
|
0
|
1
|
862
|
|
BLOG
|
Option #2 is certainly a starting point, however, as Geri Miller points out in her last bullet in that section, the approach does not scale well in the long-run. As the number of students and courses using ArcGIS grows, you eventually will be challenged to keep up in an appropriately timely fashion with all the course requests, students dropping and adding courses, etc. Even simple things start to add up when you have to do them over and over... Not to mention all the requests for ArcGIS software and licenses that fall outside of courses! And, as you point out, option #2 unfortunately has the side-effect of erecting a barrier to people easily adopting GIS technology on campus. It creates a (hopefully!) undesired digital divide. (Are there institutions out there who still limit the use of Excel to just Business students and courses, or Word to English classes... 😉 Last semester, more than half of the University of Michigan's user-base came from fields outside of the traditional realms of desktop GIS. While most of those are users of Web GIS (e.g., ArcGIS , StoryMaps, GeoPlanner, Collector, Survey123), there are some who end up moving on to Pro, and even some who are jumping straight in with Pro; both for coursework and research. Option #1 makes it easy for them get started with the software on their own timeline, as they already know how to use our institutional file system. Option #2 works, however, the sooner you can move on to Option #1, the easier you can make it for members of your institution to leverage ArcGIS, and the less time you'll have to spend on trivial system administration tasks.
... View more
08-28-2018
06:46 AM
|
1
|
0
|
10123
|
|
POST
|
We've moved on to use the ArcGIS API for Python for tasks like this (see arcgis.gis.UserManager.create), which wraps the REST API call for you. If I remember correctly, however, from the days before the Python API, the REST API call is Create User. The following works with ArcGIS Online and Shibboleth, so the username format might need some minor tweaking to work with one of the other SAML providers. https://<url_key_for_org>.maps.arcgis.com/gis/portaladmin/security/users/createUser username = 'knooptp_<url_key_for_org>', password = 'None', firstname = 'Peter', lastname = 'Knoop', email = 'knooptp@devumich.edu', role = 'org_publisher', provider = 'enterprise', idp_username = 'knooptp', level = '2' I believe you have to have password set to None, and that you cannot simply leave the parameter off, as some of the documentation suggests.
... View more
03-15-2018
06:26 AM
|
0
|
1
|
2080
|
|
POST
|
It is indeed a limitation of the shapefile format. A "date" type field in a shapefile or a coverage can only store date values, not date and time values. One place you'll find this information is in the ArcMap documentation on the Fundamentals of date fields, "A coverage or shapefile stores dates in a date field with this format: yyyy-mm-dd. A geodatabase formats the date as datetime yyyy-mm-dd hh:mm:ss AM or PM." If you leave your data in the geodatabase format in which it comes from Collector, rather than converting it to a shapefile, then your field won't be truncated to date-only, and no workaround is required. If you have some other need that is forcing you to use the shapefile format, then before you export from the geodatabase, you can split your "date" field into two separate fields, one for the data value and one for the time value. There a lots of ways to do that, one being to use the Field Calculator and its VB Script DatePart() function. For details, plesae see this helpful Esri Technical Article, How To: Extract a portion of the Date field.
... View more
02-17-2018
11:30 AM
|
0
|
1
|
744
|
|
POST
|
I've added an ArcGIS Idea for this: https://community.esri.com/ideas/14565
... View more
02-12-2018
09:23 AM
|
0
|
0
|
459
|
|
POST
|
--no-pin of course does the trick, however, the implication of having to do that, rather than being able to upgrade directly in Pro's Python Package Manager is that 1.3.0 is not compatible with something in Pro 2.1? I need the entitlement calls that were introduced at 1.3.0, so I cannot stick with 1.2.5, but I hope I haven't broken something else now by upgrading... Thanks!
... View more
01-26-2018
06:14 AM
|
0
|
0
|
2318
|
|
POST
|
Tried it, but it didn't seem to actually upgrade arcgis. I'm still at 1.2.5. It did appear to install and update some other packages... PS C:\WINDOWS\system32> conda upgrade -c esri arcgis Fetching package metadata ............... Solving package specifications: . Package plan for installation in environment C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3: The following NEW packages will be INSTALLED: icc_rt: 2017.0.4-h97af966_0 The following packages will be UPDATED: notebook: 5.3.1-py36_0 --> 5.3.1-py36_1 numpy: 1.13.1-py36_0 --> 1.13.3-py36h4a99626_2 Proceed ( /n)? y icc_rt-2017.0. 100% |###############################| Time: 0:00:00 17.36 MB/s numpy-1.13.3-p 100% |###############################| Time: 0:00:00 42.45 MB/s notebook-5.3.1 100% |###############################| Time: 0:00:00 11.76 MB/s DEBUG menuinst_win32:__init__(189): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Program Files\ArcGIS\Pro\bi n\Python\envs\arcgispro-py3', env_name: 'arcgispro-py3', mode: 'user', used_mode: 'user' DEBUG menuinst_win32:create(301): Shortcut cmd is "C:\Program Files\ArcGIS\Pro\bin\Python\cwp.exe", args are ['"C:\\Prog ram Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3"', '"C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgisp ro-py3\\python.exe"', '"C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\Scripts\\jupyter-notebook-scri pt.py"', '%USERPROFILE%'] DEBUG menuinst_win32:__init__(189): Menu: name: 'Anaconda${PY_VER} ${PLATFORM}', prefix: 'C:\Program Files\ArcGIS\Pro\bi n\Python\envs\arcgispro-py3', env_name: 'arcgispro-py3', mode: 'user', used_mode: 'user' DEBUG menuinst_win32:create(301): Shortcut cmd is "C:\Program Files\ArcGIS\Pro\bin\Python\cwp.exe", args are ['"C:\\Prog ram Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3"', '"C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgisp ro-py3\\python.exe"', '"C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\Scripts\\jupyter-notebook-scri pt.py"', '%USERPROFILE%'] PS C:\WINDOWS\system32> conda lisr arcgis usage: conda.exe [-h] [-V] command ... conda.exe: error: argument command: invalid choice: 'C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\Scripts\\conda.exe' (c hoose from 'info', 'help', 'list', 'search', 'create', 'install', 'update', 'upgrade', 'remove', 'uninstall', 'config', 'clean', 'package', 'proswap') PS C:\WINDOWS\system32> conda list arcgis # packages in environment at C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3: # arcgis 1.2.5 py36_1 esri arcgispro 2.1 0 esri
... View more
01-25-2018
11:23 AM
|
0
|
0
|
2318
|
|
POST
|
In ArcGIS Pro 2.1, if I goto to Python Package Manager, and view "Installed Packages", then it indicates that arcgis (the ArcGIS API for Python) is at version 1.2.5. If switch to view "Update Packages", and click on "Refresh" (and provide admin credentials), then it does not show any updates available. Is version 1.3.0 of the ArcGIS API for Python not compatible with ArcGIS Pro 2.1? I'm missing something about how to update it?
... View more
01-25-2018
10:01 AM
|
2
|
8
|
3255
|
|
POST
|
Esri Support did not provide any docs. They walked through the process captured in the post above. If you are not even making it that far, then I would suggest contacting Esri Support, if you haven't already.
... View more
01-22-2018
02:18 PM
|
2
|
0
|
4184
|
|
POST
|
This is a disappointing. Like Megan, we regularly use Story Maps for presentations to get people excited about the ArcGIS Platform. Being able to navigate the content smoothly, without leaving the framework of the Story Map, having to navigate back/and forth between other browser tabs or windows or loosing valuable screen real-estate, was a great benefit. Not all of the Esri content has been broken yet in our presentations, however, do you know if this same best practice will be applied across all Esri sites eventually? For instance, a quick check of one presentation shows that most of the content is still working, such as the Living Atlas (https://doc.arcgis.com/en/living-atlas/about/), Learn ArcGIS (https://learn.arcgis.com), and product home pages like ArcGIS Pro (https://www.esri.com/en/arcgis/products/arcgis-pro/overview) or Collector for ArcGIS (https://www.esri.com/products/collector-for-arcgis). I'll also note that "http://www.esri.com" is the example text in the URL field in (all?) Story Map apps. So, if you enter that URL -- maybe this is your first time with Story Maps and you're just keeping things simple as you explore -- then it won't work. Furthermore, most users won't have any indication as to why it's not working, as there is no warning or error displayed, they are just presented with a blank screen. They would have to be know enough to open their browser's console to find the error (e.g., "Refused to display 'https://www.esri.com/en-us/home' in a frame because it set 'X-Frame-Options' to 'sameorigin'.") Perhaps Story Maps could being testing the X-Frame-Options setting for a site as part of the validation steps when you're entering the URL? Then you could let users know when they've entered one that is set to sameorigin, or otherwise restricted, and will not work.
... View more
01-05-2018
07:01 AM
|
2
|
0
|
1053
|
|
POST
|
Thanks, Atma Mani. I have submitted it to the ArcGIS Ideas site: Support multiple authentication profiles in ArcGIS API for Python
... View more
12-31-2017
06:34 AM
|
1
|
0
|
954
|
|
IDEA
|
In the ArcGIS API for Python, one can store authentication information for a GIS in a file (.arcgisprofile). This profile can be referenced as a handy shortcut in Jupyter Notebooks when creating an instance of GIS, rather than having to enter all the relevant authentication information directly in a notebook (e.g, URL, username, password). Currently, however, .arcgisprofile only supports storing a single profile. Each new profile you store overwrites the previous one. I would like to see support added for saving multiple profiles to .arcgisprofile. See storing your credentials locally in the Python API Guide, for examples of the current implementation. Note that the profile name is already included in what is stored in .arcgisprofile. I often find myself wanting to switch back-and-forth between multiple GIS systems when I am using Jupyter Notebooks. Maybe I want to try something against our Development environment first, and then switch to our Production environment. Or, maybe in the same notebook I am working with multiple ArcGIS Online instances to copy information from one to another, or to compare content. Rather than having to update all the authentication information in each Jupyter Notebook each time I want to switch systems, I would like to just change the profile name. Or, if I have to update a URL for username for a system, I would to do that once, in one place, in the profile, rather than having to update it in each separate notebook in which it might occur. (Note that I only store the URL and username in the profile. I leave the password to be supplied at run-time, due to the insecure nature of .arcgisprofile.)
... View more
12-31-2017
06:32 AM
|
5
|
1
|
1303
|
|
POST
|
Is there a way to store multiple sets of credentials in .arcgisprofile? It appears that each call I make to arcgis.gis.GIS to establish a set of credentials overwrites the contents of .arcgisprofile, such that it only contains the more recent set of credentials. Since the file contains the profile name, I'm hoping there is a way to store multiple sets of credentials there, and perhaps someone can point me in the right direction? For instance, I often find myself wanting to quickly switch back-and-forth between our Production and our Development environments in Jupyter notebooks, maybe in the same notebook, or maybe in two notebooks running side-by-side. I would like to do that by simply specifying gis = GIS(profile='prod') or GIS(profile='dev'), rather than having to provide the fuller set of credential information each time. Thanks! -peter
... View more
12-27-2017
07:37 AM
|
0
|
2
|
1124
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 11-03-2025 08:52 AM | |
| 1 | 11-03-2025 08:18 AM | |
| 1 | 11-02-2025 08:44 AM | |
| 1 | 10-15-2025 07:50 AM | |
| 2 | 10-13-2025 02:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
Sunday
|